xmonad WM

Talk about other linux distributions, or even other OSes.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

xmonad WM

Post by mimosa »

I spent a while trying to get this working in Salix. No doubt it's doable, with a bit of persistence.

http://xmonad.org/tour.html

It's a tiling window manager that I'm finding very elegant and intuitive. One of its supposed advantages is how configurable it is, but for now, the minimalistic defaults are working fine for me. However, later, I can see it will be fun to tweak and fiddle with. dmenu does very well for launching apps; but there are ways of integrating more features, even using it as a WM for Gnome in place of metacity.

The great thing is on the one hand the ease of running windows in parallel (copy from firefox to console), and on the other hand the lack of distractions when you are working with just one app in view, taking up the whole screen. Changing views is very fluid, so you can for instance work with a document in two versions alternating betwen split and full screen with a keystroke, and dip into firefox for research such as online dictionaries. There's just no clutter.

This seems to me like a powerful tool and the learning curve is modest, more so anyway than other tiling WMs I have briefly tried, such as ratpoison (which I did manage to get working under Salix).

I'm using it in Arch, which seems to be an established pairing. It would be interesting to get it running with Salix, though.

The sticking point (though perhaps also why it works so well) is that it is written in and depends on a strange language called Haskell. These people are purists ;)

http://en.wikipedia.org/wiki/Haskell_%2 ... anguage%29

There's some stuff available on src, but as I said, I haven't got too far with it yet.

There is this:

http://gorgias.mine.nu/slack/haskell/

which may underly what I tried unsuccessfully from src.

If anyone has this working in Salix, or is trying, I'd be interested to swap notes.
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: xmonad WM

Post by gapan »

It seems available through slapt-src. From the README:
This requires ghc, haskell-transformers, haskell-mtl, haskell-syb and
haskell-X11.
with all of them being available through slapt-src.
Image
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: xmonad WM

Post by mimosa »

Gapan, I'll give it another go, but I think what happened is one or other of those didn't work. This happens to me occasionally on src,and I imagine that's par for the course rather than something I'm doing wrong.

I assume this is what src is accessing:

http://slackbuilds.org/repository/13.1/desktop/xmonad/

and therefore maybe I'd better not try it on 13.2 beta.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: xmonad WM

Post by mimosa »

In fact, I tried it in beta, and the installation of ghc fails in exactly the same way as under 13.1 (fluxbox, in Virtual Box):

Code: Select all

ghc-7.0.1/libraries/prologue.txt
checking for path to top of build tree... utils/ghc-pwd/ghc-pwd: error while loading shared libraries: libgmp.so.3: cannot open shared object file: No such file or directory
configure: error: cannot determine current directory
fakeroot -- sh ghc.SlackBuild Failed

root[mimosa]# 
libgmp isn't in the repos so I assume it is part of Haskell. For good measure:

Code: Select all

root[mimosa]# find / -name '*libgmp*' 2>/dev/null
/usr/lib/libgmp.a
/usr/lib/libgmp.so.10
/usr/lib/libgmpxx.la
/usr/lib/libgmpxx.so
/usr/lib/libgmp.so.10.0.1
/usr/lib/libgmpxx.so.4.2.1
/usr/lib/libgmpxx.a
/usr/lib/libgmp.la
/usr/lib/engines/libgmp.so
/usr/lib/libgmpxx.so.4
/usr/lib/libgmp.so
root[mimosa]# 
User avatar
Duncan_Idaho
Posts: 216
Joined: 19. Sep 2009, 01:43
Location: Sietch Tabr, Planet Arrakis

Re: xmonad WM

Post by Duncan_Idaho »

did you install the fakeroot package?
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: xmonad WM

Post by gapan »

Try

Code: Select all

# ln -s /usr/lib/libgmp.so.10 /usr/lib/libgmp.so.3
Generally not recommended, but maybe it helps here. It seems that ghc includes a prebuilt version of itself and it uses that to build the compiler again and that prebuilt version depends on an old version of libgmp.
Image
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: xmonad WM

Post by mimosa »

@Duncan_Idaho

Yes, it seems to be there.

@Gapan

I think that's done it, though I dimly understand why it's not a kosher workaround. It seems as though the same issue arose for Arch nearly a year ago:

https://bbs.archlinux.org/viewtopic.php?id=94146

and there is someone on that thread who was clearly quite upset by the idea of solving the problem with a symlink. The suggestion there is that it's the user's machine that has an out-of-date library, not the other way round.

Is this something I should tell the maintainer of the Slackbuild about? Or a problem with Salix? Or Slackware? Or the Glasgow Haskell Compiler? Or a strictly local problem that I should really solve in a more kosher and demanding way, if I want to be sure of avoiding trouble later? Not that I'll bother for beta.

Also, can I remove the link after installing successfully? If I've understood your post correctly, it's only needed for the actual compile.

OK - ghc seems to have installed itself successfully, though it takes up quite a bit of space ;) I'll now install the other deps and xmonad :D

Code: Select all

usr/bin/haddock-7.0.1

Slackware package /usr/src/slapt-src/development/ghc/ghc-7.0.1-i486-1_SBo.txz created.

Installing package ghc-7.0.1-i486-1_SBo...
| ghc (The Glasgow Haskell Compiler)
| 
.....
| 
| 
WARNING: Failed to remove directory /usr/lib/ghc-7.0.1/ghc-7.0.1 (Directory not empty)
WARNING: Failed to remove directory /usr/lib/ghc-7.0.1 (Directory not empty)
ERROR: can't write to a file: No space left on device
ERROR: error thrown
ERROR: Failed to extract file usr/lib/ghc-7.0.1/ghc-7.0.1/HSghc-7.0.1.o.
ERROR: Package installation failed!
spkg -u --reinstall --install-new ghc-7.0.1-i486-1_SBo.txz Failed

root[mimosa]# slapt-get --remove libreoffice
Reading Package Lists...Done
The following packages will be REMOVED:
  libreoffice 
0 upgraded, 0 reinstalled, 0 newly installed, 1 to remove, 0 not upgraded.
After unpacking 365.5MB disk space will be freed.
.....
root[mimosa]# cd /usr/src/slapt-src/development/ghc/
root[ghc]# spkg -u --reinstall --install-new ghc-7.0.1-i486-1_SBo.txz
Installing package ghc-7.0.1-i486-1_SBo...
.....
| This is a complete build, including interactive system, profiling 
| libraries and documentation.
 .....
WARNING: File already exist usr/lib/ghc-7.0.1/ghc-7.0.1/HSghc-7.0.1.o (it will be replaced)
root[ghc]# 


;
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: xmonad WM

Post by gapan »

As far as I can see, it's a problem with the source package and the way ghc is built, which requires a certain obsolete version of libgmp to be installed.

The symlink is indeed a very ugly hack. I guess that you can remove it now that ghc has been compiled and installed.
Image
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: xmonad WM

Post by mimosa »

Up and running :D

(in beta too :o )

Many thanks indeed - I would not have got there without help. Arch, smarch.

A lot of the available tweaks seem to be ways of undoing the whole point of the (tiling, minimalistic) WM, so that it will tell you whether it's raining outside and :roll: perhaps even alert you to MSN events and the like. The one thing I miss is seeing the time, for which xmonad's site suggests a pretty app xclock - installed! Switch to look at it when I want, or leave it in the corner somewhere. dmenu seems to be essential, though; otherwise as far as I can tell, all you can open is terminals, and apps from them - which would take up two windows for one. gslapt and wicd notifications - see how I get on!
User avatar
Duncan_Idaho
Posts: 216
Joined: 19. Sep 2009, 01:43
Location: Sietch Tabr, Planet Arrakis

Re: xmonad WM

Post by Duncan_Idaho »

I installed xmonad a couple of months ago, and I too had to do the symlinc trick to get ghc to compile
other than that I compiled all the xmonad stuff without a problem, at least I don't remember any problems :mrgreen:
I recommend you to install dmenu also, so you can have an app launcher of sorts
and xmobar or dzen2 to have a status bar with info, and you can use feh to set a background picture
and you can make use of lxappearance to change the theme/icons of gtk apps :P

the first change I make in xmonad is to map the mod key from Alt(Mod1) to the Windos key(mod4) :geek:
Post Reply