Can I apply a different GTK3 theme from the main one to an individual application?

You can use the GTK environment variable GTK_THEME=elementary to launch an app with the elementary theme. For example, running GTK_THEME=elementary pantheon-files will launch the elementary Files app using the elementary GTK theme.

To get this to apply every time you launch a specific app, your best option is likely to create a custom .desktop file (launcher).

Create a custom .desktop file

  1. Open your file browser
  2. Navigate to /usr/share/applications/
  3. Copy the launcher (highlight and Ctrl+C) for the app you want to launch with the elementary theme
  4. Navigate to ~/.local/share/applications/ and paste the launcher (Ctrl+V)
  5. Right-click and open the launcher with a text editor
  6. Modify the line starting with Exec= to include Exec=env GTK_THEME=elementary and then the previous existing contents of the line. (So Exec=pantheon-files would become Exec=env GTK_THEME=elementary pantheon-files)
  7. Save and close the file

The next time you launch the app from Unity (or your app launcher of choice) it will use the elementary theme.

Bonus: make it work when using command line

You may also want the app to launch with the elementary theme when launching it from the command line. To do so:

  1. Open your Terminal app
  2. Type alias pantheon-files="GTK_THEME=elementary pantheon-files" (replacing pantheon-files with the desired app)
  3. Press Enter

Caveats:

  1. This will not change your window manager's theme to the elementary theme.
  2. This (by design) will only apply to your account, not root or anyone else on the machine.
  3. The theme names are cAsE-sEnsItiVe and should be matched with the theme folder name.

Sources:

  1. I'm an elementary contributor ;)
  2. GTK+ 3 Reference Manual: Running GTK+ Applications
  3. Set variable in .desktop file

The question is still valid and I found a way:

  • create any folder path/to/MY_FOLDER

  • create a /share/themes/ folder inside it (that is path/to/MY_FOLDER/share/themes).

  • put any GTK3 theme inside the latter

  • rename the theme to the name of the CURRENTLY ACTIVE THEME.

    At last, this command will make an app use the renamed theme instead of the currently active one:

GTK_DATA_PREFIX=path/to/MY_FOLDER YOUR_APPLICATON

(The path after GTK_DATA_PREFIX= has to be that (and only that) to the folder that contains /share/themes/RENAMED_THEME. That's why it's NOT path/to/MY_FOLDER/share/themes/RENAMED_THEME, but just path/to/MY_FOLDER.)

To have that inside a launcher, replace accordingly:

Exec=sh -c 'GTK_DATA_PREFIX=path/to/MY_FOLDER YOUR_APPLICATION'

Yes, the simple way is to point the application at the required path where your rc file lives, in the command that runs your application:

GTK2_RC_FILES=/usr/share/themes/Redmond/gtk-2.0/gtkrc inkscape

This on 12.04 for inkscape (which is still Gnome2 btw) produces this:

inkscape window with windows theme

See more information about Gtk2 theme running here.