2007-03-23 19:48:15 +03:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2007-09-03 16:34:20 +04:00
|
|
|
# $Id: startede.in,v 1.1.1.1 2005/03/04 15:44:41 karijes Exp $
|
2007-03-23 19:48:15 +03:00
|
|
|
#
|
2007-09-03 16:34:20 +04:00
|
|
|
# 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.
|
2007-03-23 19:48:15 +03:00
|
|
|
# Details about XDG_XXX data and how they are set is at:
|
|
|
|
# http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
|
|
|
|
|
2007-09-03 16:34:20 +04:00
|
|
|
PREFIX=@prefix@
|
2007-03-23 19:48:15 +03:00
|
|
|
|
2007-09-03 16:34:20 +04:00
|
|
|
if [ ! "$XDG_DATA_HOME" ]; then
|
|
|
|
XDG_DATA_HOME="$HOME/.local/share"
|
2007-03-23 19:48:15 +03:00
|
|
|
fi
|
|
|
|
|
2007-09-03 16:34:20 +04:00
|
|
|
if [ ! "$XDG_CONFIG_HOME" ]; then
|
|
|
|
XDG_CONFIG_HOME="$HOME/.config"
|
2007-03-23 19:48:15 +03:00
|
|
|
fi
|
|
|
|
|
2007-09-03 16:34:20 +04:00
|
|
|
if [ ! "$XDG_CACHE_HOME" ]; then
|
|
|
|
XDG_CACHE_HOME="$HOME/.cache"
|
2007-03-23 19:48:15 +03:00
|
|
|
fi
|
|
|
|
|
2007-09-03 16:34:20 +04:00
|
|
|
if [ ! "$XDG_DATA_DIRS" ]; then
|
|
|
|
XDG_DATA_DIRS="/usr/local/share:/usr/share"
|
|
|
|
fi
|
2007-03-23 19:48:15 +03:00
|
|
|
|
2007-09-03 16:34:20 +04:00
|
|
|
if [ ! "$XDG_CONFIG_DIRS" ]; then
|
|
|
|
XDG_CONFIG_DIRS="/etc/xdg"
|
|
|
|
fi
|
2007-03-23 19:48:15 +03:00
|
|
|
|
2007-09-03 16:34:20 +04:00
|
|
|
[ -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
|
2007-03-23 19:48:15 +03:00
|
|
|
|
2007-09-03 16:34:20 +04:00
|
|
|
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
|
2007-03-23 19:48:15 +03:00
|
|
|
|
|
|
|
userresources=$HOME/.Xdefaults
|
|
|
|
sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
|
|
|
|
|
|
|
|
if [ -f $sysresources ]; then
|
2007-09-03 16:34:20 +04:00
|
|
|
xrdb -merge $sysresources
|
2007-03-23 19:48:15 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f $userresources ]; then
|
2007-09-03 16:34:20 +04:00
|
|
|
xrdb -merge $userresources
|
2007-03-23 19:48:15 +03:00
|
|
|
fi
|
|
|
|
|
2007-09-03 16:34:20 +04:00
|
|
|
# set background inside X
|
|
|
|
XSETROOT=`which xsetroot 2> /dev/null`
|
2007-03-23 19:48:15 +03:00
|
|
|
if [ "$XSETROOT" ]; then
|
|
|
|
$XSETROOT -solid black
|
|
|
|
fi
|
|
|
|
|
2007-09-03 16:34:20 +04:00
|
|
|
# start session
|
|
|
|
evoke --startup --autostart --log stdout
|
2007-03-23 19:48:15 +03:00
|
|
|
|