‏إظهار الرسائل ذات التسميات Mac. إظهار كافة الرسائل
‏إظهار الرسائل ذات التسميات Mac. إظهار كافة الرسائل

الجمعة، 24 أكتوبر 2008

Intrepid Ibex broke my Netatalk

I mostly use Macs, but all of my media files are stored on a home server that runs Ubuntu. I had been using Gutsy and sharing my files using netatalk, an open source implementation of Apple's AppleTalk protocol, and everything was working swimmingly.

However, as soon as the beta for the newest version of Ubuntu--known as Intrepid Ibex--was released, I upgraded to it and was shocked to find that I could no longer connect through netatalk using my Macs (they're running 10.5 Leopard). Every time I tried, it would fail with this error:
A volume failed to mount.
The volume [directory name] could not be mounted
I fiddled with configurations on both ends to no avail, so I decided to try a workaround: I uninstalled the version of netatalk from the Intrepid repos (sudo aptitude remove netatalk) and then downloaded outdated deb binaries for netatalk and its only other major dependency, libdb4.2, from the Gutsy repos.

Install (sudo dpkg -i [package name]) libdb4.2 first (it'll give you a warning about downgrading from a higher version), then netatalk, and then let the service start. You should now be able to connect to your shares again.

Leave me a comment if this doesn't fix your problem and I might be able to help.

الخميس، 24 يوليو 2008

How To X-Forward On a Mac

If you're a terminal-jockey and you use a Mac, you've probably come across the term 'X-forwarding' before, but very few places will actually tell you what it is or how to do it.

The X Windowing System is an open source window manager that's used to draw windows in most free operating systems, including GNU/Linux, the *BSDs, and Solaris. It was ported to OS X in the form of the XQuartz project and is distributed with Tiger and Leopard install DVDs. You can also download it here if you're using Leopard (10.5), here if you're using Tiger (10.4), or here if you're using Panther (10.3).

Once it's installed, you can do a lot of cool stuff. For instance, you can run many more open source programs than before (check out Fink and Darwinports), and (more importantly for me) you can X-forward from any other computer that is currently running X.

What that means is that you can open an instance of an X-native program from another computer using your Mac and it will seem (to you) as though it were running on your Mac (i.e., you will have a window appear on your desktop that you can move, minimize, etc., but it uses the other computer's resources). It ends up being sort of like a remote desktop--such as VNC--but faster and without affecting the experience of local users. For example, I use X-forwarding to run programs from my Linux media center while my wife watches videos.

To do it, the remote computer you want to X-forward from has to have an SSH client--such as OpenSSH--installed. Once that is in place, open the Terminal.app on your Mac (located in Applications > Utilities by default) and type:
ssh -X username@target.IP.address.here
You have to use an account that already exists on the remote computer. It will then ask for the account's password. You will then be logged-in to the remote machine via your local terminal. Your command prompt will also change to reflect this:

Now, you can run programs via this terminal and any windows will be drawn on your local computer (i.e., your Mac) instead of the remote computer.

Here is what it looks like when I forward the Linux QT4 GUI for HandBrake to my Mac:

As you can see, the widgets look a little weird, and the font is clunky, but it's fully functional and has much lower latency than other remote access methods. Also, thanks to the ssh connection (also known as an 'ssh tunnel'), your connection cannot be spied upon, even if you X-forward across the Internet. Leave me a comment if you have any questions or run into any problems.