Solved

In centos, program doesn't launch from the desktop

Posted on 2010-11-19
5
1,185 Views
Last Modified: 2012-05-10
I have a program (spoon.sh as part of pentaho data integration) that runs fine from a shell window but when I create a launcher icon on the desktop that points to the shell script, that doesn't work.

This is in centos 5.5.
0
Comment
Question by:opike
  • 3
  • 2
5 Comments
 
LVL 35

Assisted Solution

by:torimar
torimar earned 500 total points
ID: 34177898
It should work, though. Hence we must assume that you made a mistake while creating the launcher.
Please follow the instructions given here:
http://www.linuxtopia.org/online_books/centos_linux_guides/centos_linux_step_by_step_guide/s1-desktop-desktop.html
and make sure the full path to your script is specified. Also tick the "Run in terminal" box.
0
 

Accepted Solution

by:
opike earned 0 total points
ID: 34178157
I discovered in a terminal window that I was getting "class not found" errors when I would try to run the shell script from another directory other than the directory in which the shell script resided. So I created a stub script that would cd into the directory first and then run the original script.
0
 
LVL 35

Expert Comment

by:torimar
ID: 34178551
Alternatively, you could add the directory to the PATH variable modifying either the /home/user/.bash-profile (if only the current user needs to run the script) or /etc/profile (if all users should be able to do so).
More info here: http://serverfault.com/questions/102932/adding-a-directory-to-path-in-centos/102943#102943

I thought about this before submitting my post, but then I couldn't imagine that a company like Pentaho would not either already modify the path on installing, or else avert the user of the fact that calling their script from outside its directory will not work.
0
 

Author Comment

by:opike
ID: 34199095
The java CLASSPATH variable would have to be adjusted, not the PATH variable.
0
 

Author Closing Comment

by:opike
ID: 34224639
created stub script
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Utilizing an array to gracefully append to a list of EmailAddresses
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now