Active Topics

 



Notices


Reply
Thread Tools
Posts: 136 | Thanked: 263 times | Joined on Nov 2012 @ Germany
#31
Originally Posted by handaxe View Post
rootsh....

Difficult to remember, but I probably set a root password (?)
I've set a root password as well, but sudo won't ask for it, so that's probalbly not the issue. You could have a look at the list of installed packages in the Application manager->Uninstall, and check if you have Sudser installed.

If so, an exclusion can be added not to ask for a password for the relevant commands (i never did this before, will have to try). And if that works an option in the configuration dialog would be useful.

Edit:
I was wrong here - the opposite is true. Sudser let's you execute sudo without a password. I'll have a look on how to execute the relevant commands without a password.

Last edited by rasmarc; 2015-05-08 at 15:07.
 

The Following User Says Thank You to rasmarc For This Useful Post:
Posts: 136 | Thanked: 263 times | Joined on Nov 2012 @ Germany
#32
Originally Posted by ThomasAH View Post
That was it! I hadn't run the OSW Options configuration yet (I didn't know it existed). After configuring it I just rebooted the phone, now it's working! I tested it and it seems to work as expected (See attachments)

Perhaps you chould add a instruction to the first post that you should run the OSW Options configuration once before using it? I couldn't find anywhere that this was necessary.
It should not be necessary to run OSW Options first. A typo in conjunction with your system settings was probably the reason for this again. I will wait uploading the fix and see if handaxe's issue gets solved quickly.

Nice that it works now.
 

The Following User Says Thank You to rasmarc For This Useful Post:
Posts: 136 | Thanked: 263 times | Joined on Nov 2012 @ Germany
#33
v1.2-1 is uploaded!

Main change: the sudo password issue is solved. I put all sudo commands in an extra shell script and added an entry in the sudoers.d directory.

@handaxe: This could work for you. I uninstalled Sudser, which made sudo ask me for a password and the widget not switch anymore, just as you reported. This new version works properly again on my device.

Changes:
*bugfix: typo led to empty button on fresh install
*enabled sudo commands without password

Last edited by rasmarc; 2015-05-09 at 08:39.
 

The Following 5 Users Say Thank You to rasmarc For This Useful Post:
Posts: 1,378 | Thanked: 1,604 times | Joined on Jun 2010 @ Göteborg, Sweden
#34
Originally Posted by rasmarc View Post
@handaxe: This could work for you. I uninstalled Sudser, which made sudo ask me for a password and the widget not switch anymore, just as you reported. This new version works properly again on my device.
Fook, it still will not start for me. Will take a look. But thanks, this is very nice.

Ok, if I run

Code:
/usr/sbin/openssh-status.sg start_sshd
it gives an operation not permitted error.

Last edited by handaxe; 2015-05-11 at 16:30.
 

The Following User Says Thank You to handaxe For This Useful Post:
Posts: 136 | Thanked: 263 times | Joined on Nov 2012 @ Germany
#35
Originally Posted by handaxe View Post
Fook, it still will not start for me. Will take a look. But thanks, this is very nice.
Well, that's interesting.

I guess you mean the button appears in the status menu but it won't start/stop the server. Maybe your device doesn't update the sudoer's list.

You can try as root:
Code:
/usr/sbin/update-sudoers
Another question:
1. Start the configuration dialog
2. Switch "Run server at system startup"
3. Switch one of the widget's options
3. Close and re-open the configuration dialog

Did it save any configuration?
 
Posts: 1,378 | Thanked: 1,604 times | Joined on Jun 2010 @ Göteborg, Sweden
#36
Originally Posted by rasmarc View Post

Another question:
1. Start the configuration dialog
2. Switch "Run server at system startup"
Ha, thanks for the reminder - I forgot to mention previously that it did not save "Run server at system startup" option but did the others.

Now, having set it, it sticks, and then the widget works as advertised. Brilliant & thanks.
 

The Following User Says Thank You to handaxe For This Useful Post:
Posts: 1,378 | Thanked: 1,604 times | Joined on Jun 2010 @ Göteborg, Sweden
#37
Strange, but after some time, the app indicator "forgets" that the server is enabled. Pressing the drop-drown generates an "already running, updating screen" (or words to that effect) message and the indicator reappears.

Is this "sleep" related?
 

The Following User Says Thank You to handaxe For This Useful Post:
Posts: 136 | Thanked: 263 times | Joined on Nov 2012 @ Germany
#38
Originally Posted by handaxe View Post
Strange, but after some time, the app indicator "forgets" that the server is enabled. Pressing the drop-drown generates an "already running, updating screen" (or words to that effect) message and the indicator reappears.

Is this "sleep" related?
This needs a fix/workaround. It happens that the server status is recognized as off even when it should be on. The command for checking is
Code:
ps aux | grep -c usr/sbin/sshd
which i think can be assumed to be reliable.

Anyway, when "Stop tracking status when off" is enabled (you do have it enabled?) the widget immediately stops tracking as soon as status OFF is recognized. To handle those occasional short intervals correctly, when the sshd daemon seems non-listed in the process list, a time-out needs to be added before tracking stops.
 

The Following User Says Thank You to rasmarc For This Useful Post:
Posts: 176 | Thanked: 468 times | Joined on Jan 2010 @ NL
#39
Originally Posted by rasmarc View Post
Anyway, when "Stop tracking status when off" is enabled (you do have it enabled?) the widget immediately stops tracking as soon as status OFF is recognized. To handle those occasional short intervals correctly, when the sshd daemon seems non-listed in the process list, a time-out needs to be added before tracking stops.
I have an oddity that may be a related to what you describe above:
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?
__________________
Sony CMD J6 > HTC Canary > HTC Universal > Nokia N82 > Nokia N8 > Nokia N900 > HTC One X > Jolla > Nexus 5 > Nexus 5X > Pixel 2 / PinePhone

Last edited by ThomasAH; 2015-05-12 at 15:04.
 

The Following 2 Users Say Thank You to ThomasAH For This Useful Post:
Posts: 136 | Thanked: 263 times | Joined on Nov 2012 @ Germany
#40
Originally Posted by ThomasAH View Post
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 have no explanation for this so far. This is not triggered by the widget itself directly. Maybe the used python command for deleting the icon is somehow incomplete (?). It needs more investigation.

The timeout for switching the display to off is now added. For the moment I used the shortest time possible (just one more checking, that is 2 seconds) not to delay updating the display to OFF too much. This affects only one situation, when the server is waiting for 1 connection to close (and when the server is stopped externally of course).

v1.2-2 is uploaded.

Changes:
*added timeout to avoid mistaken status off
*cosmetic change: message "display updated"
 

The Following 2 Users Say Thank You to rasmarc For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 21:44.