3 ms·
> "The OS has nothing to do with this aside setting ..." note: Additional technical information context/solution provided for answer is a bit beyond the typic
by sargstuff 3y ago
> "The OS has nothing to do with this aside setting ..."
note: Additional technical information context/solution provided for answer is a bit beyond the typical response required for question.
OS has better control/access to user set of i/o streams.
Not the most efficient/convenient way, but ebpf can be setup to detect 'escape text patterns' and filter by user/xwindows widgets/aspect of program such as title. Would be a pain, because of need to deal with inband/non-cannonical characters (ctrl-D & EOF being majority of live stream problem)
Sticking to 'title change' is a non-continuous stream aka for this talk, first non-connonical character closes the stream, aka no distinction between Form Feed / Line Feed or ctrl-D.
Simple user land way would be to redirect terminal to sed /awk script to identify 'title' command, strip out the 'security sequence issues' before passing along i/o to what ever is going to do the 'window with title to change'.
OS, windows manager, initial login shell and process initiating the window who's title are to be changed are parent processes with io points that can be redirect with the aforemention script.
in-band control for terminals also allows for redirecting to remote machines via programs like telenet without the need for ssh! (for security, would need to do a few other things too) 1st process to
Using loopback device/socket instead of named/anonymous pipe redirection will allow for raw/non-cannonical input (control done out of band) -- assuming the filter program (other than standard user shell) setup to handle/pass along raw/cannonical input/output.
Sort fun way to customize 'rm -rf' with a pop-up check question 'Are you really sure you want remove everything' and terminate the command if unintentional (and/or keep tabs on what removed by running find command / mail list).
further search terms: stty, tty, raw, cooked, canonical, non-cannonical
For this topic, perhaps confirm with user if really wanted to allow (escape sequence), retry(filter out ansi sequence), aboard(skip it). Or just log attempt for review/action later.