01. Download and double click on '
cscreen.zip' (12 KB in size, freeware). 'cscreen' (56 KB in size) file will result.
-- One time installation procedure:
02. Launch 'Terminal' (in the '/Applications/Utilities/' folder).
03. Enter ...
open /usr/bin/
... and press the <return> key.
04. Drag 'cscreen' onto the opened 'bin' window. You will have to authenticate and enter an administrators' password to continue.
05. Close the 'bin' window.
-- Time to script.
06. Launch 'Script Editor' (in the '/Applications/AppleScript/' folder).
07. Copy the code below, and paste into the 'Script Editor' 'Untitled' window.
if (((word 16 of (do shell script "cscreen")) as number) ≠ 800) then
do shell script "cscreen -x 800 -y 600 -r 85"
else
do shell script "cscreen -x 1280 -y 1024 -r 85"
end if
... replacing the '800' of the first and second lines of code with the screen width you want at log in; replacing the '600' of the second line of code with the screen height you want at log in; replacing the '85' of the second line of code with the screen refresh rate you want at log in; and finally, replacing the '1280', '1024', and '85' with the desired respective screen width, screen height, and screen refresh rate you want at log out.
08. Save the code as an application.
09. Launch 'System Preferences' (in the '/Applications/' folder), click on 'Accounts', click on 'Login Items' tab.
10. Drag your created application onto the 'Login Items' list.
-- Example - if you want, at log in, the screen to be set to 1024 x 768 with a refresh rate of 100; and, at log out, the screen to be set to 800 x 600 with a refresh rate of 85 ...
if (((word 16 of (do shell script "cscreen")) as number) ≠ 1024) then
do shell script "cscreen -x 1024 -y 768 -r 100"
else
do shell script "cscreen -x 800 -y 600 -r 85"
end if
11. As far as 'when logging out'. You can drag the created application to the 'Dock' - where one can then click on the 'Dock' based application icon - to toggle the screen resolution; or, simply repeat Steps 06. through 10. for each account - this way the screen resolution is set as each account is logged in to.
-- Additional information.
-- Determining valid refresh rates for your Macs' monitor:
In 'Terminal' enter ...
cscreen -v
... and press the <return> key. Displayed in column form are the 'Index' (monitor number, '1' is typically - if only one monitor is in use), 'Depth' (8 = 256 colors, 16 = thousands of colors, 32 = millions of colors), 'Width' (screen width in pixels), 'Height' (screen height in pixels), and 'Refresh(Hz)' (screen refresh rate).
-- Disclaimer (?):
-- 'cscreen' continues to work through 'Tiger' (MacOS X 10.4.11). I have yet to try it on 'Leopard' (MacOS X 10.5.x).