我正在尝试从一个安装有RHEL 6.2的桌面客户端(mydesktop)ssh到一个安装有RHEL 5.8的服务器(myserver)。我已经在远程服务器上安装了“X Window”组件,并将DISPLAY变量设置为localhost:0.0,但我仍然无法启动firefox。连接命令如下:
$ ssh -X -l myname myserver
错误消息为:
$ firefox
Error: cannot open display: localhost:0.0
我尝试在我的服务器上执行以下命令:
$ xhost +localhost
但是它给我一个错误信息
xhost: unable to open display "localhost:0.0"
我想提到三个现象:
- 在登录我的服务器后,我的桌面的另一个用户可以启动Firefox。
- 当我远程登录另一台服务器myserver2时,我可以启动Firefox。
- Firefox只是一个例子。通常情况下,我无法启动任何x Window程序。
这是我的问题的更新。问题已经“部分”解决了。我所做的是从我的“.bashrc”文件中删除“export DISPLAY==localhost:0.0”,注销然后重新登录,我就可以启动Firefox了!!!
然而,这还不是故事的结局。我有一个新问题: $ sudo wireshark
无法工作。以下是错误消息:
[myself@myserver ~]$ sudo wireshark
debug1: client_input_channel_open: ctype x11 rchan 2 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 46595
debug1: channel 1: new [x11]
debug1: confirm x11
debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 46596
debug1: channel 2: new [x11]
debug1: confirm x11
X11 connection rejected because of wrong authentication.
debug1: channel 2: free: x11, nchannels 3
The application 'wireshark' lost its connection to the display localhost:10.0;
most likely the X server was shut down or you killed/destroyed
the application.
debug1: channel 1: FORCE input drain
为什么我不能在sudo下启动x窗口?