WDHBGS
Posts: 5
Joined: Sat Nov 23, 2013 5:40 pm

GUI inside Debian chroot environment doesn't work [dietpi]

Sun Oct 06, 2019 10:20 am

Hi,

In order to use x86 applications on a Pi with DietPi as OS, I followed this tutorial: https://www.novaspirit.com/2019/04/15/run-x86-arm/.

Everything is working pretty well, although one thing isn't unfortunately. Whenever I try to run a GUI application in the Debian x86 chroot environment, the application won't run due to a display error. It seems it can't connect to the X server. I installed the standard Raspbian GUI (including the X server) and a VNC server in order to use a desktop environment (XFC and some other packages, https://raspberrypi.stackexchange.com/q ... bian-pixel). It's able to run every GUI application I want, except for those within the Debian x86 chroot environment. Every DISPLAY variable I tried so far, doesn't work. According to the tutorial, I have to use

Code: Select all

export DISPLAY=:01
for a normal user and

Code: Select all

export DISPLAY=:0
for the root user, but they aren't working. Even if I set the variable to the same value as the DISPLAY-variable in the 'non-chroot' environment, it won't work. For example, when I try to run winecfg inside the chroot environment, then it'll give an error that no window could be created due to a display error.

What can I try in order to fix it?

Thank you in advance!

WDHBGS

User avatar
topguy
Posts: 5784
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: GUI inside Debian chroot environment doesn't work [dietpi]

Sun Oct 06, 2019 9:24 pm

Code: Select all

export DISPLAY=:01
I have used

Code: Select all

export DISPLAY=:0.1
or

Code: Select all

export DISPLAY=:1
Showing us the *exact* error message could be useful.

User avatar
sakaki
Posts: 350
Joined: Sun Jul 16, 2017 1:11 pm

Re: GUI inside Debian chroot environment doesn't work [dietpi]

Sun Oct 06, 2019 11:22 pm

Have you ensured that the ~/.Xauthority file from the host OS is either bind-mounted or copied into your chroot environment?

Best, sakaki

WDHBGS
Posts: 5
Joined: Sat Nov 23, 2013 5:40 pm

Re: GUI inside Debian chroot environment doesn't work [dietpi]

Sun Oct 13, 2019 8:53 am

Thanks for the responses.

I managed to fix it myself, I found out I just had to set the DISPLAY variable inside the chroot environment to the same value that the DISPLAY variable outside the environment has, which seems very logical. So it was a pretty easy fix in the end.

Return to “Other”