You are not logged in.
If this post is in the wrong category, I apologize. I haven't had much experience posting on fora.
I am trying to run a nested X server in xephyr for testing purposes, and I have encountered some issues with startx.
My main wm (host) is xmonad, which I spawn manually with
startx
from a vt, so it is on DISPLAY :0 and uses ~/.xinitrc (default).
From there, I go on to create a window for hosting a nested X session with the following command:
Xephyr -screen 800x600 -noreset :2 &
Afterwards, I try to set the proper environment and start a nested X session using startx, and this is where things get tricky.
The environment modifications are listed below:
export DISPLAY=:2
export XAUTHORITY="~/.Xauthority-host"
xhost +local:$(USER)
The startx command for spawning the nested X session is as follows:
startx ~/.xinirc-dwm -- :2
The output of startx is:
$ startx ~/.xinitrc-dwm -- :2
(EE)
Fatal server error:
(EE) Server is already active for display 2
If this server is no longer running, remove /tmp/.X2-lock
and start again.
(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE)
^C
xinit: unexpected signal 2
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":2"
after 7 requests (7 known processed) with 0 events remaining.
However, when I start manually the second wm (dwm - guest) on the modified environment, it gets spawned in the guest display-window opened by Xephyr.
Questions:
1. Is the modification of XAUTHORITY on the environment necessary? Even though I set it to a different file, the file never gets created.
2. What is the problem with startx? As I understand it, Xephyr creates an X server on :2, and then I cannot call startx on that display, which is logical. If so, how can I call startx and make it spawn a wm inside Xephyr?
Note:
I don't know if I need to post the .xinitrc files. If that is the case, I will do so when necessary.
I could create a script that spawns dwm on guest, but I am under the impression that startx does more preliminary work, like calling xauth.
PS:
While writing this, I remembered reading in startx's manual page about the X server argument. Am I right to assume that I should provide Xephyr as the Xserver for the nested session?
If so, that makes the question mute, and I am sorry for any inconvenience and breach of forum rules, but I will go on to post this in hopes that others may benefit.
Last edited by Ale1ster (2013-07-25 11:30:14)
Offline
As suspected, that was the answer.
The command that worked was
startx ~/.xinitrc-dwm -- /usr/bin/Xephyr -fullscreen -noreset
In effect we use Xephyr as the X server and all works out as it should.
Offline