Skip to Content
Mac OS X in a Nutshell
book

Mac OS X in a Nutshell

by Jason McIntosh, Chuck Toporek, Chris Stone
January 2003
Intermediate to advanced
832 pages
32h 40m
English
O'Reilly Media, Inc.
Content preview from Mac OS X in a Nutshell

Connecting to Other X Window Systems

You can connect from Mac OS X to other X window systems using ssh with X11 forwarding. If you use OpenSSH (which is included with Mac OS X; see Section 7.5), you must use the -X option to request X11 forwarding (the -2 option specifies the ssh Version 2 protocol, as opposed to the older Version 1 protocol). For example:

ssh -2 -X remotemachine -l username

As long as XDarwin is running, this can be entered in either an xterm window or in the Mac OS X Terminal. To have the X11 forwarding enabled in Terminal, you must have the DISPLAY variable set as noted earlier prior to making the connection. (This is always the case if the DISPLAY variable is set in your .tcshrc script.) It is also possible to make a double-clickable application that connects to a remote machine via ssh2 with X11 forwarding enabled. For example, the following script can be used for this purpose:

#!/bin/sh
ssh -2 -X remotemachine -l username

If you’ve installed the commercial version of ssh from http://www.ssh.com, the equivalent of the preceding script is given with the following:

#!/bin/sh
ssh2 remotemachine -l username

Using OroborOSX, you can add a Launch menu item to accomplish the same task. To do this, start by copying the template file found in the directory ~/Library/Preferences/OroborOSX/Launch Menu Items to whatever you’d like to call this application. For this example, suppose you want to connect to a remote machine named chops with a username of sam. Name the application ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mac OS X Internals: A Systems Approach

Mac OS X Internals: A Systems Approach

Amit Singh
C++ In a Nutshell

C++ In a Nutshell

Ray Lischner
Linux Shell Scripting Cookbook - Third Edition

Linux Shell Scripting Cookbook - Third Edition

Clif Flynt, Sarath Lakshman, Shantanu Tushar
Optimized C++

Optimized C++

Kurt Guntheroth

Publisher Resources

ISBN: 0596003706Supplemental ContentCatalog PageErrata