Server Fault is a question and answer site for system and network administrators. 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 connect via ssh to a server (Linux) and can not open a GUI.
The error is DISPLAY is not set
I assume this is some environmental variable. How do I configure this so that a GUI is displayed when working in a cli.
Note: Unfortunately I don't remember the exact OS version and can not check it right now

share|improve this question

closed as off topic by Sven, freiheit, Mircea Vutcovici, mdpc, Dennis Kaarsemaker May 10 '13 at 20:46

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Where do you want the GUI to display? On the remote linux server? Does it have X installed (i.e. a GUI)? Or do you want to have the GUI show on your local machine? Do you have Linux on your local machine? – ETL May 10 '13 at 20:28
@ETL:I am not sure what you ask.I want a GUI to be displayed in my local machine (I think).Specifically I am trying to run git gui to see a graphical interface of the repository on the server.My local machine is OSX. What is X? How do I install it if it is not? How do I know if it is installed? – Jim May 10 '13 at 20:34

Try to use ssh -X user@hostname.

share|improve this answer
What is -X?Is it ssh- X or ssh -X? – Jim May 10 '13 at 20:12
ssh -X, sorry, a typo. – Sven May 10 '13 at 20:19
What does this do? – Jim May 10 '13 at 20:25
It tunnels the X11 protocol through ssh and takes care of setting the DISPLAY variable accordingly. man ssh exist and could tell you this. Yoy need an X11 environment on your local workstation as well. Search, you will find a lot of answers regarding this topic. – Sven May 10 '13 at 20:31
man ssh /-X Enables X11 forwarding. This can also be specified on a per-host basis in a configuration file. X11 forwarding should be enabled with caution. Users with the ability to bypass file permissions on the remote host (for the userâs X authorization database) can access the local X11 display through the forwarded connection. An attacker may then be able to perform activities such as keystroke monitoring For this reason, X11 forwarding is subjected to X11 SECURITY extension restrictions by default. ............... – Danila Ladner May 10 '13 at 20:33

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