iTunes sharing via SSH and Rendezvous Proxy

Is easy (thanks to, except that you need Rendezvous Proxy on the system where you will actually be listening to the music (not the machine where the music normally resides). iTunes uses port 3689, so you must setup an SSH tunnel:

too-quiet$ ssh -L 3689:localhost:3689 user@lotsa-music

Now, run Rendezvous Proxy on ‘too-quiet’, Add Host, use for IP address, 3689 for port, and type a name for Host Label. iTunes will initially see your shared music library as this name, but will update with the “real” name shortly thereafter. Service Type – _daap._tcp. (iTunes Host).

I wish I’d realized how straightforward this is long ago. My next wish is to “tunnel USB” so that I can sync my iPod from a far-away land.


‘mail’ from the command line in OS X Leopard (10.5)

This article got me going. I followed the advice of some of the comments and unzipped the whole of into /etc/postfix/certs, and did chmod 600 relay_password.

First create /etc/postfix/relay_password with the server name, email account name and password as shown below.

Make sure nobody but root can read the file containing your password:

sudo chmod 600 /etc/postfix/relay_password

Then use postmap to create a .db file.

postmap /etc/postfix/relay_password

Make sure the map is ok with

postmap -q /etc/postfix/relay_password

You will need to retrieve the Thawte Premium Server CA from

sudo mkdir /etc/postfix/certs
cd /etc/postfix/certs
sudo unzip -j /path/to/
sudo openssl x509 -inform der -in ThawtePremiumServerCA.cer -out ThawtePremiumServerCA.pem
sudo c_rehash /etc/postfix/certs

Now you are ready to configure postfix. Add these lines to the bottom of /etc/postfix/

relayhost =
# auth
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/relay_password
smtp_sasl_security_options = noanonymous
# tls
smtp_tls_security_level = may
smtp_tls_CApath = /etc/postfix/certs
smtp_tls_session_cache_database = btree:/etc/postfix/smtp_scache
smtp_tls_session_cache_timeout = 3600s
smtp_tls_loglevel = 1
tls_random_source = dev:/dev/urandom

Test now by using /usr/bin/mail to send an email. You can check /var/log/mail.log to see if it worked without errors. Leopard enables postfix by default. Launchd watches a directory and will startup when the test email is sent.

Ubuntu LiveCD with USB PenDrive, but what about NFS…

Today I learned about how easy it is to have an Ubuntu LiveCD persist documents and settings using a USB Flash Drive (and they even provide a Boot CD for systems that can’t boot from USB.

Of course there’s always the entirely DiskLess option, but that requires a DHCP and TFTP server that one can configure. Not always an option.

I’d like to configure a system exactly like the LiveCD + USB PenDrive for persistence, except that instead of a PenDrive (because, e.g., the system only supports USB 1.1) I mount a network filesystem (NFS, Samba, whatever…). The point is that the system boots from CD and not the network, then uses the network for persistent data. For all I know it’s out there, but I haven’t found a way to do it in 5 minutes or less.

LaTeX hyperref to make a clickable PDF

In trying to put together my thesis, I’ve found it very useful to have a hyper-linked PDF where, e.g., the Table of Contents, List of Figures, List of Tables, and Bibliography are hyper-linked to the relevant sections.

% pdftex,
% dvipdf,
ps2pdf, % using ps2pdf vs pdftex
% colorlinks=true, % color the words instead of use a colored box
% urlcolor=blue, % \href{...}{...} external (URL)
% filecolor=blue, % \href{...} local file
% linkcolor=black, % \ref{...} and \pageref{...}
% citecolor=black, % \cite{}
% plainpages boolean true
% Forces page anchors to be named by the arabic form of the page number,
% rather than the formatted form.
% breaklinks boolean false
% Allows link text to break across lines; since this cannot be accommodated in
% PDF, it is only set true by default if the pdftex driver is used. This makes
% links on multiple lines into different PDF links to the same target.
% Adds ?backlink? text to the end of each item in the bibliography, as a list
% of section numbers. This can only work properly if there is a blank line
% after each \bibitem.
% bookmarksnumbered boolean false
% If Acrobat bookmarks are requested, include section numbers.
% bookmarksopen boolean false
% If Acrobat bookmarks are requested, show them with all the subtrees expanded.
pdftitle={PhD Thesis},
pdfauthor={Jonathan M. McCune},
pdfsubject={Carnegie Mellon University},
pdfpagemode=UseOutlines % None, UseThumbs, UseOutlines, FullScreen

This pages also has some useful notes about getting the Table of Contents, etc. as one may want them.

Prolific PL-25A1 USB-to-USB bridge in Linux

I am reporting on how I got the above-mentioned device to bridge two Debian Linux systems. One is a normal system, and the other is my BeagleBoard. In my recent BeagleBoard post, I mentioned patching and installing the necessary plusb.c driver. Once the driver is working, you will have a new usbX network interface (view with `ifconfig -a`). To send packets, I chose IP addresses for my endpoints.

On the BeagleBoard (the interface is usb1; usb0 is taken by a USB ethernet adapter):
ifconfig usb1 netmask up
route add -host usb1

On the regular x86 system:
ifconfig usb0 netmask up
route add -host usb0

Then it worked. The mailing lists claim this Prolific chip is flaky, but I’ve had good luck so far.