My goal here is to run the cmatrix
script and lock the desktop simultaneously, so that cmatrix will be shown as a screensaver until I come back and unlock the computer.
My script looks like this:
gnome-screensaver-command -l & sudo openvt -ws cmatrix
Now I wanted to make the script be able to run without the need to input the sudo password everytime, so I changed the sudoers file (like this). It is working if I run it in the terminal, so far so good.
Then I added it to the PATH
, because I wanted to bind it to the global shortcut Ctrl+Alt+L
, but it doesn't work if I invoke it via the shortcut. The desktop just flashes for a split second, like it wanted to show cmatrix
, but then it goes straight to the unlock screen.
I figured out that the part with openvt
isn't working like it should, even if it is the only thing in the script.
Any ideas how to accomplish what I want?
EDIT: In the split second when the desktop flashes, I managed to read this on the screen:
Error opening terminal: unknown