When both GTK+2 and GTK+3 installed there's a problem with theming -- with SAL_USE_VCLPLUGIN=gtk manually set LibreOffice uses unthemed GTK+2, while the main toolkit in the system is GTK+3.
Since LibreOffice (and perhaps OpenOffice too) automatically detects toolkit libraries in the order gtk3 -> gtk -> kde4 -> generic, I think it would be ok to remove this variable at all (startlxde.in.diff.2) or to obey system-wide settings (startlxde.in.diff.1)
lxde-common-0.99.2
Thank you for a report. Could you clarify your suggestion more, please? It's not clear from your patches. Do you suggest to eliminate 'export SAL_USE_VCLPLUGIN=gtk' line?
I think it would be better to remove the line. I'm not sure about OpenOffice, but recent versions of LibreOffice are fine without SAL_USE_VCLPLUGIN environment variable. I have tested with LibreOffice versions 5.2.6.2 and 5.3.1.2 -- both of them correctly detect graphical toolkit (with the variable unset).
The startlxde.in.diff.1 patch is an alternative method to keep SAL_USE_VCLPLUGIN variable, perhaps, for compatibility with older versions of Open/LibreOffice that do not automatically detect toolkit libraries. But I think it's not necessary any more.
Last edit: Vladimir Valeyev 2017-04-26
Here's a rewrite of startlxde that will fix this issue and others, because it uses a user configuration file.
=========== UPDATE =================
Code below updated from original post. Separated configuration files openbox/environment and openbox/lxde-environment, with a few other minor corrections.
Consideration might also be given to using this script for creating a default $HOME/.config/lxsession/LXDE/desktop.conf if it does not already exist, and populating with intelligent guesses based on what is installed on the system.
=========== / UPDATE =================
Last edit: Loye Young 2018-05-24
Please remove the 'export SAL_USE_VCLPLUGIN=gtk' line. GTK+2 support was removed in LibreOffice 6.4, released on 29 January 2020. commit
Last edit: Sebastiaan Lokhorst 2020-01-29