All well and good and I have a nice blank XWindow displayed on my TV (the 2nd monitor). I then fire up XBMC from a terminal on the PC monitor using:

DISPLAY=:0.1 xbmc

XBMC fires up quite nicely on the TV however I can no longer use the main PC monitor/mouse/keyboard as XBMC on the TV screen seems to have focus. I was hoping to have XBMC running on the TV and let the kids use the MCE remote whilst I get on with my work on the PC monitor.

Does anyone have any idea how to overcome this? I'm presuming there's some xorg.conf fun and games needed but I've no idea where to start to be honest.

First, you'll need to install a clever little application called "wmctrl", which permits us change certain window properties, such as hiding the border or making a window full-screen.

sudo apt-get install wmctrl

Next, you'll need the following script. I've called it "xbmc-fs" for obvious reasons. It's pretty self explanatory, so take a look at the comments. The only thing you might need to change is the fifth line where the display is selected. In my case, the TV is on display 1, so that's what I've set in the file. If yours is on display 0, then simply change the 1 to a 0 on line 5.

The only other thing you'll have to do is make sure that you've set XBMC to the same resolution as the monitor/TV it will be displayed on, otherwise certain events can trigger the XMBC window to revert to the size that's set in it's configuration.