49 lines
1.0 KiB
Bash
Executable File
49 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
name=`basename "$0"`
|
|
|
|
usage() {
|
|
echo "Usage: $name" >&2
|
|
exit 2
|
|
}
|
|
|
|
[ "$#" -gt 0 ] && usage
|
|
|
|
# basic Xmd environment variables
|
|
export XMD_SESSION_PID="$$"
|
|
export XMD_USERDIR="${HOME}/.Xmd"
|
|
mkdir -p "${XMD_USERDIR}"
|
|
|
|
# environment vars that X applications tend to expect
|
|
export XDG_CURRENT_DESKTOP=Xmd
|
|
export XDG_SESSION_DESKTOP=Xmd
|
|
export XDG_SESSION_TYPE=X11
|
|
|
|
# replicant path
|
|
export XMD_REPLICANT_PATH="/usr/lib/Xmd/replicants:/usr/local/lib/Xmd/replicants"
|
|
localReplicantDir="$HOME/.local/lib/Xmd/replicants"
|
|
if [ -d "$localReplicantDir" ]; then
|
|
export XMD_REPLICANT_PATH="$localReplicantDir:$XMD_REPLICANT_PATH"
|
|
fi
|
|
|
|
# load desktop configuration
|
|
xmd-load-xresources
|
|
appDefaults="${XMD_USERDIR}/app-defaults"
|
|
if [ -d "$appDefaults" ]; then
|
|
export XAPPLRESDIR="$appDefaults"
|
|
else
|
|
echo "$name cant find $appDefaults" >&2
|
|
fi
|
|
xmd-load-wallpaper
|
|
|
|
# run startup items
|
|
startupDir="$XMD_USERDIR/startup"
|
|
if [ -d "$startupDir" ]; then
|
|
export XMD_STARTUPDIR="$startupDir"
|
|
xmd-run-startup-items
|
|
else
|
|
echo "$name cant find $startupDir" >&2
|
|
fi
|
|
|
|
sleep infinity
|