PCManFM: Open and save files with Onlyoffice?

And a last test:

Mabox uses PCManFM by default. I figured they, as distro makers, should know how to configure this correctly.

I installed Mabox in a vm, and installed Onlyoffice. Result: same pcmanfm + onlyoffice problem as on my home-made Arch Fluxbox.

Preliminary conclusion, based on very little knowledge on the matter:

there is some weird mime -type thing going on with PCmanFM, that happens even on official distros. Or that Onlyoffice and PCManFM just aren’t and cannot be friends.

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-desktopeditors test.docx

Onlyoffice will just open the welcome screen.

But if I run with the full file path from the terminal:

onlyoffice-desktopeditors /home/vlad/Downloads/test.docx

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
        argv="$(realpath "$argv")"
    set -- "$@" "$argv"

exec /opt/onlyoffice/desktopeditors/DesktopEditors "$@"
# or
# 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.

is xdg-desktop-portal-gtk also in use ?

I’m still in the very early stages of understanding the xdg stuff.

How do I check that? It is installed, but I don’t know if it is set up correctly.

i saw you have a bit of flatpak too… pcmanfm-qt example some parts is xdg-desktop-portal-lxqt ,

sorry i am a noob with this just came up with it… probably from the aur version not needed.

1 Like

Thanks. I’ve tested all the variations of PCManfm, gtk and qt, they all act the same.
From what I can tell, this is more of an Onlyoffice issue than a PCManfm issue. But then, I’m basically a noob as well.

i only know xdg-desktop-portal (-gtk depend what you use) but straight aur is different offcourse never tried this office :slight_smile:

1 Like

Perhaps one aspect of the problem is that Onlyoffice seems to only have one executable, and then it decides internally how to open the file? I dunno. Somehow it works with Thunar but not PCManFm, not even on distros who use it by default.

But at least there seems to be a real and actual problem with Onlyoffice itself. From the terminal, it needs the exact and explicit path to open files correctly.

i checked with docx , right click i can select standard office this case onlyoffice , and a click it starts… but i use pcmanfm-qt

hmm…that does not work here.

If you write something, save it and open it again, does it open correctly with the new text?

So right click file preferences you dont have something to open standard with a standard editor?

Yes, I have. For the problem, see the posts above.

Onlyoffice installs and integrates with PCManFM. But when opening files, any office file, from within PCManFM, it just diplays an empty Onlyoffice word document.

When opening files from within Onlyoffice, with the file picker, it works as expected.

This also happens on the official EOS live iso, when I install PCmanFM and Onlyoffice on it. And on any distro I’ve tried (Garuda LxQt and Mabox) that has PCmanFM as the default file manager.

The beahvior is the same across PCManM versions. I’m very interested in knowing how you got it to work with PCManFM-QT.

not really … is general issue pcmanfm-XXX vs onlyoffice… in pcmanfm it want to start a new document even you called document1.docx it doesnt load… even an aliend .odt it creates a document1.docx … somehow not compatible

it do start but it starts in new docs

I’m not good enough with scripts to use the workaround.

It seems possible to use it, so that when you click an office file in PCManFM, PCManFM will call that script and use it to open the file.

But it is beyond my skill level at this point in time.

tried this in openbox edition with pcmanfm-gtk3 and thunar, thunar seems to load fine while in pcmanfm always made a new document

Yes, see posts above. I’ve tried it in a whole bunch of disros that use PCManFM, figuring they would know how to set up things properly, so I could rule out mis-configuring on my part as a cause.

OK, my script knowledge is rather poor, haha. If I understand it correctly, the script isn’t for opening anything, but more like setting a rule. But I don’t know how that guy used it, and it is beyond me to use it myself.

It is a mystery to me why this hasn’t been mentioned by CNN and BBC, not even during slow parts of the day.

One has to trawl the net for hours and hours, only to find a couple few forgotten forum posts here and there with no solutions. I can’t be the only one to use this combination?

wil try to ask in lxqt channel … i believe pcmanfm is bit pauzed…but stil forward mayby someone helps me

1 Like