Advertisement
kavingray

XBMC - Start on second screen

Jan 29th, 2013
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #! /bin/bash
  2. # Launch XBMC in windowed mode, then use wmctrl to remove the titlebar
  3. # debian/ubuntu - apt-get install wmctrl
  4. # Works with nvidia TwinView (one big virtual display) Also with AMD catalyst drivers.
  5.  
  6. # Start XBMC without blocking this script
  7. xbmc &
  8.  
  9. # Wait for the XBMC window to appear
  10. status=0
  11. while [ $status -eq 0 ]
  12. do
  13.         sleep 1
  14.         status=`wmctrl -x -l | grep "XBMC Media Center" | wc -l | awk '{print $1}'`
  15. done
  16.  
  17. # Move XBMC to secondary monitor
  18. wmctrl -x -r XBMC Media Center.XBMC Media Center -e 0,1920,0,1440,900
  19.  
  20. # Force XBMC window to fullscreen
  21. wmctrl -x -r XBMC Media Center.XBMC Media Center -b toggle,fullscreen
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement