! 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 !
"/usr/share" appears two times in XDG_DATA_DIRS; "/etc/xdg" appears two times...
Status:
RESOLVED: MOVED
Product:
Xfce4-session
Component:
General

Comments

Description ngheups243n 2018-07-20 20:06:34 CEST
$ uname -a
Linux xx 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ echo $XDG_DATA_DIRS |tr : '\n'
/usr/share/xubuntu
/usr/share/xfce4
/usr/local/share
/usr/share
/var/lib/snapd/desktop
/usr/share    <<<<< SECOND TIME

$ echo $XDG_CONFIG_DIRS |tr : '\n'
/etc/xdg/xdg-xubuntu
/etc/xdg
/etc/xdg    <<<<< SECOND TIME


I have tried to repair startxfce4:

$ diff -u /usr/bin/startxfce4 ~/temp/startxfce4
--- /usr/bin/startxfce4	2018-07-20 19:07:26.000000000 +0200
+++ /home/x/temp/startxfce4	2018-07-20 19:12:33.000000000 +0200
@@ -64,28 +64,12 @@
   BASEDIR="$XDG_CONFIG_HOME/xfce4"
 fi
 
-if test "x$XDG_DATA_DIRS" = "x"
-then
-  if test "x/usr/share" = "x/usr/local/share" -o "x/usr/share" = "x/usr/share"; then
-    XDG_DATA_DIRS="/usr/local/share:/usr/share"
-  else
-    XDG_DATA_DIRS="/usr/share:/usr/local/share:/usr/share"
-  fi
-else
-  XDG_DATA_DIRS="$XDG_DATA_DIRS:/usr/share"
-fi
+test -z "$XDG_DATA_DIRS" && XDG_DATA_DIRS=/usr/local/share:/usr/share
+x=":$XDG_DATA_DIRS:" && test "${x##*:/usr/share:*}" && XDG_DATA_DIRS="$XDG_DATA_DIRS:/usr/share"
 export XDG_DATA_DIRS
 
-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
+test -z "$XDG_CONFIG_DIRS" && XDG_CONFIG_DIRS="/etc/xdg"
+x=":$XDG_CONFIG_DIRS:" && test "${x##*:/etc/xdg:*}" && XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS:/etc/xdg"
 export XDG_CONFIG_DIRS
 
 if test "x$DISPLAY" = "x"


$ sudo cp ~/temp/startxfce4 /usr/bin/startxfce4


--rebooting--


O.K.:

$ echo $XDG_DATA_DIRS |tr : '\n'
/usr/share/xubuntu
/usr/share/xfce4
/usr/local/share
/usr/share
/var/lib/snapd/desktop

$ echo $XDG_CONFIG_DIRS |tr : '\n'
/etc/xdg/xdg-xubuntu
/etc/xdg
Comment 1 Theo Linkspfeifer editbugs 2019-06-18 15:28:21 CEST
Thank you for the report. Can you please provide a patch for the input file?

https://git.xfce.org/xfce/xfce4-session/tree/scripts/startxfce4.in
Comment 2 Git Bot editbugs 2020-05-26 00:49:37 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-session/-/issues/50.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #14546

Reported by:
ngheups243n
Reported on: 2018-07-20
Last modified on: 2020-05-26

People

Assignee:
Xfce Bug Triage
CC List:
4 users

Version

Version:
Unspecified

Attachments

Additional information