Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've got this chroot jail all setup. I try to run Firefox in it, and get the 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.

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.