Questions tagged [tty]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
41 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 ...
Whimusical's user avatar
0 votes
1 answer
28 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 ...
Michael Quad's user avatar
0 votes
0 answers
43 views

When I press a function key on my laptop (volume, mute) it returns the keycode inside my terminal

Whenever I press a function key on my laptop the key-code gets returned (438u, 440u, 439u) on my tty emulator. I am using Arch Linux with Wayland, and my shell is zsh. Any idea where I can edit this ...
Waz's user avatar
  • 1
0 votes
0 answers
23 views

When setting up login in Linux, do not use console bound terminals?

I encountered a problem where I specified a virtual terminal using console=tty1, but this terminal cannot terminate the ping command using ctrl+c. However, when I switch to another terminal using ctrl+...
justSoSo's user avatar
1 vote
1 answer
37 views

GNU screen copy paste breaks lines

I'm running a Armbian on a PI and operate it through a Serial USB TTL dongle. I'm running the following command to connect to the PI: screen /dev/tty.usbXXXX 115200 I can successully log in and run ...
IArchi's user avatar
  • 11
0 votes
0 answers
50 views

busybox stty: standard input: cannot perform all requested operations?

When I specified stty isig, the following error occurred. I found a similar problem but did not resolve it. I searched for a lot of information but I'm not sure what's going on. I have no clue, can ...
justSoSo's user avatar
0 votes
1 answer
59 views

Opening a empty session on other tty

me@pop-os:~$ xinit -- :2 vt3 X.Org X Server 1.21.1.4 X Protocol Version 11, Revision 0 Current Operating System: Linux pop-os 6.6.6-76060606-generic #202312111032~1702306143~22.04~d28ffec SMP ...
Alex's user avatar
  • 101
0 votes
0 answers
34 views

using netcat stty not giving complete tty shell when doing CLTR+Z

I'm using netcat and stty to get terminal (tty) access, but I'm not able to do so as the CLTR+Z action on the netcat session is giving me suspended session instead of stopped and then I'm not able to ...
asadz's user avatar
  • 233
0 votes
1 answer
40 views

GL opens in TTY terminal, but not if X is present

asdfdsgAlthough it may seem incredible, I have the problem that GL does not open if X is open, but if X is not open it does open. And I know this because I tested it with the video game Warzone 2100, ...
ArtEze's user avatar
  • 59
0 votes
1 answer
46 views

X11 "bleeds" the output of programs to the tty

I use bspwm with a simple .xinitrc config file instead of a display manager, and there is only a simple exec dbus-launch bspwm command there. Whenever I start a program via, for example, dmenu_run (...
itslayer's user avatar
0 votes
0 answers
52 views

How do I identify the connected USB device?

If I write the rules, for example, in this form: ACTION=="remove", GOTO="serial_end" SUBSYSTEM!="tty", GOTO="serial_end" KERNEL=="ttyUSB[0-9]*", RUN+=...
alexanderzhirov's user avatar
2 votes
0 answers
234 views

How to suppress "Failed to set controlling terminal" warning in GDB when setting program to run on another terminal?

I'm using GDB to debug a program, and I want to direct its output to a different terminal than the one where GDB is running. Here's what I've been doing: Open a second terminal, check its device name ...
Sebastian Carlos's user avatar
2 votes
0 answers
169 views

How to disable tty's?

I want Ctrl+Alt F* to do nothing Currently I go to a tty at F3-F6, the login screen at F1 and the DE at F2. How to remove that ability?
01AutoMonkey's user avatar
0 votes
0 answers
90 views

How to reown a process?

when i run this script with a shortcut(sxhkd): #!/bin/sh MUSIC_DIR="$HOME/music" songs=$(ls "$MUSIC_DIR") filename=$( echo -e "random\n$songs" | dmenu -l 30 -i -p &...
white-hat-er's user avatar
0 votes
1 answer
164 views

How to set console for auto login in inittab of busybox?

I am working on an embedded Linux system (kernel-5.10.24) with busybox as init. The kernel log is disabled in serial console without setting console= in kernel command line. So is the logs from init ...
wangt13's user avatar
  • 397
0 votes
0 answers
80 views

Serial interfaces and sysfs. How to get a unique identifier for each serial port

I want to enumerate the serial ports on a Linux system and get unique and stable (across reboots) identifiers for them. Stable in the sense that when I plug and unplug serial USB devices (same USB ...
Andreas H.'s user avatar
0 votes
0 answers
26 views

Python IDE (Visual Studio Code and PyCharm) Issues with "gi" Library

I'm having a specific problem with two Python IDEs, Visual Studio Code and PyCharm, which I hope to get some guidance on. The problem is related to the "gi" library. I'm running Python on ...
Umikali's user avatar
0 votes
1 answer
107 views

how can I make socat simulate unplugging a serial device

I have this test program import sys for line in sys.stdin: print(line.strip()) print("DONE") if I get it to print out lines from a real device (an FTDI) python3 demo.py < /dev/...
Alex028502's user avatar
1 vote
1 answer
75 views

How to setup "Windows" and "menu" keys in pure Linux terminal

When using pure Linux terminal how can I get the Windows (Super) and menu keys events in Emacs? I have several functions attached to them, they work in GUI mode in Gnome, but in pure terminal I just ...
user4035's user avatar
  • 1,115
0 votes
1 answer
66 views

How to find out which tty a command was run in?

Web search found e.g. https://askubuntu.com/questions/624848/view-history-of-commands-run-in-terminal, from which I understood there is the file ~/.bash_history and the temp history. I have many ...
Alex Martian's user avatar
  • 1,005
0 votes
1 answer
47 views

Map usb devices to static addresses on boot

I have a couple of USB devices connected to my computer: An FT232 based USB-UART converter : Used to send and receive data between a microcontroller and the computer using the Serial protocol. A ...
ssarkar's user avatar
  • 103
0 votes
1 answer
77 views

Can I set up a serial terminal (RS-232) without a pty?

I have two computers that both have a RS-232 port on /dev/ttyS0 connect together with a null modem. I am trying to understand bit by bit how an external terminal worked in the old days, and how that ...
Alex028502's user avatar
0 votes
1 answer
619 views

trying to make my own shell handle ctrl+c properly

I am trying to understand how shells are set up so that the programs they are running receive the SIGINT when you press ctrl C but the shell doesn't, because when you are running bash, and run another ...
Alex028502's user avatar
0 votes
0 answers
89 views

Computer freezes such that ctrl-alt-f3 doesn't work; what are the alternatives for recovery?

It seems most questions I find is about ctrl-alt-f3 not working at all. However, that's not the case for me, it generally works. However, sometimes when playing video games, the view freezes (albeit I ...
Coderino Javarino's user avatar
0 votes
1 answer
54 views

When is useful use "silent" for tty?

If the tty --help command is executed it shows tty --help Usage: tty [OPTION]... Print the file name of the terminal connected to standard input. -s, --silent, --quiet print nothing, only return ...
Manuel Jordan's user avatar
0 votes
2 answers
134 views

How to know what is the current tab - number or position - for any Window Terminal?

For Ubuntu and Fedora if is opened a Window Terminal through ctrl + alt + t then is possible open a new tab through shift + ctrl + t. Suppose exists a Window Terminal with 5 tabs. If possible go to ...
Manuel Jordan's user avatar
1 vote
1 answer
162 views

Assign ttyACM to USB

I have a partially similar question like this one ttyUSB? No, ttyACM. How can I assign the usb-device to ttyACM, not ttyUSB? But mine is a little bit more difficult. I recently bought a Feather RP2040 ...
Tobias Reich's user avatar
0 votes
0 answers
42 views

What is the source of this tty console output?

I'm making a kiosk system using Armbian on an orangepi zero 3. The kiosk is a on a local server that I connect to using chromium browser launched from my ~/.bash_profile. Before chromium-browser ...
soccermom420's user avatar
0 votes
1 answer
148 views

How to determine the graphical tty in loginctl

Loginctl lists a lot of sessions, and I want programmatically to know which one is a graphical session (e.g. GNOME desktop). In the example below, I have a GNome desktop session open, an ssh ...
Eric Stdlib's user avatar
0 votes
0 answers
132 views

Process not stopping even after receiving Ctrl-Z

I was learning about signal handlers. I wrote a simple python script to handle and print all signal it gets. Then I ran that script on a remote machine through ssh. Then when I send Ctrl C signal, the ...
Sourav Kannantha B's user avatar
0 votes
1 answer
132 views

ttyUSB ordering

I am working on a project involving the development of a device that interfaces with multiple ttyUSB ports, specifically 16 of them. It's important to note that Linux handles ttyUSB ports differently ...
Saman.K's user avatar
2 votes
1 answer
141 views

How do I determine the PID of the shell running a given pts/tty?

There are many ways to obtain the PTS associated with a given process - such as using the tty command or resolving /proc/self/fd/0 (assuming it's open and not redirected) - but what about the inverse? ...
Tenders McChiken's user avatar
0 votes
3 answers
216 views

How to patch kernel to reduce VTIME gap for uart termios API?

I need help to find a kernel patch to get a VTIME from tty termios API lower than 100ms, in order to decrease gap inter char. It blocks read syscall until VTIME timeout. Function n_tty_read() is the ...
K. PANIK's user avatar
0 votes
1 answer
305 views

No GUI or login shell on boot

When I boot my pc (Debian 12 with Gnome3) I get directly taken to a blinking line instead of a login promt or a GUI. From there I can switch tty (Alt + F2) and then get a login promt and after login I'...
Payerl's user avatar
  • 101
0 votes
0 answers
24 views

What is the maximum number of glyphs that a font of a TTY console can have? [duplicate]

I want to my TTY console can show all Unicode UTF-8 characters. First, I checked my locale to verify if it was set to UTF-8 mode: >> Locale LANG=es_ES.UTF-8 LC_CTYPE="es_ES.UTF-8" ...
Magenta's user avatar
2 votes
0 answers
64 views

Waiting until an application is reading (over a TTY)

I'm writing an expect-style program to interact with a command-line application on Linux. Is there any way that my program can know when the application on the other side of the PTY tries to perform a ...
Subhav's user avatar
  • 21
1 vote
1 answer
63 views

Running tmux at startup on a different console (monitor)

Aloha ! I have a headless server connected to a monitor. The server has no graphical environment installed, nor has any keyboard or mice attached to it. I am able to login via SSH. I would like to ...
HerrCrazi's user avatar
0 votes
1 answer
45 views

Reasons for stty -tostop having no effect [duplicate]

I am trying to get a background process to print to the terminal. I haven't seen anything that otherwise indicates there is anything else to do besides stty -tostop. Am I missing something? Running ...
Sterling Butters's user avatar
0 votes
0 answers
39 views

I want to view data leaving via /dev/ttyUSB0 [duplicate]

I need confidence that the data my Raspberry Pi is telling me it's sending to an external device via USB is actually leaving the Pi. I was hoping there would be some way of printing the serial data ...
Colin G's user avatar
0 votes
0 answers
21 views

Strange server behaviour after keyboard was connected - was server compromised or data centre at fault?

This morning I received a notification from our host that they couldn't ping the server, I've checked the logs and 5 minutes before the following happened: Jun 13 10:34:50 server-name kernel: usb 1-5: ...
user1008664's user avatar
6 votes
1 answer
372 views

Computer boots to /dev/tty0 instead of /dev/tty1

I have two computers, both running Debian Bookworm and upgraded to the same degree with the latest software installed. Both machines are configured to boot to text terminals, which they need to do ...
currawong's user avatar
  • 178
0 votes
0 answers
125 views

Problems with my TTYs key bindings in Fedora 38

I am trying to configure my .inputrc file as I always did for key bindings (bash and Fedora 38). It works perfectly for urxvt/xterm, but my TTY's (virtual consoles) do not take into account modifiers. ...
Luis A. Florit's user avatar
0 votes
1 answer
54 views

How to maintain network connectivity for graphical applications on tty1 when another user is on tty2?

User1 runs startx on tty1, and then user2 runs startx on tty2. On tty1, the graphical environment is Awesome Window Manager (X11), and on tty2 it is Cinnamon desktop (X11). For graphical applications ...
jbrock's user avatar
  • 1,141
0 votes
1 answer
244 views

Unable to boot after GRUB_CMDLINE_LINUX="console=tty12"

I changed GRUB_CMDLINE_LINUX="" to GRUB_CMDLINE_LINUX="console=tty12". My disk is crypted and I need to insert the password, but I don't know how to write over that console and ...
PeaceEverybody's user avatar
0 votes
1 answer
29 views

How do I tell a /dev/ttyUSBN device that it's a master?

Using the terminology of ptys, the slave end connects to the CLI program and the master end connects to the user / keyboard / terminal emulator. I have an FTDI USB UART connecting my laptop's USB port ...
enigmaticPhysicist's user avatar
1 vote
1 answer
36 views

How to Check Numlock State of Virtual TTYs Without Elevated Privileges?

I am trying to get the numlock states of multiple virtual TTYs. But my normal user account doesn't have read permission for some of them. $ for tty in /dev/tty{1..6}; do setleds < ${tty} | grep &...
AntumDeluge's user avatar
0 votes
1 answer
132 views

why doesn't the stty setting onlcr add a carriage return?

TLDR - I have onlcr configured in my terminal, but I don't see the \r getting added If plug two FTDI serial converters together, and plug them both into my computer, I get two ports called /dev/...
Alex028502's user avatar
17 votes
2 answers
5k views

How is cursor blinking implemented in GUI terminal emulators?

Blinking is a common practice since the early time of computing, especially for cursors. However, when I run strace to check their system calls, both a terminal emulator konsole and a shell bash, don'...
victrid's user avatar
  • 183
9 votes
1 answer
824 views

How to get the current terminal ID

Related: How to get the current terminal name? But I only want the ID of the current terminal, e.g. when tty returns /dev/pts/11 I only want to print 11. The idea is to add this information in the ...
s.k's user avatar
  • 431
2 votes
0 answers
156 views

How do I RUN systemctl with udev rules?

I am attempting to start a service with systemctl using a udev rule. SUBSYSTEM=="tty", ATTRS{manufacturer}=="Belkin USB PDA Adapter", ATTRS{serial}=="778452", RUN+="/...
Albert Elmore's user avatar

1
2 3 4 5
19