View Issue Details

IDProjectCategoryView StatusLast Update
0007329Kali Linux[All Projects] Kali Package Bugpublic2021-09-15 09:32
Reporterneatrubble Assigned Todaniruiz  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product Version2021.3 
Target VersionFixed in Version 
Summary0007329: Wireshark not opening document when not root
DescriptionPackage kali-menu

When using xdg-open on a pcap or double-clicking a pcap, as a user that is not root or in the wireshark group, Wireshark will open but not the Pcap.

In /usr/share/applications/wireshark.desktop, the Exec line contains %f two times.

According to the documentation at https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.html, "A command line may contain at most one %f, %u, %F or %U field code.".

This cause Wireshark to launch but without arguments.

Steps To ReproduceUsing a user that is not in the wireshark group:

1. xdg-open somepcap.pcap
2. (An authentication window will appear to run the application as root)
3. (Wireshark will open, without the document)


Activities

daniruiz

2021-09-15 09:32

developer   ~0015209

Hello!

Following the original Exec parameter for wireshark:
`Exec=sh -c "id -Gn | grep -qw wireshark && wireshark %f || pkexec wireshark %f"`

You are right, freedesktop indicates that a desktop file can only have '%f' once (https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.html), so it's only replacing that code the first match. Therefore wireshark only opens files if the user is part of the wireshark group.
I've fixed this and will be uploaded soon, but for now as a workaround you can add your user to the wireshark group (this is now the default in kali)

`sudo usermod $(whoami) -aG wireshark`
You probably need to reboot after adding the user to the group.

Here is the fix
https://gitlab.com/kalilinux/packages/kali-menu/-/commit/89dd1d48eb2b3f0d3ccc3333a490b01bf22c5b43

Issue History

Date Modified Username Field Change
2021-09-14 19:33 neatrubble New Issue
2021-09-15 09:32 daniruiz Note Added: 0015209
2021-09-15 09:32 daniruiz Assigned To => daniruiz
2021-09-15 09:32 daniruiz Status new => assigned