Skip to content

Instantly share code, notes, and snippets.

@mstump
Created March 30, 2022 17:12
Show Gist options
  • Save mstump/ebbd4db6d89357a91d795b9c938a4710 to your computer and use it in GitHub Desktop.
Save mstump/ebbd4db6d89357a91d795b9c938a4710 to your computer and use it in GitHub Desktop.
X forwarding of an OpenGL application over SSH from Ubuntu/Debian to OSX

Plotting of Makie over and SSH connection using an OSX client

This is known to work when initiating the SSH connection for Terminal or iTerm. Using the terminal from VSCode ssh-remote requires extra steps.

Decent reference for troubleshooting. https://twiki.nevis.columbia.edu/twiki/bin/view/Main/X11OnLaptops

  1. Install XQuartz
  2. On your mac run this command from the terminal defaults write org.xquartz.X11 enable_iglx -bool true. Restart XQuartz if it was running, the setting only takes effect on next use.
  3. SSH to the remote server using the -X and -Y options. The -Y is neccessary to establish trust between the remote server and your X server.
  4. On the remote server verify that the DISPLAY variable is set automatically by SSH env|grep DISPLAY.
  5. On the remote server verify that OpenGL and associate tools/libaries are present sudo apt-get install glx-utils mesa-utils libgl1-mesa-glx.
  6. Start XQuartz on your Mac if it is not already running. Verify that you can forward an OpenGL application glxgears.

If you run into issues initiate the SSH connection with verbose logging -v and try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment