tty Questions
1
Solved
0
Many Unix programs such as mysql and expect are able to send messages directly to the user's tty, bypassing redirected stdout and stderr streams. For example, mysql is able to print a password prom...
5
I am trying to do some work on a remote server using ssh--and ssh is called on the local machine from node.js
A stripped down version of the script looks like this:
var execSync = require("child_...
Devious asked 6/8, 2015 at 21:35
8
Solved
How to get tty size with Golang? I am trying do this with executing stty size command, but I can't craft code right.
package main
import (
"os/exec"
"fmt"
"log"
)
func main() {
out, err := e...
2
Solved
I'm using Git Bash on Windows 10. I would like to import a SQL file to be run in my PostGres 12 local database. I tried the below
$ PGPASSWORD=$DB_PASSWORD psql -U${DB_USER} $DB_NAME < scripts/m...
Harrier asked 20/7, 2022 at 14:19
6
Solved
I want to read a single character at-a-time from the command line in PHP, however it seems as though there is some kind of input buffering from somewhere preventing this.
Consider this code:
#!/u...
Advertising asked 10/9, 2010 at 11:53
8
Solved
I have a Linux process developed by a third-party that communicates with a terminal. For debugging I want to see the communication going back in forth.
One might think cat would do the trick (to s...
Audition asked 4/8, 2010 at 22:24
2
Solved
I have a executable which requires a tty (as stdin and stderr), and want to be able to test it.
I want to input stdin, and capture the output of stdout and stderr, here's an example script:
# test...
Premillenarian asked 23/10, 2018 at 16:56
3
in the BusyBox command for Linux exists the command microcom to communicate with a serial modem:
BusyBox v1.13.2 (2012-05-10 17:13:08 CEST) multi-call binary
Usage: microcom [-d DELAY] [-t TIMEOU...
Waddell asked 28/8, 2012 at 14:17
2
Solved
I'd like to disable colors when the output is piped somewhere else than a terminal.
3
Solved
Bash has a 'magical behavior', if you type 'ls', usually you will get colorful output, but if you redirect the output to a file, the color codes are gone. How to achive this effect using Go. e.g. W...
2
Solved
With the following code:
use strict;
use warnings;
use utf8;
use IO::Pty;
use Data::Dump qw(pp);
my $pty = IO::Pty->new;
open *STDOUT, '>&', $pty->slave;
if ( my $pid = open *STDOUT...
2
Solved
When I activate a virtual environment via poetry shell, GPG signing gets messed up because $GPG_TTY is set for the parent shell. So every time I use poetry shell I have to do GPG_TTY=$(tty). Is the...
Notochord asked 15/4, 2021 at 10:44
3
Solved
3
Solved
When I run an interactive Python inside an Emacs shell buffer (M-x shell), it does two surprising things to the TTY. First, it turns on input echo, which persists after Python exits, until I do stt...
3
Solved
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:
mas...
Reminiscence asked 9/1, 2017 at 7:28
5
Solved
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 ...
4
Solved
What are the differences between this two examples?
#!/usr/bin/perl
use warnings;
use 5.012;
my $str = "\x{263a}";
open my $tty, '>:encoding(utf8)', '/dev/tty' or die $!;
say $tty $str;
close...
Ululant asked 12/1, 2011 at 9:35
2
I upgraded my Linux(Opensuse from 42.3 to 15) but encountered new bug.
When I connect my USBserial dongle it shows ttyUSB0 in dev folder and immediately disconnected and goes from dev list.
...
Policeman asked 3/9, 2018 at 5:42
4
I have some script I need to run during a Docker build which requires a tty (which Docker does not provide during a build). Under the hood the script uses the read command. With a tty, I can do thi...
Ambur asked 14/10, 2015 at 23:39
9
I go through first django tutorial from djangoproject.com and at the very beginning of part 2, which is creating superuser when I run "python manage.py createsuperuser" I get the following message ...
3
Solved
I've recently run into some slightly odd behaviour when running commands over ssh. I would be interested to hear any explanations for the behaviour below.
Running ssh localhost 'touch foobar &...
30
I am trying to compile some sources using a makefile. In the makefile there is a bunch of commands that need to be ran as sudo.
When I compile the sources from a terminal all goes fine and the ma...
2
Solved
I have a program in Linux which refuses to run if its stdin/stdout is not a TTY (terminal device). Is there an easy-to-use tool which will create a PTY, start the program with the newly created TTY...
9
Solved
What exactly does this option do? I've been reading a lot on TTY and I'm still confused. I played around without having the -t and just -i and it seems like programs that expect user input throw an...
1 Next >
© 2022 - 2025 — McMap. All rights reserved.