pandora-skel: Update defailt .xinitrc
authorDavid-John Willis <John.Willis@Distant-earth.com>
Mon, 30 Nov 2009 10:32:45 +0000 (10:32 +0000)
committerDavid-John Willis <John.Willis@Distant-earth.com>
Mon, 30 Nov 2009 10:32:45 +0000 (10:32 +0000)
recipes/pandora-system/pandora-skel.bb
recipes/pandora-system/pandora-skel/.xinitrc

index 8169e8f..c647f2d 100644 (file)
@@ -5,7 +5,7 @@ COMPATIBLE_MACHINE = "omap3-pandora"
 ## /etc/skel is used by Shadow's useradd so you really have that installed for this to make sense ;)
 #RDEPENDS = "shadow"
 
 ## /etc/skel is used by Shadow's useradd so you really have that installed for this to make sense ;)
 #RDEPENDS = "shadow"
 
-PR = "r0"
+PR = "r3"
 
 SRC_URI = " \
           file://.xinitrc \     
 
 SRC_URI = " \
           file://.xinitrc \     
index f085bab..bfda473 100644 (file)
@@ -1,7 +1,42 @@
-#HACK: Run Xsession.d in this place :-o
+# This script sets up a few XDG vairables for the OpenPandora (to find the Xfce defaults etc.)
+# and then launches the chosen user session (mainly Xfce or PMenu)
 
 
-SYSSESSIONDIR=/etc/X11/Xsession.d
-run-parts $SYSSESSIONDIR
+# The makes sure that /etc/xdg/op is added to the vairables to get the defaults for the OP.
+if test "x$XDG_CONFIG_DIRS" = "x"
+then
+  XDG_CONFIG_DIRS="/etc/xdg/op:/etc/xdg"
+else
+  XDG_CONFIG_DIRS="/etc/xdg/op:$XDG_CONFIG_DIRS:/etc/xdg"
+fi
+export XDG_CONFIG_DIRS
+
+if test "x$XDG_DATA_DIRS" = "x"
+then
+  XDG_DATA_DIRS="/usr/local/share:/usr/share:@_datadir_@"
+  XDG_DATA_DIRS="/etc/xdg/op:/usr/local/share:/usr/share:@_datadir_@"
+else
+  XDG_DATA_DIRS="$XDG_DATA_DIRS:@_datadir_@"
+  XDG_DATA_DIRS="/etc/xdg/op:$XDG_DATA_DIRS:@_datadir_@"
+fi
+export XDG_DATA_DIRS
+
+# Use FreeDesktop XDG dir vars to put user data in non hidden dirs to make
+# maintaince easier for users.
+# These really should be set somewhere better but for now this will work.
+export XDG_DATA_HOME=$HOME/Applications/Data
+export XDG_CONFIG_HOME=$HOME/Applications/Settings
+export XDG_CACHE_HOME=$HOME/Applications/Cache
+
+#HACK: Run Xsession.d from here :-o
+#Wrong, wrong, wrong but it works and sorting out OE's X server chain is not going to happen right now.
+
+if [ -d /etc/X11/Xsession.d ]; then
+    for i in `ls /etc/X11/Xsession.d/` ; do
+        if [ -r "/etc/X11/Xsession.d/$i" ] && expr "$i" : '^[[:alnum:]_-]\+$' > /dev/null; then
+            . "/etc/X11/Xsession.d/$i"
+        fi
+    done
+fi
 
 # The following variable defines the session which is started if the user
 # doesn't explicitely select a session in SLiM.
 
 # The following variable defines the session which is started if the user
 # doesn't explicitely select a session in SLiM.