OSX Maverick: wintermute

From wikinotes


Adding Chimera bootloader to Grub2

This information is no longer accurate. See Wintermute Archlinux documentation under UEFI. The following article explains how I originally got OSX booting with grub-bios.

#### /etc/grub.d/40_custom

# append:
menuentry "OSX Mountain Lion" {
    set root='(hd1)'
    chainloader +1


we're chainloading the chimera bootloader, you don't need to specify the partition.

# update grub in linux
sudo update-grub

Core Setup


brew install caskroom/cask/brew-cask

brew install \
  zsh \
  git \
  tmux \
  bash \
  gcc \
  coreutils \
  findutils \
  w3m \
  vifm \
  ghc \
  cabal-install \
  homebrew/x11/dmenu \
  vim \
  macvim \
  Caskroom/cask/sublime-text \
  Caskroom/cask/osxfuse \
  grep \
  gawk \
  imagemagick \
  ffmpeg \

sudo port install feh


sudo scutil --set HostName wintermute  # set hostname


Add to /etc/shells

chsh -s /usr/local/bin/zsh


System Preferences > Sharing > Remote Login  # enable sshd
System Preferences > Audio > Alert Volume    # (slide to 0% so terminal audio bells are disabled)
System Preferences > Security & Privacy > Allow Apps Downloaded from (anywhere)


The below system should work with standard keyboards, my matias keyboard however needs a special fix. In the KeyboardMenu, set 'Capslock','Control' to 'No Action', then run the program seil, binding CapsLock to keycode 59, Control to keycode 55. Reboot. (capslock confirmed, uncertain about ctrl key to command key)

Swap Command/Ctrl, Capslock/Ctrl
After logout/re-login, this works both within OSX, and also for XQuartz (X11) applications without any xmodmap hackery.

Keyboard Menu

System Preferences > Keyboard
## (will make vim scroll more bearable)
## Key Repeat(fastest)
## Delay Until Repeat (fastest)
## Requires re-login

System Preferences > Keyboard > Modifier Keys
## CapsLock: Control
## Control: Command

#### Logout and log back in for MODIFIER-KEY changes to take effect.


defaults write com.apple.finder NSUserKeyEquivalents '{"Move to Trash"="\U007F";}'		## Bind 'Delete' to delete files in Finder


I haven't actually had success with this one yet, I currently have it disabled so that the above Ctrl/Capslock swap works correctly.

mkdir ~/Library/KeyBindings

#### ~/Library/KeyBindings/DefaultKeyBinding.dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more closely
match default behavior on Windows systems.  This particular mapping assumes
that you have also switched the Control and Command keys already.

This key mapping is more appropriate after switching Ctrl for Command in this menu:
Apple->System Preferences->Keyboard & Mouse->Keyboard->Modifier Keys...->
Change Control Key to Command
Change Command key to Control
This applies to OS X 10.5 and possibly other versions.

Here is a rough cheatsheet for syntax.
Key Modifiers
^ : Ctrl
$ : Shift
~ : Option (Alt)
@ : Command (Apple)
# : Numeric Keypad

Non-Printable Key Codes

Up Arrow:     \UF700        Backspace:    \U0008        F1:           \UF704
Down Arrow:   \UF701        Tab:          \U0009        F2:           \UF705
Left Arrow:   \UF702        Escape:       \U001B        F3:           \UF706
Right Arrow:  \UF703        Enter:        \U000A        ...
Insert:       \UF727        Page Up:      \UF72C
Delete:       \UF728        Page Down:    \UF72D
Home:         \UF729        Print Screen: \UF72E
End:          \UF72B        Scroll Lock:  \UF72F
Break:        \UF732        Pause:        \UF730
SysReq:       \UF731        Menu:         \UF735
Help:         \UF746

NOTE: typically the Windows 'Insert' key is mapped to what Macs call 'Help'.
Regular Mac keyboards don't even have the Insert key, but provide 'Fn' instead,
which is completely different.

"\UF729"   = "moveToBeginningOfLine:";                       /* Home                      */
"@\UF729"  = "moveToBeginningOfDocument:";                   /* Cmd  + Home               */
"$\UF729"  = "moveToBeginningOfLineAndModifySelection:";     /* Shift + Home              */
"@$\UF729" = "moveToBeginningOfDocumentAndModifySelection:"; /* Shift + Cmd  + Home       */
"\UF72B"   = "moveToEndOfLine:";                             /* End                       */
"@\UF72B"  = "moveToEndOfDocument:";                         /* Cmd  + End                */
"$\UF72B"  = "moveToEndOfLineAndModifySelection:";           /* Shift + End               */
"@$\UF72B" = "moveToEndOfDocumentAndModifySelection:";       /* Shift + Cmd  + End        */
"\UF72C"   = "pageUp:";                                      /* PageUp                    */
"\UF72D"   = "pageDown:";                                    /* PageDown                  */
"$\UF728"  = "cut:";                                         /* Shift + Del               */
"$\UF727"  = "paste:";                                       /* Shift + Ins               */
"@\UF727"  = "copy:";                                        /* Cmd  + Ins                */
"$\UF746"  = "paste:";                                       /* Shift + Help              */
"@\UF746"  = "copy:";                                        /* Cmd  + Help (Ins)         */
"@\UF702"  = "moveWordBackward:";                            /* Cmd  + LeftArrow          */
"@\UF703"  = "moveWordForward:";                             /* Cmd  + RightArrow         */
"@$\UF702" = "moveWordBackwardAndModifySelection:";          /* Shift + Cmd  + Leftarrow  */
"@$\UF703" = "moveWordForwardAndModifySelection:";           /* Shift + Cmd  + Rightarrow */

Autostart Programs

OSX has both a crontab, and a graphical autostart option. I'm backing up the crontab, so it doesn't require documentation here, but here is where/what I have autostarting on login:

### Preparation
# You cannot autostart programs that are in the 'Utilities' folder, however
# if you Rclick > Make Alias, then copy that alias to your Applications Folder
# you can Autostart it. Here are some of the preparations I had to make:

/Applications/Ulitites/X11 > Make Alias
Copy/Paste to /Applications/

#### Preferences > Users & Groups > will > LoginItems (tab)
* Applications/FinderPath
* Applications/X11 (Alias)



See terminal.app


iterm2 is the go-to OSX terminal. I'd rather use urxvt, or better still, suckless-st but this can be my crutch until I get sorted. https://www.iterm2.com/

mkdir /Users/will/.iterm2

iTerm > Preferences > General > (Check Load Preferences from custom folder or URL) > Save Settings to Folder
# Save Settings To Folder


# Install XQuartz
# http://xquartz.macosforge.org/landing/
sudo port install rxvt-unicode

enable root

On old versions of OSX, you need to enable the root account if you wanted to use sudo/visudo.

# prior to MountainLion




Xmonad compiles and runs, but only manages X11 windows.


#! /bin/sh
chmod +x ~/.xinitrc.d/90-xmonad.sh
sudo port install xft2
cabal update
LIBRARY_PATH=/opt/X11/lib:$LIBRARY_PATH cabal install X11			## install X11
cabal install xmonad
cabal install xmonad-contrib --flags="-use_xft"
cp /private/etc/X11/xinit/xinitrc ~/.xinitrc
chmod +w ~/.xinitrc


#comment out the line 'exec quartz-wm' and add PATH-TO-XMONAD/xmonad after it.
quartz-wm --only-proxy & # sync X11/OSX clipboards


See amethyst


https://osxfuse.github.io/                                                # install osxfuse
http://macntfs-3g.blogspot.com/2010/10/ntfs-3g-for-mac-os-x-2010102.html  # install ntfs3g