wireshark-无法获取当前屏幕资源

wireshark-无法获取当前屏幕资源

我正在使用带有(-X)的 sshssh -X 192.168.1.128连接 ubuntu 服务器(16.04.1 LTS),然后尝试使用 wireshark 以下命令:controller@controller:~$ wireshark

它返回下一个错误:

failed to get the current screen resources
The X11 connection broke: I/O error (code 1)
XIO:  fatal IO error 2 (No such file or directory) on X server "localhost:10.0"
      after 349 requests (349 known processed) with 0 events remaining.
controller@controller:~$

你能帮我解决这个问题吗?

感谢您的关注,Carlos Silva

要安装 wireshark,我使用以下命令:

sudo apt-get install -y software-properties-common python-software-properties
sudo add-apt-repository ppa:pi-rho/security 
sudo apt-get update
sudo apt-get install wireshark 

答案1

您可以安装 wireshark-gtk 并使用它来代替 wireshark:

ubuntu@mrouter02:~$ sudo apt install wireshark-gtk
...
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Setting up wireshark-gtk (2.2.6+g32dac6a-2ubuntu0.16.04)
...

ubuntu@mrouter02:~$ wireshark /tmp/dbus.pcap 

failed to get the current screen resources
The X11 connection broke: I/O error (code 1)
XIO:  fatal IO error 2 (No such file or directory) on X server "localhost:11.0"
  after 349 requests (349 known processed) with 0 events remaining.

ubuntu@mrouter02:~$ wireshark-gtk /tmp/dbus.pcap 

** (wireshark-gtk:8621): WARNING **: Couldn't register with accessibility     
bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, 
the message bus security policy blocked the reply, the  reply timeout expired, or the network connection was broken.

ubuntu@mrouter02:~$ 

警告不会影响 wireshark-gtk 的可用性。

答案2

我曾有一个

Gdk-Message: 11:11:10.047: wireshark: Fatal IO error 2 (No such file or directory) on X server :55

我在端口 5955 上使用 Xvnc。我发现问题出在我调用 wireshark 的 bash 会话中设置了剩余的 LD_LIBRARY_PATH。我只需要删除它,wireshark 就可以正常运行。

相关内容