This question is similar to Run interactive Bash with popen and a dedicated TTY Python, except that I want to run Bash in a “dumb” terminal (TERM=dumb), and without putting the tty into raw mode. The code below is my attempt. The code is similar to the solution given in the linked question, with the major difference that it does
Tag: tty
Cross-platform method to detect whether /dev/tty is available & functional
I have a bash script from which I want to access /dev/tty, but only when it’s available. When it’s not available (in my case: when running my script in GitHub Actions) then when I try to access it I get /dev/tty: No such device or address, and I’m trying to detect that in advance to avoid the error and provide
Clear input buffer Assembly x86 (NASM)
Edit: This is similar to this: Reset a string variable to print multitple user inputs in a loop (NASM Assembly). But it is not the same issue. From the other post, I was able to prevent additional characters from being printed. However, I still cannot prevent those additional characters from being read when the program goes back to the point
How and when are interrupt key combination,such as CTRL-C, translated to signals?
Using a Linux OS, I need to transparently pass all keystrokes from remote connections to local hardware connections. This is fairly straight forward for everything but signals. I know I can register handlers for each signal that capture and pass the keystroke, but this seems like a hack that might not work for edge cases (what if someone changes the
How to write a transparent wrapper to terminal application?
Wrapper should handle special control characters and do something but otherwise not interfere with the actual application. (trying to build a tmux like app) So far I have the below modifying example in doc: https://docs.python.org/3/library/pty.html#example The above code works but the vim opened does not cover the entire terminal window. It starts vim with reduced rows and columns If I
Split TTY device based on packet type
I have a TTY device setup to monitor a serial port of a combined bluetooth/GPS chip. I’m using blueZ to implement the bluetooth stack and do everything bluetooth related. The data being sent across this port is all HCI packets, even the GPS data. The GPS data is wrapped in an HCI packet of type 0xXX (indicated by the first
Run “java -jar MyJar.jar” automatically on linux server, instead of on login and run from ssh
How can I run a Java .jar file, fx “java -jar MyJar.jar” automatically on a Linux server, instead every time I login and run it from ssh? I am looking for some way to automatically execute that command, or something to that effect. Also, how can I direct all output to some logfile? (I guess stdio in autostrt is unavailable.)
Suppress ‘Warning: no access to tty’ in ssh
I have a short simple script, that compiles a .c file and runs it on a remote server running tcsh and then just gives back control to my machine (this is for school, I need my programs to work properly on the lab computers but want to edit them etc. on my machine). It runs commands this way: So far
clear scrollback buffer of Linux Virtual Console Terminals
I’d like to clear the scrollback buffer on Linux console VTs programmatically. i.e. not just clear the current visible screen, but the entire scrollback buffer, too. I.e. everything that after a clear screen would still be visible with Alt-PgUp should be gone too. Anybody got an idea how to achieve that in nice code? Answer I don’t think this is
C write() doesn’t send data until close(fd) is called
So I have this test code to send “HELLO” over a USB serial port: The program executes fine and “HELLO” is sent but there is one problem. “HELLO” doesn’t seem to be sent when the write() function is called, but rather when the file descriptor is closed. I added the sleep(5) line above to test out this theory and sure