I’m heading away for a while and will need continued access to my server. Usually that means via ssh, but occasionally I have to VNC into the machine. The problem is - if the server goes down for any reason, when it comes back up the VNC server does not start until I login. So is there a way to set automatic login and lock the screen at the same time? Yes! This is linux, of course there is! Simply create a new file

/home/USERNAME/.config/autostart/screen_lock.desktop

and add the contents

[Desktop Entry] Type=Application Name=Lock Screen Exec=gnome-screensaver-command -l

and that was that, works like a charm. Courtesy of AskUbuntu.


Comments

comments powered by Disqus