[Solaris x86 FAQ] 8. X Windows (Solaris x86 FAQ)

(8.0) X Windows

(8.1) How do I find a Solaris video driver for my graphics card?

First look in the HCL for your release of Solaris to see if your graphics card is supported. Having a supported graphics card on the HCL is very important--more important than a supported motherboard. If the adapter's not listed, look for a driver from these sources:

During installation, if you have a unsupported video card, be sure to bypass kdmconfig with the F4 key. Use type 4, "Solaris Interactive Text (Console session)," for Solaris 10 and the "Software 1 of 2" CD for Solaris 8 or 9.

[Thanks to Paul Karagianis for NVida info]

(8.2)How do I install the Xorg video drivers?

Beginning with Solaris 10, all Xorg drivers are included with Solaris. The old "Video Drivers Porting Kit" is no longer needed. Xorg drivers are also available with the current Solaris 9 Update release.

(8.3) How do I configure Xorg on Solaris?

First use /usr/openwin/bin/kdmconfig to select Xorg instead of Xsun. Run /usr/X11R6/bin/xorgconfig to configure Xorg, which asks questions and creates file /etc/X11/xorg.conf View errors, if any, in /var/log/Xorg.0.log. Try the generic "VESA driver" (which uses the BIOS) if the driver you picked didn't work. You may also (carefully) edit /etc/X11/xorg.conf directly (save the original file first). To start the X server manually, use /usr/X11R6/bin/xinit

(8.4) How do I configure 64K colors for XSun/CDE?

Solaris' kdmconfig offers only a choice of 256 or 16M colors for your graphics board with XSun. To configure XSun to use 16-bit color, configure using kdmconfig for the desired resolution in 256 color mode. Note the board line from file /etc/openwin/server/etc/OWconfig. Look in the referenced file in directory /usr/openwin/share/etc/devdata/SUNWaccel/boards to see if there is support for 16-bit color mode for your card.

If your board is listed, edit file /etc/openwin/server/etc/OWconfig and change defdepth="8" to defdepth="16" in it. Also, values for MaxPClk for some cards are way too low in 16-bit and 24-bit modes in file /usr/openwin/share/etc/devdata/SUNWaccel/boards. But if you want to change this, you are doing it on your own risk. Some applications hang on 16-bit colors.

The CDE logo that is displayed after one logs in is a bit-mapped grayscale image(!?), but everything else should work just fine.

[Thanks to Aleksandar Milivojevic, by way of John Groenveld]

(8.5) How do I Add KDE, FVWM, or other non-CDE/GNOME Window Mangers to the dtlogin screen?

KDE The easiest way to add substitute KDE for CDE is to add an "exec /path/to/kde" statement in your $HOME/.dtprofile file.

To add a KDE selection to the dtlogin screen (in addition to the usual command-line, OpenWindows, or CDE choices), follow one or both of these links:

FVWM The instructions are for FVWM, but apply to any window manager, such as KDE, AfterStep, WindowMaker, or Enlightenment. Be aware that these new WMs usually take a bigger memory footprint.

(8.6) Where can I get GNOME or KDE packages for Solaris/x86?

GNOME is available with Solaris 9 and above. KDE is available with the Solaris Companion CD. They are also available on the web for download.

For information about GNOME on Solaris or for a free download, see For information on GNOME, see

For general KDE information, see When installing KDE, make sure to install the QT library first, which is required by KDE.

Which is better? "Religious" wars could be fought over this question. KDE has a more familiar M$ windows-like interface, and I used to use it. I use GNOME now since it's most easily available on both Solaris and Linux. KDE is more mature than GNOME and more tightly integrated, but some say GNOME is catching up. GNOME and Mozilla both use the C-based GTK library. The C++-based QT library, required by KDE, used to have stricter licensing restrictions, but now it's licensed under GPL (not LGPL). KDE is endorsed and supported by IBM, Caldera, and SuSE. GNOME is endorsed and supported by Sun (and RedHat and HP). I recommend installing and trying out both GNOME and KDE for a test drive. You can have both installed at the same time and select which one to use with dtlogin. You can also run KDE apps under GNOME and vice versa.

Sun picked GNOME over KDE because of Qt licensing issues, CORBRA in GNOME, and because GNOME uses C and KDE uses C++ (the latter causes name mangling problems which prevents using different C++ compilers).

(8.7) After upgrading to Solaris 9 or installing GNOME, GNOME does not appear in the dtlogin menu. How can I fix this?

Check what your LANG variable is set to (AFTER logging in to CDE). If it's not "C", you need to copy the GNOME dtlogin resource files to your current locale. Type this command, as root (1 line):
cp /usr/dt/config/C/Xresources.d/Xresource.Sun-gnome-2.0* /usr/dt/config/$LANG/Xresouces.d
(where $LANG is you current locale) For example:
cp /usr/dt/config/C/Xresources.d/Xresource.Sun-gnome-2.0* /usr/dt/config/en_US.ISO8859-15/Xresouces.d

If you have trouble AFTER logging into a GNOME session, check these:

(8.8) Are TrueType fonts supported in Solaris?

Yes, Xsun supports them. Use the Font Administrator GUI, /usr/dt/bin/sdtfontadm, to add them to the server's list of fonts. See also

[Thanks to Tran Tran]

(8.9) After installing and booting Solaris I get this message: "The X-server can not be started on display :0"

Your video or mouse settings are probably incorrect or a video card or mouse was not detected at all. Check the log files to be sure (/var/log/Xorg.0.log if using Xorg or /var/log/Xsun.0.log if using Xsun with a XF86/Xorg driver). First login in text mode and check /var/dt/Xerrors for error messages. If nothing obvious is there, run kdmconfig and try a simpler video setting (plain VGA, low resolution). Once that works, try higher-resolution settings and other drivers. Also try using the Xorg video drivers instead of XSun (see a previous question on configuring with Xorg drivers).

(8.10) How do I disable CDE auto-start upon booting multi-user?

Boot single-user and run dtconfig(1). That is, at the booting Solaris prompt, type "b -s" After entering your root password, mount /usr and run "/usr/dt/bin/dtconfig -d"

[Thanks to John Groenveld]

(8.11) How do I su(1) to another user and run an X application?

You need to set your $DISPLAY and allow others to use your console. If you don't, you get a message like "Can't open display". By default, only the user who logged in on console can connect to the display.

To allow another user to connect there are two ways - one easy and one secure (unfortunately, you can't have both):

Easy: As user logged in on console run "xhost +LOCAL:" (This gives permission to connect to the display to anyone logged in on the machine—this includes being able to open windows, read your keystrokes, send keystrokes, etc. Obviously not a good idea if you have other users on the system you don't trust completely.) Starting with Solaris 10, you can also use this safer, more-restrictive format: xhost xhost +si:localuser:username For example: xhost +si:localuser:root

As any other user logged in on the box, run "setenv DISPLAY :0" or "DISPLAY=:0; export DISPLAY", depending on your shell type. This all assumes you're connecting from the same host, for a remote host, change to "xhost +other-hostname" and "setenv DISPLAY PutYourHostnameHere:0"

Safe: As user logged in on console run "xauth list" Look for the line for your hostname followed by ":0" and copy it. As the user you want to grant access to run "xauth" and at the xauth> prompt type "add " and paste the line you copied. Now "setenv DISPLAY hostname:0", making sure you match the way it was listed in the line you copied and pasted.

Easier variation of safe method for special cases: If the other user you want to access your screen is root, and your home directory is either local or on an NFS filesystem exported with root permissions, just have root do this:
setenv XAUTHORITY /home/myuserid/.Xauthority ; setenv DISPLAY :0
(replace "/home/myuserid" with your actual home directory).

[Thanks to Alan Coopersmith]

(8.12) Does Solaris x86 support multiple heads?

Yes, with Xorg. Xsun supports multiple heads only for Sun Ray workstations. A commercial X server from Xi graphics, also supports multiple heads.

[Thanks to John Groenveld, Alan Coopersmith]

(8.13) How do I get my 2-button mouse to emulate 3 buttons?

In Solaris 8, "kdmconfig" will autodetect a two-button PS/2 mouse, so you may never look in the "change pointing device" section. You need to go in there, and change it from "PS/2 Mouse (2 Button)" to "PS/2 Mouse (2 Button+100ms 3 Button Emulation)"

[Thanks to Philip Brown]

(8.14)How do I get some older Solaris GUI's to run with Xorg?

Some applications are configured to use Sun's proprietary F3 fonts. The work-around is to run Sun font server, xfs(1), and to prefix Xorg's FontPath with it.

(8.15) Can I use an old Sun monitor with a 13W3 connector with a VGA adaptor card?

Yes. You need an adaptor. Get a 13W3 female to DB-15HD (VGA) male adaptor to connect a Sun monitor to a PC VGA adaptor port. Make sure to get the 13W3 female adaptor (the more-common male adaptor is for connecting PC-style VGA monitors to Sun video ports).



I Boot OpenSolaris [Blue Ribbon]   This web page is not associated with Oracle Corporation. [Legal Stuff]


If you have questions or comments, please send a message to Dan Anderson.