
get-x11-display-device.sh
By: a guest on
Jan 9th, 2013 | syntax:
Bash | size: 0.33 KB | hits: 15 | expires: Never
#!/bin/bash
display=$1
name=$2
data=$3
#echo "display: $display name: $name data: $data"
# don't overwrite user's ~/.Xauthority
xauthority_file=$(mktemp)
XAUTHORITY=$xauthority_file
xauth -q add $display $name $data
/usr/lib/ConsoleKit/ck-get-x11-display-device --display $display | tr -d '\n'
rm -f $xauthority_file