Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

tty

Run command and get its stdout, stderr separately in near real time like in a terminal

August 18, 2022 by Magenaut

I am trying to find a way in Python to run other programs in such a way that:

Categories Python, Q&A Tags pexpect, pty, python, subprocess, tty Leave a comment

Why is printing to stdout so slow? Can it be sped up?

August 18, 2022 by Magenaut

I’ve always been amazed/frustrated with how long it takes to simply output to the terminal with a print statement. After some recent painfully slow logging I decided to look into it and was quite surprised to find that almost all the time spent is waiting for the terminal to process the results.

Categories Python, Q&A Tags linux, printing, python, stdout, tty Leave a comment

Run interactive Bash with popen and a dedicated TTY Python

August 11, 2022 by Magenaut

I need to run an interactive Bash instance in a separated process in Python with it’s own dedicated TTY (I can’t use pexpect).
I used this code snippet I commonly see used in similar programs:

Categories Python, Q&A Tags bash, linux, python, python-2.x, tty Leave a comment

In which cases is SIGHUP not sent to a job when you log out?

August 11, 2022 by Magenaut

I read an answer from a user who claimed that running

Categories Q&A, Unix & Linux Tags signals, ssh, tty Leave a comment

Why does awk do full buffering when reading from a pipe

August 11, 2022 by Magenaut

I’m reading from a serial port connected to a gps device sending nmea strings.

Categories Q&A, Unix & Linux Tags awk, serial-port, tty Leave a comment

What happens when Ctrl + Alt + F is pressed?

August 11, 2022 by Magenaut

I am looking for an explanation of what happens in Linux when this key combination is pressed to change the current terminal. In particular, what software component intercepts this key combination and changes the terminal? Is it the kernel? If it is the kernel, could you provide the location of the source file which handles this?

Categories Q&A, Unix & Linux Tags console, keyboard, linux, terminal, tty Leave a comment

What exactly is scrollback and scrollback buffer?

August 10, 2022 by Magenaut

What are “scrollback” and “scrollback buffer” in programs like bash and screen, and how do they relate to the tty, the programs being run, and stdin/ stdout/ stderr?

Categories Q&A, Unix & Linux Tags buffer, scrolling, shell, terminal, tty Leave a comment

How to read/write to tty* device?

August 10, 2022 by Magenaut

I have a device that sends information over USB to my computer. Arch Linux sets up this device by creating a file named ttyUSB0 in /dev/. I have been using GTKterm to receive this incoming information and display it in an emulated terminal window.

Categories Q&A, Unix & Linux Tags tty, usb Leave a comment

force output to input (buffer) like “33[6n” in a script

August 10, 2022 by Magenaut

I have tried using pipes and redirections to have (C program or scripts) output end up on the input buffer, the way printf "33[6n" does, but no positive results.

Categories Q&A, Unix & Linux Tags c#, shell, shell-script, terminal, tty Leave a comment

How to get the real name of the controlling terminal?

August 10, 2022 by Magenaut

How can one get the real name of the controlling terminal (if there is one, else an error) as a pathname?

Categories Q&A, Unix & Linux Tags controlling-terminal, shell, terminal, tty Leave a comment
Older posts
Page1 Page2 Page3 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress