https://bugzilla.redhat.com/show_bug.cgi?id=2097525 worked towards making PROMPT_COMMAND in bash an array. That causes /etc/profile.d/vte.sh to use __vte_osc7 instead of the __vte_prompt_command. However, the patches for vte.sh.in layered upon upstream VTE do not handle this correctly. The prexec escape sequence is still executed. However the precmd escape sequence is not. The side effect of this is that notifications in gnome-terminal (and ptyxis) will not work as there is no precmd to pair with prexec sequence. Reproducible: Always Steps to Reproduce: 1. run gnome-terminal 2. sleep 5 (and then switch to another window) 3. sleep command completes, no notification appears Actual Results: No command completed notification Expected Results: Command completed notification is displayed Most likely we just need to fix the missing OSC 777 precmd sequence in the 'declare -a PROMPT_COMMAND' case.
Note that for me, a fedora 39 container works fine, but a fedora 40 container does not.
This seems to make things work for me, though I have no idea what the side-effects are at the moment with regards to titles/cwd/etc. diff --git a/vte.sh b/vte.sh.new index 4c85d28..1b7d536 100644 --- a/vte.sh +++ b/vte.sh.new @@ -51,7 +51,7 @@ if [[ -n "${BASH_VERSION:-}" ]]; then # use the __vte_prompt_command function which also sets the title. if [[ "$(declare -p PROMPT_COMMAND 2>&1)" =~ "declare -a" ]]; then - PROMPT_COMMAND+=(__vte_osc7) && PS0=$(printf "\033]777;preexec\033\\") + PROMPT_COMMAND+=(__vte_prompt_command) && PS0=$(printf "\033]777;preexec\033\\") else PROMPT_COMMAND="__vte_prompt_command" && PS0=$(printf "\033]777;preexec\033\\") fi
Created attachment 2030126 [details] Fixes handling of notify and shell-precmd with Bash PROMPT_COMMAND array This can be copied into the patch for the RPM spec but it is also updated in the combined patch which was taken for Ptyxis for F40. Now that F40 is using Bash arrays for $PROMPT_COMMAND it broke the vte.sh patches. This should make those code-paths also handled when an array.
FEDORA-2024-ce96ecae8c (vte291-0.76.1-1.fc40) has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2024-ce96ecae8c
Just noting that the vte291-0.76.1-1 does not yet have the updated patch for PROMPT_COMMAND.
FEDORA-2024-ce96ecae8c has been pushed to the Fedora 40 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-ce96ecae8c` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-ce96ecae8c See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2024-ce96ecae8c (vte291-0.76.1-1.fc40) has been pushed to the Fedora 40 stable repository. If problem still persists, please make note of it in this bug report.
Just confirming that this does indeed seem to fix things.