Questions tagged [tty]
A representation of a device that asynchronously transmits and receives serial data.
990 questions
5
votes
1
answer
574
views
Fool a program it has a pty of specific size
I use nethack with ttyrec to archive my funny deaths.
My only issue is that nethack uses as much screen space as possible to print log massages.
I would like to limit it to only work with 80x24 ...
5
votes
1
answer
496
views
Which Linux distributions bind TTYs to Control + Alt + F13 to F24 keys?
All Linux-based OSes I've seen provide TTYs for F1 through to F12. However, do they allocate TTYs for F13 through to F24? I've located github.com/dvdhrm/kmscon/issues/29, which appears to be similar ...
2
votes
1
answer
94
views
Do special (language specific) characters keep a hidden trace when deleted in a physical tty? Looking for explanation of failed logins into tty
I am trying to login to my physical terminals on my Ubuntu 24.04 that appear when hitting Ctrl+Alt+F3. I am prompted with entering a username. However, I can't easily login with my username of the ...
2
votes
1
answer
79
views
socat filter and replace character for modbus ascii
The goal is to get modbus ascii working with a Wallbox from ABL.
So I placed a RS485 to TCP converter in the box, created a pseudo tty for my application and got the wrong frame.
The answer starts ...
0
votes
0
answers
72
views
How does `/dev/tty` work as a "synonym"? [duplicate]
Context
To restore the standard input, standard output and/or standard error (file descriptors 0, 1 and/or 2 respectively) of a process to the keyboard and/or display of an interactive shell (bash) ...
0
votes
0
answers
60
views
terminal after ssh only return 4 line stdout
So, I did a certification lab lately and after I logged in my ssh, I cannot use a command longer than X line (4 in F server lab and 29 in C server lab. My host kali machine is working and I've tried ...
1
vote
0
answers
52
views
How to set which tty to run GUI in?
I have set up a runit service to autologin in /dev/tty16 and the shell profile executes dbus-run-session Hyprland, however, I noticed that Hyprland, or GUIs start on the 'active' or the currently ...
2
votes
1
answer
279
views
TTY line discipline echoing feature
I'm confused from the actual meaning of the echoing feature implemented in Linux TTY driver.
As far as I know, a pseudo-terminal pair (PTY pair) consists of a PTY master, a PTY slave and a line ...
2
votes
2
answers
244
views
How can I get Linux console output on both iGPU (HDMI) and IPMI (AST) simultaneously?
I'm trying to get console output on both the onboard iGPU (Intel i915, HDMI output) and the AST BMC (IPMI remote display) on my headless server setup.
Hardware and OS
Motherboard: ASUS Pro WS W680-...
2
votes
2
answers
87
views
Unable to write to self in graphical terminal session?
Essentially, I noticed I am unable to write to my user who is using gnome-terminal.
tty returns /dev/pts/1, but I am unable to write there as root. Instead, it returns as follows:
myuser@pegasus:/$ ...
0
votes
2
answers
177
views
Making the micro editor behave like a desktop terminal in a Linux TTY
Can I, through a trick or a module, make the Micro editor behave in a separate TTY as if I had started it directly from a console/terminal emulator in my desktop environment?
micro | a modern and ...
1
vote
1
answer
163
views
How to get out of login loop?
I login from the tty. my .xinit file had the command exec i3I got tired of constantly retyping startx after login so i put exec startxat the end of my .bash_profile. now every time I type my login ...
0
votes
0
answers
383
views
What's the point of removing KMS with nvidia drivers? It seems to only cause errors
Remove kms from the HOOKS array in /etc/mkinitcpio.conf and regenerate the initramfs. This will prevent the initramfs from containing the nouveau module making sure the kernel cannot load it during ...
1
vote
0
answers
58
views
How to pretend to not run the command in a TTY [duplicate]
I have a command (systemctl status) that halts and waits for keystrokes if I run it in a terminal that is not tall enough. I'm not interested in this behavior and can't find an option to bypass it.
If ...
1
vote
0
answers
29
views
Idle time (tty st_atime) not updating when emacs is running
When running GNU emacs in a terminal (in the old-fashioned way, that is, i.e. not in its X windows mode) I've noticed that the w command shows the session as idle, even though emacs is active and ...
0
votes
2
answers
120
views
Void Linux TTY keeps pressing Enter on its own
This problem appears with kernels 6.12.18, 6.12.17, and 6.12.16.
The OS boots, and then I am prompted to log in in the tty. I enter a username and press Enter. When I try to input a password, it ...
0
votes
0
answers
115
views
How can I run commands on one shell from another?
I am currently using yazi as a TUI file manager, and one thing I wanted to do was set it up with my terminal emulator in a multi-pane view to have the file manager and a command line synchronized.
...
1
vote
1
answer
129
views
Grub2 serial terminal over USB ACM
I am trying to use a usb cable from a Raspberry (in peripheral mode, serial CDC ACM) to a PC to access GRUB2 serial console (on the PC).
I succeeded with a pl2303 usb ttl adapter, the usbserial_pl2303 ...
0
votes
1
answer
111
views
serial console hang in Linux kernel-5.10.188
I am working on an embedded Linux system (kernel-5.10.188), and use /dev/ttyS2 as serial console and ash in busybox is the login shell.
After logging in to system, I ran top -d 1 in the serial console ...
2
votes
1
answer
115
views
Detectng missed SIGWINCH in Bash extension, when apparent terminal size has not changed
I maintain an extension for the Bash environment called Basta. Basta provides a scroll-protected status line at the bottom of your ANSI/VT100 terminal.
When Basta sets itself up, the effective number ...
1
vote
0
answers
116
views
Disable tty switching in labwc
Im running a labwc kiosk app and want to prevent users from tty switching easily.
Previously, I had a Xserver with the "DontVTSwitch" option on and it worked like a charm. I changed to labwc ...
0
votes
1
answer
167
views
Why does a SIGTSTP signal not handled by the parent move the entire group to the background (contrary to written in TTY demystified)?
I started learning about linux tty(s) and signals and ran into some trouble.
I am reading and using The TTY demystified as a reference.
I made two simple golang programs.
Parent:
package main
import (...
0
votes
1
answer
215
views
Where is the tty line discipline exactly "logically" located?
I recently started learning about Operating Systems and the linux kernel. I was interested in terminals, so I started there, however, I quickly ran into a problem. I wrote a slightly longer question, ...
-1
votes
1
answer
115
views
Is readline essentially a user mode line discipline?
The TTY terminal driver uses a line discipline to provide features like: line buffering of input, echoing of input to the terminal display, control character translation, etc. The bash shell uses the ...
1
vote
1
answer
311
views
Text console display frozen on Arch Linux after boot
My desktop PC running Arch Linux developed an issue with the text console in the last few days. The system boots OK initially, then appears to freeze just before the login prompt would normally appear ...
2
votes
2
answers
249
views
Hpux and TCB, how to enable login console?
I'm on hpux 10.20 (for testing), is TCB-enabled
when I try a login from a serial console this m
essage appear
GenericSysName [HP Release B.10.20] (see /etc/issue)
login: root
Cannot obtain database ...
0
votes
0
answers
76
views
Cross-platform method of checking if using terminal emulator or tty
I am looking for a cross platform way to check if I am using a terminal emulator (with support for unicode characters) or a TTY session (with only support for ASCII chars). I initially tried to use if ...
0
votes
0
answers
95
views
Permissions error when executing setserial command
I have recently transitioned from CentOS 7.9 to AlmaLinux 8.9, and I have noticed a permission error when executing the following command:
$ setserial /dev/ttyAP0 closing_wait none
I get the ...
0
votes
0
answers
53
views
How do I redirect END OF TRANSMISSION itself to another terminal? [duplicate]
I'm playing around with sending information to another terminal session remotely, but I'm not sure how to signal the end of a transmission (ie so the other terminal session stops awaiting input).
For ...
1
vote
1
answer
44
views
How do I increase the initial minor device number (64) for /dev/ttyS* devices on Linux?
Recently I needed to increase the maximum number of tty (not ttyS*) on the system from 63 to 128. But looking at the Linux source code I found that file include/uapi/linux/linux/vt.h contains
#define ...
2
votes
1
answer
101
views
How to mirror serial output ttyS0 to the HDMI /dev/dri/card0?
When I starting my single board computer, I can face the output from the UART, or even called /dev/ttyS0. I want to mirror everything to my HDMI port which is placed on /dev/dri/card0.
How can I ...
0
votes
1
answer
171
views
How to prevent a Linux shell from intercepting escape sequence so it can be sent over serial TTY
I am working on an embedded system that is connected over USB serial TTY (i.e. /dev/ttyUSB0), which needs to interpret arrow keys sent via a virtual terminal such as screen. The problem is, the shell (...
0
votes
0
answers
125
views
How to keep graphic TTY session running at background
Using debian 12, kde 6
My intention is to use my pc as streaming platform for two, meaning that 2 game instances will run at once. First gaming session will run directly on the pc itself, and the ...
1
vote
0
answers
244
views
No console output when the linux kernel panics
Using recent distros and systems, for the default setup and also when setting the kernel command line to have console=tty0 there is no output on the console when the kernel panics.
With a CentOS 7 ...
1
vote
0
answers
181
views
Reflect x-axis (mirror screen) on Linux tty without GUI and without xrandr -x
I want to run old computers without GUI.
If I use the command xrandr -x in a Linux system (with GUI),
the whole screen is reflected (mirrored) around the Y-axis
(along the X-axis).
So text is mirror-...
0
votes
1
answer
139
views
How can I have multiple TCP clients connected to server ttyS0?
I'm trying to test following envirorment:
One server (it's a router, It has busybox and few other cmd) with a a physical serial port and and open socket
#tcpsvd -v 0.0.0.0 -p 999 cat /dev/ttyS0
...
2
votes
0
answers
287
views
Why is a udev rule to symlink /dev/ttySPECIAL replacing /dev/tty with a symlink as well
On my target embedded system I have a udev rule that looks like:
KERNEL=="ttyACM?", ATTRS{idVendor}=="1234", ATTRS{idProduct}=="5678", SYMLINK+="ttySPECIAL", ...
1
vote
1
answer
748
views
How to add delay to my terminal?
I like the experience that I get from using the terminal on a remote device where there is a visible lag between what I type and what happens on screen, because it forces me to trust the actions I'm ...
1
vote
0
answers
117
views
Color range for tty
THIS IS NOT A PROBLEM ABOUT XORG
I have a singleboard PC with Intel N100 with 2 HDMI ports.
When arch boots, the color range changes to limited after i915 takeing over the display from UEFI ...
1
vote
1
answer
108
views
Serial console changes parameters when SUDOing
I'm working on a project where I need to connect a very old serial terminal to a linux device (a Raspberry).
The terminal uses 4800bps, 7 data bits and even parity. I have reconfigured the kernel ...
1
vote
1
answer
719
views
Keylogger protection in TTY3
I noticed that, when I go to TTY3 (by typing CTRL+ALT+3), bucklespring stops working, and when I go out to the GUI it works again. Also, when I run xinput test-xi2 on TTY3, it tells me 'Unable to ...
0
votes
2
answers
3k
views
How can I get write/wall commands working as intended?
OS: xUbuntu 22.04
I want to use the write / wall commands for sending msgs to other users sharing the same computer.
But when I try to use the write command, I get the following error:
√ ~ $ who
user1 ...
0
votes
1
answer
74
views
Interactive: systemctl on boot not the same as systemctl via CLI!
I want to execute an interactive session on the console via systemctl on boot up.
My .service file looks something like this:
[Unit]
Description=My service.
[email protected] network-online....
0
votes
1
answer
123
views
Where does the finger command takes the information about the write permissions of the tty's
I'm trying to create my own finger command in C in Linux Mint. Studying the real finger command I've understood that the asterisk that the commands put when using the short output format left the tty ...
0
votes
2
answers
208
views
How can I connect a bash process to a tty _without_ using getty
I would have two serial usb devices connected to each other, /dev/ttyUSB1 and /dev/ttyUSB2. I would like to run /bin/bash connected to one end, so that I can attach to the other end using picocom and ...
0
votes
1
answer
290
views
TERM ANSI escape sequences compatibility between xterm and screen although infocmp does not say so
I am making an script in zsh on mac that uses tmux and after the amazing https://unix.stackexchange.com/users/22565/st%c3%a9phane-chazelas answer, I found out that when I use tmux, it uses a different ...
2
votes
0
answers
599
views
Ubuntu 22.04 shows systemd-journald error after I wake up from suspend
After I wake up my computer(Mi notebook ultra 2021) from suspend
it doesn't let me click the field where the password needs to be entered.
I have to restart by pressing ctrl + alt + printscn + REISUB.
...
5
votes
1
answer
768
views
job control doesn't work when I try to set up getty over serial
I am trying to set up getty to log in over serial (mainly as an experiment).
With almost any configuration, the same thing happens. If my default shell is bash, I get this message after I log in:
-...
0
votes
1
answer
119
views
Script that reads input from terminal. How to tell the script to print to both tty and stdout in case it is called with a stdout redirection?
I have a script which asks users for input in the terminal, therefore in case the script is called with stdout redirected to a file, the user has no context on the prompt. So I would like to duplicate ...
0
votes
1
answer
158
views
how to get file descriptors of PTY inside of a child?
https://man7.org/linux/man-pages/man7/pty.7.html
in the "UNIX 98 pseudoterminals" it is said that ptsname can be used (and then open), but this function accepts file descriptor. i tried to ...