New startede2 script which properly set XDG directories and

starts evoke as main service.
This commit is contained in:
Sanel Zukan 2007-09-03 12:34:20 +00:00
parent b571876fe6
commit d30d6f1776

View File

@ -1,79 +1,70 @@
#!/bin/sh #!/bin/sh
# $Id$
# #
# Main script responsible for starting and setting # $Id: startede.in,v 1.1.1.1 2005/03/04 15:44:41 karijes Exp $
# needed environment parts.
# #
# Part of Equinox Desktop Environment (EDE).
# Copyright (c) 2007 EDE Authors.
#
# This program is licensed under terms of the
# GNU General Public License version 2 or newer.
# See COPYING for details.
# Main script responsible for starting and setting needed environment parts.
# Details about XDG_XXX data and how they are set is at: # Details about XDG_XXX data and how they are set is at:
# http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html # http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
# Note: XDG_DATA_DIRS and XDG_CONFIG_DIRS are not currently used
# EDE_DATA_HOME is directory where user specific data are stored.
# If XDG_DATA_HOME is not present, default is "$HOME/.local/share"
if [ "$XDG_DATA_HOME" ]; then
EDE_DATA_HOME=$XDG_DATA_HOME
else
EDE_DATA_HOME="$HOME/.local/share"
fi
# EDE_CONFIG_HOME is directory where user configuration files are stored.
# If XDG_CONFIG_HOME is not present, default is "$HOME/.config"
if [ "$XDG_CONFIG_HOME" ]; then
EDE_CONFIG_HOME=$XDG_CONFIG_HOME
else
EDE_CONFIG_HOME="$HOME/.config"
fi
# EDE_CACHE_HOME is directory where applications should keep cached data.
# If XDG_CACHE_HOME is not present, default is "$HOME/.cache"
if [ "$XDG_CACHE_HOME" ]; then
EDE_CACHE_HOME=$XDG_CACHE_HOME
else
EDE_CACHE_HOME="$HOME/.cache"
fi
EDE_DATA_HOME="$EDE_DATA_HOME/ede"
[ -d $EDE_DATA_HOME ]; || mkdir -p $EDE_DATA_HOME
EDE_CONFIG_HOME="$EDE_CONFIG_HOME/ede"
[ -d $EDE_CONFIG_HOME ]; || mkdir -p $EDE_CONFIG_HOME
EDE_CACHE_HOME="$EDE_CACHE_HOME/ede"
[ -d $EDE_CACHE_HOME ]; || mkdir -p $EDE_CACHE_HOME
export $EDE_DATA_HOME
export $EDE_CONFIG_HOME
export $EDE_CACHE_HOME
PREFIX=@prefix@ PREFIX=@prefix@
XSSAVER=`which xscreensaver 2> /dev/null`
XSETROOT=`which xsetroot 2> /dev/null` if [ ! "$XDG_DATA_HOME" ]; then
XDG_DATA_HOME="$HOME/.local/share"
fi
if [ ! "$XDG_CONFIG_HOME" ]; then
XDG_CONFIG_HOME="$HOME/.config"
fi
if [ ! "$XDG_CACHE_HOME" ]; then
XDG_CACHE_HOME="$HOME/.cache"
fi
if [ ! "$XDG_DATA_DIRS" ]; then
XDG_DATA_DIRS="/usr/local/share:/usr/share"
fi
if [ ! "$XDG_CONFIG_DIRS" ]; then
XDG_CONFIG_DIRS="/etc/xdg"
fi
[ -d $XDG_DATA_HOME ]; || mkdir -p $XDG_DATA_HOME
[ -d $XDG_CONFIG_HOME ]; || mkdir -p $XDG_CONFIG_HOME
[ -d $XDG_CACHE_HOME ]; || mkdir -p $XDG_CACHE_HOME
export XDG_DATA_HOME
export XDG_CONFIG_HOME
export XDG_CACHE_HOME
export XDG_DATA_DIRS
export XDG_CONFIG_DIRS
PATH=$PATH:$PREFIX:$PREFIX/bin
export PATH
userresources=$HOME/.Xdefaults userresources=$HOME/.Xdefaults
sysresources=/usr/X11R6/lib/X11/xinit/.Xresources sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
if [ -f $sysresources ]; then if [ -f $sysresources ]; then
xrdb -merge $sysresources xrdb -merge $sysresources
fi fi
if [ -f $userresources ]; then if [ -f $userresources ]; then
xrdb -merge $userresources xrdb -merge $userresources
fi fi
PATH=$PATH:$PREFIX:$PREFIX/bin # set background inside X
export PATH XSETROOT=`which xsetroot 2> /dev/null`
# Set background inside X
if [ "$XSETROOT" ]; then if [ "$XSETROOT" ]; then
$XSETROOT -solid black $XSETROOT -solid black
fi fi
# Run xscreensaver if exists # start session
if [ "$XSSAVER" ]; then evoke --startup --autostart --log stdout
xscreensaver -nosplash &
fi
edewm &
eiconman &
etip &
eworkpanel