You have my permission to kick me if you ever hear me saying that even an idiot could mess up an OS X system. If that’s the case I must be more than an idiot because I nearly rendered my Mac unusable, ably demonstrating how an urge to meddle and something less than a comprehensive knowledge can really land you in it.
When installing Tiger yesterday afternoon I’d accidentally installed about 1.5GB of language files that I was never going to need so a quick Google search found Monolingual, a utility to remove unwanted ones. I ran that to remove all languages except English, and then removed all input options except English and Japanese since that’s all I need. Everything works fine so I open up Firefox to go check some message boards, only to find that I can’t type anything. Certain keys which aren’t language-specific (control, command, option, shift, etc) work but no alphabet or number keys. I go into the language preferences and find that the English keyboard layout has gone. Shit.
I try everything I can think of to get it back – reinstall from the OS X disc, download it, etc – but as anyone familiar with OS X knows, it requires an admin password to do anything that affects the OS, including booting from a CD to reformat. I have no way to type my password which basically means I have no way to do anything about it. By now I’m very worried and having visions of sending my iBook away for a month again and losing all my data as Apple reformat it for me. I’m in a huge catch 22 because I need to install the input menu to type but I need to type my password to install the input menu.
The Monolingual site suggests in their FAQ that I can restore it by copying it from another Mac, and thankfully there’s a Powerbook in the other room, so I browse the the relevant location over the network and try to copy it over. No dice. I don’t have the priviledges to copy files from that directory. So I physically go to that computer and copy the files to their desktop, and since I won’t be able to copy them into that directory on my iBook over the network I run back and copy them to my desktop and then into the relevant folder. I need to type my admin password. Shit again.
Now back in the same conundrum as before, I start despondently searching the options for some way to save myself from myself. That’s when my saviour presented itself – Remote Login. I’m no UNIX god, but I certainly know enough to be able to copy some files through the Terminal. I enable it and rush to the computer with every appendage crossed, making it hard to rush very fast, and fire up Terminal on the Powerbook.
I type my password and it logs me in, and finally I can see the end of the tunnel.
sudo cp -r Keyboard\ Layouts /System/Library/
I get no errors so I assume all is well, and there is much rejoicing. I restart the iBook to be safe and open Firefox to try typing, and breathe one of the biggest sighs of relief of my life when it responds. I’ve lost Japanese support (I just did an archive and install of Tiger to get it back) but I managed to do it. Learn from my mistakes and don’t mess around with parts of operating systems that you don’t know about when they’re designed to be secure against people modifying them. It’s usually fixable but not without aging yourself ten years.