| Prev |   4     5   6 |
maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [ANNOUNCE] Geany IDE - supports C,C++,python,java,php,ruby,etc... (https://talk.maemo.org/showthread.php?t=19155)

dantonic 2009-09-02 21:26

Re: [ANNOUNCE] Geany IDE - supports C,C++,python,java,php,ruby,etc...
 
Quote:

Originally Posted by BruceL (Post 320437)
Hi, I'm glad you got most of the way there!
I think there are two things missing:
First, make sure you have execute permissions on the executable file.

chmod a+x test.o

Next, run it like this:

./test.o

I don't know why Geany isn't running it correctly, but perhaps the above will help. (I use the command line myself.)

Good luck!

Hi,thanks for the reply.
I'm not well versed in linux, but anyway this is what i tried:
/media/mmc1/docs/cisp 360 # chmod a+x test.o
/media/mmc1/docs/cisp 360 # /test.o
/bin/sh: /test.o: not found
/media/mmc1/docs/cisp 360 # ls
gcc-3.4.install test.c
geany_run_script.sh test.o
test
/media/mmc1/docs/cisp 360 #

BruceL 2009-09-02 21:33

Re: [ANNOUNCE] Geany IDE - supports C,C++,python,java,php,ruby,etc...
 
There is a '.' before the /test.o
In linux, if you want to execute a file that isn't in the path you need to prefix it with './' (dot slash). It's a safety precaution I believe.

Also, if ./test.o doesn't work, try it with the 'test' file; I'm not sure how Geany made things.

dantonic 2009-09-09 18:57

Re: [ANNOUNCE] Geany IDE - supports C,C++,python,java,php,ruby,etc...
 
Quote:

Originally Posted by BruceL (Post 320480)
There is a '.' before the /test.o
In linux, if you want to execute a file that isn't in the path you need to prefix it with './' (dot slash). It's a safety precaution I believe.

Also, if ./test.o doesn't work, try it with the 'test' file; I'm not sure how Geany made things.

I've tried every combination, ./test.o ./test test test.o

I always get the error: /bin/sh: ./test(.o) permission denied

any ideas about what could be going on?

I've also tried this as root. Not sure why it wont let me run it.

BruceL 2009-09-09 19:11

Re: [ANNOUNCE] Geany IDE - supports C,C++,python,java,php,ruby,etc...
 
the command

chmod a+x test(.o)

should give you permission.

Type "ls -l" (no quotes) in that folder to see if you have executable permissions. The file should look something like this:

-rw-rw-r-x 1 ebrulon cbssw 25 Apr 15 11:08 test.o

the 'x' in the '-rw-rw-r-x' means that you have executable permissions. It could also look something like '-rwxrwxrwx' the 'x's are executable permissions. (r and w are read and write.)

Also, are there any files that end with '.out' in the folder? The executable could have that extension.

Bruce

dantonic 2009-09-09 19:53

Re: [ANNOUNCE] Geany IDE - supports C,C++,python,java,php,ruby,etc...
 
Quote:

Originally Posted by BruceL (Post 324434)
the command

chmod a+x test(.o)

should give you permission.

Type "ls -l" (no quotes) in that folder to see if you have executable permissions. The file should look something like this:

-rw-rw-r-x 1 ebrulon cbssw 25 Apr 15 11:08 test.o

the 'x' in the '-rw-rw-r-x' means that you have executable permissions. It could also look something like '-rwxrwxrwx' the 'x's are executable permissions. (r and w are read and write.)

Also, are there any files that end with '.out' in the folder? The executable could have that extension.

Bruce

thanks for the response. Trying the chmod command and the ls -l to check for change in execution permissions. The permissions do not change, it stays at -rw-r--r-- for all files in that folder.

tried it for test and test.o

I appreciate your help, any other ideas? another way to change permissions? looks like that's the problem.
no files ending with .out

BruceL 2009-09-09 20:07

Re: [ANNOUNCE] Geany IDE - supports C,C++,python,java,php,ruby,etc...
 
To change permissions you must own the file. When you do 'ls -l' does it say 'user' or 'root' as owner. In the above example 'ebrulon' is me (the owner) and 'cbssw' is the group I am in. Since it is best to build files as user, do this:

1) make sure you are root
2) cd to the parent of your project folder.
3) chown -R user <name-of-your-project-folder>

This should recursively CHange the OWNership of the folder and all its contents to user.

THEN try chmod a-x again.

The command chgrp does the same thing for the file's group.

This does eventually get easier, BTW.

Jaffa 2009-09-09 20:55

Re: [ANNOUNCE] Geany IDE - supports C,C++,python,java,php,ruby,etc...
 
If you can't change the permissions, is the file in /media/mmc*, which is mounted noexec

dantonic 2009-09-09 21:48

Re: [ANNOUNCE] Geany IDE - supports C,C++,python,java,php,ruby,etc...
 
ok, so thanks to both of you for starters. I was saving to my mmc card. I tried to save to the mydocs folder of the OS, and I do have permissions in there, and am able to run it.

Is it impossible to run such a file from a storage partition such as my mmc1 card?

Jaffa 2009-09-09 21:55

Re: [ANNOUNCE] Geany IDE - supports C,C++,python,java,php,ruby,etc...
 
Quote:

Originally Posted by dantonic (Post 324531)
Is it impossible to run such a file from a storage partition such as my mmc1 card?

No, it's Maemo - nothing's impossible[TM] ;-).

You have three basic options:
  1. Don't use the MMC, use the root fs. Problem goes away.
  2. Run it using /lib/ld-linux.so.2 ./test. This bypasses the noexec flag.
  3. Modify /etc/fstab and remove noexec for /media/mmc1.


| Prev |   4     5   6 |
All times are GMT. The time now is 23:55.

vBulletin® Version 3.8.8