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@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@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 | m...@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!
signature.asc
Description: This is a digitally signed message part
_______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users