[Solved] OOO_FORCE_DESKTOP for dark themes

Issues with installing under all GNU/Linux Distributions
Locked
slightlystoopid
Posts: 8
Joined: Fri Feb 05, 2010 11:57 pm

[Solved] OOO_FORCE_DESKTOP for dark themes

Post by slightlystoopid »

It's be awhile since I used OpenOffice, and no doubt, an update had cleared this variable. I used to have it set at the top of /usr/lib/go-openoffice/program/soffice to "OOO_FORCE_DESKTOP=none". Of course, when I first realized my themes were dark again, I didn't remember where I had set it, so just used "env OOO_FORCE_DESKTOP=none soffice" from the command line. Still dark. Then I looked up where it had to be set, set it, still dark. I see I'm not the only one as this was occurring back in October to someone on Ubuntu 9.10. So can anyone confirm that OOO_FORCE_DESKTOP=none is or is not working? And if it's not, does anyone know the workaround for disabling themes?
Last edited by slightlystoopid on Sat Feb 06, 2010 3:43 pm, edited 1 time in total.
go-openoffice 3.2.0.4-1 on archlinux.
User avatar
Hagar Delest
Moderator
Posts: 32721
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: OOO_FORCE_DESKTOP for dark themes

Post by Hagar Delest »

Hi and welcome to the forum!

See OpenOffice.org 2.4.x Dark Theme Workaround With Ubuntu 8.04.

I had to edit slightly the path and my openoffice.org3 file in /usr/bin has for second line:

Code: Select all

exec env GTK2_RC_FILES=/usr/share/themes/Industrial/gtk-2.0/gtkrc /opt/openoffice.org3/program/soffice "$@"
Thanks to add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
slightlystoopid
Posts: 8
Joined: Fri Feb 05, 2010 11:57 pm

Re: OOO_FORCE_DESKTOP for dark themes

Post by slightlystoopid »

Unfortunately, this doesn't work. It disables the gtk theme, but not the underlying metacity theme.

Here's what I'm looking at:

env OOO_FORCE_DESKTOP=none soffice :
ooffice.png
env GTK2_RC_FILES="" soffice :
ooffice2.png
results are the same if I replace null with clearlooks' gtkrc.

and clearly, OOO_FORCE_DESKTOP does nothing.
go-openoffice 3.2.0.4-1 on archlinux.
User avatar
Hagar Delest
Moderator
Posts: 32721
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: OOO_FORCE_DESKTOP for dark themes

Post by Hagar Delest »

I've never tweaked that OOO_FORCE_DESKTOP parameter. Here is my screen:
Screen.png
NB: thanks to upload the screenshots in the forum instead of links to external sites. It insures they stay in the future.
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
slightlystoopid
Posts: 8
Joined: Fri Feb 05, 2010 11:57 pm

Re: OOO_FORCE_DESKTOP for dark themes

Post by slightlystoopid »

Reading the info here, here, and, of course, here, it seems there has been two variables accomplishing similar goals. Beginning with, at latest, 320m12, it appears OOO_FORCE_DESKTOP (which still works in 310m19) has been removed in favor of using only the less intuitive sounding SAL_USE_VCLPLUGIN, which when set to "gen" yields the generic openoffice colors. Or maybe it's just broken. Who knows. I can't find any other relevant details.

Also, the Industrial gtkrc did set everything to white like your screenshot. I guess it's just a matter of whether the theme's gtkrc explicitly makes everything white or not. I prefer using SAL_USE_VCLPLUGIN though as the use of grays makes it easier and more pleasant on the eyes (and it allows for pretty java menus when jre is installed)(and lots of white makes my eyeballs burn).

env SAL_USE_VCLPLUGIN=gen soffice-dev :
sal-use-vclplugin.png
Just to clarify to anyone reading this: the best solution, imo, is to add "export SAL_USE_VCLPLUGIN=gen" to your .bash_profile. I'm really not sure why I felt the need to modify library files before since they're naturally overwritten during upgrades.

And sorry about not uploading the screenshots directly before; I didn't notice this forum allowed attachments.
go-openoffice 3.2.0.4-1 on archlinux.
User avatar
Hagar Delest
Moderator
Posts: 32721
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [Solved] OOO_FORCE_DESKTOP for dark themes

Post by Hagar Delest »

Ah, many thanks, that's indeed much better!
My openoffice.org3 file is now:

Code: Select all

#!/bin/sh
exec env SAL_USE_VCLPLUGIN=gen /opt/openoffice.org3/program/soffice "$@"
Screen2.png
:super:
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
slightlystoopid
Posts: 8
Joined: Fri Feb 05, 2010 11:57 pm

Re: [Solved] OOO_FORCE_DESKTOP for dark themes

Post by slightlystoopid »

Hagar de l'Est wrote:Ah, many thanks, that's indeed much better!
My openoffice.org3 file is now:

Code: Select all

#!/bin/sh
exec env SAL_USE_VCLPLUGIN=gen /opt/openoffice.org3/program/soffice "$@"
Screen2.png
:super:
But remember, it'll be overwritten after an update. I just edited my previous post to include that little caveat along with a better (imo) solution.
go-openoffice 3.2.0.4-1 on archlinux.
nabilalk
Posts: 9
Joined: Sat Feb 13, 2010 4:11 am

Re: OOO_FORCE_DESKTOP for dark themes

Post by nabilalk »

slightlystoopid wrote:
Just to clarify to anyone reading this: the best solution, imo, is to add "export SAL_USE_VCLPLUGIN=gen" to your .bash_profile. I'm really not sure why I felt the need to modify library files before since they're naturally overwritten during upgrades.
What do you mean by the .bash_profile? Are you referring to the oowriter bash script in /usr/bin?
OpenOffice.org 3.2|#! Linux 9.04.01|Ubuntu (9.10) Karmic Koala
nabilalk
Posts: 9
Joined: Sat Feb 13, 2010 4:11 am

Re: [Solved] OOO_FORCE_DESKTOP for dark themes

Post by nabilalk »

This thread helped me solve my problem as well. Thanks. For a more detailed solution, see this thread over at the CrunchBang Linux forums. Crunchbang is a mod of Ubuntu

http://crunchbanglinux.org/forums/post/55327/#p55327
Last edited by MrProgrammer on Sun Jun 25, 2023 7:38 pm, edited 1 time in total.
Reason: Disable broken link
OpenOffice.org 3.2|#! Linux 9.04.01|Ubuntu (9.10) Karmic Koala
slightlystoopid
Posts: 8
Joined: Fri Feb 05, 2010 11:57 pm

Re: OOO_FORCE_DESKTOP for dark themes

Post by slightlystoopid »

nabilalk wrote:
slightlystoopid wrote:
Just to clarify to anyone reading this: the best solution, imo, is to add "export SAL_USE_VCLPLUGIN=gen" to your .bash_profile. I'm really not sure why I felt the need to modify library files before since they're naturally overwritten during upgrades.
What do you mean by the .bash_profile? Are you referring to the oowriter bash script in /usr/bin?
no, definitely not. Anything in /usr/bin or /usr/lib is normally going to be overwritten during upgrades. I'm refering to these. If bash is your primary shell, then you'll want "export SAL_USE_VCLPLUGIN=gen" in your ~/.bash_profile. That script is only run at login; however, so you'll need to logout and back in for it to be exported to all subshells.
go-openoffice 3.2.0.4-1 on archlinux.
nabilalk
Posts: 9
Joined: Sat Feb 13, 2010 4:11 am

Re: OOO_FORCE_DESKTOP for dark themes

Post by nabilalk »

slightlystoopid wrote:
no, definitely not. Anything in /usr/bin or /usr/lib is normally going to be overwritten during upgrades. I'm refering to these. If bash is your primary shell, then you'll want "export SAL_USE_VCLPLUGIN=gen" in your ~/.bash_profile. That script is only run at login; however, so you'll need to logout and back in for it to be exported to all subshells.
How do I edit .bash_profile? I can't seem to locate it on my Ubuntu 9.10 install.
OpenOffice.org 3.2|#! Linux 9.04.01|Ubuntu (9.10) Karmic Koala
slightlystoopid
Posts: 8
Joined: Fri Feb 05, 2010 11:57 pm

Re: [Solved] OOO_FORCE_DESKTOP for dark themes

Post by slightlystoopid »

Ubuntu uses Dash. try...

Code: Select all

find $HOME -maxdepth 1 -type f -iname '.*profile'
go-openoffice 3.2.0.4-1 on archlinux.
User avatar
Hagar Delest
Moderator
Posts: 32721
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [Solved] OOO_FORCE_DESKTOP for dark themes

Post by Hagar Delest »

I don't have any ~/.bash_profile, I guess you've to create it and put the script inside if you want to go that way.
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
slightlystoopid
Posts: 8
Joined: Fri Feb 05, 2010 11:57 pm

Re: [Solved] OOO_FORCE_DESKTOP for dark themes

Post by slightlystoopid »

Hagar de l'Est wrote:I don't have any ~/.bash_profile, I guess you've to create it and put the script inside if you want to go that way.
I don't have an Ubuntu-based distro available to check, but normally default shell config files available for copy to user's home directories are placed in /etc/skel. see the -k option in 'man useradd' for more info.
go-openoffice 3.2.0.4-1 on archlinux.
nabilalk
Posts: 9
Joined: Sat Feb 13, 2010 4:11 am

Re: [Solved] OOO_FORCE_DESKTOP for dark themes

Post by nabilalk »

slightlystoopid wrote:Ubuntu uses Dash. try...

Code: Select all

find $HOME -maxdepth 1 -type f -iname '.*profile'
I'm sorry. But I don't understand what you mean by this. Could you break this down in more simple terms? Thank you for your patience.
OpenOffice.org 3.2|#! Linux 9.04.01|Ubuntu (9.10) Karmic Koala
slightlystoopid
Posts: 8
Joined: Fri Feb 05, 2010 11:57 pm

Re: [Solved] OOO_FORCE_DESKTOP for dark themes

Post by slightlystoopid »

nabilalk wrote:
slightlystoopid wrote:Ubuntu uses Dash. try...

Code: Select all

find $HOME -maxdepth 1 -type f -iname '.*profile'
I'm sorry. But I don't understand what you mean by this. Could you break this down in more simple terms? Thank you for your patience.
I just had someone on Mint run that command; there's a .profile file in their home directory. If you want to learn more, run that command, see if that file exists, and if so, read it and everything it refers to.
go-openoffice 3.2.0.4-1 on archlinux.
nabilalk
Posts: 9
Joined: Sat Feb 13, 2010 4:11 am

Re: [Solved] OOO_FORCE_DESKTOP for dark themes

Post by nabilalk »

I added "export SAL_USE_VCLPLUGIN=gen" without quotes into the .profile file located in /home/username (home folder) then logged out and voila. That's far easier than messing with entries in /usr/bin or .desktop entries in /usr/share/applications
OpenOffice.org 3.2|#! Linux 9.04.01|Ubuntu (9.10) Karmic Koala
booksnmore4you
Posts: 1
Joined: Wed May 05, 2010 11:31 pm

Re: [Solved] OOO_FORCE_DESKTOP for dark themes

Post by booksnmore4you »

Isn't there a way to add code to the theme's gtkrc file so OOo displays well with dark themes?

For example, here is a post from 2007 http://art.ubuntuforums.org/showthread.php?t=465931 that explains how one person did it but I cannot figure out how to get it to work..or I did figure it out but it just no longer works. :roll:

My dark themes work well except one persistent killer, i.e., that the text of the OOo menu bar is dark up against the dark color of the theme. See attached.

Most annoying, these same themes worked perfectly in OOo2 but were broken in OOo3! :ucrazy:

Thoughts?
Attachments
ooo.jpg
Ooo 3.2 on uberstudent.org
spacepenguin
Posts: 1
Joined: Sun Nov 21, 2010 5:42 am

Re: [Solved] OOO_FORCE_DESKTOP for dark themes

Post by spacepenguin »

Is there any solution for the black on black menu bar? I use OOo with KDE4 and a QtCurve theme with a black menu bar and white menu bar text. All other applications (KDE, Gnome, GTK, whatsoever) respect those settings. It's just OOo that insists on black menubar text...
OpenOffice 3.1 on Ubuntu 10.10
Locked