Ask Your Question
0

How do you turn off the dark theme in LibreOffice ?

asked 2017-04-05 12:49:58 -0500

Nicryc gravatar image

Hi, I have enabled the global dark theme in Gnome tweak tool. However, there is one application I'd like to apply the light theme back, LibreOffice. Is that possible ? Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2017-04-05 16:51:14 -0500

updated 2017-04-20 10:46:26 -0500

It's possible to run a application with the desire theme, from a terminal it would be :

GTK_THEME=Adwaita:light libreoffice

And for the desktop shortcut :

sudo vi /usr/share/applications/libreoffice-startcenter.desktop

and update the line Exec :

Exec=env GTK_THEME=Adwaita:light libreoffice %U

EDIT : The command env runs a program in a modified environment (man page definition). It is mandatory otherwise the short-cut won't be accessible without env into a .desktop file.

And here is the definition of the variable from gtk+ :

GTK_THEME.  If set, makes GTK+ use the named theme instead of the theme that is specified by the gtk-theme-name setting. This is intended mainly for easy debugging of theme issues. It is also possible to specify a theme variant to load, by appending the variant name with a colon, like this: GTK_THEME=Adwaita:dark.

It seems not possible to read the content of the variable because it is used only once for launching the program. Usually, we use theses commands to display the variables : env, set or printenv.

edit flag offensive delete link more

Comments

Is the command "env" mandatory ? If yes what does it do ? Other thing, how do you see the content of the variable GTK_THEME ? Thank you.

Nicryc gravatar imageNicryc ( 2017-04-19 12:32:35 -0500 )edit

I edited my answer above to get enough room.

yolo gravatar imageyolo ( 2017-04-20 10:48:20 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-04-05 12:49:58 -0500

Seen: 1,689 times

Last updated: Apr 20 '17