Theming

There are several different parts of the desktop that can be themed, as shown in the picture below.

http://rox.sourceforge.net/screens/theme_parts.png

  1. You can set the image for the desktop background. The pinboard FAQ section tells how.
  2. The window titles and borders are controlled by a window manager, such as OroboROX. There are lots of different window managers to choose from, and most have a large selection of themes available.
  3. Buttons, menus and scrollbars within each window are drawn by the toolkit. ROX applications use the GTK toolkit, which has many themes (see below).
  4. The icon displayed for each file type is set by the icon theme (see below).

See also:

Window manager themes

If you use OroboROX, right click on the OroboROX icon in a ROX-Filer window and choose Options to get a list of themes.

If using another window manager, you can find lots of themes at http://themes.freshmeat.net.

GTK themes

All the ROX applications use GTK. Everything inside the window frame of a GTK application is drawn by GTK, while the frame itself (the titlebar and resize frame) is drawn by the window manager.

The basic goal of the theme system is to keep programmers away from graphic design. The programmer says to GTK "display a button". The theme designer says to GTK "draw buttons like this". For more information, see The GTK+ Theme Architecture.

Downloading themes

ROX uses GTK 2, so make sure you get a GTK2 theme if you want to change the style of the menus and other user interface widgets. To install a GTK theme:

  1. Place your downloaded theme into the hidden directory ~/.themes/
  2. Run the LookAndFeel configuration applet and choose the theme from the menu there (this only works if you're using ROX-Session; other session managers will provide their own ways to set the theme).

You can find lots of themes at http://themes.freshmeat.net.

Manual customization

On startup, GTK reads the file ~/.gtkrc-2.0. You can edit this file to customize the appearance of your programs. See the following pages for some examples.

Themes only seem to change the widget colours, not images

Make sure you have the appropriate theme engine installed (eg gtk2-engines-pixbuf).

How can I theme the toolbar icons?

ROX-Filer uses the standard Gtk stock icons system to change the toolbar icons. Put something like this
in your ~/.gtkrc-2.0 file:

pixmap_path "/path/to/icons"
 
style "normal" {
  stock["gtk-close"] = {{"close-icon.png"}}
  stock["gtk-go-up"] = {{"up-icon.png"}}
  stock["gtk-home"] = {{"home-icon.png"}}
  stock["gtk-refresh"] = {{"refresh-icon.png"}}
  stock["gtk-zoom-in"] = {{"zoom-in-icon.png"}}
  stock["gtk-zoom-fit"] = {{"zoom-fit-icon.png"}}
  stock["gtk-jump-to"] = {{"jump-to-icon.png"}}
  stock["gtk-sort-ascending"] = {{"sort-icon.png"}}
  stock["gtk-help"] = {{"help-icon.png"}}
  stock["rox-show-hidden"] = {{"hidden-icon.png"}}
  stock["rox-show-details"] = {{"details-icon.png"}}
  stock["rox-select"] = {{"select-icon.png"}}
}
 
widget "*" style "normal"

See the list of stock icons in the Gtk documentation for details.

Theming panels

How do I set a font, colour or background image for the panels?

Put something like this in your ~/.gtkrc-2.0 file:

style "panel-style" {
  bg[NORMAL] = "#efb47c"
  font_name = "Sans 5"
}
widget "rox-panel.*" style "panel-style"

Theming the background of filer windows

My GTK theme makes my filer background a different color; how do I make it white again?

Put something like the following in your ~/.gtkrc-2.0 file:
Note: to prevent this file from being overridden when changing themes use ~/.gtkrc.mine
instead

style "rox" = "default"
{
  bg[NORMAL] = "#ffffff"
  bg[ACTIVE] = "#ffffff"
}
widget_class "*Collection*" style "rox"

Next, restart ROX-Filer (or you X session). You can just restart ROX by killing the ROX-Filer process : under Linux, use killall ROX-Filer and restart it. Don't use killall under Solaris.

Other widget_class backgrounds you may like to change include:

  • GtkToolbar - the toolbar at the top of the window
  • GtkMenu - menus

but remember that this will affect all GTK applications.

How do I set a background image for ROX filer windows?

This is similar to the previous question. Put something like the following in your ~/.gtkrc-2.0 file:
Note: to prevent this file from being overridden when changing themes use ~/.gtkrc.mine
instead

pixmap_path "/home/yourhome/images"
style "rox" = "default"
{
  bg_pixmap[NORMAL] = "roxbg.png"
}
widget_class "*Collection*" style "rox"

Bu sure that roxbg.png is in the path you use in the pixmap_path directive. The image will be tiled to fill the whole ROX filer window. Next, restart ROX-Filer (or you X session). You can just restart ROX by killing the ROX-Filer process : under Linux, use killall ROX-Filer and restart it.

Further reading

See the GTK Theming Tutorial for more information.

Icon themes

Icon themes provide icons for all the different types of file. The current series of ROX-Filer (2.2.x) supports freedesktop.org icon themes; install new icon themes in your ~/.icons directory, and then select it in your Options dialog's 'Types' panel.

Themes are listed in the Themes block on the left of the page, or you can browse the list of themes.

In The Future, we hope to be able to share icon themes with other desktops.

Does the filer support SVG icons?

The filer uses GTK to load images. As long as you have SVG support in GTK, ROX-Filer will load them fine. To test for SVG support execute:
gdk-pixbuf-query-loaders | grep svg
If you get a line with svg_loader.so in it, you should be ok.

I'm using ROX-Filer 2.1.0, but the theme setting has no effect!

Make sure you don't have any Choices/MIME-icons directories (~/Choices, /usr/local/share/Choices, /usr/share/Choices, etc). These override icons set in the theme.
If you've previously installed ROX-Filer 2.0.0, you probably have one of these directories around.

How do I create an icon theme?

"What's the best/easiest way of creating icons sets for using in ROX-Filer so that they can be shared ?

Do I have to manually drop an icon in the box for every MIME type, or is there some App that does this is a smarter way? I would like to make a bunch of icon sets and put them online for download."

Copy the ROX-Filer/ROX theme directory as ~/.icons/MyTheme and edit the icons there. Use the Options box to select your new theme. Delete/move everything in your Choices/MIME-Icons directories or they will override the theme.

Set As Wallpaper menu item

Call I make a Set As Wallpaper menu item appear for images?

  1. Right-click on an image and choose Customise Menu....
  2. Drag Wallpaper (version 2.1 or later) to it.
  3. Right-clicking on another file of that type will show a Wallpaper menu item which sets that image as the backdrop.
Set as wallpaper menu item

Using SOAP

You can also use the SOAP method (see the manual for ROX). You can make a small script that takes a file argument and call ROX to set that image as background on the pinboard. You can't use the rootwindow for background, the pinboard is actually one big window that covers your desktop!

Example script (untested, but should work):

#!/bin/sh
rox --RPC << EOF
<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2001/12/soap-envelope">
 <env:Body xmlns="http://rox.sourceforge.net/SOAP/ROX-Filer">
  <SetBackdrop>
   <Filename>$1</Filename>
   <Style>Stretch</Style>
  </SetBackdrop>
 </env:Body>
</env:Envelope>

EOF
Change the Style element to your prefered mode (Stretch, Scale, Center, Tile), make the script executable (chmod +x scriptname) and put in in your ~/Choices/SendTo/.image and it should show up when you shift-rightclick on an image. Though it will not show up at the top of the file menu when right click, if you want this you will have to choose Customise Menu from the top of the File menu (ROX-Filer 2.1.0 or later required).