How can I start the X Server without opening an X session?

I want to run the X Server as a background process, without immediately starting an X session. The reason I wish to do this is because I am writing a console application that will use Xlib to open a display when it is run. This needs the X server to be running to work.

How do I go about starting the X server as a background process?

Regards
 
When X is started you can switch back to the console using CTRL-ALT-F2.
 
It is not an exact answer to your question but you can escape the window manager switching to one of the consoles hitting Ctrl+Alt+F1 - Ctrl+Alt+F8.
 
you can also checkout xorg-vfbserver it's a great tool for X applications on headless machines, or for what you're describing. I use it to capture webpage snapshots from my headless server and it works great.
 
Back
Top