第二个 tmux 窗格窗口无法打开后

第二个 tmux 窗格窗口无法打开后

对于第一个窗格tmux,我必须做这个但可以打开一个窗口。对于第二窗格和所有其余窗格,我无法打开窗口。例如:

$ echo $DISPLAY 
localhost:10.0
$ meld . &         
[1] 466
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
/usr/bin/meld:155: GtkWarning: IA__gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
  gtk.icon_theme_get_default().append_search_path(meld.paths.icon_dir())
Traceback (most recent call last):
  File "/usr/bin/meld", line 155, in <module>
    gtk.icon_theme_get_default().append_search_path(meld.paths.icon_dir())
AttributeError: 'NoneType' object has no attribute 'append_search_path'

我做了但没有成功的事情:

$ unset DISPLAY
$ meld . &         
$ set DISPLAY localhost:0.0
$ meld . &         
$ xhost +localhost  
xhost:  unable to open display "localhost:0.0"
$ xhost +
xhost:  unable to open display "localhost:0.0"
$ unset DISPLAY
$ export DISPLAY=localhost:0.0
$ sudo apt-get install xvfb
$ sudo Xvfb :5
$ export DISPLAY=:5

答案1

显示localhost:10.0通常不是真正的显示,而是一个中间ssh过程,旨在让您在完成后可以使用X11窗口ssh -X somehost。因此,您通常不应手动将 DISPLAY 设置为它,因为它只能通过 ssh 隧道(如果它仍然存在)起作用。

显示的localhost:0.0是与本地计算机上的 X11 服务器的 tcp 连接。如今,服务器很少在启用 TCP 连接的情况下启动,这是行不通的。所以你通常不应该将 DISPLAY 设置为这个。 (查找进程 Xorg,您可能会看到它使用选项运行:-nolisten tcp,尽管现在这通常是编译时的默认值)。

:0:0.0或 的显示unix:0.0是到本地计算机上的 X11 服务器的 unix 域套接字连接。这通常是您需要使用的。

相关内容