Forward X11 from Linux to macOS
The following steps helped me forwarding the DISPLAY of a linux VM hosted in Azure to my local macBook:
- Install XQuartz
- Launch XQuartz and configure XQuartz → Security to allow remote connections
- Restart XQuartz
- If you don’t want to reboot, then
export DISPLAY=localhost:0.0in the terminal you’ll use for connecting to the VM. Note, that after rebooting this is not neccessary any longer. - Connect to the remote:
ssh -X yourname@yourlinuxbox