Questions tagged [tty]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
17 views

Unable to get terminal prompt when executing script via ssh

I have the below script that works fine when run locally cat /tmp/input.sh echo -n ">> " read env exit; I get the command prompt when i ...
  • 411
0 votes
1 answer
43 views

why password is not asked when output is shown in another terminal

When i use: date > /dev/tty3 the output is delivered to first cli terminal. But my question is why does the terminal not ask for password. We are using terminal for output, the command is ...
-1 votes
3 answers
75 views

Running process in background ruins terminal

I have this makefile: all: sudo watch "ls -l" > /dev/null & @echo line 1 @echo line 2 @echo line 3 @echo line 4 Running watch (or any other ...
  • 679
0 votes
0 answers
17 views

Can I open a tty program while inside another tty? Child vty process?

I'm busy creating an interactive 'tty' TUI program, and I'd now like to open another 'tty' program like less with it's interactive screen. If I try this normally, when starting a process a bunch of ...
0 votes
0 answers
15 views

Where is the default VESA blanking mode in a Linux console tty set?

The Linux console tty implementation supports a "VESA blanking mode" option. This appears to define whether "console blanking" will actually standby/poweroff the monitor (...
  • 257
2 votes
2 answers
75 views

How to scroll back in Linux virtual consoles (2022)? [duplicate]

I'm only talking about the generic Linux virtual console, not terminal emulators such as GNOME Terminal or remote login interfaces like PuTTY. It seems that some methods have been deprecated in newer ...
  • 21
0 votes
0 answers
31 views

I can't seem to get my serial ports working -- I get an input/output error. How do I fix this?

I'm working on a BeagleBone Black running 3.8.13-bone80. I'm trying to get UART2 working, but I can't seem to get it and I don't know the root of the problem. I'd like to configure ttyS2 as such: stty ...
0 votes
0 answers
33 views

BLFS - Black Screen after modprobe AMDGPU, but startx gives display

I have compiled Linux From Scratch, and enabled the amdgpu driver as a module from the linux kernel config. However, after the module is loaded, the graphics card initiates, then shows a black screen....
0 votes
1 answer
86 views

How can I poll a serial for input?

So I have a device than transmits integers at a set frame-rate (10 fps or something). It connects via a usb cable to my linux machine (ubuntu 20.04) where it is recognized as ttyACM0. I can cat this ...
1 vote
0 answers
84 views

Can you run a program before the TTY login shows up?

I want to execute cmatrix in my TTY for when I connect my Raspberry Pi to a monitor by default. I found a .service file here, and I'm wondering if it could work in my case. Again, I just want cmatrix ...
  • 13
0 votes
0 answers
114 views

UDP to virtual serial port bi-directional bridge

I need to create a bi-directional UDP to virtual serial port bridge, the serial port will be used in a C program trough an API that can only accept serial ports as its I/O stream. I tought to use ...
  • 101
0 votes
0 answers
49 views

How to open a TTY session during startup and begin logging

Struggling to write a script that will open a TTY session during startup or shortly and continuously log. Context: I have an on small PC that is being deployed as an on prem syslog server running ...
0 votes
0 answers
15 views

How to pass standard streams through a pseudo-terminal (in C)

Here is my contrived use case: write a C program that hooks into stdout and stderr in order to passively examine those text streams before sending them along to the console as usual. Each time the ...
0 votes
1 answer
116 views

getty@tty1.service FAILED - Autologin only shows on TTY1 a flashing _

I'm working on a minecraft server with OS Ubuntu server 20.04 So far they haven't given me any problems (it's fantastic!), I know some things about linux (some don't exaggerate) Until something came ...
  • 77
0 votes
2 answers
95 views

How to remap Ctrl to Caps Lock in a TTY?

I already understand how to remap keys in an X graphical server. However, I sometimes like to do work from a TTY and cannot seem to figure out a way to functionally remap Ctrl to Caps Lock. I have ...
0 votes
2 answers
72 views

Logout of tty but save session for next login

5.18.9-arch1-1 Dell XPS 15 9510 I am running arch linux on xmonad. I do not have a login manager. On boot, I simply login via the tty and run startx to start my x session. This behavior is exactly ...
  • 123
0 votes
0 answers
36 views

Why does "w" still show ttyS1 when it was disconnected and the getty process was killed?

I connected a serial console with the command: sudo /sbin/gettey -L 115200 ttyS1 vt102 and it worked. Then I unplugged the cable on the port. Then I ran w and ttyS1 still showed: minipc ttyS1 - ...
1 vote
0 answers
31 views

How to configure two monitors, one for GUI, the other for console

My Linux machine have both HDMI and VGA ports working, which can connect to two different monitors respectively. Is it possible to configure the Linux so that one monitor shows the normal GUI, while ...
1 vote
1 answer
61 views

How can I disable the laptop keyboard in tty and then after a time turn it on again?

I have a kind of old ASUS Eee 1000HE PC and I replaced Windows 7 with Debian 32 Bit (PC is 32 bit). And now I use it a lot because I always wanted Linux on a laptop But I have one problem: some of the ...
  • 77
0 votes
0 answers
47 views

Get tty device paths for zte MF710M modem

i am trying to get the device paths for my modem zte MF710M using this script #get all connected devices usb-devices T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 21 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=...
  • 103
3 votes
2 answers
116 views

Why do X applications show a question mark as TTY in ps's result?

$ ps -ef | head -n 1 && ps -ef | grep calc UID PID PPID C STIME TTY TIME CMD user1 524014 5382 0 10:21 ? 00:00:01 gnome-calculator user1 532125 510665 ...
  • 1,124
0 votes
0 answers
63 views

Vim colorscheme is not preserved within tmux on the linux TTY

There are a ton of questions about this on SO and on this site. See e.g. here or here. However, basically all the solutions boil down to enabling some sort of 256 color compatibility in the user's ...
  • 155
1 vote
2 answers
312 views

True color support in TTY

I'd like to know if there's any way to get true color support in the tty. To be clear, I don't mean a terminal emulator, I mean the actual tty you get when no display server is running.
0 votes
1 answer
92 views

Echoing to $(tty) in a backgrounded process

Why does this not print anything? bash -c '(while echo "not printing" ; do sleep 1; done) > "$(tty)" & sleep 10' Even though this, for example, does: bash -c '(while echo &...
  • 103
13 votes
4 answers
1k views

How to copy/paste between a console and an X session?

What's the fastest way to copy/paste between a non-graphical console (<Ctrl><Alt><F...>) and an X session ? Right now : I select the text with the mouse on the console (I've ...
  • 1,124
0 votes
0 answers
23 views

Checking the active virtual terminal on /dev/console using ioctl on Unix

I need to check when the /dev/console device has an active virtual terminal. On Linux I used this statement: ioctl(fd, VT_GETSTATE, &vt_stat_struct); active_terminal = vts.v_active; However the ...
  • 175
0 votes
1 answer
145 views

Relationship between framebuffer and a tty

A framebuffer is a device file which allows for a simplified interface to the screen. For example running the below code on a RaspberryPi with a HDMI display connected: cat /dev/urandom > /dev/fb1 ...
1 vote
0 answers
74 views

How to get my brightness/volume and other special keys to work in a tty

I am running Debian stretch on a Lenovo laptop with only a window manager (i.e. no desktop). Out of the box, this configuration of Debian ignores the keys with special functions, such as volume up, ...
0 votes
1 answer
169 views

Why dmesg output displayed on /dev/tty1

This is still related to my yesterday thread, so there's alert or maybe it's just log that displayed on my terminal on /dev/tty1. Ofcourse it's annoying because it's displayed in my bash prompt, so ...
0 votes
1 answer
166 views

why websocat or wscat in background with nohup, disown, bg, &, &! don't work

The question is about running a bash script in background with the ability to logout and the process to continue. The issue is that websocat and wscat don't like when I close the terminal or logout.......
  • 115
1 vote
1 answer
54 views

canonical/non-canonical vs raw/cooked?

In the context of terminals, what is the difference between the two opposites canonical/non-canonical and cooked/raw? This thread says that they are synonym. But that's weird because one of the "...
  • 264
0 votes
0 answers
28 views

Linux : Force keyboard interface at boot time

I own a Razer Cynosa Chroma. At boot time, coherent with what lsusb -v would tell, linux-5.4.x enumerates 2 USB HID keyboard interfaces. A/ on usb-0000:00:1d.2-2/input0 B/ on usb-0000:00:1d.2-2/input1 ...
  • 3,879
0 votes
0 answers
63 views

How do I see what PID is accepting keys pressed

I'm currently troubleshooting media keys on my keyboard, I've already confirms that the keys are working and definitely sending input to the OS, however this still does not send any input to media in ...
0 votes
0 answers
101 views

How can a process use a newly created pseudo-terminal if only root can open it?

I'm currently learning about the TTY system, and I want to create a demo application which opens /dev/pts/ptmx which will create a new terminal, and then have a process create a new session which will ...
  • 264
0 votes
1 answer
126 views

Virtual Consoles in Ubuntu

In This link is mentioned that Linux GUI is installed on tty7, but when I change my consoles using Ctrl+Alt+F1-F7 and check it by the command tty, I see that I have a GUI on my tty1 and tty2. I'd like ...
  • 101
0 votes
1 answer
71 views

Running a script on every tty

I have a shell script that i want to run on every tty echo "Hello!" i tried adding it to my .bashrc but it only works after you login and it executes even if the terminal isnt a tty
0 votes
0 answers
209 views

Is /dev/ttyUSB0 a TTY?

I know the title of the question sounds a bit silly, but that's the best I could think of :) As far as I understand, if I have some serial device connected with USB - let's say I connect my Arduino to ...
  • 264
1 vote
0 answers
124 views

F key doesn’t work in the tty

My “f” key doesn’t work in the tty. I already tried most of my other keys on the keyboard and all of them work fine, even symbols like Ü Ä Ö. The “f” works completely fine on the login screen and on ...
1 vote
2 answers
38 views

Open a terminal from an external device?

I'm currently learning about terminals, pseudo-terminals, etc. and I'm curious - today we all use the pseudo-terminals such as xterm or gnome-terminal that are part of the Linux GUI, and less often ...
  • 264
0 votes
0 answers
865 views

Linux login failed while username and password correct (tty interface)

Many times when I tried to log in Linux through tty. Although I've entered correct username and password. It showed "login failed" and didn't give more message. I checked the log. /var/log# ...
's user avatar
0 votes
0 answers
66 views

What's the best way to embed a terminal emulator into my (ncurses) app

Ideally, this would be in the form of a library that gives access to a buffer of characters to display and allows injecting characters and signals via an or character stream. I am open to creating ...
0 votes
0 answers
36 views

How to add cp437 support into Minicom?

I am using a Raspberry Pi (running Raspbian) to act as translator between SSH-over-Ethernet and an RS232 connection to a proprietary hardware box. This proprietary box seems to be using CP437 ...
  • 101
0 votes
0 answers
420 views

Bash: echo command into tty

I've a service written in Python that can receive commands and does things, here is how it is built: print("\nWelcome!\n") for line in sys.stdin: cmd=line.rstrip() ...
  • 711
2 votes
1 answer
4k views

/dev/ttyUSB0 is available but after try to call it's gone

If I connect my ESP32 to my Ubuntu ( 22.04 ) by USB it is available in /dev/ttyUSB0. If I run a call - for example sudo ampy --port /dev/ttyUSB0 ls the error message apears Traceback (most recent call ...
0 votes
0 answers
39 views

How change login prompt for headless Linux to ask for more than just username/password?

We want to setup a headless Linux box but have it force users to enter in more than just a username and password. Is there a way to add our own custom questions and then grab/verify the info entered ...
0 votes
2 answers
201 views

Why can fprintf(stderr, ....) output to screen when stderr doesn't refer to a terminal device?

Given that a simple program: /* ttyname.c */ #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <errno.h> int main(int argc, char **...
1 vote
0 answers
123 views

How to monitor /dev/pts/X sessions?

I was trying to monitor some pts sessions I spawned using the Python pty module. Its a simple code like the following: import pty pty.spawn("/bin/bash") I can see in the /dev/pts/ directory ...
  • 75
-1 votes
2 answers
4k views

Why "No such device or address" when open /dev/tty in the first process?

Given that a simple program, as following: #include <stdio.h> #include <fcntl.h> #include <unistd.h> int main(int argc, char **argv) { int fd = -1; if (access("/dev/tty&...
0 votes
0 answers
146 views

How to write bytes to serial port's input buffer

I'm working on creating an emulator for a Captron button that is connected to a serial port /dev/ttyS0. I'm trying to mimic the on-press action by writing a byte array to the serial port by printf /...
1 vote
1 answer
89 views

How to check which "/dev/pty/x" file my putty session is using?

I opened quite a few putty sessions to my remote Ubuntu machine. For each of the session, I got a /dev/pts/x file assigned to it. Like below: crw--w---- 1 xxx tty 136, 0 Feb 5 23:08 0 crw--w---- 1 ...
  • 1,061

1
2 3 4 5
18