[lxc-users] LXC with X, specifically KDE v. VM

Dirk Geschke dirk at lug-erding.de
Tue May 6 08:49:06 UTC 2014


Hi All,

> <tuxraiderpen at wpascanner.com> wrote:
> > I am in a situation where I am looking to possibly use LXC as a way to run ONE
> > specific program that needs an X desktop.

[...]

> The easiest way would be to treat the container like any other remote host.
> 
> I'm not familiar with kmail, so I assume it can be started standalone
> without having to start the full kde desktop? If yes, then the easiest
> way is to either:
> - allow tcp X access on the host, set the container to use that (i.e.
> export DISPLAY=HOST_IP_ADDRESS:0.0) and then start the program. OR
> - use something like x2go:
> http://wiki.x2go.org/doku.php/doc:deployment-stories:start . Install
> the server part on the container, the client part on the host, and
> configure it to start a single application (i.e. Kmail)

you can use also 

  + ssh -X {container}

  + or this more complex solution including sound:
     
        https://www.stgraber.org/2014/02/09/lxc-1-0-gui-in-containers/

  + work with xauth:

     - on the host use

         xauth list

       and extract the key, copy it starting with unix:
 
     - in the container

          export DISPLAY=unix:0.0
	  xauth add {key from host, starting with unix:}

   + any other solution, like VNC or NX, but then you get usually the
     whole desktop. And I guess, you are only interested in only one
     application...

And all these work even with unprivileged containers.
    
Best regards

Dirk

-- 
+----------------------------------------------------------------------+
| Dr. Dirk Geschke       / Plankensteinweg 61    / 85435 Erding        |
| Telefon: 08122-559448  / Mobil: 0176-96906350 / Fax: 08122-9818106   |
| dirk at geschke-online.de / dirk at lug-erding.de  / kontakt at lug-erding.de |
+----------------------------------------------------------------------+


More information about the lxc-users mailing list