codehenry / xmonad

Automatically exported from code.google.com/p/xmonad
0 stars 0 forks source link

xmonad doesn't warn when xmonad executable cannot be found #126

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I've had this bug for a long time (since the initial release of xmonad) but
never really reported it...

If I'm not mistaken, xmonad has the ability to restart itself. So that
you're able to modify your ~/.xmonad/xmonad.hs then press mod-q and then
immediately see the changes without logging out and in again.

For some reason this has never worked on my system.

What steps will reproduce the problem?
1. Change something in your ~/.xmonad/xmonad.hs (for example adding some
layout)
2. mod-q (or whatever you've bound to 'restart')
3. Observe that the old configuration is still in effect.

What is the expected output? What do you see instead?
After changing xmonad.hs and pressing mod-q, I expect to see the new
configuration. So I expect to be able to use my newly added layout. Instead
I see no changes whatsoever. 

What version of the product are you using? On what operating system?
I'm using the latest version from darcs (Jan 30 2008). My system is a
standard fully updated Gentoo Linux.

(Also, my brother who's also using xmonad has the exact same problem.)

This is the unmodified key binding to 'restart' in my xmonad.hs:

    -- Restart xmonad
    , ((modMask              , xK_q     ), restart "xmonad" True)

Maybe my ~/.xsession has something to do with it:

#!/bin/bash

Esetroot ~/pictures/summerwood1280.jpg &

urxvtd &

/home/bas/bin/xmonad

killall urxvtd

Original issue reported on code.google.com by v.dijk....@gmail.com on 30 Jan 2008 at 9:06

GoogleCodeExporter commented 8 years ago
If you change the available layouts, you need to press mod-shift-space after 
restart to reload the layout 
information.  Have you tried this?

Original comment by allber...@gmail.com on 30 Jan 2008 at 9:39

GoogleCodeExporter commented 8 years ago
Yes I tried but that doesn't work either.

Original comment by v.dijk....@gmail.com on 30 Jan 2008 at 10:26

GoogleCodeExporter commented 8 years ago
Probably one of the following:

 - xmonad is not in your path (seems very likely, judging from the full path in your
xsession)
 - GHC is not in your path

Please check $PATH and let us know if the problem persists.

Original comment by SpencerJ...@gmail.com on 31 Jan 2008 at 8:08

GoogleCodeExporter commented 8 years ago
Spencer you're right.

I've installed xmonad in my home dir and I only added it to my $PATH inside my
~/.bashrc. I gues that ~/.bashrc is never executed when xmonad starts so when I
restart it, it can't find xmonad.

I solved it by listing the full path to xmonad in my config:

, ((modMask              , xK_q     ), restart "/home/bas/bin/xmonad" True)

This bug, which is not really a bug anymore, can be closed.

Thanks very much for your help!

Original comment by v.dijk....@gmail.com on 1 Feb 2008 at 7:04

GoogleCodeExporter commented 8 years ago

Original comment by byor...@gmail.com on 4 Feb 2008 at 4:41

GoogleCodeExporter commented 8 years ago
In #xmonad today, jeffwheeler had some trouble getting his config to reload. It 
seems
like this problem could have been avoided by adding a bit of logic to the 
default config:

Currently M-q is bound to:

   spawn "xmonad --recompile && xmonad --restart"

This could instead be something like:

   spawn $ "which xmonad && { xmonad --recompile && xmonad --restart } || " ++
           "xmessage xmonad not in \$PATH: \"$PATH\""

But maybe this logic should be implemented in haskell, or is the /bin/sh syntax 
used
here going to work everywhere?

Original comment by vogt.a...@gmail.com on 24 Mar 2010 at 3:55

GoogleCodeExporter commented 8 years ago
One small change for Solaris compatibility:  add a semicolon before the close 
brace, otherwise you will get a 
head-scratchy type of error:

[5] zaphod:501 {allbery} [~] Z$ /bin/sh -c 'true && { true && true } || echo 
huh'
/bin/sh: syntax error at line 1: `end of file' unexpected
zsh: exit 2     /bin/sh -c 'true && { true && true } || echo huh'
[5] zaphod:502 {allbery} [~] Z$ /bin/sh -c 'true && { true && true; } || echo 
huh' 
[5] zaphod:503 {allbery} [~] Z$ 

Original comment by allber...@gmail.com on 24 Mar 2010 at 9:41

GoogleCodeExporter commented 8 years ago
Here is:

Mon Mar 29 20:33:10 EDT 2010  Adam Vogt <vogt.adam@gmail.com>
  * Warn with xmessage when xmonad cannot be found for recompile (issue 126)

Original comment by vogt.a...@gmail.com on 30 Mar 2010 at 12:35

Attachments:

GoogleCodeExporter commented 8 years ago
I've pushed the patch.

Original comment by vogt.a...@gmail.com on 12 Nov 2011 at 2:45