Re: [kde-linux] how to get kde applications version with commandline
- Date: Sat, 27 Feb 2016 05:06:29 +0000 (UTC)
- From: Duncan <1i5t5.duncan@xxxxxxx>
- Subject: Re: [kde-linux] how to get kde applications version with commandline
yahoo-pier_andreit posted on Sat, 27 Feb 2016 03:56:06 +0100 as excerpted:
> I'm using opensuse leap 42.1 and I would like to have a way to know kde
> applications version using commandline.
> how Ican get this??
In most cases, like this (using konsole as my example, no idea what the
qapplication object complaint is about, but the versions are returned and
konsole works just fine =:^) :
$ konsole --version
QCoreApplication::arguments: Please instantiate the QApplication object
KDE Frameworks: 5.19.0
$ kwin_x11 --version
(That doesn't give the frameworks or qt version, but it does give kwin
There are, however, some executables for which that doesn't work. Just
doing an equery files plasma-desktop | grep bin (on gentoo, equery is a
package manager query tool), to get the bin files in the plasma-desktop
package, yields several binaries. The first one I picked, solid-action-
desktop-gen (picked as it seemed reasonably obscure), yielded a version:
$ solid-action-desktop-gen --version
But the second one I picked, from the same bin list, kapplymousetheme,
$ kapplymousetheme --version
<nothing returned, except an exit status 1, indicating an error>
However, kapplymousetheme, while an elf executable (not a shell script or
some such), seems to be a pretty simple one, as ldd says it only links to
about 10 libraries, generally generic X libs, not the several dozen
including qt and kde-frameworks libs that real kde-based executables
link. So it's apparently a small and simple single-purpose executable,
without the usual qt and kde-frameworks linkages that more complex kde
and plasma executables use.
Which also explains:
$ kapplymousetheme --help
<nothing but an exit status of 1>
Normally, kde apps will have a help output listing their own options and
parameters, with two such options being --help-qt and --help-kde, which
list the generic qt and kde options they inherit via the qt and kde libs.
Obviously, kapplymousetheme is too small and simple for that, not
inheriting the libs and thus not responding as usual to the --help option.
Not too surprising, considering kapplymousetheme is under 10 KiB (10024
bytes, here), and links to so few libs. A strings run on it doesn't
output a lot, either, maybe 40 lines or so, and no interesting error
messages or help output of any sort, so again, pretty simple, designed
for one purpose only, no user help output and likely no options, so you
gotta know how to use it to use it. I guess it's designed as a helper
binary to be called by the relevant kcontrol panel (aka kde system
settings) applet, probably not for direct use by humans.
So in general, the --version option should do it, but there are a few
binaries it doesn't work on. There, simply querying your package manager
to see what package the app belongs to, and what version of that you have
installed, should work. Here's how it would work on gentoo, for
$ equery belongs kapplymousetheme
* Searching for kapplymousetheme ...
<some complaints because I don't actually have the filesystem with the
packages tree in it mounted, but it can still give me an answer from the
installed package database>
So in that case the package and version is plasma-desktop 5.5.4.
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
This message is from the kde-linux mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde-linux.
More info: http://www.kde.org/faq.html.