To toggle the enabling/disabling of my notebook's touchpad according to connected USB mouse, I used touchpad-indicator, which runs a daemon to monitor connected devices and take appropriate action.
When I send notebook to sleep and then unplug my mouse, on the wake up, the touchpad is disabled, so I have to connect-disconnect the mouse to enable it! I've searched this forum for the problem and both found solutions (adding script in /etc/pm/sleep.d
or /usr/lib/pm-utils/sleep.d
) didn't work!
I've put up a question to solve it, but after all, even when re-worked using udev's rules instead of touchpad-indicator, the problem still persists!
I want to clarify it: if touchpad was disabled on system level (i. e. disabled before even logging in, and the script would lie in rc.local
, which, however, I tried, and it didn't work), putting scripts in /etc/pm and usr/lib/pm-utils may work.
But it is disabled on session level or whatever level does udev apply to. Can you please tell me where to put scripts which will run when I enter the password? NOT LOG-IN, BUT ENTER PASSWORD e.g. after wakeup.
Update: @terdon You didn't quite get it. I don't even have xscreensaver enabled, I doubt if it is even installed. You see, because my account has a password, if I press "Log out" or "Change user" OR SLEEP MODE, after that I will have to enter my password, and it has nothing to do with xscreensaver OR ANY SCREENSAVERS I DON'T HAVE THEM.
I tried what you suggested before asking this question and it didn't work out.
Update 2: Ok, after some investigation I can tell that it's a Lubuntu specific problem. I am working now on "befriending" lightdm (which I guess applies on some level other than udev) and udev. Anybody with any experience with lighdm is appreciated.
Update 3:
Thanks to Ubuntu Wiki I (correctly?) figured out where to put the call of my script.
So I added session-setup-script=/home/n76/tptoggle.sh
to /etc/lightdm/lightdm.conf
The current situation is the same as in the beginning, except that lightdm is actually trying to put touchpad on when user session starts
The problem isn't gone, but I feel that I'm close and it's just about giving lightdm the right privileges.
Please suggest how to do it.
gnome-screensaver
and I'm sure that is running on your system. You can check using this command:ps aux | grep gnome-screensaver
. – Radu Rădeanu Mar 27 '14 at 08:47