You are not logged in.

#1 2015-04-19 20:01:55

maggie
Member
Registered: 2011-02-12
Posts: 255

Run firefox from inside my lxc so it shows in my real screen [solved]

I have a lxc that is up and running. I can't figure out how to get firefox to run on my physical session. When I try it from the the linux container, I get an error. This is from my physical terminal

sudo lxc-attach --clear-env -n playtime -- sudo -u maggie -i env DISPLAY=$DISPLAY firefox
(firefox:75) : Gtk-WARNING **: cannot open display: :0.0

I have the container config here

lxc.rootfs = /var/lib/lxc/mycontainer/rootfs
lxc.utsname = mycontainer
lxc.arch = x86_64
lxc.include = /usr/share/lxc/config/archlinux.common.conf

# network
lxc.network.type = veth
lxc.network.link = br0
lxc.network.flags =up
lxc.network.ipv4 = 192.168.0.3/24
lxc.network.ipv4.gateway=192.168.0.1
lxc.network.name = eth0

lxc.mount.entry = /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry = /dev/snd dev/snd none bind,optional,create=dir
lxc.mount.entry = /tmp/.X11-unix tmp/.X11-unix none bind,optional,create=dir
lxc.mount.entry = /dev/video0 dev/video0 none bind,optional,create=file

Last edited by maggie (2015-04-19 21:31:13)

Offline

#2 2015-04-19 20:41:07

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,702
Website

Re: Run firefox from inside my lxc so it shows in my real screen [solved]

I'm not expert but you might need to use an unprivileged container.  Maybe someone with more knowledge can help you do it without that.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2015-04-19 21:07:08

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,702
Website

Re: Run firefox from inside my lxc so it shows in my real screen [solved]

I think this will fix your problem: https://github.com/lxc/lxc/issues/434


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2015-04-19 21:30:56

maggie
Member
Registered: 2011-02-12
Posts: 255

Re: Run firefox from inside my lxc so it shows in my real screen [solved]

Thank you very much, graysky! It works fine now smile

Offline

#5 2016-03-17 11:27:50

ineb
Member
Registered: 2011-07-25
Posts: 7

Re: Run firefox from inside my lxc so it shows in my real screen [solved]

hello,

can you please post your working lxc conf? iam still having issues with my x11 inside lxc setup.

Offline

Board footer

Powered by FluxBB