Questions tagged [stty]

"stty" command sets the options of terminal (tty).

1
vote
0answers
85 views

Line-ending problem with Telnet: can't remove LF from CRLF when sending command

I am unable to get Telnet to send only CR (\r) at the end of a command, despite setting the crlf toggle to <CR><NUL> (see example below). Instead, Telnet always sends CR-LF (\r\n). My ...
0
votes
0answers
19 views

changing/modifying terminal parameters general uses

I am learning about being able to change terminal parameters on red hat Linux, what are some professional applications in which this could be useful? Is this a common thing to do? I am considering ...
4
votes
2answers
83 views

Echoed escape sequences doesn't interpreted in Linux tty

Prerequisites The Linux virtual terminal (tty) is an emulation of VT102 - Virtual terminal subsystem source. The real VT100 (nearly the same as VT102) has the following behavior (I suppose): In the ...
0
votes
1answer
110 views

How do you disable XON/OFF flow control?

I issued a stty -ixon command which enables XON/XOFF flow control. There is a stty -ixoff command but that enables the "sending of start/stop characters". So once XON/XOFF flow control is enabled, ...
0
votes
0answers
33 views

Diagnostics for Linux terminal settings

I was recently confronted with a terminal emulator in an SSH client where Home key would not work by default in Bash. After hours of investigation and reading about the major hairball that is the ...
0
votes
0answers
58 views

login with rsh having zero size terminal (stty)

I've received a very peculiar problem all of sudden to the Linux hosts while doing rsh to them from a remote site and them opening a file it returns the file opened very limited on the terminal saying ...
0
votes
0answers
33 views

Start PyGame on /dev/tty1 from a SSH session (can't access the framebuffer via SSH)

I have a small touchscreen attached to a Raspberry Pi, and when I start a Python script via an attached keyboard, directly on /dev/tty1, this script is able to execute pygame.display.init() ...
1
vote
0answers
211 views

How to enable/disable stty settings?

I'm on linux using bash with GNOME Terminal. I used the command stty -ixon and then I checked if ctrl-s was sending XOFF and ctrl-q was sending XON : they weren't. The problem is that by using stty -...
1
vote
1answer
55 views

GPIO board read/write via bash

Trying to get a GPIO board working, need to access it from script, here is what I am using: stty -F /dev/ttyACM1 115200 raw -echo #CONFIGURE SERIAL PORT exec 3</dev/ttyACM1 #...
0
votes
3answers
63 views

Is there a way I can tab between screens without pressing ctrl-a tab every time?

Essentially I just want to press Ctrl+Tab, not Ctrl+A then Tab. I don't believe this can be accomplished with an alias, but have read some stuff about maybe using stty? But I've never used stty and ...
-1
votes
1answer
592 views

How to resize TTY console width?

I'm on FreeBSD. I want to set console width (just console, not ssh or telnet). I used this command: stty cols 132 Is this work for just console or worked for all of the connections (console, ssh ...
0
votes
0answers
196 views

Difference between eof=^A and eof=^D of stty command

I would like to know the difference between eof=^A and eof=^D which will be displayed when stty -a command is given. Also is there any command to change it from eof=^A to eof=^D?
1
vote
0answers
19 views

Data loss over ttyACM* in Ubuntu 14.04 whereas success on Ubuntu 16.04 when “cat” command is used [duplicate]

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 ...
1
vote
0answers
29 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
180 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 ...
1
vote
0answers
63 views

Strange serial port behaviour on Raspberry PI

I'm trying to receive serial data on a Raspberry Pi through the GPIO15(RXD) pin. I have the following python script: serPort = serial.Serial("/dev/ttyAMA0", baudrate=2400) while True: rcv = ord(...
1
vote
1answer
318 views

troubleshooting serial settings through stty

Hardware PHYTEC Mira Board with i.MX6 Processor Operating System Yocto Image created using the BSP provided by PHYTECSource with minimal packages in it. The board has an UART board called UART3 ...
1
vote
1answer
406 views

Starting multiple Screen windows from shell script uses wrong configuration

When running Screen, I can use Ctrl+ac to create a new window and run vim in each window. Also from Screen, I can run the command screen vim multiple times to open new windows with vim already running....
1
vote
1answer
892 views

What does the “opost” stty flag do?

The documentation says the following: [-]opost postprocess output I don't understand what this means. I have tried to disable this flag to see what it does: stty -opost -F /dev/pts/0 And I have ...
4
votes
1answer
1k views

Confused about the “onlcr” stty flag

In the stty documentation, the following is mentioned: [-]icrnl translate carriage return to newline [-]inlcr translate newline to carriage return * [-]ocrnl translate ...
1
vote
2answers
218 views

Explanation of stty parameters not found in man page

I have some old code that was written in java for interfacing with a serial port that I'm attempting to convert to python. The following lines are found in a bash file that is run to setup the serial ...
1
vote
1answer
286 views

gnome-terminal issue related to tty configuration

I'm facing an strange issue, I'll add a photo since is better to explain what's happening As you can see. After using git log and exit (either pressing q or Q or :q or ^C), I'm not able to use more ...
1
vote
1answer
795 views

How to inhibit serial reception during serial writes for a RS485 (half-duplex) serial line

I have an app that expects to do I/O over a full-duplex serial line. That is: char buf[4]; write(fd, "ping", 4); read(fd, buf, 4); ... expects to end up with whatever four bytes the remote device ...
1
vote
0answers
1k views

Restoring tty correctly with stty

I'm writing a bash script to read some user input (like a password request), and I'd like to capture the result and pass it through its stdout. (I'm working in a GNU/Linux environment, with recent ...
3
votes
1answer
532 views

What are the implications of setting the baud rate of a terminal from userspace?

Sometimes I just need to read from a serial device, so I skip the complexities of minicom or screen and just cat. However, this only works if I first set the baud rate of the terminal using stty <...
1
vote
0answers
1k views

Configuring the serial port on Ubuntu to communicate with a Betaflight board

I'm trying to get my Java flight data acquisition program, which runs on a single-board computer with Lubuntu 16.04, to talk to the Betaflight Nero F7 IMU sensor board, which is connected to the SBC ...
2
votes
1answer
312 views

Why changing tty settings on one file descriptor affects another?

ECHO setting is enabled on stdin and stdout by default. But why if we disable ECHO on stdin, it is also disabled on stdout? They have two separate descriptors - 0 and 1, so why they are changed ...
12
votes
1answer
646 views

Why are two ^D presses necessary to exit `cat`? [duplicate]

Let's run cat and then type a then ^D - you will see that cat did not exit. Compare it with cat + a + Enter + ^D - now cat did exit. So, why two ^D presses are necessary to exit cat in the first ...
2
votes
1answer
248 views

How can one override bash Ctrl+C to be more fish-like

I find myself using bash more often than not on remote machines even though fish is my preferred shell. Fish has small, but nice feature that when you hit Ctrl+C something like this happens: if ...
0
votes
1answer
552 views

Set terminal TTY line settings while a process is running

When I need to configure terminal line settings when the terminal shell is available, I use stty. When I attach a debugger to a process that's running curses, the current tty settings get in the way ...
3
votes
1answer
796 views

terminfo disable XON/XOFF

I can disable XON/XOFF flow control: stty -ixon So I put this in my "~/.profile". However I have started making my own terminal with "terminfo" and "tic", and I noticed these options: xon_xoff ...
3
votes
1answer
270 views

Terminal shows garbled characters with same settings as other terminal showing correct characters

I have vim setup with NerdTree on a remote machine. I have two local machines. When I ssh to remote machine from one of the local machines (say A), it displays all the symbols in NerdTree correctly. ...
3
votes
1answer
195 views

The effect of `stty --file=<terminal> <flag>` is only temporary for consoles in bash. Why?

Open two consoles / X terminals. From one, which is attached to say /dev/tty1 (Linux console) or /dev/pts/0 (X terminal), run $ stty -echo. (Now echoing to keyboad is turned off.) Then from the other, ...
2
votes
1answer
555 views

use stty command to enable remapping ctrl+v

Searching around, I found that stty -ixon enables remapping of C-q and C-s(such as in ~/.inputrc). Now I also want to remap C-v(to paste-from-clipboard, the default S-Ins feels awkward). With stty -...
3
votes
2answers
752 views

What is the equivalent of “stty -echo” for zsh?

I can hide what is written in a terminal with bash with stty -echo This is however not working for zsh: running this command does not change the output of stty -a What is the equivalent command ...
2
votes
1answer
32 views

Deactivate DCS contol character

Esoteric characters in filenames sometimes lead to weird errors. I recently backed up files with rsync, noticing that some minutes into the process, all status output stopped. Investigating further, I ...
0
votes
1answer
342 views

serial DMA pausing after 2048 bytes

I have a sama5d36 device running Debian jessie (kernel 4.1.10) with a DMA USART. To get the DMA USART to output correctly I had to turn off ECHO and ONLCR. stty -F /dev/ttyS2 -echo -onlcr speed ...
3
votes
2answers
2k views

How to monitor a serial connection @ 250000 baud?

I wish to directly monitor the serial-over-usb connection to my 3d printer, which runs at 250000 baud. e.g I might monitor it with cat /dev/ttyUSB0 However first I need to set the baud rate, e.g ...
0
votes
2answers
106 views

changing the behaviour of control signals at startup

I am trying to change the default behavior of the control signals with stty. Signals like Ctrl+C, Ctrl+D, Ctrl+Z, Ctrl+\. Can any one give me idea about how to disable and enable these signals on ...
3
votes
1answer
350 views

How can I rebind stty lnext to ^q?

You can type characters literally by using the "lnext" functionality (often ^V per default) in your tty driver However, I bind Ctrl+v to "paste" in my terminal emulator. (Since I don't use control ...
1
vote
1answer
335 views

VIM replaces backspace with ^?

Whenever I type backspace in VIM the editor inserts ^?. I've edited .vimrc to have set backspace=indent,eol,start and it didn't work. set backspace=2 Didn't work either. I've read that you need to ...
1
vote
1answer
318 views

Key other than Control to send SIG*?

I'd like to swap Ctrl & Super so that I can use the physical super/meta key for copy/paste/select-all/find/etc. without application-specific configuration, which often doesn't exist. However, I'd ...
1
vote
1answer
1k views

stty on old AT&T unix: how to add End-key for “end of line”?

How I can use the ctrl+e keyboard combination in emacs mode to go to the end of the line, but also be able to use the End key to do the same? How do I set that with stty? I have tried this combination ...
0
votes
2answers
524 views

Gap between two characters writing message over RS485

I am using an ATMEL embedded controller (at91sam9x25e) and its serial port to send/receive over RS485 Modbus RTU. Normal communication works fine, but sometimes - when writing - some packages are ...
2
votes
1answer
153 views

How to prevent garbled screen display while running scripts on remote hosts?

Current scenario: I am trying to run Unix shell script from a Solaris 5.10 box, within the script one of the tasks is to ssh to another Linux host (ssh-key pair already setup) and run a set of ...
2
votes
2answers
3k views

Understanding Return, Enter, and stty icrlf

In Ubuntu/gnome-terminal, if I run: $ stty -icrnl Then launch the GHC interactive environment (a Haskell console): $ ghci Then pressing Return does not submit the line; however, Enter does. ...
2
votes
1answer
970 views

How to prevent CTS from toggling each time a tty is opened or closed?

Each time I open() or close() a tty device file, the RTS line of the port is toggled off for a moment. This seems to happen even when hardware flow control is disabled with raw -crtscts. Is there ...
6
votes
1answer
1k views

How to have type-ahead apply to bash history search (Ctrl-R)?

Context Typeahead in bash: good When a bash shell is busy (initializing, running a command), one can type before the next prompt appears. If the shell has launched a program, that program will ...
5
votes
1answer
548 views

Why do the terminal attributes look different from outside the terminal?

If I open up a terminal (xfce4-terminal 0.6.3, but I doubt it matters) and I look at what terminal attributes are set (BASH is running in the terminal), $ stty -a speed 38400 baud; rows 24; columns ...
0
votes
1answer
114 views

Bind C-j to backward-kill-word, says command not found

bind -x '"\C-j": backward-kill-word' says, backward-kill-word: command not found As mikeserv quoted here, i am able to do backward-kill-word using Ctrl-w. However this is the same key i use in ...