Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xephyr cannot open host display #18

Closed
cdmurph32 opened this issue Feb 2, 2013 · 10 comments
Closed

Xephyr cannot open host display #18

cdmurph32 opened this issue Feb 2, 2013 · 10 comments
Labels

Comments

@cdmurph32
Copy link

I'm having the same issue as described in issue #17. I've reinstalled the chroot 3 times over the past few weeks with fresh crouton scripts, with no success.

sudo startxfce4 2>&1 | tee startxfce4.log

startxfce4.log:
/usr/bin/startxfce4: Starting X server

XIO: fatal IO error 2 (No such file or directory) on Xserver ":0" after 39 requests (39 known processed) with 0 events remaining.

Starting Xephyr manually results in the following:
export DISPLAY=:0
Xephyr :0 -fullscreen -ac
Fatal server error:
Server is already active for display 0
If this server is no longer running, remove /tmp/.XO-lock and start again.

export DISPLAY=:1
Xephyr :1 -fullscreen -ac
Xephyr cannot open host display. Is DISPLAY set?

Googling this error makes it seem to be a .Xauthority issue.
I tried the solution on the Debian wiki http://wiki.debian.org/XStrikeForce/FAQ#howtoxnest
with no preliminary success.

@dnschneid
Copy link
Owner

That's not good.
A bit of background: Xephyr creates an X11 server as a window in a host X11 server (nested X servers). That means when you launch Xephyr manually, you want to make sure DISPLAY and XAUTHORITY environment variables are set properly for the host X11 server. The parameter you pass to Xephyr to choose its server number should then be unique, since it's creating a new server at that address.
So for running it manually to see what's going wrong, you'll want to do the following:

export DISPLAY=:0 XAUTHORITY=/etc/X11/host-Xauthority
Xephyr :1 -fullscreen

You may want to do a sanity check on the host Xauthority once you're inside the chroot ls -l /etc/X11/host-Xauthority--it should have a modification time equal to the time you entered the chroot.

@cdmurph32
Copy link
Author

The modification time was correct.

export DISPLAY=:0 XAUTHORITY=/etc/X11/host-Xauthority
Xephyr :1 -fullscreen

resets X and writes the following to STDERR:

XIO:   fatal IO error 2 (No such file or directory) on X server ":0"
after 25 requests (25 known processed) with 0 events remaining.

@dnschneid
Copy link
Owner

Are you running from a crosh shell or from VT2?

@cdmurph32
Copy link
Author

VT2. Should I be doing it from crosh?

@dnschneid
Copy link
Owner

Definitely. The X11 server on ARM loooooves to crash.

@cdmurph32
Copy link
Author

That was the problem. I'm new to chromebooks so "open a shell" in The Easy Way step 2 was a little too ambiguous for me. I'm guessing gregnwosu in issue #17 made the same mistake. Thank you very much. Your responses were incredibly quick.

@dnschneid
Copy link
Owner

Awesome; glad that's the issue. I'll add a note in the README.

@Avid29
Copy link

Avid29 commented Aug 16, 2015

Im having the same problem but on crosh (i have some problem almost every other time my chromebook updates usually I can fix it though) samsung chromebook orignial using kde not xfce4

@ant6n
Copy link

ant6n commented Sep 20, 2015

I have the same problem ("Xephyr cannot open host display. Is DISPLAY set?") on a Samsung Chromebook arm, using a trusty crouton with lxde installed quite a while ago (before recent updates). I can log into the chroot but not start up lxde. From inside the chroot, I can still not start lxde, but there it gives a different error

chronos@localhost / $ sudo enter-chroot -n trusty
Entering /mnt/stateful_partition/crouton/chroots/trusty...
(trusty)adubra@localhost:~$ startlxde
Agent pid 22782
** Message: main.vala:99: Session is LXDE
** Message: main.vala:100: DE is LXDE

(lxsession:22774): Gtk-WARNING **: cannot open display:

I created another crouton (precise-lxde). This one works, I can log in and the GUI will start. I tried to update the trusty chroot, which seems to fail (I dunno whether that's what causes this issue):

chronos@localhost ~/Downloads $ sudo sh crouton -u -n trusty
/usr/local/chroots/trusty already exists; updating it...
WARNING: USB booting is enabled; consider disabling it.
You can use the following command: sudo crossystem dev_boot_usb=0
Preparing chroot environment...
(...)
Fetched 3998 B in 8s (474 B/s)                                                 
W: Failed to fetch http://apt.mucommander.com/dists/stable/InRelease  Unable to find expected entry 'main/binary-armhf/Packages' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead.
Ensuring system is up-to-date...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  linux-tools-3.13.0-37 linux-tools-3.13.0-37-generic
Use 'apt-get autoremove' to remove them.
The following packages will be upgraded:
  linux-image-3.8.11
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/5513 kB of archives.
After this operation, 332 kB disk space will be freed.
Preconfiguring packages ...
(Reading database ... 78832 files and directories currently installed.)
Preparing to unpack .../linux-image-3.8.11_20150314_armhf.deb ...
Ok, aborting, since modules for this image already exist.
dpkg: error processing archive /var/cache/apt/archives/linux-image-3.8.11_20150314_armhf.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.8.11 /boot/vmlinuz-3.8.11
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.8.11_20150314_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to complete chroot setup.
Unmounting /mnt/stateful_partition/crouton/chroots/trusty...

@ant6n
Copy link

ant6n commented Feb 15, 2017

(just coming back to note that the problem was that the updating kept crashing, because of issues with dependencies, and libraries pulled from non-standard sources. Once I resolved/removed those issues, the update went through and the GUI desktop works again.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants