On Sat, 27, Jul, 2013 at 09:51:41AM +0200, Yves-Alexis Perez spoke thus..
> On ven., 2013-07-26 at 23:33 +0100, Mark Hymers wrote:
> > Hi, Not sure if this is exactly what the house-style for the XFCE
> > packages is, but patch attached.  Tested on my 4.10 install by checking
> > that adding a different applications/pdf entry to
> > /etc/xfce4/defaults.list changes the default MIME type.
> 
> Seems that 55xfce4-session is not in the patch?

Apologies - I sent the wrong version of the patch.

Mark

-- 
Mark Hymers <mhy at debian dot org>

"I've had people claim that they actually make the sun rise rise every
 morning.  I've offered to test them by shooting them.  So far all these
 people have not responded to my endeavours."
     James Randi on BBCi Live Chat
Index: xfce4-session.links
===================================================================
--- xfce4-session.links	(revision 0)
+++ xfce4-session.links	(revision 0)
@@ -0,0 +1 @@
+etc/xfce4/defaults.list usr/share/xfce4/applications/defaults.list
Index: defaults.list
===================================================================
--- defaults.list	(revision 0)
+++ defaults.list	(revision 0)
@@ -0,0 +1 @@
+[Default Applications]
Index: changelog
===================================================================
--- changelog	(revision 7818)
+++ changelog	(working copy)
@@ -1,9 +1,13 @@
 xfce4-session (4.10.1-2) UNRELEASED; urgency=low
 
+  [ Evgeni Golov ]
   * Correct Vcs-* URLs to point to anonscm.debian.org
 
- -- Evgeni Golov <evg...@debian.org>  Mon, 15 Jul 2013 21:55:58 +0200
+  [ Mark Hymers ]
+  * Add /usr/share/xfce4 to XDG_DATA_DIRS and add defaults.list symlink
 
+ -- Mark Hymers <m...@debian.org>  Fri, 26 Jul 2013 23:22:28 +0100
+
 xfce4-session (4.10.1-1) unstable; urgency=low
 
   * New upstream release.
Index: xfce4-session.dirs
===================================================================
--- xfce4-session.dirs	(revision 0)
+++ xfce4-session.dirs	(revision 0)
@@ -0,0 +1,2 @@
+etc/xfce4
+etc/X11/Xsession.d
Index: xfce4-session.install
===================================================================
--- xfce4-session.install	(revision 7818)
+++ xfce4-session.install	(working copy)
@@ -1,2 +1,4 @@
 usr
 etc
+debian/defaults.list etc/xfce4/
+debian/55xfce4-session etc/X11/Xsession.d/
Index: 55xfce4-session
===================================================================
--- 55xfce4-session	(revision 0)
+++ 55xfce4-session	(revision 0)
@@ -0,0 +1,18 @@
+# For XFCE, we add a directory to XDG_DATA_DIRS
+# to allow the admin to set, for example, defaults.list properly
+BASESTARTUP=$(basename "$STARTUP" | cut -d\  -f1)
+if [ "$BASESTARTUP" = x-session-manager ]; then
+    BASESTARTUP=$(basename $(readlink /etc/alternatives/x-session-manager))
+fi
+case "$BASESTARTUP" in
+  xfce4-session)
+    # We prepend /usr/share/xfce since its defaults.list actually points 
+    # to /etc so it is configurable.
+    if [ -z "$XDG_DATA_DIRS" ]; then
+      XDG_DATA_DIRS=/usr/share/xfce4:/usr/local/share/:/usr/share/
+    else
+      XDG_DATA_DIRS=/usr/share/xfce4:"$XDG_DATA_DIRS"
+    fi
+    export XDG_DATA_DIRS
+    ;;
+esac

Reply via email to