Multiple X-servers

This entry was posted by on Saturday, 17 April, 2010 at

There are two things you need to do to make use of two or more X-servers.
1 A second xorg config file or a extra server section in the config file
2 configure Xdm, or kdm, or gdm to start the extra servers

this file enables you to setup an extra server and edit particulars for every server

?? don’t know how to to this

?? don’t know how to to this

Restoring KDE sessions
In some situations you want that your KDE session is restored when you log in and sometimes you just want a default, empty session. In my situation screen :0 always has to restore the previous session and screen :1, my session with the TV-out enabled, and screen :2, a VNC session, must always start without any windows opened, i.e. Superkaramba, Opera, amarok.
To get this behaviour, you have to enable/disable session recovery after login. This is maybe an interesting point of improvement for KDE 4, but I really don’t want to wait for that. You just have to modify /usr/bin/startkde:
For Ubuntu Edgy: replace at the first line #!/bin/ssh by #!/bin/bash
Replace the line kwrapper ksmserver $KDEWM by the following piece of code:

if [ ! -f $HOME/.kde/share/config/ksmserverrc.default ] || [ "$DISPLAY" == ":0" ]; then
# restore and save session
kwrapper ksmserver --config $HOME/.kde/share/config/ksmserverrc $KDEWM
# don't restore and save session
kwrapper ksmserver --config $HOME/.kde/share/config/ksmserverrc.default $KDEWM

The ksmserverrc.default file is a copy of the original ksmserverrc file, with loginMode=default. That’s all.

known problems with multiple X-servers
Some how by using multiple X-server I found that my DPI was not fixed. As a result, X sometimes chooses a wrong value resulting in barely-readable fonts. This problem can be fixed by adding the following line to your xorg.conf
DisplaySize <> <>

in the
Section “Monitor”

the width and height are in mm so in my case I have the line
DisplaySize 367 275

in case you are using a xinerama setup I found that applying this rule to the primary monitor suffices, but you could try applying it to all.

Leave a Reply