Difference between revisions of "Xmonad/Installing xmonad"

From HaskellWiki
Jump to: navigation, search
(add debian)
 
(18 intermediate revisions by 8 users not shown)
Line 2: Line 2:
   
 
== Read me first ==
 
== Read me first ==
After installing, you'll have an <code>xmonad</code> binary on your system. From there, you'll need to [[Xmonad/Configuring your login manager|wire xmonad up to your login manager]].
+
After installing, you'll have an <code>xmonad</code> binary on your system. From there, you'll need to [[Xmonad/Frequently_asked_questions#How_can_I_use_xmonad_with_a_display_manager.3F_.28xdm.2C_kdm.2C_gdm.29|wire xmonad up to your login manager]].
   
 
== Linux ==
 
== Linux ==
Line 24: Line 24:
   
 
=== Fedora ===
 
=== Fedora ===
  +
To install:
  +
$ yum install xmonad
  +
  +
Additionally install ghc-xmonad-devel and ghc-xmonad-contrib-devel
  +
  +
$ yum install ghc-xmonad-contrib-devel
  +
  +
xmonad is also available in EPEL for rhel6.
   
 
=== Gentoo ===
 
=== Gentoo ===
Line 32: Line 40:
 
if you only want to install xmonad without contrib you could use:
 
if you only want to install xmonad without contrib you could use:
 
$ emerge xmonad
 
$ emerge xmonad
  +
  +
An actively maintained [[Gentoo|haskell]] overlay contains many
  +
newer or more obscure versions of projects, including ebuilds for
  +
darcs xmonad/contrib, cabal-install, haskellmode for vim, and many
  +
other goodies.
   
 
=== Gobo ===
 
=== Gobo ===
   
 
=== NixOS ===
 
=== NixOS ===
  +
  +
To use xmonad as your window manager, modify /etc/nixos/configuration.nix to specify (as of 2016 Nov, NixOS 16.x or 17.x):
  +
  +
services.xserver = {
  +
windowManager.xmonad = {
  +
enable = true;
  +
enableContribAndExtras = true;
  +
extraPackages = haskellPackages: [
  +
haskellPackages.xmonad-contrib
  +
haskellPackages.xmonad-extras
  +
haskellPackages.xmonad
  +
];
  +
};
  +
windowManager.default = "xmonad";
  +
  +
It may also be convenient to perform various startup operations like adjusting the keymappings:
  +
  +
displayManager.sessionCommands = with pkgs; lib.mkAfter
  +
'''''''
  +
xmodmap /path/to/.Xmodmap
  +
''''''';
  +
};
  +
  +
It's also helpful to specify the above package list in the `environment.systemPackages` portion of the configuration.nix file.
  +
  +
The above will enable you to login with the generic xmonad configuration; most xmonad users will customize their configuration via <code>$HOME/.xmonad/xmonad.hs</code>. In order for this local version to be built (or rebuilt, on Alt-Q for example) the xmonad libraries and dependencies must be present in the logged-in users environment:
  +
  +
$ nix-env -f "<nixpkgs>" -iA haskellPackages.xmonad \
  +
-A haskellPackages.xmonad-extras \
  +
-A haskellPackages.xmonad-contrib
  +
  +
Remember to also install any applications that you specified in the displayManager.sessionCommands:
  +
  +
$ nix-env -i xmodmap
   
 
=== Slackware ===
 
=== Slackware ===
Line 44: Line 91:
 
See [[#Debian]].
 
See [[#Debian]].
   
Note: On Hardy Heron and earlier, the libghc6-x11-dev package was compiled without Xinerama support. This means that if you want multi-monitor support, you will either need to upgrade to Intrepid Ibez or install xmonad (and the Haskell X11 library on which it depends) through one of the [[#Generic]] options.
+
Note: On Hardy Heron and earlier, the libghc6-x11-dev package was compiled without Xinerama support. This means that if you want multi-monitor support, you have three options:
  +
* upgrade to >= Intrepid Ibex
  +
* install xmonad (and the Haskell X11 library on which it depends) through one of the [[#Generic]] options
  +
* follow the instructions in [http://basildoncoder.com/blog/2008/08/10/ubuntu-xmonad-and-an-ode-to-apt/ this blog post] to recompile the libghc6-x11-dev yourself (unverified)
   
 
== BSD ==
 
== BSD ==
 
=== FreeBSD ===
 
=== FreeBSD ===
  +
  +
For only the window manager:
  +
  +
# cd /usr/ports/x11-wm/hs-xmonad
  +
# sudo make install distclean
  +
  +
And the contrib package:
  +
  +
# cd /usr/ports/x11-wm/hs-xmonad-contrib
  +
# sudo make install distclean
  +
 
=== NetBSD ===
 
=== NetBSD ===
 
=== OpenBSD ===
 
=== OpenBSD ===
Line 59: Line 117:
 
$ port install ghc
 
$ port install ghc
 
And then follow one of the [[#Generic]] instructions.
 
And then follow one of the [[#Generic]] instructions.
  +
  +
Alternatively install a ghc wrapper and xmonad with [http://nixos.org/nix/ Nix].
  +
$ nix-env -i <package>
   
 
See more at [[Xmonad/Using xmonad on Apple OSX]].
 
See more at [[Xmonad/Using xmonad on Apple OSX]].

Latest revision as of 20:56, 22 November 2016

Xmonad-logo-small.png

XMonad


Read me first

After installing, you'll have an xmonad binary on your system. From there, you'll need to wire xmonad up to your login manager.

Linux

Arch

 $ pacman -S xmonad-contrib # for the xmonad core and contrib packages

or else:

 $ pacman -S xmonad         # for just the xmonad core package

See xmonad on ArchWiki for more info.

Debian

To install:

 $ apt-get install xmonad                     # for just the xmonad binary, without the ability to configure

In addition to that, if you want to write a configuration file, you should get one of these:

 $ apt-get install libghc6-xmonad-contrib-dev # for all of xmonad core and xmonad-contrib (depends on the following pkg)
 $ apt-get install libghc6-xmonad-dev         # for just xmonad core

There are also -doc and -prof suffixes for various packages. I'm not sure what they contain.

Note: The are backports available for debian etch at http://newpeople.debian.org/~jps/etch/.

Fedora

To install:

 $ yum install xmonad

Additionally install ghc-xmonad-devel and ghc-xmonad-contrib-devel

 $ yum install ghc-xmonad-contrib-devel

xmonad is also available in EPEL for rhel6.

Gentoo

 $ emerge xmonad-contrib 
 # the contrib package depends on xmonad so it gets also installed
 if you only want to install xmonad without contrib you could use:
 $ emerge xmonad
 An actively maintained haskell overlay contains many
 newer or more obscure versions of projects, including ebuilds for
 darcs xmonad/contrib, cabal-install, haskellmode for vim, and many
 other goodies.

Gobo

NixOS

To use xmonad as your window manager, modify /etc/nixos/configuration.nix to specify (as of 2016 Nov, NixOS 16.x or 17.x):

  services.xserver = {
    windowManager.xmonad = {
      enable = true;
      enableContribAndExtras = true;
      extraPackages = haskellPackages: [
        haskellPackages.xmonad-contrib
        haskellPackages.xmonad-extras
        haskellPackages.xmonad
      ];
    };
    windowManager.default = "xmonad";

It may also be convenient to perform various startup operations like adjusting the keymappings:

    displayManager.sessionCommands = with pkgs; lib.mkAfter
      ''
      xmodmap /path/to/.Xmodmap
      '';
  };

It's also helpful to specify the above package list in the `environment.systemPackages` portion of the configuration.nix file.

The above will enable you to login with the generic xmonad configuration; most xmonad users will customize their configuration via $HOME/.xmonad/xmonad.hs. In order for this local version to be built (or rebuilt, on Alt-Q for example) the xmonad libraries and dependencies must be present in the logged-in users environment:

  $ nix-env -f "<nixpkgs>" -iA haskellPackages.xmonad \
                            -A haskellPackages.xmonad-extras \
                            -A haskellPackages.xmonad-contrib

Remember to also install any applications that you specified in the displayManager.sessionCommands:

  $ nix-env -i xmodmap

Slackware

Source Mage

Ubuntu

See #Debian.

Note: On Hardy Heron and earlier, the libghc6-x11-dev package was compiled without Xinerama support. This means that if you want multi-monitor support, you have three options:

  • upgrade to >= Intrepid Ibex
  • install xmonad (and the Haskell X11 library on which it depends) through one of the #Generic options
  • follow the instructions in this blog post to recompile the libghc6-x11-dev yourself (unverified)

BSD

FreeBSD

For only the window manager:

 # cd /usr/ports/x11-wm/hs-xmonad
 # sudo make install distclean

And the contrib package:

 # cd /usr/ports/x11-wm/hs-xmonad-contrib
 # sudo make install distclean

NetBSD

OpenBSD

xmonad is in the ports tree. To install it,

 sudo pkg_add xmonad

Mac OS X

Install ghc using MacPorts:

 $ port install ghc

And then follow one of the #Generic instructions.

Alternatively install a ghc wrapper and xmonad with Nix.

 $ nix-env -i <package>

See more at Xmonad/Using xmonad on Apple OSX.

Generic

From tarball

From Hackage

xmonad can be installed from source on any system with an up-to-date Haskell toolchain:

 $ cabal install xmonad