2

I'm trying to write a bash script to launch XBMC in full screen mode using wmctrl. I'm using wmctrl so I don't lose the ability to alt-tab, etc and get back to the desktop/GUI if I need to, since running XBMC in full screen mode only allows me to go to TTY unless i exit the application.

my script looks like this:

#/bin/bash
xbmc --standalone
sleep 5
wmctrl -r XBMC Media Center -b toggle,fullscreen

XBMC launches fine, but won't go into fullscreen mode. However if i run wmctrl with the same parameters while XBMC is already open, it will toggle it into full screen mode.

Is there something wrong with my script? I don't really know much about linux, so any help would be appreciated!

kelvin
  • 63

1 Answers1

1

Try to run xbmc in the background:

#/bin/bash
xbmc --standalone &
sleep 5
wmctrl -r XBMC Media Center -b toggle,fullscreen

In your script, the "sleep 5" command only runs after you quit XBMC.

guthy
  • 146