GNOME Bugzilla – Bug 701691
-e accepts only one term; all other terminal emulators accept more than one term
Last modified: 2013-06-07 11:21:13 UTC
From the gnome-terminal man page:
Execute the argument to this option inside the terminal.
Execute the remainder of the command line inside the terminal.
This behaviour is inconsistent with all other terminal emulators. This
inconsistency creates problems. From the uberspace.de linked page:
`xterm -e vim file' -- I get vim with the file open.
`gnome-terminal -e vim file' -- I just get vim. To have vim open the file
too I have to say:
`gnome-terminal -e "vim file" '.
This necessitates a workaround ['hut' on the uberspace.de]:
# filename: /usr/bin/gnometerm
from subprocess import Popen
from sys import argv
def shell_quote(string): return "'" + str(string).replace("'", "'\\''") + "'"
Popen(["gnome-terminal", argv, (" ".join(shell_quote(arg) for arg in argv[2:]))])
Developers, please consider making the behaviour of -e consistent with
other terminal emulators! In gnome-terminal since -e is just a subset
of -x can you not just make -e a synonym of -x? There is this though:
g-t allows other options after -e, so it may break existing scripts.
Contrawise, wouldn't scripts use xterm, and not gnome-terminal?
From the man pages:
-e program [ arguments ... ]
This option specifies the program (and its command line
arguments) to be run in the xterm window. This must be
the last option on the command line.
-e <command> [ arguments ]
Execute ’command’ instead of shell.
This must be the last option on the command line.
Execute remainder of command line inside the terminal. Must be
This works as designed. Note that both -x and -e are deprecated; the only supported way to pass the arguments is after -- like this:
$ gnome-terminal -- emacs file
Thanks for the reply! This solution is the best, as changing the interface would have been horrible anyway.
This (`--') way to pass the executable is not mentioned in my man page (v.184.108.40.206), even though it works in my version. Could you or someone please add this in the man page? Also, please mention that -x and -e are deprecated. Thanks.
The man page is a debian addition and doesn't exist upstream (bug 311565).
Ok, I will inform the Debian package maintainer. But, in that case, where is the documentation users are supposed to consult? Is there a page describing all this that the package manager can check to update the man page?
There are no docs for the gnome-terminal command line options.
Thanks for your replies. I have submitted a bug report with Debian: