X11 (Mac OS X)

X11 is a program for OS X that allows applications written for the X11 windowing system to be run on OS X. The native windowing system on OS X is called Quartz. X11 for OS X allows you to run both locally installed and from remote X11 applications. If an application is run from a remote machine, the application itself runs on the remote machine, but is displayed locally. All files the application uses must be stored on the remote machine.

Starting X11

To start X11, click on the X11 application icon and an xterm will start automatically. The icon will usually be in the Applications folder. In a USC userlab, you can find the icon in the Applications folder and the Internet Tools subfolder. The icon is called X11.

By default an xterm window will appear when X11 is started. This xterm is local to that OS X machine, and can be used to run local X11 programs.

Connecting to Other Hosts using SSH Tunneling

The recommended way to use X applications on other machines such as aludra or mizar is to use the ssh command. The command option for ssh has changed between versions of X11 and OSX. The old command, which supports OS 10.1-10.3 is ssh -X username@host.usc.edu, where -X makes sure X11 is tunneled over ssh, username isyour USC username on the machine that you are connecting to, and host.usc.edu is the hostname of the machine you are connecting to. For example, if you were a student, want to connect to aludra.usc.edu, and have a username of ttrojan, your command would be ssh -X ttrojan@aludra.usc.edu. The new command for OS 10.4 and/or X11 4.4 is ssh -Y username@host.usc.edu. If running ssh -X gives you errors while running certain X11 programs, you should try using ssh -Y.

Standard Mouse Emulation

If you are on a Mac that has a one or two button mouse instead of a standard three button mouse, you will probably want to turn on three button mouse emulation. UNIX X11 applications readily make use of the middle and right mouse buttons. To turn on this option, click on the X11 menu, then click on Preferences. Make sure the first checkbox, named Emulate three button mouse is checked. You can now access middle button functionality by holding down the option key on the keyboard and clicking the left or only button on your mouse. You can access the right mouse button by holding down the command key and clicking the mouse button.

Clipboards

Certain applications such as Netscape or Mozilla have different ways of treating the X11 clipboard, but generally speaking, the X11 clipboard is handled in the following way. To copy a block of text into the X11 clipboard all you need to do is highlight it with the mouse. In most X11 applications, that text is automatically entered into the clipboard. Some applications may have a Copy button available from its Edit menu. To paste, all you need to do is use the middle (option-left) mouse button. Some X11 applications may have Paste button in their Edit menu.

The interaction between OS X and X11 applications is kept separate, though. If an object is copied from a regular (Quartz) OS X application, it is automatically entered into
both OS X and X11 clipboards. However, if an object is copied from within an X11 application, it is only entered into the X11 clipboard. The contents of the X11 clipboard can be placed into the OS X clipboard only by selecting Copy from the Edit menu on the menu bar for X11.

  • To copy between two OS X (Quartz) applications, just use the Copy and Paste items from the Edit menu in the applications’ menubars.
  • To copy between two X11 applications, highlight text in one application, then middle (option-left) click into the other application.
  • To copy from an OS X application into an X11 application, use the Copy button in the OS X application, and middle (option-left) click into the X11 application.
  • To copy from an X11 application into an OS X application, higlight the text in the X11 application, use the Edit, Copy
    button from the X11 titlebar, then use the Edit, Paste button in the OS X application.

Getting Help

If you have any further questions, please contact the ITS Customer Support Center.