[lxc-users] Run GUI program using lxc-execute
Michael H. Warfield
mhw at WittsEnd.com
Sat Aug 30 14:33:08 UTC 2014
On Sat, 2014-08-30 at 21:07 +0800, Sun Keqin wrote:
> Hi all,
> How to run a GUI program (eg. firefox) with lxc-execute? The error message is: “Error: no display specified”. Maybe lxc-execute log in a new user(root) and it does’t have the right to start XWindow. Do you have any idea to deal with that? Thanks!
It doesn't work like that at all.
FireFox is looking for the DISPLAY environment variable to tell it how
to connect back to a running X11 display. No attempt at running X will
be made.
For example, on my local laptop right now...
[mhw at canyon ~]$ echo $DISPLAY
:0
Firefox (or rather the underlying X libraries and toolkits) will use
that :0 to open a window on the local X11 display 0.
Here's one of my remote systems, to which I'm connected over ssh with
X11 forwarding enabled:
[mhw at mtking ~]$ echo $DISPLAY
localhost:11.0
NOW, FireFox will attempt to connect to an X11 display socket over
localhost and attempt to open a window on the X11 display 11.0.
I'm not sure how you would convey that across lxc-execute because we
generally flush the environment and you need to pass that as an
environment variable. I'm not even totally sure if passing ":0" across
into a container would work either, as the system local display
connection may not be available in the container.
> Jimmy
Regards,
Mike
--
Michael H. Warfield (AI4NB) | (770) 978-7061 | mhw at WittsEnd.com
/\/\|=mhw=|\/\/ | (678) 463-0932 | http://www.wittsend.com/mhw/
NIC whois: MHW9 | An optimist believes we live in the best of all
PGP Key: 0x674627FF | possible worlds. A pessimist is sure of it!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 465 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140830/777a2ef9/attachment.sig>
More information about the lxc-users
mailing list