[lxc-users] Run GUI in LXD 2.0+

Matlink matlink at matlink.fr
Sat Apr 15 15:29:08 UTC 2017


Well, the lxc 1.0 version didn't require any network stack: it mounted the X11 required files in the container.

However in lxc 2.0 I would like a solution like this, not using x2go or ssh X11 forwarding. 

The ideal solution for me would be to be able to run 'lxc exec test firefox' to run Firefox in the container. 

Le 15 avril 2017 16:09:00 GMT+02:00, Tomasz Chmielewski <mangoo at wpkg.org> a écrit :
>On 2017-04-15 22:39, Felipe wrote:
>> Instructions:
>> 
>> a) In LXD container:
>> 
>> 	*  lxc launch ubuntu: pokemon
>> 
>> 	*  lxc exec pokemon bash
>> 
>> 	*  add-apt-repository ppa:x2go/stable && sudo apt-get update
>> 
>> 	*  apt-get install xfce4 xfce4-goodies xfce4-artwork
>> xubuntu-icon-theme firefox x2goserver x2goserver-xsession
>> 
>> 	*  adduser pikachu
>> 
>> 	*  vi /etc/ssh/sshd_config
>>          # Change to no to disable tunnelled clear text passwords
>>          PasswordAuthentication yes
>> 	*  /etc/init.d/ssh restart
>
>While x2go is great for remote connectivity, it can be really simpler, 
>if you're running the container locally (or over low-latency, high
>speed 
>network) and don't need disconnected sessions etc.
>
>
>Run this once:
>
>* LXD host:
>
>lxc launch ubuntu: pokemon
>lxc exec pokemon bash
>
>
>* container
>
>apt install openssh-server firefox
>adduser pikachu
>
># add your ssh key for pikachu
>
>
>
>Then, connect with ssh -X:
>
>ssh -X container_IP
>export MOZ_NO_REMOTE=1 ; firefox
>
>
>MOZ_NO_REMOTE=1 in the container is needed in case you run Firefox both
>
>locally and over SSH - otherwise, it won't be possible to start two 
>separate Firefox instances.
>
>
>Tomasz Chmielewski
>https://lxadm.com
>_______________________________________________
>lxc-users mailing list
>lxc-users at lists.linuxcontainers.org
>http://lists.linuxcontainers.org/listinfo/lxc-users

-- 
Matlink
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170415/673d4116/attachment.html>


More information about the lxc-users mailing list