Installation #
First install the cabal-install tool:
Sudo zypper install cabal-install
After cabal is installed, check its installation status:
Cabal -- version
The using version 1.16.0 of the Cabal library is usually output.
However, the software on the openSUSE library is not the latest, and you may need to upgrade cabal-install:
Cabal install cabal-install
In addition, we also need to install GHC Haskell compiler. The installation method in openSUSE is as follows:
Sudo zypper install ghc
Then update the cabal database:
Cabal update
Then install xmonad1:
Cabal install http://code.haskell.org/xmonad/xmonad.tar.gz
Cabal install http://code.haskell.org/XMonadContrib/xmc.tar.gz
After the installation is complete, run the following command to check the installation:
Xmonad -- version
Start and configure #
Start xmonad. My original desktop environment is KDE2, which requires some configuration.
First, create a. xsession file in the main directory and add the following content:
Xmonad
To make xmonad optional during logon, add the xmonad. desktop file under the/usr/share/xsessions/directory.
Sudo vi/usr/share/xsessions/xmonad. desktop
Add the following content to the file:
[Desktop Entry]
Encoding = UTF-8
Name = xmonad
Comment = This session starts xmonad
Exec =/home/sam/. cabal/bin/xmonad
Type = Application
Note that the xmonad executable file PATH is/home/sam/. cabal/bin/xmonad. You need to add it to the $ PATH environment variable:
Cd ~
Vi. bashrc
Add:
Export PATH = $ PATH :~ /. Cabal/bin
Log out of KDE, select xmond, and then log on to the system-ha, which is blank.
Don't be flustered. This is xmonad. You can press ALT + SHIFT + ENTER to bring up the terminal window. If you feel bad after playing for a while, press ALT + SHIFT + Q to log out and select KDE again.