As a follow-up to the discussions about remote file editing, I wanted to throw another idea out there. First of all, I think the ideal solution is to have Mac OS X mount a remote directory in the Finder, and then access that directory from TextMate as if it were on a local volume. (After all, providing file access is the operating system's job; TextMate shouldn't have to implement special support for it.)
I mentioned WebDAV before, and for editing files on a web site, it's usually the best solution. Unfortunately, accessing remote files outside of the web server's control is very difficult, sometimes impossible, with WebDAV. For those cases, I've been resorting to NFS, which Mac OS X also supports natively. However, NFS has always been buggy in my experience, at least when accessing it across the Internet.
Luckily, Mac users have a third option: the Apple Filing Protocol, or AFP. Although it's becoming obsolete in favor of less proprietary standards, it doesn't suffer from the weaknesses of WebDAV and NFS. Namely, it's not bound to a web server, and it has no trouble mounting remote directories over the Internet. I've been using it to edit remote shell scripts in TextMate with no problems.
Setting up AFP is very easy if your host system is Linux and you have admin rights. You simply install the netatalk package [1] and start the AppleTalk daemon. For instance, if you're running Fedora Core:
yum install netatalk service atalk start
After that, you simply go the Finder, choose Connect To Server, and enter afp://myserver. You can then enter your user name and password to mount your home directory. More info about configuring share points and enabling secure authentication is in the netatalk documentation.
Anyway, I just wanted to mention that option for those of you who want remote file access without having to rely on a third-party utility or wait for SFTP support to be built-in to TextMate.
Trevor
Hey Trevor,
Setting up AFP is very easy if your host system is Linux and you have admin rights. You simply install the netatalk package [1] and start the AppleTalk daemon. For instance, if you're running Fedora Core:
yum install netatalk service atalk start
Nice suggestion ... I've been using AFP just locally between in house cpu's .. besides from being a bit slow (-er than say SMB even -- anyone else notice that) it does the job.
One question, just because I don't know jack about the AFProtocol ... is it easy to, say, do that through an ssh tunnel? Or .. is it not necessary and already encrypted?
-steve
On 2/24/06 8:26 AM, "Steve Lianoglou" lists@arachnedesign.net wrote:
One question, just because I don't know jack about the AFProtocol ... is it easy to, say, do that through an ssh tunnel? Or .. is it not necessary and already encrypted?
AFP is not encrypted. Tunneling over SSH works fine though. I've gotten so lazy using SSH tunnel manager, I don't even remember the ssh tunnel syntax. So instead I'll just share a screenshot.
Once that tunnel is running, in Finder, hit command-K to open a new connection to: afp://127.0.0.1:22548
Simon