PDA

View Full Version : Portjail will not open x11 apps


malco_2001
09-19-2011, 04:41 AM
When trying to run any app that requires x11 using portjail under gnome I get this

Ex. portjail run firefox

No protocol specified
No protocol specified
Error: cannot open display: :0.0

x11 apps will launch fine using the portjail run command under KDE.

kmoore134
09-19-2011, 02:09 PM
Are you running portjail from the menu icon, or through some other
terminal / shell command that you've started manually?

malco_2001
09-19-2011, 03:06 PM
when in kde i ran the command portjail run firefox under konsole the kde terminal app. when under gnome I used the built in gnome-terminal app and ran the portjail run firefox command.

malco_2001
09-21-2011, 11:07 PM
I found the fix Kris. If I run the command "xhost +" in a terminal as a regular user under gnome it disabled access control for X11 which then allows me to run portjail run firefox under gnome. Now that I think about it I do remember reading somewhere that gnome has certain things like xnest support disabled out of the box whereas KDE has it enabled.

I stumbled upon this after also trying jexec to execute gui apps from the portjail. After it failed I searched for jexec cannot open x11 display and found the command xhost + to work around the issue.

I also noticed fluxbox has the same problem. Portjail only seems to run commands out of the box with KDE with those 3 window managers installed. I haven't tried any of the others lxde or xfce yet... For now I will just add the command to my startup applications under gnome to work around it. Hope that helps.

kmoore134
09-23-2011, 02:37 PM
Ahh, that makes sense. If you are running the "portjail" command as your
user and executing apps as your user then typically that wouldn't be
required though.