I've built a bootable SD from the official Debian release.
Is there an easy way to get GDM to auto-start when the machine boots (like a typical Linux desktop)?
For bonus points, is there a way to get it to auto-login?
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It only takes a minute to sign up.Sign up to join this community
You need to edit
/etc/inittab so that
init knows that it should boot directly into runlevel 5 (default for X11) when it starts.
Beginners note: Lines that begin with a
#represent comments. They will be ignored completely when the file is used.
This section controls the default runlevel:
## Only one of the following two lines can be uncommented! # Boot to console # id:3:initdefault: # this line should be commented # Boot to X11 id:5:initdefault: # this line should be uncommented
You then need to tell it what command to run when it starts runlevel 5. This section controls that:
# Example lines for starting a login manager #x:5:respawn:/usr/bin/xdm -nodaemon x:5:respawn:/usr/sbin/gdm -nodaemon # this line should be uncommented #x:5:respawn:/usr/bin/kdm -nodaemon #x:5:respawn:/usr/bin/slim >/dev/null 2>&1
Now when you reboot you should boot directly into GDM.
After logging in run the command:
Security Tab, click the
Enable Automatic Login, select your username from the menu and close.
After the next reboot you should be automatically logged in.