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 prior to making the
connection, as noted earlier. (This will always be the case if the
DISPLAY variable is set in your .tcshrc
script.) It is also possible to create a double-clickable
application that connects to a remote machine via ssh2,
with X11 forwarding enabled. For example, you can use the
following script for this purpose:
#!/bin/sh
ssh -2 -X remotemachine -l username
TIP:
The X11 forwarding flag is +x with the
commercial ssh, but it is enabled by default, so
that you need not include it in the command.
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 example, suppose we want to connect to a remote
machine named chops with a username of
sam. We'll name the application
Connect2Chops. Start by copying the template to
Connect2Chops.x11app:
% cp template Connect2Chops.x11app
Next, edit the Connect2Chops.x11app file. You
only need to change a couple of lines, since you'll
be using an xterm. In particular:
# ARGUMENTS FOR THE COMMAND GO HERE (can be left blank)
set argums="-geometry 80x25 -ls -sb -sl 5000 -e ssh -2 -X chops -l sam"
# OPTIONAL TITLE STRING GOES HERE (uncomment this if wanted)
# note that an ID number, sent from OroborOSX, will be added in
# brackets after this string [eg, below would give "xterm (3)"]
set titlenam="Connect2Chops"
Save this file in ~/Library/Preferences/OroborOSX/Launch
Menu Items, then select Launch
Rebuild
Launch Menu.