Questions tagged [stty]

Command in Unix/Linux systems that allows you to set and print options for your terminal.

103 questions
4
votes
1 answer

How to use internal variable in tmux send-keys command?

Is there any way can let me do things like bind-key b send-keys "stty cols #{pane_width} rows #{pane_height}" I use TMUX. I often need to use ssh to login to CentOS servers which has no resize command. I cannot install command in those servers. The…
ZHUZHU-3
  • 45
  • 5
4
votes
2 answers

make stty raw -echo works with zsh or fish

I would like to know if someone has a way to make stty raw -echo works on fish or zsh. I used it to upgrade a reverse shell but when I do fg i can't press "enter" etc I got this result : Thanks !
Neolex
  • 235
  • 3
  • 15
4
votes
3 answers

GNU Screen terminal line settings

I want to use GNU screen to monitor to a serial USB port like this: $ screen /dev/ttyUSB0 115200 But I need to tweak a few terminal line settings. I have made several attempts but none seem to work. For example, to send NL+CR for a newline…
Adam Griffiths
  • 1,602
  • 1
  • 13
  • 17
4
votes
1 answer

Transmitting binary data throught ttyACM

Good afternoon, I have a peripheral device which communicates over usb over virtual serial port. Everything works well under Windows with generic ACM serial driver, for example with:…
JirkaRCK
  • 71
  • 2
  • 4
4
votes
2 answers

How to permanently disable XON/XOFF settings for stty?

I am working on an Embedded device with a serial console. I have observed that the console hangs suddenly and nothings seems to respond. The same cable when connected to another device works fine. After a lot of digging, I came to know about the…
iqstatic
  • 2,322
  • 3
  • 21
  • 39
4
votes
1 answer

.inputrc override Control+W

How do I override Control+W in bash within my .inputrc? The following on its own doesn't work: "\C-w": forward-word It does work when I add stty werase undef but then the 's' key is mysteriously disabled!
Raine Revere
  • 30,985
  • 5
  • 40
  • 52
3
votes
1 answer

linux + minicom + FT232RL USB-to-UART adaptor send Carriage Return (CR) instead of Linefeed (LF)

Hello to this wonderful community. I use a computer with MX Linux as OS. I want to access a device with a serial/UART console (Specifically, the device is a minimal computer made from 74-series ICs. See…
3
votes
1 answer

Bash: read input available (was any key hit?)

Question I am using Bash 5 and have a long-running loop which needs to check occasionally for various keys the user may have hit. I know how to do this using stty — see my answer below — but it's more ugly than ought. Essentially, I'm looking for a…
hackerb9
  • 1,545
  • 13
  • 14
3
votes
1 answer

Bash: pause and continue execution with spacebar

I am running code that produces a huge amount of output during more than an hour. During execution, I am logging my output to a file using tee. However, the huge amount of output that is still sent to my terminal is a bit cumbersome, so I made a…
freddieknets
  • 131
  • 6
3
votes
2 answers

How can I set the baud rate automatically when a device connects?

I can use stty -F /dev/ttyUSB0 19200 to set the baud rate whenever I want. But I'd like to set it automatically when a device is plugged in. Is there some sort of configuration file I can put this in? I'm doing this on a Ubuntu 14.04 (Trusty Tahr)…
holmes
  • 578
  • 1
  • 7
  • 16
3
votes
1 answer

Is there any stty option that puts the terminal in raw mode but still lets it generate a signal for e.g. CTRL+Z

There are many options for stty. What I want is based on stty raw -echo: I'm wondering if I can add an option that makes the terminal driver send a signal when it sees e.g. ctrl+z, instead of having my program handle this keypress.
Herbert
  • 538
  • 1
  • 4
  • 15
3
votes
1 answer

Emacs Tramp stuck at 'Found remote shell prompt' during file fetch

I recently set up a new FreeBSD machine and cannot seem to connect via Emacs Tramp. It stays stuck at "Tramp: Found remote shell prompt on 'broken.example.com'". (hostnames changed for anonymity) I upped the debugging to 10 as I've seen suggested…
Smutt
  • 81
  • 3
3
votes
3 answers

PhpSerial: No stty available -- cant seem to get it working

I'm working on a project which involves reading and writing to a Serial board, using the UART pins on my Raspberry Pi. However, I have hit a brick wall already. Any time I try use PhpSerial I always get the error: Fatal error: No stty available,…
hexxy
  • 31
  • 1
  • 4
3
votes
1 answer

How to read return when using stty -icanon

I have a loop after setting stty -icanon time 0 min 0 to prevent read from blocking. It works okay except it cant read the enter/return key. Is there any way to read the enter key in this mode, or any other way my code could be written ? Relevant…
user3442743
3
votes
1 answer

Where do stty commands go in bash dotfiles? .bash_profile?

I'm trying to ensure that the flow control, xon-xoff, Control-S Control-Q feature is turned off in all of my terminals/shells/tmux (so that I can reliably use Control-S for something else) It should work in X, urxvt, tmux, on consoles, ssh, ...…
bsb
  • 1,847
  • 26
  • 24