This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

get-x11-display-device.sh

By: a guest on Jan 9th, 2013  |  syntax: Bash  |  size: 0.33 KB  |  views: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash
  2.  
  3. display=$1
  4. name=$2
  5. data=$3
  6. #echo "display: $display name: $name data: $data"
  7.  
  8. # don't overwrite user's ~/.Xauthority
  9. xauthority_file=$(mktemp)
  10. XAUTHORITY=$xauthority_file
  11.  
  12. xauth -q add $display $name $data
  13.  
  14. /usr/lib/ConsoleKit/ck-get-x11-display-device --display $display | tr -d '\n'
  15.  
  16. rm -f $xauthority_file
clone this paste RAW Paste Data