1. geany a.py
2. press F5 to run it
3. it shows a terminal with some error and asks user to press ENTER to close the terminal
4. instead press CTRL-C
geany how aborts geany_run_script.sh execution so that the last line nevers gets run (the last line is "rm $0" because the user is never supposed to even know that geany_run_script.sh is being created, it's an implementation detail).
geany should never leave copies of geany_run_script.sh around
Note #1: I use geany for tons of stuff.... I did a quick search in my home dir and found tens of copies littered all over, in all kinds of dirs. they are just junk, I don't want them there.
Good news is that the fix is easy, the "rm $0" command just needs to execute before the terminal window waits for the ENTER key stroke.
The following patch does exactly that:
diff -r -u geany_apt_clean/geany-0.16/src/build.c geany_apt/geany-0.16/src/build.c
--- geany_apt_clean/geany-0.16/src/build.c 2009-02-10 22:10:50.000000000 +0100
+++ geany_apt/geany-0.16/src/build.c 2009-03-24 22:41:19.000000000 +0100
@@ -944,7 +944,7 @@
str = g_strdup_printf(
"#!/bin/sh\n\n%s\n\necho \"\n\n------------------\n(program exited with code: $?)\" \ - \n\n%s\nrm $0\n", cmd, (autoclose) ? "" :
+ \nrm $0\n%s\n", cmd, (autoclose) ? "" :
"\necho \"Press return to continue\"\n#to be more compatible with shells like dash\ndummy_var=\"\"\nread dummy_var");