Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Does anyone know how to set the default baud rate for GNU Screen? Currently I explicitly specify the baud rate when I open screen like so:

$ screen /dev/ttyUSB0 115200

115200 is a magic number, and I'd prefer to just specify that in .screenrc if possible.

share|improve this question

1 Answer 1

Screen man page doesn't give any screenrc entries for setting baud rates, so unlikely you could 'preset' it there.

Several methods come to mind:

Using an alias:

alias screenu0='screen /dev/ttyUSB0 115200'

name it as appropriate, you COULD even name it 'screen', but that would make this the default command at that point, might not be what you want.

Using default values:

If you don't specify the baud, it'll default to whatever the port is currently set to. Does your serial USB device do any setup? Do you 'stty /dev/ttyUSB0 ...' anywhere to set default parameters?

In this situation, I'd recommend using an alias with an alternate meaningful name, that way you can quickly invoke your serial screen, or with the usage of the normal command, use screen in other ways.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.