Run GUI from proot-distro
mizzunet opened this issue · 18 comments
I installed proot-distro ubuntu 18.04
Then installed firefox into it and ran export DISPLAY=:1
and firefox
,
But it returns this
Unable to init server: Could not connect: Connection refused
Error: cannot open display: :1
I tried setting DISPLAY=localhos
Make sure xorg-xhost is working
May I know how?
~ $ xorg-xhost
xorg-xhost: command not found
~ $ xhost
access control disabled, clients can connect from any host
INET:localhost
May I know how?
~ $ xorg-xhost xorg-xhost: command not found ~ $ xhost access control disabled, clients can connect from any host INET:localhost
Enter in a normal terminal :
xhost +localhost
xhost +
And then don't close it, try again to see if firefox if you open it
Also, be sure to aver started vncserver with the -listen tcp parameter
vncserver -listen tcp
After that follow the steps I just did, and it should work
That did, thanks 🤟
I'd like to know one more thing, can I run a command inside proot-distro? Something like, single command to open firefox, "proot-distro login ubuntu-18.04 exec firefox"
I hope you get what I meant.
For docker container there was "exec" command to execute commands inside the container, this proot is also like a container, right?
Use this command in a script as an example:
proot-distro login ubuntu-18.04 -- firefox
Place this in the .bashrc of your Ubuntu :
export DISPLAY=:1
I have already put that, it does execute "firefox" without export command by manually logging into proot
But proot-distro login ubuntu-18.04 -- firefox
returns DISPLAY not defined
Why can't two commands be executed this way?
proot-distro login ubuntu-18.04 -- export DISPLAY=:1&&firefox
or proot-distro login ubuntu-18.04 -- export DISPLAY=:1;firefox
Both fails
You can only run one at a time, so you must place the export DISPLAY=:1 in the .bashrc
I have, but still says DISPLAY not specified, however I got it working by setting it in /etc/environment according to this https://stackoverflow.com/questions/13046624/how-to-permanently-export-a-variable-in-linux
Thanks once again (: