maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [M5] [Announce] OpenSSH status widget (https://talk.maemo.org/showthread.php?t=95429)

rasmarc 2015-05-12 17:30

Re: [Announce] OpenSSH status widget
 
1 Attachment(s)
Quote:

Originally Posted by ThomasAH (Post 1470109)
Even when the server is turned off, every once in a while the 'SSH' icon appears in the top tray-icon area (right of the clock) very briefly. It usually happens when I (dis)connect from a internet connection, or update my repositories. It even happens when "Stop tracking status when off" is enabled.

Do you have any idea why this might happen?

I found out the proper command to hide the icon from the status area is different from what i used - (None) instead of empty brackets.

May I ask you to
  • download the attached file
  • remove the .txt suffix
  • copy it into /usr/lib/hildon-desktop
  • make it executable
  • restart the status menu from the configuration dialog's menu
  • start and stop the server
and check out if the icon won't appear anymore (i can't securely reproduce the effect you described).

ThomasAH 2015-05-12 19:29

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by rasmarc (Post 1470148)
I found out the proper command to hide the icon from the status area is different from what i used - (None) instead of empty brackets.

May I ask you to
...
and check out if the icon won't appear anymore (i can't securely reproduce the effect you described).

Did what you asked: downloaded and placed python file in correct directory, renamed and chmod +x, restarted status menu, restarted and stopped SSH server.

Now waiting to see if it will still occur... Will report back tomorrow! ;)

PS.: I am still running 1.2-1, not 1.2-2, I don't know if that's of importance?

rasmarc 2015-05-12 19:55

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by ThomasAH (Post 1470165)
Now waiting to see if it will still occur... Will report back tomorrow! ;)

PS.: I am still running 1.2-1, not 1.2-2, I don't know if that's of importance?

Thank you for this. Your version is ok for that, it's in fact 1.2-2 including this change to try hiding the icon properly, except that the about pop up from the config dialog still says 1.2-1.:eek:

handaxe 2015-05-12 20:05

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by rasmarc (Post 1470148)
[*]download the attached file

I am testing this too.

What would be nice, is if the ssh indicator icon displayed yellow when a connection was present, grey/white when server running but no connection.

Very nice contribution this.

handaxe 2015-05-13 13:20

Re: [Announce] OpenSSH status widget
 
Sadly, the app indicator icon still disappears when it should not.

rasmarc 2015-05-13 13:36

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by handaxe (Post 1470227)
Sadly, the app indicator icon still disappears when it should not.

To be sure, you have "Stop tracking status when off" enabled, and after the server has been running a certain time with no users connected, the display switches to off, right?

To increase timeout, you could open /usr/lib/hildon-desktop/openssh-status-widget.py and in line 162
Code:

if self.sshJustOff < 1:
give the condition a higher value. Then restart the status menu.

handaxe 2015-05-13 14:12

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by rasmarc (Post 1470228)
To be sure, you have "Stop tracking status when off" enabled, and after the server has been running a certain time with no users connected, the display switches to off, right?

All of those are correct.

I will implement what you suggest.

I have seen this actually happen, when using a drop down menu in Yappari - "ssh" there one minute, drop down, then it was gone. Certainly not reproduceable on demand, however.

ThomasAH 2015-05-13 14:40

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by handaxe (Post 1470227)
Sadly, the app indicator icon still disappears when it should not.

Same for me.

Quote:

Originally Posted by rasmarc (Post 1470228)
To be sure, you have "Stop tracking status when off" enabled, and after the server has been running a certain time with no users connected, the display switches to off, right?

Yup!

Quote:

To increase timeout, you could open /usr/lib/hildon-desktop/openssh-status-widget.py and in line 162
Code:

if self.sshJustOff < 1:
give the condition a higher value. Then restart the status menu.
I'll try that!

rasmarc 2015-05-13 19:56

Re: [Announce] OpenSSH status widget
 
1 Attachment(s)
Quote:

Originally Posted by handaxe (Post 1470175)
What would be nice, is if the ssh indicator icon displayed yellow when a connection was present, grey/white when server running but no connection.

An option "Show status 'connected' in status area" is added and enabled by default. I modified the "SSH" icon to show an additional "user" symbol above the letters. The idea of giving it a yellow color confused me a bit, I prefer the yellow color being associated with "server on", so i kept the white color of the status area icon.

The "timeout" feature got a modification. Status "off" is now displayed without a delay again. Instead there's a follow-up time of 10 seconds for tracking. If the display still switches to "off" while the server keeps running, there has to be a yet uncovered conflict with something else ;).

Before uploading I'll wait for some feedback regarding the two actual issues, mistaken switching to "off" and appearing icon in the status area. I attached the deb file of v1.3-pre.

handaxe 2015-05-13 23:00

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by rasmarc (Post 1470265)
I modified the "SSH" icon to show an additional "user" symbol above the letters.

Ok, this has me just a tad confused - what "ssh" icon do you refer to here? Because, if it is the icon that displays next to the battery icon visible from the desktop, then I see nothing there indicating a connection.

[silly me - you were referring to this version and indeed such a marker appears. I think it is a little cluttered and changing it to orange would be a simpler way of showing the same. My 2 cents worth :-) ]

I was referring to that "ssh" icon. I accept your rationale regarding yellow, but what if it displayed orange when a connection(s) was active. In the drop down that shows when the battery area is pressed, orange is used to show the no. of active connections, hence my preference now for that colour.

I will test 1.3-pre. So far, modifying the parameter as you suggested a few posts back to 3 seems to give stability, but let's see wgat your new approach brings....

handaxe 2015-05-15 11:46

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by rasmarc (Post 1470265)
Before uploading I'll wait for some feedback regarding the two actual issues, mistaken switching to "off" and appearing icon in the status area. I attached the deb file of v1.3-pre.

So far, so good. Maybe a bit more time to see and perhaps ThomasAH to chip in here too?

rasmarc 2015-05-15 14:21

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by handaxe (Post 1470379)
So far, so good. Maybe a bit more time to see and perhaps ThomasAH to ship in here too?

In respective situations did you notice the display switched to 'off' and back to 'on'? It shows the actual status now and does no longer bridge 'off'-time.

Quote:

Originally Posted by handaxe (Post 1470283)
I think it is a little cluttered and changing it to orange would be a simpler way of showing the same. My 2 cents worth :-)

I gave it a try and think a coloured indicator is a good idea. In view of the fact that the button's text colour depends on your current theme - and I also like the additional symbol - I just added an option to choose between indicator styles (symbol, blue, green, orange, red).

handaxe 2015-05-15 19:45

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by rasmarc (Post 1470393)
In respective situations did you notice the display switched to 'off' and back to 'on'? It shows the actual status now and does no longer bridge 'off'-time.

Yes it does. I think the 1.3-pre implementation is good.

rasmarc 2015-05-15 20:49

Re: [Announce] OpenSSH status widget
 
I updated the screenshots in post #1 showing the modified status area icon of v1.3-0, with user symbol in one case, and orange colored in the other. Available colors are: blue, green, orange, red. In case one absolutely needs a special theme-colored icon, a custom icon can be added by copying a png file of size 18x18 px to
Code:

/usr/share/icons/hicolor/18x18/hildon/openssh-status_users_description.png
"description" has to be lowercase. As soon as the file exists it will be available in the configuration dialog.;)

Given handaxe's feedback, I kept the 10 seconds follow-up time for tracking, when status switches to 'off'.

v1.3-0 has just been uploaded.

Changes:
*new option: show status 'connected' in status area
*status 'off' is displayed without delay again, instead added follow-up time for tracking
*bugfix: tapping outside confirmation dialog didn't cancel but disconnect

rasmarc 2015-06-01 14:24

Re: [Announce] OpenSSH status widget
 
Hi! I uploaded v1.4-1 yesterday. Using some information from this thread i added another option
  • Keep WiFi power management off when connected
Unlike described in the thread the widget solely turns off power management and leaves the signal strength unchanged because I did not notice any effect from that so far.

Furthermore the widget's icon has changed from simple blowfish to openssh style, see post #1. And there was a command missing in the installation routine, "update-sudoers". I tested v1.4-1 on my just PR1.3-flashed spare device. :cool:

Changes:
Code:

*new option: keep wifi power management off when connected
*added postinstall/postremove command: update-sudoers
*icon changed


rasmarc 2015-06-04 19:09

Re: [Announce] OpenSSH status widget
 
Folks, here comes an important update!

In v1.5-0 cpu load is being reduced by about 90%. In prior versions the routines for checking server status and number of connections generated a cpu load of 6% (measured with top in ssh). The reason was to be found in the python command
Code:

subprocess.Popen
which in python 2.5 does neither allow direct piping beween shell commands nor writing directly into a variable. I replaced it with the legacy command
Code:

commands.getoutput
which reduced the respective code to two lines and the cpu load to 1,7%.

In addition I increased the tracking interval of 2 seconds to finally 5 seconds, which feels still reasonable to me. It led to further decrease in cpu load to 0.6%.

Another option has also been added (as a result of discovering the former cpu load :eek:):
  • Stop server when not connected for xx minutes
...still a suitable option, even with heavily decreased cpu load.

Finally I added setting signal strength to high level when keeping off wifi power management.


Changes in v1.5-0:
*cpu usage reduced by 90% (from about 6% to 0.6%)
*new option: Stop server when not connected for xx minutes
*signal strength set to high when wifi pm is off

handaxe 2015-06-04 20:55

Re: [Announce] OpenSSH status widget
 
Brilliant! I was watching the battery and had developed the impression that battery drain was higher. Thought about using powertop to investigate and here you provide the answer and solution. Thanks.

ThomasAH 2015-06-11 15:58

Re: [Announce] OpenSSH status widget
 
Thanks a lot rasmarc for this update! I also had the feeling the widget was eating my battery for a bit, so nice to see this update coming out.

Sorry for not responding sooner btw, I was away for a while, and then my N900 got bricked (e.g. wouldn't startup anymore) by an update so I had to flash and reinstall everything. Am now running your widget v. 1.5-0 for a while, and I haven't seen the weird bug of the SSH-icon 'flashing' in the tray area for a while now.

Thanks for all the hard work :)

rasmarc 2015-06-22 19:58

Re: [Announce] OpenSSH status widget
 
Thank you for the feedback messages. There was still room for improvement: :)

The widget now detects display blanking/unblanking - as it should be of course - and stops/resumes tracking (i.e. cpu load ~0% when blanked). If "stop server when not connected" is enabled status is tracked once per minute.

I added an option "enable tracking" which is selected by default. But if one has the display on and the server running most of the time it might be better to disable tracking. In this mode the button displays just on/off. The number of connections can then be called up by long pressing the button and again from the confirmation dialog (see screenshot in post #1).

"Keep wifi power management off when connected" (to avoid input lags) is now implemented into the server configuration. This way it still works when tracking is disabled. Changes to this option take now effect immediately (the script is being restarted), so power management can be turned on/off on demand. This might be useful because of the increased battery drain when power managment is kept off.


Changes in v1.6-0:
* added power saving features:
+ widget detects display blanking and almost falls asleep
+ tracking made optional, just switch on/off and call up number of connections manually
* wifi power mangement is now implemented into the server configuration
* added option to choose wifi-pm refresh time
* confirmation dialog changed

handaxe 2015-06-24 20:07

Re: [Announce] OpenSSH status widget
 
Has the widget disappeared for anyone else? Both the status icon and in the drop-down.

rasmarc 2015-06-24 20:13

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by handaxe (Post 1474700)
Has the widget disappeared for anyone else? Both the status icon and in the drop-down.

I'm wondering what that could be.

Code:

/usr/lib/hildon-desktop/openssh-status-widget.py
as user doesn't give any output, does it?

I'll have a look right now.

ThomasAH 2015-06-24 21:24

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by handaxe (Post 1474700)
Has the widget disappeared for anyone else? Both the status icon and in the drop-down.

Yes it did in fact! I thought it was my phone, and that I maybe had te reboot, but it completely disappeared. Running the OSW settings didn't fix it.

rasmarc 2015-06-24 21:32

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by ThomasAH (Post 1474711)
Yes it did in fact! I thought it was my phone, and that I maybe had te reboot, but it completely disappeared. Running the OSW settings didn't fix it.

Please try
Code:

apt-get install python-dbus
I forgot to add this dependency.

rasmarc 2015-06-26 12:28

Re: [Announce] OpenSSH status widget
 
I just uploaded v1.6-1 which hopefully shows up - sorry for the inconvenience. I was so excited coming at that dbus stuff which was new to me I forgot the missing dependency.

This version is ment to be a final one regarding features.

An optional restart button is added to the confirmation dialog, see screenshot in post #1.

Concerning the very high power consumption when wifi power management is switched off (it makes the wireless connection kind of obsolete because you just have to charge the battery instead :() I added an experimental feature which allows to toggle power management every few seconds. It's an attempt to find a balance between power consumption and appearing input lags.

The period when power management is off can be chosen from 1 to 3 seconds.
The period when power management is on can be chosen from 3 to 5 seconds.

Changes take effect immediately.


Changes in v1.6-1:
* fixed missing dependency: python-dbus
* added optional Restart button in confirmation dialog
* wifi power management: removed Refresh time option, added Toggle mode

handaxe 2015-06-27 19:28

Re: [Announce] OpenSSH status widget
 
Still no widget... and
Code:

/usr/lib/hildon-desktop/openssh-status-widget.py
produces no output.

rasmarc 2015-06-27 19:46

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by handaxe (Post 1474996)
Still no widget... and
Code:

/usr/lib/hildon-desktop/openssh-status-widget.py
produces no output.

Ok, thanks. That can't be a big problem...I'll just test a few things on my device.

rasmarc 2015-06-27 21:33

Re: [Announce] OpenSSH status widget
 
1 Attachment(s)
I ask you to help:confused:. Would you please extract the attachment to /usr/lib/hildon-desktop, make it executable and restart the status menu?
I commented out the relevant dbus lines. If it still doesn't show up, it's one of the other changes since 1.5-0. :o

handaxe 2015-06-27 22:16

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by rasmarc (Post 1475001)
I ask you to help:confused:. Would you please extract the attachment to /usr/lib/hildon-desktop, make it executable and restart the status menu?

Did as you ask and no output or widget appears.

rasmarc 2015-06-28 00:36

Re: [Announce] OpenSSH status widget
 
Would you please:

Open OSW Options and change the time value for "stop server when not connected". This overrides a changed syntax in the configuration file.

Thanks for your support. Let's see if there are more hidden obstacles.

rasmarc 2015-06-28 02:11

Re: [Announce] OpenSSH status widget
 
1 Attachment(s)
Or install the attached v1.6-2pre please. This will tell if update works now.

handaxe 2015-06-28 12:03

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by rasmarc (Post 1475011)
Or install the attached v1.6-2pre please. This will tell if update works now.

Yessireee it is working.... thanks.

rasmarc 2015-06-28 16:58

Re: [Announce] OpenSSH status widget
 
And v1.6-2 is uploaded. I promoted this version to extras-testing, ...please consider detailed testing and voting afterwards.


http://wiki.maemo.org/Help_testing_software


Changes in v1.6-2:
* bugfix: update a changed syntax in the configuration file
* detect short intermediate connections for "stop server when not connected" when display is blanked (tracking interval is once per minute)
* configuration window: added button to the main menu to show sections in reverse order (show server options first)

rasmarc 2015-06-29 17:21

Re: [Announce] OpenSSH status widget
 
The package is now optified. Although it isn't that large this is the better choice.

v1.6-4 is uploaded and promoted to Extras-testing.


Changes in v1.6-4:
* fixed typo in postinstall script: it didn't comment out ForceCommand

Changes in v1.6-3:
* optified package
* added required hint that keeping off wifi pm increases power consumption significantly

rasmarc 2016-11-12 18:18

Re: [Announce] OpenSSH status widget
 
Did anyone else notice the button showing "off" occasionally while the icon was showing "on" (i.e. colored)?

Here's v1.6-6, available in extras-devel.

Hints:
When updating...
1. the server daemon switches to off.
2. wifi power managment settings are overwritten to default values and can be readjusted in the options dialog ("OSW Options").


Changes in v1.6-6:
* added mimimize button to about dialog

Changes in v1.6-5:
* fixed occasional label 'off'
* keep wifi-pm settings on future updates
* restart server daemon if running instead of stopping it on future updates

rasmarc 2016-11-27 15:09

Re: [Announce] OpenSSH status widget
 
3 Attachment(s)
Big update :eek:

This new version 2.0.0 has everything you need ;)
  • New button (see attachment) for faster login and wifi power management control

    There's now a second button right to the main button. It shows the status of wifi pm settings:
    - white flash: don't keep off
    - yellow flash: keep off when connected
    - yellow and white flash: toggle mode

    A short tap keeps wifi pm off for 30 seconds. This solves login problems caused by wifi pm (I often had to reconnect wlan before being able to login).

    A long tap opens wifi pm settings in a dialog window. It is no more necessary to open the settings window ("osw options") for changes or control. But if it's already open it will be syncronized with the dialog window. Changes there are visible in the settings window instantly.

    If you don't need this feature the button can be removed by unchecking the relevant checkbox in settings.

  • No more restarting the status menu

    All changes in the settings window take effect immediately now. This makes playing around with all options to find out what fits quite easy.

  • Bugfixes/Improvements

    - Keeping off wifi pm is now working user independently. It will work until the last user logs out. So far it only had worked until the first user who logged in logged out again (I realized that lately).

    - Detection of active connections and server status is improved, especially on start or restart of the status menu.

Regarding uploads it seems moving files to autobuilder queue currently doesn't work. I tried it last night and a few hours ago. The upload won't show up. Therefore version 2.0.0-rc1 is attached. :)

rasmarc 2016-12-01 20:19

Re: [Announce] OpenSSH status widget
 
Uploads work again, v2.0-0 is in Extras-devel and promoted to Extras-testing.

Additionally to v2.0.0-rc1 from the last post I added a settings button to the dialog window. Everything can be accessed from the widget itself now.

Here's the complete changelog for v2.0-0:
* added feature for faster login and easy access to pm: new button to keep wifi-pm off for 30 sec; long tap opens pm settings
* No more restarting of the status menu necessary; all changes take effect immediately!
* changed start routine to catch proper server state when status menu starts (another workaround for occasional server off-times)
* fixed detection of connections: the proper number should now be displayed in any case of brute force operation
* "keep wifi-pm off when connected" is now user independent: it keeps working until the last user logs out
* added optional settings button in dialog window

handaxe 2016-12-01 22:24

Re: [Announce] OpenSSH status widget
 
Great stuff, much appreciated - really!

HA

mr_pingu 2016-12-01 22:33

Re: [Announce] OpenSSH status widget
 
Nice, thank you very much :) For Coding competition?

rasmarc 2016-12-01 23:35

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by mr_pingu (Post 1519799)
Nice, thank you very much :) For Coding competition?

I remember there's some time to have a closer look :). The logo to the right is so very well designed.

rasmarc 2016-12-02 01:21

Re: [Announce] OpenSSH status widget
 
This new settings button led to a bugfix... because the dialog window can now be shown even when the server is off the restart button might be used::mad::D

Change in v2.0-1:
* "new settings button" bugfix: when server was off the newly accessible restart button led to unexpected result


All times are GMT. The time now is 15:31.

vBulletin® Version 3.8.8