! 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 !
all Xfce icons missing
Status:
RESOLVED: FIXED
Product:
Xfce-utils
Component:
General

Comments

Description juha editbugs 2006-04-12 11:56:52 CEST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; fi-FI; rv:1.7.12) Gecko/20051010 Firefox/1.0.7 (Ubuntu package 1.0.7)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; fi-FI; rv:1.7.12) Gecko/20051010 Firefox/1.0.7 (Ubuntu package 1.0.7)

after installing 4.3 svn revision 20855 tp a new machine, I can not see Xfce icons
anywhere.

Maybe my setup issue, but I have other machines (with same Ubuntu version) where
I have not had this problem.

Anyway, I did not get any errors during the installation.

Icons work when I add symbolic link to standard icon path (like ~/.icons), so icons are where they should be, but Xfce just does not find them.

Reproducible: Always
Comment 1 juha editbugs 2006-04-12 11:57:37 CEST
non standard installation prefix used. (/usr/local/xfce)
Comment 2 Brian J. Tarricone (not reading bugmail) 2006-04-12 15:09:27 CEST
You need to add /usr/local/xfce/share to your XDG_DATA_DIRS env var.
Comment 3 juha editbugs 2006-04-12 15:23:05 CEST
Shouldn't that happen automagically in the make files?
Comment 4 Olivier Fourdan editbugs 2006-04-12 20:02:01 CEST
Hi Brian, I wonder, could we do something like adding

XDG_DATA_DIRS=${datadir}
export DG_DATA_DIRS

To the xinitrc.in so that the env var is set automagically? Does that make any sense?
Comment 5 Benedikt Meurer editbugs 2006-04-12 20:04:15 CEST
We had something like this once, it used to cause trouble, don't remember exactly. That's why we added this to libxfce4util in the end as hardcoded fallback. Unfortunately gtk doesn't use libxfce4util. ;-)
Comment 6 Olivier Fourdan editbugs 2006-04-12 20:09:06 CEST
Created attachment 500 
Set XDG_DATA_DIRS if not set

Something along these lines...
Comment 7 Brian J. Tarricone (not reading bugmail) 2006-04-12 20:57:10 CEST
(In reply to comment #6)
> Created an attachment (id=500) [edit]
> Set XDG_DATA_DIRS if not set
> 
> Something along these lines...
> 

I guess that's ok, though you really only need:

( test -z "$XDG_DATA_DIRS" && XDG_DATA_DIRS="@datadir@" ) \
    || XDG_DATA_DIRS="@datadir@:$XDG_DATA_DIRS"
export XDG_DATA_DIRS

While we're at it, we should probably do the same with XDG_CONFIG_DIRS.  Though I kinda dislike overriding these variables.  Benny, any comments?
Comment 8 Benedikt Meurer editbugs 2006-04-12 20:59:44 CEST
Unfortunately, I don't remember what it was, but there was a reason why we added this libxfce4util instead of the startup script (we should have used bugzilla more extensively...).

Btw. your script is not going to work, as () spawns a subshell and so XDG_DATA_DIRS="@datadir@" is set in the subshell, which exits immediately.
Comment 9 Brian J. Tarricone (not reading bugmail) 2006-04-12 21:02:13 CEST
Heh, whoops.  Good call.  Being sloppy.

Is there a significant problem of having the same directory in XDG_DATA_DIRS twice?  Maybe that had something to do with it...?
Comment 10 Benedikt Meurer editbugs 2006-04-12 21:03:39 CEST
libxfce4util simply ignores the second appearance of the same directory (which is especially important when listing resources). Not sure about other software.
Comment 11 Brian J. Tarricone (not reading bugmail) 2006-04-12 21:10:14 CEST
Ok, then to be safe, how about this:

if test -z "$XDG_DATA_DIRS"; then
    XDG_DATA_DIRS="@datadir@"
elif ! echo "$XDG_DATA_DIRS" | grep -q '@datadir@'; then
    XDG_DATA_DIRS="@datadir@:$XDG_DATA_DIRS"
fi

Of course that doesn't handle the case where there's a component of XDG_DATA_DIRS that contains @datadir@ as a substring.  Maybe -- grep -q -E '(^|:)@datadir@(:|$)' -- or maybe that only works in perl.
Comment 12 Benedikt Meurer editbugs 2006-04-12 21:15:47 CEST
grep -q '@datadir@' doesn't work properly in all cases. For example, the GNOME ports install data to /usr/X11R6/share/gnome, so if Xfce is installed in /usr/X11R6/share, it will not be added.

Maybe we should just apply oliviers initial patch and see what breaks. IIRC I used a similar patch for the installer.
Comment 13 Brian J. Tarricone (not reading bugmail) 2006-04-12 21:24:28 CEST
Right... which is why I suggested the more complex grep expression.
Comment 14 Olivier Fourdan editbugs 2006-04-12 21:51:22 CEST
Frankly, adding grep to the equation is a lot of bloat IMHO, so either it works with a simple solution or we give it up.
Comment 15 Dotan Kamber 2006-05-03 23:22:45 CEST
Just a small note -
I had to add /usr/local/share to the XDG_DATA_DIRS (this is a fresh svn r21463 installed with defaults)

Dotan
Comment 16 Olivier Fourdan editbugs 2006-05-11 19:08:31 CEST
Benny, Brain, could we agree on the fix for that bug? Why not trying the patch and see how it goes for beta2? It's better than status quo IMHO... What do you think?
Comment 17 Benedikt Meurer editbugs 2006-05-11 19:30:20 CEST
Go for it.
Comment 18 Olivier Fourdan editbugs 2006-05-11 19:43:10 CEST
Oki, done, let's see if that helps now ;)
Comment 19 Harold Aling 2007-09-23 19:49:04 CEST
(In reply to comment #18)
> Oki, done, let's see if that helps now ;)
> 

It probably did... ;)

Bug #1661

Reported by:
juha
Reported on: 2006-04-12
Last modified on: 2009-07-15

People

Assignee:
Xfce Bug Triage
CC List:
1 user

Version

Attachments

Set XDG_DATA_DIRS if not set (427 bytes, patch)
2006-04-12 20:09 CEST , Olivier Fourdan
no flags

Additional information