9.6. R with an Aqua GUI

 < Day Day Up > 

9.5. SSH GUIs

OpenSSH is a free version of the SSH suite of network connectivity tools that provides encrypted replacements for telnet, ftp, rlogin, rcp, and more. As noted earlier in the book, OpenSSH is bundled with Mac OS X. Although the SSH tools are fully functional from the command line, several GUIs are available for SSH. One such front-end, familiar to Unix/Linux users, is Brian Masney's GTK+/glib-based gftp (http://www.gftp.org). gftp can be installed on Mac OS X using Fink.

Another option is Fugu (http://rsug.itd.umich.edu/software/fugu/), which is a graphical interface to OpenSSH, bundled with Mac OS X. Fugu is developed and provided as freeware by the University of Michigan's Research Systems Unix Group. As noted on its web site (which should always be consulted for the most up-to-date version and information), Fugu has many useful features including, but not limited to, the following:

  • Support for SFTP, SCP

  • Support for SSH command-line options

  • Ability to create SSH Tunnels

  • Drag and drop files on its interface to upload/download files

  • External editor support

  • Image previews

  • Show/hide hidden files (i.e., beginning with a period)

  • Directory upload

  • Permissions, owner and group modification

  • Directory histories

  • Unicode character support

  • Support for connections to alternate ports

  • Compression support

  • Keychain support

  • Favorites list for frequently visited hosts

  • Support for Bonjour

When Fugu is launched, you will be greeted with a dialog window that includes a file browser showing your local Home directory, and blank fields that you must fill in to make an sftp connection to a remote site, as illustrated in Figure 9-3.

Figure 9-3. Fugu's sftp connection

To use Fugu, enter the IP address or domain name, remote username, port, and directory that you want to access. Under Advanced SFTP Options, you can enable features such as compression or enter additional SSH options. Once you've added this information, add the host to a list of Favorites so you can quickly connect to that site in the future, instead of entering all of its information each time.

Once you've entered this information as shown in Figure 9-3, click the Connect button. If you're connecting to this host for the first time, you'll be prompted to enter a password and add it to your Keychain. Click the Authenticate button and, if all goes well, the right column of Fugu's window displays the remote directory in its file browser.

You can now drag and drop to upload or download files. However, at the time of this writing, you could not use Fugu to drag and download directories with sftp. To download folders in Fugu, you must use scp.

As noted earlier, Fugu can be used to remotely delete files simply by selecting the filename and then clicking on the Delete icon. At the time of this writing, Fugu could not delete recursively. In other words, if you want to delete a directory and all of the files contained within it, you'll have to delete the files manually. Only then can you delete the empty directory.

You can also change certain attributes of a file, regardless of whether a file is local or remote, by selecting the file in Fugu's file browser and clicking the Get Info icon. In the resulting pop-up window, you'll be able to change, among other things, the file's permissions.

Two other freeware SSH frontends worth mentioning are:

  • Cyberduck (http://www.cyberduck.ch/)

  • SSH Agent (http://www.phil.uu.nl/~xges/ssh/)

Cyberduck is another graphical user interface to ftp and sftp, as shown in Figure 9-4.

Figure 9-4. An sftp connection via Cyberduck

Cyberduck's set of features is similar to has many useful features including, but not limited to, the following:

  • Support for FTP and SFTP

  • Drag and drop files on its interface to upload/download files

  • Multiple simultaneous connections

  • External editor support

  • Show/hide hidden files (i.e., beginning with .)

  • Directory upload

  • Permissions, owner and group modification

  • Directory histories

  • Live filtering of directory listings

  • Move, create, and delete remote files

  • Unicode character support

  • Support for connections to alternate ports

  • Keychain support

  • Bookmarks list for frequently visited hosts

  • Support for Bonjour

SSH Agent can be used to (among other things) start an SSH-agent, generate identities, add identities to agents, and establish a secure tunnel. Figure 9-5 illustrates how to use the SSH Agent to set up an SSH tunnel in order to make a secure connection to a VNC server.

Figure 9-5. Setting up an SSH tunnel to a VNC server with SSH Agent

9.5.1. LaTeX

TeX was developed by computer scientist Donald Knuth as a special programming language used to typeset mathematical and scientific publications. LaTeX, developed by Leslie Lamport and subsequently further developed by Frank Mittelbach among others, is essentially a rather large set of macros built on top of TeX.

The TeX Users Group (TUG) web site (http://www.tug.org) contains an enormous amount of information on TeX-related projects and resources. One distribution of TeX for Unix systems, teTeX (http://www.tug.org/teTeX), is provided by Thomas Esser. teTeX is commonly found on Unix- and Linux-based systems, especially those used by mathematicians, scientists, and engineers.

The Mac-TeX web site (http://www.esm.psu.edu/mac-tex), maintained by Gary L. Gray and Joseph C. Slater, is devoted to tracking TeX developments for the Mac platform. This site is a must-visit if you're interested in using TeX on Mac OS X.

teTeX can be installed on a Mac OS X system with Fink. You could also use the installation provided by Gerben Wierda's i-Installer to install TeX Live-teTeX , a superset of teTeX.

In this section, we'll discuss how to install TeX Live-teTeX with i-Installer and then briefly describe two graphical frontends to LaTeX: TeXShop and iTeXMac . TeXShop and iTeXMac are actually more than frontends; they provide unified LaTeX environments, complete with editors and other tools. We'll round out this section with two more applications, Equation Service and LaTeX Equation Editor, which allow you to easily use your LaTeX installation to add mathematical typesetting capabilities to applications such as Mail, iChat, and Keynote.

9.5.2. Installing TeX Live-teTeX

To install TeX Live-teTeX (http://www.rna.nl/tex-org.html), first download the i-Installer application from ftp://ftp.nluug.nl/pub/comp/macosx/volumes/ii2/II2.dmg and install it in /Applications/Utilities. Once you've done this you can use it to install TeX. Before installing TeX, however, you may want to use i-Installer to install five optional packages, Freetype 2, libwmf, Ghostscript 8, ImageMagick, and FontForge, which enhance the capabilities of TeX. Specifically, Ghostscript 8 is recommended if you want dvips support, while the other four packages are needed if you want full support for TeX4ht TeX to HTML conversion as well as graphics file format conversion using ImageMagick's convert tool. According to the advice given on the TeXShop web site (http://www.uoregon.edu/~koch/texshop/texshop.html), you should install the five optional packages in the order as listed above.

No matter what package you're installing with i-Installer, double-click the i-Installer in the Finder, and then select i-Package Known Packages i-Directory. A window listing many packages opens, as shown in Figure 9-6.

In the Known Packages i-Directory listing, find and double-click the desired package to open a pop-up window, which can be used either to view the package's Readme and Pkg Properties or to Install or Uninstall the package. Pkg Properties lists, among other things, the URL for the binary, the size of the download, whether or not the package is already installed on your system, and the installation location. Simply click Install in the pop-up window, and authenticate as an administrative user to download and install the package. When you install TeX, you should click Install & Configure. There are several options for installation, depending on your level of expertise with LaTeX as well as your requirements for optional LaTeX components. These options are described in great detail in the Readme, which can be viewed in the pop-up window, as shown in Figure 9-7.

Figure 9-6. Known packages listed in the i-Directory window

Clicking Install & Configure downloads, and installs the teTeX Foundation package in /usr/local/teTeX with a symbolic link /Library/teTeX pointing to /usr/local/teTeX. If you select the Expert installation mode, when installation of TeX nears completion, you'll be prompted to configure items such as language selection, paper size, and formats. Otherwise these configuration options will be set automatically.

Local system modifications, for example, addition of new LaTeX packages (i.e., *.sty files) can be made to /usr/local/teTeX/share/texmf.local. Modifications can also be made on a per-user basis by modifying ~/Library/texmf. If you subsequently upgrade your LaTeX installation with i-Installer, these local modifications are not affected. The teTeX search order for files is:

  1. ~/Library/texmf

  2. /usr/local/teTeX/share/texmf.local

  3. /usr/local/teTeX/share/texmf.gwtex

  4. /usr/local/teTeX/share/texmf.tetex

  5. /usr/local/teTeX/share/texmf

Once the installation and configuration of TeX Live-teTeX is complete, you can run latex from the command line. However, even the most hardcore command-line fanatics may find the available Aqua-based interfaces enticing.

Figure 9-7. TeX Package's Readme

Finally, Gerben Wierda's TeX Live-teTeX can coexist with a teTeX that you've installed using Fink. Fink, which installs software in /sw, actually provides an option (install system-tetex) to place symbolic links in /sw instead of installing a second version of teTeX. This method allows you to maintain only one version of teTeX and ensures that Fink is aware of it when checking dependencies.

9.5.3. TeXShop

To install TeXShop, download the TeXShop.dmg file from the TeXShop web site (http://darkwing.uoregon.edu/~koch/texshop/texshop.html), mount the disk image by double-clicking on it, and then drag the TeXShop application to your Applications folder. Individual users should also drag the texmf folder, located in the "To Your Library" folder on TeXShop's disk image, to their ~/Library folders.

TeXShop includes a specialized editor with syntax highlighting, LaTeX macros accessible from a toolbar menu, and a previewer. The LaTeX macros can be used to insert LaTeX code into your document.

By default, TeXShop uses pdftex and pdflatex (part of standard teTeX distribution) to produce output in PDF instead of the more traditionally used DVI format. Figure 9-8 shows TeXShop's built-in editor, while Figure 9-9 shows TeXShop's previewer.

Figure 9-8. TeXShop editor with its LaTeX Macros menu

Figure 9-9. TeXShop's built-in previewer

Among its many useful features, TeXShop supports AppleScript and is highly configurable. In particular, you can configure the Latex Panel, Auto Completion, the Keyboard Menu Shortcuts, and the Macro menu. These user-level configurations are written to four plist files, stored in ~/Library/TeXShop: completion.plist, autocompletion.plist, KeyEquivalents.plist, and Macros.plist. Figure 9-10 shows TeXShop's Macro Editor, which can be opened from the Macros toolbar. Select Window LaTeX Panel to open the LaTeX Panel.

Figure 9-10. TeXShop's Macro Editor

TeXShop (together with TeX Live-teTeX) provides a highly customizable, complete, and unified LaTeX environment that is nicely integrated for Mac OS X.

9.5.4. iTeXMac

iTeXMac (http://itexmac.sourceforge.net/Download.html), is a feature-rich alternative to TeXShop. Installation involves dragging and dropping the iTeXMac application file to your Applications folder. You may also want to download LaTeX.help and TeX Catalogue Online.help, since both provide extensive help on LaTeX from within Mac OS X's Help Viewer (/Library/System/CoreServices). If you opt to download the two .help files, you must drop them in /Library/Documentation/Help before you can view them in Help Viewer.

iTeXMac provides a customizable, integrated LaTeX environment, including a specialized editor with syntax highlighting and extensive LaTeX macros accessible from the toolbar menu. These macros can be used to insert LaTeX code into your document from a menu selection. While TeXShop also has this ability, iTeXMac comes with a larger selection of macros. Figure 9-11 shows iTeXMac's built-in editor and LaTeX macro menu.

Figure 9-11. iTeXMac's editor and LaTeX Macro menu

Additional features of iTeXMac include:

  • Customizable macros

  • Customizable key bindings

  • Extensive support for project design

  • iTeXMac Help, LaTeX Help, and TeX Catalogue Online Help, each accessible from the Help Viewer

  • AppleScript support

  • Aside from PDF, iTeXMac's viewer can view PS, EPS, and DVI files, which are processed by iTeXMac to produce PDF output

  • Extensive set of Dock menu items

Although iTeXMac is designed to use Gerben Wierda's TeX Live-teTeX distribution, you can use it with teTeX installed by Fink, provided that you enable Fink teTeX in iTeXMac's Preferences teTeX Assistant menu.

iTeXMac and TeXShop share many of the same features. The differences between these two applications are essentially that iTeXMac has a few more features and those features are more extensively implemented. For example, the LaTeX macro menu in iTeXMac includes many more macros. On the other hand, it seems that (at least at the time of this writing, with iTeXMac at Version 1.3.15 and TeXShop at Version 1.35), TeXShop has a performance advantage when compiling large LaTeX files, as well as in viewing the resulting PDF files. Fortunately, these two very useful and well-designed applications can coexist. Since neither occupies a large amount of disk space, you may want to keep them both on hand in your Applications folder, and perhaps even in your Dock.

An open source X11-based WYSIWYM (What You See Is What You Mean) document processor, LyX (http://www.lyx.org), uses teTeX as a rendering engine and runs on most Unix/Linux systems, Windows OS/2, and Mac OS X. There are essentially two versions of LyX: one built on xforms, and another on Qt. Thanks to Qt/Mac (http://www.trolltech.com/download/qt/mac.html), an Aqua-native port of LyX, named LyX/Mac (http://www.18james.com/lyx_on_aqua.html), is available as a self-installing binary. To run LyX/Mac, however, you must first install teTeX using i-Installer or Fink.

9.5.5. LaTeX Services

One great feature of Mac OS X is its Services menu and the many options offered there by some programmers. For example, Apple's Mail application allows you to select text in an email message and then select Mail Services Speech Start Speaking Text. When you select "Start Speaking Text," Mac OS Xs speech synthesis component jumps into action and speaks the selected text back to you. There are at least two LaTeX-related applications that use pdflatex (included with teTeX) to produce small PDF images of LaTeX-processed code. One of these two applications creates a Services menu item that can be used with other applications.

Equation Service (http://www.esm.psu.edu/mac-tex/EquationService) provides inline typesetting of LaTeX code. To install this Service, download and install the Equation Service application in your Applications folder. When you run it the first time, configuration files are placed in ~/Library/Application Support.

There two ways to use Equation Service: by highlighting LaTeX code in an application and selecting one of several choices from the Services menu or by creating and previewing equations in the Equation Service application's main window. To use Equation Services to typeset LaTeX within an application (for example, iChat), highlight LaTeX string in an iChat chat window, and select iChat Services Equation Service Typeset Equation. Normally Equation Service replaces the LaTeX code with an image file when it typesets the LaTeX code. At the time of this writing, however, Equation Service adds an image file just after the LaTeX code in iChat. When this happens, you should delete the LaTeX code after the image has been added. Figure 9-12 illustrates the result of this process.

Figure 9-12. An iChat message with an equation rendered by Equation Service

Equation Service is known to work with TextEdit, and OmniGraffle. In both of these applications, Equation Service replaces the LaTeX code with an appropriate image file containing the mathematical typesetting. Although Equation Service works in many cases from the Services item in the Mac OS X menu bar, LaTeX strings can also be typeset in the main window of Equation Service, as Figure 9-13 illustrates.

Once you've typeset an equation in the main window of Equation Service, you can drag and drop the resulting PDF image into a number of applications, such as Microsoft Office or Apple's Keynote. There are several preferences you can set in Equation Service's preferences including font size, text color, and background color of the typeset equations.

LaTeX Equation Editor (http://evolve.lse.ac.uk/software/EquationEditor/) is similar to LaTeX Equation Service, but it operates in one mode only: you

Figure 9-13. Typesetting an equation in Equation Service's main window

must create and preview equations in the application's main window. This application does not provide a Services menu selection to typeset LaTeX strings within other applications. Nevertheless, LaTeX Equation Editor is useful and easy to use, since it is a simple matter to drag and drop the small PDF image it produces into Mail and Keynote documents. Figure 9-14 shows LaTeX Equation Editor's typesetting of a LaTeX string.

Figure 9-14. Typesetting an equation with LaTeX Equation Editor

     < Day Day Up > 

    Mac OS X Tiger for Unix Geeks
    Mac OS X Tiger for Unix Geeks
    ISBN: 0596009127
    EAN: 2147483647
    Year: 2006
    Pages: 176

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net