I run (with Geany's F5) a program different from xterm and hope it would get my lovely $everything.
And again its the shell thats swallowing it, commands execute in a shell, try typing `echo $2 "$3" -$4-` at the command line without a Geany in sight and the shell will do what you told it to (not what you want it to), substitute the relevant parameters (which are empty) for the $n and so your beautiful $n is masticated out of existence by the SHELL.
You need to shell escape the poor innocent `$` that is egregiously eaten by the shell with a backslash which is a substantial meal for a shell and satiates its hunger and it leaves the `$` alone.