pycharm + PuTTY + Xming realize remote debugging code and display pictures

When Pycharm connects to the server, it runs remotely, and the chart in the code cannot be displayed. Use PuTTY in conjunction with the Xming tool to realize the function of opening the graphical interface.
pycharm connects to the remote server and debugs the code, please refer to the series of articles:

pycharm connects to the remote server and debugs the code

download

Xming download address: https://en.softonic.com/download/xming/windows/post-download?

PuTTY download address: http://putty.cs.utah.edu/download.html
(PuTTY can use XShell instead of download address: https://xshell.en.softonic.com/download)

Configuration

Xming does not need to be configured, just open
Insert picture description here
PuTTY after downloading and installing :
select Session on the left menu, and enter in the Host Name on the right: remote host IP, Port: enter the port (default 22), and select SSH as the Connection type.
Insert picture description here
Select the left menu Connection->data. Enter the automatic login name in Auto-login usename. If you don’t enter it here, you will be asked to enter your username every time you log in to Linux!
Insert picture description here
Select Connection->SSH->x11 in the left menu, and check Enable X11 forwarding. (Note that if you want to use a graphical interface, this option must be checked, otherwise it can be omitted)
Insert picture description here
Select the Session on the left, and enter the name of the Session we need to save in Saved Sessions. Then press the Save button to save our settings for the Session.

At the next startup, you can select our saved Session in Saved Sessions, and then click the Load button to load the saved Session settings.

Insert picture description here
Start Xming (Xming instead of XLaunch command). Note that if you want to use the graphical interface, you must start Xming first, otherwise it can be omitted.

Start Putty and press the open button to connect to the remote server.
Insert picture description here
Enter env, there will be a lot of information, what we need is:
Insert picture description here
only this DISPLAY

Pycharm configuration

Open configuration
Insert picture description here
Configure environment variables
Insert picture description here

test

Insert picture description here

Reference:
https://www.cnblogs.com/LuckBelongsToStrugglingMan/p/13970976.html
https://blog.csdn.net/qq_35189360/article/details/96453135
https://www.cnblogs.com/xuanxufeng/p/ 6243244.html
https://www.linuxprobe.com/putty-xming-oracle.html

Guess you like

Origin blog.csdn.net/weixin_44456692/article/details/113004211