[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
Wed Dec 31 06:51:20 EST 2008

Status: New
Owner: ----

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

What steps will reproduce the problem?
1. Configure XMonad with terminal = "gnome-terminal"
2. Use any of the XMonad.Contrib.Prompt.modules that use runInTerm, e.g.

What is the expected output? What do you see instead?
Expect to see a new terminal window with an ssh session in it.
Instead, a terminal window appears very briefly and then disappears.

What version of the product are you using? On what operating system?
xmonad-0.8 and xmonad-contrib-0.8 on Ubuntu 8.10.

Please provide any additional information below.
The problem is due to a difference between how xterm and gnome-terminal
interpret the -e command line option.
xterm -e consumes all remaining arguments
gnome-terminal -e consumes a single argument
runInTerm invokes $terminal like this:
   $terminal -e $command
This does not work with gnome-terminal if $command contains spaces, e.g. if
$command = "ssh localhost". gnome-terminal executes "ssh" only, and ignores
the "localhost" argument.

A possible fix is to modify runInTerm to pass the command in single quotes,
   $terminal -e '$command'
Of course, this is somewhat fragile: it will break if $command contains
single quotes.

As a work around, the attached script "gnome-terminal-wrapper" provides
xterm -e style behaviour for gnome-terminal, i.e. causes -e to consume all
remaining arguments.

	gnome-terminal-wrapper  220 bytes

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