I have a problem with Geany. I can set a keyboard shortcut to send selection to the terminal. But these line are just copied on the terminal, not executed. So, if you select this line:


and send it to the terminal, R is not actually executed, instead the letter R appears in the terminal prompt. If I press "enter" then R is launched. How can I make that last "enter" be automatically send to the terminal together with the selection?

Is there a keyboard shortcut to send and execute the selection in the terminal?

  • 1
    No, as with 1.27 there isn't. You could define a shell script which is executing what it's receiving as via STDIN and configure it for the send selection to feature. – frlan Apr 27 '16 at 7:12
  • 1
    @frlan: is this solution easy to do; could you add this as an answer? – user2413 Apr 27 '16 at 7:37

Changing send_selection_unsafe=false to send_selection_unsafe=true in the geany.conf file (~/.config/geany/geany.conf) fixed this for me.


I am not familiar with geany so I could be wrong here but you probably need to add CrLf to the end of the line. Most programs this can be specified with \r\n maybe that will help.

  • Thanks. What is \r\n? – user2413 Apr 26 '16 at 19:07
  • \r is an escape sequence that represents the carriage return character \n represents a new line character also called line feed, both are used due to historical typewriters where they were two separate operations. – MttJocy Apr 26 '16 at 19:10

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.