Replacement for kwriteconfig5 in Plasma6

There are some CLI tools that are useful and needed, what are they replaced with in Plasma6?

kwriteconfig5
kf5-config

and more

1 Like

kwriteconfig5kwriteconfig6

kf5-config → is mostly deprecated, use qtpaths instead

2 Likes

Me, too:

Thank for the tip, @rockandstone !

It worked for Qt version:

$ qtpaths  --qt-version
5.15.12

But kf5-config is useful to get Frameworks version too – e.g. in Debian, Fedora 39, Mageia, MX Linux:

$ kf5-config --version | grep 'Qt\|KDE'
Qt: 5.15.12
KDE Frameworks: 5.115.0

It seems not to bee 100% deprecated, as it is not removed when some distro upgrades to Plasma 6 – e.g., Arch Linux.

And it is still installable within Plasma 6 – e.g., a “new” KDE Neon installation suggests:

$ kf6-config --version
Command 'kf6-config' not found, did you mean:
  command 'kf5-config' from deb libkf5kdelibs4support5-bin (5.115.0-0xneon+22.04+jammy+release+build46)
Try: sudo apt install <deb name>

But in this case, it does not indicates the true versions – e.g., comparing with KInfo Centre:

KDE Neon ------------------------  2024-03-10

      Operating System: KDE neon 6.0
    KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
            Qt Version: 6.6.2

$ kf5-config --version

                    Qt: 5.15.12
        KDE Frameworks: 5.115.0
            kf5-config: 1.0

So, I sum myself to @kenning to ask for a replacement to kf5-config, if possible.

And thanks to all devs for Plasma 6! – I am using it with Arch, with no serious problem. – Just, adapting some things in my workflow.

1 Like

you got kinfo for that :wink:

2 Likes

You’re right!

But I cannot find a way to embed KInfo Centre into Conky:

${execi 600 kf5-config --version | grep 'Qt\|KDE'}

Well I don’t mean the GUI but the literal kinfo terminal command (from package “kde-cli-tools” in Arch) . I’m sure you can find a way including that in conky, it’s been a while since I used it :slight_smile:

/edit: example:

$ kinfo
Operating System: Arch Linux 
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
.
.
.
1 Like

Thank you again, @rockandstone !

Tested it just now, and it worked fine:

$ kinfo
      Operating System: openSUSE Tumbleweed 20240315
    KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
            Qt Version: 6.6.2
...

And it has been the best solution, since qtpaths gives me a wrong version, in openSUSE Tumbleweed:

      Operating System: openSUSE Tumbleweed 20240315
    KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
            Qt Version: 6.6.2

$ kf5-config --version | grep 'Qt\|KDE'

                    Qt: 5.15.12
        KDE Frameworks: 5.115.0

$ qtpaths  --qt-version

                        5.15.12

Well, maybe openSUSE will correct this, but for now the kinfo command seems the better option.

1 Like

Just because KDE is using Qt6 doesn’t mean that everyone else is…

KDE/Plasma6 knows it is using Qt6…

Other programs don’t give a squit about them, and just wants to know if a compatible version of Qt is installed.

If they query qtpaths and find version 6 and they are hoping to see 5, they won’t be happy, and might (perfectly understandably) refuse to run…

You really don’t want to get rid of Qt5 just yet…

snapshot 20240314

~> zypper se --installed-only --requires qt5 | wc -l
224
~> zypper se --installed-only --requires qt6 | wc -l
331

snapshot 20240315

~> zypper se --installed-only --requires qt5 | wc -l
221
~> zypper se --installed-only --requires qt6 | wc -l
332

The numbers are dropping, but it’ll take a long while before Qt5 is off your box

Might want to get, well…

~> qtpaths6 --qt-version
6.6.2
~> qtpaths --qt-version
5.15.12

and a nice bit of clever logic in your conky config to automagically remove the qt5 line when the package is finally unneeded and is dropped from the repo

1 Like

You’re right!

I found easier and simpler to use just 1 line, instead of 2 or 3 lines in Conky config:

# ${execi 600 neofetch  --de_version on --stdout | grep "DE:"}
# ${execi 600 kf5-config --version | grep 'Qt\|KDE'}
${execi 600 kinfo | grep 'KDE\|Qt'}

And the same thing in a script which runs out of DE, in another tty console:

kinfo | grep 'KDE\|Qt'                            >> RAM_02-Arch.txt
# plasmashell --version                             >> RAM_02-Arch.txt
# neofetch  --de_version on --stdout | grep "DE:"   >> RAM_02-Arch.txt
# kf5-config --version | grep 'Qt\|KDE'             >> RAM_02-Arch.txt

and saves this record in a TXT file:

KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

It also worked in MX Linux’ DE, but got many error messages in its tty, out of DE. – Well, I will have time to see it in other distros, along this week.