Re: Launch bash script using desktop icon?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Esther Parrilla Endrino <esther.parrilla@xxxxxxxxxxxxxxxx>

> The script.sh just launches a Java application, including the following
> lines:
> 
> exec /usr/local/java -classpath . MyApp 
> 
> I have checked that the Java GUI is launched OK if I call directly the
> script, and the script has execute permissions for all users...
> I tried too to execute a 'cd' in the Exec field and after that call the
> script but I did not work... :(
> 
> As I said in my previous posting the terminal is opened and closed
> suddenly and the Java process is created but dies...
> 

Okay, now we are getting farther!

First, does your script.sh work if you cd to any directory and run it
manually from the command line?  If not, then put the appropriate cd command
inside your script.sh file.

Next, for those others on the list, what does a script writer need to
consider when writing a script to be launched by a GNOME metacity launcher?

For instance, what environment variables are set?  What about stdin, stdout,
etc. - where do those file descriptors point?  What about controlling ttys?

Lastly, what does this java application do?  What resources does it 
expect to use?  Do you have control over the java program?  If so, see
if you can add some code in it to write out errors to a log file; that
way, you can see why it is dying!


-- 
Tcl - The glue of a new generation.  <URL: http://wiki.tcl.tk/ >
Larry W. Virden <mailto:lvirden@xxxxxxx> <URL: http://www.purl.org/NET/lvirden/>
Even if explicitly stated to the contrary, nothing in this posting should 
be construed as representing my employer's opinions.
-><-
_______________________________________________
gnome-list mailing list
gnome-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gnome-list

[Index of Archives]     [Fedora Desktop]     [Trinity Users]     [KDE]     [Gimp]     [Yosemite News]

  Powered by Linux