You are not logged in.

#1 2016-02-29 20:44:35

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

Seeking the best method to run a Xorg app from within a lxc

Goal: Run a program like chromium a linux container and have it display in :0 without using the insecure hack `xhost +local:`

Ever since I updated maybe 4-6 weeks ago, I found that I could no longer ssh into my lxc and run chromium without having run `xhost +local:` on the host machine first.  I am assuming some update to Xorg or whatever changed that behavior.  It is my understanding that running `xhost +local:` is insecure and should be avoided.  What I cannot seem to locate is the secure method to allow an Xorg application to run from and lxc and display on :0 on the host.  Anyone?

Here is an example of trying to run chromium in the lxc without first typing `xhost +local:` on the host:

% DISPLAY=:0 chromium
No protocol specified
[2620:2620:0229/152335:ERROR:browser_main_loop.cc(256)] Gtk: cannot open display: :0

EDIT: or am I mistaken that using `xhost +local:` is in fact insecure?

Last edited by graysky (2016-02-29 20:56:57)

Offline

#2 2016-03-02 07:26:28

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,481

Re: Seeking the best method to run a Xorg app from within a lxc

I don't think xhost +local is insecure; at least in a "single user" system.
I use that with a systemd container to test plasma5 releases.
-EDIT-
Another, very secure, but not so performant way, would be to "ssh -Y" from the container to the host.
-EDIT-
Didn't tested with the magic cookie:
https://zweije.home.xs4all.nl/xauth-6.html

Last edited by kokoko3k (2016-03-02 07:31:48)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

Board footer

Powered by FluxBB