Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 x11vnc and started it so it created the X server by itself like this:

x11vnc -localhost -rfbauth -create /root/.vnc/passwd 

But the VNC session created, does not have a window manager, just an xterm in the upper left corner. How can I specify one?

By the way, is there a way to automatically stop the X-Server if I disconnect from x11vnc, so this essentially works as X on demand?

share|improve this question
up vote 2 down vote accepted

Start the windowmanager after starting the x11 server.

For example, my batch to start xvnc:

export DISPLAY=localhost:1.0
/usr/bin/Xvnc :1 -ac -auth "/root/.Xauthority" -geometry "1200x700" -depth 8 -rfbwait 120000 -rfbauth /root/.vnc/passwd 2> /root/.vnc/ServerDaemon.log &
/bin/sleep 10
/usr/bin/fvwm 2> /root/.vnc/fvwm.log &

I redirect errors in log files and use the sleep command, so that Xvnc has surely initialiesed itself, bevor starting the fvwm window manager. But there should be no problem to start any other windowmanager.

For automatically stop the x11 server, I don't know.

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.