Hot answers tagged screen-lock
13
vlock will do as you ask. However, if you want to run background processes, consider screen instead, which will let you also log off and keep processes running in the background, and then reattach -- even when logged in from alternate places.
8
Maybe there is easier solution for this, but my first guess was to use actkbd - keyboard (but not only) shortcut daemon that works outside of X server.
In config file you can bind any keys combination to any command. More details about running actkbd you can find in this answer.
Rhythmbox can be controlled over dbus interface, so if you bind that command ...
6
You can prevent console switches from Xorg by adding the Option
"DontVTSwitch" "yes" to your Xorg config file.
To prevent Ctrl+Alt+Backspace you have to
add the DontZap option to your Xorg config file. Of course this will not completely prevent access to the console. If X terminates for some reason, e.g. problem with a driver the attacker will still have ...
3
xscreensaver has a -watch option:
-watch Prints a line each time the screensaver changes state: when the screen blanks, locks, unblanks, or when the running hack is changed. This option never returns; it is intended for use by shell scripts that want to react to the screensaver in some way.1
The UNBLANK state is what you are looking for. ...
3
I Googled/emailed around a bit and got these two commands.
To lock the screen:
xflock4
To activate user switching:
gdmflexiserver
For Lightdm, this file resides in a strange spot (at least on Arch Linux):
/usr/lib/lightdm/lightdm/gdmflexiserver
I merged these two into XFCE's logout button dialog, in case anyone's interested, so the patch is ...
3
(I assume you mean after a certain amount of time with no activity)
slock doesn't have that capability built-in; you have to use another tool that watches X and tracks how long there's been no activity. For example, using xautolock with a delay of 15 minutes:
$ xautolock -time 15 -locker slock
1
As suggested in the link provided by @depquid, changing connection timeout settings in PuTTY did the trick.
Go to the Connection section of PuTTY's configuration screen
Check Enable TCP keepalives (SO_KEEPALIVE option)
In the Sending of null packets to keep session active, change the value for Seconds between keepalives to something other than zero. I ...
1
ps aux | grep screen revealed that gnome-screensaver was running.
whereis gnome-screensaver found it in /usr/bin (among other places).
Also in /usr/bin/ was gnome-screensaver-preferences
Solution: run /usr/bin/gnome-screensaver-preferences and uncheck "Lock screen when screensaver is active". Optionally uncheck "Activate screensaver when computer is ...
1
I have the following entry in my .profile:
# startx if on tty1 and tmux on tty2
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
exec xinit -- :0 -novtswitch &>/dev/null &
logout
elif [[ $(tty) = /dev/tty2 ]]; then
tmux -f $HOME/.tmux/conf new -s secured
fi
If I choose to log into X, I use TTY1. The logout ensures that, after X is ...
1
I found 2 ways of doing this. Both involve XScreenSaver.
Either deactivate or uninstall gnome-screensaver and start the XScreenSaver (install if needed), or switch to Xfce which is using it.
XScreenSaver can easily be controlled and configured to disable the switch user feature.
1
I had a desire to make banshee (the Gnome music player) pause/unpause when the screen was locked/unlocked. I found a ticket in the banshee launchpad project:
https://bugs.launchpad.net/banshee/+bug/237687
Someone had created a script which would notice (via DBus) if the screen was (un)locked and would trigger banshee to (un)pause. I added a small tweak ...
Only top voted, non community-wiki answers of a minimum length are eligible