Browse Source

xap/awesome: Added wrapper script.

slackware-14.2
Damien Goutte-Gattat 8 years ago
parent
commit
7826b059be
  1. 17
      xap/awesome/awesome.SlackBuild

17
xap/awesome/awesome.SlackBuild

@ -1,6 +1,6 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2011,2012,2013 Damien Goutte-Gattat
# Copyright (C) 2011,2012,2013,2014 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
@ -86,6 +86,21 @@ make install DESTDIR=$PKG
find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \
xargs strip --strip-unneeded 2> /dev/null
# Create a wrapper script to ensure that a D-Bus session bus is
# set before launching Awesome...
cat > $PKG/usr/bin/startawesome <<EOF
#!/bin/sh
if [ -z "\$DBUS_SESSION_BUS_ADDRESS" ]; then
exec dbus-launch --exit-with-session /usr/bin/awesome
else
exec /usr/bin/awesome
fi
EOF
chmod 755 $PKG/usr/bin/startawesome
# and have the desktop file refers to that wrapper script
sed -i 's/Exec=awesome/Exec=startawesome' $PKG/usr/share/xsessions/awesome.desktop
# Protect configuration file
mv $PKG/etc/xdg/awesome/rc.lua $PKG/etc/xdg/awesome/rc.lua.new

Loading…
Cancel
Save