Reference

Running apps installed via MacPorts (or the others) from the GUI

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.

Free Programming e-book

Finding interesting stuff for the Mac is difficult given the relative numbers of users and programmers out there. I think I may have found something though.

In the *NIX world (including OS X) the Python language seems to be the up and coming thing for programming. Python is an interpreted object oriented language. Python comes free with OS X, Linux, and BSD. It has to be downloaded and installed if it is to run on a Windows machine. I have tried simple GUI programming under Linux and will try it for the Mac as I get to that point.

The book itself contains a number of exercises as well as instructions on how to write programs in Python. I have only reached the second set of exercises but have already found a number of useful items. Those starting out may want to take a look at my recent articles on shells and shell programming. Although it is possible to program exclusively in a GUI environment, it is still a very good idea to start out using the shell then transition to the GUI.

The title of the book is “Learning Python The Hard Way“. The link to the authors web site is http://sheddingbikes.com/posts/1285754959.html. Please read the information on the page before downloading the book.

Applesoft ][ Tokens

NOTE:Values 00 to 7F (0 to 127 decimal) are used by the standard Ascii character set.
As in Integer BASIC, Apple II outputs last two rows (60-7F) as uppercase.

This table is a complement to “Applesoft II Pointers and Tokens on Pages 6 & 7, and should be saved as a  permanent reference chart.