zngguvnf's Blog

Matplotlib on a remote machine


Make sure X forwarding is enabled on your remote machine

cat /etc/ssh/sshd_config | grep X11Forwarding

If the result it not X11Forwarding yes adjust the file.

Access remote machine with X forwarding from your local machine.

ssh -X user@remote-host

On the remote machine: Activate X-compatible backend

import matplotlib

On the remote machine: Plot as normal

import matplotlib.pyplot as plt

See plot on your local machine.


If you have comments, questions or opinions please drop me a line at 2018-07-21–matplotlib-on-remote-machine AT zngguvnf dot org. Please tell me whether it's ok to publish your comment here or not.

Creative Commons License
https://zngguvnf.org by zngguvnf is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.