Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is it possible to change the style of a specific program while using another style for the entire desktop in Xubuntu 12.04? For example, I would like to use the Xfce-dusk style for the entire desktop and most programs, but I would like to use something like greybird for qgit, meld, and my text editor. Is this possible, and if so, how?

share|improve this question
1  
See if this answer is helpful: askubuntu.com/a/47620/25656 but this solution seems limited to gtk2 apps and not to qt or gtk3 apps. –  user25656 Dec 13 '13 at 2:49
    
Awesome, it worked! Thanks @vasa1! Do you want to post that as the answer so I can select it as correct? –  stiemannkj1 Dec 13 '13 at 3:24
1  
Why don't you make a detailed answer yourself explaining what you did? No problems for me if you do so :) That would help other Xfce/Xubuntu users as well. –  user25656 Dec 13 '13 at 3:34
    
Sounds good. Thanks again, @vasa1. –  stiemannkj1 Dec 14 '13 at 2:17
    
Good! After a couple of days (I think), you'll be allowed to accept your own answer if no better one, in your opinion, comes along. –  user25656 Dec 14 '13 at 2:26
add comment

1 Answer 1

up vote 0 down vote accepted

Meng Tian already answered this question here, but the answer is probably even more relevant to my question. Since I did things slightly differently, I'm posting my own answer here.

You can launch programs with a different style/theme by placing GTK2_RC_FILES=/usr/share/themes/YourFavoriteTheme/gtk-2.0/gtkrc before your program's command when running the program from the command line.

For example, if you wanted to run leafpad with the Bluebird style/theme, you could just enter this at the command line:

GTK2_RC_FILES=/usr/share/themes/Bluebird/gtk-2.0/gtkrc leafpad

If you want to make this simpler, you can create an executable .sh script file and put this code in it:

#!/bin/sh

GTK2_RC_FILES=/usr/share/themes/Bluebird/gtk-2.0/gtkrc leafpad "$@"

If you do this, you can also create a launcher for this script which will launch the program in the correct style.

Note: the "$@" allows you to pass arguments through your script to your program. This was all I needed for my purposes, but if you need to do something fancy like pipe output to the program, this script may not work.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.