运行图形应用程序出现 _tkinter.TclError: couldn‘t connect to display “localhost:10.0“ 问题解决

在 Win10 上使用 XShell 通过 ssh 远程连接树莓派运行 Python 的 tkinter GUI 程序时,遇到错误:

_tkinter.TclError: couldn't connect to display "localhost:10.0"

问题的本质在于无法通过 ssh 打开图形化界面,必须通过另一款软件 Xmanager 来在 Windows 系统上运行 Python 的图形化界面。

Xmanager 是一款小巧、便捷的浏览远端 X 窗口系统的工具。在工作中经常使用 Xmanager 来登录远端的 Solaris 系统,在 X 窗口系统上作图形化的操作。

Xmanager 是一个运行于 MS Windows 平台上的高性能的 X window 服务器。可以在本地 PC 上同时运行 Unix/Linux 和 Windows 图形应用程序。

Xmanager 中文官网如下:
https://www.xshellcn.com/

你可能感兴趣的:(树莓派开发,linux学习笔记,windows,raspberry,pi)