Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (5) </ [1] 2 3 4 5 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Might be the wrong areAdding a link to the desktop, repost with more questions< Next Oldest | Next Newest >
lantian2004 Offline





Group: Members
Posts: 30
Joined: May 2006
Posted: May 30 2006,20:07 QUOTE

might be the wrong area to ask (probably more of a dev question), but having problems with getting an icon to launch a shellscript in a term window and keep it on screen. As of right now, I have an app that calls upon java (well, make that 3 of them). So, what I do now is open aterm, sudo su, change to my directory the ./program.sh

I want to make an icon that will launch it for me, and the syntax I have so far for my lnk is sudo aterm -T "my program" -e /path/program.sh

now, if I just open aterm and type in "sudo /path/program.sh" I get the following error message, which I assume is also being produced by the lnk on the desktop, hence the reason it closes.

error: exception in thread "main" java.lang.NoClassDefFoundError: /confidential directory/examples/Banzai

So, it works if I change to the directory the run ./ it works fine. Any ideas?
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: May 30 2006,20:24 QUOTE

add this to the beginning of the script:
Code Sample
cd `dirname $0`


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
lantian2004 Offline





Group: Members
Posts: 30
Joined: May 2006
Posted: May 30 2006,20:35 QUOTE

Sweet! Well, kind of, I can launch it from aterm with just sudo /path/program.sh

Now, how do I get a link on my desktop to run it?
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: May 31 2006,03:46 QUOTE

same as any other program...just use the command "aterm -e sudo /path/program.sh" in a new *.lnk file where it says "Command:"

--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
lantian2004 Offline





Group: Members
Posts: 30
Joined: May 2006
Posted: May 31 2006,04:00 QUOTE

No luck with that, I still just get a window pop open then close. I spent the entire day trying every aterm possibility and nothing. This particular script also launches a small app that lets clients input data, and that doesn't open, so I know it isn't terminating due to lack of user input, and it works fine by just opening aterm and putting in the path without sudo, so very odd. Everything I have seen says it should work... actually i think I have about 50 ways that it should work :) now, in the lnk, the type is set to Program, would I need to change that? anyways, my other 2 scripts which just open a terminal window and display heartbeats and client/server transactions don't work either using a .lnk or through the menu system of JWM.
Back to top
Profile PM 
22 replies since May 30 2006,20:07 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (5) </ [1] 2 3 4 5 >/
reply to topic new topic new poll
Quick Reply: Might be the wrong areAdding a link to the desktop

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code