如何在Ubuntu 17.10上运行Wireshark


10

我以前在Ubuntu 17.04上运行wireshark

~/$ sudo wireshark

但是现在(仅在更新到17.10之后)当我写相同的文件时出现错误

~/$ sudo wireshark

    QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
    Invalid MIT-MAGIC-COOKIE-1 keyQXcbConnection: Could not connect to display :0

3
由于Wireshark的特殊情况,我决定重新提出这个问题。
David Foerster '18

Answers:



6

确实,您不需要以root身份启动WireShark。请阅读官方页面

简而言之,您应该执行以下操作:

sudo chgrp wireshark /usr/bin/dumpcap
sudo chmod o-rx /usr/bin/dumpcap
sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/dumpcap
sudo usermod -a -G wireshark $USER

然后注销并再次登录。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.