Tag Info

Hot answers tagged

17

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.


9

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 ...


8

That you cannot install xdotool because you are not root doesn't mean you cannot run the program, for that you don't need any special privileges. Just download and compile from source. If you don't have access to a compiler then you can download the package for your system directly and extract the file from the package (for .deb first use ar, extracting ...


7

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 ...


7

After some research, I think I've got enough information to post an answer to my own question. In Gnome Shell 3.6 and earlier, the old gnome-screensaver program was present, and if GDM was not running, gnome-screensaver would be invoked - allowing you to lock the screen. Starting in Gnome Shell 3.8 (included in Fedora 19), gnome-screensaver support has ...


6

If you run screen in the terminal, you can lock the terminal with the command Ctrl-a x.


6

According to this answer you can move the pointer of your mouse with command-line with the following procedure: First you need to find mouse input device with grep mouse /proc/bus/input/devices | grep event You should see something like H: Handlers=mouse0 event7 in my case. It could output more then one line if you have more then one mouse (e.g. ...


5

You could check if you are running in a graphical terminal and only set TMOUT if you are not. An easy way to do this is the tty command: tty - print the file name of the terminal connected to standard input When run from a GUI terminal emulator: $ tty /dev/pts/5 When run from a virtual console: $ tty /dev/tty2 So, adding these lines to your ...


5

The details on how to do this were found here in this blog post titled: Locking the screen from the command line in Gnome 3.8. Manually triggering The dbus-send command can be used to send this message, in this case we're sending the "Lock" message to the screensaver. $ dbus-send --type=method_call --dest=org.gnome.ScreenSaver \ ...


5

There are a couple of examples on the Arch Wiki systemd page. Basically, it involves creating a service file for your screen locker and ensuring it is hooked to either the suspend, hibernate or sleep targets. If you use a simple screen locker like slock, your file would look like this: [Unit] Description=Lock the screen on resume from suspend [Service] ...


5

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. ...


4

(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


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

This varies depending on desktop environment. In Gnome and KDE, you can use ctrl+alt+L by default.


3

A quick check of the source code of the current version, xautolock 2.2, shows that it doesn't support this feature, although it wouldn't be too hard to implement it yourself if you know a little bit about C and how to write X programs. The reason is probably this: whenever you want to know the status of xautolock, you also know what status you would like it ...


2

Okay, so I managed to solve it - maybe it's not the most elegant way but it works and it's good enough. First I wrote a small script: #!/bin/sh i3lock -i ~/Pictures/lock.png Saved it (e.g. .locker) to the HOME address, then I ran "chmod +x .locker" so I could execute it and at the Custom Shortcuts to the Command line I wrote ./.locker Choose an ...


2

You can do this via PAM configuration. For example, if you use XScreenSaver, you'd edit /etc/pam.d/xscreensaver and change the @include common-auth line. Rather than repeat all the details, I'll point you to my answer to Set sudo password differently from login one. The procedure is almost exactly the same, except that you'll be editing the PAM config for ...


2

You can use the functionality built into most media players to manage this; it works efectively with xautolock and it's lockers. mpv and mplayer both have a screensaver options: --stop-screensaver, --no-stop-screensaver Turns off the screensaver (or screen blanker and similar mechanisms) at startup and turns it on again on exit (default: yes). The ...


2

I use Fedora but I believe that Lubuntu/LXDE still uses xscreensaver. If so take a look at xscreensaver-command, which lets you do a number of things with its remote interface. For example --deactivate simulates user activity, so you could run that in a loop in the background once every minute or so with a script like this: #!/bin/sh while true; do ...


2

If your heart is not set on using vlock, you should take a look at physlock. Physlock does exactly what it seems that you are looking for: it switches to a new VT, locks it and disables console switching. Upon unlocking, you are returned to whatever console you were on when you invoked it (and it can be invoked from X or from a TTY). It has a great set of ...


2

See this command line option: -n,--new Switch to a new virtual console before locking all console sessions. What I always do is sudo vlock -ans, works inside / outside Xorg. It will jump back to the original VT when you unlocked it. EDIT Too bad, Arch Linux replaced the original vlock package with the one provided by kbd package. That one ...


2

Do I need to install a screensaver package or something? Yes, according to the wiki, you need to choose and install a locker. xflock4 will then activate it.


2

The latest versions of Cinnamon come with their wn screensaver package so these solutions might not work, but they do on my Cinnamon 1.8.8. lightsOn LighstOn is a simple BASH script that will inhibit the screensaver when it detects any of a list of user defined programs (mplayer, and therefore smplayer, are on the list by default) running in full screen ...


2

Use caffeine yaourt -S caffeine-bzr if yaourt installed otherwise you will have to build it from here AUR For caffeine-bzr after it is running. Activate it. It differs slightly based on DM how to set it up. You just need to add the executable to caffeine. I am not familiar with Urban Terror, but you might have to include the wine part of the ...


2

Screen locking was handled by gnome-screensaver up until GNOME 3.8. The application has been deprecated by the GNOME team and it functionality has been divided up among gnome-shell, gnome-session, & GDM. If you just want to get things working you might have better luck using xscreensaver.


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.



Only top voted, non community-wiki answers of a minimum length are eligible