# iTunes sharing via SSH and Rendezvous Proxy

Is easy (thanks to sevitz.com), 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 127.0.0.1 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)

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

smtp.googlemail.com youremail@gmail.com:yourpassword

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 smtp.gmail.com /etc/postfix/relay_password

You will need to retrieve the Thawte Premium Server CA from https://www.verisign.com/support/roots.html.

sudo mkdir /etc/postfix/certs cd /etc/postfix/certs sudo unzip -j /path/to/roots.zip 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/main.cf

relayhost = smtp.googlemail.com:587 # 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.

% PDF \usepackage[% %\ifpdf % pdftex, %\else % dvipdf, %\fi 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{} letterpaper=true, plainpages=false, % plainpages boolean true % Forces page anchors to be named by the arabic form of the page number, % rather than the formatted form. breaklinks=true, % 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. pagebackref=true, % 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=true, % bookmarksnumbered boolean false % If Acrobat bookmarks are requested, include section numbers. bookmarksopen=true, % 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}, pdfkeywords={}, pdfpagelabels=true, pdfpagemode=UseOutlines % None, UseThumbs, UseOutlines, FullScreen ]{hyperref}

# 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 10.0.0.1 netmask 255.255.255.255 up