I installed a minimal Debian system (stable) without GUI, switched to testing/jessie to be able to get the Cinnamon desktop, but X didn't start on boot. If I log in as myself at the CLI, I can type startx to launch the GUI, and I don't have any problems. So, I added the following to /etc/inittab:

# The default runlevel.

# ...

sx:45:once:/bin/su -c /usr/bin/startx -l bateman

This has no effect whatsoever. Why not? More importantly, how do I make it work, without installing any more software?


It looks like my /etc/inittab doesn't do anything at all. Changing

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


1:2345:respawn:/sbin/getty -a bateman 38400 tty1

does not autologin (even after creating and adding myself to the group autologin) (a wild stab from here), and commenting out

3:2345:respawn:/sbin/getty 38400 tty3

does not disable tty3. What is going on?

  • If you want to do something with /etc/inittab (which is not necessary nor particularly useful for your initial question), you need to tell us whether your system is using systemd (the jessie default) or sysvinit. If you're using systemd, some or all of inittab may not be used — inittab it the configuration file for sysvinit. – Gilles 'SO- stop being evil' Apr 8 '15 at 19:14

You only have the permission to start an X session with startx if you're logged in on a console. Remote users (for example) don't get this permission. When you run /bin/su -c /usr/bin/startx -l bateman from /etc/inittab, you don't get a console so starting the X server fails.

The normal way to get a GUI at run time is to run a display manager. A display manager starts an X server and shows a login prompt in graphical mode. On Debian wheezy, you get a choice of gdm3 (Gnome look and feel), kdm (KDE look and feel), lightdm (modern, DE-independent), slim (lightweight, configurable), wdm (WindowMaker look and feel) and xdm (old-timey, Athena look and feel). What you use as the display manager is independent of what graphical environment you use after logging in: the display manager choice is up to the system administrators, and users can each use their preferred environment after logging in.

If you don't want to have to log in on the console because your computer is in a room that only you can enter, several display managers let you set up autologin. For example, with LightDM, edit /etc/lightdm/lightdm.conf and uncomment the line autologin-user= and add your username after the equal sign.

| improve this answer | |
  • Thanks. I've used nodm which is a minimal auto-login display manager. – GKFX Apr 7 '15 at 12:36
  • I've unmarked this as the answer because it doesn't seem to solve the main problem (and nodm didn't work properly). See update to question. – GKFX Apr 8 '15 at 18:29
  • @GKFX I don't understand what you're trying to do here. You don't need to change anything in /etc/inittab. For autologin to the graphical environment, install lightdm and edit /etc/lightdm/lightdm.conf. I can't help you with nodm because I've never used it and “doesn't work properly” is not a useful problem report. If you want autologin in text mode, that's a different question. – Gilles 'SO- stop being evil' Apr 8 '15 at 19:13
  • OK, I've got LightDM working now. To be honest, the main reason I came here was because I was baffled by /etc/inittab not doing anything; your comment about systemd clears that up nicely. The problem with NoDM, if you're interested, was something permissions-related which meant I had to type my password into a gksu prompt to shutdown the computer. It's still annoying that I need to install a package to do the equivalent of typing startx, but that's life. Thank you very much for your help. – GKFX Apr 9 '15 at 12:40

systemd is not backwards compatible with System 5 init, only System 5 rc.

You've switched from Debian 7 to the prospective Debian 8. This has, probably unbeknownst to you, switched your system management from (Linux) System 5 init+rc to systemd. systemd is the default init system, and that particular upgrade performs this switch.

Linux System 5-style system management comprises two parts, init which runs as process #1 and rc which is in charge of running start and stop scripts. These are actually from two distinct packages in Debian. init is from the sysvinit package and rc is usually from the sysv-rc package. (There are alternative rc programs that can be used with System 5 init, in the file-rc and openrc packages.)

/etc/inittab is a configuration file processed by init. systemd does not provide any backwards compatibility mechanism for this. systemd's System 5 backwards compatibility mechanism is only for System 5 rc, which runs the programs in /etc/init.d/. (systemd implements no backwards compatibility mechanism for file-rc's and openrc's configuration mechanisms, either.)

This is not something that is specific to systemd. Pretty much no replacement init/system manager — from Felix von Leitner's minit through initNG and upstart to the system-manager in nosh — processes /etc/inittab. About the only one that looks at /etc/inittab is Nikola Vladov's ninit.

To plumb a service in to systemd, you must use the mechanisms that it does support, namely its own service unit files and the System 5 rc configuration files in /etc/init.d/. How to run startx as a systemd service is a different question, of course.

Further reading

| improve this answer | |
  • Thank you for this. I got the gist of the issue from Gilles' brief comment on it, but thank you for explaining it in more detail. – GKFX Apr 14 '15 at 16:43

OK, in the end I did get startx running without a display manager. It didn't help my boot time at all, but never mind. I followed the instructions in X without display manager at Gentoo wiki, creating the autologin service /etc/systemd/system/x11.service.


ExecStart=/sbin/mingetty --autologin username --noclear tty7 38400


and using the .bash_profile

# Following automatically calls startx when you login:
[[ -z $DISPLAY && $XDG_VTNR -eq 7 ]] && exec startx
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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