Custom default configuration for KDE : Taskbar vs. Kickoff
Hi, I'm currently experimenting with an OpenSUSE Tumbleweed VM. I'd like to slightly customize the default KDE configuration to eventually install it in our local school. No Ansible here, I just put everything in a bone-headed shell script with a handful of nifty functions: https://gitlab.com/kikinovak/opensuse/-/blob/master/setup.sh 1. Customize the taskbar ------------------------ The icons displayed in the taskbar are defined in /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml. I changed that configuration with a series of sed one-liners, and here's what I have now: <default>applications:org.kde.dolphin.desktop, applications:firefox.desktop, applications:thunderbird.desktop, applications:libreoffice-startcenter.desktop </default> Now when my existing user logs out and logs back in, he or she gets to see this new default layout, with icons for Dolphin, Firefox, Thunderbird and LibreOffice in the taskbar on the lower left side of the screen. So far so good. 2. Customize the Kickoff menu ----------------------------- Now I'm trying to do the same with the Kickoff menu, which sports a whole series of icons in the favorite apps section. The default Kickoff menu is defined in /usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/config/main.xml. Here's what my custom version looks like in the edited section of this file: <default>firefox.desktop,thunderbird.desktop,libreoffice-startcenter.desktop,org.kde.dolphin.desktop</default> Now here's the thing. This new customized default configuration is applied as expected for every *newly created* user. But only for those. Unfortunately *existing users* keep their initial configuration. I tried to figure out what configuration files keep the configuration of every user's Kickoff menu in ~/.config and/or ~/.local, but I think you have to be a member of some Secret Plasma Customization Cult to have access to this information. :o) Question: how do I apply my custom Kickoff menu configuration to existing users ? Any suggestions ? Cheers from the burning South of France, Niki -- Microlinux - Solutions informatiques durables 7, place de l'église - 30730 Montpezat Site : https://www.microlinux.fr Blog : https://blog.microlinux.fr Mail : info@microlinux.fr Tél. : 04 66 63 10 32 Mob. : 06 51 80 12 12
On 15.07.2022 18:03, Nicolas Kovacs wrote: ...
2. Customize the Kickoff menu -----------------------------
Now I'm trying to do the same with the Kickoff menu, which sports a whole series of icons in the favorite apps section.
The default Kickoff menu is defined in /usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/config/main.xml.
Here's what my custom version looks like in the edited section of this file:
<default>firefox.desktop,thunderbird.desktop,libreoffice-startcenter.desktop,org.kde.dolphin.desktop</default>
Now here's the thing. This new customized default configuration is applied as expected for every *newly created* user. But only for those.
Unfortunately *existing users* keep their initial configuration. I tried to figure out what configuration files keep the configuration of every user's Kickoff menu in ~/.config and/or ~/.local, but I think you have to be a member of some Secret Plasma Customization Cult to have access to this information. :o)
Question: how do I apply my custom Kickoff menu configuration to existing users ?
Any suggestions ?
AFAICT per-user configuration is stored in ~/.config/plasma-org.kde.plasma.desktop-appletsrc
Le 15/07/2022 à 18:23, Andrei Borzenkov a écrit :
AFAICT per-user configuration is stored in ~/.config/plasma-org.kde.plasma.desktop-appletsrc
I took a peek in that file, but that doesn't seem to be it. I investigated a bit further and found a ~/.config/kactivitymanagerd-statsrc file with the following content: [Favorites-org.kde.plasma.kickoff.favorites.instance-3-02cf9d29-0531-40f6-9678-cc7302a01950] ordering=preferred://browser,applications:libreoffice-writer.desktop,applications:org.kde.dolphin.desktop, applications:org.kde.kate.desktop,applications:systemsettings.desktop, applications:org.kde.khelpcenter.desktop, applications:org.kde.konsole.desktop, applications:org.kde.digikam.desktop [Favorites-org.kde.plasma.kickoff.favorites.instance-3-global] ordering=preferred://browser,applications:libreoffice-writer.desktop,applications:org.kde.dolphin.desktop, applications:org.kde.kate.desktop,applications:systemsettings.desktop, applications:org.kde.khelpcenter.desktop, applications:org.kde.konsole.desktop, applications:org.kde.digikam.desktop So that seems to be it. And apparently the only way to "distribute" a default configuration for all existing users will be a sed script replacing any line in that file beginning with "ordering=" with my default configuration. These things used to be simple with KDE 2.x and 3.x, but starting with 4.x these customizations became a bit of rocket science. Still grateful for suggestions. Niki -- Microlinux - Solutions informatiques durables 7, place de l'église - 30730 Montpezat Site : https://www.microlinux.fr Blog : https://blog.microlinux.fr Mail : info@microlinux.fr Tél. : 04 66 63 10 32 Mob. : 06 51 80 12 12
Le 15/07/2022 à 18:44, Nicolas Kovacs a écrit :
And apparently the only way to "distribute" a default configuration for all existing users will be a sed script replacing any line in that file beginning with "ordering=" with my default configuration.
Follow-up question to the sed gurus on this list. How could I use sed to replace a whole line that begins with a certain character string by another character string? Cheers, Niki -- Microlinux - Solutions informatiques durables 7, place de l'église - 30730 Montpezat Site : https://www.microlinux.fr Blog : https://blog.microlinux.fr Mail : info@microlinux.fr Tél. : 04 66 63 10 32 Mob. : 06 51 80 12 12
On 16.07.2022 08:16, Nicolas Kovacs wrote:
Le 15/07/2022 à 18:44, Nicolas Kovacs a écrit :
And apparently the only way to "distribute" a default configuration for all existing users will be a sed script replacing any line in that file beginning with "ordering=" with my default configuration.
Follow-up question to the sed gurus on this list.
How could I use sed to replace a whole line that begins with a certain character string by another character string?
s/^foo.*/bar/
Le 16/07/2022 à 07:35, Andrei Borzenkov a écrit :
s/^foo.*/bar/
Thanks very much ! -- Microlinux - Solutions informatiques durables 7, place de l'église - 30730 Montpezat Site : https://www.microlinux.fr Blog : https://blog.microlinux.fr Mail : info@microlinux.fr Tél. : 04 66 63 10 32 Mob. : 06 51 80 12 12
Hello, On Sat, 16 Jul 2022, Nicolas Kovacs wrote:
How could I use sed to replace a whole line that begins with a certain character string by another character string?
With GNU sed: sed -i '/ADRESSPATTERN/c\REPLACEMENT' FILE see "Commands which accept address ranges" -> "c \" in 'man sed'. HTH, -dnh -- fs_dprintk (FS_DEBUG_INIT, "Ha! Initialized OK!\n"); linux-2.6.6/drivers/atm/firestream.c
Le 15/07/2022 à 18:23, Andrei Borzenkov a écrit :
AFAICT per-user configuration is stored in ~/.config/plasma-org.kde.plasma.desktop-appletsrc
I investigated this stuff even further, and I can say so much: menu configuration in Plasma is an unholy mess. Some menu stuff is stored in /usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/config/main.xml Then you have some menu stuff that goes in ~/.config/kactivitymanagerd-statsrc which somehow seems to depend on ~/.config/kactivitymanagerdrc And then you have the same (e. g. redundant information) stored in binary (!) format in ~/.local. Here in France we call this "une usine à gaz". I guess at this point the sane reflex is just to give up any attempts on customizing this stuff. Cheers, Niki -- Microlinux - Solutions informatiques durables 7, place de l'église - 30730 Montpezat Site : https://www.microlinux.fr Blog : https://blog.microlinux.fr Mail : info@microlinux.fr Tél. : 04 66 63 10 32 Mob. : 06 51 80 12 12
participants (3)
-
Andrei Borzenkov
-
David Haller
-
Nicolas Kovacs