Graphical programs (X11)
Some programs on a Linux server have windows of their own: virt-manager, Wireshark, an installer, xclock. With X11 turned on for a host, a program you start in its terminal opens its window on your Mac, as ssh -Y does.
On your Mac, once
- Install XQuartz, the free X11 server for the Mac, from xquartz.org.
- Log out of your Mac and in again. Until then, programs cannot find XQuartz. The host editor says which of the two is still to do.
For a host
- Edit the host (in its menu, Edit…) and tick Open their windows on this Mac (X11) under Graphical programs.
- Open a new tab to it and start the program, for example
xclock &. XQuartz starts by itself and the window opens beside Wayfinder.
This is for hosts made in Wayfinder. For a host in your own ~/.ssh/config, add ForwardX11 yes and ForwardX11Trusted yes to its block, or choose Duplicate as a Wayfinder Host… in its menu and tick it on the copy.
On the server
Its SSH server must allow it: X11Forwarding yes in /etc/ssh/sshd_config, and the xauth program installed (the package is called xauth or xorg-x11-xauth). After a change, reload sshd. In the terminal, echo $DISPLAY then shows something like localhost:10.0.
Good to know
- Forwarding is trusted, as
ssh -Yis: untrusted forwarding ends after twenty minutes and many programs fail under it. Turn it on only for servers you trust, since a program there can read what XQuartz shows. - Every tab to the host shares one connection, so a program started in any of them can open windows.
- Windows are drawn over the network. Over a slow link, a program with a lot to draw is slow too.