Justin, thanks a lot, this really helped, I hope the field naming when running kinfo doesn't change in future versions.
 
Best regards,
 
Daniel

 

----------------
Кому: kde-devel@kde.org (kde-devel@kde.org);
Тема: Determining KDE Version for Script Compatibility;
05.03.2025, 05:57, "Justin Zobel" <jus...@1707.io>:

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

Reply via email to