[Ham-Mac] Google Maps or Google Earth with fldigi for Mac
David Ferrington, M0XDF
M0XDF at Alphadene.co.uk
Mon Jan 11 03:30:44 EST 2010
Ok John, you should have said and I would have expanded on that, but
no problem
The Perl script uses exec("xdg-open", $url);
exec is the perl way of running a program, in this case xdg-open. As I
said, that is a Linux program (a command) which doesn't appear to
exist in OSX (well not with that name), but there is an equivalent,
called open.
So we have to do one of 3 things:
1) modify the code to determine which platform (Operating system) the
code is running on and call the appropriate program - this is the
right way to do it, but little point if your only running your code on
the Mac - it's the programmers job to do that.
So I discounted that option.
2) modify the code to call 'open' instead of 'xdg-open' - this is very
easy to do, you just open the file (map.pl) in TextEdit and change
line 26 so it reads 'exec("open", $url);'
I've attached a modified version of map.pl for you, not using Fldigi,
I haven't tested it, but I can't see why it wouldn't work (should have
done that the first time :-(
-------------- next part --------------
3) create a symbolic link, known as an alias in Mac terms (or a
shortcut in Windows) for the OSX program 'open' and call it 'xdg-
open'. In this way, when map.pl uses xdg-open, it will actually be
using the OSX 'open' program.
This is relatively easy to do, but you must be a administrator of OSX,
which you probably are if it's your Mac ...
a: open a terminal window using the Terminal application that is
either in the Applications folder or the Utilities folder which is in
the Applications folder (I may have moved mine) - easy way to find it,
use Spotlight to find Terminal and double click it.
b: in the Terminal window, type
cd /usr/bin
that will change the directory (folder) you are working in (in the
Terminal) to be where the open program is, it's a bit like double
clicking a folder in the Finder (ok no flames Unix people, I no that's
not quite true, but it?s a good explanation for someone who doesn't
know the Unix environment).
c: type the following
sudo ln -s open xdg-open
this should ask you for your password, this is the password you setup
when you created your account on the Mac.
This command tells OSX to run the 'ln' command as a super-user - this
is required since the permissions of the /usr/bin directory prevent
non-super-user modifying it. The 'ln' command creates a link, with the
'-s' option, it?s a symbolic link, and it's being told to create a
link for 'xdg-open' and to call it 'open'.
d: close the Terminal application in the normal way (click red dot in
top left, type cmd-Q etc).
I guess for you, the easiest option will be to try using the map.pl I
included as option 2.
Hope this is of more help this time. Don't hesitate to come back to me
if you have more questions (on or off list is fine with me).
73 de M0XDF
--
Do not pray for tasks equal to your powers; pray for powers equal to
your
tasks. -Phillips Brooks, bishop and orator (1835-1893)
On 10 Jan 2010, at 15:24, John Wiener wrote:
> I thought I'd try this again.
> I have corresponded with Dave W1HKJ and, apparently, no one has tried
> successfully to use Google Maps or Google Earth through fldigi on a
> Mac (10.4) ...at least using the Perl software listed here:
>
> http://www.w1hkj.com/FldigiHelp/map.html
>
>
>
> I got this message from David M0XDF
>
> "ok, looking into this a little more, I think this script is intended
> for Linux - line 26:
> exec("xdg-open", $url);
> xdg-open is a Linux command, the equivalent on OSX is "open", so
> either change xdg-open to open in map.pl
> or create a symbolic link of xdg-open to open so other Linux scripts
> will work, to do this, open a terminal window using the Terminal
> application and type the following commands:
>
> cd /usr/bin
> sudo ln -s open xdg-open
>
> that last command will ask for your password."
>
> So, I am not a programmer and I guess I cannot wrap this old brain
> around the above instructions. Any help much appreciated.
> And, Thanks to Dave W1HKJ and David M0XDF!
>
> 73
>
> John
> AB8O
>
>
>
>
> ______________________________________________________________
> Ham-Mac mailing list
> Home: http://mailman.qth.net/mailman/listinfo/ham-mac
> Help: http://mailman.qth.net/mmfaq.htm
> Post: mailto:Ham-Mac at mailman.qth.net
>
> This list hosted by: http://www.qsl.net
> Please help support this email list: http://www.qsl.net/donate.html
More information about the Ham-Mac
mailing list