Enable X11 forward to load images from remote server on MacOS Mojave
Xquartzto get X11 support on MacOS. You can google
Xquartzand download it from its official site, or install using HomeBrew.
brew cask install xquartz
Xquartz. Go to
Security, click the box
Allow connections from clients. NOTE: You have to lauch
Allow connections from clientsenable everytime you want to
sshto remote server with X11 forwarding support.
iterm. Add environment
# to add an environment entry only working on current terminal, use `export` export DISPLAY=:0 # to add an environment entry working on every terminal, # append `export DISPLAY=:0` to `.bashrc` or `.zshrc` in case you use zsh.
iterm, use flag
ssh -Y user@address
Why do I need to install
XQuartz is standard. It used to come bundled with the OS, but Apple removed it back around Mavericks.
Why do I have to add environment
Please see https://askubuntu.com/a/432257/745885.
Why do I have to use
I got the following error when trying to run a python script which draws some curves using
X Error of failed request: BadAccess (attempt to access private resource denied) Major opcode of failed request: 18 (X_ChangeProperty) Serial number of failed request: 12 Current serial number in output stream: 15
This problem is sovled when using
-X. Haven't got enough time to find exact explanation, just post a link for those who are curious: Can't run “ssh -X” on MacOS Sierra.