GTK Applikation als anderen Benutzer starten

# script: run gtk application as another user 
# author: bert2002
# notes:


if [ -z "$1" ];then
	echo "$0 <application>"

COOKIE=$(xauth list | grep $(uname -n) | awk '{print $3}')
sudo su - $OTHERUSER -s /bin/bash -c "unset XAUTHORITY ; touch ~/.Xauthority ; DISPLAY=:0; export DISPLAY ; xauth add :0 . $COOKIE ; $1"

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.