Discussion:
i3 in Docker
(too old to reply)
Donnie Earnest
2018-06-10 21:57:13 UTC
Permalink
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
Michael Stapelberg
2018-06-11 06:57:15 UTC
Permalink
Post by Donnie Earnest
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
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
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?
No to all questions. Unfortunately, I don’t know why your setup doesn’t
work. Maybe reach out to Brian, who authored
https://brianketelsen.com/blog/i3-windows/?
Post by Donnie Earnest
Thanks in advance!
Donnie
--
Best regards,
Michael
Loading...