It seems like I am closer to a solution to this debacle.
This seems to be an Onlyoffice issue, and PCmanFM and the mime stuff looks to be blameless.
In the Onlyofffice support forum, this guy had the exact same problem:
I can reproduce the results exactly on my computer.
If I create a
test.docx file (made with MS office, with some text in it) in my downloads folder, open a terminal in that folder and run
Onlyoffice will just open the welcome screen.
But if I run with the full file path from the terminal:
Onlyoffice opens the file exactly as it should. The text is showing, it is not an empty document. The same goes for excel files and powerpoint files.
So Onlyoffice needs the full and explicit path, to open files correctly in PCManFM, but not in Thunar.
This guy “fixed” it with a script, as a workaround:
for argv; do
if [ -f "$argv" ]; then
set -- "$@" "$argv"
exec /opt/onlyoffice/desktopeditors/DesktopEditors "$@"
# exec flatpak run org.onlyofficedesktopeditors "$@"
So my question is:
How can I reproduce this on my computer, and use this script this person made?
I’ve been playing around with some simple ready-made scripts, with some success. But I dont know how to set this up with PCManFM, so that it will always open office files with the full path.