Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I' m installing Arch with OpenBox, I' ve done everything but when I type


I have this error

Failed to open the display from the DISPLAY environment variable.

What's the problem?

share|improve this question
up vote 4 down vote accepted

That's not the right way to initiate a x session with openbox,

Perhaps you meant to put that line in ~/.xinitrc, and execute startx instead.

Remember that an X app can't be run outside the Xorg environment.

share|improve this answer
This covered in more detail at the arch wiki. – Wieland Mar 8 '13 at 20:19
Yes with startx is ok, but why in the wiki there is exec openbox-session ?? – AlessioMTX Mar 8 '13 at 21:22
@AlessioMTX exec would replace the current shell process with the openbox-session process, thus X can know the exit status of it – warl0ck Mar 9 '13 at 1:06
@AlessioMTX Please read the whole section, it says "To run Openbox as a stand-alone window manager, append the following to ~/.xinitrc: exec openbox-session" (emphasis mine) – Wieland Mar 9 '13 at 9:33
@Wieland yes I wrote also in ~/.xinitrc: exec openbox-session – AlessioMTX Mar 9 '13 at 22:40

Your Answer


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.