Weird problem with LibreOffice

I have a very weird issue with libreoffice: launching it from konsole libreoffice --writer executes without issues, however using an desktop launcher with the exact same command it gets stuck in the logo.

Moreover launching from terminal it executes natively in wayland, while the desktop launcher executes it in xwayland. I have reviewed the desktop launcher and found nothing to trigger this:

content of /usr/lib/libreoffice/share/xdg/writer.desktop

#
# 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-writer
Type=Application
Categories=Office;WordProcessor;X-Red-Hat-Base;X-MandrivaLinux-Office-Wordprocessors;
Exec=libreoffice --writer %U
MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.oasis.opendocument.text-master-template;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/msword;application/vnd.ms-word;application/x-doc;application/x-hwp;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.lotus-wordpro;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroEnabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroEnabled.12;application/vnd.ms-works;application/vnd.stardivision.writer-global;application/x-extension-txt;application/x-t602;text/plain;application/vnd.oasis.opendocument.text-flat-xml;application/x-fictionbook+xml;application/macwriteii;application/x-aportisdoc;application/prs.plucker;application/vnd.palm;application/clarisworks;application/x-sony-bbeb;application/x-abiword;application/x-iwork-pages-sffpages;application/x-mswrite;application/x-starwriter;
Name=LibreOffice Writer
GenericName=Word Processor
GenericName[en]=Word Processor
Comment=Create and edit text and graphics in letters, reports, documents and Web pages by using Writer.
Comment[en]=Create and edit text and images in letters, reports, documents and Web pages by using Writer.
StartupNotify=true
X-GIO-NoFuse=true
Keywords=Text;Letter;Fax;Document;OpenDocument Text;Microsoft Word;Microsoft Works;Lotus WordPro;OpenOffice Writer;CV;odt;doc;docx;rtf;
InitialPreference=5
StartupWMClass=libreoffice-writer
X-KDE-Protocols=file,http,ftp,webdav,webdavs

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

No problems with other desktop launchers, yes I’m in manjaro KDE wayland

Checked

  • your /usr/lib/libreoffice/share/xdg/writer.desktop is identical with mine.
  • copying your config as new writer.desktop on my desktop starts LO writer without any problem.

Sorry that I can’t be of more help.
Perhaps use the startcenter.desktop as workaround and start the writer from there

1 Like

Are you using libreoffice fresh or still ?
There is a config file under .config/libreoffice/.
Maybe copying this to .bak and then starting Libreoffice helps.

1 Like

I’ve tried everything, all apps gets stuck at start center, which is completely frozen.

Again, launching from terminal just launch it fine, but no start center.
I have switched to OnlyOffice which is working like a charm

Can you reinstall libreoffice ?

I did that, full wipe out, all configs and everything, then reinstall. Same issue

Launching from terminal the start center itself i get

[alex@alex-b450aoruselite ~]$ libreoffice
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()

So perhaps it cannot activate the writer after this? The start center opens fine from terminal

The Calc throw this

[alex@alex-b450aoruselite ~]$ libreoffice --calc
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
This plugin supports grabbing the mouse only for popup windows
This plugin supports grabbing the mouse only for popup windows

Perhaps Libreoffice does not work with Wayland, only with X11.

It is working when launching from terminal.

Try

kioclient exec  /usr/share/applications/libreoffice-writer.desktop

to see if there are any error messages, when launching from the .desktop file.

1 Like

Thanks for the suggestion, this is the output

[alex@alex-b450aoruselite ~]$ kioclient exec  /usr/share/applications/libreoffice-writer.desktop
kf.config.core: "KConfigIni: In file /usr/share/applications/electrum.desktop, line 6: " "Invalid escape sequence \"\\\"\"."
kf.config.core: "KConfigIni: In file /usr/share/applications/electrum.desktop, line 6: " "Invalid escape sequence \"\\\"\"."
kf.config.core: "KConfigIni: In file /usr/share/applications/electrum.desktop, line 21: " "Invalid escape sequence \"\\\"\"."
kf.config.core: "KConfigIni: In file /usr/share/applications/electrum.desktop, line 21: " "Invalid escape sequence \"\\\"\"."
kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but no Exec line
kf.service.sycoca: Invalid Service :  "/usr/share/applications/qemu.desktop"
kf.service.services: KApplicationTrader: mimeType "x-scheme-handler/file" not found

I’ve not seen that before. But it is a place to start.

I noticed you were looking at this file

/usr/lib/libreoffice/share/xdg/writer.desktop

does it give the same error message when you do

kioclient exec `/usr/lib/libreoffice/share/xdg/writer.desktop`

it started without the ` . I have noticed a permission problem (how?)

[alex@alex-b450aoruselite ~]$ kioclient exec `/usr/lib/libreoffice/share/xdg/writer.desktop`
bash: /usr/lib/libreoffice/share/xdg/writer.desktop: Permission denied
kioclient: Syntax error, not enough arguments
--------------------------------------------------------------------------------------------------------------------------- 10:49:46
[alex@alex-b450aoruselite ~]$ kioclient exec /usr/lib/libreoffice/share/xdg/writer.desktop
kf.config.core: "KConfigIni: In file /usr/share/applications/electrum.desktop, line 6: " "Invalid escape sequence \"\\\"\"."
kf.config.core: "KConfigIni: In file /usr/share/applications/electrum.desktop, line 6: " "Invalid escape sequence \"\\\"\"."
kf.config.core: "KConfigIni: In file /usr/share/applications/electrum.desktop, line 21: " "Invalid escape sequence \"\\\"\"."
kf.config.core: "KConfigIni: In file /usr/share/applications/electrum.desktop, line 21: " "Invalid escape sequence \"\\\"\"."
kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but no Exec line
kf.service.sycoca: Invalid Service :  "/usr/share/applications/qemu.desktop"
kf.service.services: KApplicationTrader: mimeType "x-scheme-handler/file" not found
--------------------------------------------------------------------------------------------------------------------------- 10:50:00
[alex@alex-b450aoruselite ~]$ qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
This plugin supports grabbing the mouse only for popup windows
This plugin supports grabbing the mouse only for popup windows

I’m having a hard time understanding what these…

have to do with LibreOffice.

It’s probably a red herring, but have you had a look at those files, for the stated error condition.?

the qemu thing is a bug in kde 430157 – KDE .desktop parser complains about files that have Type= "Application" but no Exec line, although this situation is normal.

The KApplicationTrader is another KDE bug 443319 – kf.service.services: KApplicationTrader: mimeType "x-scheme-handler/file" not found

If I apply the solution there then the kioclient doesn’t execute desktop files anymore, it just opens them in dolphin

The same bug I am facing is described here malformed launcher command · Issue #4300 · spesmilo/electrum · GitHub

The workaround solution they gave is not working for me

I get this.

kf.service.services: KApplicationTrader: mimeType "x-scheme-handler/file" not found

But not the other errors, and Writer launches OK

what is electrum, and how is it related to LibreOffice?

OR

Are you trying to tell me that on a Wayland system all those .desktop files are supposed to be called when ever you open an application, just so wayland can work out what icon to display?

That sounds crazy.