This page is specific to Ubuntu versions 12.04 and possibly others for the top part
If you find this information applicable to additional versions/releases, please edit this page and modify this header to reflect that. Please also include any necessary modifications for this information to apply to the additional versions.
To turn off screen-locking, which requires users to enter a password after the terminal has been unused for a few minutes, enter the following command in a terminal on the server:
I am unsure what version of Ubuntu this is supposed to work on. I was unable to get it to work on 12.04, hence the following work around after this code.
sudo gconftool-2 --direct --config-source \ xml:readwrite:/etc/gconf/gconf.xml.mandatory --set --type \ boolean /desktop/gnome/lockdown/disable_lock_screen True \ /apps/panel/global/disable_lock_screen True
This will prevent terminals from being locked if users forget to log off. Unfortunately, it will also allow users who find the account logged on to fiddle with the forgetful user's settings and files, but at least that doesn't annoy the administrator.
For Ubuntu 12.04
The above example did not seem to work with 12.04. I finally found a work around by creating a script that auto-runs for every user. If you know of a better way, please edit this!
- Create a script in /home/lock_disable.sh and add the following.
/usr/bin/gsettings set org.gnome.desktop.screensaver lock-enabled false
- Make the file executable
sudo chmod +x /home/lock_disable.sh
- Create lock_disable.sh.desktop in /etc/xdg/autostart/ and add the following to it.
[Desktop Entry] Type=Application Exec=/home/lock_disable.sh Hidden=false NoDisplay=false X-GNOME-Autostart-enabled=true Name=LockScreen Disabled Comment=Disable the lock screen
Your terminals should no longer auto lock! However the power savings for the monitor should still work.
Note: This script auto-runs every time the user logs in, so if they change the lock setting, it will revert back to no lock screen on their next login. Although I have not tested, you should be able to remove the script from each individual users auto-start to prevent this from re-applying.