Determining KDE Version for Script Compatibility

Justin Zobel justin at 1707.io
Wed Mar 5 02:56:42 GMT 2025


The 'kinfo' command which is part of the 'kinfocenter' package *should* 
be pre-installed on any Plasma install can give you the following info. 
This includes 'KDE Plasma Version: 6.3.80' which you can use to 
determine what version of Plasma they are running. Alternatively, if the 
OS is all the same, look at the package info. For example "dnf list 
--installed | grep ^plasma-desktop.x86_64"

kinfo
Operating System: KDE Linux 202503040256
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Kernel Version: 6.13.5-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 x AMD Ryzen 7 PRO 4750U with Radeon Graphics
Memory: 32 GiB of RAM (29.1 GiB usable)
Graphics Processor: AMD Radeon Graphics

Justin

On 3/5/25 00:15, Данила Скачедубов wrote:
>
> Dear KDE Community,
>
> I hope this message finds you well. I am writing to seek advice on 
> determining the KDE version programmatically in my Python scripts.
>
> In my scripts, I have been using the |kwriteconfig5| command to 
> configure KDE settings. However, with the release of KDE 6, the binary 
> name has changed to |kwriteconfig6|. Since my scripts run on various 
> versions of KDE, I need a reliable way to determine the installed KDE 
> version without relying on session environment variables.
>
> I am wondering if there is a method using D-Bus or a configuration 
> file that stores this information. Any guidance or suggestions on how 
> to achieve this would be greatly appreciated.
>
> Thank you for your time and assistance.
>
> Best regards,
>
> Daniel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-devel/attachments/20250305/a17bbcd1/attachment.htm>


More information about the kde-devel mailing list