Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Create cross-platform URL shortcut files Internet
Creating a double-clickable web link is as simple as dragging the address from Safari to the desktop. Very convenient, unless you want to share the file with people stuck on Windows. The zero-byte .webloc file won't make them any wiser -- the address was stored in the resource fork, which means it will vanish if you try to send it to their PC.

Microsoft has their own way of creating web shortcuts, .url files. In fact, all of Windows' Internet Explorer bookmarks are stored that way; all of them in a separate tiny file. Anyway, the format is pretty simple, nothing you can't write in TextEdit in a few seconds:

[InternetShortcut]
URL=http://www.macosxhints.com
Save it as something.url and you are done. The good thing about this is that Mac OS X/Safari also supports these .url links, or does it? This had me stumped for a good while: some of my .url files would work fine and load in Safari, while some would just open an empty Safari window without loading anything, even though the same file worked properly in Windows.

Here's the catch: don't forget to add a closing line feed at the end. Apparently Safari is picky about that and the lack of it will result in the aforementioned empty window.

  Post a comment  •  Comments (24)  
  • Currently 3.20 / 5
  You rated: 4 / 5 (10 votes cast)
 
[50,015 views]  View Printable Version
Authenticating CheckPoint FW-1 via a script Internet
If you need to frequently perform client-authentication to a Checkpoint Firewall-1 via HTTPS, this can be scripted thusly:

#!/bin/sh
export USERID=your_userid
export ENCPWD=your_password
export NGWID=`curl -k https://firewall-1/ | grep ID | cut -d\" -f6`
curl  -k --data "ID=$NGWID&STATE=1&DATA=$USERID" https://firewall-1/
curl  -k --data "ID=$NGWID&STATE=2&DATA=$ENCPWD" https://firewall-1/
curl  -k --data "ID=$NGWID&STATE=3&DATA=1" https://firewall-1/
Note that your ENCPWD needs to be URI escaped if it contains special characters. If you have the Perl module URI::Escape installed you can do this with:

export ENCPWD=`perl -MURI::Escape -e "print uri_escape('your_password')"`
If the firewall requires a password based on a RSA token then insert the following:

echo -n "Enter key: "; read xx
echo "Thanks"
export ENCPWD=`perl -MURI::Escape -e "print uri_escape('$xx')"`
[robg adds: I haven't tested this one...]
  Post a comment  •  Comments (2)  
  • Currently 2.75 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[7,021 views]  View Printable Version
10.3: Use the x-man-page URL type to open UNIX man pages Internet
The Terminal application in Panther supports the x-man-page URL type. That is, the following URL, when used with Safari or the open command, will open a Terminal window with the ls man page displayed:
x-man-page://ls
[robg adds: This style of link will probably work from anything that supports active URLs; I pasted it in iChat and it also worked directly from there when clicked, and it also worked in Mozilla, IE, etc.]
  Post a comment  •  Comments (5)  
  • Currently 1.75 / 5
  You rated: 2 / 5 (8 votes cast)
 
[15,981 views]  View Printable Version
Create an online spam trap counter Internet
For those obsessed with trapping spam, or just looking for another shiny-object to include on your blog/homepage, it's fairly simple to use many of the free web-counter services to count your spam messages instead using either procmail on unix, or the OS X Mail client and a short chunk of AppleScript.

I've written up the whole thing in an entry on my weblog.

[robg adds: With the author's permission, I've recreated the content of the weblog here in the database -- read the rest of the hint to read it here, or use the link above to view the original.]
read more (691 words)   Post a comment  •  Comments (9)  
  • Currently 3.25 / 5
  You rated: 5 / 5 (4 votes cast)
 
[7,859 views]  View Printable Version
Create a .webloc playlist of streaming radio stations Internet
Here's a neat trick with Safari's webloc/inetloc files.

Let's say you like all these streaming radio stations, but the players they require are all different -- some are Windows Media, some Realplayer, some iTunes, etc. And let's say you want a simple, convenient "play list" that has all these stations in one spot to be launched with a double-click. Here's what you do: go to each station's web site and find the link that you would click to "listen live." Right/control-click and copy the URL to the clipboard (it's usually a .rm or .wmp string). Then, paste it into Safari's URL field. Then drag the URL to a folder. Inside the folder, you'll now find a standalone .webloc file that you can double-click, and it will invoke whatever player it needs. And you can rename it something simple (like the station's call letters).

With iTunes it's even simpler, because you just go to the iTunes station and drag its name from the playlist to your folder.
  Post a comment  •  Comments (0)  
  • Currently 2.25 / 5
  You rated: 2 / 5 (4 votes cast)
 
[3,347 views]  View Printable Version
Save RTSP video streams to a file Internet
You can now view and save RTSP streams (e.g. Apple's Kenotes) to your hard disk with the latest release of VLC (currently 0.7.0-test2). But there is still a terrible sync problem.

Choose File -> Open Network and fill in an rtsp:// URL. If you want to save the stream to a file, check Advanced Output, click on Settings, choose a file and set the encapsulation method to MPEG-4 or QuickTime.

Here is how you get the RTSP URL of Apple's keynotes using QuickTime Pro. Go to the page with the Apple events streams listed. Open one of the streams, and in QuickTime, choose File -> Save As and save it somewhere. Open the file in TextEdit, and the URL is somewhere in that file; it starts with rtsp:// and ends with .mov. Alterantively you can just use curl to open the .mov file embedded in the "Watch Now" page.

Note: People with bad routers or firewalls might have to launch VLC in the Terminal with the --rtsp-tcp option.

Example: [The command must be entered as one long command with no line breaks or extra spaces in the URL; it's been broken up here for narrower display width.]
/Applications/VLC.app/Contents/MacOS/VLC --rtsp-tcp \
rtsp://a1215.v14111.c1411.g.vq.akamaistream.net/\
5/1215/1411/3f8f1f38/1a1a1af156c5f364d84e7cdd4dbd298ebc\
1f8efb2a9d0265da4cb1e04fb22655be32a7157aed/windows_ref_300.mov \
--sout '#standard{access=file,mux=mp4,url=/Users/\
Shared/VLCoutput.mp4}'
[robg adds: I haven't tested this one, but I've been asked about capturing streams a number of times. So in spite of the sync problem (maybe it could be fixed with iMovie to separate and adjust the soundtrack?), this may be of interest to a few folks.]
  Post a comment  •  Comments (21)  
  • Currently 1.75 / 5
  You rated: 3 / 5 (8 votes cast)
 
[124,387 views]  View Printable Version
An alternative way of viewing Flash/Shockwave content Internet
If you are looking for an alternative way to view Flash and Shockwave files, you may want to download a standalone Shockwave movie or game that runs on its own using the Macromedia Flash Player (in application form, not in plugin form). An example would be something like PacMan [676kb download].

You can then tell the system, via Get Info, to open all Flash and Shockwave files with this standalone player. The original game or movie will come up at the same time, it's true, but if it's something that requires a click to start, then you shouldn't have competing audio or video.

Why go to this extent when there are other ways of doing it? Well, QuickTime Player does not always handle Flash and Shockwave files well, and also, sometimes, you don't want to load up your browser to simply look at a local Shockwave file. This is a convenient, if alternative, way of doing it, and you even get the nice-looking Macromedia Flash icon assigned to your downloaded content.

UPDATE: Commenters in this thread located a standalone Flash Player which has fewer inconveniences than associating it with a pre-existing standalone Flash movie.

  Post a comment  •  Comments (15)  
  • Currently 2.14 / 5
  You rated: 3 / 5 (7 votes cast)
 
[43,376 views]  View Printable Version
10.3: Use the .mac iDisk to store common application data Internet
Note: This hint only applies to .Mac subscribers who have an iDisk. It's a long hint, but hopefully worth it to some people out there.

Apple promotes the iDisk as a way to "store files remotely" or "share files that are too big to email". It's also used as the location for storing your Address Book, iCal and Safari Bookmarks for use with iSync. This hint pertains to the "store files remotely" feature of iDisk, which Apple does not really elaborate on to any great degree.

I have two Macs: a G5 and a TiBook. My G5 (for obvious reasons) stays at home. My TiBook goes with me to work. One minor annoyance is that some things get out of sync between these two machines. I'll use two examples in this hint: NetNewsWire and MacJournal. NetNewsWire is a very well done RSS newsreader client. It's what I use to read articles from Slashdot, O'Reilly MacDevCenter and, of course, MacOSXHints, among others. MacJournal is (duh) a journal or "diary" program, although I use it for storing lots of stuff, like software license/registration keys, passwords, network information, etc.

When used on two different machines, the data accessed by both of these programs gets out of sync. It's annoying to have to wade through all the news articles that I already marked as having been read when I go back and forth between home and work. Similarly, if I add or change something in MacJournal, I want it to be the same on both my machines. This is where iDisk comes in. You can store the data files used by programs on iDisk. If that's all the information you need, you can stop reading this hint now. For detailed instructions, read on.
read more (647 words)   Post a comment  •  Comments (18)  
  • Currently 2.75 / 5
  You rated: 4 / 5 (8 votes cast)
 
[37,280 views]  View Printable Version
Share internet and TCP/IP services over Bluetooth Internet
The following instructions allow you to share single internet connection with multiple Bluetooth equipped Macs and devices. Using Personal File Sharing service in Mac OS X, you can connect to your server with a client computer equipped with Bluetooth through the Connect to Server command. This hint was built on previous hints regarding sharing internet to a Palm device, sharing internet with a Mac over a Bluetooth phone, and other info found on the web and on this site. I'm not a programmer nor am I a network administrator type, so excuse me if I make some newbie type mistakes here and have a few questions there. I do know the web a little and like Macs a great deal.

One Mac (acting as a server) connected to the Internet via a Bluetooth modem (56k). It is a B&W G3 300, OS X 10.2.6 (latest OS version I've tested). This should work with any mac with a Internet connection. The Bluetooth USB adapter has a Class 1 Radio.

The Setup
Make sure you have the following software installed and configured on the Mac acting as a server. My suggestion is to install the Palm conduit and iSync even if you don't have a Palm device. This is because the Techno Happy Meal Script uses the Palm conduit to initiate the PPP connection -- you will need to edit the AppleScript if you don't want to download and install the iSync Palm Conduit. Most recent versions now install the conduit automatically. Use the Bluetooth Serial Utility too, if the port is installed.
  • Bluetooth 1.2.1
  • iSync (if you want to share to a Palm device, may not need if you are running OS X 10.2 or higher)
  • iSync Palm Conduit (if you want to share to a Palm device, may not need if you are running OS X 10.2 or higher)
  • Download the Share Ethernet over Bluetooth script from TechnoHappyMeal.
Read the rest of the article for the remainder of the how-to...
read more (986 words)   Post a comment  •  Comments (13)  
  • Currently 2.83 / 5
  You rated: 3 / 5 (6 votes cast)
 
[71,215 views]  View Printable Version
10.3: Enable identd server for internet relay chat use Internet
For some reason, Apple decided to not include the identd server in Panther. If you're a regular user of internet relay chat (IRC), this is a severe hindrance, and many IRC servers require that your machine ident before you can log on. Here is one way you can get ident working on Panther.

Download the fakeidentd source code. Open a Terminal and cd into the fakeident source code directory. Then type the following:
 % cc identd.c
 % mv a.out fakeidentd
 % sudo chown root:wheel fakeidentd
 % sudo mv fakeidentd /usr/bin/fakeidentd
Next you need to use your favorite command line text editor to edit the file /etc -> xinetd.d -> auth to look like this:
service auth
{
        disable         = no
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/bin/fakeidentd
        groups          = yes
        flags           = REUSE IPv6
}
Save the file and restart xinetd using sudo killall -HUP xinetd. With a bit of luck, you now should have a working identd server which returns the name "nobody." FakeIdentd allows you to define a name to return, but I don't know how to do it from this context.
  Post a comment  •  Comments (31)  
  • Currently 2.29 / 5
  You rated: 3 / 5 (7 votes cast)
 
[32,746 views]  View Printable Version