aboutsummaryrefslogtreecommitdiffstats
path: root/bin/lid-switch-action
diff options
context:
space:
mode:
authorDavid Runge <david.runge@frqrec.com>2014-02-20 02:16:36 +0100
committerDavid Runge <david.runge@frqrec.com>2014-02-20 02:16:36 +0100
commit0a0196482891ce4b02c2d8a03859c64128ee890b (patch)
tree4d2ed4340b093b058ba8ec08ecd7f44c4d24c03f /bin/lid-switch-action
parentbf21fecf2abb87f1cc155457fba6186516c7b6b3 (diff)
downloaddotfiles-0a0196482891ce4b02c2d8a03859c64128ee890b.tar.gz
dotfiles-0a0196482891ce4b02c2d8a03859c64128ee890b.tar.bz2
dotfiles-0a0196482891ce4b02c2d8a03859c64128ee890b.tar.xz
dotfiles-0a0196482891ce4b02c2d8a03859c64128ee890b.zip
Fixing script for root usage with exports of DISPLAY and XAUTHORITY
Diffstat (limited to 'bin/lid-switch-action')
-rwxr-xr-xbin/lid-switch-action3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/lid-switch-action b/bin/lid-switch-action
index 4b91d48..e8376aa 100755
--- a/bin/lid-switch-action
+++ b/bin/lid-switch-action
@@ -5,6 +5,9 @@
# Call this script from /etc/acpi/handler.sh (or other properly set up script
# for handling button/lid acpi event) with parameter 0 and 1 for close and open respectively
+export DISPLAY=:0
+export XAUTHORITY=/home/dave/.Xauthority
+
# Check whether first parameter is a number
re='^[0-9]+$'
if ! [[ $1 =~ $re ]]; then