15

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?

tlhIngan
  • 3,372
  • 5
  • 19
  • 33
Salim Fadhley
  • 2,035
  • 4
  • 19
  • 13

1 Answers1

11

Yes indeed.

Starting GDM At Boot

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.

Auto Login

After logging in run the command:

sudo gdmsetup

Select the 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.

Jivings
  • 22,538
  • 11
  • 90
  • 139