Sunday, December 23rd, 2007

Openbox, OpenOffice.org & GTK

While I'm on the topic of Openbox and themes, one thing that's been bugging me is OpenOffice.org and its refusal to natively dress in a GTK theme. I know it's a trivial issue, but when you've put some effort into creating a nice theme you at least want your applications to use it.

Anyhow, after a little Googling I found a fix:

1. Install openoffice-gtk package from Ubuntu repositories with this terminal command:

sudo apt-get install openoffice.org-gtk

2. Open your personal Openbox startup file for editing:

gedit ~/.config/openbox/autostart.sh

or system-wide startup file:

gksudo gedit /etc/xdg/openbox/autostart.sh

3. Add the following lines, save and exit:

#Force OpenOffice.org to use GTK theme
export OOO_FORCE_DESKTOP=gnome

4. Restart Openbox.

A couple of screenshots, in case you have no idea what I'm rambling on about :)

Before applying GTK theme:
Screenshot of OpenOffice.org under Openbox without GTK styling.

After applying GTK theme:
Screenshot of OpenOffice.org under Openbox with GTK styling.


Update @ 14:15 23/12/2007

When using Tango icons, don't forget to install the corresponding package for OpenOffice.org:

sudo apt-get install openoffice.org-style-tango

See updated screenshot below, this time with icons :)
Screenshot of OpenOffice.org under Openbox with GTK styling.


9 Responses to “Openbox, OpenOffice.org & GTK”

  1. Peter wrote,

    Thanks a lot! Thats what i was looking for. 1st hit at google! Thx!

  2. Johnathan wrote,

    ive been trying to get "openoffice" installed" on "pclos tinyme 2008" and after googling for a month trying to figure out how to get "openoffice" to use gtk other than having it look like "mircosoft office" from the "windows 95" days, i finally came across this! i know this article was from last year but i want say thank you for the tip! :)

  3. C2H5OH wrote,

    Brilliant. Much better now. Thank you!

  4. consumercitizen wrote,

    thanks - at last I can say goodbye to the oo filedialog dog

  5. Seb wrote,

    In KDE4, this package (openoffice.org-gtk is very broken now: 1) scrolling leads to total mess in the scrolling bars, and 2) dialogs are transparent in most sections so it's impossible to tell where cursor's at. At least in Debian sid AMD64, quad-core, with nvidia (Debian) drivers.

  6. Spaceman wrote,

    This method does not work for me, the one below does; Edit sudo gedit /etc/openoffice/soffice.sh Append this on the end export OOO_FORCE_DESKTOP=gnome

  7. memnoch wrote,

    autostart neither worked for me

    /etc/openoffice/soffice.sh method does

    THANKS A LOT !!!

    Spaceman wrote, Thursday, October 8th, 2009:

    This method does not work for me, the one below does; Edit sudo gedit /etc/openoffice/soffice.sh Append this on the end export OOO_FORCE_DESKTOP=gnome

  8. xycris wrote,

    hi, is there an updated tutorial?

    i am afraid to edit my #! for it might get broken especially now that karmic koala is released.

    please?

  9. Tom Jenkins wrote,

    @xycris - I'm on karmic and just installing the package worked for me, no autostart or anything required. Hope that helps.

    Tom

Add Your Comment

Use the form below to add your comment. Markdown syntax is available. Note, comments are moderated by me for spam filtering. Alternatively, feel free to contact me privately.