Tip Details Add a Related Tip

Rate as: Positive Negative

Running X11 programs from the terminal

If you are running a command from a terminal prompt that launches a program that uses X11 and you are getting an error that says something like: Failed to open X-Display, you need to set your DISPLAY variable in the shell. To do this, you can type the following on the command line prior to running the program:

export DISPLAY=:0.0

and it will then work. This specific command is for the bash shell, if you are using a different shell, the format may vary slightly. But however you set variable in your shell, set the DISPLAY variable to the value shown above.

If you don't want to run this on the command line every time, you can add this line to your profile file (the name of which will vary by the shell you are using) found in your home directory. For bash, the file is called .bash_profile.
Rating: no ratings, 0 total Votes
Categories: UNIX linux Mac terminal errors
Added: on Jan 28, 2008 at 8:04 am
Added By: an anonymous user

Comments on this Tip

Add a Comment
There are no comments for this tip
Your Comment:
(how to format)
Rate This Tip:

Verify Humanity:
Sorry, we know it's annoying, but please enter the characters shown in the image to the left so that we know you're an actual person and not an evil spammer. Thanks.
       

Related Tips

ssh and scp without passwords

Categories: shell Mac linux UNIX
100% positive, 1 comment - last added on Jun 20, 2008 at 9:19 am
– Tip added by an anonymous user on Dec 21, 2007 at 2:51 pm

Color coding the ls command in Fedora

100% positive, 0 comments
– Tip added by an anonymous user on Apr 25, 2008 at 8:27 am

Changing an already running job to execute in the background

Categories: linux UNIX Mac
no ratings, 0 comments
– Tip added by an anonymous user on Aug 06, 2007 at 11:57 am

Update your shell prompt

Categories: UNIX Mac linux shell
no ratings, 0 comments
– Tip added by an anonymous user on Jun 04, 2007 at 9:15 pm

iTerm for the Mac

Categories: Computers Mac UNIX
66% positive, 1 comment - last added on Mar 06, 2007 at 4:29 pm
– Tip added by rlansky on Mar 03, 2007 at 7:02 am

Disable X11 quit confirmations in Leopard

Categories: Mac Leopard terminal
100% positive, 0 comments
– Tip added by an anonymous user on Apr 06, 2008 at 10:24 am

Software Development Automation with Scripting Languages

Categories: linux unix scripting
no ratings, 0 comments
– Tip added by an anonymous user on Jun 05, 2008 at 2:40 pm

Have your Mac read files

Categories: Mac terminal
no ratings, 0 comments
– Tip added by an anonymous user on May 14, 2008 at 9:52 pm

web clip widgets

100% positive, 0 comments
– Tip added by an anonymous user 5 days, 7 hours ago

Remove Spotlight icon from manu bar

100% positive, 0 comments
– Tip added by an anonymous user 6 days, 10 hours ago

Installing PHP GD on a Leopard Mac

100% positive, 0 comments
– Tip added by an anonymous user on Jun 27, 2008 at 1:39 pm

Adding searches to the Finder sidebar

100% positive, 0 comments
– Tip added by an anonymous user on Jun 27, 2008 at 9:07 am

Javascript Error: unterminated regular expression literal

100% positive, 0 comments
– Tip added by marty on Jun 26, 2008 at 1:20 pm

Speeding Office 2008 on a Mac

100% positive, 1 comment - last added on Jun 26, 2008 at 3:20 pm
– Tip added by an anonymous user on Jun 26, 2008 at 11:26 am

Quick searches in Safari

Categories: Mac safari search shortcut
100% positive, 0 comments
– Tip added by an anonymous user on Jun 25, 2008 at 9:26 am

Quickly emailing links on a Mac

Categories: Mac email shortcut
100% positive, 0 comments
– Tip added by an anonymous user on Jun 20, 2008 at 6:31 am

Aperture loupe style

no ratings, 0 comments
– Tip added by an anonymous user 5 days, 10 hours ago

Avoid messaging when apps hang on a Mac

Categories: Mac crash shortcut
no ratings, 0 comments
– Tip added by an anonymous user 6 days, 1 hour ago

Watch hi-def movie trailers in Front Row

Categories: Mac movies Front Row HDTV
no ratings, 0 comments
– Tip added by an anonymous user 6 days, 10 hours ago

keep track of the phase of the moon

Categories: Mac astronomy moon menu bar
no ratings, 0 comments
– Tip added by an anonymous user on Jun 23, 2008 at 4:53 pm