-4

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

Jim
  • 335
  • 2
  • 4
  • 8
  • 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

1 Answers1

1

Try to use ssh -X user@hostname.

Sven
  • 98,649
  • 14
  • 180
  • 226
  • 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