# run graphical app in systemd-nspawn container

Is it possible o run a graphical application i a systemd-nspawn container? For example i would like to run Firefox from this container, I have installed firefox and xorg-x11. I have read some other information online but it was for Arch with the following:

systemd-nspawn --setenv=DISPLAY=:0 \ --setenv=XAUTHORITY=~/xauthZ53nXr \ --bind-ro=$HOME/xauthZ53nXr:/root/xauthZ53nXr \ --bind=/tmp/.X11-unix \ -D /Contain/F26 \ firefox Any help is appreciated. edit retag close merge delete ## 2 Answers Sort by » oldest newest most voted Better late than never.... You're almost there, but if you're running Wayland then Xauthority files don't exist, so you can skip that and instead use xhost to open up access to the XWayland server. This is what's working for me on F28 running Wayland on the host computer w/ an XWayland session: first use xhost to enable remote connections to your local X server, to debug I started w/ the most permissive setting: $ xhost +local:

revert this with:

$xhost - you can lock this down later with settings listed in man xhost Then you just need to set the DISPLAY and bind /tmp/.X11-unix as you've done: $ sudo systemd-nspawn --setenv=DISPLAY=$DISPLAY --bind=/tmp/.X11-unix -D$(pwd)/firefox-base firefox 

I've tried running firefox-wayland which requires some different bindings... this kind of "works", but only in the most minimal sense. The resolution of the contained wayland app is comically large, and there is screen tearing on every key press and scroll event.

https://unix.stackexchange.com/questi...

more

I've not tried it, but have you seen this http://dabase.com/e/12009/

more