Page 1 of 1

Mac Terminal Start

PostPosted:Tue Jul 07, 2009 4:43 pm
by carlh
Hi,

I have seen the thread at http://www.openkm.com/Installation/2687 ... ac-OS.html - is there anyway of easily starting up OpenKM on mac os x without having to constantly startup Terminal. I have to change directory, enter password and then instigate the sudo bin/run.sh command at every startup. It\'s really tedious.

Anyone got any suggestions - I am not a whizz kid, so maybe missing something. Thanks

(oh, I\'m running a local copy rather than on a server)

Re:Mac Terminal Start

PostPosted:Tue Jul 07, 2009 6:08 pm
by jllort
You must investigate how to \"run jboss as a service on leopard\" try to search on jboss forum or on google.

For example take a look at this url.

Re:Mac Terminal Start

PostPosted:Wed Jul 08, 2009 7:56 am
by carlh
Thanks - I will investigate your suggestion.

Re:Mac Terminal Start

PostPosted:Wed Jul 08, 2009 10:55 am
by carlh
Well, being quite a novice, I\'ve been stumped by reading 2 hours on this subject. Just a lack of talent I think.

In desperation if anyone (in the kindness of their heart) knows how to run the following in a startup script for Mac Leopard, then I am eternally in your debt.

The process I have to follow in Terminal is this (and there is always a need to enter password to run it:
IMAC:~ username$ cd /Users/username/OpenKM/
IMAC:OpenKM username$ sudo bin/run.sh
Password:

Re:Mac Terminal Start

PostPosted:Wed Jul 08, 2009 4:33 pm
by dannnyt
I have the very same problem. And I have spend weeks on it. I am a novice though...

it would be wonderful if someone could post a solution. Basically having to go through Terminal would make OpenKm unusable on Mac, there must be a solution...

Thanks, D

Re:Mac Terminal Start

PostPosted:Wed Jul 08, 2009 5:19 pm
by carlh
Join the novice club, me too!!

Anyway, I looked into running JBoss as a service (just couldn\'t fathom it). So, I went down the route of an Applescript. Again I\'m new to this, but think I\'ve got something below (it works so far anyway). I\'ve yet to set it as a startup item, but you can run it from the top menu bar by setting Applescript utility to display in toolbar. Therefore, it\'s actually quite handy and actually ok like that.

So, I wanted to have a script that:

1) Opened the Terminal window
2) Ran each bit of the script
3) Inserted password and then minimised the window

It may be bad scripting and not perfect, but it runs for me fine on Leopard. So, you\'ll need to put this in an Applescript (using ScriptEditor in Applications).

You\'ll have to make sure your paths are correct (i.e different to mine), but as I said it works for me!

\"OpenKM\" is the folder where I installed it all. Username and password are those on your machine.


tell application \"Terminal\"
activate
do script \"cd /Users/username/OpenKM/\"
do script \"sudo bin/run.sh\" in window 1
close back window
do script \"password\" in window 1
delay 5
set miniaturized of window 1 to true
end tell



See how you get on. If it\'s poor coding, someone will no doubt tell me it\'s wrong!!

Re:Mac Terminal Start

PostPosted:Wed Jul 08, 2009 5:55 pm
by dannnyt
Great, thank you very much!

One more thing: do I need to write another script for the password? I can\'t type anything in when I run your script..

Re:Mac Terminal Start

PostPosted:Wed Jul 08, 2009 6:03 pm
by carlh
I had problems with this - I tried all the examples of inserting password with administrator privileges, but it didn\'t work for me and you shouldn\'t use \"sudo\" either, but....? My script runs as follows:

1) Changes directory to where OpenKM is
2) Runs the \"sudo bin/run.sh\" script as outlined in that mac post on this forum
3) Then inserts the \"password\" as text - that seemed to get around the password issue.

What happens for me is the Terminal then runs the OpenKM script. All macs, etc are different, so maybe not the same for you - but can\'t really help, as I\'m blimmin\' useless on this. I\'m amazed I got this far.

Of course you could leave the password and minimise bit out, then that should just bring up the terminal window and then you type in your password (which is safer, as this is not secure) and then minimise manually.