Xfce Forum

Sub domains
 

You are not logged in.

#1 2011-04-27 10:01:59

karhu
Member
Registered: 2011-04-27
Posts: 4

[Solved] Startxfce4 : value of $XDG_'s variables

Hi

In the script startxfce4 I wonder if another way for the initialization of $XDG_ .... could be find.
For example :
if test "x$XDG_CONFIG_DIRS" = "x"
then
  if test "x/etc" = "x/etc"; then
    XDG_CONFIG_DIRS="/etc/xdg"
  else
    XDG_CONFIG_DIRS="/etc/xdg:/etc/xdg"
  fi
else
  XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS:/etc/xdg"
fi

Where and to who may I write ? Thanks.

Karhu.

Offline

#2 2011-05-09 17:45:26

karhu
Member
Registered: 2011-04-27
Posts: 4

Re: [Solved] Startxfce4 : value of $XDG_'s variables

I so sorry, noboby was interessed by this.
Dosn't matter, I discard the subjet.

Karhu.

Offline

#3 2011-05-09 19:45:08

Nick
Dev
From: ~
Registered: 2005-02-17
Posts: 1,143
Website

Re: [Solved] Startxfce4 : value of $XDG_'s variables

Sorry I missed this, what exactly do you want to accomplish?

Offline

#4 2011-05-09 21:15:45

karhu
Member
Registered: 2011-04-27
Posts: 4

Re: [Solved] Startxfce4 : value of $XDG_'s variables

When I wrote in the first post, the initialization XDG's variables are not good it was from my point of view.
Look the test and the result of the else : XDG_CONFIG_DIRS="/etc/xdg:/etc/xdg". We got twice /etc/xdg directory.
I dont know why, may be is because the script comes from another one used for the build ? With some special variables as @data@... whose are changed during the process and not for it ?
I just wanted notice that, for me I changed a little bit my script to checkt the content of the variables with "awk" and add the standard directories, but only if need. If the variables are already completed I do nothing. But may be I'm wrong.
I suggested a change, but it's not very important, it is just more "pure". I think your are certainly some other troubles to solve and the new GTK3 to integrate before.

Karhu.

Last edited by karhu (2011-05-09 21:16:37)

Offline

#5 2011-05-10 08:19:25

Nick
Dev
From: ~
Registered: 2005-02-17
Posts: 1,143
Website

Re: [Solved] Startxfce4 : value of $XDG_'s variables

The script is generated at compile time, so therefore the check (we don't know the @sysconfdir@ during installation, but /etc/xdg should be part of XDG_CONFIG_DIRS.

Because if test "x/etc" = "x/etc"; then is always true, XDG_CONFIG_DIRS="/etc/xdg" will be set.

On some system however the code looks like this:

if test "x$XDG_CONFIG_DIRS" = "x"
then
  if test "x/opt/xfce/etc" = "x/etc"; then
    XDG_CONFIG_DIRS="/etc/xdg"
  else
    XDG_CONFIG_DIRS="/etc/xdg:/opt/xfce/etc/xdg"
  fi
else
  XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS:/etc/xdg"
fi

So it looks a bit strange and a useless check on your system, but it doesn't matter.

If XDG_CONFIG_DIRS is already set and contains /etc/xdg, the script will add another /etc/xdg, that could be improved, maybe you can paste your version.

The original version is here (before being parsed into startxfce4 during make): http://git.xfce.org/xfce/xfce-utils/tre … rtxfce4.in

Offline

#6 2011-05-10 21:22:39

karhu
Member
Registered: 2011-04-27
Posts: 4

Re: [Solved] Startxfce4 : value of $XDG_'s variables

Sorry I'm late.
A lot of thanks for your explanation. If I understand well, the "problem" becomes from my distribution that have no /opt/xfce/etc directory.

OK, it is better to have twice /etc/xdg instead of none. I'll do with. The subjet is closed for me now.

Karhu.

Offline

#7 2011-05-11 17:56:04

Nick
Dev
From: ~
Registered: 2005-02-17
Posts: 1,143
Website

Re: [Solved] Startxfce4 : value of $XDG_'s variables

If the sysconfig dir is /etc/, no duplicates should show up in XDG_CONFIG_DIRS, unless XDG_CONFIG_DIRS is already set before running startxfce4.

Offline

Board footer

Powered by FluxBB