View Issue Details

IDProjectCategoryView StatusLast Update
0008348Kali LinuxGeneral Bugpublic2024-06-14 15:14
ReporterBruno13 Assigned To 
PrioritylowSeveritymajorReproducibilityalways
Status closedResolutionopen 
Product Version2023.2 
Summary0008348: Can't launch Wireshark from GUI on WSL2
Description

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)
Password:
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ====
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:
https://github.com/microsoft/WSL/discussions/6178

Activities

g0tmi1k

g0tmi1k

2024-06-14 15:14

administrator   ~0019426

This report has been filed against an old version of Kali. We will be closing this ticket due to inactivity.

Please could you see if you are able to replicate this issue with the latest version of Kali Linux (https://www.kali.org/get-kali/)?

If you are still facing the same problem, feel free to re-open the ticket. If you choose to do this, could you provide more information to the issue you are facing, and also give information about your setup?
For more information, please read: https://www.kali.org/docs/community/submitting-issues-kali-bug-tracker/

Issue History

Date Modified Username Field Change
2023-06-06 12:54 Bruno13 New Issue
2024-06-14 15:14 g0tmi1k Note Added: 0019426
2024-06-14 15:14 g0tmi1k Status new => closed