Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 28 Nov 2014, 20:15
All times are UTC - 4
 Forum index » House Training » Bugs ( Submit bugs )
geany_run_script.sh not given execute permission [SOLVED]
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [21 Posts]   Goto page: 1, 2 Next
Author Message
jafadmin

Joined: 19 Mar 2009
Posts: 441

PostPosted: Sat 09 May 2009, 16:38    Post subject:  geany_run_script.sh not given execute permission [SOLVED]  

4.2

when I try to execute a compiled program from geany using F5 it fails to execute and the window hangs. It turns out that the permissions that are set on the geany_run_script.sh file are everything but execute. WT Confused

Can someone please tell me how to fix this? I have no idea how geany sets the permissions on that file.

Last edited by jafadmin on Sun 10 May 2009, 12:31; edited 1 time in total
Back to top
View user's profile Send private message 
Bruce B


Joined: 18 May 2005
Posts: 11131
Location: The Peoples Republic of California

PostPosted: Sat 09 May 2009, 17:29    Post subject:  

It doesn't need to be executable

Proof make a little text file and write the command
echo hello world as the file's text

Then

. filename
source filename
sh filename
bash filename


See for yourself if it runs the command echo hello world

_________________
New! Puppy Linux Links Page
Back to top
View user's profile Send private message 
jafadmin

Joined: 19 Mar 2009
Posts: 441

PostPosted: Sun 10 May 2009, 07:21    Post subject:  

We're talking 4.2 here.

1. Only "sh filename" and "bash filename" work as you say.
2. Geany automatically generates the script file
3. It don't work.

The topic isn't about how you or I can make a script execute, it is about what we can do to make geany's script work right.

In 4.12 the generated script has execute permissions and works properly. you can invoke the script from the command line using the ./ method and it works.

In the 4.2 distro the geany_run_script.sh doesn't execute. It fails with a "permission denied" I know how to make a script execute. We all do. Geany in 4.2 doesn't. That's my point. It's a bug.

Can someone please point me in the right direction on how to patch this in geany?
Back to top
View user's profile Send private message 
WhoDo


Joined: 11 Jul 2006
Posts: 4441
Location: Lake Macquarie NSW Australia

PostPosted: Sun 10 May 2009, 07:37    Post subject:  

jafadmin wrote:
The topic isn't about how you or I can make a script execute, it is about what we can do to make geany's script work right.

In 4.12 the generated script has execute permissions and works properly. you can invoke the script from the command line using the ./ method and it works.

In the 4.2 distro the geany_run_script.sh doesn't execute. It fails with a "permission denied" I know how to make a script execute. We all do. Geany in 4.2 doesn't. That's my point. It's a bug.

Can someone please point me in the right direction on how to patch this in geany?

The version of Geany in Puppy-4.2 was compiled for Puppy by one of our packagers - don't remember which one. The only way to fix this would be to patch the relevant Geany source file to have it apply execute permissions to the generated script at build time, and then recompile again from the patched tarball. Not very helpful, I know, jafa.

_________________
Actions speak louder than words ... and they usually work when words don't!
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com
Back to top
View user's profile Send private message 
jafadmin

Joined: 19 Mar 2009
Posts: 441

PostPosted: Sun 10 May 2009, 08:12    Post subject:  

Ok. I was afraid of that.

Thanks.

[SOLVED] in this thread: http://www.murga-linux.com/puppy/viewtopic.php?t=40666
Back to top
View user's profile Send private message 
Bruce B


Joined: 18 May 2005
Posts: 11131
Location: The Peoples Republic of California

PostPosted: Sun 10 May 2009, 17:46    Post subject:  

I compiled my own Geany. What I noted was the
default location came later in the path than the
Puppy version. So I deleted the Puppy version.

As far as this not working . . .

. filename
source filename

It always work in a terminal emulator - until ???,
if a change? May be installing Pizzasgood's GTK did it.

Not important, if I note anything significant I'll be back.
I've not looked into it. I was surprised to read it didn't
work.

_________________
New! Puppy Linux Links Page
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4380

PostPosted: Tue 13 Oct 2009, 20:29    Post subject:  

I have ID'd a couple things on this in the new bug tracker here:
http://code.google.com/p/puppy-development/issues/detail?id=4

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
r__hughes

Joined: 13 Apr 2006
Posts: 343
Location: Canada

PostPosted: Wed 14 Oct 2009, 19:02    Post subject:  

In pup4.2+ geany has a problem being a c-runtime-environment.
It will compile & build but NOT run a c-program

In the meantime the solution is to edit the geany preferences
edit/preferences/Tools/Terminal/ to read
Code:
/usr/X11R7/bin/xterm -e bash -c

_________________
--- quad booting pup431, Slacko55PAE, Slacko56NPAE (with OO3/LO4, devx, Gimp) & WXP on DELL Dimension 2400 PC & DELL Latitude 630 Laptop using grub.
---USB-Flash booting same on Samsung N110 WXP Netbook and Lenovo q100 WXP netPC.
Back to top
View user's profile Send private message 
sfoster


Joined: 12 Jun 2010
Posts: 42
Location: Southern California, USA

PostPosted: Sat 12 Jun 2010, 16:54    Post subject:  

Hi,
I'm having a problem executing code in Genie using the Freebasic compiler. I installed the Freebaic.pet package from the repository, but instead of sitting there, the bash window came up and shut down so fast that I hardly had time to see it. As to the solution r_hughes offered, I couldn't mimicked the file path because there doesn't seem to be anything labeled xterm in the x11R7/bin. I don't think the configuration is the same (I'm running lucid puppy 5.0), but I still tried inserting the line
Code:
xterm -e bash -c

but got the following error message from bash:
Code:
./geany_run_script.sh: line 5 ./hi:  no such file or directory
.
Also, the script won't even compile from inside Geany in my case.
I tried saving the files to the bin directory, but I came up with the same message. Meanwhile, is there an alternate IDE that I can use in place of Geany that does more or less the same thing?
I posted here because the bash script problem mentioned seems to have similar symptoms. I checked both the Genie run script and my own file to make sure they both had execute permission, but changing it didn't seem to help very much.
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3385
Location: Ontario

PostPosted: Mon 14 Jun 2010, 18:09    Post subject: geany 0.19 released  

There's a new version of geany that has been released with
a lot of bug fixes. I made a pet package.
Available at www.esnips.com/web/lupu
Back to top
View user's profile Send private message 
sfoster


Joined: 12 Jun 2010
Posts: 42
Location: Southern California, USA

PostPosted: Mon 14 Jun 2010, 21:03    Post subject:  

I will definitley try it and let you know how it goes. Thanks in advance. Very Happy
-yours
S
Back to top
View user's profile Send private message 
sfoster


Joined: 12 Jun 2010
Posts: 42
Location: Southern California, USA

PostPosted: Tue 15 Jun 2010, 18:00    Post subject: Unfortunately still not working  

Okay,
I tried installing the new copy of Geany last night, but unfortunately there doesn't seem to be much progress in that area. If you are installing a new copy of Geany, do you have to uninstall the old one first? Another thing I thought of has to do with the code behind the execute command. I noticed a section somewhere in the preferences menu that had to do with setting special options for the execute command and it had what looked like a binary execute command followed by the letters fbc (the compiler name). Could freebasic be requiring some special options needed to execute? Also, the status of the compile button seems to have deteriorated. Before, I could press it, and the compiler window at the bottom of the screen would give me an error message about not finding a necessary file. Now the button is completely ghosted. I'm not sure, but could this have anything to do with trying to install over the old Geany incorrectly? One other thing happened that leads me to this conclusion. When I go to create a new file, there used to be a whole bunch of templates. The templates, it appears, have been shifted into a submenu called old templates, or something like that. Confused It kind of looks to me like the program overwrote some things without overwriting others.
If anyone is reading this post before the next couple hours, I will try to get on puppy again and fill in some of the details I might have not clarified very well. Thanks again to don570 for the link.
Yours,
-S
Back to top
View user's profile Send private message 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Wed 16 Jun 2010, 12:05    Post subject:  

sfoster wrote:
As to the solution r_hughes offered, I couldn't mimicked the file path because there doesn't seem to be anything labeled xterm in the x11R7/bin. I don't think the configuration is the same (I'm running lucid puppy 5.0), but I still tried inserting the line
Code:
xterm -e bash -c

Yes, you correctly adapted the solution to work with your configuration. So now you can see the output from bash.

sfoster wrote:
but got the following error message from bash:
Code:
./geany_run_script.sh: line 5 ./hi:  no such file or directory

So there is another problem. The reason bash can't find ./hi is this:
sfoster wrote:
Also, the script won't even compile from inside Geany in my case.

So geany apparently didn't find a copy of the executable hi in the directory where it expected it.

sfoster wrote:
Also, the status of the compile button seems to have deteriorated. Before, I could press it, and the compiler window at the bottom of the screen would give me an error message about not finding a necessary file.

That error message could be the key to getting this working. Do you remember what it was?

sfoster wrote:
Now the button is completely ghosted.

When you saved the file did you name it with the .bas extension? If so, I don't know why the button would be grayed-out, unless the new version of geany doesn't recognize .bas files as source code. If that's the case you will obviously need to revert to the version you had before. My guess is that once you fixed the preferences for Terminal, that geany was probably working okay, but you may have had missing dependencies for freebasic.

Have you tested freebasic without geany? If not, open a terminal window, change to the directory where hi.bas lives, and try this:
Code:
fbc -w all hi.bas
./hi
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3385
Location: Ontario

PostPosted: Wed 16 Jun 2010, 20:21    Post subject: pet2tgz  

If you want to see what code you've installed
and where you've installed it
the command in puppy is
Code:
pet2tgz  package.pet

Then open with archiving program
Be careful because pet2tgz command will destroy original
pet package,so make a copy first!!
By the way , if you uninstall geany .19 the old
geany comes back magically (because it's hidden in filesystem)
Back to top
View user's profile Send private message 
sfoster


Joined: 12 Jun 2010
Posts: 42
Location: Southern California, USA

PostPosted: Thu 17 Jun 2010, 02:02    Post subject:  

I ended up busier than I thought I would be (I would have clarified the error message sooner) but I did try compiling code from inside the terminal just to see if the problem was Freebasic's (from earlier), and that worked. It made a binary just fine. Sorry to keep the details waiting.
I should also clarify that I havent tried the -e bash -c command together with the new install of Geany yet. They were separate attempts, so trying the two together might yield new results.
Hang, on Im going to load a copy in ram and repost on the error message details, because due to a very stupid mistake on my part, I forgot to test the new version of Geany in ram before installing it to my pup-save file.
Oh, I should also mention before I sign off that the file was actually named hi.bas. I think bash just didn't print the file extension for some reason when it was relaying the message back to me. I think the new version does recognize .bas files because in one of the lower windows immediately below the editing pane, it says "file type: Freebasic." I will check again just to make sure.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [21 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Bugs ( Submit bugs )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1087s ][ Queries: 12 (0.0076s) ][ GZIP on ]