Please note that User Registration has been temporarily disabled due to a recent increase in automated registrations. If anyone needs an account, please request one here: RequestAccount. Thanks for your patience!--Wmat (talk)
Please email User:Wmat if you experience any issues with the Request Account form.

Difference between revisions of "RPi Debian Auto Login"

From eLinux.org
Jump to: navigation, search
(Auto StartX (Run LXDE))
m (Change "Debian Squeeze" to "Debian")
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This guide will show you how to login to Debian Squeeze and start LXDE by simply powering the Pi on.
+
This guide will show you how to login to a Debian image and start LXDE by simply powering the Pi on.
  
 
==Auto Login:==
 
==Auto Login:==
Line 19: Line 19:
 
  sudo nano /etc/rc.local
 
  sudo nano /etc/rc.local
  
Scroll to the bottom and add:
+
Scroll to the bottom and add the following above exit 0:
  
  su pi -c startx
+
  su -l pi -c startx
  
 
(where <code>pi</code> is the username you want to run X as).  Press <code>Ctrl+X</code> to exit, <code>Y</code> to save followed by <code>Enter</code> twice.
 
(where <code>pi</code> is the username you want to run X as).  Press <code>Ctrl+X</code> to exit, <code>Y</code> to save followed by <code>Enter</code> twice.
  
''(Note: The previous method indicated that you should add <code>startx</code> to </code>/etc/profile</code>.  The updated method is better, since it will cause <code>startx</code> to run only when necessary, and it will not launch the X server as root.''
+
''(Note: The previous method indicated that you should add <code>startx</code> to <code>/etc/profile</code>.  The updated method is better, since it will cause <code>startx</code> to run only when necessary, and it will not launch the X server as root.)''
  
 
{{Template:Raspberry Pi}}
 
{{Template:Raspberry Pi}}

Latest revision as of 21:19, 24 February 2013

This guide will show you how to login to a Debian image and start LXDE by simply powering the Pi on.

Auto Login:

In Terminal:

sudo nano /etc/inittab

Scroll down to:

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

and change to

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

Under that line add:

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

Ctrl+X to exit, Y to save followed by enter twice

Auto StartX (Run LXDE)

In Terminal:

sudo nano /etc/rc.local

Scroll to the bottom and add the following above exit 0:

su -l pi -c startx

(where pi is the username you want to run X as). Press Ctrl+X to exit, Y to save followed by Enter twice.

(Note: The previous method indicated that you should add startx to /etc/profile. The updated method is better, since it will cause startx to run only when necessary, and it will not launch the X server as root.)