# How to force resolution on boot?



## ericwebb (Aug 27, 2008)

Hi,
Classic situation: I have a Mac Mini attached to a KVM via DVI -> VGA, and a VGA LCD attached to the KVM.  The KVM is preventing the Mini from detecting the LCD's resolution of 1680x1050 -- if I bypass the KVM, all works fine. 

The question is -- is there a way to force the Mini to use a particular display definition and resolution during boot-up?

Thanks,
Eric


----------



## fryke (Aug 28, 2008)

Maybe an AppleScript in the Login Items could do the trick?


----------



## ericwebb (Aug 28, 2008)

fryke said:


> Maybe an AppleScript in the Login Items could do the trick?



With what in it...?


----------



## ElDiabloConCaca (Aug 28, 2008)

You can also try a program called SwitchResX (available with a simple Google search).

This program uses "haxies" in order to accomplish what it does, and some people have reported problems using "haxies" or application enhancers in the past, so it's a "do at your own risk" kind of thing.

I, personally, have never encountered any problems with SwitchResX, though.


----------



## fryke (Aug 28, 2008)

```
on run
  do shell script "cscreen" (*get current resolution*)
  set screenResolution to the result
  
  if screenResolution contains "1280" then
    tell application "Stickies" to quit  
    (* because im tired of having 
    to organize all my stickies every time I switch*)
    (*switch to dual [tv/mon] display*)
    do shell script "cscreen -x 800 -y 600 -r 60"
  else if screenResolution contains "800" then
    (*switch to monitor display*)
    do shell script "cscreen -x 1280 -y 960 -r 100"
  end if
end run
```

This is taken from macosxhints.com's hint about setting resolution via AppleScript. You can, of course, adapt the script to your need, save it as an application and use it as a login item. That should do the trick.


----------

