Script to capture gnome-screensaver event doesn't work if run as root
I am trying to run scripts when gnome-screensaver starts or stops in Ubuntu. If I set up the scripts as described it works fine. I can't get it to work as root.
Here is the script ssTriger copied from the referenced web site with a small change (used "call" instead of "Popen" to invoke the scripts to run at start and stop of screen saver activation): Code:
#!/usr/bin/env python Code:
#!/bin/bash Code:
#!/bin/bash Also have added this to /etc/sudoers so I don't have to enter my password when the scripts run. Code:
user_me ALL=(ALL) NOPASSWD: /opt/ssTrigger/ssStart This is a potential solution to a question I posted a while back where I want to put internet connection to sleep if no user activity but haven't had time to try and solve till now. Any help will appreciated. |
What error message do you get when run as root?
|
None. It just doesn't capture the screen saver start and stop events. Suddenly today it doesn't capture the events even if I run as me.
|
Just discovered that gnome-screensaver isn't running. Now I have to find out why. It has always started automatically as far as I know, but now it doesn't. Did an update just before I noticed the problem, maybe that had something to do with it. Will keep digging as time permits.
|
All times are GMT -5. The time now is 03:12 AM. |