Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Easily use Front Row on a second monitor (TV) Apps
Tiger only hintI use a TV in my living room as my Mac's second monitor. I have been searching for a way to get Front Row to come up on the TV, instead of my monitor. Normally I would open the Displays System Preferences panel and under the Arrangement tab, drag the menu bar to the second monitor, and then activate Front Row. When I was done, I had to drag the menu bar back to the first monitor. Not a very elegant solution.

I found a utility called cscreen which allows you to set a requested display to have the menu bar via the command line. Then I added the appropriate command into an AppleScript that gets called with my Keyspan remote. Result: Front Row in my living room with the push of one button! No more trips to the Display Preferences pane.

Here's the step by step solution:
  1. Download cscreen and place it in /usr/local/bin.

  2. Create the following AppleScript to be called via the remote of your choice:
    tell application "Terminal"
      do script "cscreen -s 2 -p; exit"
      delay 1.0
    end tell
    
    tell application "System Events"
      tell application "Front Row" to activate
      key code 53 using {command down}
      delay 0.5
      key code 53
    end tell
Quite the timesaver!
    •    
  • Currently 3.43 / 5
  You rated: 2 / 5 (7 votes cast)
 
[90,102 views]  

10.4: Easily use Front Row on a second monitor (TV) | 18 comments | Create New Account
Click here to return to the '10.4: Easily use Front Row on a second monitor (TV)' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Easily use Front Row on a second monitor (TV)
Authored by: Unsoluble on Dec 07, '05 12:15:05PM

Curious: Why the third and fourth lines of your activation script? I wrote one myself, also for a Keyspan, and it's exactly the same minus those two lines (i.e., it just activates FR then hits the 53) -- works just fine.

But anyway, thanks very much for the second screen tip -- been wondering about how to do this. :)



[ Reply to This | # ]
10.4: Easily use Front Row on a second monitor (TV)
Authored by: captain caveman on Dec 07, '05 12:47:34PM
I've got three screens... so this gets a little funnier.

I can't just swap between two monitors, and the listing order changes as you tweak the menubar, so I made the following change in order to make sure I select the proper monitor. (Fortunately, each has a different resolution... 1920 for the main LCD, 1024 for the second LCD, and 640 for the TV)


	do script "cscreen -s `cscreen | grep 1920 | awk '{print $1}'` -p"
The problem I have now is that this rearranges my screens in addition to moving the menubar... ie, the mouse doesn't move across the monitors in the order I expect.

Anyone know how to avoid this? Or how to rearrange the screens from command line?

[ Reply to This | # ]

10.4: Easily use Front Row on a second monitor (TV)
Authored by: ryanryan on Dec 07, '05 04:47:44PM

I have an iBook running screen spanning doctor so that I can use the seperate display as a second desktop. I've placed the cscreen in my ~/local/bin folder. When I run the applescript as shown in the article, Front Row starts on my primary monitor and the menubar remains on my primary screen. In the terminal I get this message:

Ryans-iBook:~ ryansimms$ cscreen -s 2 -p; exit
-bash: cscreen: command not found
logout
[Process completed]

It looks like maybe it can't find the cscreen program?
I'm not very fluent with command line stuff
-ryan



[ Reply to This | # ]
10.4: Easily use Front Row on a second monitor (TV)
Authored by: captain caveman on Dec 07, '05 05:00:51PM
Two things I'd check first

1) I'd

echo $path
and see if that folder is in your path. It's not in mine... so I doubt it.

2) If you're running tcsh, and that folder was in your path, you might have to run "rehash" to get tcsh to recognize the new command. (type ps... one of the items should show tcsh or bash...) I did the following to install mine

sudo cp cscreen /usr/local/bin/cscreen
rehash 


[ Reply to This | # ]
10.4: Easily use Front Row on a second monitor (TV)
Authored by: ryanryan on Dec 07, '05 05:49:36PM

got it, I didn't realize that you had to use the command line, not the finder, to install it (ignorance). I have it working, but is it supposed to revert to having my main monitor as the primary monitor after front row quits or do i need a "quit front row" script that also changes the monitor back?
thanks again
-ryan



[ Reply to This | # ]
10.4: Easily use Front Row on a second monitor (TV)
Authored by: fritzscorner on Dec 08, '05 10:45:55PM

I agree about reverting the primary display back. I did create a second script with only the display change option and it works but it doesn't return the display arrangement back to normal so I still have to manually change that. I did see on version tracker that the author didn't promise the arrangement will remain the same so I am not sure if there is an easy fix.



[ Reply to This | # ]
10.4: Easily use Front Row on a second monitor (TV)
Authored by: CajunLuke on Dec 11, '05 11:13:51AM

how do you add folders to your bash path?



[ Reply to This | # ]
10.4: Easily use Front Row on a second monitor (TV)
Authored by: barr104 on Dec 07, '05 07:08:38PM

I hope everyone realizes that in the display prefs where you can move your monitors around, you can also grab the menu bar and drag that to another screen. The screen with the menu bar will now be considered the primary monitor.



[ Reply to This | # ]
10.4: Easily use Front Row on a second monitor (TV)
Authored by: Aman on Dec 07, '05 09:50:20PM

Please reread the first paragraph of this hint.

Thanks,

Aman



[ Reply to This | # ]
10.4: Easily use Front Row on a second monitor (TV)
Authored by: theonlycore4 on Dec 08, '05 01:43:17PM

Is it possible to use the keyspan remote with Front Row in lieu of Apple's remote? I've been tinkering with Front Row on a G4 installed in my home theatre primarily as a music server- would love to use my keyspan remote to control it.

Please let me know what's necessary to set that up.

TIA.



[ Reply to This | # ]
10.4: Easily use Front Row on a second monitor (TV)
Authored by: Unsoluble on Dec 08, '05 03:57:14PM

Yeah, and it's pretty easy:

Open up Script Editor (/Applications/AppleScript) and type or paste this code, which is basically the same as what's in the hint here:

tell application "System Events"
tell application "Front Row" to activate
key code 53
end tell

Save that in your /Users/yourname/Library/Scripts folder (as a script, not an application), then open up your KeyspanDMR app and set one of the buttons to run that script. I use the "Cycle" button in the bottom left, cuz I don't use it for anything else. You might need to tweak the button commands for the Front Row app (in the DMR config), so that the arrow buttons do the right things; I think I had to change them from being Command-left-arrow to just left-arrow, for example. I think. Maybe not. :)

Anyway, that should be it. Once you're in Front Row, pressing the Cycle button will take you back up a menu level, and pressing the Stop button will exit FR completely.

Oh, and also: If you want to have FR activate without actually showing up in your Dock, you can do this:

Right/Control-click on the FR application, and pick Show Package Contents. In the Contents folder, open up the file "Info.plist" and change the value for the LSUIElement entry from "0" to "1"; save changes, and that should do the trick.



[ Reply to This | # ]
10.4: Easily use Front Row on a second monitor (TV)
Authored by: cxmnz on Jan 13, '06 10:01:14AM

Apologies for my ignorance, but I have been trying to find a way to do this since I got Front Row, this is exactly the solution I've been after. Only problem is that I've got no idea where to get started. How do I...

1. Put cscreen in usr/local/bin?
2. Set the apple script to run when I press the menu button on the remote?

Does this script return the menu bar to the primary monitor when front row closes?

Many Thanks!



[ Reply to This | # ]
10.4: Easily use Front Row on a second monitor (TV)
Authored by: Steev on Jan 29, '06 02:35:02PM

Does anyone know if this will work with the Keyspan connected throught an Airport Express? I have audio and video being sent to my home theater and would like a way to contol Front Row. I have tried the above method but have not been able to get it working? Maybe I am missing something or maybe this is just not possible. Thanks!



[ Reply to This | # ]
10.4: Easily use Front Row on a second monitor (TV)
Authored by: scarlisle on Feb 15, '06 04:47:00PM

Another solution that I came up with was to enable acess for assistive devices under Universal Access. I then created a script that just turns on monitor mirroring and then access front row once complete in front row you can have mirroring turned off and the original resolution will return. Just another way if this is easier.

tell application "Finder"
open document file "Displays.prefPane" of folder "PreferencePanes" of folder "Library" of folder "System" of startup disk
delay 1.5
end tell

tell application "System Events"
tell process "System Preferences"
tell window "Cinema HD"
tell tab group 1
click radio button "Arrangement"
end tell
end tell
end tell
end tell

tell application "System Events"
tell process "System Preferences"
tell window "Cinema HD"
tell tab group 1
tell group 1
click checkbox "Mirror Displays"
end tell
end tell
end tell
end tell
end tell

This is my first time creating an applescript so any thoughts would be greatly appreciated.



[ Reply to This | # ]
10.4: Easily use Front Row on a second monitor (TV)
Authored by: freezycold on Mar 02, '06 09:06:43AM

So how do I get this to work using the standard apple remote?
From what I can see this is all for the keyspan...

Thanks.



[ Reply to This | # ]
10.4: Easily use Front Row on a second monitor (TV)
Authored by: FunBoy50 on Nov 12, '06 05:01:35PM

I love the script, it works really well.

What i don't know is how i can get my KeySpan remote to run the script when i press the Menu button.

If anyone can tell me how to achieve this it'd make my day!



[ Reply to This | # ]
Simpler way with no extra tools:
Authored by: only_solutions on Dec 22, '09 02:32:10PM
For me with 10.6 Snow Leopard, this works and it needs no additional scripts or programs and no external tools:

- close any windows which you want to have preserved at their present size and location

- in the Displays control panel (tab Arrangement), temporarily move the menu bar to the screen where FrontRow is supposed to appear (this could change some of your window positions, that is why you should have closed these before)

- enter and then leave FrontRow again (it will appear on the selected display)

- you can now switch the menu bar back to your regular primary screen

- the All Messages log as visible in the Console application will then have a new message from FrontRow:

Start up render thread for display: 0x[hex ID]

(You can just search for display in that log to make this easier to find)

- convert that hex ID to decimal (for instance with one of the many calculator apps)

- in Terminal, enter this command:

defaults write com.apple.frontrow FrontRowUsePreferredDisplayID [decimal ID]

You're done. FrontRow will now appear on the intended display, even if it's not the primary one.

-

---
There are no problems...
Edited on Dec 22, '09 02:38:17PM by only_solutions


[ Reply to This | # ]
Simpler way with no extra tools:
Authored by: egayer on Jan 26, '10 12:20:40AM

Great Tip ! works fine on Leopard, I had to restart thought...

Thanks



[ Reply to This | # ]