I was investigating a bit, under Ubuntu, but I suspect this is quite similar in Debian... will verify a bit more tomorrow.
paul@jacko:/etc/menu$ dpkg -L twm
/.
[...]
/etc/X11/twm/system.twmrc-menu
/etc/menu-methods
/etc/menu-methods/twm
/usr
/usr/bin
/usr/bin/twm
[...]
/usr/lib/X11/twm
paul@jacko:/etc/menu$
paul@jacko:/etc/menu$ cd /etc/X11/twm/
paul@jacko:/etc/X11/twm$ ls
menudefs.hook system.twmrc system.twmrc-menu
paul@jacko:/etc/X11/twm$ ls -lh
total 16K
-rw-r--r-- 1 root root 3,9K jan 27 21:37 menudefs.hook
-rw-r--r-- 1 root root 6,6K jan 27 21:37 system.twmrc
-rw-r--r-- 1 root root 2,7K sep 6 2018 system.twmrc-menu
In system.twmrc there is:
menu "/Debian/Applications/Shells"
{
"Bash" f.exec "x-terminal-emulator -T \"Bash\" -e sh -c \"/bin/bash --login\" &"
"Dash" f.exec "x-terminal-emulator -T \"Dash\" -e sh -c \"/bin/dash -i\" &"
"Sh" f.exec "x-terminal-emulator -T \"Sh\" -e sh -c \"/bin/sh --login\" &"
}
paul@jacko:/etc/X11/twm$ whereis x-terminal-emulator
x-terminal-emulator: /usr/bin/x-terminal-emulator /usr/share/man/man1/x-terminal-emulator.1.gz
paul@jacko:/etc/X11/twm$ file /usr/bin/x-terminal-emulator
/usr/bin/x-terminal-emulator: symbolic link to /etc/alternatives/x-terminal-emulator
paul@jacko:/etc/X11/twm$ file /etc/alternatives/x-terminal-emulator
/etc/alternatives/x-terminal-emulator: symbolic link to /usr/bin/xfce4-terminal.wrapper
paul@jacko:/etc/X11/twm$ file /usr/bin/xfce4-terminal.wrapper
/usr/bin/xfce4-terminal.wrapper: Perl script text executable
paul@jacko:/etc/X11/twm$ cat /usr/bin/xfce4-terminal.wrapper
#! /usr/bin/perl -w
#
# Terminal.wrapper - Debian terminal wrapper script
#
# Copyright (c) 2004-2005 os-cillation
#
while ($opt = shift(@ARGV))
{
if ($opt eq '-display')
{
$arg = shift(@ARGV);
push(@args, '--default-display', $arg);
}
elsif ($opt eq '-name')
{
$arg = shift(@ARGV);
}
elsif ($opt eq '-n')
{
$arg = shift(@ARGV);
}
elsif ($opt eq '-T' || $opt eq '-title')
{
push(@args, '--title', shift(@ARGV));
}
elsif ($opt eq '-geometry')
{
$arg = shift(@ARGV);
push(@args, "--geometry=$arg");
}
elsif ($opt eq '-fn')
{
$arg = shift(@ARGV);
}
elsif ($opt eq '-fg')
{
$arg = shift(@ARGV);
}
elsif ($opt eq '-bg')
{
$arg = shift(@ARGV);
}
elsif ($opt eq '-tn')
{
$arg = shift(@ARGV);
}
elsif ($opt eq '-e')
{
$arg = shift(@ARGV);
if (@ARGV)
{
push(@args, '-x', $arg, @ARGV);
last;
}
else
{
push(@args, '-e', $arg);
}
last;
}
elsif ($opt eq '-h' || $opt eq '--help')
{
push(@args, '--help');
}
}
exec('xfce4-terminal',@args);
paul@jacko:/etc/X11/twm$
paul@jacko:/etc/X11/twm$