If you use OS X on a Mac with a small screen—be that a 12-inch PowerBook G4 or a modified PC netbook of some sort—one of the biggest challenges is that OS X really wasn’t designed for small screens.
Some applications may not even install, due to checks on screen resolution. Today’s hint won’t help with those limitations, but it will help with those programs whose windows and dialogs may extend off the screen, making them impossible to use. How do such programs become usable? By forcing them to appear at a smaller-than-100 percent scale, thereby letting you see those parts of their windows that would otherwise be off the screen.
The secret to this hint is a little-known scaling factor (controlled by the
AppleDisplayScaleFactor variable) that can be applied either to every program you launch, or to individual programs on a case-by-case basis. By default, the scaling factor is 100 percent, meaning every program displays its windows at their normal sizes. But you can easily change this default to anything you like.
As an example, consider the following screenshot of Slashdot loaded on my 12-inch PowerBook G4.
On the left is the unaltered Slashdot site in Safari, and to see it all, I have to expand the browser window to cover my full screen. Even then, I can read just about two full stories. On the right is the same site, but after I applied a scaling factor of 78 percent to Safari. Notice that I can now read three full stories, and see a good portion of my desktop. The text is still easy to read, and I like the ability to see some of my desktop (or other program windows) while browsing.
This trick isn’t limited to Macs with small screens—it will work on any Mac running OS X 10.4 or newer. So if you ever run into a program that you feel is just taking up too much of your screen, feel free to use this hint to shrink it down to size—or alternatively, to make an app larger by increasing its scale factor (good for programs with horrendously small, non-adjustable fonts).
The first way to use the scaling factor is globally; when used in this manner, the scaling will affect every program launched after the execution of the command. If you choose to use this global version of the hint, make sure you undo it before you reboot (as explained below), as having scaling at something other than 100 percent may cause some issues during startup.
To change the system-wide scaling factor, open Terminal (in Applications -> Utilities), and enter the following command:
defaults write NSGlobalDomain AppleDisplayScaleFactor .78
After executing that command (it takes effect immediately, at least in 10.5), every application you launch will appear at 78 percent of its usual size. Why 78 percent? Based on my testing, it’s the size that I find to still be easily readable, and yet seems to make even troublesome program’s windows fit onscreen. Feel free to experiment, though, and try out different sizes to find one that suits your eye.
If you use this global method, you’ll want to reset the scale factor before rebooting. Do that in Terminal again, with this command:
defaults write NSGlobalDomain AppleDisplayScaleFactor 1
This simply resets the scale factor to 100 percent, so everything will be the right size during and after your reboot. To make global scaling simpler on my small-screened Macs, I created two simple Automator applications (using a ‘Do Shell Script’ action, with each version of the above commands being run), and then assigned these apps to the keyboard (Control-1 for 100 percent and Control-2 for 78 percent) using Spark.
To then remind myself of the current scale setting, I installed
GeekTool, which lets you (among other features) put the output of a Unix command in a window that floats above all the others. I set up GeekTool to display the output from this command:
defaults read NSGlobalDomain AppleDisplayScaleFactor
The output of that command is either .78 or 1.0 (the current value of the
AppleDisplayScaleFactor variable), depending on which command I’ve used most recently.
I then positioned the GeekTool window over the menu bar, giving myself an easy visual reminder of the current setting, as seen in the screenshot at right. This cuts down on the chances that I reboot with the scale factor set to anything other than 100 percent.
The other way to use the scaling factor is to apply it only to applications. For example, if I’m browsing the iTunes Store in iTunes on our 12-inch PowerBook G4, I still see a horizontal scroll bar, even with the window taking up the entire display. By applying the scale factor just to iTunes, I can force the window to scale down, thereby letting me see the entire store without scrolling.
To apply the scale factor to a single program, you need to find the name of that program’s preferences file. It will be in your user’s Library -> Preferences folder, and most are reasonably easy to find—just look for the program’s name as part of the longer names you’ll see in the directory list. As a general rule, the naming convention for preference files is com.company_name.app_name.plist. As you’ll see when browsing the Preferences folder, though, there are many exceptions to this rule.
One possible way to find oddly-named files is to set the folder to list view, order it by date modified, and then make a change to a given program’s settings. In theory, the preference file should then move to the top of the directory listing.
But let’s use a simple example. iTunes, for instance, stores its preferences in a file named com.apple.iTunes.plist. To apply the scale factor to iTunes, quit the program if it’s running, then execute this command in Terminal:
defaults write com.apple.iTunes AppleDisplayScaleFactor .78
Note that you drop the “.plist” portion of the name in the command. Again, feel free to use whatever scale factor you wish—and you can make a program bigger with values greater than one. Unlike the global command, it’s not important to reset an application-specific setting prior to rebooting. If you do want to reset it, though, just repeat the above command, but change the
If you use a Mac with a small screen, or even if you’re just occasionally annoyed by the size choices for a given app, modifying the scale factor can be a useful tool to keep in mind. It’s not perfect—visually, it’s a bit odd switching between apps, as everything changes size, including the menu bar. Other than that, though, I haven’t run into any problems, and I’ve been using this particular trick for a few years now.