tag:blogger.com,1999:blog-59413252008-04-23T19:51:47.778ZDeflexion.comNMnoreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5941325.post-7172436619448276742008-03-23T16:34:00.007Z2008-04-22T10:44:13.593ZUsing Alpine in an X11 TerminalAlpine is my primary IMAP, NNTP, &amp; ESMTP client and for years I've used it without a mouse. Using the keyboard is usually an efficient way to navigate, manage, and write messages, but sometimes I dream about being able to use a mouse. With the <a title="Alpine Turns It Up to 1.10" href="http://blog.wired.com/monkeybites/2008/03/alpine-turns-it.html">release of Alpine 1.10</a> on 2008-March-18 and my recent upgrade to Mac OS X Leopard, I decided to try using it in an <a href="http://developer.apple.com/opensource/tools/X11.html">X11</a> Terminal <b><i>again</i></b>. In the past I've <a title="Abort, Retry, or EPIC FAIL at waxy.org" href="http://www.waxy.org/archive/2008/03/19/abort_re.shtml">fail</a>ed to get it to work well, but today I succeeded! Here are some details about how I got it to work.<br /><br /><b><i>Important:</i></b> These instructions worked on Leopard, but will probably not work on Tiger (or earlier) because the X11 configuration is significantly different in Leopard than in earlier versions of OS X. Details about X11 on Leopard are <a title="Apple's X11 and Leopard FAQs" href="http://forums.macosxhints.com/showthread.php?t=80171">here</a> and <a title="Re: X11 in Leopard: xterm on start-up" href="http://lists.apple.com/archives/X11-users/2007/Oct/msg00065.html">here</a>.<br /><ol><li>Install the latest Alpine. For details, see my blog item titled <a href="http://deflexion.com/2007/01/building-and-installing-alpine-apache">Building and Installing Alpine (Apache-Licensed Pine)</a>.</li><br /><li>In a <a href="http://en.wikipedia.org/wiki/Terminal_%28application%29">Terminal.app</a> window, run <pre>xterm -e alpine &amp;</pre></li><li>In Alpine, go to Main &gt; Setup &gt; Config (<b>MSC</b>) and set this feature:<pre>[X] Enable Mouse in Xterm</pre> Read Alpine's built-in Help about Enable Mouse in Xterm (by typing <b>Ctrl-G</b> or <b>?</b>), but note that in Leopard you should not explicitly set the DISPLAY environment variable. Instead, it will be set automatically when xterm runs. This is one of the changes in Leopard.</li><br /><li>Read the built-in Help about the following two features and decide if you would like to set them. Here are the settings that I use: <pre>[X] Enable Newmail in Xterm Icon<br />[ ] Enable Newmail Short Text in Icon</pre></li><br /><li>In Alpine, go to Main &gt; Setup &gt; Kolor (<b>MSK</b>) and set<br /><pre>Color Style<br /><tt> </tt> Set Rule Values<br /><tt> </tt> --- ----------------------<br /><tt> </tt> ( ) no-color<br /><tt> </tt> ( ) use-termdef<br /><tt> </tt> ( ) force-ansi-8color<br /><tt> </tt> ( ) force-ansi-16color<br /><tt> </tt> (*) force-xterm-256color</pre> After you set the color style, use the <b>Space</b> and <b>-</b> keys to navigate the SETUP COLOR screen and choose colors that you like.</li><br /><li>Save your settings and quit Alpine.</li><br /><li>Quit X11.</li><br /><li>In a Terminal.app window, run <pre>xterm -e alpine &amp;</pre> and check that the mouse and colors are working.</li><br /><li>If you plan to run Alpine in an X11 Terminal regularly, set up an alias in your ~/.bashrc (or ~/.bash_profile) that you can use to launch xalpine with the xterm settings (fonts, geometry, etc.) that you like. For example, here is the alias that I'm currently using: <pre>alias xal='xterm -fa DejaVu\ Sans\ Mono -fs 18 -geometry 116x32+0+0 -e alpine &amp;'</pre></li></ol><br /><b><i>Tip 1:</i></b> The <a href="http://en.wikipedia.org/wiki/DejaVu_fonts">DejaVu fonts</a>, which include the DejaVu Sans Mono font that I use in my 'xal' alias above, are libre and include many Unicode characters. To see if the DejaVu fonts are installed on your system, view this <a href="http://dejavu.sourceforge.net/wiki/index.php/Testing">DejaVu Testing</a> page in your web browser.<br /><br /><b><i>Tip 2:</i></b> <a title="Command or Apple or ⌘" href="http://en.wikipedia.org/wiki/Command_key">Cmd</a>-double-clicking anywhere on a URL in an xterm will send it to your default web browser.<br /><br /><b><i>Tip 3:</i></b> To select text in xalpine, you need to hold down the Shift key while using the mouse to select the text. After the text is selected, Cmd-C can be used to copy the text.<br /><br /><b><i>Tip 4:</i></b> To paste text into xalpine, you need to first type Ctrl-\ to turn off Alpine's Xterm mouse tracking, then middle-click (<a title="Option or ⌥" href="http://en.wikipedia.org/wiki/Option_key">Alt</a>-click) at the location where you would like the text to be pasted. Note that in order for this to work you need to go to X11 &gt; Preferences &gt; Input and check 'Emulate three button mouse'. <br /><br />Please post any tips, suggestions, or questions you have about using Alpine in an X11 Terminal. NMnoreply@blogger.comtag:blogger.com,1999:blog-5941325.post-1170179180866201992007-01-30T17:45:00.000Z2007-11-12T20:21:14.580ZBuilding and Installing Alpine (Apache-Licensed Pine)Alpine, the University of Washington's new Apache-Licensed Pine, has been in alpha testing since 2006 November 29 and it's now at a point where I feel comfortable recommending it to <a href="http://www.ii.com/internet/messaging/pine/pc/">power Pine</a> users. If you would like to participate in the alpha test, go to the <a href="http://www.washington.edu/alpine/">Alpine Information Center</a> and join the <a href="https://mailman1.u.washington.edu/mailman/listinfo/alpine-alpha">alpine-alpha mailing list</a>.<br /><br />Here is what I did to build and install Alpine on my Mac OS X system.<br /><ol><li>If you have not done so already, download and install the latest <a href="http://developer.apple.com/tools/xcode/">Xcode package</a> from the <a href="http://developer.apple.com/macosx/">Apple Developer Center</a>.<br /></li><li>Backup any Pine and Alpine files that are in /usr/local/bin. These will be replaced by Step 12 below.<br /></li><li>Go to <a href="ftp://ftp.cac.washington.edu/alpine">ftp.cac.washington.edu/alpine</a> and get the latest alpine-x.xx.tar.bz2 (where x.xx is the version number). I prefer to get the .bz2 file because it is smaller than the .Z and .gz files.<br /></li><li>Put this <a href="http://en.wikipedia.org/wiki/Tar_%28file_format%29">tarball</a> in your build directory, for example in ~/Build.<br /></li><li>Open a <a href="http://en.wikipedia.org/wiki/Terminal_%28application%29">Terminal</a> window.<br /></li><li>To change to your build directory, type: <pre>cd ~/Build<br /></pre><br /></li><li>To check the <a href="http://en.wikipedia.org/wiki/MD5">MD5</a> checksum of the tarball, run one of the following commands:<pre>/sbin/md5 /absolute/path/to/alpine-x.xx.tar.bz2<br />/usr/bin/openssl md5 /absolute/path/to/alpine-x.xx.tar.bz2</pre> I recommend that you specify the absolute path to both the command and the tarball to ensure you are not specifying <a href="http://en.wikipedia.org/wiki/Trojan_horse_%28computing%29">trojans</a>. The MD5 checksum should match the MD5 checksum that is in the x.xx release announcement message in the alpine-alpha mailing list.<br /><br /></li><li>To un<a href="http://en.wikipedia.org/wiki/Bzip2">bzip2</a> and untar the tarball, type: <pre><a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/tar.1.html">tar</a> jxvf alpine-x.xx.tar.bz2<br /></pre><br /></li><li>To change to the newly created alpine-x.xx directory, type: <pre>cd alpine-x.xx<br /></pre></li><li>To read the README and the configuration help, type: <pre><a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/less.1.html">less</a> README<br />./configure --help |less<br /></pre></li><li>To build Alpine, type the following (which are discussed in the README): <pre>./configure<br />make<br /></pre></li><li>After the build is finished, type: <pre><a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man8/sudo.8.html">sudo</a> make install<br /></pre> You will be prompted for your Mac OS X password.<br /><br /></li><li>To check that Alpine was built and installed correctly, type: <pre>man alpine<br />alpine<br /></pre>Make sure that these two commands invoke the correct version (x.xx). If these commands do not work, you probably need to add /usr/local/man to your <a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/manpath.1.html">MANPATH</a> <a href="http://en.wikipedia.org/wiki/Environment_variable">environment variable</a> and /usr/local/bin to your PATH environment variable. For details, see the man page for your shell (<a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/bash.1.html">man bash</a>, <a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/tcsh.1.html">man tcsh</a>, etc.). To determine your shell, run <a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/finger.1.html"><kbd>finger -l</kbd></a>.<br /></li></ol>To learn more about Alpine, which is basically Pine 5.0, see: <ul><li><kbd>man alpine</kbd></li><li><kbd>alpine -h | less</kbd></li><li>Alpine Release Notes, which can be viewed by typing <span style="font-weight: bold;">MR</span> (Main > RelNotes) in Alpine</li><li>Alpine's built-in context-sensitive Help, which can be viewed by typing <span style="font-weight: bold;">^G</span> (Get Help) or <span style="font-weight: bold;">?</span> in Alpine<br /></li><li><a href="http://mailman1.u.washington.edu/mailman/listinfo/alpine-alpha">Alpine-alpha list archives</a><br /></li><li><a href="http://www.ii.com/internet/messaging/pine/">All About Pine: POP, IMAP, NNTP, &amp; ESMPT Client for Unix, MS Windows, and Mac OS X</a><br /></li><li><a href="http://www.ii.com/internet/messaging/pine/pc/">Power Pine: Getting the Most Out of Unix-, Mac-, and PC-Pine</a></li></ul> Good luck with Alpine and I hope to see you in the Alpine-alpha list!<br /><br /><b><i>Tip 1:</i></b> You should be able to use a modified version of these instructions to build Alpine on any <a href="http://en.wikipedia.org/wiki/Unix-like">Unix-like</a> system. For example, I used Steps 3-11 to build Alpine on my <a href="http://www.dreamhost.com/r.cgi?iidotcom/shared/comparison.html">DreamHost shared hosting account</a>, which runs <a href="http://www.debian.org/">Debian Linux</a>.<br /><br /><i><b>Tip 2:</b></i> The Alpine FTP site includes pre-built versions of Alpine for MS Windows (PC-Alpine): alpine-x.xx-wnt.zip and setup_alpine_x.xx.exe. Details are in ftp://ftp.cac.washington.edu/alpine/README<br /><br /><i><b>See Also:</b></i> Paul Heinlein's <a href="http://www.madboa.com/geek/pine-macosx/">Pine and Alpine on Mac OS X</a>, which includes notes on building and running Pine or Alpine under Mac OS X.NMnoreply@blogger.com