Skip to content

Delivering escape sequences to outside terminal from unfocused pane #2136

@kilogram

Description

@kilogram

Issue description

I am trying to use hterm-notify.sh to deliver notifications from a remote. It uses escape sequences to print a command to the local terminal, which interprets it to display a notification. My specific use case is to send a notification when a long-running command, most likely running on a different tmux pane/window, completes.

printf '\033Ptmux;\033\033]777;notify;title;body\a\033\\'

This works from outside and within tmux, if printed from the active window. However, if printed from a pane on another window, it will not trigger a notification.

The full stack is: Secure Shell App on ChromeOS -> Remote over SSH (Arch Linux, xterm-256color) -> tmux.

Steps to replicate

  1. SSH to remote.
  2. Start a tmux session.
  3. Run printf '\033Ptmux;\033\033]777;notify;title;body\a\033\\'. Observe notification works.
  4. Run sleep 3 && printf '\033Ptmux;\033\033]777;notify;title;body\a\033\\'
  5. Create and switch to a different window within 3 seconds.
  6. After >3s, observe no notification.
    tmux-server-370910.log
    tmux-out-370910.log

I'm not sure how to confirm delivery of an escape sequence that doesn't involve a notification, but if you have instructions I'd be happy to try it.

I suspect that it may not be possible to send escape sequences to the outside terminal from within an unfocused tmux pane, but I thought it would be worth confirming.

Required information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions