Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Debian (6) and need to run at boot an X server (without a login manager). What is the best way to do this?

From what I've read, the usual way is to have a script in /etc/init.d. I created a script that runs xinit /usr/bin/xterm -- :0 vt7 &, but all the error messages from X got printed to the tty1 console (which I intend to use). I tried with nohup xinit /usr/bin/xterm -- :0 vt7 > /dev/null &, and it works, but it looks like an ugly hack, so I thought I'd ask here if there is a better way. Sorry if I'm being dense, I don't have much experience with Linux.

share|improve this question
This is the right way. Except running an X application! – mailq Dec 20 '11 at 10:55

you can use or loginmanager

german Wiki:


matchbox-window-manager &
/programm/to/start &
kill $!
share|improve this answer

The right way to do what you want is to enable autologin in the display manager for the account your application runs as.

To get your application to start, you can either use a custom xsession or you can let your window manager start it for you.

For a custom xsession:

You must tell the display manager to use the user's xsessionrc. This is the custom session option. Then you put the command you want to run in that account's .xsessionrc file.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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