Using Alpine in an X11 Terminal

Alpine is my primary IMAP, NNTP, & 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 release of Alpine 1.10 on 2008-March-18 and my recent upgrade to Mac OS X Leopard, I decided to try using it in an X11 Terminal again. In the past I've failed to get it to work well, but today I succeeded! Here are some details about how I got it to work.

Important: 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 here and here.
  1. Install the latest Alpine. For details, see my blog item titled Building and Installing Alpine (Apache-Licensed Pine).

  2. In a window, run
    xterm -e alpine &
  3. In Alpine, go to Main > Setup > Config (MSC) and set this feature:
    [X]  Enable Mouse in Xterm
    Read Alpine's built-in Help about Enable Mouse in Xterm (by typing Ctrl-G or ?), 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.

  4. 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:
    [X]  Enable Newmail in Xterm Icon
    [ ] Enable Newmail Short Text in Icon

  5. In Alpine, go to Main > Setup > Kolor (MSK) and set
    Color Style
    Set Rule Values
    --- ----------------------
    ( ) no-color
    ( ) use-termdef
    ( ) force-ansi-8color
    ( ) force-ansi-16color
    (*) force-xterm-256color
    After you set the color style, use the Space and - keys to navigate the SETUP COLOR screen and choose colors that you like.

  6. Save your settings and quit Alpine.

  7. Quit X11.

  8. In a window, run
    xterm -e alpine &
    and check that the mouse and colors are working.

  9. 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:
    alias xal='xterm -fa DejaVu\ Sans\ Mono -fs 18 -geometry 116x32+0+0 -e alpine &'

Tip 1: The DejaVu fonts, 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 DejaVu Testing page in your web browser.

Tip 2: Cmd-double-clicking anywhere on a URL in an xterm will send it to your default web browser.

Tip 3: 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.

Tip 4: To paste text into xalpine, you need to first type Ctrl-\ to turn off Alpine's Xterm mouse tracking, then middle-click (Alt-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 > Preferences > Input and check 'Emulate three button mouse'. 

Please post any tips, suggestions, or questions you have about using Alpine in an X11 Terminal. 

Labels: , , , , , , , , , ,

Hashtag: # [?]

Post & Read Comments (located elsewhere)



Post & Read Comments (located here)

In more recent versions of Apple's X11 (installed with 10.5.3 and/or from the even newer versions at MacOSforge) Cmd-V (without modification) pastes in an Xterm, including one running Alpine. I discovered this recently, so I assume that it is part of the improvements to 2.2.x versions of Xquartz. The MacOSforge site is an Apple maintained site for open-source development.


Post a Comment



Links to this page

Create a Link



Each item © Nancy McGough
Each comment © the author of the comment web site hosted by
deflexions powered by Delicious · reflexions powered by Blogger
More deflexions & reflexions, & feeds available via the sidebar top & bottom

[link] For bookmarks & links, please use this page's permalink [link]