So my grad school gave me a free MacBook Pro 9.2, but I am a die-hard Linux fanboy. I thus gathered information and installed Arch on a MacBook:
Some boot keycodes
- Hold alt while booting to display the startup manager (you can select your boot device here).
- Hold ctrl while selecting a boot device (choose your EFI partition) to permanently boot from that one.
- Hold cmd+R while starting to start a recovery. If you have a OS X recovery partition, this is a recovery wizard (restore from time machine, reinstall OS X, disk utility). If you don’t, it starts a complete internet recovery ((almost?) restore factory defaults). It even restores your EFI NVRAM thingy, I think.
Some Mac OS X things
Download from here the files lrz.eduroam.profil.mobileconfig and lrz.vpn.profile.mobileconfig. Doubleclick them in OS X and enter your password a few times.
Arch Linux (dual boot with OS X) on a MacBook Pro 9.2
These two guides are gold, and in the following, I just highly summarized the procedure from here:
Also, the (long) Beginner’s guide and (condensed) Installation guide are awesome:
- From within OS X, Shrink your OS X partition to like 100GB.
- Don’t install rEFInd yet. I’d do that from within Arch later.
- Get a ‘‘wired’’ internet connection.
The normal Arch installation
Boot into Arch (USB stick), run cgdisk. Delete the OS X recovery partition, if you like. (leave the EFI partition intact!) Then create your Arch partition(s), set it to type “Linux”. Then:
Reboot. Without ‘‘alt’’ pressed, OS X will boot. With ‘‘alt’’ pressed, you can change your startup partition. To permanently change to another partition, hold ‘‘ctrl’’ while selecting one from this menu.
To make Arch instad of Mac the first entry in rEFInd
/boot/efi/EFI/boot/refind.conf, set default_selection to 2. Also, you can set timeout to 3.
Install the necessary packages
Make your ‘’’~/.bash_profile’’’ this:
Apple keyboard and trackpad
To make F1-F12 keys work permanently without pressing Fn, put this in
(For a temporary change or when it sometimes just doesn’t work after booting,
echo 2 > /sys/module/hid_apple/parameters/fnmode)
To disable the annoying accidental tap clicks, in
/etc/X11/xorg.conf.d/50-synaptics.conf, comment out the three “TapButton” lines:
Best to reboot now and log in as user (starting LXDE).
If umlauts are weird dead keys in xterm (but not in Firefox), re-check your locale.gen and .conf, and generate them, reboot. I did the “turning it off and on again” and it worked then. Weird.
b43-firmware from the AUR. (Necessary commands:
makepkg -s and
~/.config/openbox/lxde-rc.xml, add these lines for Ctrl-Alt-T to open a terminal and Ctrl-Alt-F to open a file manager:
Install your user software
Install dropbox from the AUR. Set it up. Afterwards, delete
~/.config/autostart/dropbox.desktop (because you already put a delayed start call in your ~/.xinitrc). TODO: This autostart file gets restored automatically. Why?
pacman -S the following packages:
- glhack (or AUR’s nethack-x11[-patch] if it tickles your fancy)
Install emacs-ess from the AUR.
Configure your software
~/.emacs (this is probably only relevant for me. I saved a shared config file for all my computers on Dropbox):
Add icons in your Openbox quickstart bar:
- Lxterminal (but remember the shortcut Ctrl-Alt-T)
For thunderbird, you have to create a manual entry (TODO/auto-appeared after a thousand reboots).
Set your email accounts in thunderbird.
- AdBlock Plus
- HTTPS Everywhere
- Reddit Enhancement Suite
For dual monitors, get a display port adapter and start arandr, the GUI for xrandr.
Eduroam in NetworkManager
Following this guide (Use TTLS/PAP): http://www.lrz.de/services/netz/mobil/802_1x/802_1x-linux-ubuntu/
- Automatically connect to this thing
- SSID: eduroam
- MTU: automatic
- Wi-Fi Security
- Sec: WPA&WPA2 Enterprise
- Auth: Tunneled TLS
- Anon: firstname.lastname@example.org
- Cert: /etc/ssl/certs/Deutsche_Telekom_Root_CA_2.pem
- Inner: PAP
- User: [me]@campus.lmu.de
- Enter the password
Because of some bug, you have to enter the password manually every time for now. It’s weird. A solution is described here. Summary: Edit your
/etc/NetworkManager/system-connections/eduroam\ TTLS file’s [802-1x] section. Delete the line password-flags=1
- Install cups and hplip (for HP printers)
systemctl enable cups.servicefrom the console and restart (or do
systemctl start cups.serviceadditionally instead).
- Browse to http://localhost:631/ and add printers manually (enter IP etc.), otherwise you might print to random printers in your network.
sudo pacman -S xf86-input-wacom
- Plug in the USB tablet
- Restart X so it recognizes it
xsetwacom --list devices
- To display all possible options:
xsetwacom --get "Wacom Graphire2 4x5 stylus" all- or
- Relative cursor position (put these in a shell script):
xsetwacom --set "Wacom Graphire2 4x5 stylus" Mode Relative
xsetwacom --set "Wacom Graphire2 4x5 eraser" Mode Relative
- Arch wiki: Wacom, it has info on how to automate that.
For cursor speed see here:
xinput list, Write down the IDs of your devices (e.g. 16)
xinput watch-props 11, Write down ID of Device Accel Constant Deceleration (e.g. 270)
Then, change deceleration from 1 to 2.5: (for each input device)
xinput set-prop 16 270 2.5
Install ‘arandr’ and click together a layout. Save the shellscript and put it in ~/bin/2screens.sh or whatever.
Misc things and issues
To disable the trackpad when a mouse is plugged in and avoid accidental weird emacs scrolls / copy-pastes (from here):
emacs-color-theme requires xorg-fonts-100dpi, which screws up firefox fonts also. Do this to fix: