You are not logged in.
I recently switched from using Plasma to using Hyprland and tried to launch wireshark with root privileges but instead I got these error messages and program ceased to run.
https://prnt.sc/3cS4nVYDN8Ks
It's odd because when I try to launch it without the privileges its all alright and works.
Does anyone know possible solutions? I would be thankfull ^^
Last edited by Deshio (2024-12-10 22:52:30)
Offline
The solution is to not run wireshark as root.
https://wiki.archlinux.org/title/Wiresh … privileges
The errors are because sudo drops the environment and wireshark doesn't know what display server to connect to.
That's ok - whenever you feel like you need to run some GUI a root/sudo, you made an earlier mistake that lead to that conclusion.
Just don't. Step back and look for the solution that does not involve running some GUI as root.
Online
The solution is to not run wireshark as root.
https://wiki.archlinux.org/title/Wiresh … privilegesThe errors are because sudo drops the environment and wireshark doesn't know what display server to connect to.
That's ok - whenever you feel like you need to run some GUI a root/sudo, you made an earlier mistake that lead to that conclusion.
Just don't. Step back and look for the solution that does not involve running some GUI as root.
Thanks for the quick reply!
Won't it affect how the program works although?
Offline
Also when I run it with root permissions on KDE plasma it surprisingly works
/
Offline
If you're using eg. kdesu it might simply preserve the relevant environment, but this is still wrong and wireshark will work fine as long as dumpcap has the proper permissions and you user is member of the wireshark group. The GUI doesn't need elevated privileges at all.
Online
Wireshark requires permissions simply because it captures network packets and stuff so it's not about the GUI.
Alright, it's werid because when I login as root and run the application it works fine.
I know it's not recommended to do it this way but I hope some one one day will have the solution.
Offline
NOTE: To run wireshark as normal user you have to add yourself into wireshark group
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Online
Since we'd been there I guess also https://deepl.com/
it's werid because when I login as root and run the application it works fine
There's also absolutely nothing weird about that:
The errors are because sudo drops the environment and wireshark doesn't know what display server to connect to.
what doesn't happen when you run the entire session as root - what you're not supposed to do either.
Online