Talk:Terminal control/Positional read: Difference between revisions

 
(4 intermediate revisions by 2 users not shown)
Line 48:
 
I have not found any way to synchronize this operation if multiple processes (perhaps in different tmux panes) want to read characters at the same time. --[[User:Kernigh|Kernigh]] 19:48, 22 September 2011 (UTC)
 
=== What '''terminals''' have this capability? ===
 
This task is "terminal control", but what terminal control languages allow screen contents to be remotely read? Certainly not ANSI/VT100.
 
Most of the solutions seem to be about local framebuffers or Windows text consoles, which are not "terminals".--[[User:Kazinator|Kazinator]] ([[User talk:Kazinator|talk]]) 19:36, 19 June 2017 (UTC)
 
: I am actually not sure if any terminals have this capability. I have read about something analogous being a security with X windows. As a general rule, if you want to support this kind of thing you do it by owning the terminal and keeping complete track of everything you put there. You do need to know its size (and when it changes size) to make this work. You also need to know when something else has damaged the thing to know when you need to re-update it. (Which is basically what paint events are, in most modern gui environments.) --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 19:51, 19 June 2017 (UTC)
:: It clearly has some security implications. Even if the console is accessible only within a given user context, it could be a problem that application A can read something that was put on the screen by application B. Speaking of "keeping track of everything you put there", I was prompted to go looking through the curses API to see whether this could be solved using curses. Curses does know everything that has been put into the screen, so it can do the optimized updates. I didn't find an API for getting characters out, though.--[[User:Kazinator|Kazinator]] ([[User talk:Kazinator|talk]]) 20:43, 19 June 2017 (UTC)
::: The right approach there, as in any context, is probably to maintain your own buffer. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 21:32, 19 June 2017 (UTC)
6,951

edits