Auto Login & Auto Load LXDE


If you are running the Raspbian operating system you may want to have your Pi auto-login. This may be particularly useful if you are using your Pi to perform a specific operation where you don’t want to login using a keyboard when it is turned on.

You may also want the LXDE desktop to auto run on bootup.

The steps below will explain how this can be done :

Auto Login

Open a terminal (i.e. LXTerminal) and type :

sudo nano /etc/inittab

followed by Enter. Scroll down to the line :

1:2345:respawn:/sbin/getty 115200 tty1

and add a # character to the begining of the line to disable it :

#1:2345:respawn:/sbin/getty 115200 tty1

Under the line add the following :

1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1

where “pi” is the username.

Type “Ctrl+X” to exit, then “Y” to save followed by Enter twice.

Auto Load LXDE Desktop (StartX)

Open a terminal (i.e. LXTerminal) and type :

sudo nano /etc/profile

Scroll to the bottom and add the following line :


Type “Ctrl+X” to exit, then “Y” to save followed by Enter twice.



  1. Michael Cook on

    Perfect, that’s exactly what I needed!
    All I’ve got to do now is figure out how to make it automatically load a terminal when lxde has booted

  2. Yes nearly exactly what I needed, but I also need it to load up an application boot, specifically a full screen midori or other browser! Any suggestions, I’m new to linux and tried adding it to the boot up list, but it would try and run after closing LXDE. And & didn’t help at the end either. Many thanks

  3. I did exactly what the post said for auto loading into LXDE but when I booted up my pi, I logged in and All there was after was a black screen.

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.