mobile-shell / mobile-shell/mosh
Setting screen/tmux window name (ESC k) doesn't work with mosh
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 14.5k
- Forks
- 865
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to make mosh my primary terminal at $work, as I've been using it for months now and I'm pretty happy with it. One thing that strikes me, though, is that the window name setting does not work for me. My setup is this:
I use xfce4-terminal or xterm, and start tmux locally to have many panels (locally! - I am aware that some people run tmux on the remote end). tmux can be configured to display the session name or window name in the status bar. According to this man page the window name can be set with
$ printf '\033kWINDOW_NAME\033\\'.
When working locally or using ssh, this works. When using mosh, it doesn't, instead the string that should become the window name is echoed in the terminal.
My guess would be that mosh doesn't support the ESC k sequence, thus not forwarding it from the server to the client. In comparison, setting the window title with the OSC sequence ESC ] 2 ; works with mosh.
My environment: Gentoo Linux, tmux 2.6, mosh 1.3.2
FWIW, this was already discussed ~5 years ago: https://github.com/mobile-shell/mosh/issues/477#issuecomment-181026357
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported behavior with mosh, tmux, and the ESC k sequence, comparing it with local or SSH sessions and the working OSC 2 sequence. Trace the terminal-sequence handling related to ESC k; done means the sequence no longer echoes in the terminal and sets the tmux window name through mosh.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100