From 4042f1622a4f3a26270894dfcb0da7ff4f6d3745 Mon Sep 17 00:00:00 2001 From: Tslil Clingman Date: Tue, 11 Aug 2015 14:45:21 +0200 Subject: Tings --- runas | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 runas (limited to 'runas') diff --git a/runas b/runas new file mode 100755 index 0000000..f9b11f6 --- /dev/null +++ b/runas @@ -0,0 +1,16 @@ +#!/usr/bin/env sh + +# Simple script to run graphical programme as a separate user + +# The user is expected to have a script $1 which does, roughly: +# cd /home/USERNAME +# cp /tmp/.Xauthority . +# shred -v /tmp/.Xauthority +# DISPLAY=:0 some/graphical/programme + +cp .Xauthority /tmp +chmod 606 /tmp/.Xauthority + +su -l $1 -c /home/$1/$1 + +rm /tmp/.Xauthority -- cgit v1.2.3