X server
That section contains SOME useful information about X servers.
==
WHAT I DID:
1. Run command
/usr/openwin/bin/kdmconfig
it will offer X server Selection: 'Xorg server' or 'Xsun server', choose 'Xorg server'. On next screen it will provide short instructions for configuring the Xorg Server:
(1) Create an xorg.conf file with one of these commands: /usr/X11/bin/Xorg -configure, or /usr/X11/bin/xorgconfig, or /usr/X11/bin/xorgcfg (2) Edit the resultant xorg.conf file with any changes needed (3) Move the xorg.conf file to /etc/X11/xorg.conf
For more details about Xorg configuration, refer to the Xorg man pages in /usr/X11/man. This directory is not in the default man page path, so to view these pages, use one of these options: (1) Add this directory to the MANPATH environment variable setting. (2) Use the "-M /usr/X11/man" option of the man command.
Note, Xorg command line options may override xorg.conf settings.
2. Run command
/usr/X11/bin/xorgconfig
and give following answers when asked:
Enter a protocol number: 1 <enter> Do you want to enable Emulate3Buttons? n <enter> Mouse device: <enter> Enter a number to choose the keyboard. Press enter for the next page 8 <enter> Enter a number to choose the country. Press enter for the next page 1 <enter> Please enter a variant name for 'us' layout. Or just press enter for default variant <enter> Do you want to select additional XKB options (group switcher, group indicator, etc.)? n <enter> You must indicate the horizontal sync range of your monitor.... (clon04:0.0 has 81.1kHz/76Hz 1280x1024 mode) Enter your choice (1-11): 10 <enter> <--- that was "31.5 - 82.0; Monitor that can do 1280x1024 @ 76 Hz" You must indicate the vertical sync range of your monitor.... Enter your choice: 2 <enter> <--- that was "50-90" Enter an identifier for your monitor definition: <enter> Now we must configure video card specific settings.... Do you want to look at the card database? y <enter> Enter a number to choose the corresponding card definition. Press enter for the next page, q to continue configuration. q <enter> How much video memory do you have on your video card: Enter your choice: 10 <enter> <--- that was "10 131072K", we have 128MB Enter an identifier for your video card definition: FX560 <enter> Please specify which color depth you want to use by default: Enter a number to choose the default depth. 5 <enter> <--- that was "5 24 bits (16 million colors)" Shall I write it to /etc/X11/xorg.conf? y <enter> File has been written. Take a look at it before starting an X server. Note that the xorg.conf file must be in one of the directories searched by the server (e.g. /etc/X11) in order to be used. Within the server press ctrl, alt and '+' simultaneously to cycle video resolutions. Pressing ctrl, alt and backspace simultaneously immediately exits the server (use if the monitor doesn't sync for a particular mode). For further configuration, refer to the xorg.conf(4) manual page.
Produced file is crapp !!!!!!
Found that solaris itseld produces following files during reboot:
/etc/X11/.video.devs /etc/X11/.xorg.conf
and contents of those files looks reasonable.
--- --- ---
To configure Solaris for dual monitors, follow these steps:
1. Install the two video cards you intend to use, attach monitors to the cards, and boot the system.
Note - X-windows may not start, initially, due to the change in configuration.
The system outputs to PCI-E slot 2 (lower slot) until X-windows comes up.
2. When the system boots, insert the Tools and Drivers CD, and change directory to the following location:
/cdrom/<T&D_disk_name>/drivers/solx86
3. Run the install.sh and the dual_monitor.sh scripts.
4. Reboot the system.
The dual monitors should come up.
5. To change from Clone to Xinerama modes, edit the file /etc/X11/xorg.conf and turn the appropriate settings in the file on or off.
Note - The top card is at PCI address (2,0,0) and the bottom is at (7,0,0).
An example xorg.conf file is shown below:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig # nvidia-xconfig: version 1.0 (buildmeister@builder26) Mon Oct 16 22:13:48 PDT 2006 # XFree86 4 configuration created by pyxf86config #Section "ServerLayout" # Identifier "Default Layout" # Screen 0 "Screen0" 0 0 # InputDevice "Mouse0" "CorePointer" # InputDevice "Keyboard0" "CoreKeyboard" #EndSection Section "ServerLayout" Identifier "Default Layout" Screen 0 "Screen 0" Screen 1 "Screen 1" RightOf "Screen 0" # Screen 2 "Screen 2" LeftOf "Screen 1" InputDevice "Mouse0" "CorePointer" InputDevice "Keyboard0" "CoreKeyboard" EndSection Section "Files" # RgbPath is the location of the RGB database. Note, this is the name of the # file minus the extension (like ".txt" or ".db"). There is normally # no need to change the default. # Multiple FontPath entries are allowed (they are concatenated together) # By default, Red Hat 6.0 and later now use a font server independent of # the X server to render fonts. RgbPath "/usr/X11R6/lib/X11/rgb" FontPath "unix/:7100" EndSection Section "Module" Load "dbe" Load "extmod" Load "fbdevhw" Load "glx" Load "record" Load "freetype" Load "type1" EndSection Section "InputDevice" # Specify which keyboard LEDs can be user-controlled (eg, with xset(1)) # Option "Xleds" "1 2 3" # To disable the XKEYBOARD extension, uncomment XkbDisable. # Option "XkbDisable" # To customise the XKB settings to suit your keyboard, modify the # lines below (which are the defaults). For example, for a non-U.S. # keyboard, you will probably want to use: # Option "XkbModel" "pc102" # If you have a US Microsoft Natural keyboard, you can use: # Option "XkbModel" "microsoft" # # Then to change the language, change the Layout setting. # For example, a german layout can be obtained with: # Option "XkbLayout" "de" # or: # Option "XkbLayout" "de" # Option "XkbVariant" "nodeadkeys" # # If you'd like to switch the positions of your capslock and # control keys, use: # Option "XkbOptions" "ctrl:swapcaps" # Or if you just want both to be control, use: # Option "XkbOptions" "ctrl:nocaps" # Identifier "Keyboard0" Driver "kbd" Option "XkbModel" "pc105" Option "XkbLayout" "us" EndSection Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "IMPS/2" Option "Device" "/dev/input/mice" Option "ZAxisMapping" "4 5" Option "Emulate3Buttons" "yes" EndSection Section "Monitor" Identifier "Monitor0" VendorName "Monitor Vendor" ModelName "Unprobed Monitor" HorizSync 31.5 - 67.0 VertRefresh 50.0 - 75.0 Option "dpms" EndSection Section "Monitor" Identifier "Monitor1" VendorName "Sun Microsystems" ModelName "X7198A" HorizSync 31.5 - 67.0 VertRefresh 50.0 - 75.0 Option "dpms" EndSection Section "Device" Identifier "Videocard0" Driver "nvidia" VendorName "Videocard vendor" BoardName "VESA driver (generic)" BusID "PCI:2:0:0" EndSection Section "Device" Identifier "Videocard1" Driver "nvidia" VendorName "Videocard vendor" BoardName "VESA driver (generic)" BusID "PCI:7:0:0" EndSection Section "Screen" Identifier "Screen 0" Device "Videocard0" Monitor "Monitor0" DefaultDepth 24 Option "TwinView" "True" Option "TwinViewOrientation" "LeftOf" Option "UseEdidFreqs" "True" Option "MetaModes" "800x600,800x600" SubSection "Display" Viewport 0 0 Depth 24 Modes "800x600" "640x480" EndSubSection EndSection Section "Screen" Identifier "Screen 1" Device "Videocard1" Monitor "Monitor1" DefaultDepth 24 Option "TwinView" "True" Option "TwinViewOrientation" "LeftOf" Option "UseEdidFreqs" "True" Option "MetaModes" "1024x768, 1024x768" SubSection "Display" Viewport 0 0 Depth 24 Modes "800x600" "640x480" EndSubSection EndSection
====
(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:
* Solaris 10 comes with both X.org Xserver software and the original XSun software. Xorg is open source software available for multiple UNIX/BSD/Linux-based platforms. Xorg supports more video adapters and supports them better than XSun.
* http://developers.Sun.COM/ may have newer drivers for your release.
* Some video drivers may be bundled (hidden) with Solaris Recommended Update Patches.
* Consider 3rd-party drivers. XiGraphics, http://www.xig.com/, is especially recommended if you have a laptop. The nVidia video drivers are at http://www.nvidia.com/object/unix.html
* Finally, if all else fails, see the question below on installing Xorg on Solaris. Personally, it's a lot easier to use a card supported by Xsun than to install Xorg.
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:
* http://www.tiem.utk.edu/~peek/solaris/ written by Michael Peek * http://twirl.mcc.ac.uk/~zzassgl/wm.html written by Geoff Lane
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 http://www.sun.com/gnome/ For information on GNOME, see http://www.gnome.org/
For general KDE information, see http://www.kde.org/ 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:
* If you define $LD_LIBRARY_PATH, make sure /usr/lib and /opt/sfw/lib are at the beginning. E.g., /usr/lib:/opt/sfw/lib:/usr/local/lib * Rename your ~/.xinitrc file to something else (e.g., ~/.xinitrc.old). * Erase your GNOME configuration files: /usr/bin/gnome-cleanup * For more tips, see the GNOME 2.0 Desktop for the Solaris O. E. Troubleshooting Guide at http://docs.sun.com/
(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 http://www.bolthole.com/solaris/verdana.font.txt
[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, http://www.xig.com/ 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).
====
What does :0.0 mean?
The :0.0 part of the DISPLAY variable denote the display and the screen of an X server.
The display is the first number and equals to a running instance of an X server. If it is using TCP/IP for communication it listens on port 6000 + display-number for connections. With local (UNIX domain sockets) it uses the socket /tmp/.X11-unix/Xdisplay-number
The screen denotes different output devices of the X server. You could start XWin.exe with two -screen options and would end up with two X11 windows. Each of them is a different screen. Other X servers open different screens for different monitors connected to the computer.
Cygwin/X supports different formats of the DISPLAY variable
:0.0 or unix:0.0 This names a local X server and the communication uses the UNIX domain sockets.
hostname:0.0 This names a remote X server and the communication uses the TCP/IP network.
======
Cygwin:
Xlib: connection to "local_host_name_or_ip_address:0.0" refused by server Xlib: Maximum number of clients reached
Cygwin/X queries getdtablesize () for the maximum number of client connections allowed; by default Cygwin returns 32 from getdtablesize (). Cygwin/X Server Test Series release Test44, released on 2001-08-15, changes the maximum number of clients from 32 to 1024 by passing the square of getdtablesize () to setdtablesize ().
Solaris:
It's in the FAQ, naturally: 3.57) How can I have more than 128 X windows clients? When you get the following errors, you've run out of X sockets. Xlib: connection to :0.0 refused by server Xlib: maximum number of clients reached By default, the X server has a limit of just 128. In order to increase this limit, you need to run at least Solaris 8 or an earlier release with the Xserver patch applies that fixes bug: 4185418 the X server should support more connections Then change the Xservers configuration file and add the "-clients 1024" option to the X commandline. Since I'm running Solaris 8, I can change max clients.