SUMMARY: X windows with Solaris and Mac OS X through ssh

From: Jim Winkle <>
Date: Mon Jul 19 2004 - 16:15:40 EDT
Background: The CDE session manager on Solaris would not display on Mac
OS X using ssh... only individual X apps worked.  Many thanks to Bill Cole,
who came up with the solution, and others who had helpful suggestions.
Many others were interested in the solution.

It's not perfect -- font problems, window resize and window moving is ugly --
but good enough for me. Turns out it was a Mac issue, and here's the
executive summary:
     My-Mac % export DISPLAY=:0.0
     My-Mac % /usr/X11R6/bin/Xquartz -xinerama&
     My-Mac % ssh -X remote-host
     remote-host % Xsession&

Here's the solution from Bill, complete with his explanation:
It doesn't 'just work' because the MacOS X X11 application rolls together an
X server called Xquartz and a window manager called 'quartz-wm' that is
tightly integrated to the MacOS native desktop. Xsession can toss the splash
screen (aka 'dthello') and start to set up the normal CDE environment, but
when it come time for the key piece it fails: dtwm chokes.

The choke is on two levels. First, on a single-screen Mac (and maybe on
multi-screen ones as well, but I can't test...) the Xquartz server is
started without Xinerama support, but dtwm can't be made (as far as I've
been able to find) to not try to use the Xinerama extensions. On top of
that, window managers are special and NO window manager will take over a Mac
running the normal X11 application because that includes quartz-wm.

The solution is not for the command-line-phobic, but is pretty simple once
you waste an afternoon working it out. The following all presumes a
Bourne-like default shell, and on Panther that will be bash for most

Open up a terminal window on the Mac, and start Xquartz yourself with
Xinerama support:

     export DISPLAY
     /usr/X11R6/bin/Xquartz -xinerama

Xquartz should answer with a happy bit of diagnostic:

    XFree86 Version 4.3.0 / X Window System
    (protocol Version 11, revision 0, vendor release 6600)
    [DRI] screen 0 installation complete
    Screen 0 added: 1056x770 @ (0,22)
    Screen 0 placed at X11 coordinate (0,0).

The user can then minimize that terminal window and use another to do the
normal ssh -X and run Xsession on the Solaris box. To kill Xquartz, the user
can just ^C in that terminal window. Xquartz will also put an icon into the
dock, and clicking on it will switch the user into the X screen. Switching
back out of the X screen requires that Apple's 'Expose' is turned on, making
the various screen corners do wild things with windows that give the user
something to click on that isn't part of the dtwm root.

Since I've just worked this out this afternoon, I don't know if it is safe
to background/nohup/detach Xquartz so that it acts like a daemon, but I
expect that would pose few problems.
Here's the original message:
Don't know if this is a Solaris or Mac OS X issue, but the error message
is showing up on Solaris (ya gotta love integration problems)....

A user on my Solaris 8 system has a Macintosh on their desk running 10.3.4.
He starts X11 on his Mac, and successfully connects to Solaris through
xterm using 'ssh -X'. The DISPLAY is correct (like localhost:11.0), and he
can successfully run individual X applications that display on his Mac. So
far, so good.

However, he can't run the whole session manager. When he tries running
/usr/dt/bin/dtsession, he receives the following error:

    X Error of failed request:  BadWindow (invalid Window parameter)
      Major opcode of failed request:  128 (XINERAMA)
      Minor opcode of failed request:  2 (XINERAMAGetScreenCount)
      Resource id in failed request:  0x0
      Serial number of failed request:  116
      Current serial number in output stream:  116

When he tries running /usr/dt/bin/Xsession, he sees:
    Starting the
    Common Desktop Environment
    CDE Version 1.4

with the Solaris welcome splashpage and an hourglass. This splash page stays
up for four minutes, then disappears.

Miscellany: I can replicate all of this on another Mac, whether or not I'm using
full screen mode in Mac X11. The version of OpenSSH is 3.7.1p1 on the Solaris box.
This kind of thing works just fine under Windows (using SecureCRT for X forwarding
and an X Server).

If anyone has gotten Mac OS X to run the session manager on Solaris in this way,
or has any suggestions, please let me know. I'll definately post a summary for
future googlers.

-- Jim
sunmanagers mailing list
Received on Mon Jul 19 16:15:56 2004

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:35 EST