Use different taskbar icons for Writer/Impress/etc under Linux? (kde Wayland)

With Linux, all LibreOffice programs exist under the same taskbar icon, the one for the “LibreOffice Start Center”. Is there a way to have separate icons for each program (Writer/Impress/etc) instead? They are started with their respective .desktop entries.
image

Using

  • Debian 12.7
  • LibreOffice 7.4.7.2
  • KDE 5 / Wayland

I am not familiar with KDE but there should be a solution to create starters for the single modules of LibreOffice. As an example see the properties of a Draw starter (screenshot). Similar to the Draw starter the Calc starter works this way: libreoffice --calc %U OS: LinuxMint 21.3, Mate 1.26.0.


LibreOfficeDraw_Starter

1 Like

with me:

Debian Bookworm LXDE / X11
(LO7.4.7.2) or (LO24.8.2.1 flatpak)

Unfortunately, they already have their own starters.

what tells:

cat /usr/share/applications/libreoffice-writer.desktop | grep StartupWMC

with me its:

StartupWMClass=libreoffice-writer

After some research I found this site… maybe helpfull??

1 Like

It doesn’t seem to have any effect, even after several reboots. Running the full command QT_QPA_PLATFORM=xcb libreoffice --writer %U in a shell does create the correct taskbar icon.

so change the commandline in the starter according to the full command and youre done?!

Nevermind! KDE keeps a desktop file cache, which I refreshed with the command kbuildsycoca5, it works perfectly now!

Solution via: @karolus, Arch wiki :
Add QT_QPA_PLATFORM=xcb to the exec line in your /usr/share/applications/libreoffice-*.desktop files, should look like this:

Exec=QT_QPA_PLATFORM=xcb <rest of the line>

There are two Exec lines, I believe you only need to add it to the one under [Desktop Entry], but you can do both aswell (the one under [Desktop Action NewDocument], some may only have the main one)

Afterwards, refresh the KDE desktop file cache by running kbuildsycoca5, so it takes effect.

keep in mind… probably the next LO-upgrade will replace these files