Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
1  
This is the right way. Except running an X application! –  mailq Dec 20 '11 at 10:55

2 Answers 2

you can use http://packages.debian.org/nodm or http://packages.debian.org/matchbox-window-manageras loginmanager

german Wiki: http://wiki.ubuntuusers.de/autologin

~/.xinitrc

matchbox-window-manager &
pid=$!
/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

 
discard

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.