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.

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

2 Answers

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 $!
link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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