Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

In most operating systems like Windows this was a nice feature, that when I walked away from the computer for the set amount of time - lets say 15 minutes - it would go into suspend. When I would press the power button it would bring me to the main "greeter" log in screen instead of having me enter a password at the screen saver. For some reason Ubuntu uses the Xscreensaver thing which doesn't look right and should kick me to the lightdm greeter log in screen. Can I set Xorg to log me off when I'm idle for a given amount of time and bypass Xscreensaver?

share|improve this question

1 Answer 1

I found a forum at on how to either modify/change Xscreensaver. Also here is a link to extra screen savers for Xscreensaver if you decide to stay with it. Included is a way to have an auto-disable script for Xscreensaver. I used it a couple years ago on Ubuntu 10.10.

Alright, to login to a different session instead of the auto-lock screen, I found this link which shows how to configure the settings. How do I change the default session for when using auto-logins? Anyway, here is the code:

EXAMPLE: sudo nano /etc/lightdm/lightdm.conf change the line

user-session=ubuntu to user-session=ubuntu-2d

Note - if you don't have a lightdm.conf file then for a autologin use the following values for this file:


Another possibility is to run:

sudo /usr/lib/lightdm/lightdm-set-defaults -s <session-name>


sudo /usr/lib/lightdm/lightdm-set-defaults -s ubuntu-2d

This will also create the lightdm.conf file if it wasn't already present.

Credit is due to fossfreedom for this tutorial.

Oh and one more link: It's a wiki to LightDM configuration from canonical.

Let me know if this was what you were looking for. I tried to make it neat and easy to read.

share|improve this answer
Is there a way to make the computer log itself off? – user79034 Jul 26 '12 at 5:19
Do you mean after a specific amount of time? – themidnightowl Jul 26 '12 at 12:55
Yes, like when the computer goes into suspend after not using it for 15 minutes. If there's a way to make it go to the log in screen at the main greeter when it wakes up on suspend instead of going straight to the desktop... – user79034 Jul 27 '12 at 2:53
I'll test that on my other machine and see if it works... – user79034 Jul 28 '12 at 21:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.