Bug 1472810 - wireshark-qt not registered
wireshark-qt not registered
Status: CLOSED DUPLICATE of bug 1474251
Product: Fedora
Classification: Fedora
Component: wireshark (Show other bugs)
26
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Martin Sehnoutka
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-19 08:39 EDT by Janos Derba
Modified: 2017-08-09 07:27 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-09 07:27:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Program selection when trying to open a pcap file (22.03 KB, image/png)
2017-07-19 10:00 EDT, Martin Sehnoutka
no flags Details

  None (edit)
Description Janos Derba 2017-07-19 08:39:01 EDT
Description of problem:

When I double-click a pcap file in Nautilus then wireshark-gtk is started. Unfortunately Wireshark's GTK variant has severe GUI glitches, so I wanted to use the Qt variant instead. But failed.

Version-Release number of selected component (if applicable):

Installed Packages
wireshark.x86_64                         2.2.7-1.fc26                    @fedora
wireshark-cli.x86_64                     2.2.7-1.fc26                    @fedora
wireshark-devel.x86_64                   2.2.7-1.fc26                    @fedora
wireshark-gtk.x86_64                     2.2.7-1.fc26                    @fedora
wireshark-qt.x86_64                      2.2.7-1.fc26                    @fedora

How reproducible:

I right-click on the pcap file, select Open With Other Application, but Wireshark-Qt is not offered. Even if I choose View All Applications. And Wireshark-Qt does not show up in Gnome Shell applications menu, at all. Command `sudo alternatives --config wireshark` does not help either, even though both variants are listed.

BTW, I upgraded from Fedora 25 to 26 with the commands written here: https://fedoramagazine.org/upgrading-fedora-25-fedora-26/. Tried dnf remove wireshark* and dnf install wireshark*, but it did not help.

Steps to Reproduce:
1. Right-click on the pcap file, select Open With Other Application
2. Try to find Wireshark-Qt

Actual results:

Wireshark-Qt variant not found.

Expected results:

Wireshark-Qt variant found.

Additional info:

As a nasty workaround I issued `sudo ln -s /usr/bin/wireshark-qt /usr/local/bin/wireshark-gtk`. That works, of course.
Comment 1 Martin Sehnoutka 2017-07-19 10:00 EDT
Created attachment 1301126 [details]
Program selection when trying to open a pcap file

Hello, I cannot reproduce this issue. btw Why not just remove wireshark-gtk from your system?

This is what I did:
$ sudo dnf install 'wireshark*'
...
Installed:
  wireshark.x86_64 2.2.7-1.fc26         wireshark-devel.x86_64 2.2.7-1.fc26      wireshark-gtk.x86_64 2.2.7-1.fc26     
  wireshark-qt.x86_64 2.2.7-1.fc26      wireshark-cli.x86_64 2.2.7-1.fc26       

Complete!
$ sudo alternatives --display wireshark
wireshark - status is auto.
 link currently points to /usr/bin/wireshark-qt
/usr/bin/wireshark-gtk - priority 10
/usr/bin/wireshark-qt - priority 50
Current `best' version is /usr/bin/wireshark-qt.

Now if I try to open a file, I get the selection as you can see in the attachment.
Comment 2 Janos Derba 2017-07-24 07:37:17 EDT
> Why not just remove wireshark-gtk
> from your system?

I tried. In that case I cannot open pcap files from Nautilus. I can start wireshark-qt from command line only.
Comment 3 Martin Sehnoutka 2017-07-25 07:47:32 EDT
Can you provide me with output of this command?
$ cat $(rpm -ql wireshark-qt | grep desktop) | grep -C 3 Exec
Comment 4 Janos Derba 2017-07-25 09:26:06 EDT
$ cat $(rpm -ql wireshark-qt | grep desktop) | grep -C 3 Exec
Comment[vi]=Trình phân tích giao thông mạng
Comment[uk]=Аналізатор мережевого трафіку
Icon=wireshark
TryExec=/usr/bin/wireshark
Exec=/usr/bin/wireshark %f
Terminal=false
MimeType=application/vnd.tcpdump.pcap;application/x-pcapng;application/x-snoop;application/x-iptrace;application/x-lanalyzer;application/x-nettl;application/x-radcom;application/x-etherpeek;application/x-visualnetworks;application/x-netinstobserver;application/x-5view;application/x-tektronix-rf5;application/x-micropross-mplog;application/x-apple-packetlogger;application/x-endace-erf;application/ipfix;application/x-ixia-vwr;
# Category entry according to:
Comment 5 Martin Sehnoutka 2017-07-26 08:19:57 EDT
There is a certain inconsistency between wireshark-gtk and wireshak-qt. Desktop file from wireshark-qt package points to preferred version of Wireshark GUI, whereas desktop file from wireshark-gtk points directly to wireshark-gtk:
$ cat $(rpm -ql wireshark-gtk | grep desktop) | grep -C 3 Exec
Comment[vi]=Trình phân tích giao thông mạng
Comment[uk]=Аналізатор мережевого трафіку
Icon=wireshark
TryExec=wireshark-gtk
Exec=wireshark-gtk %f
Terminal=false
MimeType=application/vnd.tcpdump.pcap;application/x-pcapng;application/x-snoop;application/x-iptrace;application/x-lanalyzer;application/x-nettl;application/x-radcom;application/x-etherpeek;application/x-visualnetworks;application/x-netinstobserver;application/x-5view;application/x-tektronix-rf5;
# Category entry according to:

But this is probably not the source of this bug. Only thing that comes to my mind is a bug in alternatives. Can you also run these commands to check if alternatives are correctly setup?

which wireshark{,-gtk,-qt}
file $(which wireshark)
file /etc/alternatives/wireshark
alternatives --display wireshark
alternatives --display wireshark-gui
Comment 6 Wade Berrier 2017-08-04 13:45:49 EDT
rpm -q --scripts wireshark-qt has the following command:

/usr/sbin/update-alternatives --install /usr/bin/wireshark wireshark /usr/bin/wireshark-qt 50

Running this returns:

the primary link for wireshark must be /usr/sbin/wireshark

I think once that is fixed the alternative will probably be updated correctly, and the .desktop file pointing to /usr/bin/wireshark will work.

Or, like someone else said, have the .desktop file point directly to wireshark-qt.
Comment 7 Janos Derba 2017-08-09 07:08:15 EDT
$ sudo dnf update
...
  Running scriptlet: wireshark-gtk-2.2.8-1.fc26.x86_64                               25/70 
  Upgrading        : wireshark-gtk-2.2.8-1.fc26.x86_64                               25/70 
  Running scriptlet: wireshark-gtk-2.2.8-1.fc26.x86_64                               25/70 
the primary link for wireshark must be /usr/sbin/wireshark
warning: %post(wireshark-gtk-2.2.8-1.fc26.x86_64) scriptlet failed, exit status 2
Non-fatal POSTIN scriptlet failure in rpm package wireshark-gtk
Non-fatal POSTIN scriptlet failure in rpm package wireshark-gtk
  Upgrading        : wireshark-devel-2.2.8-1.fc26.x86_64                             26/70 
  Running scriptlet: wireshark-qt-2.2.8-1.fc26.x86_64                                27/70 
  Upgrading        : wireshark-qt-2.2.8-1.fc26.x86_64                                27/70 
  Running scriptlet: wireshark-qt-2.2.8-1.fc26.x86_64                                27/70 
the primary link for wireshark must be /usr/sbin/wireshark
warning: %post(wireshark-qt-2.2.8-1.fc26.x86_64) scriptlet failed, exit status 2
Non-fatal POSTIN scriptlet failure in rpm package wireshark-qt
Non-fatal POSTIN scriptlet failure in rpm package wireshark-qt
...


$ which wireshark{,-gtk,-qt}
/usr/local/bin/wireshark  <--- How did it get there?
/usr/local/bin/wireshark-gtk <--- My symlink pointing to wireshark-qt, actually
/usr/bin/wireshark-qt

$ sudo rm /usr/local/bin/wireshark /usr/local/bin/wireshark-gtk
$ sudo dnf reinstall wireshark wireshark-gtk wireshark-qt
$ which wireshark{,-gtk,-qt}
/usr/bin/which: no wireshark in (...)
/usr/bin/wireshark-gtk
/usr/bin/wireshark-qt
$ wireshark
bash: wireshark: command not found...
Packages providing this file are:
'wireshark-gtk'
'wireshark-qt'

Unfortunately the original issue with Nautilus have not improved.
Comment 8 Janos Derba 2017-08-09 07:22:05 EDT
$ sudo dnf remove wireshark*
...
$ sudo dnf install wireshark wireshark-qt
Dependencies resolved.
======================================================================
 Package             Arch       Version             Repository   Size
======================================================================
Installing:
 wireshark           x86_64     2.2.8-1.fc26        updates      32 k
 wireshark-qt        x86_64     2.2.8-1.fc26        updates     3.3 M
Installing dependencies:
 compat-lua-libs     x86_64     5.1.5-7.fc26        fedora      163 k
 libsmi              x86_64     0.4.8-18.fc26       fedora      2.4 M
 portaudio           x86_64     19-24.fc26          fedora       93 k
 wireshark-cli       x86_64     2.2.8-1.fc26        updates      16 M

Transaction Summary
======================================================================
Install  6 Packages

Total download size: 22 M
Installed size: 110 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): wireshark-2.2.8-1.fc26.x86_64. 139 kB/s |  32 kB     00:00    
(2/6): compat-lua-libs-5.1.5-7.fc26.x 342 kB/s | 163 kB     00:00    
(3/6): wireshark-qt-2.2.8-1.fc26.x86_ 979 kB/s | 3.3 MB     00:03    
(4/6): wireshark-cli-2.2.8-1.fc26.x86 4.4 MB/s |  16 MB     00:03    
(5/6): libsmi-0.4.8-18.fc26.x86_64.rp 772 kB/s | 2.4 MB     00:03    
(6/6): portaudio-19-24.fc26.x86_64.rp 229 kB/s |  93 kB     00:00    
----------------------------------------------------------------------
Total                                 5.6 MB/s |  22 MB     00:03     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                              1/1 
  Installing       : portaudio-19-24.fc26.x86_64                  1/6 
  Running scriptlet: portaudio-19-24.fc26.x86_64                  1/6 
  Installing       : libsmi-0.4.8-18.fc26.x86_64                  2/6 
  Running scriptlet: libsmi-0.4.8-18.fc26.x86_64                  2/6 
  Installing       : compat-lua-libs-5.1.5-7.fc26.x86_64          3/6 
  Running scriptlet: compat-lua-libs-5.1.5-7.fc26.x86_64          3/6 
  Running scriptlet: wireshark-cli-2.2.8-1.fc26.x86_64            4/6 
  Installing       : wireshark-cli-2.2.8-1.fc26.x86_64            4/6 
  Running scriptlet: wireshark-cli-2.2.8-1.fc26.x86_64            4/6 
  Installing       : wireshark-2.2.8-1.fc26.x86_64                5/6 
  Running scriptlet: wireshark-qt-2.2.8-1.fc26.x86_64             6/6 
  Installing       : wireshark-qt-2.2.8-1.fc26.x86_64             6/6 
  Running scriptlet: wireshark-qt-2.2.8-1.fc26.x86_64             6/6 
the primary link for wireshark must be /usr/sbin/wireshark
warning: %post(wireshark-qt-2.2.8-1.fc26.x86_64) scriptlet failed, exit status 2
Non-fatal POSTIN scriptlet failure in rpm package wireshark-qt
Non-fatal POSTIN scriptlet failure in rpm package wireshark-qt
  Running scriptlet: wireshark-cli-2.2.8-1.fc26.x86_64            6/6 
  Running scriptlet: wireshark-qt-2.2.8-1.fc26.x86_64             6/6 
  Verifying        : wireshark-2.2.8-1.fc26.x86_64                1/6 
  Verifying        : wireshark-qt-2.2.8-1.fc26.x86_64             2/6 
  Verifying        : wireshark-cli-2.2.8-1.fc26.x86_64            3/6 
  Verifying        : compat-lua-libs-5.1.5-7.fc26.x86_64          4/6 
  Verifying        : libsmi-0.4.8-18.fc26.x86_64                  5/6 
  Verifying        : portaudio-19-24.fc26.x86_64                  6/6 

Installed:
  wireshark.x86_64 2.2.8-1.fc26                                       
  wireshark-qt.x86_64 2.2.8-1.fc26                                    
  compat-lua-libs.x86_64 5.1.5-7.fc26                                 
  libsmi.x86_64 0.4.8-18.fc26                                         
  portaudio.x86_64 19-24.fc26                                         
  wireshark-cli.x86_64 2.2.8-1.fc26                                   

Complete!
$ sudo dnf install wireshark-gtk
Last metadata expiration check: 2:52:08 ago on Wed 09 Aug 2017 10:25:28 AM CEST.
Dependencies resolved.
======================================================================
 Package            Arch        Version            Repository    Size
======================================================================
Installing:
 wireshark-gtk      x86_64      2.2.8-1.fc26       updates      987 k

Transaction Summary
======================================================================
Install  1 Package

Total download size: 987 k
Installed size: 2.3 M
Is this ok [y/N]: y
Downloading Packages:
wireshark-gtk-2.2.8-1.fc26.x86_64.rpm 1.0 MB/s | 987 kB     00:00    
----------------------------------------------------------------------
Total                                 1.0 MB/s | 987 kB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                              1/1 
  Running scriptlet: wireshark-gtk-2.2.8-1.fc26.x86_64            1/1 
  Installing       : wireshark-gtk-2.2.8-1.fc26.x86_64            1/1 
  Running scriptlet: wireshark-gtk-2.2.8-1.fc26.x86_64            1/1 
the primary link for wireshark must be /usr/sbin/wireshark
warning: %post(wireshark-gtk-2.2.8-1.fc26.x86_64) scriptlet failed, exit status 2
Non-fatal POSTIN scriptlet failure in rpm package wireshark-gtk
Non-fatal POSTIN scriptlet failure in rpm package wireshark-gtk
  Verifying        : wireshark-gtk-2.2.8-1.fc26.x86_64            1/1 

Installed:
  wireshark-gtk.x86_64 2.2.8-1.fc26                                   

Complete!

The only thing came to my mind that is non-standard in my system is that I have firejail installed. But I do not see how that could cause these.
Comment 9 Martin Sehnoutka 2017-08-09 07:26:59 EDT
This update was not meant to fix this bug. 

(In reply to Wade Berrier from comment #6)
> I think once that is fixed the alternative will probably be updated
> correctly, and the .desktop file pointing to /usr/bin/wireshark will work.

I think so, but some people have broken alternatives for unknown reason.
Comment 10 Martin Sehnoutka 2017-08-09 07:27:29 EDT

*** This bug has been marked as a duplicate of bug 1474251 ***

Note You need to log in before you can comment on or make changes to this bug.