Package: thunderbird Version: 1:45.7.1-1 Severity: important Tags: patch Consider trying to invoke:
thunderbird -- -P foo this currently produces: Warning: unrecognized command line flag -P foo it does this because the special "$@" is getting mangled into the env var THUNDERBIRD_OPTIONS which then gets replaced as a single string, rather than being passed separately. For example (note the whitespace that should be a _ in the child process below): 0 dkg@alice:~$ ps -eFH | grep 'thun[d]er' dkg 18921 3185 0 1072 1588 2 16:32 pts/1 00:00:00 /bin/sh /usr/bin/thunderbird -- -P foo dkg 18932 18921 17 242031 278836 2 16:32 pts/1 00:00:12 /usr/lib/thunderbird/thunderbird -P foo 0 dkg@alice:~$ tr '\0' '_' < /proc/18921/cmdline ; echo /bin/sh_/usr/bin/thunderbird_--_-P_foo_ 0 dkg@alice:~$ tr '\0' '_' < /proc/18932/cmdline ; echo /usr/lib/thunderbird/thunderbird_-P foo_ 0 dkg@alice:~$ I believe the patch below fixes the problem: --- /usr/bin/thunderbird.orig 2017-02-14 18:46:23.000000000 -0500 +++ /usr/bin/thunderbird 2017-02-16 16:28:39.874612108 -0500 @@ -246,8 +246,6 @@ # shift found options shift $(( OPTIND - 1 )) -THUNDERBIRD_OPTIONS="$@" - # sanity check if [ "$DEBUGGER" != "" ] && [ "$USER_DEBUGGER" != "" ]; then echo "You can't use option '-g and '-d' at the same time!" @@ -353,8 +351,8 @@ # migrate, going further by starting Thunderbird. if [ "${DEBUG}" = "" ]; then - debug "call $MOZ_LIBDIR/$MOZ_APP_NAME '${THUNDERBIRD_OPTIONS}'" - $MOZ_LIBDIR/$MOZ_APP_NAME "${THUNDERBIRD_OPTIONS}" + debug "call $MOZ_LIBDIR/$MOZ_APP_NAME $@" + $MOZ_LIBDIR/$MOZ_APP_NAME "$@" else # User has selected GDB? if [ "$DEBUGGER" = "1" ]; then @@ -362,7 +360,7 @@ if [ -f /usr/bin/gdb ]; then if [ -f /usr/lib/debug/usr/lib/thunderbird/thunderbird ]; then echo "Starting Thunderbird with GDB ..." - LANG= /usr/lib/thunderbird/run-mozilla.sh -g /usr/lib/thunderbird/thunderbird-bin "${THUNDERBIRD_OPTIONS}" + LANG= /usr/lib/thunderbird/run-mozilla.sh -g /usr/lib/thunderbird/thunderbird-bin "$@" else echo "No package 'thunderbird-dbg' installed! Please install first and restart." exit 1 -- System Information: Debian Release: 9.0 APT prefers testing-debug APT policy: (500, 'testing-debug'), (500, 'testing'), (200, 'unstable-debug'), (200, 'unstable'), (1, 'experimental-debug'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.9.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages thunderbird depends on: ii debianutils 4.8.1 ii fontconfig 2.11.0-6.7 ii libasound2 1.1.3-4 ii libatk1.0-0 2.22.0-1 ii libc6 2.24-9 ii libcairo2 1.14.8-1 ii libdbus-1-3 1.10.14-1 ii libdbus-glib-1-2 0.108-2 ii libevent-2.0-5 2.0.21-stable-2.1 ii libffi6 3.2.1-6 ii libfontconfig1 2.11.0-6.7 ii libfreetype6 2.6.3-3+b1 ii libgcc1 1:6.3.0-6 ii libgdk-pixbuf2.0-0 2.36.4-1 ii libglib2.0-0 2.50.2-2 ii libgtk2.0-0 2.24.31-2 ii libhunspell-1.4-0 1.4.1-2+b1 ii libicu57 57.1-5 ii libnspr4 2:4.12-6 ii libnss3 2:3.26.2-1 ii libpango-1.0-0 1.40.3-3 ii libpangocairo-1.0-0 1.40.3-3 ii libpangoft2-1.0-0 1.40.3-3 ii libpixman-1-0 0.34.0-1 ii libsqlite3-0 3.16.2-2 ii libstartup-notification0 0.12-4 ii libstdc++6 6.3.0-6 ii libvpx4 1.6.1-2 ii libx11-6 2:1.6.4-3 ii libxcomposite1 1:0.4.4-2 ii libxdamage1 1:1.1.4-2+b1 ii libxext6 2:1.3.3-1 ii libxfixes3 1:5.0.3-1 ii libxrender1 1:0.9.10-1 ii libxt6 1:1.1.5-1 ii psmisc 22.21-2.1+b1 ii zlib1g 1:1.2.8.dfsg-5 Versions of packages thunderbird recommends: ii lightning 1:45.7.1-1 pn myspell-en-us | hunspell-dictionary | myspell-dictionary <none> Versions of packages thunderbird suggests: pn apparmor <none> ii fonts-lyx 2.2.2-1 ii libgssapi-krb5-2 1.15-1 -- no debconf information