ede/data/startede.in
2009-02-09 09:14:13 +00:00

70 lines
1.5 KiB
Bash

#!/bin/sh
#
# $Id$
#
# 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:
# http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
PREFIX="@prefix@"
if [ "x$XDG_DATA_HOME" = "x" ]; then
XDG_DATA_HOME="$HOME/.local/share"
fi
if [ "x$XDG_CONFIG_HOME" = "x" ]; then
XDG_CONFIG_HOME="$HOME/.config"
fi
if [ "x$XDG_CACHE_HOME" = "x" ]; then
XDG_CACHE_HOME="$HOME/.cache"
fi
if [ "x$XDG_DATA_DIRS" = "x" ]; then
XDG_DATA_DIRS="/usr/local/share:/usr/share"
fi
if [ "x$XDG_CONFIG_DIRS" = "x" ]; 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
sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $userresources ]; then
xrdb -merge $userresources
fi
# set background inside X
XSETROOT=`which xsetroot 2> /dev/null`
if [ "$XSETROOT" ]; then
$XSETROOT -solid black
fi
# start session
evoke --startup --autostart --log stdout