Subject: Re: [bug#78308] [PATCH v3 10/10] news: Add news entry for etc-bashrc-d-service-type.

From: Maxim Cournoyer <[email-masked]>
Date: Wed, 21 May 2025 09:17:37 +0900

Hi again,

Sergey Trofimov <[email-masked]> writes:

I just had a look a vte.sh, and I think I now understand why that
particular one wouldn't work as /etc/profile.d/vte.sh:

--8<---------------cut here---------------start------------->8---
# Not bash or zsh?
[ -n "${BASH_VERSION:-}" -o -n "${ZSH_VERSION:-}" ] || return 0

# Not an interactive shell?
[[ $- == *i* ]] || return 0

# Not running under vte?
[ "${VTE_VERSION:-0}" -ge 3405 ] || return 0

# TERM not supported?
case "$TERM" in
    xterm*|vte*|gnome*) :;;
    *) return 0 ;;
esac
--8<---------------cut here---------------end--------------->8---

I guess at least the VTE_VERSION check would cause the script to return
early for the login shell, which is not run from a VTE-powered terminal.

-- 
Thanks,
Maxim