Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [tty]

A representation of a device that asynchronously transmits and receives serial data.

0
votes
0answers
35 views

Logins and logouts history on linux

I am trying to look for the history of logins and logout on Unix systems: on Linux and OSX. I found that there's the wtmp file which logs the history of the login and logouts. However, I am still ...
0
votes
0answers
15 views

Do the input queue and output queue belong to the terminal device, its driver, or line discipline?

In APUE, where should the input queue and output queue (shown in the first figure) appear in the second figure? For example, in "actual device" in "terminal device driver" in "terminal line ...
0
votes
1answer
31 views

How to make `tty` work in .bash_profile

I have the following in my ~/.bash_profile in order to try to make GPG work nicely: export GPG_TTY="`tty`" But when I open a new shell, I get the following: $ echo $GPG_TTY not a tty However, if ...
-1
votes
0answers
25 views

Blink when do Clear/Ctrl-l in console/tty

I've noticed that if we use clear or ctrl-l to clean screen in console/tty, the prompt will do a quick blink, how would we avoid this? maybe make it clear screen but do not affect prompt itself.
1
vote
1answer
43 views

Terminal output not displayed for certain commands

I'm having a weird problem on Ubuntu 18.04 (Desktop) where certain commands don't display output to the terminal when they are run when they definitely should. I can still capture the output of the ...
0
votes
1answer
23 views

Send program's serial output to pseudo-terminal used by serial sniffer such as jpnevulator

I am running an application that communicates through a real serial port e.g. /dev/ttyS0 to a remote device. I can configure this application to use /dev/ttyS0, /dev/ttyS1, etc., by passing the ...
0
votes
1answer
19 views

Can I log user input and program output separately for a terminal session?

I wish I could make script work like this: ❯ script --user=call.log --prog=response.log Script started ❯ echo foo foo ❯ exit Script done ❯ cat call.log echo foo ❯ cat response.log ...
1
vote
2answers
45 views

Why application does not run from SCREEN without delay?

Suppose we need to run application in screen and keep it running when screen exits. The following command does the job, but only if "sleep 1" is appended to it. Why it does not work without "sleep 1"? ...
1
vote
1answer
45 views

Is this output from “who -a” normal?

This does not look normal to me: who -a system boot 2018-09-04 11:59 LOGIN tty1 2018-09-04 11:59 685 id=tty1 run-level 5 2018-09-04 11:59 user + pts/...
0
votes
1answer
54 views

tty1 missing login prompt

I have a clean Debian Stretch installation. It used to be the case that after booting I would end up on tty1 with a login prompt, and after logging X is started. I wanted to automate the logging in (...
0
votes
1answer
27 views

What causes xserver output to go blank when switching to tty console?

I am trying to run two monitors using two graphic cards. The first monitor is used for TTY, the second monitor is used to launch xserver. When I launch xserver, I still have my other screen showing ...
0
votes
0answers
39 views

Specify tty numbers

As described here on can change the number of tty. However how can I configure it that I have only tty7,...,tty10 (and tty1 to tty6 are disabled)? I usually use only tty7 upwards because pressing Ctr+...
1
vote
0answers
36 views

RS485: ioctl: ttyS1 not a tty device

I have a board with UART, and an external converter to RS485. It sits at /dev/ttyS1. The converter requires that I put the UART RTS pin to high when sending and to low when receiving. I can achieve ...
2
votes
2answers
55 views

Configure tty to prompt password for specific user

If I switch to a tty, say tty3, it asks me for a username and then for the corresponding password. How can I achieve, that (only on tty3) it asks me just for a password for a pre-defined user name (...
1
vote
1answer
14 views

Thermal printer only print after send a second output data to tty port

I have a PCI Serial Card installed on a POS computer and I'm trying to install an old thermal printer in it. The test command ls > /dev/ttyS4 works well, but only after the second time I send it. For ...
0
votes
0answers
21 views

What obstacles are there to “move” a program to Tmux?

Suppose there is a program mc ran by bash in terminal iTerm. The /dev/tty is exposed by iTerm, the three file descriptors 0, 1, 2 are connected to that device (I know that Bash opens /dev/tty, while a ...
0
votes
0answers
21 views

How to use external monitor through HDMI without X / graphical environment?

I'm running Arch Linux on a laptop. I usually log in to the TTY console and only startx when I need to. I have an HDMI output and would like to use an external monitor. It works fine with xrandr but ...
1
vote
0answers
47 views

Why is root always logged in from ttyS0 (even after system reboot)? [closed]

I am continuously seeing root in the output of the w command on a virtual machine hosted on the cloud. I have restarted the machine several times and even tried sending CtrlAltDel from the OpenNebula ...
1
vote
0answers
50 views

Why does my serial port give a response without a loopback cable?

I'm new to using serial ports, and I have a loopback cable for serial on a Centos 7 machine. I have something in python that tests the port, but I've found that the program returns the expected ...
0
votes
0answers
13 views

Lightdm: Starting the Desktop Environment Depending on Which User Logged In

I'd like to set up a user account (lets call it userA) that, on login, instead of starting the desktop environment (Budgie), it goes to a TTY. Having the inverse behavior (starting at the TTY first ...
0
votes
0answers
32 views

Blank screen on raspberry pi on tty1

I have a raspberry pi 3 with a minimal version of Debian stretch installed. The serial output works fine, however, I can't get any output via HDMI. There is actually an HDMI output (monitor is having ...
0
votes
1answer
15 views

Software flow control: why TX is blocked on terminal?

Why terminal cannot send data after ^S was pressed? I have always thought that ^S is used by terminal to tell tty driver that tty driver must not transmit data from application TO terminal (when it is ...
1
vote
2answers
43 views

How to give a tty a mode other than 640 and have it persist through reboot

I have an embedded device (Nvidia Jetson TX2 running Ubuntu 16.04) in a carrier board and need to use the serial port. The serial port on the carrier board maps to ttyS0 which by default is owned by ...
0
votes
1answer
46 views

How to restrict a user from using tty?

i was wondering if it is possible to force log out a user (anyone other than root) when trying to login via tty (ctrl+tab+f1/f2/f3..). The user should be able to use pts with no problems. Using CentOS ...
-1
votes
1answer
45 views

Linux VT supports 8 colors but there are actual 16 distict ones. Why is so that?

According to Wiki's https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit article there are 8 "Standard colors" and 8 "High-intensity colors". When I checked terminal capability of the Linux' virtual ...
0
votes
0answers
40 views

Why does ssh allocate a tty on server side?

Basically when you run an interactive program on the server you need to use ssh -t instead of ssh. For example: This works: ssh -t user@server top. This doesn't work: ssh user@server top. Question ...
0
votes
0answers
7 views

Unable to interact or switch tty's, but SysRQ+O and SysRQ+B works. What is that status?

A computer running Linux Mint 18.3 Sylvia 64-Bit on the MATE desktop hung up while I was absent for a few minutes, leaving tty3 open. The graphical desktop was only active on tty7. Firefox, running ...
1
vote
1answer
43 views

How to remove sshd pts processes in status D without restarting servers

Why are these sshd-pts processes stuck in status D? It seems the system load averages are increasing due to these processes. How can I remove them without restarting my server. (add ppid and etime) [...
1
vote
0answers
27 views

PING token missed after un-successful Bulk OUT transfer

I'm trying to send a large amount of data(~15 Mb) from Host to Device over ttyACM3. I have used "cat" command for sending the data from host. Host side: cat ./pattern.bin > /dev/ttyACM3 Device ...
2
votes
0answers
101 views

Data loss over ttyACM* when 'cat' command is used for data transfer

I have a development board which will have 3 ACM interfaces when connected to Ubuntu host and i want to transfer data from Host to Device over ttyACM3. I have followed the following procedure for ...
0
votes
1answer
56 views

Determine if process was launched directly from a terminal window or programmatically as a child process

If a user runs a process from a terminal, is it possible to tell? Compared to if the process was launch from a program, where that program was launched from a terminal. The use case is if it's run by ...
6
votes
1answer
159 views

Keyboard shortcuts in the virtual terminal

Is there any way of configuring keyboard shortcuts in the Linux virtual console? For example, if I go to tty1 then press the key combination Ctrl+Alt+H, I would like the script /usr/bin/hello.sh to ...
-1
votes
2answers
51 views

PC speaker beep and messy terminal font due to dd if=/dev/sda?

When running sudo dd if=/dev/sda the internal PC speaker makes sounds. Also all fonts, even the prompt and typing input has different characters such as "♡" or "•". If you need to know more, ...
0
votes
1answer
178 views

Stuck at login loop while tty and recovery mode terminal works fine

I am having linux mint 18. I accidentally removed /bin/bash. So just after removing it I changed the default shell of the user from terminal (from /bin/bash to /bin/sh and /bin/sh links to dash) in /...
1
vote
3answers
122 views

How to check if the current shell session is in the gui or the tty

Which environment setting in the zsh shell will allow me to find whether I am in the x-server or if I am in the console? I am trying to find a way to implement having different setting in my .zshrc ...
0
votes
1answer
46 views

How to use write command to send message to user in debian stretch

who command show that xyz user is on tty2. $ who xyz tty2 2018-06-22 08:18 (:0) I trying send message to xyz using write xyz command. But it does not shows on terminal. When I run tty ...
1
vote
1answer
48 views

How to boot directly into GUI without going through tty

I recently did dnf update and it uninstalled gnome, so I did dnf groupInstall "Fedora Workstation". This restored gnome but every time I boot up, I have to login from the console and use startx. Any ...
1
vote
2answers
70 views

Redirecting a string to current TTY

I have some code: char *tty_name = ttyname(STDIN_FILENO); char command[255] = "/usr/sbin/writevt -t "; strcpy(stpcpy(command + 21, tty_name), " -T ' \r'"); system(command); It writes a "space" and a ...
0
votes
1answer
98 views

Some confused concept: ptmx and tty

All the following commands run in my debian terminal. ls /dev |grep ptmx /dev/ptmx ls /dev/pts 0 1 ptmx What is the difference between /dev/ptmx and /dev/pts/ptmx? ls /dev/tty* |sort /dev/...
3
votes
2answers
152 views

Does TTY always get used when we open any terminal? [duplicate]

I have been trying to understand how the TTY device driver works on a Linux machine for a few days now and still can't wrap my head around the idea. When we open a terminal to ssh to a server, I ...
2
votes
1answer
30 views

What does this stream of characters represent (when using unbuffer)?

I'm using unbuffer to run a command that expects to be run within a tty. However it's returning the following: [?1049h[?1049l[?12l[?25h(B[?12l[?25happ: empty picture What do these characters ...
0
votes
2answers
80 views

Does systemd not protect processes against acquiring a controlling terminal?

man 7 daemon When a traditional SysV daemon starts, it should execute the following steps as part of the initialization. Note that these steps are unnecessary for new-style daemons (see ...
6
votes
1answer
142 views

what relations are between my current controlling terminal and `/dev/tty`?

On Lubuntu 18.04, I run a shell in lxterminal. Its controlling terminal is the current pseudoterminal slave: $ tty /dev/pts/2 I would like to know what relations are between my current controlling ...
0
votes
0answers
20 views

TTYS config problem

I set my ttyS5 to be: stty 1152000 cs8 -parenb crtscts -echo -F /dev/ttyS5 And shorted my RS232 output(Tx<->Rx) to see if I can send and receive massage using: cat /dev/ttyS5& echo Hello >...
2
votes
1answer
44 views

Are all the slaves paired with the same master?

In bash in lxterminal $ tty /dev/pts/2 $ ls /dev/ptmx -l crw-rw-rw- 1 root tty 5, 2 May 26 09:38 /dev/ptmx On Ubuntu, is there only one master for all the processes, and all the slaves are paired ...
1
vote
2answers
75 views

Do the output of command `tty` and the file `/dev/tty` both refer to the controlling terminal of the current bash process?

From man tty tty - print the file name of the terminal connected to standard input $ tty /dev/pts/2 From APUE: Historically, the name of the controlling terminal in most versions of the UNIX ...
1
vote
2answers
148 views

Auto startx before login on FreeBSD

This problem is driving me crazy! I use "/etc/ttys" on FreeBSD to configure the commands that are executed when getty is executed. This is the relevant line of my config file /etc/ttys: ttyv8 "/...
0
votes
1answer
85 views

What happens when I forget to logout in TTY?

This is something I have asking myself for some time. Imagine the following: I press CTRL+ALT+F1 to switch to TTY1 I login there and execute a command I switch back to xorg with CTRL+ALT+F7 I forget ...
4
votes
1answer
337 views

udevadm rule works using “udevadm test” but not with “udevadm trigger”

I have created a simple rule called "99-usb.rules" that simply names a tty port of a specific device KERNEL=="ttyACM*", ATTRS{idVendor}=="2341", NAME="mydevice" This rule works fine when I run a ...
1
vote
1answer
536 views

Installing Kali Linux on Hp Omen 15

I have been trying to install Kali Linux Rolling amd64 on HP Omen 15 without success. First, neither the WIFI nor the desktop were working, and a lot of googling turned out useless. Then I got the ...