drmullins
Posts: 43
Joined: Fri Jun 23, 2017 9:22 pm

Geany broken in Stretch ?

Sat Aug 26, 2017 9:39 pm

Fresh install of Raspbian Stretch

Open Geany

Create a file fred.py containing :
#!/usr/bin/env python
print 'fred'

chmod 777 fred.py

Select Build > Execute in geany
A terminal window opens with the heading geany_run_script_NLDN5Y.sh or similar
Nothing visible in terminal window - expecting fred

Help!

drmullins
Posts: 43
Joined: Fri Jun 23, 2017 9:22 pm

Re: Geany broken in Stretch ?

Sat Aug 26, 2017 10:36 pm

Sorry I forgot to say I set the Execute command to python %f before executing
Also have a similar problem running bash scripts

User avatar
buja
Posts: 504
Joined: Wed Dec 31, 2014 8:21 am
Location: Netherlands

Re: Geany broken in Stretch ?

Sun Aug 27, 2017 5:56 am

I am having the same problem, both on my Pi and a laptop running Debian Stretch, previous versions (Wheezy, Jessie) worked fine.

User avatar
M5
Posts: 12
Joined: Tue Mar 27, 2012 2:35 pm
Contact: Website

Re: Geany broken in Stretch ?

Sun Aug 27, 2017 2:37 pm

I am having the same problem.

After downloading the new stretch version and running sudo apt-get update && sudo apt-get upgrade -y to get the most up to date version I still get a blank terminal window with the heading of geany_run_script_Z4835Y.sh the last part seems to change each time you run a python program.

Does anyone have any ideas how to fix this issue.

Kind regards fellow Pi people

User avatar
buja
Posts: 504
Joined: Wed Dec 31, 2014 8:21 am
Location: Netherlands

Re: Geany broken in Stretch ?

Sun Aug 27, 2017 6:46 pm

I have not solved the problem, but I did found a work-around.

Under Edit / Preferences / Terminal check "Execute programs in the VTE". Geany will run your program in its own terminal at the bottom of the window. It's not really an alternative for a full terminal window, but it might help a bit.

Any pointers to a better solution are welcome.

drmullins
Posts: 43
Joined: Fri Jun 23, 2017 9:22 pm

Re: Geany broken in Stretch ?

Sun Aug 27, 2017 8:51 pm

I found another solution (to my own problem !) after much searching and some experimentation :

Change the first line after [tools] in ~/.config/geany/geany.conf

to

terminal_cmd=x-terminal-emulator --command="/bin/sh %c"

and reboot

User avatar
buja
Posts: 504
Joined: Wed Dec 31, 2014 8:21 am
Location: Netherlands

Re: Geany broken in Stretch ?

Sun Aug 27, 2017 9:15 pm

drmullins wrote:
Sun Aug 27, 2017 8:51 pm
I found another solution (to my own problem !) after much searching and some experimentation :

Change the first line after [tools] in ~/.config/geany/geany.conf

to

terminal_cmd=x-terminal-emulator --command="/bin/sh %c"

and reboot
Great! So it seems the x-terminal-emulator command has changed a bit from Jessie to Stretch.

By the way, you can make this change in Geany itself: Edit / Preferences / Tools and change the Terminal line. Press Apply and Geany should work. If you edit the config file manually you can log out and log in again to make it work, full reboot is not necessary.
Edit: I think you only have to exit Geany and start it again to make it work.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6032
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Geany broken in Stretch ?

Mon Oct 30, 2017 12:07 pm

The default value has been fixed now. Thanks for reporting the issue.

For compatibility with xterm, I've just remove the quote marks around the command instead of using --command.

bemoyer
Posts: 1
Joined: Fri Jul 06, 2018 5:28 pm

Re: Geany broken in Stretch ?

Fri Jul 06, 2018 5:31 pm

I had a similar issue and found that if I simply resized the output window my Hello World suddenly appeared when there had previously been nothing but a white spot. I have no idea why resizing the window would change what was displayed. Anyone have any ideas?
Thanks!

Negative459
Posts: 6
Joined: Wed Jan 16, 2019 6:25 pm

Re: Geany broken in Stretch ?

Wed Jan 16, 2019 6:39 pm

Sorry to revive an older thread but I can't find my answer elsewhere. I have tried the above suggestion but changing my terminal path in preferences > tools to terminal_cmd=x-terminal-emulator --command="/bin/sh %c" gets me this:

Cannot execute build command "terminal_cmd=x-terminal-emulator --command="bin/sh /tmp/geany_run_script_2IYJV.sh"': No such file or directory

What am I doing wrong? TIA

**update - N00b mistake. I deleted the terminal_cmd= in the field and I no longer get the directory error but I still get a blank window. Resizing it doesn't get me anything either. Any thoughts? Doing preferences > terminal > execute programs in the VTE works, but it's annoying and prefer a pop-up terminal window.

RogerSmith
Posts: 13
Joined: Tue Jan 08, 2019 12:02 pm

Re: Geany broken in Stretch ?

Sat Jan 26, 2019 1:37 pm

What version of Python are you running?

Geany defaults to Python 2

If you are running Python 3 you need to set Execute Commands in the Build Commands tab to python3 -i "%f"

Negative459
Posts: 6
Joined: Wed Jan 16, 2019 6:25 pm

Re: Geany broken in Stretch ?

Wed Jan 30, 2019 4:58 am

Thanks Roger. I tried this but it didn't fix my issue. I guess I will just keep executing in the VTE, which seems to work.

User avatar
Paeryn
Posts: 2702
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Geany broken in Stretch ?

Wed Jan 30, 2019 7:31 am

Negative459 wrote:
Wed Jan 16, 2019 6:39 pm
Cannot execute build command "terminal_cmd=x-terminal-emulator --command="bin/sh /tmp/geany_run_script_2IYJV.sh"': No such file or directory
Added emphasis, it looks like you might have missed the leading / at the start of the command, it should be /bin/sh whereas that error says you have it set to just bin/sh.
She who travels light — forgot something.

Negative459
Posts: 6
Joined: Wed Jan 16, 2019 6:25 pm

Re: Geany broken in Stretch ?

Wed Jan 30, 2019 8:57 am

Paeryn wrote:
Wed Jan 30, 2019 7:31 am
Negative459 wrote:
Wed Jan 16, 2019 6:39 pm
Cannot execute build command "terminal_cmd=x-terminal-emulator --command="bin/sh /tmp/geany_run_script_2IYJV.sh"': No such file or directory
Added emphasis, it looks like you might have missed the leading / at the start of the command, it should be /bin/sh whereas that error says you have it set to just bin/sh.
That was totally it! Thank you. You can tell I'm still new to all this when such a simple syntax error can slip past my notice. Thanks, Paeryn!

Return to “Raspbian”