The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
2answers
38 views

Different behavior of tty's vs pty's

If I do man bash inside of X, e.g., in xterm or mate-terminal, I get some words underlined. If I do man bash in a virtual terminal, I get those same words colored. Can I get the same coloring in X? ...
1
vote
1answer
64 views

Mocking a pseudo tty (pts)

We would like to run some curses based apps in background. These apps use curses and get the current tty port name to be used internally to map log files and others context-terminal associations. ...
2
votes
1answer
48 views

How can I fix /dev/pts after mounting it?

I made the same mistake as in this question: Debian chroot blocking PTTYs on host I mounted a "devpts" filesystem inside a chroot, and now urxvt can't create ptys. Oddly enough xterm still can. ...
1
vote
1answer
57 views

Using cron to start a process on a terminal without using screen?

I want to start a process in a terminal using cron. I want the process to start in a terminal, so that I can continuously see the output of the process on the terminal, and kill it / restart it etc. I ...
2
votes
1answer
46 views

using a pty like a socket?

I'm writing a collection of scripts to talk to an external program. My problem is that the scripts are only "alive" for a short time (triggered by a keypress in a larger program) but the external ...
0
votes
2answers
34 views

Where can I find the speciation that a terminal emulator must meet?

I'm interested in writing a terminal emulator for fun. I roughly understand the division of labor between the shell and the terminal emulator from this post: What is the exact difference between a ...
1
vote
2answers
142 views

How are long command lines ( > $COLUMNS ) automatically wrapped to a new line?

There are several points where I/O is passed through, some of which (to my knowledge) are the shell, pty, tty, termios, terminal emulator application. In most terminal emulators, long command lines ...
2
votes
2answers
35 views

Triggering zero-byte reads on FIFO/pty

I'd like to know how to emulate the ICANON behavior of ^D: namely, trigger an immediate, even zero-byte, read in the program on the other end of a FIFO or PTY or socket or somesuch. In particular, I ...
1
vote
1answer
54 views

Saving colored output regardless of the source

How can I save colored output to a file regardless of the source when the sources turn coloring off if they detect their stdout isn't a terminal?
1
vote
1answer
68 views

Attach tmux to pty after reptyr?

I've got reptyr to "open a new pty" by doing: reptyr -L 7969 where 7969 is the PID of rabbitmq-server. The output of reptyr is Opened a new pty: /dev/pts/25 but how do I attach tmux to that ...
4
votes
1answer
244 views

How do I come by this pty and what can I do with it?

It seems that a simple shell redirect from /dev/ptmx gets me a new pseudo-terminal. $ ls /dev/pts; ls /dev/pts </dev/ptmx 0 1 2 ptmx 0 1 2 3 ptmx It disappears as soon as the process that ...
2
votes
1answer
232 views

Determine the owner of the session of a process

I am trying to implement a way to determine which user is owner of some process's session, in a way that's as cross-platform as possible. In Linux I can trace the process's pty by following the link ...
5
votes
2answers
281 views

How do I preserve coloured output when piping to `less -R`?

$ ffmpeg -v debug ... Coloured output. $ ffmpeg -v debug ... |& less -R Dull output. How do I make the output coloured while piping it to something?
1
vote
1answer
168 views

How to capture data transferred on a PTY?

I am running NetBSD 6.1.4, and I have an stunnel instance with the following configuration: [https service] accept = 443 CAfile = /u01/usbtether/CA/certs/rootCA.crt cert = ...
0
votes
1answer
36 views

How can I automatically interrupt what I'm doing to input something?

As per Nick Winter's The Motivation Hacker, I want to measure my happiness. I know that I'm bad at remembering things or responding to reminders, so I'd like to set up a daemon that, at random ...
4
votes
1answer
102 views

Is it possible to change what tty a terminal emulator is connected to?

If I have a terminal emulator (say, xterm) by default it connects to a pseudoterminal like /dev/pts/3 What I would like to know is if it is possible to connect it directly to, say, tty1? Could I ...
20
votes
2answers
893 views

How can we know who's at the other end of a pseudo-terminal device?

If I do a: echo foo > /dev/pts/12 Some process will read that foo\n from its file descriptor to the master side. Is there a way to find out what that(those) process(es) is(are)? Or in other ...
1
vote
1answer
794 views

Why root can't open pseudo terminal device? (permission denied)

Using a non-root user, I'm creating a pseudo terminal with socat like this: socat -d -d PTY,link=$HOME/.wine/dosdevices/com1,raw,echo=0 PTY,link=/tmp/com1-pty,raw,echo=0 and I need a root ...
1
vote
0answers
319 views

Which process is occupying a certain pseudo terminal pts/X?

On Linux: Normally pseudo terminals are allocated one after the other. Today I realized that even after a reboot of my laptop the first opened terminal window (which was always pts/0 earlier) ...
2
votes
0answers
1k views

Trying to understand how TTYs and PTYs work in CentOS 6.5? [duplicate]

I started to dig into the whole Linux pty and tty hell. I'm trying to understand how it works here in Linux so I was reading quite a lot of articles that covered this topic. So far I know: TTYs ...
3
votes
1answer
442 views

What is the maximum allowed number of TTY, is it defined anywhere in kernel headers?

What's the maximum allowed number of TTYs? I found pty.max, but is there anything similar for TTYs? Or is it defined as a fixed value in kernel headers, I couldn't find that
19
votes
3answers
19k views

What is stored in /dev/pts files and can we open them?

According to my knowledge, /dev/pts files are created for ssh or telnet sessions.
14
votes
2answers
3k views

How does a Linux terminal work?

If you fire up a terminal and call an executable (assuming one thats line oriented for simplicity) you get a reply to the command from the executable. How does this get printed to you (the user) does ...