![]() ![]() The actual xscreensaver commands can also invoked trough su (instead of sudo) like su $XUSER -c "(xscreensaver-command -lock)"īut that won't works for me because I use pam_mount to mount my encrypted home during login, and pam asks for my password for pam_mount in the script when I use su. Sudo -u $XUSER xscreensaver-command -lock Sudo -u $XUSER xscreensaver-command -throttle Can I start it instantly from the terminal I sometimes need this feature while working with 2 monitors with two different OS. Because it makes the monitor look like turned-off. Sudo -u $XUSER xscreensaver-command -unthrottle 13 I like the 'Black Screen' screen-saver. Userhome=`getent passwd $user | cut -d: -f6`ĭisplaynum=`echo $x | sed s#/tmp/.X11-unix/X#` # If you want the foreground X user, use getXconsole! # getXuser gets the X user belonging to the display in $displaynum. Small tutorial on how to set up xscreensaver on Ubuntu 18.04- Disable screen-locking and turning off screen- Install xscreensaver using terminal- Add xscreen. # Lock xscreensaver on resume from a suspend. I cant tell why not, you could try asking Ubuntu package maintainers. usr/lib/pm-utils/sleep.d/00xscreensaver #!/bin/sh Ubuntu package apparently doesnt include screensaver. So the final script that works for me is: Finally I found the right way of doing this combining the parts I found in /etc/acpi/sleep.sh (that seems left unused there), and Scaine pointed in /usr/lib/pm-utils. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |