Xfce Forum

Sub domains
 

You are not logged in.

#1 2016-03-31 15:30:18

jhgoebbert
Member
Registered: 2016-03-31
Posts: 4

default search paths for files mentioned in xfce4-desktop.xml

Hello XFCE-forum,

we would like to support multiple desktop profiles on a multi-user system and I try to make the settings as portable as possible.
That's why I wonder if it is possible to get rid of absoute paths in XFCE's xml files like

xfce4-desktop.xml
<property name="image-path" value="absolute-path-to-wallpaper" />

Where will XFCE search if I just put the wallpaper filename here? Are there any default paths?
It would be great, if XFCE would look somewhere in XDG_CONFIG* or XDG_DATA* directories.
Or (even better) can I use environment variables as part of the path?

For example, icons in .desktop-files do not need absolute paths. They are searched in $XDG_DATA_DIRS/icons (and some other places) on default.
It would be great, if something like this would be available in XFCE-xml files, too.

Best,
Jens Henrik

Offline

#2 2016-04-01 02:23:40

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,494

Re: default search paths for files mentioned in xfce4-desktop.xml

Hello and welcome.

Just did some testing and found:
1. The default location for wallpapers in the xfconf database (xml files) if a path is not specified is $HOME.
2. Specifying environment variables in the xfconf database for wallpaper locations doesn't work. Not sure if its xfconf or xfdesktop where the failure is. xfdesktop generates a "unable to load image" error message.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2016-04-01 08:36:01

jhgoebbert
Member
Registered: 2016-03-31
Posts: 4

Re: default search paths for files mentioned in xfce4-desktop.xml

Hi ToZ,

thank you very much for your answer.
I tested some other places too, but was expecting it to be any of the XDG base dirs.

It is good to know, that $HOME is used (this might mean, that XFCE just takes the "current" directory it is started from),
but as I cannot change $HOME for different login profiles a user wants to use, I have to stick with absolute paths.

It would be great, if XFCE would look first in $XDG_DATA_DIRS/wallpapers
(as specified by FreeDesktop.org https://www.freedesktop.org/wiki/DesktopThemeSpec)
if no path is given.

Best,
Jens Henrik

Offline

#4 2016-04-01 10:01:06

jhgoebbert
Member
Registered: 2016-03-31
Posts: 4

Re: default search paths for files mentioned in xfce4-desktop.xml

Hi ToZ,

I think I found the pice of code handling the default paths for XFCE resources.
Its the function _res_init in xfce-resource.c of libxfce4util:

https://sourcecodebrowser.com/libxfce4u … ce_8c.html

Best,
Jens Henrik

Offline

#5 2016-04-01 10:26:10

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,494

Re: default search paths for files mentioned in xfce4-desktop.xml

jhgoebbert wrote:

It would be great, if XFCE would look first in $XDG_DATA_DIRS/wallpapers
(as specified by FreeDesktop.org https://www.freedesktop.org/wiki/DesktopThemeSpec)
if no path is given.

If you're interested, you could create a bug report and attach a patch that adds that functionality. The other thing that you might want to look into is that when a wallpaper change is written back into the xfconf database, it always seems to be written back using its full path name.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#6 2016-04-01 12:54:13

jhgoebbert
Member
Registered: 2016-03-31
Posts: 4

Re: default search paths for files mentioned in xfce4-desktop.xml

Hi ToZ,

passed the infos to a bug-report, but I can not add a patch right now.
Thanks for your help.

Best,
Jens Henrik

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.022 seconds, 7 queries executed - Memory usage: 532.23 KiB (Peak: 533.07 KiB) ]