pty

GTK+ Vte.Terminal().fork_command_full removed?

╄→гoц情女王★ 提交于 2019-12-19 09:23:53
问题 I noticed this last week. All my code on ubuntu 15.04 was working fine using Vte.Terminal().fork_command_full Also this documentation site was showing this function as well, but does not now. Has this function been removed? If so, then what is the next simplest alternative to get a virtual terminal widget working. As this answer suggests the use of the above command, what is the next best way to get this widget up and running? NOTE: I am using python3 for this code 回答1: Update: This answer is

How to redirect a program that writes to tty?

喜欢而已 提交于 2019-12-18 06:59:09
问题 This is the un-redirected output (if you don't know what module is, it doesn't matter much): $ module help null ----------- Module Specific Help for 'null' ----------------------- This module does absolutely nothing. It's meant simply as a place holder in your dot file initialization. Version 3.2.6 Suppose I'd like to redirect that to a file.... $ module help null > aaa.txt ----------- Module Specific Help for 'null' ----------------------- This module does absolutely nothing. It's meant

How does ssh receive password from tty?

社会主义新天地 提交于 2019-12-14 03:34:18
问题 I was wondering how openssh gets the password when login, cause I got stuck in automating entering passwords to the similar tools in linux which requires getting password from tty like ssh. Tried to understand sshpass and found that sshpass forks a child process with the same pid then enters the password under the child process. Don't know if my guess was right that ssh needs to check the right pid since I cannot stdin to the current tty using another process to enter the ssh password. 回答1:

Pseudo terminal to use with ssh in java

柔情痞子 提交于 2019-12-13 04:34:29
问题 I am writing a program to connect to a remote server with ssh and provide the user with a shell terminal. I've tried JSch and sshj -- both can connect properly but just hooking up the input/output streams of their shell channels to System.in and System.out produces funky output. I know why--the documentations for both JSch and sshj say that they don't have terminal emulation built in so the input/output is ugly. (sshj calls this implementation a "rudimentary PTY") I also have a selection of

How to get HPUX to adopt a TTY as controlling

*爱你&永不变心* 提交于 2019-12-13 03:07:46
问题 A question that came through on the sshpass mailing list (and also on stack overflow). Sshpass does not work on HP-UX. Looking at the truss output, I see the following: -u [/tmp/sshpass][14066]{3783827} fork() ................... (returning as child ...) ......... = 14064 {3783821} The child process is 14066. -u [/tmp/sshpass][14066]{3783827} setpgrp3(2)................................................. [entry] -u [/tmp/sshpass][14066]{3783827} setpgrp3(2)......................................

Python terminal emulation

依然范特西╮ 提交于 2019-12-12 08:49:55
问题 I'd like to have an xterm-compatible virtual terminal running inside a Python app. I'll need to run ncurses-based applications inside it, feed it with user's input and read its output. So far I've found python-vte, but it only provides a GTK+ widget (libvte has the required VtePty class, but Python bindings don't) and has an unacceptable libgtk dependency. Is there any other way to perform a teminal emulation in Python? 回答1: After all, I've found the pyte, which is exactly what I wanted. 回答2:

Cygwin terminal buffers STDOUT

六月ゝ 毕业季﹏ 提交于 2019-12-11 14:26:40
问题 I use Altera Quartus software which comes with its own Cygwin distribution and a dumb terminal which, according to the shortcut placed in my Start Menu by Altera, is run using cmd.exe /c "c:\altera\15.1\nios2eds\NiosII Command Shell.bat" where this batch file configures the environment for Quartus and launches bash. When I use this window to run Altera tools, their output comes out immediately (not buffered) and in color. I also have my own Cygwin installation with an Xserver and terminals (i

Cannot open pty under Mac OS High Sierra

ε祈祈猫儿з 提交于 2019-12-11 08:27:43
问题 The essence of my question is "How can a user program open a pty (e.g., /dev/ptyp0) on Mac OS High Sierra?" A standard open() of the device name does not seem to work, even though its protections are crw-rw-rw-. The context is running Emacs under Mac OS. Before High Sierra, when I ordered Emacs to create a shell window within which is a subprocess, Emacs allocated a pty with which to communicate with the subprocess. After upgrading to High Sierra, Emacs can no longer allocate the pty, and

rlwrap: Could not open master pty: No such file or directory

青春壹個敷衍的年華 提交于 2019-12-11 04:08:45
问题 When trying to run rlwrap tclsh I am getting this error message: rlwrap: Could not open master pty: No such file or directory What causes this? How to fix this issue? P.S. I am running 64 bit CentOS. 回答1: check /dev/ptmx it should have crw-rw-rw- I once had it crw------- this caused the error message at my system. see also man ptmx : 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 pseudo

How to determine which pair of pseudo tty ports are connected to each other

雨燕双飞 提交于 2019-12-11 03:43:18
问题 I have two python programs that are to communicate with each other over a point to point tty serial connection. To simulate the connection, I create a bi-directional byte stream using socat as here: socat -d -d pty,raw,echo=0 pty,raw,echo=0 The console returns the following, indicating the two pty ports that are now connected together: 2018/04/15 22:33:03 socat[18197] N PTY is /dev/pts/2 2018/04/15 22:33:03 socat[18197] N PTY is /dev/pts/3 2018/04/15 22:33:03 socat[18197] N starting data