Apple

Apple's Mac OSX

International characters on OSX

NOTE: this is collected from some sites I can no longer find, so I can not take credit for this.

 

Longtime Mac users know that you can type characters with diacritical marks— for example, â, é, ì, ü, and ñ—by first typing the diacritic (which usually requires the use of the Option key) and then typing the letter. For example, to get ä, you press Option-U (to get the umlaut, or diaeresis) and then press A.

If you can’t remember all those key combos, you could use Mac OS X’s Keyboard Viewer to figure out which ones do what. But it can be a hassle to summon and then hide the Keyboard Viewer whenever you want a special character. Or you could try PopChar X (4.0/5.0; macworld.com/4659), the utility that lets you choose special characters from a drop-down menu; however, it’s probably overkill for most users.

An easier way is built right into Snow Leopard (Mac OS X 10.6). Launch System Preferences, open the Language & Text pane, and then open the Input Sources tab. In the list of input methods on the left, scroll down and enable U.S. International – PC. To make it easier to switch to this input method, choose Show Input Menu In Menu Bar.

That done, when you want to insert a character with a diacritic, choose U.S. International – PC from the Input menu on the menu bar and then create the character by typing a standard punctuation character followed by the letter:

  • To Get an Acute Accent (´) Type ’ (apostrophe) plus the letter; for example, ’e gives you é.
  • To Get an Accent Grave (`) Type ’ (accent grave, or backtick) plus the letter; for example, ’o gives you ò.
  • To Get an Umlaut, or a diaeresis (¨) Type "(quotation mark) plus the letter; for example, "u gives you ü.
  • To Get a Caret (ˆ) Type ^ plus the letter; for example, ^a gives you â.
  • To Get a Tilde (˜) Type ~ plus the letter; for example, ~n gives you ñ.


To type a stand-alone diacritic followed by a vowel without creating a character with a diacritic on top of it, follow the diacritic with a space; that will disable the automatic replacement.

 

Hacking: 

Compiling nghttp2 on OSX with HomeBrew

I was going to compile nghttp2 on my MBP, using homebrew, but ran into issues right off the bat. In particular, the XML2 and zlib installations were causing me grief, and I had to do some brew shenanigans to get it to work:

$ brew tap homebrew/dupes
$ brew install homebrew/dupes/zlib
$ brew link --force zlib
$ brew install libxml2
$ brew link --force xml2

After this, build worked as expected:

$ autoreconf -if
$ ./configure --prefix=/opt/local # or some such
$ make && sudo make install

Hacking: 

Adding spacers to the OSX Dock

This is a nifty little hack, to make the Dock have some spacers in it. Mine looks like

To do this, run the following commands inside a terminal, one for each spacer you want added to the Dock:

% defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'

Now, these only become visible and, more importantly, movable after you restart the Dock. E.g.

% killall Dock

Hacking: 

Mouse follow focus on OSX

I always configure my Linux window managers to use "focus follow mouse". Meaning, whichever window the mouse cursor is currently in, gets keyboard focus. This is not possible with most OSX applications, because of how they've designed the UI with one Menu bar etc. However, at least two apps. Terminal and the X11 server, can be configured to do just this. It's really easy:

$ defaults write org.x.X11 wm_ffm -bool true
$ defaults write com.apple.terminal FocusFollowsMouse -string YES

 

Hacking: 

xclip

I use more and more remote X11 applications now, and VNC, since I switched my desktop (and laptops) over to use OSX entirely. This works great. Sometimes, it can be a bit annoying to get the clipboards and selections to synchronize across windows, or even to just get a portion of a file from e.g. X11 into OSX. There's a very useful command for this, that can easily be scripted (and bound) to some key of your own preference. For example, to take the clipboard from an X11 app, and put it into the main selection buffer, you can do

$ xclip -o -selection clip | xclip -i

To put a portion of  a file into both the clipboard and the primary selection:

$ head -10 /etc/group | tee >(xclip) >(xclip -sel clip) > /dev/null

You can obviously make some convenience macros around this, or simple shell scripts.

Hacking: 

Slow SSH into my MacOSX laptop

I recently upgraded Michelle's old laptop to MacOSX 10.6 (for myself), and noticed it would take excruciating long to ssh or scp into the box. As it turns out, sshd tries to do a reverse lookup of my internal IPs, which fails. I don't know why it takes it so long to realize this (the reverse lookup ought to fail immediately), but I found a simple solution. In /etc/sshd_config, I simply turned off DNS lookups:

UseDNS no

Hacking: 

No Airport Card message on Dell Mini 9? This fixed it!

Yesterday I booted up my Dell Mini 9, and got the message "No Airport Card installed". Huh. It's running Mac OS X, but haven't had a problem at all. After trying a few things, and doing some searches, this finally worked for me (original thread at http://www.mydellmini.com/forum/dell-mini-9-os-x-discussion/...):

Hacking: 

Finally a Solution for Mac OS X printing from Lightroom 2 to an Epson R1800 printer!

I had this nice long post about this problem, but hit the wrong key and accidentally opened up my bookmarks, and lost the entire post, so here's the short story:

If you're having problems (like I was) getting decent prints from Lightroom 2 to an Epson R1800, try this: download the European Epson driver. I saw that solution posted on the Adobe forums, and I couldn't believe it worked, but it did!

Hacking: 

iPhone

This is a collection of small hacks and tips for the iPhone. Nothing fancy, but helps me keep track of these things, and maybe someone will find them useful too.

Hacking: 

Pages

Subscribe to RSS - Apple