! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Default Xfce theme doesn't use Xfce GTK Engine if installed with a custom prefix
Status:
CLOSED: INVALID
Product:
Gtk-xfce-engine
Component:
General

Comments

Description Enrico Tröger editbugs 2009-02-08 21:56:18 CET
Created attachment 2160 
Xfce Default Theme fails to use Xfce GTK Engine with custom prefix

I build & install my Xfce into a custom prefix, /home/enrico/apps/xfce-svn.

However, choosing any of GTK themes installed by Xfce, namely these in /home/enrico/apps/xfce-svn/share/themes doesn't work. It seems the Xfce-Gtk-Engine isn't used, see the attached screenshot.

If I copy /home/enrico/apps/xfce-svn/share/themes/Xfce to ~/.themes/ or to /usr/share/, the theme will work as expected and the Xfce-Gtk-Engine is used.

Any ideas?

Happens with current SVN version.

Environment:
XDG_CONFIG_DIRS=/home/enrico/apps/xfce-svn/etc/xdg:/etc/xdg
XDG_CONFIG_HOME=/home/enrico/.config
XDG_DATA_DIRS=/home/enrico/apps/xfce-svn/share:/home/enrico/apps/share:/usr/share:/home/enrico/apps/xfce-svn/share
Comment 1 Enrico Tröger editbugs 2009-02-08 22:03:19 CET
Just an additional note:

the doubly listed '/home/enrico/apps/xfce-svn/share' in XDG_DATA_DIRS is not part of the problem. I just fixed the XDG_DATA_DIRS variable, restarted my session but without any changes.
Comment 2 Olivier Fourdan editbugs 2009-02-09 09:08:50 CET
That is not an Xfce issue, it's gtk.

Theme engines are loaded dynamically by gtk+ which looks into the same prefix where it was installed, ie if you have gtk+ installed in /usr, the engine will be searched in /usr/lib/gtk-2.0/2.10.0/engines/ (or /usr/lib64/gtk-2.0/2.10.0/engines/ for 64bits).

To have custom engines installed, you must copy/link the DSO to ~/.gtk-2.0/engines/

So:

$ mkdir -p ~/.gtk-2.0/engines/
$ ln -s  ~/apps/xfce-svn/lib/gtk-2.0/2.10.0/libxfce* ~/.gtk-2.0/engines/

should work for you.
Comment 3 Enrico Tröger editbugs 2009-02-10 23:41:24 CET
(In reply to comment #2)
> That is not an Xfce issue, it's gtk.
> 
> Theme engines are loaded dynamically by gtk+ which looks into the same prefix
> where it was installed, ie if you have gtk+ installed in /usr, the engine will

Sorry if I wasn't clear enough. This is not my problem.
My theme in ~/.themes uses also the Xfce theme engine and it is found correctly (see below about GTK_PATH).
The problem is that for the themes installed in $prefix/share/themes the Xfce theme engine isn't used.

Anyway, I played a bit around and figured that it really seems to be a GTK issue. By setting
export GTK_DATA_PREFIX="/home/enrico/apps/xfce-svn"
GTK will use the Xfce theme engine for the default themes. However, this will disable the themes installed in /usr/share/themes (default GTK prefix).
So, I'd say GTK should use XDG_DATA_DIRS for theme files but after all, this is not Xfce related.


> $ mkdir -p ~/.gtk-2.0/engines/
> $ ln -s  ~/apps/xfce-svn/lib/gtk-2.0/2.10.0/libxfce* ~/.gtk-2.0/engines/

I'm using
export GTK_PATH="/home/enrico/apps/xfce-svn/lib/gtk-2.0"
which is more convenient for me :).

Bug #4921

Reported by:
Enrico Tröger
Reported on: 2009-02-08
Last modified on: 2012-04-08

People

Assignee:
Olivier Fourdan
CC List:
1 user

Version

Attachments

Additional information