wireshark@linux:/home/wireshark/Desktop$ wireshark Authorization required, but no…
- User
wireshark@linux:/home/wireshark/Desktop$ wireshark Authorization required, but no authorization protocol specified
** (wireshark:8966) 02:10:24.747410 [GUI WARNING] -- could not connect to display :0 ** (wireshark:8966) 02:10:24.747481 [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, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
- Assistant
The error messages you are encountering when trying to run Wireshark on Linux suggest there are issues with display permissions and the Qt platform plugins. Here’s a step-by-step guide to help you troubleshoot and potentially resolve the issue.
1. Check Display Variable
Make sure that the
DISPLAYenvironment variable is set correctly. You can check it using:echo $DISPLAYIf it’s not set or incorrect, you can set it with:
export DISPLAY=:0Make sure to replace
:0with the appropriate display number if it’s different.2. Run Wireshark with Sudo (if necessary)
If you're running Wireshark requiring root permissions (to capture packets), try running it with
sudo -Eto preserve the environment:sudo -E wiresharkHowever, running Wireshark as a root user is not recommended for security reasons; it's better to configure your user to have the necessary permissions.
3. Add User to the
wiresharkgroupTo allow non-root users to capture packets, you need to add your user to the
wiresharkgroup:sudo usermod -aG wireshark $(whoami)Log out and log back in for the group change to take effect.
4. Check for X11 Permissions
If you encounter "Authorization required,” you may need to allow your user access to the X11 display:
xhost +SI:localuser:$(whoami)5. Verify Installation of Qt Plugins
Ensure that you have the necessary Qt platform plugins installed. You can install any missing packages using your package manager. For example, on Ubuntu or Debian, you can run:
sudo apt-get install qt5-default qtbase5-dev6. Reinstall Wireshark
If issues persist, it may be beneficial to reinstall Wireshark. Use:
sudo apt-get remove --purge wireshark sudo apt-get install wireshark7. Check for X11 Forwarding (if on remote connection)
If you are accessing the system remotely (for instance, via SSH), make sure you use X11 forwarding:
ssh -X user@hostname8. Use Wayland (if available)
If your system uses Wayland instead of X11, you might want to ensure that you are running applications that are compatible with Wayland. Some applications might still rely on X11.
Conclusion
If after all of these steps you still encounter issues, you may consider checking the logs, looking for errors related to Wireshark with:
journalctl -xe | grep wiresharkThis could provide more specific diagnostic information. If necessary, seeking assistance on forums like Ask Ubuntu or the Wireshark community forums could also be beneficial.