View Issue Details

IDProjectCategoryView StatusLast Update
0008348Kali LinuxGeneral Bugpublic2023-06-06 12:54
ReporterBruno13 Assigned To 
Status newResolutionopen 
Product Version2023.2 
Summary0008348: Can't launch Wireshark from GUI on WSL2

The shell command behind the Wireshark icon is:
sh -c "$(id -Gn | grep -q wireshark || echo pkexec) wireshark %f"

Entering this command in the console results in the following error message:
Error getting authority: Error initializing authority: Could not connect: No such file or directory

After starting dbus with:
sudo service dbus start
and running the command above again, I get the following error message:
=== AUTHENTICATING FOR org.kali.pkexec.wireshark ====
Authentication is required to run /usr/bin/wireshark as root
Authenticating as: ,,, (myusernamehere)
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
Error executing command as another user: Not authorized

This incident has been reported.

Running the command as sudo after starting dbus launches the Wireshark GUI, but I still get the following error message in the console:
** (wireshark:22561) 13:53:54.896231 [GUI WARNING] -- QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
nl80211 not found.
and Wireshark complains that:
The file "%f" doesn't exist.

Additionally, in the Windows start menu, the Wireshark shortcut under the kali-linux section is linked to the command:
C:\Users\Myusernamehere\AppData\Local\Microsoft\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForLinux_8wekyb3d8bbwe\wslg.exe -d kali-linux --cd "~" -- sh -c "$(id -Gn | grep -q wireshark || echo pkexec) wireshark
Notice the trailing space and the missing closing quote at the end. I think WSL can't handle the % sign and then just cuts everything off after it, resulting in an unfinished command.

Steps To Reproduce
  • install WSL2 and Windows VM platform
  • sudo apt-get update && sudo apt-get upgrade
  • sudo apt-get install kex && sudo apt-get install kali-linux-default
  • kex
  • click on Wireshark
  • see above
Additional Information

Similar thread on WSL GitHub:


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2023-06-06 12:54 Bruno13 New Issue