Xfce Forum

Sub domains
 

You are not logged in.

#1 2010-05-07 14:33:43

sandrick
Member
Registered: 2010-03-20
Posts: 2

QGtkStyle

Can someone explain how to make QGtkStyle work under Xfce?
I can even use QGtkStyle in Openbox after exporting GTK2_RC_FILES="$HOME/.gtkrc-2.0", but it does not work after launching an application from Xfce menu... Thanks :-)

Offline

#2 2010-05-07 15:13:52

etnlWings
Member
Registered: 2007-10-30
Posts: 218

Re: QGtkStyle

Make sure you've set it in qtconfig-qt4.

I can't think of any reason why it wouldn't be working exclusively from the Xfce4 menu but I also don't think setting the environment variable (I trust you used export env GTK2_RC_FILES=) would do much good, either. At least not by just pointing to your .gtkrc-2.0 file.

Try including =.gtkrc-2.0:.gtkrc-2.0-kde4:.themes/Theme Name/gtk-2.0/gtkrc.

If it works, while a PITA, the easiest way to make this persistent, would be to make sure your $HOME/bin/ directory is in the system path (export $PATH=$HOME/bin/:$PATH in ~/.profile), and create a text file in ~/bin/, with the same name as the application binary, containing:

env GTK2_RC...etc /usr/bin/nameofbinary

Be careful to include the full path of the original binary, otherwise the script could end up launching itself in an infinite loop and crash your system.

Now when you launch the menu items, they should launch your local wrapper script, which will launch the actual binary, with the environment variables preset. This will also avoid any unpleasant conflicts between setting the environment variable globally and xfconfd, which at the very least, will try to override your settings.

Offline

#3 2010-05-07 16:35:33

sandrick
Member
Registered: 2010-03-20
Posts: 2

Re: QGtkStyle

Thanks for the answer, the script you proposed works as expected. But it is a hackish DIY solution.
Is there a way to make this global for all Qt apps?

---

Just to explain myself better, I do export gtkrc because my gtk theme is listed there. It is something that just works in many WM, Openbox in particular. I suppose things do not work by default because QGtkStyle cannot read Xfce theme settings...

Offline

#4 2010-05-08 02:09:06

etnlWings
Member
Registered: 2007-10-30
Posts: 218

Re: QGtkStyle

I've not had problems with Xfce + qgtkstyle. I've had issues with qgtkstyle just being broken and not working sometimes (like on Arch < 6 months ago). Like I said, though; I have no idea why you're having this issue.

Oh and I forgot to mention: if those wrapper scripts mean you can't open the application 'with file', append a "$*", to the scripts, with or without the quotes, depending upon how the application reads arguments.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 551.88 KiB (Peak: 618.34 KiB) ]