Bug#1039579: gnome-terminal.wrapper does not support the '--' syntax itself

2023-06-27 Thread Christophe Lohr

Dear Simon,
  Thank you very much for your quick and comprehensive explanations. 
(Could be a manpage by itself!)


Indeed, I'm scripting some tasks needing a terminal in an agnostic way. 
So, 'x-terminal-emulator -e ...' is the best way for me.


I am grateful for your guidance.

Best regards,
Christophe

Le 27/06/2023 à 15:13, Simon McVittie a écrit :

On Tue, 27 Jun 2023 at 14:11:35 +0200, Christophe Lohr wrote:

   The code of this wrapper make several rearrangements to convert '-e' and '-x'
options into the '--' syntax, but it seems to not support itself the '--'
syntax on its command line. Isn't it?
Is this an oversight or I am wrong?
May I suggest adding support for "--"?

Please could you clarify why it would be useful for gnome-terminal.wrapper
to support the "--" syntax?

The only purpose of gnome-terminal.wrapper is to implement Debian's
x-terminal-emulator interface as defined in
,
which is a subset of xterm's command-line interface and therefore uses
"-e" to prefix a command to run. xterm does not support the GNU-style "--"
and there is no guarantee that an implementation of x-terminal-emulator
will support it either, so accepting it in gnome-terminal.wrapper
would just make it a bit more likely for people to write calls like
"x-terminal-emulator -- less /etc/hosts" which will actually only work
for a few specific terminal emulators.

If you're writing code that runs gnome-terminal (specifically) as a
subprocess, please use the gnome-terminal command and its preferred
"--" syntax.  There is no need to use the wrapper in this case, and in
fact it would be counterproductive to do so: all it does is to slow down
startup a little bit, and make some features unavailable.

If you're writing code that runs the generic x-terminal-emulator command
as a subprocess, then you will have to use the "-e" syntax, otherwise it
won't work correctly with xterm (and probably many other terminal emulators).

If you're writing code that supports multiple specific commands as ways
to run a command in a terminal, then it needs to "just know" whether
each one expects "-e", "-x", "--", or no argument at all. The table of
known terminals in

is an example of this technique. Everyone involved recognises that this
is not a pleasant interface, but that's the price we pay for portability.

 smcv




Bug#1039579: gnome-terminal.wrapper does not support the '--' syntax itself

2023-06-27 Thread Simon McVittie
On Tue, 27 Jun 2023 at 14:11:35 +0200, Christophe Lohr wrote:
>   The code of this wrapper make several rearrangements to convert '-e' and 
> '-x'
> options into the '--' syntax, but it seems to not support itself the '--'
> syntax on its command line. Isn't it?
> Is this an oversight or I am wrong?
> May I suggest adding support for "--"?

Please could you clarify why it would be useful for gnome-terminal.wrapper
to support the "--" syntax?

The only purpose of gnome-terminal.wrapper is to implement Debian's
x-terminal-emulator interface as defined in
,
which is a subset of xterm's command-line interface and therefore uses
"-e" to prefix a command to run. xterm does not support the GNU-style "--"
and there is no guarantee that an implementation of x-terminal-emulator
will support it either, so accepting it in gnome-terminal.wrapper
would just make it a bit more likely for people to write calls like
"x-terminal-emulator -- less /etc/hosts" which will actually only work
for a few specific terminal emulators.

If you're writing code that runs gnome-terminal (specifically) as a
subprocess, please use the gnome-terminal command and its preferred
"--" syntax.  There is no need to use the wrapper in this case, and in
fact it would be counterproductive to do so: all it does is to slow down
startup a little bit, and make some features unavailable.

If you're writing code that runs the generic x-terminal-emulator command
as a subprocess, then you will have to use the "-e" syntax, otherwise it
won't work correctly with xterm (and probably many other terminal emulators).

If you're writing code that supports multiple specific commands as ways
to run a command in a terminal, then it needs to "just know" whether
each one expects "-e", "-x", "--", or no argument at all. The table of
known terminals in

is an example of this technique. Everyone involved recognises that this
is not a pleasant interface, but that's the price we pay for portability.

smcv



Bug#1039579: gnome-terminal.wrapper does not support the '--' syntax itself

2023-06-27 Thread Christophe Lohr
Package: gnome-terminal
Version: 3.46.8-1
Severity: wishlist
X-Debbugs-Cc: christophe.l...@cegetel.net

Dear Maintainer,
  The code of this wrapper make several rearrangements to convert '-e' and '-x'
options into the '--' syntax, but it seems to not support itself the '--'
syntax on its command line. Isn't it?
Is this an oversight or I am wrong?
May I suggest adding support for "--"?

Best regards
Christophe


-- System Information:
Debian Release: trixie/sid
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'proposed-updates'), (500, 
'oldstable-updates'), (500, 'oldoldstable-updates'), (500, 'oldoldstable'), 
(500, 'testing'), (500, 'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.3.0-1-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gnome-terminal depends on:
ii  dbus-user-session [default-dbus-session-bus]  1.14.8-1
ii  dbus-x11 [dbus-session-bus]   1.14.8-1
ii  dconf-gsettings-backend [gsettings-backend]   0.40.0-4
ii  gnome-terminal-data   3.46.8-1
ii  gsettings-desktop-schemas 43.0-1
ii  libatk1.0-0   2.48.3-1
ii  libc6 2.36-9
ii  libgcc-s1 13.1.0-6
ii  libglib2.0-0  2.74.6-2
ii  libgtk-3-03.24.37-2
ii  libpango-1.0-01.50.14+ds-1
ii  libstdc++613.1.0-6
ii  libuuid1  2.38.1-5+b1
ii  libvte-2.91-0 0.70.6-1
ii  libx11-6  2:1.8.6-1

Versions of packages gnome-terminal recommends:
ii  gvfs   1.50.4-2
ii  nautilus-extension-gnome-terminal  3.46.8-1
ii  yelp   42.2-1

gnome-terminal suggests no packages.

-- no debconf information