Ask Your Question

How do you turn off the dark theme in LibreOffice ?

asked 2017-04-05 17:49:58 +0000

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

answered 2017-04-05 21:51:14 +0000

updated 2017-04-20 15:46:26 +0000

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


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 ( 2017-04-19 17:32:35 +0000 )edit

I edited my answer above to get enough room.

yolo ( 2017-04-20 15:48:20 +0000 )edit

Your Answer

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

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question Tools

1 follower


Asked: 2017-04-05 17:49:58 +0000

Seen: 707 times

Last updated: Apr 20 '17