After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 152717 - -e command line is inconsistent with other terminal emulators
-e command line is inconsistent with other terminal emulators
Status: RESOLVED WONTFIX
Product: gnome-terminal
Classification: Core
Component: general
2.6.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
: 747108 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-09-15 13:54 UTC by Frederic Crozat
Modified: 2015-03-31 12:59 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6



Description Frederic Crozat 2004-09-15 13:54:46 UTC
for gnome-terminal, -e is only to be used with one argument beeing the command
to execute (like gnome-terminal -e "man rxvt").

For most available terminal emulators (rxvt, xterm, konsole), -e is for
executing remaining arguments as command (ie like -x for gnome-terminal).

This inconsistency is causing problems when using a alternative (for instance
xvt on Mandrakelinux or x-terminal-emulator) to run a terminal emulator from
programs, without knowning which one is installed on the system.
Comment 1 Mariano Suárez-Alvarez 2004-10-31 10:17:45 UTC
This has been like this for ever, and can hardly be changed now.

It should not be difficult for distros to pack a little app which does command
line mangling, or wraps a call to (something similar to)
gnome_execute_terminal_shell, which would then look up the preferred terminal
app from the user's (gconf or other) setup.
Comment 2 Loïc Minier 2004-10-31 11:05:32 UTC
I don't see why you're reluctant to implementing this, it's not like extra
arguments past -e are used for something else right now.

The -e / --command arg is passed as it to g_shell_parse_argv(), supporting this
is only a matter of reading remaining arguments and appending them to the arg
string of -e / --command (separated by spaces).

Or what would that break?
Comment 3 Mariano Suárez-Alvarez 2004-10-31 11:27:21 UTC
Currently, a command line like
 
  gnome-terminal --command some-app --geometry 20x40

runs some-app in a 20x40 window; if we passed arguments to the command, it would
not do that.
Comment 4 Loïc Minier 2004-10-31 13:12:32 UTC
I checked the behavior of -e in xterm, and the main difference is not with
remaining arguments that are interpreted or not, but with the fact that -e MUST
be the last command line argument.

I agree it's a breakage to require -e to be the last option for next versions of
gnome-terminal.

But can't this change in behavior be scheduled for a major release?
Comment 5 Mariano Suárez-Alvarez 2004-10-31 23:07:25 UTC
[Actually, the xterm man page is not very precise, as -e cannot of necessity be
the last command line argument, as that would not allow one to even name the
command one wants to run or pass arguments to it; what it means is that xterm
will stop processing its command line options as soon as it seens a -e, and it
will collect all remaining args into the command to be run. Exactly as g-t does
with -x.]

[I really don't know why g-t chose to break tradition with -e/-x; maybe Havoc
remembers the rationale?]

We could break this for 3.0, I guess, but then we'd need to go out and patch
everything that has adapted to this. I can think of at least libgnome's
gnome_execute_terminal_shell. Also, users have a key installed in their gconf
databases called /desktop/gnome/applications/terminal/exec_arg, and we would
need to somehow change those, unless gnome as a whole decides to break existing
installations when going over to 3.0, which we {don't|try not to} do for minor
releases.
Comment 6 Kjartan Maraas 2004-11-01 14:24:49 UTC
Just some historic input here. I seem to remember Miguel saying that
gnome-terminal was supposed to be as close to xterm in behaviour as possible
when he started the project way back when. The ChangeLog in the current
gnome-terminal says this:

002-02-15  Havoc Pennington  <hp@pobox.com>

        * src/terminal.c (main): make option parsing accept exactly the
        same --command/-e/--execute/-x options as gnome-terminal and
        handle them the same way.

So I don't know why we're doing stuff differently...

Comment 7 Kjartan Maraas 2004-11-01 14:39:57 UTC
I found it :-)

http://mail.gnome.org/archives/gnome-announce-list/1999-June/msg00022.html

explains how GNOME got it wrong the first time and because of that added -x to
mimic xterm's behaviour. So the answer is to use -x to get the desired effect.

Comment 8 Christian Persch 2015-03-31 12:59:56 UTC
*** Bug 747108 has been marked as a duplicate of this bug. ***