"Keep in Dock" fails for an Automator app

alfonso78

macrumors newbie
Original poster
Apr 19, 2017
2
0
Hi

I'm trying to Keep in Dock a shell script that I turned into an app using Automator.

The script uses mono (http://www.mono-project.com/) to launch KeePass (http://keepass.info/)

After a ton of errors, I found this instructions to create a proper app:
http://stackoverflow.com/questions/281372/executing-shell-scripts-from-the-os-x-dock#

Now I have an app with the right icon that shows in Launchpad but if I click "Keep in Dock" and try to launch it from the doc, it will open a terminal and call mono without any parameters, so obviously KeePass will not start.

Any idea?

In Automator, I select Workflow, "Run Shell Script", I substitute "cat" with my script, i.e. /Users/me/Downloads/KeePass-2.35/KeePass.sh

Then I save in Automator choosing Application as File Format.

The script /Users/me/Downloads/KeePass-2.35/KeePass.sh is as follows:

/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono /Users/me/Downloads/KeePass-2.35/KeePass.exe

When I click on the icon in the Dock (which has lost its specific icon after clicking "Keep in Dock") a Terminal is opened and I can read:

Last login: Wed Apr 19 21:20:09 on ttys002
mac:~ me$ /Library/Frameworks/Mono.framework/Versions/4.8.0/bin/mono-sgen32 ; exit;
Usage is: mono [options] program [program-options]​

(interestingly, I tried also Script Editor. It would work as script but exporting it as an app always failed).
(other weird side-note, changing the app icon was also hard, all article did not work until i found this:
)
 

Rigby

macrumors 601
Aug 5, 2008
4,741
3,689
San Jose, CA
I don't have a direct answer, but if you haven't yet, you may want to check out KeepassXC as an alternative to Keepass. It doesn't require Mono and has most of Keepass' features (including autotype).
 

alfonso78

macrumors newbie
Original poster
Apr 19, 2017
2
0
Thank you. I was only aware of KeePassX.
Maybe it's a sill question, but how do you establish how trustworthy the porting is?
 

Rigby

macrumors 601
Aug 5, 2008
4,741
3,689
San Jose, CA
Thank you. I was only aware of KeePassX.
Maybe it's a sill question, but how do you establish how trustworthy the porting is?
Well, it's open source, just like the Windows Keepass. In theory you can get the source from Github and audit and compile it yourself. ;) Personally I don't use any encryption software that isn't open source.