I want to know how to make Lubuntu 14.04 restart every two hours, login, and open a program. I am currently stuck on the first part which is to make it login automatically. I have tried changing lightdm.conf and lightdm.conf.d folder, and default.conf to no avail. What should I do?


According to the Lubuntu documentation, https://help.ubuntu.com/community/Lubuntu/Boot_Install_Login#For_release_12.04_and_on_.28LightDM.29, You will need to create an /etc/lightdm/lightdm.conf with these contents: (do this as root)

autologin-user=<YOUR USER>
# Check https://bugs.launchpad.net/lightdm/+bug/854261 before setting a timeout
  • This file doesn't exist, and when I created this and added this information in, it didn't work.
    – Byte11
    Mar 3 '16 at 3:03
  • nvm, I found the problem. Your anwser did help though, thanks!
    – Byte11
    Mar 4 '16 at 0:09
  • @Byte11 could you please post the answer then?
    – dacabdi
    Nov 22 '16 at 20:01
  • 1
    @DavidCabrera I really can't remember since it was so long ago. I remember doing some modification on a file in nano that had something to do with how the su, sudo, or restart command worked. That's all I can vaguely remember, sorry. I do know that it is in fact possible in Lubuntu 14.04 without installing outside software.
    – Byte11
    Dec 10 '16 at 0:38
  • found a solution... posted it as answer
    – dacabdi
    Jan 15 '17 at 5:28

This solution worked for me. The link (at the bottom) is dead but I got a cached version.

$ sudo nano /etc/lightdm/lightdm.conf

Add the following lines replacing myusername with your user:


To check use:

$ /usr/sbin/lightdm --show-config

Source: http://www.neatlittleinsights.com/htdocs/lubuntu_16.04_autologin.html


Lubuntu uses LightDM for login, You need to modify the config file. You need to check, where are they:

/usr/sbin/lightdm --show-config

You will see the proper config files under the "Sources" paragraph.

Then you can edit the first one with root privileges (eg. for Ubuntu 17 this is):

sudo nano /usr/share/lightdm/lightdm.conf.d/20-lubuntu.conf

Add your username to the autologin-user line (or add the line if it is not defined). It will look like:


Save and check again with

/usr/sbin/lightdm --show-config

Create an arbitrarily named file in sudo nano /etc/lightdm/lightdm.conf.d/ e.g. 10-autologin.conf.

with the content

autologin-guest = false
autologin-user = USERNAME
autologin-user-timeout = 0

allow-guest = false

Check with sudo /usr/sbin/lightdm --show-config which will show different settings with a capital letter indicating from with file they come from. In my case, the relevant letter is I:

E  user-session=ubuntu
C  greeter-wrapper=/usr/lib/lightdm/lightdm-greeter-session
D  guest-wrapper=/usr/lib/lightdm/lightdm-guest-session
H  greeter-session=lightdm-gtk-greeter
G  xserver-command=X -core
I  autologin-guest=false
I  autologin-user=ben
I  autologin-user-timeout=0
I  allow-guest=false

Tested in Lubuntu 20.04 -
based on

$ sudo nano /etc/sddm.conf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.