06-02-2022, 06:40 AM
(05-30-2022, 07:55 AM)Peter Gamma Wrote: Thanks for your answer, Wibble. I am looking for the easiest way to start LibreOffice on the PinePhone, even if the easiest way is a workaround.
You said, on mobian, you also managed to run LibreOffice, which is great.
You said:
«If I ssh in with X forwarding I can start libreoffice with everything appearing on my desktop, so it can run».
How can I ssh in with X forwarding on mobian to start libreoffice so it can run LibreOffice on my PinePhone?
Use the -X switch when you ssh into the pinephone from the desktop:
ssh -X mobian@pinephone_name_or_address
This will forward the display to the desktop for applications using X but not those using native Wayland. If you want to launch it with the display on the phone, and to keep running after you disconnect from ssh, you don't want the -X. Instead in the ssh session you would run:
DISPLAY=:0 OOO_FORCE_DESKTOP=gnome-wayland libreoffice &
You can also modify the .desktop files for whichever libreoffice component you want to set the environment. It's probably best to copy them from /usr/share/applications/libreoffice-whatever.desktop to ~/.local/applications/ and edit the copies rather than editing the system ones. When editing you need to find the Exec lines and add the necessary environment at the start, so for example:
Exec=libreoffice --writer %U
becomes:
Exec=env OOO_FORCE_DESKTOP=gnome-wayland libreoffice --writer %U
When testing this I accidentally hit the icon for one that I hadn't edited, and it still launched properly on the phone, so it seems an update has fixed this issue, and that libreoffice now 'Just Works' on mobian. I'll leave the above for reference in case it breaks again.