0

I am connected to an embedded Linux device using GNU screen. The connection is via /dev/rfcomm0 which is a Bluetooth serial interface. I frequently forget to put an & after a CLI command, which blocks the interface until the command completes. I would like to be able to send a ctrl-C break to the CLI, but when I do the terminal just echoes ^C. I've tried changing the flow, XON/XOFF, escape sequences, :stuff $'**' with various *'s.

As far as I understand, there is no way for me to make a second screen interface into the serial device in order to send a kill.

Is there a way for me to send a ctrl-C break to the CLI over screen?

0

I haven't tried it myself, but this answer suggests you could detach from the screen session and run:

screen -S session_name -X at window_number stuff $'\003'

Alternately, could you try sending a ctrl-z and then using bg to put the process in the background? That is, if the ctrl-z gets passed through correctly.

  • ctrl-z does not get passed through either. I'll try detaching and will report back. – Ken Sills Jun 17 '16 at 17:19
  • detaching and using "stuff" to send that code results in ^C being echoed to the terminal, but the CLI doesn't get the break. – Ken Sills Jun 17 '16 at 17:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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