页次: 1
在使用x11+dwm时,可以通过终端运行sudo wireshark正常启动wireshark抓包,但在换成Hyprland后,wireshark可以通过wofi和终端直接运行命令启动,但不使用sudo就无法抓网卡的包,即使是安装了polkit程序并按照wiki所述运行以下命令:
$ sudo groupadd wireshark
$ sudo usermod -a -G wireshark $USER
$ sudo chgrp wireshark /usr/bin/dumpcap
$ sudo setcap cap_net_raw,cap_net_admin=eip /usr/bin/dumpcap
运行时的报错信息如下:
Authorization required, but no authorization protocol specified
** (wireshark:16963) 12:23:08.470353 [GUI WARNING] -- could not connect to display :1
** (wireshark:16963) 12:23:08.470374 [GUI WARNING] -- From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
** (wireshark:16963) 12:23:08.470407 [GUI ERROR] -- This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vkkhrdisplay, vnc, xcb, wayland-egl, wayland.
** (wireshark:16963) Aborting on fatal log level exception
fish: Job 1, 'sudo wireshark' terminated by signal SIGABRT (Abort)
离线
不要用 sudo 运行它……什么 wiki 教你手动操作的啊?看看有问题时的以下命令输出:
ls -l /usr/bin/dumpcap
getcap /usr/bin/dumpcap
id
另外 wireshark 不用 polkit 的……
离线
页次: 1