使用root或者sudo方式直接运行wireshark会提示,
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
No protocol specified
qt.qpa.screen: QXcbConnection: Could not connect to display :0
Could not connect to any X display.
随手找了下,说的是gui不能在root下面运行。又换到普通账号下,使用:wireshark -i ens32 -k,强制捕获网卡报错,按照提示在root账号下将普通账号加到wireshark组里面即可。
Couldn't run /usr/bin/dumpcap in child process: Permission denied
Are you a member of the 'wireshark' group? Try running
'usermod -a -G wireshark _your_username_' as root.