
Comment #2 on issue 359 by wei.hoo: shellPromptHere from XMonad.Actions.SpawnOn doesn't work as claimed http://code.google.com/p/xmonad/issues/detail?id=359 I think I've found the issue. The way SpawnOn works is by associating a managehook which will move the program to a specific workspace, with the program's pid. Say we want to execute opera, the pid we recorded is for "/bin/sh /usr/bin/opera". However, when manageSpawn comes to manage the spawned program, the pid it sees is for "/usr/bin/opera", different from what we recorded. Therefore, it does nothing, and opera is placed on our current window. This issues begs a question: why does spawnPID do a double-fork? Below is code from XMonad.Core: -- | spawn. Launch an external application. Specifically, it double-forks and -- runs the 'String' you pass as a command to /bin/sh. spawn :: MonadIO m => String -> m () spawn x = spawnPID x >> return () -- | Like 'spawn', but returns the 'ProcessID' of the launched application spawnPID :: MonadIO m => String -> m ProcessID spawnPID x = xfork $ executeFile "/bin/sh" False ["-c", x] Nothing -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings