Howto toggle fullscreen screen#1 -> #2 ?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
seth.feinberg Offline
Member+
Posts: 146
Joined: May 2011
Reputation: 0
Post: #11
@theotherguy OK then, guess I have some reading to do Smile
find quote
seth.feinberg Offline
Member+
Posts: 146
Joined: May 2011
Reputation: 0
Post: #12
(2012-07-05 23:03)theotherguy Wrote:  
(2012-07-05 16:44)seth.feinberg Wrote:  My issue is that I'd really like to avoid actually messing with what the primary monitor is defined as.

That particular workaround doesn't affect any of the system settings related to the monitors. It's all solely XBMC settings that are used.

@theotherguy, finally got around to reading, and more importantly understanding, that post you linked to. Needed to google a few things here and there about BAT files but I think i understand it now. That bat file resides on your desktop and double clicking it just replaces the guisettings.xml, closes xbmc and reopens with the new settings, right?

Brilliant, but a bit more than what I need. I don't really need the active switching as much as I just want xbmc to ALWAYS run on Fullscreen 2 (honestly at this point I'd even settle for DISABLING Fullscreen #1). Is it possible to launch a bat file like yours with a hotkey? Seems like that would be easy with eventghost. Is XBMC completely closed down and reopened during the switching? How long does the process usually take? I realize this is probably too many questions and I'll just give it a whirl and see how it works.

One last thing, I saw this: http://amzn.com/B001RIMZUW and it offers another interesting solution which I think is actually my best bet, but its seems ultra expensive for what it accomplishes (though so does Ultramon).

Anyways thanks for your help and i'll report back with how it goes!

Edit: I gave it a shot and unfortunately couldn't get it to work. Re-reading what I wrote I guess I didn't fully understand how it worked. XBMC needs to be fully closed when you double click the bat file right? And then you just have 2 options for starting XBMC: one for just the TV and one for the monitor.

As a partial fix I put those specific <videoscreen> xml tags into my advancedsettings.xml and was able to get XBMC to default back to the TV upon a close and reopen, which I suppose will do for now, since it seems like even if I got your implementation working I'd still have to close xbmc and click on the appropriate link each time which is more than I'm willing to do. I'll keep hacking at it and see if I can figure anything else out, but I might give that Amzn link i posted about a whirl.
(This post was last modified: 2012-07-10 02:35 by seth.feinberg.)
find quote
theotherguy Offline
Junior Member
Posts: 22
Joined: Jan 2010
Reputation: 0
Post: #13
(2012-07-09 21:23)seth.feinberg Wrote:  That bat file resides on your desktop and double clicking it just replaces the guisettings.xml, closes xbmc and reopens with the new settings, right?
More or less...

Quote:I don't really need the active switching as much as I just want xbmc to ALWAYS run on Fullscreen 2 (honestly at this point I'd even settle for DISABLING Fullscreen #1).
Once set XBMC should stay on the same screen till you change it. If not then there is a problem somewhere. If you are using the nightlies, try updating to a more recent version. There was a problem a few weeks ago when XBMC would forget all the screen settings. Could very well be your problem.

Answering the rest might not be required based on the above, but i'm going to anyways :-)

Quote:Is it possible to launch a bat file like yours with a hotkey? Seems like that would be easy with eventghost.
Yes, using EventGhost if that's what you're used to, or just create a shortcut to the .bat file, then right-click > properties > add a shortcut key combination.

Quote:Is XBMC completely closed down and reopened during the switching?
XBMC can't be running when this is done. I should have added a few lines to stop it from running if XBMC is running. I only wrote it for myself so it's only used when I want to test something on my PC instead of the TV. I haven't made it foolproof enough for anyone to use yet.

Quote:How long does the process usually take? I realize this is probably too many questions and I'll just give it a whirl and see how it works.
1second. No problem with the questions. I find it's the best way to learn :-)

Quote:One last thing, I saw this: http://amzn.com/B001RIMZUW and it offers another interesting solution which I think is actually my best bet, but its seems ultra expensive for what it accomplishes (though so does Ultramon).
Not even sure what that does/is for. I don't think you need it for what you want.

Quote:XBMC needs to be fully closed when you double click the bat file right? And then you just have 2 options for starting XBMC: one for just the TV and one for the monitor.
since it seems like even if I got your implementation working I'd still have to close xbmc and click on the appropriate link each time which is more than I'm willing to do.
With a few extra lines added to the batch file, it can be made so that you can have two sets of hotkeys for different screens. When pressed xbmc will close, settings files changed and xbmc started again. Can probably make it a toggle as well, now that I think about it.

Once again, not the most elegant way of doing things, but it works (at least for me and for what I need). As Ned Scott pointed out, it seems someone just needs to figure out a way of implementing it, as most of the code is in XBMC. Till then hopefully some people might find my little batch file useful.
find quote
theotherguy Offline
Junior Member
Posts: 22
Joined: Jan 2010
Reputation: 0
Post: #14
Been playing around some more.

Ended up with a batch file that you can set to start on a particular screen all the time, and subsequent executions will exit XBMC and toggle to the other screen. Create a shortcut and add a hotkey if you want access that way as well.

I tried to make it as foolproof as possible. Tested on my own system and it works fine. But as user interaction is required to set it up no guarantees it will work straight up

As always make backups before trying it out. Although all files are only renamed, so you shouldn't ever lose any data.

NOTE: Any changes made to the GUI (eg. layouts) won't carry over between screens as they are using different files.

You need two copies of the guisettings.xml file. Note the settings should be different depending on your resolution. Best way is to run XBMC on the screen you want, exit and copy the guisettings.xml file.

The following are data excerpts from my setup just FYI:
To display on monitor - saved as guisettings.xml.mon
Code:
<videoscreen>
     <resolution>-1</resolution>
     <screen>0</screen>
     <screenmode>DESKTOP</screenmode>
</videoscreen>

To display on TV - saved as guisettings.xml.tv
Code:
<videoscreen>
     <resolution>0</resolution>
     <screen>1</screen>
     <screenmode>10192001080050.00000</screenmode>
</videoscreen>


Copy/paste the following to a txt file and save.
You need to edit the paths in the top section, so the batch knows where XBMC and the XBMC settings files are.
You also need to edit the section tagged :NotRunning_Start depending on what screen you want to start on all the time. As it is now, it will start on whatever screen it is already on. Add REM to disable or remove the REM to enable.

Code:
@echo off
REM change the following folder to your XBMC folder
SET XBMC_path=C:\xbmc
REM change the following folder to the XBMC userdata folder
SET XBMC_settings=C:\Users\user\AppData\Roaming\XBMC

:CheckForXBMC
TASKLIST | find /i "XBMC.exe" >nul
IF ERRORLEVEL 1 (GOTO :NotRunning_Start) ELSE GOTO :IsRunning_TOGGLE

:IsRunning_TOGGLE
TASKKILL /IM XBMC.exe

IF EXIST "%XBMC_settings%\*.tv" GOTO :tv
IF EXIST "%XBMC_settings%\*.mon" GOTO :mon

:NotRunning_Start
REM >>>>> NOTE: REM whichever lines are not required.
REM >>>>> MORE THAN ONE CANNOT BE ENABLED AT THE SAME TIME! <<<<<<

REM Use last screen setting (add REM before GOTO, if not using)
GOTO :Start

REM To always Start on Monitor (add REM before IF, if not using)
REM IF EXIST "%XBMC_settings%\*.mon" (GOTO :mon) ELSE GOTO :Start

REM To always Start on TV (add REM before IF, if not using)
REM IF EXIST "%XBMC_settings%\*.tv" (GOTO :tv) ELSE GOTO :Start

:mon
RENAME "%XBMC_settings%\guisettings.xml" guisettings.xml.tv
RENAME "%XBMC_settings%\guisettings.xml.mon" guisettings.xml
GOTO :Start

:tv
RENAME "%XBMC_settings%\guisettings.xml" guisettings.xml.mon
RENAME "%XBMC_settings%\guisettings.xml.tv" guisettings.xml
GOTO :Start

:Start
"%XBMC_path%\XBMC.exe"

:END

So you should have:
1 batch file saved somewhere, set with a hotkey through a shortcut (if desired & required if you want to run it from a button set on the remote)
2 copies of guisettings.xml. (1 should be named guisettings.xml and the other named guisettings.xml.tv or guisettings.xml.mon depending on it's contents. Both files should be in the XBMC userdata folder.

Any problems, let me know.
(This post was last modified: 2012-07-16 16:15 by theotherguy.)
find quote
seth.feinberg Offline
Member+
Posts: 146
Joined: May 2011
Reputation: 0
Post: #15
(2012-07-11 08:25)theotherguy Wrote:  Copy/paste the following to a txt file and save.
You need to edit the paths in the top section, so the batch knows where XBMC and the XBMC settings files are.
You also need to edit the section tagged :NotRunning_Start depending on what screen you want to start on all the time. As it is now, it will start on whatever screen it is already on. Add REM to disable or remove the REM to enable.

Code:
@echo off
REM change the following folder to your XBMC folder
SET XBMC_path=C:\xbmc
REM change the following folder to the XBMC userdata folder
SET XBMC_settings=C:\Users\user\AppData\Roaming\XBMC

:CheckForXBMC
TASKLIST | find /i "XBMC.exe" >nul
IF ERRORLEVEL 1 (GOTO :NotRunning_Start) ELSE GOTO :IsRunning_TOGGLE

:IsRunning_TOGGLE
TASKKILL /IM XBMC.exe

IF EXIST "%XBMC_settings%\*.tv" GOTO :tv
IF EXIST "%XBMC_settings%\*.mon" GOTO :mon

:NotRunning_Start
REM >>>>> NOTE: REM whichever lines are not required.
REM >>>>> MORE THAN ONE CANNOT BE ENABLED AT THE SAME TIME! <<<<<<

REM Use last screen setting (add REM before GOTO, if not using)
GOTO :Start

REM To always Start on Monitor (add REM before IF, if not using)
REM IF EXIST "%XBMC_settings%\*.mon" (GOTO :mon) ELSE GOTO :Start

REM To always Start on TV (add REM before IF, if not using)
REM IF EXIST "%XBMC_settings%\*.tv" (GOTO :tv) ELSE GOTO :Start

:mon
RENAME "%XBMC_settings%\guisettings.xml" guisettings.xml.tv
RENAME "%XBMC_settings%\guisettings.xml.mon" guisettings.xml
GOTO :Start

:tv
RENAME "%XBMC_settings%\guisettings.xml" guisettings.xml.mon
RENAME "%XBMC_settings%\guisettings.xml.tv" guisettings.xml
GOTO :Start

:Start
"%XBMC_path%\XBMC.exe"

:END

So you should have:
1 batch file saved somewhere, set with a hotkey through a shortcut (if desired & required if you want to run it from a button set on the remote)
2 copies of guisettings.xml. (1 should be named guisettings.xml and the other named guisettings.xml.tv or guisettings.xml.mon depending on it's contents. Both files should be in the XBMC userdata folder.

Any problems, let me know.

@theotherguy. Holy crap. Thank you so much. very very cool. I wish I'd seen you're posts a little earlier (stupid Tapatalk didn't give me a notification).

I actually bot one of those HDMI Detective's from Amazon and installed it last night (yay Prime!) and it really does work. Basically you hook it up between HDMI-connected TV and the Source and it saves the EDID information and "tricks" the source into thinking the HDMI is always connected even if its not. The problem I was describing of xbmc opening on the wrong monitor would happen when I turned off the TV or switched sources on my Denon while xbmc was running on "Fullscreen 2" (and my PC no longer recognized a second monitor). So its not strictly an xbmc problem, more of a video card/hdmi/general hardware problem (though I will fault xbmc for not having a simple "toggle fullscreen" button that actually cycles through all the available screens). With the HDMI Detective this is no longer an issue as the PC always thinks the TV is connected even when its not (I don't even get screen flickering when switching sources, which was every time). It actually is a pretty fantastic little doohickey. Not sure its worth the $85 price tag but it very simply does exactly what it claims to.

That being said however, I would still like an easy way to toggle around the fullscreen mode (not entirely sure why, but sounds funBig Grin). I don't have quite as much of an urgency as before, but I'll def try to implement this soon and report back. Thanks again for your help! As amazing as all the developers and team-xbmc is, its regular users like you willing to lend a helping hand to the less-experienced (i.e.dumber) user that makes xbmc so great (well at least contributes to its greatness, xbmc itself is pretty amazingSmile)
find quote
Post Reply