libreoffice is just a softlink to the old staroffice startup script.
Code:
$ file /usr/bin/libreoffice /usr/bin/soffice
/usr/bin/libreoffice: symbolic link to ../lib/libreoffice/program/soffice
/usr/bin/soffice: symbolic link to ../lib/libreoffice/program/soffice
# file /usr/lib/libreoffice/program/soffice
/usr/lib/libreoffice/program/soffice: POSIX shell script, ASCII text executable[/CODE]
So ... if it was me, I'd copy /usr/lib/libreoffice/program/soffice to /usr/lib/libreoffice/program/soffice.local, changing the name slightly to avoid problems, and add the desired environment variable there. Leaving it in the same directory is required because the script figures out which directory it is in and assumes other things are there as well. Initially, I tried copying the script to my ~/bin/ and modifying it there. That failed because /usr/lib/libreoffice/program/oosplash wasn't available. Anyways, basically, add
Code:
SAL_VCL_QT5_USE_CAIRO=true
export SAL_VCL_QT5_USE_CAIRO
near the top of /usr/lib/libreoffice/program/soffice.local .
Next, make a symlink from ../lib/libreoffice/program/soffice.local to /usr/bin/ (this is needed because the script
and finally
call it with whatever options the other .desktop file for Writer does.
To run it:
Code:
$ soffice.local --writer
I haven't tested it for PDFs, but soffice.local --writer is working and it created a TEST.pdf file correctly.
Would be interesting to know if it works for others. The version here is :
Code:
ii libreoffice-writer 1:6.4.6-0ubuntu0.20.04.1
The env= .... --writer would be easier, by far, provided that it works. If that isn't working, I'd try to have it run inside a shell first.
Bookmarks