Geany fails to run with "/bin/sh ./ (No such file or directory)" error

When I try to run a source code in Geany, it produces this error message

"/bin/sh ./" (No such file or directory)

You can see the error message in action, here . (I can’t import the image yet, as a new user)

I’ve tried with gnome-terminal and Geany works without issues.
After some tests, I’ve concluded this might be a problem with /usr/bin/mate-terminal.wrapper, but I’ll let the Devs decide what the problem is. I’m here only to report the problem and outline two workarounds I’ve found.

How to reproduce:

Install Geany and try to run any source code , for example Python or C#.

Workaround 1:

GoTo Geany Preferences → Tools → Terminal and change the command from

x-terminal-emulator  -e "/bin/sh %c" 


/usr/bin/mate-terminal  -e "/bin/sh %c" 

That works,
also indicates (imo) something wrong in /usr/bin/mate-terminal.wrapper.

Workaround 2:

Revert (or let) Geany to its default settings, meaning

x-terminal-emulator  -e "/bin/sh %c" 

Open the /usr/bin/mate-terminal.wrapper
and change the line

elif arg == '-e':


elif arg == '-e':


1 Like

Number 2 works perfectly, thanks

And Workaround 1 works, but I’ve had a typo.

Is not

/usr/bin/mate  -e "/bin/sh %c"


/usr/bin/mate-terminal  -e "/bin/sh %c"


I edited the first post and fixed it.

The Workaround 2, probably won’t apply after a mate-terminal package update, I’m not sure though. You will have to modify the file again.

1 Like

For any Manjaro KDE user, set ( Preferences → Tools → Terminal ) from:
-xterm -e "/bin/sh %c"
konsole -e "/bin/sh %c"