Want to install a program not in the registry

Asked by ponchik

Hi all, I would like to install the program "CRON-o-meter" which can be found at this site: http://spaz.ca/cronometer/

I have downloaded the two files which are necessary and the first file has the following instructions:

#!/bin/sh

# INSTRUCTIONS
# 1) Install Java 1.5 or later for Linux (http://java.com/download/)
# 2) Download Mac OS X Version and Unzip in desired location
# 3) Place this launcher script next to the application bundle
# 4) Execute script to launch CRON-o-Meter

cd "CRONoMeter.app/Contents/Resources/Java/"
java -cp cronometer.jar:jcommon-1.0.10.jar:jfreechart-1.0.6.jar:swingx-0.9.3.jar:cronometer.jar:usda_sr21.jar:crdb_003.jar:docs.jar ca.spaz.cron.CRONOMETER

my question is: What should I do to get the program installed?

Thank you

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
marcobra (Marco Braida)
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

I can't see any additional infor to give...

Install java from repo or from java.com

then go to http://spaz.ca/cronometer/ and download the app

you then need to make a small script in <something>/Contents/Resources/Java/ which will be in the folder you extracted the file you downloaded, to. I have no way at all of knowing the exact folder locations so you will have to apply fuzzy logic and substitute <something> with te folder location of the data on your system.

the script will read:

#!/bin/sh
java -cp cronometer.jar:jcommon-1.0.10.jar:jfreechart-1.0.6.jar:swingx-0.9.3.jar:cronometer.jar:usda_sr21.jar:crdb_003.jar:docs.jar ca.spaz.cron.CRONOMETER

Save the script as anything you like, something like startcronometer.sh is good, just don't have spaces

you will need to chmod +x it so that it is executable. In my example this would be:

chmod +x startcronometer.sh

(with your terminal in the pwd of <something>/Contents/Resources/Java/)

you can then run the script and the thing will run

I haven't done this. I am simply expanding on the instructions you have pasted.

Revision history for this message
Best marcobra (Marco Braida) (marcobra) said :
#2

In short open a terminal (applications → accessories → terminal): type or better copy and paste the rows, below, one row a time then press enter:

cd
mkdir cronometer
cd cronometer
wget http://garr.dl.sourceforge.net/sourceforge/cronometer/CRONoMeter-0.9.6.zip
wget http://spaz.ca/cronometer/cronometer.sh

Open the cronometer.sh file, type:

gedit cronometer.sh

and put this contents in it deleting previous contents:

#!/bin/sh

# INSTRUCTIONS
# 1) Install Java 1.5 or later for Linux (http://java.com/download/)
# 2) Download Mac OS X Version and Unzip in desired location
# 3) Place this launcher script next to the application bundle
# 4) Execute script to launch CRON-o-Meter

cd $HOME/cronometer
cd "CRONoMeter.app/Contents/Resources/Java/"
java -cp cronometer.jar:jcommon-1.0.10.jar:jfreechart-1.0.6.jar:swingx-0.9.3.ja

Save and exit then type:

chmod 700 cronometer.sh
unzip CRONoMeter-0.9.6.zip
./cronometer.sh

After you can create a desktop launcher for the Cronometer (rigth click with mouse on the desktop): you need to call the $HOME/cronometer/cronometer.sh file.

Hope this helps

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#3

Might be useful to delete the $HOME/.cronometer directory if you get errors at runtime so still using terminal type:

cd
rm -fr .cronometer

I have tested my previous instructions... and i can run the app from the desktop icon.

Hope this helps

Revision history for this message
ponchik (roniefrown) said :
#4

sweeeet! i'm on a [ugh] vista machine right now, but i'll try out your instructions within the hour. at a glance they look thorough enough :)

Revision history for this message
ponchik (roniefrown) said :
#5

Hi Marco,

Your instructions were fabulously clear right up to the part where you say right click the desktop to create an icon -- then I don't know what to do. Basically the last step that I need is to know how to launch the thing.

I right-clicked the desktop and selected "Create Launcher." Then, in the "Command" box I typed "$HOME/cronometer/cronometer" (also with .sh at the end) and I got this error

Details: Failed to execute child process "$HOME/cronometer/cronometer" (No such file or directory)

I also typed cronometer and cronometer.sh into the terminal and nothing. did i miss some step?

Revision history for this message
Johan Van de Wauw (johanvdw) said :
#6

Instead of pointing the desktop launcher to
$HOME/cronometer/cronometer.sh
replace the $HOME part with the true path eg. /home/XXXX/cronometer/cronometer.sh
Probably the easiest way is to select the file using the browse button in the desktop launcher creating dialog box.

Revision history for this message
ponchik (roniefrown) said :
#7

Hi Johan Van de Wauw,

I think we're getting close(r). I did the [browse] instead of typing the path and i no longer get the error, but i actually don't get anything at all now!

There's some discrepancy I noticed with my results and Marco's instructions. In particular, I don't think I have a $HOME/.cronometer directory. (what's the difference between $HOME and /home/ anyway?).

And just for some more info, the website I downloaded the program from has a screen shot here http://spaz.ca/cronometer/ . So I'm pretty sure that if everything works I should get a *window* to open, whereas I've only ever seen terminal output by following the instructions posted here.

Revision history for this message
ponchik (roniefrown) said :
#8

Ok, I did a little experimenting of the following sort:

In Marco's instructions, he says to replace the contents of the .sh file with what is written in his post. I did *almost* that. Instead of the line

java -cp cronometer.jar:jcommon-1.0.10.jar:jfreechart-1.0.6.jar:swingx-0.9.3.ja

I use

ava -cp cronometer.jar:jcommon-1.0.10.jar:jfreechart-1.0.6.jar:swingx-0.9.3.jar:cronometer.jar:usda_sr21.jar:crdb_003.jar:docs.jar ca.spaz.cron.CRONOMETER

which was the last line of the original .sh file I downloaded. Doing this has caused the program to run. I have also successfully created a desktop launcher. Thank you to Marco and Johan for your very clear and helpful answers. You have renewed my faith in the ubuntu community!

Revision history for this message
ponchik (roniefrown) said :
#9

Thanks marcobra (Marco Braida), that solved my question.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#10

$HOME == /home/$USER
~/ == $HOME
$USER == your user name