无法从d内显示tkinter gui

2024-04-18 20:44:05 发布

您现在位置:Python中文网/ 问答频道 /正文

不管我怎么做,我都会犯错误: _tkinter.TclError: couldn't connect to display "*whatever I set as DISPLAY*" 在docker中运行GUI时。我尝试在docker run命令中添加-v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY标志,但一点帮助都没有。在

我目前尝试运行的设置是:Computer1和Ubuntu17.10运行的是docker容器(Ubuntu也是),我想在Computer1 display上运行GUI-:1。在

然而,最终目标是让Computer1在没有任何显示器连接的情况下运行,并让docker使用Computer2的显示(也可以是Ubuntu),它通过ssh连接到Computer1。在


Tags: todockertkinterubuntuconnectdisplayunixgui