Tip Details

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
Searches: terminal error shell mac unix

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, 2 comments - last added on Jun 19, 2009 at 8:29 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

Adding spacers to the Dock

100% positive, 2 comments - last added on Dec 05, 2008 at 7:56 am
– Tip added by an anonymous user on Oct 30, 2008 at 7:56 am

customize the itunes music browser

100% positive, 0 comments
– Tip added by an anonymous user on Sep 10, 2008 at 2:43 pm

Running Linux jobs even when disconnected

Categories: Linux UNIX command line
100% positive, 1 comment - last added on Dec 24, 2008 at 1:14 pm
– Tip added by an anonymous user on Dec 22, 2008 at 2:21 pm

Moving between tabs in iTerm

75% positive, 2 comments - last added on Feb 16, 2010 at 9:57 am
– Tip added by an anonymous user on Oct 01, 2008 at 8:53 pm

Organizing mailboxes in Snow Leopard

Categories: Mac Snow Leopard Mac
100% positive, 1 comment - last added on Feb 17, 2010 at 10:11 am
– Tip added by an anonymous user on Oct 15, 2009 at 9:03 am

Show calendars on the UNIX command line

100% positive, 0 comments
– Tip added by an anonymous user on Jan 20, 2009 at 4:45 pm

Change the location where screenshots are saved on a Mac

100% positive, 0 comments
– Tip added by an anonymous user on Sep 22, 2009 at 10:32 am

Finding files older than a certain time on Linux

Categories: Linux find UNIX
100% positive, 0 comments
– Tip added by an anonymous user on Jul 27, 2009 at 1:47 pm

listing files on a single line

Categories: linux Unix command line
100% positive, 0 comments
– Tip added by an anonymous user on Feb 19, 2009 at 8:03 am

Read diffs easier

Categories: UNIX linux CVS command line
100% positive, 0 comments
– Tip added by an anonymous user on Dec 12, 2008 at 2:10 pm

Running background jobs

Categories: linux UNIX
100% positive, 0 comments
– Tip added by an anonymous user on Dec 04, 2008 at 10:04 am

Get the Chrome browser on Mac and Linux

100% positive, 0 comments
– Tip added by an anonymous user on Sep 16, 2008 at 11:58 am

Run quick terminal commands on the Mac

no ratings, 0 comments
– Tip added by an anonymous user on Oct 05, 2009 at 12:30 pm

Time Machine backup errors

no ratings, 0 comments
– Tip added by an anonymous user on Feb 16, 2009 at 12:13 pm

flv converter for mac

Categories: Computers Mac UNIX
no ratings, 0 comments
– Tip added by an anonymous user on Dec 11, 2008 at 7:56 pm

Forcing users to change their password

no ratings, 0 comments
– Tip added by an anonymous user on Sep 30, 2008 at 11:27 am