Questions tagged [stty]

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

103 questions
2
votes
0 answers

bash script, phpunit 9.6 and 10: stty: 'standard input': Inappropriate ioctl for device

I do understand it has something to do with stty and the console but it is still strange, I have been doing this for ages under konsole. Also I understand it may not be exactly an error in phpunit, and so far I was able to relate it while working…
RudyMartin
  • 68
  • 8
2
votes
1 answer

Stty getting insane on using Python subprocess

I am facing a weird problem. Every time I call a particular command cmd via subprocess.Popen(cmd).wait(), the stty gets bad (does not echo my further commands on the shell, newline does not work, etc.) when the command is over. I have to run stty…
amit kumar
  • 20,438
  • 23
  • 90
  • 126
2
votes
1 answer

Script called from ~/.ssh/config loses TTY

I'm using a site-specific authentication script that issues a 24-hour certificate for password-less login. What I'm trying to do is rig my ~/.ssh/config so ssh triggers the script if the certificate has expired: Match originalhost remotehost.site…
2
votes
1 answer

Bash: stty: standard input: Inappropriate ioctl for device when SSH

I'm writing and simple bash script: #! /bin/bash echo "IP: $1" sshpass -p 'pass' ssh -t -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@$1 << EOF cd ../ sed -i -e 's/x=false/x=true/g' file.txt echo "*** x has changed!…
Yuval Froman
  • 91
  • 1
  • 9
2
votes
1 answer

Why does `stty cols 40` have different effects in the two shells bash and xonsh

I get weird behaviour when using stty in the xonsh shell on Linux/macOS. (Commands do not seem to obey the defined column under xonsh, but they do so under bash.) To get a better understanding of the situation I wrote a little C program which calls…
halloleo
  • 9,216
  • 13
  • 64
  • 122
2
votes
1 answer

Python curses unsets 'onlcr' and breaks my terminal; how to reset *properly*

I have the following basic curses implementation in Python3. #!/usr/bin/env python3 import curses import time from curses import wrapper stdscr = curses.initscr() # required curses.noecho() # don't show keyboard input curses.cbreak() # don't…
2
votes
0 answers

Forcing raw serial mode in C - linux

Not sure how to word the title, but what I'm trying to do is test my micro controller with my Linux PC to ensure data is correct. After hours of searching, I found out that the stty command can change how data is managed through the serial port and…
Mike -- No longer here
  • 2,064
  • 1
  • 15
  • 37
2
votes
0 answers

Connect to RS232 from Android - No permission dialog or shell command

Objective I'm developing a custom app for internal use on a rooted android mini-pc. The goal (between others... so...many...others...) is to be able to turn on and off a tv using the serial port embeeded on the tv. I'm using an FTDI UART RS232…
Asfura
  • 63
  • 1
  • 5
2
votes
1 answer

stty in non interactive mode

I am executing a command through script in remote server which is of non-interactive mode. I've gone through the link and found the below errror is because of running stty in non-interactive…
Shriram
  • 4,343
  • 8
  • 37
  • 64
2
votes
1 answer

Opening a serial port on OS X hangs forever without O_NONBLOCK flag

I have a serial to USB converter (FTDI, drivers installed from http://www.ftdichip.com/Drivers/VCP.htm) connecting a serial device to a MacBook Air. It shows up on the MacBook as both /dev/cu.usbserial-A4017CQY and /dev/tty.usbserial-A4017CQY. All…
Eric Dand
  • 1,106
  • 13
  • 37
2
votes
3 answers

Setting DTR high, RTS low using Linux bash?

I have a serial device that has no flow control, but is powered from the RS232 port by holding the RTS high and DTR low I was hoping to read from this device using a simple bash script, but can't find any way to set the handshaking lines, using stty…
user1447903
  • 303
  • 2
  • 7
  • 14
2
votes
1 answer

stty RAW console in C

I'm trying to build my own console and I'm using the below statement to get RAW access so I can implement some advanced features such as implementing the auto suggest feature that's implemented in a BASH shell by pressing the TAB…
DangerousDave23
  • 113
  • 1
  • 2
  • 10
2
votes
2 answers

How to not echo here document to terminal?

I have a script that prompts the user for their sudo password, and then iterates through a list of hosts and performs commands on remote hosts. I can 'read -s' to get their password silently, but each time their password is used on a remote host,…
John Oliver
  • 325
  • 2
  • 4
  • 11
2
votes
0 answers

Override "^c" or "ctrl-c" is the interrupt signal for shell interpreter

I would like to override ctrl-c as the signal interrupt character for all my shells and replace it with something else. I've looked at stty and xmodmap, but have not found anything that i understand as of yet. If anyone has some ideas i would…
2
votes
1 answer

Symfony2 CLI Error ( 'stty' is not recognized as an internal or external command )

I get the following error when trying to generate an entity in Symfony2 from the Windows command line: 'stty' is not recognized as an internal or external command, operable program or batch file. i'v just added FOSUserBundle to my Symfony Bundles.…
morteza kavakebi
  • 1,640
  • 3
  • 18
  • 39