Hi!
I use my custom launcher script for running an emulator, because I also freeze the XBMC process, load XBOX controller driver etc.
Everything works fine at first:
1) 'Advanced Launcher' puts XBMC in windowed mode
2) 'Advanced Launcher' runs my custom user script
3) When emulator is running, I press the 'Eject' button on my remote which sends an ALT+F4 command to Ubuntu so it kills the emulator
4) Userscript continues with reverting everything
5) XBMC is back at windowed and should now go back to fullscreen automatically
However, sometimes it stays windowed, but mostly it goes back to fullscreen.
The issue is, when I stays windowed, I have to find my USB keyboard to press the key to put back to fullscreen, and I am trying to avoid this for the usability for my GF using XBMC a lot lately.
Could anyone help me fix this issue?
My custom user script (well commented):
Code:
#!/bin/bash
# [SECTION: System]
wmctrl -r "XBMC Media Center" -t 1 # Hide XBMC window
killall -STOP xbmc.bin # 'Freeze' XBMC process
# [SECTION: XBOX controller driver]
killall xboxdrv # Make sure it's not running before
xboxdrv --deadzone 4500 --force-feedback # Start new process before launch emulator
sleep 1 # Give xboxdrv a second to startup and create the device
# Run N64 emulator fullscreen at high res
mupen64plus --noosd --fullscreen --resolution 1920x1080 --gfx mupen64plus-video-glide64 "$1"
# [SECTION: XBOX controller driver]
killall xboxdrv # Kill the XBOX controller driver, no need for it anymore
# [SECTION: System]
killall -CONT xbmc.bin # 'Unfreeze' XBMC process
wmctrl -r "XBMC Media Center" -t 0 # Put window back in correct position