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.
id:5:initdefault:
# ...
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?
Edit
It looks like my /etc/inittab
doesn't do anything at all.
Changing
1:2345:respawn:/sbin/getty 38400 tty1
to
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?
Best Answer
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 lineautologin-user=
and add your username after the equal sign.