Sending alt-n to /dev/pts/1 from process bound to /dev/pts/2


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Sending alt-n to /dev/pts/1 from process bound to /dev/pts/2
# 1  
Old 08-11-2008
Sending alt-n to /dev/pts/1 from process bound to /dev/pts/2

Hello,

i am using finch (unix commandline instant messaging client using libgnt) which is running connected to /dev/pts/1

Now I would like to "remote control" the program by sending the key combinations normally typed on the keyboard from a programm in another shell. So I tried:
Code:
remotecontrol > /dev/pts/1

which sends "normal" characters like a,b,c to the window and displays them there. But all special characters like ALT-n or Enter (\x00a) do just nothing.
Now that I write this I am not quite sure wether or not
Code:
remotecontrol > /dev/pts/1

sends its stdout to stdin of finch? Or does it just write to the window anywhere and finch never sees these strings? How do I properly adress fd0 of /dev/pts/1?

Thanks for any hint or help,

Juergen
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Problem with PTS

Hello, I´m working with an m4000 server, with solaris 11. the problem is when users connect to the server, I have the range from pts/65 to pts/128 "blocked". The system does not take any pts of that range. Usually a close all the connections and the problem is solved, but this time that solution... (3 Replies)
Discussion started by: salvador_cast
3 Replies

2. Shell Programming and Scripting

Automating partitioning setup of /dev/sda on /dev/sdc

Objective: To recreate the partitioning setup of /dev/sda on /dev/sdc How would I parse the below information and initialize variables (an array?) that can be used to build sgdisk commands in a script, regardless of the number of partitions? Something along the lines of: sgdisk -n... (12 Replies)
Discussion started by: RogerBaran
12 Replies

3. UNIX for Dummies Questions & Answers

pts and tty

hi iam very new to linux can anyone tell me about pts and tty acctually today morning i logged into my pc at 9:51 when i have given #who it has given sam tty7 9:51 sam pts/1 10:11 so what does it mean (1 Reply)
Discussion started by: praneel2k
1 Replies

4. Solaris

What is /dev/tty /dev/null and /dev/console

Hi, Anyone can help My solaris 8 system has the following /dev/null , /dev/tty and /dev/console All permission are lrwxrwxrwx Can this be change to a non-world write ?? any impact ?? (12 Replies)
Discussion started by: civic2005
12 Replies

5. UNIX for Dummies Questions & Answers

Switching the active pts?

My apologies in advance if this question has already been asked or if I use incorrect terminology; I have tried searching for nearly an hour without any luck. Is there any way to change the active TTY for a session? I was monitoring a long (~5 hour) process through an SSH connection and the... (4 Replies)
Discussion started by: tspicher
4 Replies

6. UNIX for Advanced & Expert Users

one of the mount pts 100%

Hi all, recently we had a critical error like one of the mount points /online was 100% full. Even when we deleted three ( 3 ) 0.5 GB files available space in /online mount was not increasing rather df -k for /online continued to show as 100% full. what could be the problem, even... (6 Replies)
Discussion started by: matrixmadhan
6 Replies

7. UNIX for Dummies Questions & Answers

finger, getting name and pts from ip addr

im ultra new at unix and was wondering if its possible to create aliases of the write command that send messeges to users using an ip address. i was thinking to use the '|awk' with the command finger but as i've said im a total newbie. thanks a lot in advance. (2 Replies)
Discussion started by: swag:þ
2 Replies

8. UNIX for Dummies Questions & Answers

who -uH, kill the process at different pts/tb

i log in as root and is in pts/11 , do a who -uH, got the below root pts/11 Dec 11 08:01 0:10 11588 root pts/12 Dec 11 09:09 0:03 12001 now do a ps -ef | grep pts/12, get the below root 12133 12107 0 09:18:22 pts/13 0:00 vi myoracle root 12107 12105 ... (3 Replies)
Discussion started by: yls177
3 Replies

9. UNIX for Dummies Questions & Answers

what is /dev/pts/1

hi, i ran tty and get this /dev/pts/1? what does /dev/pts/1 indicates about my terminal and the device files? thanks (4 Replies)
Discussion started by: yls177
4 Replies
Login or Register to Ask a Question
PTS(4)							     Linux Programmer's Manual							    PTS(4)

NAME
ptmx, pts - pseudoterminal master and slave DESCRIPTION
The file /dev/ptmx is a character file with major number 5 and minor number 2, usually of mode 0666 and owner.group of root.root. It is used to create a pseudoterminal master and slave pair. When a process opens /dev/ptmx, it gets a file descriptor for a pseudoterminal master (PTM), and a pseudoterminal slave (PTS) device is created in the /dev/pts directory. Each file descriptor obtained by opening /dev/ptmx is an independent PTM with its own associated PTS, whose path can be found by passing the file descriptor to ptsname(3). Before opening the pseudoterminal slave, you must pass the master's file descriptor to grantpt(3) and unlockpt(3). Once both the pseudoterminal master and slave are open, the slave provides processes with an interface that is identical to that of a real terminal. Data written to the slave is presented on the master file descriptor as input. Data written to the master is presented to the slave as input. In practice, pseudoterminals are used for implementing terminal emulators such as xterm(1), in which data read from the pseudoterminal mas- ter is interpreted by the application in the same way a real terminal would interpret the data, and for implementing remote-login programs such as sshd(8), in which data read from the pseudoterminal master is sent across the network to a client program that is connected to a terminal or terminal emulator. Pseudoterminals can also be used to send input to programs that normally refuse to read input from pipes (such as su(1), and passwd(1)). FILES
/dev/ptmx, /dev/pts/* NOTES
The Linux support for the above (known as UNIX 98 pseudoterminal naming) is done using the devpts filesystem, that should be mounted on /dev/pts. Before this UNIX 98 scheme, master pseudoterminals were called /dev/ptyp0, ... and slave pseudoterminals /dev/ttyp0, ... and one needed lots of preallocated device nodes. SEE ALSO
getpt(3), grantpt(3), ptsname(3), unlockpt(3), pty(7) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2016-03-15 PTS(4)