Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .