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 :
startx
Type “Ctrl+X” to exit, then “Y” to save followed by Enter twice.
5 Comments
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
Visit https://wiki.archlinux.org/index.php/LXDE#Autostart_Programs see the second way of doing autostart
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
Huraah from here https://wiki.archlinux.org/index.php/LXDE#Autostart_Programs, found out by writing “nano ~/.config/lxsession/LXDE/autostart” in the terminal I can add the one line “@midori” save as with above (ctrl-x, y, enter)and all is well!
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.