KDE different LibreOffice subprograms in different instances / task icons

Hello,

when I open two different LibreOffice applications (e.g. writer and calc), both have the same icon in the taskbar (the specific icon depends on which I’ve opened first).
grafik
grafik
And in the system monitor I see just the first application too. If I quit this one both are closed (e.g. writer and calc).

As I used Linux Mint (Cinnamon) the different LibreOffice applications were opened in with own icons in the taskbar and different applications in the system monitor.
Is this possible in KDE too?

System Data:
Operating System: Manjaro Linux
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.1
Kernel Version: 6.11.11-1-MANJARO (64-bit)
Graphics Platform: X11

LibreOffice Data:
Version: 24.2.7.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 16; OS: Linux 6.11; UI render: default; VCL: kf6 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
24.2.7-2
Calc: threaded

It is possible to associate different icons for different types of windows (at least, some DEs allow that). But “different applications in the system monitor” just can’t be - in Mint, too (unless you started each program using a different profile).

I just checked it on my other device (Mint). There it looks like this:
grafik
Is this possible in KDE too?

In the system monitor it’s there one process too, there I’d be wrong before.

System data on this device:
System:
Kernel: 5.15.0-130-generic x86_64 bits: 64 compiler: gcc v: 11.4.0 Desktop: Cinnamon 6.0.4
tk: GTK 3.24.33 wm: muffin vt: 7 dm: LightDM 1.30.0 Distro: Linux Mint 21.3 Virginia
base: Ubuntu 22.04 jammy

LibreOffice date here:
Version: 24.8.4.2 (X86_64) / LibreOffice Community
Build ID: 480(Build:2)
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Ubuntu package version: 4:24.8.4~rc2-0ubuntu0.22.04.1~lo1
Calc: threaded

All LO components are an “abstraction” for a single binary soffice.bin. Only a few parts differ from each other and are provided as .so DLL.

But this not the whole story. The desktop manager (KDE or Cinnamon) can be configured to launch a single instance with multiple windows for all requests of a binary or independent instances with a single window. The latter is probably the case for Cinnamon and you get different “entries” in the task bar with different icons.

If I remember right, there is a key in the .desktop file to select a specific behaviour. SingleMainWindow=1 restricts the application to a single window.

Since this is a long time since I configured an application to run multiple instances, I am not sure this is the correct parameter. So experiment as this may not be enough (e.g. to create multiple PID files or dedicated scratch files).

.desktop file in KDE:

#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license notice:
#
#   Licensed to the Apache Software Foundation (ASF) under one or more
#   contributor license agreements. See the NOTICE file distributed
#   with this work for additional information regarding copyright
#   ownership. The ASF licenses this file to you under the Apache
#   License, Version 2.0 (the "License"); you may not use this file
#   except in compliance with the License. You may obtain a copy of
#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
[Desktop Entry]
Version=1.0
Terminal=false
Icon=libreoffice-calc
Type=Application
Categories=Office;Spreadsheet;X-Red-Hat-Base;
Exec=QT_QPA_PLATFORM=xcb libreoffice --calc %U
MimeType=application/clarisworks;application/csv;application/excel;application/msexcel;application/tab-separated-values;application/vnd.apache.parquet;application/vnd.apple.numbers;application/vnd.lotus-1-2-3;application/vnd.ms-excel;application/vnd.ms-excel.sheet.binary.macroEnabled.12;application/vnd.ms-excel.sheet.macroEnabled.12;application/vnd.ms-excel.template.macroEnabled.12;application/vnd.ms-works;application/vnd.oasis.opendocument.chart;application/vnd.oasis.opendocument.chart-template;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-flat-xml;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.stardivision.calc;application/vnd.stardivision.chart;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/x-123;application/x-dbase;application/x-dbf;application/x-dos_ms_excel;application/x-excel;application/x-gnumeric;application/x-iwork-numbers-sffnumbers;application/x-ms-excel;application/x-msexcel;application/x-quattropro;application/x-starcalc;application/x-starchart;text/comma-separated-values;text/csv;text/spreadsheet;text/tab-separated-values;text/x-comma-separated-values;text/x-csv;
Name=LibreOffice Calc
GenericName=Spreadsheet
GenericName[en]=Spreadsheet
Comment=Perform calculations, analyze information and manage lists in spreadsheets.
Comment[en]=Perform calculations, analyze information and manage lists in spreadsheets.
StartupNotify=true
X-GIO-NoFuse=true
Keywords=Accounting;Stats;OpenDocument Spreadsheet;Chart;Microsoft Excel;Microsoft Works;OpenOffice Calc;ods;xls;xlsx;
InitialPreference=5
StartupWMClass=libreoffice-calc
X-KDE-Protocols=file,http,webdav,webdavs

Actions=NewDocument;
[Desktop Action NewDocument]
Name=New Spreadsheet
Name[en]=New Spreadsheet
Icon=document-new
Exec=QT_QPA_PLATFORM=xcb libreoffice --calc

added QT_QPA_PLATFORM=xcb like explained here: Use different taskbar icons for Writer/Impress/etc under Linux? (kde Wayland) - #8 by karolus

.desktop file in Mint:

#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license notice:
#
#   Licensed to the Apache Software Foundation (ASF) under one or more
#   contributor license agreements. See the NOTICE file distributed
#   with this work for additional information regarding copyright
#   ownership. The ASF licenses this file to you under the Apache
#   License, Version 2.0 (the "License"); you may not use this file
#   except in compliance with the License. You may obtain a copy of
#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
[Desktop Entry]
Version=1.0
Terminal=false
Icon=libreoffice-calc
Type=Application
Categories=Office;Spreadsheet;
Exec=libreoffice --calc %U
MimeType=application/clarisworks;application/csv;application/excel;application/msexcel;application/tab-separated-values;application/vnd.apache.parquet;application/vnd.apple.numbers;application/vnd.lotus-1-2-3;application/vnd.ms-excel;application/vnd.ms-excel.sheet.binary.macroEnabled.12;application/vnd.ms-excel.sheet.macroEnabled.12;application/vnd.ms-excel.template.macroEnabled.12;application/vnd.ms-works;application/vnd.oasis.opendocument.chart;application/vnd.oasis.opendocument.chart-template;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-flat-xml;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.stardivision.calc;application/vnd.stardivision.chart;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/x-123;application/x-dbase;application/x-dbf;application/x-dos_ms_excel;application/x-excel;application/x-gnumeric;application/x-iwork-numbers-sffnumbers;application/x-ms-excel;application/x-msexcel;application/x-quattropro;application/x-starcalc;application/x-starchart;text/comma-separated-values;text/csv;text/spreadsheet;text/tab-separated-values;text/x-comma-separated-values;text/x-csv;
Name=LibreOffice Calc
GenericName=Spreadsheet
GenericName[en]=Spreadsheet
Comment=Perform calculations, analyze information and manage lists in spreadsheets.
Comment[en]=Perform calculations, analyze information and manage lists in spreadsheets.
StartupNotify=true
X-GIO-NoFuse=true
Keywords=Accounting;Stats;OpenDocument Spreadsheet;Chart;Microsoft Excel;Microsoft Works;OpenOffice Calc;ods;xls;xlsx;
InitialPreference=5
StartupWMClass=libreoffice-calc
X-KDE-Protocols=file,http,webdav,webdavs

Actions=NewDocument;
[Desktop Action NewDocument]
Name=New Spreadsheet
Name[en]=New Spreadsheet
Icon=document-new
Exec=libreoffice --calc

removed the descriptions etc. in almost 100 languages

Seams for me almost the same. I cannot see any specific difference.
Both from /usr/share/applications/-path

Have you tried overriding the system desktop file with a customised on in ~/.local/share/applications/ ? Copy the system one and add SingleMainWindow=....

I’ve tried false, true, 1 and 0 for that. Nothing helped.

Does anybody have the same issue / doesn’t have this issue with Plasma?