Back to Silas S. Brown's home page
| X11 configuration
Mac magnification setup
OS X has built-in magnification under System Preferences / Universal Access
. In 10.8+ it's System Preferences / Accessibility / Zoom.
Here is my rhyme for remembering the keyboard shortcuts (on 10.8 the "invert colours" shortcut is disabled by default and needs to be enabled via System Preferences / Keyboard / Keyboard Shortcuts / Accessibility, and circa 10.11 they also disabled the zoom shortcuts by default and these now need to be re-enabled in the same way):
The Mac does not from Windows lift
these keys, so you should not press Shift.
But press Control, Command and Alt,
These three, with 8, a glare can halt.
And if the zoom be lacking whole,
then press these keys without Control.
For plus and minus take the same
as 8: the Alt and Option twain.
It appears that the image is processed as follows (at least in all versions up to 10.9):
- Text is anti-aliased onto a non-zoomed screen buffer
- The pixels are then mapped onto the larger zoomed buffer (which degrades quality if the zoom factor is not an integer)
- An additional "smoothing" step is optionally applied to the new
image (I don't know if this step has knowledge of the original pixels, but it
doesn't seem to have any knowledge of the original fonts).
The above steps acting in combination can blur the result.
So my suggested settings are:
- Make your preferred zoom level an integer. (In 10.8+ you have to click on More Options before you can set the preferred level.) That should at least stop the middle step from harming image quality.
- In the Zoom options, set Minimum Zoom to 0 and Maximum Zoom to your
preferred level (e.g. 2). That will allow you to switch between
0 and 2 with a single keypress. (You can still zoom further by holding down the
keys, but it's useful to be able to quickly get to a preferred integer level.)
- In the zoom options, try turning off "Smooth images",
especially if your text has been antialiased to start with.
- Where possible, turn off antialiasing altogether:
- try typing
defaults write .GlobalPreferences AppleAntiAliasingThreshold 100
in a Terminal
(it takes effect when you restart applications).
- In Terminal Preferences, try setting a font that has a bitmap version
(e.g. Andale Mono rather than Menlo); Terminal should then let you turn
off its own "Antialias text" box so you can use the bitmaps.
- If Terminal or xterm sometimes crashes, you could try alternatives like iTerm:
- In iTerm 1 (more stable but does not support speaking selected text), set fonts and colours under View / Session info and disable session-initiated window resizing under Bookmarks / Manage profiles / Terminal
- In iTerm 2 you have to edit the default profile in Profiles / Open Profiles to reach those settings, and don't tell it to report the terminal type as xterm-256color---if you do, any "screen" session you enter (perhaps on another host) may activate a bug that prevents command-line wrapping for the rest of the iTerm2 session---if you want to change the reported terminal type from xterm so your scripts know it's not Mac's X11, try xterm-color.
- In Zoom Options' screen movement section, I usually find the option called "So the pointer is at or near the center of the image" works better than the other two, unless you are working with tooltips, in which case set the mouse "tracking speed" (acceleration) fast so you can use the "when the pointer reaches an edge" setting for more control.
Ideally it would be possible to reduce the desktop's overall height and width to about 1.6 to 1.8 times that of the magnified area, to reduce the chances of "getting lost". This is possible on non-Mac systems with old-style X11 setups but does not seem to be available on the Mac without reducing the magnification factor. (You could do that in conjuction with a lower-resolution display mode to make up the size, but you'd still have to put up with non-integer scaling.)
Speak selected text
On OS X 10.5+ you can enable a keyboard shortcut to speak selected text
(defaults to Alt-Escape; press a second time to stop). This needs to be switched on in the text-to-speech preferences.
In 10.8, you need to take two additional steps to work around a bug: (1) change the keyboard shortcut (if you like the default, change it back again), (2) press "Play" to hear the voice's demo. The shortcut key will then work. (These additional steps were not needed in 10.5 through 10.7.)
The shortcut works in most native Mac applications, including Terminal, but not iTerm 1 or (some versions of?) Chrome.
- It works in iTerm 2 at least from the 2012-12-24 release (not the stable 2011 v1.0.0 edition---that version reads the entire window instead of the selected text). However I recommend using at least the 2013-01-22 release which also fixes some crashes.
- Chrome should still work via "Speech" / "Start speaking" from the context menu, but Alt-Escape might not work as it does in Safari.
- If Safari is slow, try regularly removing its cache files from Library/Caches/Safari or Library/Caches/com.apple.Safari (using the Terminal or a script, not from Safari's menus)---it seems some versions of Safari mistakenly let these files accumulate enough to slow it down
Here is a script to change the voice from the command line (useful if you work in several languages).
"Linuxify" the Mac command line
Here is a script to make the Mac more GNU/Linux-like
- Assigning all Mac applications to shell commands whenever possible
- Providing functions for wget, watch, umount, halt etc when these commands are not available
The script can be added to, or sourced from, your ~/.bashrc
You may also want my Emacs configuration.
Using Safari "Reader" with zoom
The "Reader" feature of Safari 5.0, 5.1 and 6.0 doesn't work well with zoom because it uses a fixed-width layout which can easily be too wide for the zoomed viewport; this was fixed in 6.1 but if you're stuck with an old version you can try this reader narrowing script
(requires administrator access to the machine) which also allows you to change the colours.
Safari 6.1's Reader fixed the width issue but doesn't allow colour changing (unless you invert the whole display in Universal Access); it doesn't respond to my stylesheets for low vision or to the above script.
Mac screen sharing with magnification
OS X has included VNC
"screen sharing" since 10.4, but 10.7 introduced a feature that can make it hard for non-Mac VNC clients if your desktop size is not 1280x1024.
- When a non-Mac VNC client connects, it is presented with a login screen. (Mac clients can use a proprietary protocol extension to bypass this screen.) This login screen measures 1280x1024.
- When you get through to the desktop, if the desktop dimensions are different (for example because you left a session running with different dimensions) then the VNC dimensions will be changed mid-session, which may crash your VNC client.
- You could make sure to log out before connecting to VNC, but then you're "stuck" with a 1280x1024 desktop size; any attempt to change this in Display Preferences can crash the client again.
One solution is to use an alternative VNC server, such as Vine (OSXVnc) which can be set to serve just one user session (can run on login with automatic login). Notes:
- Some versions of OSXVnc severely corrupt the display if your horizontal desktop resolution is not a multiple of 8. So if your monitor has an odd resolution like 1366x768, try setting the desktop to 1360x768 or to a lower multiple-of-8 resolution.
- If the Mac boots without a physical display attached to it, it might not "remember" that display's resolution (and if the resolution is unusual then it might not even be listed in Display Preferences) so you may have to settle for different dimensions in this situation.
- For keyboard layouts, it seems to work best to set your preferred layout at the VNC client, and leave both Vine Server and Mac's "Language & Text" set to "US". You might still find the Command and Option keys are switched around.
- Zoom does not work over VNC.
- If you can reduce your X11 resolution on the client side then you should be able to pan around the desktop even if your X server does not support panning (just set one low resolution and let TightVNC do the panning, perhaps putting nothing but the vncviewer -fullscreen command in your .xsession, but it's faster if your X server has full virtual desktop support).
If however your low-resolution mode is blurred then the magnified desktop will be blurred.
- Alternatively you could try running the viewer within a suitably-sized
X-based VNC server and perform software VNC
magnification, but this is slow unless you have a sufficiently capable
client. (Don't try doing that part of the processing on the Mac side---the
protocol overheads introduced by x11vnc magnification will slow it down even on a local
- Bizarre bugs can crop up such as some text in XQuartz/WINE windows not being displayed on the VNC client unless the text is selected. Sometimes moving the affected window can help, but not always.
(You could however use the normal X11 protocol over SSH if you are only using X applications.)
Fundamentally it's still best to use a Mac desktop by connecting the display directly to the machine.
All material © Silas S. Brown unless otherwise stated.