[konsole] [Bug 500842] New: Support OSC 3008: Hierarchical Context Signalling

bugzilla_noreply at kde.org bugzilla_noreply at kde.org
Thu Feb 27 22:53:31 GMT 2025


https://bugs.kde.org/show_bug.cgi?id=500842

            Bug ID: 500842
           Summary: Support OSC 3008: Hierarchical Context Signalling
    Classification: Applications
           Product: konsole
           Version: 24.12.2
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: emulation
          Assignee: konsole-devel at kde.org
          Reporter: nilskemail+kde at gmail.com
  Target Milestone: ---

SUMMARY
OSC 3008 is a new sequence that can be used to notify terminal emulators about
any context changes.
Examples of such context changes are: Entering containers, gaining elevating
privileges, or establishing a remote shell using SSH.

STEPS TO REPRODUCE
1. In bash, source
https://github.com/systemd/systemd/blob/main/profile.d/80-systemd-osc-context.sh
2. (The above step installs a hook for the bash prompt, drawing the current
prompt already emitted the sequence)

ADDITIONAL INFORMATION
The sequence is very new and being specified by systemd. When using the latest
systemd from main, commands like systemd-vmspawn, machinectl shell,
systemd-vmspawn and run0 already produce these sequences. The exact spec can be
found here: https://github.com/systemd/systemd/blob/main/docs/OSC-CONTEXT.md

It would be very valuable if some of the maintainers would take a look at the
spec and see if there are concerns/reservations about the current design from
the view of KDE/Konsole. So far only the Ptyxis maintainer has chimed in. The
spec is still fresh and malleable until a release happens. Currently the next
expected release is a while away but the sooner there is feedback the easier it
will be to incorporate it.

POSSIBLE USE CASES
- paint the background in dark red when running run0/sudo or blue when unvoking
ssh
- setting the window title based on some of the emitted values (e.g. the
"vm=..." and "container=..." fields)
- detecting the currently invoked command and working dir (while Konsole
already scans them from /proc this would still be relevant where that is not
accessible, i.e. Flatpak or Windows)
- provide some kind of shell-history minimap (similar to ones in IDEs) with
colored regions to see where on was in a container etc
- provide bookmarks/jumps to previous context switches

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list