4

I've got this chroot jail all setup. I tried to run Firefox in it, but got this message:

"Gtk-WARNING ** cannot open display: "

I know I have to invoke Firefox with --display= something. I probably also have to set the DISPLAY environmental variable to something as well. But I've tried all kinds of combinations, and can't get it to work in the chroot jail.

Thanks.

1 Answers1

6

You need to provide either the X magic cookies credentials (see DISPLAY and AUTHORITY) or allow connections from localhost via xhost +local:. You still need to provide the correct DISPLAY variable, typically DISPLAY=:0.

Based on your error message you probably didn't specified the DISPLAY variable, check your DISPLAY variable outside of the chroot with echo $DISPLAY and set it to the same value in your chroot via export DISPLAY=value

Ulrich Dangel
  • 25,369