Xnest – XDMCP protocol and virtual DM

An IceWM Xephyr session is running inside a Fl...
An IceWM Xephyr session is running inside a Fluxbox Xephyr session, which is running inside another IceWM Xephyr session, which is running under Linux Mint 8. (Note that Fluxbox is also licensed under the MIT license by the Fluxbox developers, but IceWM is released under the GPL and LGPL by Marko Ma?ek.) (Photo credit: Wikipedia)

XDMCP is protocol that allows remote connections and provides you with a working Display Manager like KDE, GNome, et al. Its a remote connection protocol that is mostly enabled on Solaris and disabled on most Linux boxes. If you need to have a remote session where you need the X Display to open some GUI applications then you can have a connection with the remote server with XDMCP.

If you need to have a XDMCP session then you can use the following command to start a session:

Xephyr -name amit -title aka -query  -wr :1 -screen 1024x768 -host-cursor &

For this session we are using Xephyr. To install the same you can do the following:

sudo yum install xorg-x11-server-Xephyr

You can use the above command with Xnest also :). Just replace Xephyr in both the commands with Xnest.

Also, this can be very useful to get a session on the current system with a different username also. For example, I normally have to work with 2 users on the same system, and hence open nested X-window for the second user like so:

Xephyr -name amit -title aka -wr :1 -screen 1024x768 -host-cursor &
sudo su - username -c "export DISPLAY=:1 && selectwm" &

In the command above we are using selectwm to be started and you can install that with

sudo yum install selectwm

Description for selectwm :

selectwm is a simple but robust program that will let you pick a
window manager (or other executable) to run at X startup, and
optionally after a window manager exits. It uses the GTK+ toolkit, and
includes options like a timer to start the default window manager, and
modification of the window manager list from within selectwm.

To understand the options used in the commands above look at the respective man pages.

Enhanced by Zemanta

Running Nested X server

Today I was trying to do a XDMCP connection to the other server ( which is solaris, not sure if that matters) so I used the Xnest server. and used the following command:

Xnest :1 -ac -query <host>

And I was getting the error:

AUDIT: Tue Dec 2 20:40:03 2008: 1470 Xnest: client 2 rejected from IP <>

I tried allowing the host to use the display but not use. The command I used was

xhost + <host name>

But no use…. I tried searchin using google but found nothing. So I \”read the fine manual\” and found the key I was looking for, to disable all the client access control restrictions:

Xnest :1 -ac -query skyware

And voila. Thought will share this for you all 🙂
[edit] will add more details on what is XDMCP tomorrow.