Questions tagged [tty]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

loadkeys cannot assign Control / CtrlL key

I try to use loadkeys to enable my preferred keymaps when I use tty1-tty6 on my laptop. I made loadkeys user-permission work by following the suggestion of this post: https://unix.stackexchange.com/a/...
0
votes
1answer
44 views

script doesn't execute commands without tty

I'm trying to use script as the entrypoint of a docker container to log everything that happens in that container to a file on a mounted volume. It works great if there is a tty: $ docker run -t --rm ...
0
votes
1answer
39 views

Send binary file to ttyUSB0 serially in linux

I have a binary file(obtained from assembly code). I need to transfer this file to an fpga serially via ttyUSB0. I read in some posts that using cat and echo data can be transferred to ttyS0. echo -...
0
votes
0answers
7 views

xfce4-session and related Xorg process are on different ttys, correct?

Having looked ps -ef | grep -e 'xfce4-session\|Xorg' I received this output root 1970 1969 1 Jan05 tty2 00:17:32 /usr/lib/xorg/Xorg -nolisten tcp :0 user1 1985 1975 0 Jan05 tty1 ...
0
votes
1answer
42 views

/etc/inittab: auto login on ttyS0

in my /etc/inittab, I have this line: T0:2345:respawn:/sbin/getty -L ttyS0 115200 vt100 which gives me getty on serial console where I can log in. How can I specify that instead getty, I get ...
3
votes
1answer
79 views

Solaris: is possible to permit root login on some terms?

I have a server with some serial ports. One is /dev/console, another is /dev/term/b(the ttyS1 under linux and the COM2 under dos). I want root to login under /dev/term/b but.. myserver termb login: ...
1
vote
1answer
65 views

How do I get the `/dev/ttyUSB0` from `/dev/bus/usb/006/015`?

Short version: How, from device information such as /devices/pci0000:00/0000:00:13.1/usb6/6-3 and /dev/bus/usb/006/015, I get a path such as /dev/ttyUSB0 or /dev/serial/by-path/pci-0000:00:13.1-usb-0:...
0
votes
0answers
12 views

Configure user to automatically login on virtual console (tty1) for CentOS 8

We need two terminals/consoles per machine. One is connected with IPMI over Ethernet and the other is a software-based console that runs from the Intel BMC's web server. The IPMI terminal ( ttyS0 ) ...
2
votes
1answer
60 views

tty - Dual Monitors

I have a dual monitor setup running tty only. The primary monitor is the actual "laptop", the second monitor (Lilliput um-70) is connected through USB 2.0, using udl driver. Everything is working ...
0
votes
1answer
43 views

ttyACM0 connected but not showing received data

I have a STM32F4 microcontroller, with the USB interface, I connected it to the raspberry pi. When connected, it shows up as /dev/ttyACM0. I send some chars every second from the device. In windows, ...
0
votes
0answers
17 views

How to run startx from non-login (e.g. ssh) session on Linux? [duplicate]

I have a Linux system which has a monitor plugged into it, but no keyboard. I would like to ssh into it and run startx as if I had typed this at virtual terminal 1. I have set up autologin for a non-...
1
vote
1answer
34 views

Which services read the /etc/securetty configuration file?

Which programs / services are parsing contents of /etc/securetty configuration file?
1
vote
1answer
34 views

Determine which tty is in the “foreground” / “currently displayed”?

In linux I can use the key combinations Alt-Ctrl-F1,Alt-Ctrl-F2... to switch to different tty1 as I could use man chvt. using the command tty I also get displayed the teletype/linux virtual console I ...
2
votes
3answers
230 views

How to manually run/init/start a Xorg server on a different VT/TTY?

I want to start an Xorg server (which should only feature a minimal xterm terminal emulator from a newly created "pristine" tty). I have thought this to be as simple as issuing a xinit or maybe a ...
1
vote
1answer
29 views

How do I run an interactive script on tty1 before user log on?

I have a Raspberry Pi running Raspbian Buster (headless) and want to have the system run a script at boot that presents an interactive menu to the user, using either bash dialog or curses / ncurses. ...
2
votes
1answer
59 views

How to enable underlines and other formattings on a color tty?

I'm on Arch Linux (a 32 bits alternative version), and recently I've discovered that the blue lines I used to see in Vim with :set cursorline were supposed to be underlined, and not blue. That got me ...
0
votes
3answers
71 views

How can I disable F1 key in linux console (i.e. to prevent tty switching)?

pressing CTRL-ALT-F1 allows to switch to tty1. Being on another tty. I can change the keymap using loadkeys FILE. What would be a way to disable F1 key? Would that allow to prevent switching to the ...
0
votes
1answer
30 views

piping /dev/tty to ipython without losing formatting or tab completion

I want to insert code into the beginning of an ipython session, and then use ipython interactively. Let's say I run cat <(echo 'import itertools') /dev/tty | ipython. I get an interactive iPython ...
0
votes
1answer
74 views

log in to a desktop manager using commands typed on a different tty

Say a computer is booted to its desktop manager (SDDM, in this case) and you want to send a command over ssh to make that computer log in as a particular user as if they logged in with the keyboard at ...
7
votes
3answers
122 views

What does bash do in the background once it runs a program?

Does the terminal have its input routed through the bash process into the program currently being run, or is the terminal "disconnected" from the bash process and connected to the new program, ...
2
votes
2answers
148 views

What is `stty line NUMBER` even doing?

According to this page, this field describes the "line discipline", which determines what happens when a user presses backspace or ^C. Essentially, what happens when a program calls read(2). However,...
0
votes
1answer
41 views

When `stty tostop` is set, how come processes not in the same session can still write to the tty?

I have the following shell interaction: [OP@localhost linux]$ tty /dev/pts/7 [OP@localhost linux]$ stty tostop [OP@localhost linux]$ In another terminal, I type: [OP@localhost linux]$ echo hello &...
0
votes
0answers
31 views

How to switch keyboard language in vtty?

How to switch keyboard language in vtty? No X involved, I just booted as root bypassing everything, and need to deal with files in language other than English. I think it's Linux Mint but not sure, ...
1
vote
1answer
87 views

Virtualize in multiple TTY (VT*)

I want to get virtual machine in a TTY (VT*) in fullscreen like GDM3 can take a TTY (VT*) for the graphic part of linux I want DISPLAY (heard as the output of a graphic server, here the VMs) to be ...
0
votes
0answers
25 views

SSH tty session as a Here String

At my job, the only way that I can switch users is by doing the following: sudo su - *USER* In order to run multiple commands as the user (in a script or something), I use here strings and here docs:...
0
votes
0answers
39 views

Write on PTM Master Pseudoterminal

When we use the write() system call function to write on a ptm master, the pty_write() function will be triggered of because /dev/ptmx is a device file. The write() prototype is : ssize_t write(int ...
1
vote
0answers
72 views

How to TTY on Debian into Huawei e5573s

i want to establish serial connection com port to Huawei e5573s connected via USB, so i can send some AT commands at it as far as i understand, i need to establish a TTY connection to the device on ...
1
vote
1answer
45 views

How bash sets tty attributes before and after running a command?

Open xterm, run tty and see pseudo terminal slave file (let's say it is /dev/pts/0). Then open another xterm and run $ stty -F /dev/pts/0 speed 38400 baud; line = 0; lnext = <undef>; discard = &...
1
vote
2answers
73 views

How to sniff other user session in Linux?

Another user is connected to my machine by ssh and doing something (this is myself, running long command by ssh). How can I see in realtime, what is happening in his terminal session? I am root on a ...
1
vote
1answer
2k views

Error: Cannot perform an interactive login from a non TTY device

I am using Mobaxterm and starting a local bash terminal, and trying this command. But seeing an error. The same command is working from the cmd windows prompt or powershell. Any suggestions on ...
1
vote
1answer
150 views

Linux ioctl VT_GETSTATE fails if process is run manually

I'm using the ioctl syscall on Linux to get the current tty in a C program. I don't know why the ioctl fails if the program is run manually (as root) while it works as expected if the init.d script ...
0
votes
1answer
57 views

Assign static /dev/ttyACM[0-9] static

I have a couple of USB radios (one ZigBee, one Z-wave) that are currently located at /dev/ttyACM0 and /dev/ttyACM1, respectively. When I reboot, they are randomly assigned, rendering my home ...
2
votes
1answer
130 views

What is the difference between IXON and IXOFF tty attributes?

To be specific, let's speak in pseudo-terminal terms. Suppose we have file descriptors master and slave for a pseudo-terminal pair (suppose it is a controlling tty). Disabling IXON on master (or slave,...
0
votes
0answers
30 views

pureos tty terminal not rendering special characters

I'm running pureos (debian derivative) on an HP laptop. Certain characters don't render properly in tty terminal (ctl-alt-f#). As an example the character which I believe to be utf8 U+0091(alternate ...
-1
votes
1answer
186 views

booting in text mode by using boot parameter in kali linux

I'm following the recommendation from an earlier question, which tells me, Use boot parameter systemd.unit=multi-user.target to boot in text mode. How do I do this? I can't access GUI so I need to ...
11
votes
1answer
875 views

Bash attempts to write two shell prompts?

I am looking at the strace output of a running bash process connected to a terminal, for educational purposes. My bash process has PID 2883. I type [OP@localhost ~]$ strace -e trace=openat,read,...
0
votes
0answers
21 views

How does gnome-terminal receive information from the pseudo-teletype on X? [duplicate]

I have the following terminal session: [OP@localhost ~]$ tty /dev/pts/2 [OP@localhost ~]$ echo hello > /dev/pts/2 hello My question is how the application gnome-terminal, receives the string "...
2
votes
0answers
32 views

Map console key combination to single key press

I want to map (for example) the combinations: Windows + Left == Home man setkeycode seems to only talk about single key mappings. How would I go about doing this in a Linux virtual terminal? I'm ...
0
votes
1answer
76 views

Stuck in tty after fsck error on boot

I have Ubuntu 16.04 running on my laptop. After starting the laptop, I got /dev/sda8: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY According to this link I am fixing the error with fsck -f /dev/sda8 ...
1
vote
1answer
123 views

KDE Neon (a ubuntu based distro) does not start graphical environment anymore

I have a very strange problem in my KDE Neon 18.04 (distro based on Ubuntu LTS), when starting after the KDE Neon logo animation, I'm thrown on tty1 but at the command line, and the graphical ...
0
votes
1answer
39 views

How to enter a command on /dev/ttyACM3?

The device manual I am using says: To use the internal GPS, use the following commands on /dev/ttyACM3 port: at$gpsp=1 at$gpsnmun=2,1,1,1,1,1,1 How to enter a command on /dev/ttyACM3?
1
vote
1answer
45 views

Why blocking read() on a pty returns when process on the other end dies?

When slave side of pty is not opened, strace on the process, which does read(master_fd, &byte, 1);, shows this: read(3, So, when nobody is connected to the slave side of pty, read() waits for ...
1
vote
1answer
37 views

Is it possible to use TIOCMBIS with pseudo-terminal?

I have a C program which works with a normal terminal using this code: int dtr_rts = TIOCM_DTR | TIOCM_RTS; /* out-of-band signal */ ... int comfd = open(COM_PORT, O_RDWR); ... ioctl(comfd, TIOCMBIS, ...
1
vote
0answers
38 views

Is it possible to verify, whether a program has called `cfmakeraw()` to set its controlling terminal to raw mode?

Is it possible to verify, whether a program has called cfmakeraw() to set its controlling terminal to raw mode? I initially thought that it was possible to verify whether the terminal operated in raw ...
1
vote
1answer
118 views

How to make bash work with a TTY?

bash works with STDIN, STDOUT and STDERR. When xterm is opened, it allocates the pseudo tty. Then xterm forks child process and STDIN, STDOUT, STDERR are tied to slave_fd via dup2 and exec is called ...
0
votes
2answers
219 views

How to switch to virtual terminal when there is no GUI installed on a Linux server?

I'm trying to understand terminal, console, tty, virtual terminal, terminal emulator and this kind of things. Below is the topology of my environment. There is a Linux server and a Windows 10 PC. I ...
2
votes
1answer
43 views

Is ls --color falling back to precompiled LS_COLORS when using 256 color escape sequences?

I might not have found the best title for this. I am not really asking for help since I can accomplish what I want. I just want to know, if I understand everything right. But please, see for yourself: ...
1
vote
1answer
112 views

How can I prevent a TTY (e.g. /dev/tty1) from writing to the framebuffer (/dev/fb0)?

I'm running a Raspbian Buster server with no Xserver. I want to display wallpaper on a connected television but /dev/tty1 keeps over writing /dev/fb0 either with a blinking cursor or just refreshing ...
0
votes
1answer
52 views

How to prevent a particular terminal (e.g. /dev/tty1) from writing the cursor to framebuffer (e.g. /dev/fb0)

I'm running Raspbian Buster with no Xserver but attached to a television. I have a script that writes an image to the framebuffer from a timed systemd service. The problem is /dev/tty1 is writing ...
0
votes
2answers
95 views

Why are ctrl-m and return keys the same \r char? [duplicate]

Anyone know why ctrl-m and return are the same control chars?