Notices


Reply
Thread Tools
Posts: 20 | Thanked: 0 times | Joined on Mar 2010
#1
Hi, i created an new desktop app and added it to the desktop. The thing should execute a simple script in xterm. It contains this code:

[Desktop Entry]
Type=Application
Name=gainroot
Icon=terminal
Exec=/usr/bin/osso-xterm sh /MyDocs/Scripts/gainroot.sh

It opens a new xterminal, but it doesn't execute the code in gainroot.sh which is:

#!bin/sh
ls

I confess i'm a linux-newbie so there might be a simple solution.

Last edited by nerd900; 2010-03-07 at 14:09.
 
Posts: 805 | Thanked: 1,605 times | Joined on Feb 2010 @ Gdynia, Poland
#2
i guess you should type:
Exec=/usr/bin/osso-xterm sh /home/user/MyDocs/Scripts/gainroot.sh
or maybe just
Exec=/home/user/MyDocs/Scripts/gainroot.sh
will be just fine... anyway, MyDocs folder is in /home/user, not in root directory of your phone does it work when you type "sh /home/user/MyDocs/Scripts/gainroot.sh" in XTerminal?

EDIT: and in your script, the first line should be "#!/bin/sh" (you forgot the "/" after "!"
 
Posts: 20 | Thanked: 0 times | Joined on Mar 2010
#3
hi, thank you for the info...the script started in xterm by 'sh /home/user/MyDocs/Scripts/gainroot.sh' runs now, but the desktop-app just starts an empty xterm when i use
Exec=/usr/bin/osso-xterm sh /home/user/MyDocs/Scripts/gainroot.sh
With the other code:
Exec=/home/user/MyDocs/Scripts/gainroot.sh it seems to do nothing.
 
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#4
mhm... take a look at this:
http://talk.maemo.org/showthread.php...light=shortcut

(maybe you should learn how to use the search first... there are already MANY threads which contain this "problem")
 
Posts: 20 | Thanked: 0 times | Joined on Mar 2010
#5
i was using the search function (found no code that was doing the job), and now i tried your suggestion:

[Desktop Entry]
Type=Application
Name=gainroot
Icon=terminal
Exec=/bin/busybox sh -c 'echo /home/user/MyDocs/Scripts/gainroot.sh | sudo gainroot'

But even this won't work...the system is doing something but no xterm is openening. Btw: your zip-file doesn't contain any .desktop file.

Last edited by nerd900; 2010-03-07 at 15:11.
 
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#6
Originally Posted by nerd900 View Post
But even this won't work...the system is doing something but no xterm is openening.
you could ask him:
http://talk.maemo.org/showpost.php?p...2&postcount=16

it seems that he got it working.
unfortunately he didn't mention what he did after all. ^^
 
debernardis's Avatar
Posts: 2,142 | Thanked: 2,054 times | Joined on Dec 2006 @ Sicily
#7
maybe it's "osso-xterm -e whatever.sh"
__________________
Ernesto de Bernardis

 
Posts: 20 | Thanked: 0 times | Joined on Mar 2010
#8
Hi, unfortuanetely this code isn't working as well...the system is busy for some time then nothing happens
Without the -e option i get an empty xterm.
 
Reply


 
Forum Jump


All times are GMT. The time now is 16:09.