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?

1 Answer 1

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.

2
  • I'm now using he Wheezy Debian build for Rpi - is there a specific package which contains gdmsetup. Jun 24, 2012 at 14:37
  • I thought it was part of the gdm package. You should be able to edit the confit file manually instead though.
    – Jivings
    Jun 24, 2012 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.