We currently migrate to MediaWiki from our old installation, but not all content has been migrated yet. Take a look at the Wiki Team page for instructions how to help or browse through our new wiki at wiki.linux-vserver.org to find the information already migrated.

This page has been made to answer the questions related to running X ( XFree86 and XOrg ) in a Vserver.

There are a few things you might want to do relating to X:

  1. Run an X server on the physical machine that the Vserver is running on, and log in on the keyboard, mouse, and monitor that are connected to the hardware the host and vserver run on.
  2. Connect from an Xserver on a different machine, and log into a desktop that is running on the Vserver.
  3. Run an X server on the host and connect to the vserver (I haven't tried this, but I can't imagine that there would be any problems - this should be pretty much the same as option 2. However, you would need to make sure that running the X server on the host didn't create any security concerns - -nolisten tcp should be used for example.)
  4. Simply forward X via SSH

Running an X server inside a vserver

Note: All the stuff below is written from memory - I don't have access to the machine I did this on right now, so I'll have to come back later, and fill in the blanks.

Running an X session on a vserver

For this, you don't need to assign any special capabilities to the vserver, as the vserver won't be running an X server. It will run an Xsession back to your local X server.

In the Vserver:

Make sure that the you can run [xkg]dm in the vserver. [xkd]dm logs to /var/log, and you can run it with higher debug levels from the command line to work out any problems. Most distros will have an init script to run this from startup.

netstat -plnu | grep :177 should show your ?dm running on udp/177.

Problems I encountered:

Test it by running X -query w.x.y.z :2 on a remote machine (not the vserver). You should get a grey screen, followed by the login manager for KDE/Gnome/X.

SSH Forwarding X

Using ssh X forwarding to get the gui of the apps you want.

check the DISPLAY env. var, it should show you soemthing like myhost.mydomain.com:10.0
either configure it via DNS or just add it to /etc/hosts like this: myhost.mydomain.com
verify with ping myhost.mydomain.com that the resolving works