Commit d0c9a079 authored by Jens Henrik Goebbert's avatar Jens Henrik Goebbert

create and set XDG_RUNTIME_DIR in xdg_profile_set.sh

parent fa72c54d
......@@ -52,7 +52,7 @@ fi
if [ ! -d ${XDG_CONFIG_HOME} ]; then
echo "XDG profile ${XDG_PROFILE} choosen the first time ... creating ${XDG_CONFIG_HOME}"
mkdir -p ${XDG_CONFIG_HOME}
# change default desktop directory from ${HOME}/Desktop to ${XDG_DATA_HOME}/Desktop
# change default desktop directory from ${HOME}/Desktop to ${XDG_DATA_HOME}/Desktop
# to enable profile-specific desktop icons
cp ${XDG_PROFILES_DIR}/${XDG_PROFILE}/config/user-dirs.dirs ${XDG_CONFIG_HOME}/
# add bookmarks file
......@@ -62,6 +62,13 @@ if [ ! -d ${XDG_DATA_HOME} ]; then
echo "XDG profile ${XDG_PROFILE} choosen the first time ... creating ${XDG_DATA_HOME}"
mkdir -p ${XDG_DATA_HOME}
fi
if [ ! -z "${XDG_RUNTIME_DIR}" ]; then
export XDG_RUNTIME_DIR=/tmp/${UID}-${DISPLAY}-${XDG_PROFILE}-runtime-dir
if [ ! -d ${XDG_RUNTIME_DIR} ]; then
mkdir "${XDG_RUNTIME_DIR}"
chmod 0700 "${XDG_RUNTIME_DIR}"
fi
fi
# always renew desktop icons, which linke to $XDG_PROFILES_DIR/...
# this might annoy users, who have removed the icons,
......@@ -77,7 +84,7 @@ for file in ${XDG_DATA_HOME}/Desktop/*; do
rm ${file}
fi
fi
done
done
# (link to all Desktop files, which are in XDG_CONFIG_DIRS)
IFS=:
for p in ${XDG_DATA_DIRS}; do
......@@ -108,7 +115,7 @@ for p in ${XDG_CONFIG_DIRS}; do
fi
done
# always renew gtk-bookmarks
# always renew gtk-bookmarks
if [ ! -d ${XDG_CONFIG_HOME}/gtk-3.0 ]; then
echo "XDG profile ${XDG_PROFILE} choosen the first time ... creating ${XDG_CONFIG_HOME}/gtk-3.0"
mkdir -p ${XDG_CONFIG_HOME}/gtk-3.0/
......@@ -127,7 +134,7 @@ for p in ${XDG_CONFIG_DIRS}; do
done
# replace env variables ${...} with their content
# - todo -
# - todo -
# link to .gtk-bookmarks for older file managers
if [ -L ${HOME}/.gtk-bookmarks ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment