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 2016-12-18 06:11

Re: [Announce] OpenSSH status widget
 
1 Attachment(s)
Good morning dear fellows

The connections overview is now complete in the effect that all connections are displayed by adding "other", which appears when such is present.
When wlan is off, established wlan connections are no longer counted as such, because maemo says: "there is no wlan ip" and that's true.
The questions mark indicates that there was no count.



Changelog of v2.2-5:
* added "other" to connections overview, only visible when present
* added "?" to wlan connections in overview, when wlan is off
* added wifi pm off/on on wlan on/off, when there are connections
* eliminated error message after login when wlan was off
* added some if's where i cannot oversee if there could be an error eventually

rasmarc 2016-12-18 15:33

Re: [Announce] OpenSSH status widget
 
Quick update :o

Sometimes "other" connections was "1" instead of "0" due to sshNetstat which sometimes gives an empty line:

Fixed:
Code:

sshNetstat = getoutput("netstat -t | grep :ssh.*ESTABLISHED").split("\n")

try:
    if not "ESTABLISHED" in sshNetstat[0]:
        sshNetstat = []
    except:
        pass

Changelog in v2.2-6:
* fixed counting "other" connections: sometimes netstat gave an empty line
* removing scripts in /etc/ssh with postuninstall

--- Edit ---

Hmpf, removing scripts went completely wrong. When installing v2.2-6 a second time, the scripts in /etc/ssh are being installed but uninstalled immediately by the postremove script - strange.

Now I've produced a mess: If you installed v2.2-6 it has to be uninstalled before installing another version. Otherwise the scripts are not installed.

This one is tested in detail and works:

Changelog of v2.2-7:
* removing scripts in /etc/ssh with postremove - second try - UNINSTALL v2.2-6 before installing v2.2-7

rasmarc 2016-12-19 02:39

Re: [Announce] OpenSSH status widget
 
Recent changes were written over the weekend quickly, but it seems to find an end. These are just small changes - from now on only bugfixes.

I had an error in reasoning when trying to find that wrong "other" value and changing the command for counting server connections from

(good)
Code:

netstat -t | grep -c :ssh[[:space:]]*[0-9].*ESTABLISHED
to

(bad)
Code:

netstat -t | grep -cE :ssh[[:space:]]*E{0}.*ESTABLISHED

The latter counts clients connections as well - ...because whitespace is E{0} (I think).

So, here is the changelog for v2.2-8:
* switch wifi pm already on when disconnecting wlan to make sure the command is valid
* recent change for counting server connections undone (error in reasoning)

--- Edit ---

moving closer to rock-solid :)

In connections overview when returning from "?" or "0 Other" to previous values the display didn't change due to unset variables.

Changelog for v2.2-9:
* fixes in connections overview: for "?" and "0 other" the "recent" variables were not set

xaftessest 2017-01-14 21:43

Re: [Announce] OpenSSH status widget
 
Hello :)

Can you tell me for what WiFi PM exactly is? Thanks

"PM" = PowerMode, so you can override settings and use full power for 30seconds?

rasmarc 2017-01-15 12:07

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by xaftessest (Post 1521967)
Hello :)

Can you tell me for what WiFi PM exactly is? Thanks

"PM" = PowerMode, so you can override settings and use full power for 30seconds?

"WiFi PM" is short for "WiFi Power Management", also referred to as wifi power saving mode. It is a system's feature to reduce power consumption significantly when connected to a wifi network and is usually active. It can be turned off in system settings->internet connections->connections->edit->next->next->next->advanced->other->power saving.

Unfortunately using it together with ssh/sftp it leads to input lags or, depending on your router model, can even prevent logins.

The latter is the reason for adding the wifi pm button to the widget. Wifi pm can be turned off automatically only after a successful login. The login itself remains slow or even impossible. By tapping the wifi pm button wifi power saving mode ("wifi pm") is turned off manually for 30 seconds in order to being able to login or to make logins faster.

xaftessest 2017-01-15 16:03

Re: [Announce] OpenSSH status widget
 
Thank you :)

nonsuch 2020-01-19 15:25

Re: [Announce] OpenSSH status widget
 
1 Attachment(s)
Hello,
Thank you for this package that scratches an important itch.

I installed it with difficulties.

I am again seeing the below output - it does not seem to work either, as
Code:

pidof sshd
confirms: Just pressing the empty button neither starts nor stops sshd.
I can start/stop it manually though.
Then I uninstalled, reinstalled, had a broken config file, removed it, rebooted, and had it working fine for half a day!
That was yesterday; today I tried again and got the above again.

This is my current config:
Code:

[wifipm]
wifiPMOffSec = 2 seconds
toggleWifiPM = True
wifiPMOnSec = 4 seconds
keepWifiPMOff = True

[options]
wifiPMIcon = True
showConnected = True
stopWhenIdle = True
showRestartButton = True
skipSystemCheck = False
stopTracking = True
trackingEnabled = True
showSettingsButton = True
configShowWifiHint = False
stopAfterMinutes = 5 minutes
showAllConnections = True
connectedIcon = Symbol
configReverseOrder = False
confirmDisconnect = True

How can I troubleshoot this?

This is on a N900 with CSSU testing and power kernel.

I also messed around with ssh over USB earlier, but dropped it again.
I don't think that left any residue but who knows.

rasmarc 2020-01-19 21:22

Re: [Announce] OpenSSH status widget
 
Try to find the passage where the code stops working on your device.

Please open your config file and change:

Code:

skipSystemCheck = True
trackingEnabled = False

and restart the status menu:

Code:

sudo dsmetool -k /usr/bin/hildon-status-menu
sudo dsmetool -t /usr/bin/hildon-status-menu

Is the main button displayed now?

nonsuch 2020-01-21 06:04

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by rasmarc (Post 1564529)
Try to find the passage where the code stops working on your device.

That must have been a reboot, if I understand the question correctly.

I changed the config and executed those commands (as root since apparently user is not in sudoers), and it fixed both display and functionality.
Thanks!
Was one of those a hidden setting or all just options available from the GUI?
Why did it not work before?

_____________________________

Another question entirely, if I may (feel free to ignore this bit):
I notice that you added a new application for Fremantle very recently, which makes me think you're still actively using your N900 - is it possible to get e.g. Email working safely (openssl, tls versions etc., I've been reading up on this here on TMO)? I know that the browser is more or less out, but I'd like to be able to
- check my mail
- listen to podcasts (gPodder throws a tls error)
- sync calendar/contacts
securely.

rasmarc 2020-01-23 20:22

Re: [Announce] OpenSSH status widget
 
Quote:

Originally Posted by nonsuch (Post 1564568)
Was one of those a hidden setting or all just options available from the GUI?

"skipSystemCheck = True/False" is not available from the GUI. When true the widget checks if "respawn" is active for sshd. If so you get asked to confirm deactivating it.

Quote:

Originally Posted by nonsuch (Post 1564568)
Why did it not work before?

I don't know exactly yet. You may check if
Code:

/etc/event.d/sshd
exists on your device and post the content. That's the file where "respawn" is set.

Does the widget start properly when you enable tracking from the GUI?

Quote:

Originally Posted by nonsuch (Post 1564568)
I'd like to be able to
- check my mail
- listen to podcasts (gPodder throws a tls error)
- sync calendar/contacts
securely.

- :confused:
- :confused:
- for syncing calendars and contacts I used "syncevolution"


All times are GMT. The time now is 16:37.

vBulletin® Version 3.8.8