Run an application with a specific GTK2 themePosted: 2014-07-30
I want to run an application with a GTK2 theme that is different from the global one. Searching the Arch Linux wiki, pointed me to their solution.
In my case, I am running Slackware64 14.1 with KDE 4.10.5. I am using the Oxygen QT4 theme and its GTK2/GTK3 ports that come with Slackware by default (oxygen-gtk2 and oxygen-gtk3). However, as mentioned before, I am experiencing problems with certain applications. Among them is the Zotero bibliography manager. A nice, Oxygen-like theme for GTK2 that does not have these issues is kde44-oxygen-molecule, available from SBo.
In order to use this theme only for Zotero, I copied
/usr/share/applications/Zotero.desktop locally to
~/.local/share/applications/. Then, I edited the
Exec line of the local copy of the
.desktop file as the Arch Linux wiki recommended:
[Desktop Entry] Type=Application Name=Zotero Standalone Icon=zotero.png # Exec=zotero %f Exec=GTK2_RC_FILES=/usr/share/themes/kde44-oxygen-molecule/gtk-2.0/gtkrc zotero %f Categories=Office Terminal=false
Save and it runs without problems (so far). It looks a little different compared to the rest of the desktop but it does not bother me that much. Yet.