Why `zypper install wireshark` brings GTK version instead of Qt version while in KDE Plasma

Hi there,

In short, I am using TW with KDE Plasma 5. When I try to install wireshark through terminal, the GTK+ version is default instead of the Qt version. Could anyone tell me why? I thought the default version in KDE should be Qt based. Am I right?

===== TL;DR =====

Here is the output of zypper,

sudo zypper install wireshark

it brings the packages as shown below,

~> sudo zypper in wireshark
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following application is going to be installed:
  "Wireshark (GTK) Network Analyzer"

The following 3 NEW packages are going to be installed:
  liblua5_2 wireshark wireshark-ui-gtk

The following application is going to be REMOVED:
  "System Tray"

The following recommended package was automatically selected:
  wireshark-ui-gtk

3 new packages to install.

While a search shows there are two set of wireshark available: GTK+ and Qt versions.

~> sudo zypper se wireshark
[sudo] password for root: 
Retrieving repository 'packman' metadata ...............................................[done]
Building repository 'packman' cache ....................................................[done]
Loading repository data...
Reading installed packages...

S | Name                             | Summary                                   | Type       
--+----------------------------------+-------------------------------------------+------------
  | Wireshark (GTK) Network Analyzer | GTK interface for wireshark network tra-> | application
  | Wireshark (QT) Network Analyzer  | QT interface for wireshark network traf-> | application
  | wireshark                        | A Network Traffic Analyser                | package    
  | wireshark-devel                  | A Network Traffic Analyser                | package    
  | wireshark-ui-gtk                 | A Network Traffic Analyser - GTK+ UI      | package    
  | wireshark-ui-qt                  | A Network Traffic Analyser - Qt UI        | package 

Regards,
cnzhx

Having a look at the deps of wireshark I see that wireshark-ui is recommended. My guess is that -gtk is the first occuring package meeting this recommend.

The installation using zypper (or YaST) does not look at the desktop a user maybe using at that moment in time. zypper will even work from the console (e.g. at run level 3) when no desktop is used at all (or even not installed at all).

You do not have a KDE/Plasma system. You have a Linux system. If there is desktop software installed and when yes which one of the DEs available and how many is of no influence. They are just applications (well, you could call them application suites).

Thanks a lot, guys :slight_smile:

To all of you,

I was aware of that this must be a foolish question. I thought zypper would look at the DE used. Then I realised that these two version are treated as two different applications (wireshark-gtk and wireshark-qt) instead of one application as wireshark.

If you would have picked wireshark-ui-qt as “to be installed”, it would have pulled in wireshark …
Like Henk says, in other words: a package manager is desktop-agnostic.

Yes, following install command does it well,

sudo zypper in wireshark wireshark-ui-qt

leaving other packages to be decided by dependencies.

I’d guess that is only the ordinary way, and if no one says anything likely what happens.

But, I’d guess that it wouldn’t be difficult to insert what might be a short, single line of code somewhere (zypper? libzypp? rpm manifest?) that would look at the availability of an installed Desktop sub-system and choose an appropriate version of the app.

Maybe submit as a feature request to https://bugzilla.opensuse.org.
If someone thinks it’s worthwhile (I can see more complexity, but also perhaps assurance the app might work and display better), someone might decide to work on it. My guess is that it might also require defining a new naming or metadata convention to identify apps in new ways (eg whether gtk or qt).

TSU

Not necessary.
A package can already specify that it should get installed when certain other packages are installed (by adding a so-called “Supplements” line to the rpm specfile).

No need to add specific code to handle this to the package manager (and I suppose such a feature request would likely be just declined anyway).

So, a solution exists already. :slight_smile:

Recommend then that the OP submit a bug to https://bugzilla.opensuse.org requesting that the Wireshark maintainers add that line in the specfile.

TSU

Maybe.

The question here is just which packages should be supplemented.
If the ui packages would supplement Qt and GTK (respectively), most users would get both because normally both toolkits will be installed.

Making it dependent on the actual desktop installed may or may not be a good idea either.

  • it’s probably difficult to cater for all desktops and maintain the list (not really a problem though, in the case a desktop is not specified, the situation will just stay the same as now)
  • which one should be preferred if only e.g. IceWM is installed, which uses neither Qt nor GTK?
  • if one has, say, KDE and GNOME installed, he will again get both
  • actually it shouldn’t matter which ui is installed, you can run GTK applications on a Qt based desktop and vice-versa
  • which wireshark ui you prefer may be down to personal preference

Just some thoughts… :wink:

Personally I don’t care, the current situation is good enough for me.
And actually I have both installed (by my own choice), but I’m sure there will be users complaining about the “cluttered application menu” in that case… :wink:

PS: Actually wireshark-ui-gtk has been dropped completely in yesterday’s new Tumbleweed snapshot anyway, because only the Qt(5) interface is supported upstream nowadays:
https://build.opensuse.org/package/rdiff/openSUSE:Factory/wireshark?linkrev=base&rev=117

So this is no longer relevant.

Sorry guys, I am late for replying these.

At first, it confused me that an application with GTK+ UI was selected by zypper when I am using KDE and a Qt version is available. Then I realised that it could be treated as two different apps.

It is, however, more convenient and friendly to those who are new to Linux OS to have move native version of an app being installed by zypper without a second thought on the difference of two different UI’s.

I am very happy to know that there is an easy way to remove this confusion by introduce a statement in the package.

And I am about to file a request on the bug list as TSU suggested,

But yes, there are concerns as wolfi said,

So, maybe it is not a good idea which based only on the feel of a KDE user.

This saved my struggling :smiley:

Thanks a lot to all of you. You leaded me to a deeper level inside Linux.

CnZhx