From 28e3cfb98a1d44f636cbdcc408b47077baa4c9ee Mon Sep 17 00:00:00 2001 From: mid-kid Date: Sat, 31 Dec 2016 13:51:19 +0100 Subject: [PATCH] Move XDG_RUNTIME_DIR definition to /etc/profile.d --- etc/X11/xinit/xinitrc.i3 | 7 ------- etc/profile.d/xdg-runtime-dir.sh | 6 ++++++ rocket-config.SlackBuild | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 etc/profile.d/xdg-runtime-dir.sh diff --git a/etc/X11/xinit/xinitrc.i3 b/etc/X11/xinit/xinitrc.i3 index a620c20..407a989 100644 --- a/etc/X11/xinit/xinitrc.i3 +++ b/etc/X11/xinit/xinitrc.i3 @@ -24,13 +24,6 @@ if [ -f $usermodmap ]; then xmodmap $usermodmap fi -# Set XDG_RUNTIME_DIR -if [ ! "$XDG_RUNTIME_DIR" ]; then - export XDG_RUNTIME_DIR="/run/user/$(id -u)" - mkdir -p "$XDG_RUNTIME_DIR" - chmod 700 "$XDG_RUNTIME_DIR" -fi - # Start the window manager: if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then exec ck-launch-session /usr/bin/i3 diff --git a/etc/profile.d/xdg-runtime-dir.sh b/etc/profile.d/xdg-runtime-dir.sh new file mode 100644 index 0000000..84e2a32 --- /dev/null +++ b/etc/profile.d/xdg-runtime-dir.sh @@ -0,0 +1,6 @@ +# Create/Set XDG_RUNTIME_DIR +if [ ! "$XDG_RUNTIME_DIR" ]; then + export XDG_RUNTIME_DIR="/run/user/$(id -u)" + mkdir -p "$XDG_RUNTIME_DIR" + chmod 700 "$XDG_RUNTIME_DIR" +fi diff --git a/rocket-config.SlackBuild b/rocket-config.SlackBuild index c702276..b9c8cb0 100755 --- a/rocket-config.SlackBuild +++ b/rocket-config.SlackBuild @@ -30,7 +30,7 @@ find $CWD/etc -type f ! -name '*.orig' -printf '%P\n' | while read config; do done # Set some special permissions -chmod 755 $PKG/etc/rc.d/rc.* $PKG/etc/X11/xinit/* +chmod 755 $PKG/etc/rc.d/rc.* $PKG/etc/X11/xinit/* $PKG/etc/profile.d/* cd $PKG /sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz