Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-11-22 01:41:16

mastro
Member
From: Germany
Registered: 2020-11-22
Posts: 6

xfconfd and settings of distribution / XML-Config files

Hello,

i'm trying to build an custom desktop configuration based on Debian/XFCE (4.14).

I have set XDG_CONFIG_DIR and XDG_DATA_DIR in /etc/XSessions.d/scriptname
but xfconfd doesn't load the config from these XDG-Locations.

With "strace xconfd" i have found that xfconfd loads only the Configuration from the user-home and
from /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/....

How can i order xfconfd that he load default Config from another directory  like /etc/xdg/DISTRIBUTIONNAME/xfce4/xfconf/xfce-perchannel-xml/....?

The setting of die XDG-Variables doesn't work with xfconfd. Why?

Thank you!

Offline

#2 2020-11-22 02:42:35

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 7,120

Re: xfconfd and settings of distribution / XML-Config files

Hello and welcome.

mastro wrote:

I have set XDG_CONFIG_DIR ...

Checking to see if this is a typo - it should be XDG_CONFIG_DIRS.

If not a typo, after you log in, what is XDG_CONFIG_DIRS set to?

Offline

#3 2020-11-22 13:59:05

mastro
Member
From: Germany
Registered: 2020-11-22
Posts: 6

Re: xfconfd and settings of distribution / XML-Config files

ToZ wrote:

Hello and welcome.

mastro wrote:

I have set XDG_CONFIG_DIR ...

Checking to see if this is a typo - it should be XDG_CONFIG_DIRS.

If not a typo, after you log in, what is XDG_CONFIG_DIRS set to?

Sure! I have used XDG_CONFIG_DIRS. My Typo-Error ist in the Forum-Post.

XDG_CONFIG_DIRS=/etc/xdg/xlinux:/etc/xdg
XDG_DATA_DIRS=/usr/share/xlinux:/usr/share/xfce4:/usr/local/share ...
"xlinux" is the name for my testing.
I have set these variables with export in an /etc/X11/Xsession.d-Script.

If I copy the xfce-perchannel-xml-Files to /etc/xdg/xfce4/ everything works fine.

In the XML-Files I would set few Default Settings. Panelposition and Plugins works.
But the Setting from "thunar.xml", "xfce4-session.xml" and "xfce4-desktop.xml"  will not be loaded.

Offline

#4 2020-11-22 16:35:21

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 7,120

Re: xfconfd and settings of distribution / XML-Config files

mastro wrote:

XDG_CONFIG_DIRS=/etc/xdg/xlinux:/etc/xdg
XDG_DATA_DIRS=/usr/share/xlinux:/usr/share/xfce4:/usr/local/share ...

This looks right.

I have set these variables with export in an /etc/X11/Xsession.d-Script.

If I copy the xfce-perchannel-xml-Files to /etc/xdg/xfce4/ everything works fine.

These files are executed based on order of filename. What order is it in? Does it help if you move it up in the order (maybe something the new user xfce generation is done before this script is executed (before your new XDG_CONFIG_DIRS is set).

Another option is to use /etc/skel for your default files. That way, when a new user is created, it will use the files in that directory as the original set of configuration files.

Offline

#5 2020-11-22 17:00:02

mastro
Member
From: Germany
Registered: 2020-11-22
Posts: 6

Re: xfconfd and settings of distribution / XML-Config files

These files are executed based on order of filename. What order is it in? Does it help if you move it up in the order (maybe something the new user xfce generation is done before this script is executed (before your new XDG_CONFIG_DIRS is set).

I'm not sure what you mean.
Do you mean the Order of paths in the variable XDG_CONFIG_DIRS, or that the name "xlinux" comes after "xfce"?
The names of the XML-Files are static and not to change.

Or:
Do you mean the that xfconfd are loaded by an Xsession.d-Script before I set the variable XDG_CONFIG_DIRS?

Another option is to use /etc/skel for your default files. That way, when a new user is created, it will use the files in that directory as the original set of configuration files.

I know this solution, but this solution only affected to new users and provide sometimes error while installation because the files are provided by more than one DEB-Package.

A few years ago, i have a DEB-Postinstall-Script used which copy the Files to /etc/xdg/xfce4, but these solution is dirty.

I think it is an error that xfconfd doesn't load all XML-Configuration files in order auf XDG_CONFIG_DIRS.
But who can say that i'm wrong thinking? What is my mistake?

Offline

#6 2020-11-22 19:18:30

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 7,120

Re: xfconfd and settings of distribution / XML-Config files

mastro wrote:

These files are executed based on order of filename. What order is it in? Does it help if you move it up in the order (maybe something the new user xfce generation is done before this script is executed (before your new XDG_CONFIG_DIRS is set).

I'm not sure what you mean.
Do you mean the Order of paths in the variable XDG_CONFIG_DIRS, or that the name "xlinux" comes after "xfce"?

The names of the XML-Files are static and not to change.

Or:
Do you mean the that xfconfd are loaded by an Xsession.d-Script before I set the variable XDG_CONFIG_DIRS?

If you look at the contents of /etc/X11/Xsession.d, you'll notice that all of the files are prefixed with a number. This indicates the order that the file is processed. I don't use Debian so I'm not sure of the specifics, but maybe one of those scripts initiates the process of copying over the config files before you set your new XDG_CONFIG_DIRS variable.


Another option is to use /etc/skel for your default files. That way, when a new user is created, it will use the files in that directory as the original set of configuration files.

I know this solution, but this solution only affected to new users and provide sometimes error while installation because the files are provided by more than one DEB-Package.
A few years ago, i have a DEB-Postinstall-Script used which copy the Files to /etc/xdg/xfce4, but these solution is dirty.

I think it is an error that xfconfd doesn't load all XML-Configuration files in order auf XDG_CONFIG_DIRS.
But who can say that i'm wrong thinking? What is my mistake?

This is an interesting comment. When Xfce is first started for a new user, it looks into ~/.config/xfce4 for config files. If it doesn't find them, it reaches back into the XDG_CONFIG_DIRS path to look for those files. Once found, it copies them to the user's ~/.config/xfce4 directory, and from then on in, it uses those. Any changes to the files in /etc/xdg or /etc/xlinux/xdg won't be processed if the files are found in ~/.config/xfce4. In fact, once a new user is created, that account will only ever use the files in ~/.config/xfce4 (unless you delete them), so to change settings for existing users, you need to individually change those config files.

I'm not sure how you were copying files to /etc/xdg/xfce4 that were then being processed by user accounts that already had those files in ~/.config/xfce4. Maybe Debian does something different?

Also it is odd that files you place in /etc/skel are being overwritten. The purpose of /etc/skel is for you to put specific custom files in. See https://www.debian.org/doc/manuals/debi … ts.en.html.

Offline

#7 2020-11-22 21:39:03

mastro
Member
From: Germany
Registered: 2020-11-22
Posts: 6

Re: xfconfd and settings of distribution / XML-Config files

Xsession.d-Scripts)
I know that these Script are run by numbers. I set XDG_CONFIG_DIRS in the last script.
I'm sure that xfconfd is loaded after these Scripts. Only DBUS will be started before.

For your information)
1. At creation of new user will be /etc/skel copied to the new user homedir.
2. At Login loads xfconfd the configuration from ~/.config/xfce4
3. XML-Files which not exists, will be loaded from /etc/xdg/xfce4

At first configurationchange from the User saves xfconfd the XML-Files to the Userhome (Point 2), not before!.
If i want reset the User-Settings: stop xfconfd and delete ~/.config/xfce4/xfconf/xfce-perchannel-xml/.

To point 3 is the Default-Settings from Distribution. This is also explaind in the documentation of XFCE/Debian.
There is also explaind the XDG-Vars. But if I change the XDG-Variables nothing changed at working from xfconfd.

Offline

#8 2020-11-23 00:48:50

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 7,120

Re: xfconfd and settings of distribution / XML-Config files

I've downloaded the debian ISO and spent some time looking at it, and I'm hitting the same wall as you. It isn't working for me either. I'm certain this used to work.

I've been looking at how xubuntu does this (they use an /etc/xdg/xdg-xubuntu base directory), but I haven't been able to figure it out yet . Perhaps you can send an email to the xfce4-dev mailing list to see if a developer can shed some light on this.

Offline

Board footer

Powered by FluxBB