When an app is installed via MacPorts, or one of the other programs used to bring Linux apps to the Mac, it is stored as a program requiring a terminal program to run. This is fine for some programs such as 7zip but not for others such as pan (a GUI newsreader) and gftp (a GUI based ftp program). I use these programs enough so I’d want them on the dock. After hunting around I found some discussion in a couple of help forums about how to do this.
The first method (which didn’t work on my machine) was to rename the program by appending “.app” to the name. I actually created an alias to the program.
The second method was to use the Automator application. Using the gftp application as an example I located the program in /opt/local/bin/gftp. From there I opened the Automator program and selected the appropriate icon. Along the left side I scrolled down until I found the “run shell script” item. From there I used the “exec” command instead of the “cat” command which was already there and followed it with the location of the program. After this I located the “File” menu item and saved the new program as gftp.app.
I can now double click on the icon or move it to the dock. The terminal window no longer opens. As far as the system is concerned it is another GUI program. It still opens X11 but that only makes sense since the program came from the Linux world.
At one time there was a warning about using the “exec” command in *NIX. In this case the location is fairly obscure so it should be a minimal risk.
There may be a better way of getting the job done. Let us know. It may take a while for us to try it out but if it works the method will be made available.