newbie #2: "could not find module" XMonad.NoBorders, XMonad.Layout.NoBorders, etc.

I have searched the documention, and googled it. I had xmonad-0.4.1 running with extensions. I now have the default xmonad-0.5 running, and responding to changes in the ~/.xmonad/xmonad.hs. But, I can't get it see any contrib extension. e.g., if I put "import XMonad.foo" in ~/.xmonad/xmonad.hs, and hit alt-q, I get the popup screen saying: *** Error detected while loading xmonad configuration file: /home/whatever/.xmonad/xmonad.hs xmonad.hs:17:7: Could not find module `XMonad.foo': it is not a module in the current program, or in any known package. Please check the file for errors. *** My xmonad source is here: /root/xmonad/xmonad-0.5 I did this for root (entered as root): runhaskell Setup configure runhaskell Setup build runhaskell Setup install The executable and xmonad.hs are here: /root/.xmonad I did this for username (entered as root): runhaskell Setup configure --user --prefix=/home/username runhaskell Setup build runhaskell Setup install --user The executable and xmonad.hs are here: /home/username/.xmonad My xmonad-contrib source is here: /root/xmonad/xmonad-contrib-0.5 I ran the same commands as above. I need to know where to put xmonad-contrib-0.5 (?), or parts of it (?), or the extension.hs files themselves (?) such as NoBorders.hs, or, how to "register" them (?) to make them visible. (I tried putting xmonad-contrib-0.5 under xmonad-0.5, for example. Etc.) Now that we have on-the-fly config, I shouldn't have to recompile anything, right? The excellent documentation includes good examples of includes in the xmonad.hs, but I don't see this problem discussed. I hope my problem suggests an improvement to the documentation, rather than density on my part. Thank you. _________________________________________________________________ Share life as it happens with the new Windows Live.Download today it's FREE! http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_sharelife_112007

On Monday 10 December 2007 22:00:17 Ralph E. Carter wrote:
I have searched the documention, and googled it.
I had xmonad-0.4.1 running with extensions. I now have the default xmonad-0.5 running, and responding to changes in the ~/.xmonad/xmonad.hs.
But, I can't get it see any contrib extension. e.g., if I put "import XMonad.foo" in ~/.xmonad/xmonad.hs, and hit alt-q, I get the popup screen saying:
*** Error detected while loading xmonad configuration file: /home/whatever/.xmonad/xmonad.hs
xmonad.hs:17:7: Could not find module `XMonad.foo': it is not a module in the current program, or in any known package.
Please check the file for errors. ***
I think you're making a small mistake regarding the name of the module you're importing. Try 'XMonad.Layout.NoBorders' (note the singular Layout). Cheers, Spencer Janssen

Hy, if I understood you right I think the following thing is the problem: You have to execute the following AS YOUR USER (not as root): #for xmonad: runhaskell Setup.lhs --user --prefix=${HOME} configure runhaskell Setup.lhs build runhaskell Setup.lhs install #for XMonadContrib exactly the same as above. If you do this, Cabal registers the Packages automatically and xmonad should find them. Greetings from Germany Dominik
My xmonad source is here: /root/xmonad/xmonad-0.5 I did this for root (entered as root): runhaskell Setup configure runhaskell Setup build runhaskell Setup install The executable and xmonad.hs are here: /root/.xmonad
I did this for username (entered as root): runhaskell Setup configure --user --prefix=/home/username runhaskell Setup build runhaskell Setup install --user The executable and xmonad.hs are here: /home/username/.xmonad -- Dominik Bruhn mailto: dominik@dbruhn.de

From Dominik Bruhn: You have to execute the following AS YOUR USER (not as root):
#for xmonad: runhaskell Setup.lhs --user --prefix=${HOME} configure runhaskell Setup.lhs build runhaskell Setup.lhs install
#for XMonadContrib exactly the same as above.
If you do this, Cabal registers the Packages automatically and xmonad should find them.
1. The above worked instantly. Thank you. 2. (While admitting that the problem could have been something else I did), let me point out that http://xmonad.org/intro.html, which I tried to follow, gives this, with a different order, and no curly braces: $ runhaskell Setup.lhs configure --prefix=$HOME $ runhaskell Setup.lhs build $ runhaskell Setup.lhs install --user (is it wrong?) 3. Thanks to the others who replied. _________________________________________________________________ The best games are on Xbox 360. Click here for a special offer on an Xbox 360 Console. http://www.xbox.com/en-US/hardware/wheretobuy/

vamosaverlas:
From Dominik Bruhn: You have to execute the following AS YOUR USER (not as root):
#for xmonad: runhaskell Setup.lhs --user --prefix=${HOME} configure runhaskell Setup.lhs build runhaskell Setup.lhs install
#for XMonadContrib exactly the same as above.
If you do this, Cabal registers the Packages automatically and xmonad should find them.
1. The above worked instantly. Thank you. 2. (While admitting that the problem could have been something else I did), let me point out that http://xmonad.org/intro.html, which I tried to follow, gives this, with a different order, and no curly braces:
$ runhaskell Setup.lhs configure --prefix=$HOME $ runhaskell Setup.lhs build $ runhaskell Setup.lhs install --user
(is it wrong?)
Ah ha, yes. that's missing --user for the configure step. Well spotted. The docs will update shortly. -- Don

(Previously replied to author, not to list; sorry for the duplicate)
My xmonad source is here: /root/xmonad/xmonad-0.5 I did this for root (entered as root): runhaskell Setup configure runhaskell Setup build runhaskell Setup install The executable and xmonad.hs are here: /root/.xmonad
I did this for username (entered as root): runhaskell Setup configure --user --prefix=/home/username runhaskell Setup build runhaskell Setup install --user The executable and xmonad.hs are here: /home/username/.xmonad
I'm a noob, but I think that "(entered as root)" in that last block might be your problem. When you do the instructions that contain --user, something gets registered in the _current user's_ ghc-pkg database. The "current user" in that case was root, not 'username' as it should be. If you have root access, I think you don't need the --user suffix ever, you can install xmonad on a system level. (Don't confuse this with installing for the user "root" which is what you seemed to be trying to do in the first block of steps.) I don't know much about this as I haven't done it, and there might be tricky things you should do so as not to tread on the toes of your package manager. The --user instructions are valuable if you want to install xmonad for a single user without ever needing root access. This is what I suggest you do, so you can leave your system software to your package manager and easily blow away your custom-compiled software if it breaks in hairy way that you can't figure out. Finally: maybe it's debatable, but you shouldn't be logging into X and running window managers, etc., as root.
participants (5)
-
Dominik Bruhn
-
Don Stewart
-
Michael F. Lamb
-
Ralph E. Carter
-
Spencer Janssen