Reply
Thread Tools
Posts: 11 | Thanked: 0 times | Joined on May 2010
#1
My question is this. I have tested my gtk_helloworld app in scratchbox on debian pc. Now I want to do the same in the nokia n900, but if possible without having to enter in packaging stuff. Is this possible to do in a simple and straight for manner?

Thank you very much for your help.

Last edited by r0gcas; 2010-05-09 at 11:43.
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#2
It is very possible. This is, for example, how I do all my testing.

Install the openssh package on your device. It will ask you to set a password for the root account. Do that and remember the password.

When this is done, you can use scp, Secure CoPy, to move your binaries to the device and run them there:
Code:
scp gtk_helloworld root@<N900 IP adress>:/home/user
After having copied it, you can run it from an XTerminal on the N900.

If you don't have a local WiFi connection, you can use the PC Suite to get IP over USB going. There are good instructions here in the forum if you search for them.

Happy hacking.

Last edited by Joorin; 2010-05-09 at 11:48. Reason: Typo
 

The Following User Says Thank You to Joorin For This Useful Post:
Posts: 52 | Thanked: 8 times | Joined on Apr 2010
#3
or you could just build it and copy the binary to ur device. Open up the shell, cd to ur application and type ./<app_name>
 
Posts: 11 | Thanked: 0 times | Joined on May 2010
#4
Thank you very much for your both replies, I will try it and post it if I success. Thank you again and happy hacking to both you.

...

well, time passed and i tried first the simplest one, that is, the last one but permission denied was the response when trying to execute frome terminal the binary. Then I installed openssh, but suppose I need more info about that and shell commands and that IP stuff. Well, thanks because I know that it is possible and have to learn a little more and then try again later. When I success I will post it here.

Happy hacking.

Last edited by r0gcas; 2010-05-09 at 14:46.
 
Posts: 52 | Thanked: 8 times | Joined on Apr 2010
#5
oh yeh, forgot you need root access before you can do it. install rootsh from the repository if you havent already and type 'sudo gainroot' before you cd to the directory and run it.
 

The Following User Says Thank You to Jaso333 For This Useful Post:
lostinmirkwood's Avatar
Posts: 128 | Thanked: 232 times | Joined on Sep 2009 @ New Jersey, USA
#6
It's my understanding that you can't
Code:
chmod +x
anything inside the MyDocs directory, so you have to move the file elsewhere, such as /opt/[appName]

This is most likely why you're getting a permission denied.
 
Posts: 11 | Thanked: 0 times | Joined on May 2010
#7
Jaso333 this is not the problem I think because the same happens with root access. I think it is related with lostinmirkwood says but i can't copy in for example /opt because permission denied too. and i don't know what is chmod +x, but i tried too but not success for the moment.

thanks for trying to help...
 
Posts: 402 | Thanked: 229 times | Joined on Nov 2009 @ Missouri, USA
#8
IIRC, MyDocs is a FAT file system. As such, it neither recognizes nor honors file permissions. You don't have to save the file to /opt (in fact, you would have to have root permissiosn to save it there anyways. Beter would be ~/ (which expands to /home/user on unmodified N900's).

@r0gcas: chmod [ch]anges [mod]e bits (permissions) of a file. + means to add a mode, and x means e[x]ecutable. So "chmod +x <file>" means add executable permissions to <file>.
__________________
aspidites | blog | aspidites@inbox.com

Last edited by aspidites; 2010-05-09 at 16:45.
 
Posts: 11 | Thanked: 0 times | Joined on May 2010
#9
@aspidites: what i did after your post is 'chmod +x MyDocs/.documents/gtk_helloworld' from /home/user and then 'MyDocs/.documents/gtk_helloworld' but permision denied too.
do you know how can i do to get that permission to execute the binary? thanks.

to concrete more, that is the binary i got when compiling from scratchbox with target fremantle_x386 set, on the pc, that it works ok when executing from scratchbox with DISPLAY set on xephyr window (i am sure i don't express technically correct but i hope you understand what i want to mean).

Last edited by r0gcas; 2010-05-09 at 16:56.
 
Posts: 11 | Thanked: 0 times | Joined on May 2010
#10
I am getting it, not permission denied response, but 'syntax error: "(" unexpected'. this is quite strange since it is a binary and i am not compiling...

what i did was to move the file to /home/user and then chmod +x <file> and then ./<file> and that was the output:

./<file>: line 1: syntax error: "(" unexpected

Last edited by r0gcas; 2010-05-09 at 17:12.
 
Reply


 
Forum Jump


All times are GMT. The time now is 06:35.