Download XQuartz X11 for Mac to xquartz project's open-source distribution of the X Window System (X11).
Quickstart
X11 Forwarding on Mac. X11 forwarding on Mac is just as easy. Download Quartz and install it as you would any other Mac package. Quartz is another instance of display management. The MacPorts Project is an open-source community initiative to design an easy-to-use system for compiling, installing, and upgrading either command-line, X11 or Aqua based open-source software on the Mac OS X operating system.
- Install Xcode and the Xcode Command Line Tools
- Agree to Xcode license in Terminal:
sudo xcodebuild -license
- Install MacPorts for your version of the Mac operating system:
Installing MacPorts
MacPorts version 2.7.1 is available in various formats for download and installation (note, if you are upgrading to a new major release of macOS, see the migration info page):
X11 Mac Tiger Download
- “pkg” installers for Big Sur, Catalina, and Mojave, for use with the macOS Installer. This is the simplest installation procedure that most users should follow after meeting the requirements listed below. Installers for legacy platforms High Sierra, Sierra, El Capitan, Yosemite, Mavericks, Mountain Lion, Lion, Snow Leopard, Leopard and Tiger are also available.
- In source form as either a tar.bz2 package or a tar.gz one for manual compilation, if you intend to customize your installation in any way.
- Git clone of the unpackaged sources, if you wish to follow MacPorts development.
- The selfupdate target of the port(1) command, for users who already have MacPorts installed and wish to upgrade to a newer release.
Checksums for our packaged downloads are contained in the corresponding checksums file.
The public key to verify the detached GPG signatures can be found under the attachments section on jmr's wiki page. (Direct Link).
Please note that in order to install and run MacPorts on macOS, your system must have installations of the following components:
Apple's Xcode Developer Tools (version 12.2 or later for Big Sur, 11.3 or later for Catalina, 10.0 or later for Mojave, 9.0 or later for High Sierra, 8.0 or later for Sierra, 7.0 or later for El Capitan, 6.1 or later for Yosemite, 5.0.1 or later for Mavericks, 4.4 or later for Mountain Lion, 4.1 or later for Lion, 3.2 or later for Snow Leopard, or 3.1 or later for Leopard), found at the Apple Developer site, on your Mac operating system installation CDs/DVD, or in the Mac App Store. Using the latest available version that will run on your OS is highly recommended, except for Snow Leopard where the last free version, 3.2.6, is recommended.
With Xcode 4 and later, users need to accept the Xcode EULA by either launching Xcode or running:
Apple's Command Line Developer Tools, which can be installed on recent OS versions by running this command in the Terminal:
Older versions are found at the Apple Developer site, or they can be installed from within Xcode back to version 4. Users of Xcode 3 or earlier can install them by ensuring that the appropriate option(s) are selected at the time of Xcode's install ('UNIX Development', 'System Tools', 'Command Line Tools', or 'Command Line Support').
- (Optional) The X11 windowing environment, for ports that depend on the functionality it provides to run. You have multiple choices for an X11 server:
- Install the xorg-server port from MacPorts (recommended).
- The XQuartz Project provides a complete X11 release for macOS including server and client libraries and applications.
- Apple's X11.app is provided by the “X11 User” package on older OS versions. It is always installed on Lion, and is an optional installation on your system CDs/DVD with previous OS versions.
macOS Package (.pkg) Installer
The easiest way to install MacPorts on a Mac is by downloading the pkg or dmg for Big Sur, Catalina, Mojave, High Sierra, Sierra, El Capitan, Yosemite, Mavericks, Mountain Lion, Lion, Snow Leopard, Leopard or Tiger and running the system's Installer by double-clicking on the pkg contained therein, following the on-screen instructions until completion.
This procedure will place a fully-functional and default MacPorts installation on your host system, ready for usage. If needed your shell configuration files will be adapted by the installer to include the necessary settings to run MacPorts and the programs it installs, but you may need to open a new shell for these changes to take effect.
The MacPorts “selfupdate” command will also be run for you by the installer to ensure you have our latest available release and the latest revisions to the “Portfiles” that contain the instructions employed in the building and installation of ports. After installation is done, it is recommended that you run this step manually on a regular basis to to keep your MacPorts system always current:
At this point you should be ready to enjoy MacPorts!
Type “man port” at the command line prompt and/or browse over to our Guide to find out more information about using MacPorts. Help is also available.
Source Installation
If on the other hand you decide to install MacPorts from source, there are still a couple of things you will need to do after downloading the tarball before you can start installing ports, namely compiling and installing MacPorts itself:
- “cd” into the directory where you downloaded the package and run “tar xjvf MacPorts-2.7.1.tar.bz2” or “tar xzvf MacPorts-2.7.1.tar.gz”, depending on whether you downloaded the bz2 tarball or the gz one, respectively.
- Build and install the recently unpacked sources:
- cd MacPorts-2.7.1
- ./configure && make && sudo make install
- cd ../
- rm -rf MacPorts-2.7.1*
These steps need to be perfomed from an administrator account, for which “sudo” will ask the password upon installation. This procedure will install a pristine MacPorts system and, if the optional steps are taken, remove the as of now unnecessary MacPorts-2.7.1 source directory and corresponding tarball.
To customize your installation you should read the output of “./configure --help | more” and pass the appropriate options for the settings you wish to tweak to the configuration script in the steps detailed above.
You will need to manually adapt your shell's environment to work with MacPorts and your chosen installation prefix (the value passed to configure's --prefix flag, defaulting to /opt/local):
- Add ${prefix}/bin and ${prefix}/sbin to the start of your PATH environment variable so that MacPorts-installed programs take precedence over system-provided programs of the same name.
- If a standard MANPATH environment variable already exists (that is, one that doesn't contain any empty components), add the ${prefix}/share/man path to it so that MacPorts-installed man pages are found by your shell.
- For Tiger and earlier only, add an appropriate X11 DISPLAY environment variable to run X11-dependent programs, as Leopard takes care of this requirement on its own.
Lastly, you need to synchronize your installation with the MacPorts rsync server:
Upon completion MacPorts will be ready to install ports!
It is recommended to run the above command on a regular basis to keep your installation current. Type “man port” at the command line prompt and/or browse over to our Guide to find out more information about using MacPorts. Help is also available.
Git Sources
If you are developer or a user with a taste for the bleeding edge and wish for the latest changes and feature additions, you may acquire the MacPorts sources through git. See the Guide section on installing from git.
Purpose-specific branches are also available at the https://github.com/macports/macports-base/branches url.
Alternatively, if you'd simply like to view the git repository without checking it out, you can do so via the GitHub web interface.
Selfupdate
If you already have MacPorts installed and have no restrictions to use the rsync networking protocol (tcp port 873 by default), the easiest way to upgrade to our latest available release, 2.7.1, is by using the selfupdate target of the port(1) command. This will both update your ports tree (by performing a sync operation) and rebuild your current installation if it's outdated, preserving your customizations, if any.
Other Platforms
Mac X11 Download For Sale
Running on platforms other than macOS is not the main focus of The MacPorts Project, so remaining cross-platform is not an actively-pursued development goal. Nevertheless, it is not an actively-discouraged goal either and as a result some experimental support does exist for other POSIX-compliant platforms such as *BSD and GNU/Linux.
The full list of requirements to run MacPorts on these other platforms is as follows (we assume you have the basics such as GCC and X11):
- Tcl (8.4 or 8.5), with threads.
- mtree for directory hierarchy.
- rsync for syncing the ports.
- cURL for downloading distfiles.
- SQLite for the port registry.
- GNUstep (Base), for Foundation (optional, can be disabled via configure args).
- OpenSSL for signature verification, and optionally for checksums. libmd may be used instead for checksums.
Normally you must install from source or from an git checkout to run MacPorts on any of these platforms.
Help
Help on a wide variety of topics is also available in the project Guide and through our Trac portal should you run into any problems installing and/or using MacPorts. Of particular relevance are the installation & usage sections of the former and the FAQ section of the Wiki, where we keep track of questions frequently fielded on our mailing lists.
Mac X11 Download For Pc
If any of these resources do not answer your questions or if you need any kind of extended support, there are many ways to contact us!
Some of the issues below, though written under earlier versions of OS X, still apply to Snow Leopard.
Mac OS X Leopard update
Think about it. One hundred poodles are scarier than one leopard. That's assuming, of course, that the leopard has no legs.Ellen DeGeneres
Leopard's new X11
Leopard (Mac OS X version 10.5.x) is assumed here.For old notes pertaining to pre-Leopard Mac OS X, see here. That page also contains important survival tips that still apply to Leopard.
The starting point for these notes is an Intel Mac on which you have just upgraded from the Tiger operating system to Leopard. This page addresses the question of how to get X11 and other UNIX software running under Leopard.
Install X11
If you're buying or upgrading to a Mac with Leopard version 10.5.3 or above there should be no problem with Apple's X11. Problems with X11 may arise if you installed Leopard versions below 10.5.3.
As a replacement for the faulty X11 that came with those earlier installations, you may have obtained the latest 'fixed' version (X11 2.2.3 or above) available from Mac OS Forge. You would install this over an already existing Apple X11. However, Apple's Software Update may in turn potentially overwrite (or damage) a Mac OS Forge installation of X11 if the update downloads System software. If that happens, you have to re-install X11 from that web site after running System Update (so keep the Disk Image). For this reason, and also because the 10.5.4 update fixes several other bugs, it is now perfectly OK to stick with Apple's X11 which is also updated through Software Update.
In order to customize X11 beyond the options exposed in the menu bar, have a look at man Xquartz
.
What if you already have Mac OS Forge installation of X11 but want to go back to Apple's X11?
To avoid having to manually re-install your Mac OS Forge X11 after system software updates on Leopard 10.5.3 or above, you can revert to Apple's X11. How you do that depends on the Leopard version on your installation disk. For the most up-to-date instructions, look at the wiki. Here is what I did (on Lepard): start by installing the X11 and X11 SDK packages from that disk. If the disk has Leopard 10.5.0, you can get back to 10.5.4 (the current version as of this writing) by downloading and installing the Mac OS X 10.5.4 Combo Update. After that, perform a Software Update.
For Snow Leopard, I was forced to go back to XDarwin from MacOSForge because Apple's stock X11 had a window focus bug: Switching between X11 windows by using Apple's keyboard shortcut (Command-`) froze the X11 interface (unless you check 'Enable key equivalents' in the X11 preferences, which wasn't an option I wanted). So I now use the most recent beta version of XDarwin. One can set automatic updes for these beta relases as described here.
Install XCode 3
XCode is a development environment that provides (among many other things) the C++ compiler that will be used below to compile most of the open-source software that is available for the Mac. To get the most up-to-date version, it's best to check the Apple website, and look for XCode under 'Development Tools'. There are also additional compilers available for download as 'XCode Legacy Tools'. These encompass older versions of gcc which may be needed to compile some older software.
During the XCode installation for OS versions below 10.3, don't overlook theX11 SDK
package, which is needed if you want to compile programs that rely on X11 headers. This is the case for the ghostscript
fink package that I maintain. In order to get the XCode Installer to provide this and other added material, make sure to click Customize to get to the window shown here:
Alternatively, you can also find the X11 SDK
in the 'Packages' folder on the XCode disk image. With OS X version 10.3, you won't have to worry about this anymore because the SDK is installed by default.
Although I have not been afflicted with it, others have reported a mysterious issue where - despite a seemingly successful installation - the required header files are not actually installed. To get an idea whether you have the development headers, type ls /usr/X11/include/fontconfig/
and verify that this outputs three files. If none of the above preseciptions give the desired result, it may be necessary to reinstall X11SDK.pkg
after zapping the installer's 'memory'as described here. Basically, you exectute the command sudo pkgutil --forget com.apple.pkg.X11SDKLeo
and perhaps some additional ones. This should be enough to convince the system that you don't have that package yet (it's removed from /Library/Receipts
), so it will really be reinstalled (this command works only on Leopard, not on Tiger). If you're having trouble with other installed packages and want to do the same thing, taking a look at /Library/Receipts/bom
may help you identify the suspect.
Finally, it may also be possible to fix the installation by following the uninstall instructions in the 'About' document accompanying the XCode installer, and then starting the installation from scratch.
'Leopard Seal of Approval' |
X11 Preferences
If you find at some point more than one X11 icon appearing in your Dock, this probably means you're setting the DISPLAY
variable in some initialization file. This information is now done automatically whenever a program tries to open X11 (via launchd
), so you should not set the DISPLAY
variable explicitly.
In Leopard's version of X11, there is a new Preference Click-through
which I enable, together with Emulate three-button mouse
(the other two menu items remain disabled).
If you're using The Gimp or Inkscape the X11 is crucial to have, and an important issue is the integration between the clipboards of Aqua and your X window manager. While some projects such as Gimp have already been equipped with this functionality under the older X11 versions (you can paste images into Gimp that have been copied into the Aqua pasteboard), others such as Inkscape can't handle pasting from the Aqua pasteboard yet, even with the new XQuartz. If you are having problems pasting into one of these applications, there is a setting in the X11 Preferences
(XQuartz 2.3.5) that you may have to change (Inkscape may now automatically do this for you): under Pasteboard
, un-check the option 'Update Pasteboard when CLIPBOARD changes'.
To make multi-windows programs such as Gimp more useable under X11, you may also want the focus to automatically jump to the window the mouse is hovering over. This 'focus follows mouse' behavior is obtained by setting defaults write org.x.x11 wm_ffm -bool true
.
You need to re-launch X11 for this change to become effective (under Tiger, the same thing is achieved with defaults write com.apple.x11 wm_ffm -bool true
).
Integrating X11 and Mac OS X
In xemacs
, gimp
and other applications, you may find that the X11 font sizes don't match those of the OS X fonts. To fix this, you have to change the variable defaultserverargs='
in /usr/X11/bin/startx
to defaultserverargs='-dpi 96'
. This is not needed under Tiger (where the corresponding file is located in /usr/X11R6/bin/startx
).
More and more X11 programs (e.g., gimp
) allow you to exchange not just text but also graphics back and forth with the OS X pasteboard. What if you want to write your own script such that it places a PDF image on the pasteboard? The command pbcopy
does this for text, but not reliably for graphics. In particular, for PDF format there is no way around writing a handmade tool. Here is an example that illustrates how to do this: if the image is called /Users/noeckel/plot.pdf
, you get it onto the pasteboard by typing the Terminal command lineosascript -e 'set the clipboard to (the POSIX file '/Users/noeckel/plot.pdf')'
To launch X11 programs, one usually types their name from a Terminal command line, e.g., xemacs&
(where the ampersand launches the application as a job and immediately returns control to the command line). Instead of this, one can easily wrap this execution shell statement in an AppleScript or other Mac-native interface, and thus create a double-clickable application using the shell executable.
To make such Droplet Applications, there are XDroplet Factory
and Platypus
. I highly recomment Platypus as a flexible but simple framework for wrapping scripts. For very simple scripts on Leopard, I've adopted a do-it-yourself approach. An example of how to make your own droplet using Applescript
is given on a separate page.
Permissions and 'Applications downloaded from internet'
If you have more than one user on the system, there is an annoying side effect for Applications downloaded by one (admin) user when opened by another account: the other user will have only read access and this seems to trigger a security warning asking you to confirm that you want to run this 'Applications downloaded from internet'. This warning re-appears everytime you open the Application, unless you log in as an admin and set the privileges for that Application to Reaad & Write for the affected account.
Changing default shell
To change the default terminal shell for a user, right-click (after you've enabled that right mouse button) on the user's icon in the Accounts
system preference pane, and choose Advanced
. This replaces the NetInfo ManagerUtility from earlier OS X versions.
Middle mouse button
This is not specific to Leopard, as it relates to X11 and the middle-mouse button: if you have a three-button mouse and the middle mouse button pops up the Application Picker (the Dashboard-like icon list you also get with CMD-Tab), then you should change the function of Button 3 to what X11 expects it to be: Button 3. One would assume that this can be changed in the System Preferences, but you may be unable to locate the corresponding panel if the mouse you're using is from a third party: I haven't had this problem with Kensington (its driver software allows full customization), but with Logitech and Wacom mice. For the latter, the middle-mouse configuration only shows up in Mouse Preferences
when you plug in an Apple Mighty Mouse. Fortunately, once the setting is changed for the Mighty Mouse, it also works for other three-button mice. Of course, don't forget to also change the right-mouse button away from its default setting (which is: to do the same as the left button).