0

I've recently started using macOS. I am looking for an SSH client that allows xwindow tunneling through SSH. As suggested, I've installed Xquartz via brew but whenever I try opening an xwindow based app like gvim or Firefox, I get an error like this:

E233: cannot open display

I'm logging into the host like this: ssh -X user@domain . I've also tried replacing the -X with -Y but it makes no difference at all. I've tried this with native terminal, iterm2 and termius. The latter two are great but they lack this very important feature that allows me to open things like Firefox and gvim directly from the terminal. Using putty is out of the question as it seems that it is no longer supported.

Perhaps I am doing it wrong. Looking for tips/advice etc

7
  • The standard ssh in macOS supports X11. Can you add details about what exactly you tried and how it failed?
    – nohillside
    Commented Jan 29, 2023 at 7:29
  • Also, have you installed Xquartz?
    – nohillside
    Commented Jan 29, 2023 at 7:30
  • @nohillside I did now but it doesn't seem to be helping.
    – Skegg
    Commented Jan 29, 2023 at 9:00
  • 1
    Is Xquartz running? Did you enable X11 in the ssh/sshd config (there are Q&A about this on AD and on other sites)? Is DISPLAY set (best to try from xterm first)?
    – nohillside
    Commented Jan 29, 2023 at 9:02
  • Basically from a running xterm, you should be able to do ssh -X remotehost and then, once logged in, run firefox to launch a remote Firefox which uses your Mac to display the UI.
    – nohillside
    Commented Jan 29, 2023 at 10:13

1 Answer 1

1

X11 isn't available in macOS by default but can be installed via XQuartz. Once installed, you can

  • open Xterm and run ssh -X remotehost from there
  • open Xterm, run echo $DISPLAY, set the variable to the same value in Terminal and run ssh -X remotehost from Terminal

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .