From 4927dc3a4b28fd738d6d00a55c850269aaaccb91 Mon Sep 17 00:00:00 2001 From: David-John Willis Date: Mon, 30 Nov 2009 10:32:45 +0000 Subject: [PATCH] pandora-skel: Update defailt .xinitrc --- recipes/pandora-system/pandora-skel.bb | 2 +- recipes/pandora-system/pandora-skel/.xinitrc | 41 ++++++++++++++++++-- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/recipes/pandora-system/pandora-skel.bb b/recipes/pandora-system/pandora-skel.bb index 8169e8f..c647f2d 100644 --- a/recipes/pandora-system/pandora-skel.bb +++ b/recipes/pandora-system/pandora-skel.bb @@ -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" -PR = "r0" +PR = "r3" SRC_URI = " \ file://.xinitrc \ diff --git a/recipes/pandora-system/pandora-skel/.xinitrc b/recipes/pandora-system/pandora-skel/.xinitrc index f085bab..bfda473 100644 --- a/recipes/pandora-system/pandora-skel/.xinitrc +++ b/recipes/pandora-system/pandora-skel/.xinitrc @@ -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. -- 2.39.2