Go Back   The macosxhints Forums > OS X Help Requests > UNIX - General



Reply
 
Thread Tools Rate Thread Display Modes
Old 05-19-2010, 09:54 AM   #1
MasterSwitch
Triple-A Player
 
Join Date: May 2003
Location: UK
Posts: 156
Cool unix command to change monitor resolution ?

hi guys

i wanted a temporary fix to a monitor problem i have
we have a dvi output going to a dvi splitter with dvi and vga output
we have an apple monitor connected to the dvi spltter and
we have a samsung domestic tv connected to the vga output

we used to have a vga monitor and vga samsung connected and got output to both with this setup.

now the only way to watch tv from the computer on the samsung is to switch resolutions in system preferences.
as a temporary measure, it would be good write an apple script that either gui scripts or unix scripts the resolution to switch just by opening an apple script.

it seems the windowserver.plist holds the resolution info for the monitors
is there unix way to script this please ?

Many Thanks
__________________
Clive
G5 dual 2.5Ghz, 8.0Gig Ram, Raid0 partitioned 1.2Tb HD, Tiger 10.4.11
uptime record 2200Hours (3 Months)
Beginners 2 Advanced Rock Climbing Site
Amazing Sudoku Board
Fun Easy Diet
How 2 Create A vCard
Conquering Self Harm
MasterSwitch is offline   Reply With Quote
Old 05-24-2010, 11:14 PM   #2
robinwmills
Major Leaguer
 
Join Date: Sep 2007
Location: San Jose, CA, USA.
Posts: 290
This hint has Obj/C code that creates a command-line program. I built it on Snow Leopard and it seems to work. This tip dates from 2007 and uses APIs which are deprecated in 10.6.
http://www.macosxhints.com/article.p...90413120929454
__________________
Robin
http://clanmills.com
24" iMac, 17" Powerbook, Vaio Ubuntu/W7 Laptop.
robinwmills is offline   Reply With Quote
Old 05-25-2010, 05:59 AM   #3
MasterSwitch
Triple-A Player
 
Join Date: May 2003
Location: UK
Posts: 156
Question No Help :(

Quote:
Originally Posted by robinwmills
This hint has Obj/C code. I built it on Snow Leopard. This tip dates from 2007 and uses APIs which are deprecated in 10.6.

hi Robin

im not sure how im supposed to use obj/c in an applescript and im using Tiger
i read through your link but i dont really find it any use

sorry and thanks for trying
anyone else ?
__________________
Clive
G5 dual 2.5Ghz, 8.0Gig Ram, Raid0 partitioned 1.2Tb HD, Tiger 10.4.11
uptime record 2200Hours (3 Months)
Beginners 2 Advanced Rock Climbing Site
Amazing Sudoku Board
Fun Easy Diet
How 2 Create A vCard
Conquering Self Harm
MasterSwitch is offline   Reply With Quote
Old 05-25-2010, 07:25 AM   #4
robinwmills
Major Leaguer
 
Join Date: Sep 2007
Location: San Jose, CA, USA.
Posts: 290
Well, you asked for a UNIX solution and that's exactly what I provided.

I've built the Obj/C code for you on Tiger (ppc), so you can download it and put it into a directory on your path (for example /usr/local/bin). You'll probably have to use sudo to put it there:

sudo cp ~/Downloads/setgetscreenres /usr/local/bin/

http://clanmills.com/files/setgetscreenres

I believe it is possible to do this in AppleScript. There is an AppleScript Recorder on Tiger in /Applications/AppleScript/Script Editor.app. You should be able to record the actions when you open Sys Prefs and change the resolution.

My buddy renaultssoftware is an expert at this and I'll ask him to help you.
__________________
Robin
http://clanmills.com
24" iMac, 17" Powerbook, Vaio Ubuntu/W7 Laptop.

Last edited by robinwmills; 05-25-2010 at 08:56 AM. Reason: added download of built code.
robinwmills is offline   Reply With Quote
Old 05-25-2010, 09:00 AM   #5
tlarkin
League Commissioner
 
Join Date: Mar 2003
Location: Bay Area, CA
Posts: 11,351
There is a third party command line tool called cscreen, but it seems no longer supported or developed. I can find old versions on version tracker but no project site and they are all old versions.
__________________
sudo make me a sammich

http://www.tlarkin.com

"It just told me what I already knew, that I'm a great and amazing guy, didn't I tell you baby, I'm Zaphod Beeblebrox."
tlarkin is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 12:49 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.