[xmonad] Issue 254 in xmonad: XMonad.Contrib.Util.Run.runInTerm does not work with terminal = "gnome-terminal"

codesite-noreply at google.com codesite-noreply at google.com
Thu Jan 1 05:25:03 EST 2009

Comment #5 on issue 254 by twpayne: XMonad.Contrib.Util.Run.runInTerm does  
not work with terminal = "gnome-terminal"

I've only got basic notions of Haskell, but my understanding is that  
avoids the shell but the command to be run is still converted to a string.   

runInTerm (based on unsafeSpawn) does this (pseudo code):
   exec 'sh -c "terminal -e ssh localhost"'  -- convert to string, pass to sh
safeRunInTerm (based on safeSpawn) does this:
   exec 'terminal -e ssh localhost'  -- convert to string. don't pass to sh
but what's really needed is this:
   exec ['terminal', '-e', 'ssh localhost'] -- don't convert to string,  
                                            -- exec with list of arguments
Note how in the last example 'ssh localhost' is passed as a single  
argument, where in
both runInTerm and safeRunInTerm it is split into two arguments (because a  
passed to exec is implicitly split on whitespace to produce the list of  

So, unfortunately I think the changes run a bit deeper than just using  
safeSpawn :-(

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:

More information about the xmonad mailing list