For running root access GUI apps under user login desktop, you can do this at fedora, and other red hat based distro.
This will not run correctly at ubuntu or debian based distro, you need to do this in ubuntu
As you can realized that such apps like wireshark needs root privilage but running sudo wireshark doesn’t seems to be working. Instead, you can run directly and it will ask for root password, this is done by consolehelper, you can check with this command
ls -l `which wireshark`
But I have no idea how consolehelper helps to achive this.