我正在使用 SSH 在远程服务器上工作。我在服务器中运行 Docker 容器。在容器中我有 PyGTK,当我尝试使用
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
>>> gi.require_version('Gtk', '3.0')
>>> from gi.repository import Gtk, Gdk
它给了我以下错误..
Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Could not connect: Connection refused
Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Could not connect: Connection refused
因此我无法打开 GUI。我的目的是录制屏幕。
任何帮助都很好。我可以试试吗xhost
?