fan*_*yna 5 linux x11 firefox redhat
我正在尝试使用RHEL 6.2从桌面客户端(mydesktop)ssh到安装了RHEL 5.8的服务器(myserver).我有组在远程服务器上安装了"X Window",远程服务器上的DISPLAY变量也设置为localhost:0.0,但我还是无法启动firefox.连接命令是
$ ssh -X -l myname myserver
Run Code Online (Sandbox Code Playgroud)
错误消息是
$ firefox
Error: cannot open display: localhost:0.0
Run Code Online (Sandbox Code Playgroud)
我尝试在myserver上执行命令
$ xhost +localhost
Run Code Online (Sandbox Code Playgroud)
但它给了我一个错误信息
xhost: unable to open display "localhost:0.0"
Run Code Online (Sandbox Code Playgroud)
我想提到三种现象
我不知道发生了什么事.请帮我.
这是我的问题的更新.这个问题"部分地"解决了.我做的是从我的".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
Run Code Online (Sandbox Code Playgroud)
为什么我不能在sudo下启动x窗口?
通过执行以下两项操作可以解决问题:
export DISPLAY=Localhost:10.0
从我的.bashrc文件中注释掉.我想这是因为我覆盖了DISPLAY
环境变量的默认值.通过这样做,我可以在我的常规帐户下启动'firefox'.export XAUTHORITY='/home/myself/.xauthority
到我的.bashrc文件中.然后注销并再次登录,以便我可以运行sudo wireshark
.-v
诊断问题时,ssh命令中的选项非常有用.
归档时间: |
|
查看次数: |
42757 次 |
最近记录: |