Difference between revisions of "Talk:Xmonad/Using xmonad on Apple OSX"

From HaskellWiki
Jump to navigation Jump to search
 
Line 5: Line 5:
 
== Leopard ==
 
== Leopard ==
   
  +
These instructions have been tested on a blank but fully updated system (04/04/09).
=== Installing Xmonad on OSX Leopard ===
 
* ghc: You can get from haskell.org/ghc, MacPorts, or Fink. Fink has an older version of ghc -- one that will work with xmonad (for now?), but will make baby xmonad cry.
 
* X11 lib: Get from hackage.haskell.org, build using the standard Cabal steps. Make sure that Xinerama gets detected in the configure step. If you see a "present but not compiled" warning, that might be okay (it worked for me). --I don't remember having to do this step
 
* -- I'll put in a step about installing Cabal
 
* xmonad: Get from hackage.haskell.org, build using the standard Cabal steps.
 
   
=== Updating X.org ===
+
=== Install xmonad ===
 
==== Installing GHC ====
I recommend updating X.org. The development version includes features such as fullscreen support. It is likely that a Leopard update will eventually make this step unnecessary. The latest version can be found at macosforge http://xquartz.macosforge.org/trac/wiki .
 
  +
* Install xcode, this can be found on the OSX install disk; it can also be downloaded [http://developer.apple.com/technology/Xcode.html from apple] (you will have to sign upto a free developer account).
  +
* Download and install [http://haskell.org/ghc/ ghc].
  +
  +
==== Installing Cabal ====
  +
* Download and extract Cabal install from http://www.haskell.org/cabal/download.html
  +
* In a terminal: <pre>$ cd ''Cabal install directory''; ./bootstrap.sh</pre>
  +
* Edit your path to contain ~/.cabal/bin
  +
* This can be achieved by adding <pre>PATH=$PATH:~/.cabal/bin</pre> to ~/.profile
  +
* Open a new shell (the path variable will only take effect on new shells).
  +
  +
* Update cabal <pre>$ cabal update</pre>
  +
* Install xmonad <pre>$ cabal install xmonad</pre>
  +
  +
=== Install dmenu (optional but recommended) ===
  +
* Download and extract dmenu from http://tools.suckless.org/dmenu
  +
* <pre>$ cd ''dmenu directory'' ; sudo make install</pre>
  +
  +
=== Updating X11 ===
  +
The version of X11 shipped with Leopard (04/04/09) does not support going fullscreen on xmonad key combinations. I recommend updating X11. It is likely that a Leopard update will eventually make this step unnecessary.
  +
Download and install the latest version from [http://xquartz.macosforge.org/ macosforge].
   
 
=== Configuring Your .xinitrc to Run XMonad ===
 
=== Configuring Your .xinitrc to Run XMonad ===
Line 18: Line 34:
 
write:
 
write:
 
<pre>
 
<pre>
source ~/.bash_profile
 
 
export USERWM=`which xmonad`
 
export USERWM=`which xmonad`
 
exec /usr/X11/lib/X11/xinit/xinitrc
 
exec /usr/X11/lib/X11/xinit/xinitrc
Line 24: Line 39:
 
to ~/.xinitrc
 
to ~/.xinitrc
   
  +
Alternatively, if this doesn't work (because you haven't updated X11):
Make sure your PATH variable is set up correctly in ~/.bash_profile. Xmonad and dmenu should be in the path. Anything you want to launch from dmenu should be in the path. The relevant part of my .bash_profile is here (although not all the paths may be applicable to you)
 
  +
write:
 
<pre>
 
<pre>
  +
export USERWM=`which xmonad`
PATH="/usr/local/bin":$PATH
 
  +
exec $USERWM
PATH="/usr/local/sbin":$PATH
 
PATH="/opt/local/bin:/opt/local/sbin":$PATH
 
PATH="/sw/soylatte16-i386-1.0.3/bin/":$PATH
 
PATH="/Users/chris/.cabal/bin":$PATH
 
PATH="/opt/local/libexec":$PATH
 
export PATH
 
 
</pre>
 
</pre>
  +
to ~/.xinitrc
  +
 
Make sure your PATH variable is set up correctly in ~/.profile. Xmonad and dmenu should be in the path. Anything you want to launch from dmenu should be in the path.
   
 
=== Configuring ===
 
=== Configuring ===
*If you are using a recent version of xorg the menu bar shouldn't get in the way (fullscreen or otherwise). The Dock however will, I recommend hiding the Dock or always working in fullscreen mode.
+
* The menu bar shouldn't get in the way (fullscreen or otherwise, updated or standard X11). The Dock however will, I recommend hiding the Dock or always working in fullscreen mode.
* You can start X11 (and Xmonad) by running any program that uses X, or by running X11.app. If you run X11.app a default program is started. You can configure this program by running <pre> $ defaults write org.x.X11 "app_to_run" "gnome-terminal" </pre> (replace gnome-terminal with a program of your choice).
+
* You can start X11 (and Xmonad) by running any program that uses X, or by running X11.app. If you run X11.app a default program is started. You can configure this program by running <pre> $ defaults write org.x.X11 "app_to_run" "gnome-terminal" </pre> (replace gnome-terminal with a program of your choice). or <pre>$ defaults write org.x.X11 "app_to_run" ""</pre> to have no application run by default.
  +
* There shouldn't be anything different on OSX about configuring [http://www.xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Doc-Configuring.html ~/.xmonad/xmonad.hs].
   
 
=== Discussion ===
 
=== Discussion ===

Revision as of 22:16, 4 April 2009

I suggest the current text is put under the title Tiger and made Tiger specific (which it mostly is).

I'm not going to commit this immediately - among other things I need to check my instructions work.

Leopard

These instructions have been tested on a blank but fully updated system (04/04/09).

Install xmonad

Installing GHC

  • Install xcode, this can be found on the OSX install disk; it can also be downloaded from apple (you will have to sign upto a free developer account).
  • Download and install ghc.

Installing Cabal

  • Download and extract Cabal install from http://www.haskell.org/cabal/download.html
  • In a terminal:
    $ cd ''Cabal install directory''; ./bootstrap.sh
  • Edit your path to contain ~/.cabal/bin
  • This can be achieved by adding
    PATH=$PATH:~/.cabal/bin
    to ~/.profile
  • Open a new shell (the path variable will only take effect on new shells).
  • Update cabal
    $ cabal update
  • Install xmonad
    $ cabal install xmonad

Install dmenu (optional but recommended)

Updating X11

The version of X11 shipped with Leopard (04/04/09) does not support going fullscreen on xmonad key combinations. I recommend updating X11. It is likely that a Leopard update will eventually make this step unnecessary. Download and install the latest version from macosforge.

Configuring Your .xinitrc to Run XMonad

write:

export USERWM=`which xmonad`
exec /usr/X11/lib/X11/xinit/xinitrc

to ~/.xinitrc

Alternatively, if this doesn't work (because you haven't updated X11): write:

export USERWM=`which xmonad`
exec $USERWM

to ~/.xinitrc

Make sure your PATH variable is set up correctly in ~/.profile. Xmonad and dmenu should be in the path. Anything you want to launch from dmenu should be in the path.

Configuring

  • The menu bar shouldn't get in the way (fullscreen or otherwise, updated or standard X11). The Dock however will, I recommend hiding the Dock or always working in fullscreen mode.
  • You can start X11 (and Xmonad) by running any program that uses X, or by running X11.app. If you run X11.app a default program is started. You can configure this program by running
     $ defaults write org.x.X11 "app_to_run" "gnome-terminal" 
    (replace gnome-terminal with a program of your choice). or
    $ defaults write org.x.X11 "app_to_run" ""
    to have no application run by default.
  • There shouldn't be anything different on OSX about configuring ~/.xmonad/xmonad.hs.

Discussion

  • XMonad and Vimperator (Firefox 3 extension) make a powerful combination on Linux. I cannot achieve this on OSX because the newest X11 version of Firefox I can install is version 2. If anyone has any hints on installing Firefox 3 X11 please share them.