[i3-discuss] i3 in Docker

  • From: Donnie Earnest <don.earnest@xxxxxxxxx>
  • To: i3-discuss@xxxxxxxxxxxxx
  • Date: Sun, 10 Jun 2018 16:57:13 -0500

I've been fighting this issue for a few days, probably something easy I'm
overlooking. I've been through the docs and can't find anything that jumps
out. I don't think it's a bug, just something out of the norm I'm trying to
do.

I've created a docker image with Archlinux and i3 on a Windows 10 host with
Xming.  It all works great until I create a persistent volume in my home
folder.  The first time, everything is normal and I get the option to set
my mod key, but the second time I try to boot it up, I get the, "ERROR:
Could not get RandR primary output" and "ERROR: Could not query screen
resources" and it won't start.

If I delete the ~/.config folder (which only has the i3 config file in it),
I can start it back up and pick the mod key again and everything is fine,
but as long as the config file exists when I try to boot it up again, I get
this issue.

The way I start Xming and the container, at least for now, is with a batch
file:

start xming :0 -multiplemonitors -nodecoration -clipboard -ac -screen 0
1920x1080
docker run -it --privileged -e DISPLAY=[hostip]:0.0 --volumes-from desktop
-v /tmp/.X11-unix:/tmp/.X11-unix desktop i3

Likewise, if I omit the "--volumes-from desktop" flag, it works fine. This
puts the desktop on my left monitor (I have 3). I googled and found that
some with laptops were having similar issues with xrandr but this is a
desktop and I couldn't find anyone else experiencing this with a docker
container.  That led me to believe it was the multiple monitors but I get
the same results without the "-multiplemonitors" flag.

There is no X server or any xorg apps, utilities, etc. installed in the
docker container, just fonts. Do I need to install xrandr or arandr and set
my outputs to something specific in the config file, set the primary
output, do something before disconnecting?

Thanks in advance!
Donnie

Other related posts: