XF86 3.3x X Windows System


Table of Contents


Introduction

Security Issues: xf86(4)

Unix/BSDs provide a great sturdy platform for running services that just need to be "going and going and ..." For this type of environment the Windowing Graphical User Interface is mostly unnecessary (or maybe totally unnecessary.) But a Win GUI augments the tough exterior of the sturdy server with a more approachable look for those new to Unix/BSDs who are used to a desktop environment (ala MS Windows.) OpenBSD is as adept as other *NIX systems in displaying a nice gui and a flexible GUI provides a platform for non-*NIX people to be introduced to, operate and maintain the general configurations of a a secure OpenBSD box.

These instructions were tested in OpenBSD 2.6, 2.7 where the kde installation was to /opt/kde and XFree86 3.3.x was the only X around (kind of).

When all else fails, consult the extensive documentation provided with XFree86 (copied onto your hard-drive at /usr/X11R6/lib/X11/doc)

Installing needed X-Files

files: included as part of base files (2.x/ARCH)

If you did not include the X Windows during the system installation, you can manually extract the files. The distribution files are xbase[26|27].tgz, xserv[26|27].tgz, and xshare[26|27].tgz. From the root directory / untar the files and then configure ld to look for the X libraries that you have newly installed.

# cd /
# tar -zxf /[path-to-x]/xbase##.tgz
# tar -zxf /[path-to-x]/xfont##.tgz
# tar -zxf /[path-to-x]/xlink ##.tgz
# tar -zxf /[path-to-x]/xserv##.tgz
# tar -zxf /[path-to-x]/xshare##.tgz
# ldconfig -m /usr/X11R6/lib

You may also wish to include the new X, bin directory into your path /usr/X11R6/bin.

Allowing X to run (kernel config)

[ref: xf86(4), /usr/X11R6/lib/X11/doc]
File: /etc/sysctl.conf

To allow the X11 server to start, the following option needs to be allowed. This option will have been set for you if you answered yes during installation that you intend to install X.

File: /etc/sysctl.conf

#machdep.allowaperture=1

To read:

machdep.allowaperture=1

If you need to make the changes above, you will need to restart the computer for the kernel configuration to take effect.

Depending on your Video Card, you may need to set the value to 2. If the above does not work for you, review the notes on the video card.

Determining your System Configuration

Utility: SuperProbe
[Ref: /dev/MAKEDEV]
[Ref: /usr/X11R6/lib/X11/doc/README.* (various files on configuration the mouse,and videochips)]

To configure, initialise X for your system you will need to know a few details about the hardware on which you are installing X. The basic information is regarding the display devices (video card, monitor) and the mouse (pointing device.)

Video Card:

/usr/X11R6/bin/SuperProbe will interrogate your video card to give you details required during configuration. The output from the program will include the following items you should write down.

First video: **
Chipset: **
Memory:  **
RAMDAC:  **

Example 1: Micron Millenia Pro2 with a Diamond Stealth 3D 2000 the output is:

# /usr/X11R6/bin/SuperProbe

[ SuperProbe displays the following ...]
[ ... stuff cut out ... ]
First video: Super-VGA
Chipset: S3 ViRGE (PCI Probed)
Memory:  4096 Kbytes
RAMDAC:  Generic 8-bit pseudo-color DAC
         (with 6-bit wide lookup tables (or in 6-bit mode))

Additional documentation on configuring this card (chipset) can be found in /usr/X11R6/lib/X11/doc/README.S3V

Example 2: Compaq Prolinea 575e with built-in video (?)

# /usr/X11R6/bin/SuperProbe

[ SuperProbe displays the following ...]

 

[ ... stuff cut out ... ]


First video: Super-VGA
Chipset: Cirrus CL-GD5434 (PCI Probed)
Memory:  1024 Kbytes
RAMDAC:  Cirrus Logic Built-in 15/16/24-bit DAC
         (with 6-bit wide lookup tables (or in 6-bit mode))

Additional documentation on configuring this card (chipset) can be found in /usr/X11R6/lib/X11/doc/README.cirrus

Mouse:

In OpenBSD [2.6|2.7|2.8] the standard i386 configuration uses the following devices for your pointing device (mouse) [ref: /dev/MAKEDEV]. The device definitions below use an asterix (*) to designate where the unit number should be placed (eg. mms* would be replaced by mms0 or mms1 etc.)

/dev/mms* Microsoft bus mouse
/dev/lms* Logitech bus mouse
/dev/pms* PS/2 Mouse
/dev/tty* Serial Port where serial mice could be placed.
/dev/mouse (A link you create to whichever device above actually holds your mouse.)

With OpenBSD 2.9, the generic Mouse device wsmouse is used minimising the amount of work.

Example 1, Micron Millenia Pro2 using a serial mouse plugged into the DOS labelled Serial Port A, this means that the Serial Mouse is connected to /dev/tty00 so I use the following command to link /dev/mouse to /dev/tty00. Note: A ps/2 mouse port exists but I only had a serial mouse, which was plugged into the serial port.

# ln -fs /dev/tty00 /dev/mouse

With OpenBSD 2.9 onwards if the mouse is detected by the OS it will be as /dev/wsmouse0

Example 2: Compaq Prolinea 575e where I use a PS/2 mouse on the motherboard ps/2 mouse slot, this means that the mouse is connected to /dev/pms0 so I use the following command to link /dev/mouse to /dev/pms0

# ln -fs /dev/pms0 /dev/mouse

With OpenBSD 2.9 onwards if the mouse is detected by the OS it will be as /dev/wsmouse0

Example 3: Toshiba Satellite Pro 4600 where I use the J-stick device and a USB Mouse. In OpenBSD 3.0 Dmesg shows that the two devices have been detected:

pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
ums0 at uhub0 port 1 configuration 1 interface 0
ums0: Microsoft Microsoft IntelliMouse\M-. Optical, rev 1.10/1.21, addr 2, iclass 3/1
ums0: 5 buttons and Z dir.
wsmouse1 at ums0 mux 0

The mouse device (J-stick) connected on the PS/2 Port (pmsi0) has been assigned to wsmouse0. The USB Mouse, which it even detects as a Microsoft IntelliMouse, connected on the USB Port (uhub0 port 1) has been assigned to wsmouse1.

Now, when configuring X in XFree86 3.3.x OpenBSD 2.6|2.7|2.8 I can just say that the mouse is /dev/mouse, regardless of what options it gives.

Is there any advantage to creating the /dev/mouse link ? In my limited experience using OpenBSD 2.6|2.7|2.8 the /dev/mouse link lets me use the mouse with the XF86Setup program. Without the /dev/mouse link the auto-detect routines in XF86Setup often do not find the mouse and using the keyboard to navigate XF86Setup is not an easy task.

With OpenBSD 2.9|3.0 the wsmouse device is automatically detected by the GUI installation programs.

Configuring the base X environment

[Ref: /usr/X11R6/lib/X11/doc/QuickStart.doc]
Utility: XF86Setup, xf86config

When X Windows starts it is going to look for its configuration file at: /etc/XF86Config. We create the file through using one of two programs XF86Setup or xf86config.  Either program will be asking questions that include a request for the information collected above (Video, Mouse).

XF86Setup uses a windowing environment for configuring X.

xf86config is a very terse installation process, but is readily accessible from the keyboard with no need for the mouse.

Both programs cover a step-by-step process of asking you to verify/specify the devices you have on your computer that X will use. More details on this process is covered in the QuickStart.doc (see above for location of the file.)

If the graphical XF86Setup doesn't work well for you, then use xf86config in one terminal (eg. Ctrl+Alt+F1) and open up QuickStart.doc in another screen (Ctrl+Alt+F2). You can then use the QuickStart as an active step-by-step guide to creating the XF86Config file.

XFree86 rev 4.x

For XFree86 rev 4.x you can use the xf86cfg program which is similar to xf86config in behaviour. I've only had experience with installing 4.x on a laptop (where xf86cfg would not work until after I'd manually configured an XF86Config file, shown later below.)


Example: Pentium II, Intel EtherExpress 3D AGP Card

System: Pentium II Iwill Motherboard
Video Card: Intel Ether Express 3D AGP Video Card
Video Monitor: 17" SVGA
Pointing Device: PS/2 Mouse

For some reason XF86Setup doesn't recognise the mouse

on Screen 1 (Ctrl+Alt+F1) login and start xf86config:

OpenBSD/i386 (myhostname) (ttyC0)

login: root
password:

 

/root # xf86config

[ . . . xf86config will display . . . ]

This program will create a basic XF86Config File, based on menu selections you make

 

[ . . . stuff cut-out . . . ]

on Screen 2 (Ctl+Alt+F2) login and load the QuickStart.doc:

OpenBSD/i386 (myhostname) (ttyC1)

login: myuserid
password:

 

myuserid $ less /usr/X11R6/lib/X11/doc/QuickStart.doc

[ . . . less will display . . . ]

Joe Moss

27 February 1998

Abstract

 

[ . . . stuff cut-out . . . ]

Scroll through the documentation to the xf86config section:

4. Running xf86config

 

From a text screen, run the xf86config program. ...

On Screen 1. Follow the directions on Screen 2 (Ctrl+Alt+F2) answer the questions on Screen 1 (Ctrl+Alt+F1)

We begin the bombardment of questions from xf86config

* Mouse Type ?
  > I pick the PS/2 Mouse (QuickStart 4.3)

* I'm asked further questions which I ignore until I am asked about the Mouse Device
  > I pick /dev/mouse (because I've configured it earlier as in the above notes)

* Keyboard settings ?
  > I just accept the defaults by hitting <Enter> according to
  > (QuickStart 4.4)

* Monitor characteristics
  > You might get in trouble using my settings, so double-check
  > (QuickStart 4.5)

* Graphics Card ?
   > because I don't know how to answer this I'll use the card database
   > (QuickStart 4.6)

* Which X Server to use
   > When I picked the card from the database it gave me the suggested server
   > so I use the suggested server
   > (QuickStart 4.7)

* How much memory I have on the card (I have 8MB)
   > I manually specify how much RAM I have.
   > (QuickStart 4.8)

* What Type of RAMDAC/ClockChips ?
   > I just skip this section for my system, check the documentation for your response.

* Run the probe to check the video configuration?
   > I don't run the probe.

* Select the Resolution ?
   > Look this one up in the notes
   > (QuickStart 4.9)

The rest is pretty much straight forward as per QuickStart documentation.

After completing the above xf86config, I now have a functional XF86Config file, but I hate it and want to 'tweak' a few things. I could dive into the /etc/XF86Config file or, now that it is working I can startup XF86Setup.

XF86Setup, now that it is working, let's me change the Resolution settings (somehow doing 640x480 has lost its appeal) and now I have a default setting of 16bit Colour using 1024 x 768. (As my dear friend would say, woo hooo)


Ready to Start

Starting:

Both setup programs should create a workable server, and you can test it by using the startx script.

# /usr/X11R6/bin/startx

Stopping:

To Get out of X, use Ctrl+Alt+Backspace

Testing:

Often, I screw up the resolution, or the color mode configuration. One simple way of starting X into a different configuration than that which is in the configuration file, is to use the following example.

To start X Window using 256 color mode:

# startx -- -bbp 8

To start X Window in true colour mode, use the following command

# startx -- -bbp 32

'startx' is a script to initialise services for the X Window environment which in the default OpenBSD configuration starts up a simple 'window manager' and a number of 'xterm' connections.

Configuring .xinitrc

[ref: Red Hat Linux Administrator's Handbook 2nd ed. Mohammed J. Kabir]

To allow user customisation, the startx script looks for system wide files and their corresponding version in the user home directory. If the user files are not found then the global version is used, otherwise the local user version is used. In this way, your users can have their own custom visual displays when they start up in X Window.

The global configuration files are xserverrc and xinitrc. The user custom versions are ~/.xserverrc and ~/.xinitrc

xserverrc or ~/.xserverrc contain details of which X servers to start, while

xinitrc or ~/.xinitrc contain details of which client applications are going to be run after the X Window system has started. When the script exits, the X server is also terminated.

File: ~/.xinitrc

#!/bin/sh
export PATH=$PATH:/opt/kde/bin:/usr/X11R6/bin
/opt/kde/bin/startkde

After creating the above file, then you need to make the file executable by performing the following command.

$ cd ~

$ chmod a+x .xinitrc

Using xdm, the X display manager

[ref: rc.conf(8), xdm(1)]

To automatically start the machine with the X environment, configuration changes are made in the /etc/rc.conf.local file

To enable the X manager to begin on startup, create or change options in Section 1 of the /etc/rc.conf.local file

Edit the File: /etc/rc.conf.local and add a line that reads as follows in Section 1:

xdm_flags=""  # note the use of two double-quotes

The above setting will override the general settings in /etc/rc.conf which reads as follows:

xdm_flags=NO

When you restart your machine, xdm will start and greet you with a dialog prompt for your username and password.

One mail discussion recommends that you should use xdm_flags="-udpPort 0" to stop xdm from listening to the Network.

From the man pages

-udpPort port_number
Specifies the value for the DisplayManager.request­Port resource. This sets the port-number which xdm will monitor for XDMCP requests. As XDMCP uses the registered well-known UDP port 177, this resource should not be changed except for debugging. If set to 0 xdm will not listen for XDMCP or Chooser requests.

Quick Troubleshoot - mouse not working

[ref: /usr/X11R6/lib/X11/doc/README.mouse]
[ref: /dev/MAKEDEV]

If starting X there is no mouse, you may find it easier to edit the /etc/XF86Config file directly instead of re-running the configuration programs. The /etc/XF86Config file is separated into different sections relating to providing information for X on the hardware and file locations.

Section "Pointer" specifies the details of what X is to search for to find about your mouse (pointing device) and it's hardware location. The important parameters here are:-

Protocol "Microsoft"
Device "/dev/mouse"

If you are not using a Microsoft Mouse compatible mouse, then you can make the change here if you know what 'protocol' your mouse is using [ref: README.mouse]. The Device section is where I've had previous problems with the mouse and changing it here to:  Device "/dev/pms0" or which ever port the device is connected is faster than having to re-run xf86config (where a mistake in the menus can cause other problems.)

KDE X window manager and OpenBSD 2.7

ftp://ftp.kde.org – location for latest release http://www.kde.org website to find mirrors to the folder.

Unfortunately I couldn't get the packaged version of kde-1.1.2 to work, so I went with the tar release from the KDE ftp sites.

Doing the non-package version.

[Ref: i386_openbsd27-README, i386_openbsd25-README]

Get the tar release of kde-1.1.2 for OpenBSD from the KDE site (or mirrors) and store it somewhere on your system (eg: /home/user/tmp)

i386_OpenBSD27-kdeadmin-1.1.2.tgz

i386_OpenBSD27-kdebase-1.1.2.tgz

i386_OpenBSD27-kdegames-1.1.2.tgz

i386_OpenBSD27-kdegraphics-1.1.2.tgz

i386_OpenBSD27-kdelibs-1.1.2.tgz

i386_OpenBSD27-kdemultimedia-1.1.2.tgz

i386_OpenBSD27-kdenetwork-1.1.2.tgz

i386_OpenBSD27-kdesupport-1.1.2.tgz
i386_OpenBSD27-kdeutils-1.1.2.tgz
i386_OpenBSD27-korganizer.tgz
i386_OpenBSD27-qt144.tgz

The kde binaries were compiled with /opt/kde as their expected base directory. Extract the files into their expected location (/opt/kde) by moving to the /opt directory, or mkdir /opt and then cd into it.

# mkdir /opt
# cd /opt

# tar –zxf /[path-to-files]/i386_OpenBSD27-kdeadmin-1.1.2.tgz

#  ...

#  ...

# tar -zxf /[path-to-files]/i386_OpenBSD27-kdeutils-1.1.2.tgz

# tar -zxf /[path-to-files]/i386_OpenBSD27-qt144.tgz

Side Note: If the files are downloaded onto another machine within your LAN (or your Internet link is fast) then you can try using the ftp redirection commands:

# cd /opt

# ftp ftp.mymirror.com

 

{ login stuff ... go to appropriate directory }

 

ftp> bi

ftp> get i386_OpenBSD27-kdeadmin-1.1.2.tgz "| tar -zxf -"

ftp>  ...

ftp>  ...

ftp> get i386_OpenBSD27-kdeutils-1.1.2.tgz "| tar -zxf -"

ftp> get i386_OpenBSD27-korganizer.tgz "| tar -zxf -"

ftp> get i386_OpenBSD27-qt144.tgz "| tar -zxf -"

Configure ld so it looks in the kde/lib directory for dynamically loadable libraries

# /usr/sbin/ldconfig -m /opt/kde/lib

 

Setting KDE as default desktop (local user)

When xdm starts a user X session, it will investigate the users ~/.xsession file if the user has specified a particular environment. To ensure KDE is your interface of choice, you can specify the following information:

File: ~/.xsession

#!/bin/sh
export PATH=$PATH:/opt/kde/bin:/usr/X11R6/bin
/opt/kde/bin/startkde

After creating the above file, then you need to make the file executable by performing the following command.

$ cd ~

$ chmod a+x .xsession

Setting KDE as default desktop (system wide)

When xdm starts a user session, it follows its own rules on how to setup that client. The information/configurations for all users are set in the file /usr/X11R6/lib/X11/xdm/Xsession

File: /usr/X11R6/lib/X11/xdm/Xsession

To have xdm launch KDE as the GLOBAL default user environment, then make the following modifications to the file Xsession: Change the section in the Xsession file that reads:

if [ -f "$startup" ]; then
        exec "$startup"
else
        if [ -f "$resources" ]; then
                xrdb -load "$resources"
        fi
        xterm &
        exec fvwm
fi

To read as follows

if [ -f "$startup" ]; then
        exec "$startup"
else
        if [ -f "$resources" ]; then
                xrdb -load "$resources"
        fi

        #xterm &
        #exec fvwm
 
        export PATH=$PATH:/opt/kde/bin:/usr/X11R6/bin
        /opt/kde/bin/startkde

fi

The above is a really ugly hack because I can't figure out how to get KDE's kdm to run as the default xdm. (I do want kdm don't I?)

If you want more directories in your path than you could add it above, or you can edit your ~/.bashrc file.

If you do not want to make KDE the global default Windowing Environment then you can make the changes to the user file ~/.xsession When xdm attempts to start an Xsession it will first look into the user's home directory for the file .xsession. If the file .xsession is found then this will be executed instead of the changes above.

a VESA configuration for XFree86 4.x

The following is a sample VESA /etc/X11/XF86Config I used for my laptop. This configuration is nice in how it handles multiple pointer devices and has been used by other laptop owners with a different configuration than specified in the comments.

The configuration file works with my:

OpenBSD 2.9 & 3.0 Beta snapshot August 2001 w/ XFree86 4.1.0
FreeBSD 4.3, Linux-Mandrake 8.0 w/ XFree86 4.0.3
Toshiba Satellite Pro 4600, 15 inch Super VGA
16MB Trident CyberBlade XP

and has also been reported to work with the following configuration.

OpenBSD 2.9 /w XFree86 4.0.3
Dell Inspiron (laptop) 8000, 15 inch Super XGA+
32MB DDR 4X AGP NVIDIA GeForce 2 Go

The only changes made in this file, from the original files by hme were to specify the OpenBSD specific port devices and keyboard type.

# $Id: x-windows3.htm,v 1.1.1.1 2002/06/10 02:09:58 samt Exp $
#
# XF86Config (XFree86 4.0.2) file for Toshiba Satellite Pro 4600.
#
# This is a Trident CyberBlade XP graphics card with 16 MByte memory.
# SVGA graphics is supported up to 1600x1200 @ 85 Hz.
# The LCD is a 15 inch 1024x768 TFT.
#
# The card is not recognised by the trident driver, and the vga driver
# gives only 320x200 pixels.  So the generic vesa driver is used, which
# supports up to 1280x1024.
#
# This file is bascially created with xf86config for an unsupported VGA card.
# However, then the Driver was changed from "vga" to "vesa", the DefaultDepth
# from 8 bpp to 16 bpp, and the Modes list reduced to "1024x768" only.
#
# If you add a "1280x1024" mode at the end of the Modes line,
# you will have a 640x480 viewport on that size of screen, scrolled by
# mouse movement.  If you put that mode in front of "1024x768" you will
# have a 1024x768 viewport on a 1280x1024 screen, but cannot scroll to
# the right or bottom edge.
#
# 24 bpp and 32 bpp do not work, I suspect the card does not support
# 24 bpp and the vesa driver does not support more than 24 bpp.
#
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# (C) 2001 United Kingdom Astronomy Technology Centre.
# Horst Meyerdierks <hme over-at roe.ac.uk>.
# Some sections courtesy of Helmut Bluhm.
#
# 2001/03/03: Original version.
# 2001/03/04: Modified keyboard section, minor addition to mouse section.
# 2001/03/08: Minor tweaking of keyboard section.
# 2001/04/27: Remove references to pc101 in keyboard section,
#             to make my UK keyboard work with Red Hat 7.1 XFree86 4.0.3.
# 2001/05/23: Dual mouse sections for simultaneous use of PS/2 and USB mice,
#             also both with IMPS/2 and ZAxisMapping.
# 2001/06/01: Swap InputDevice lines in ServerLayout to initialise USB mouse
#             last (after keyboard).

Section "Module"
    Load        "dbe"   # Double buffer extension
    SubSection  "extmod"
      Option    "omit xfree86-dga"   # don't initialise the DGA extension
    EndSubSection
    Load        "type1"
    Load        "freetype"
EndSection

Section "Files"
    RgbPath    "/usr/X11R6/lib/X11/rgb"
    FontPath   "/usr/X11R6/lib/X11/fonts/local/"
    FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
    FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"
    FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"
    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/"
    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/"
    FontPath   "/usr/local/AbiSuite/fonts/"
EndSection

Section "ServerFlags"
EndSection

Section "InputDevice"
    Identifier  "Keyboard1"
    Driver      "Keyboard"
    Option "AutoRepeat"  "500 30"
    Option "LeftAlt"     "Meta"
    Option "RightAlt"    "Meta"
    Option "ScrollLock"  "Compose"
    Option "RightCtl"    "Control"
    Option "XkbKeycodes" "xfree86"
    Option "XkbTypes"    "default"
    Option "XkbCompat"   "default"
    Option "XkbRules"    "xfree86"
    Option "XkbLayout"   "us"
EndSection

Section "InputDevice"
    Identifier  "USBMouse"
    Driver      "mouse"
    Option "Protocol"    "wsmouse"
    Option "Device"      "/dev/wsmouse1"
    Option "Emulate3Buttons"
    Option "Emulate3Timeout" "150"
    Option "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    Identifier  "Internal"
    Driver      "mouse"
    Option "Protocol"    "wsmouse"
    Option "Device"      "/dev/wsmouse0"
    Option "Emulate3Buttons"
    Option "Emulate3Timeout" "150"
    Option "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
    Identifier  "Tosh 4600 LCD"
    HorizSync   31.5 - 82.0
    VertRefresh 50-90
EndSection

Section "Device"
    Identifier  "Standard VGA"
    VendorName  "Unknown"
    BoardName   "Unknown"
#   Chipset     "generic"
    Driver      "vga"
#   BusID       "PCI:0:10:0"
#   VideoRam     256
#   Clocks       25.2 28.3
EndSection

Section "Device"
    Identifier  "Trident XP"
    Driver      "vesa"
        # unsupported card
    #VideoRam    16384
    # Insert Clocks lines here if appropriate
EndSection

Section "Screen"
    Identifier  "Screen 1"
    Device      "Trident XP"
    Monitor     "Tosh 4600 LCD"
    DefaultDepth 16
    Subsection "Display"
        Depth       8
        Modes       "1024x768"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes       "1024x768"
        ViewPort    0 0
    EndSubsection
EndSection

Section "ServerLayout"
    Identifier  "Simple Layout"
    Screen      "Screen 1"
    InputDevice "Internal"  "CorePointer"
    InputDevice "Keyboard1" "CoreKeyboard"
    InputDevice "USBMouse"  "SendCoreEvents"
EndSection

My apologies to the purist, I tried to maintain where I got the above information (some Toshiba site in Japan) but didn't do a good job of that so I do not have a link to the original source.

vnc Remote Administration - in X11

package: vnc-3.3.2r3.tar.gz (available as package)
Windows Binaries: vnc-3.3.3r2_x86_win32.tgz
[ref: /usr/local/share/docs/vnc/*.html]

VNC is a neat set of programs to allow remote access to the GUI environment from either a separate X box, or a Windows box. If you're like me and have too many monitors giving off heat, it is nice to work from one keyboard and minimise the number of powered-on monitors. Of course, it is also helpful if the system is in another location and you need a GUI environment to do some work.

Install the package

# pkg_add /[path-to-package]/vnc-3.3.2r3.tgz

The installation will create a ~/.vnc folder which will hold the pid files indicating which pid different VNC servers may be running on the machine serving up X enquiries. The directory will contain *.pid, *.log files for running vncs. The xstartup file is the x initialisation file.  The simplest solution is to copy the existing ~/.xinitrc as the new xstartup file.

# cp ~/.vnc/xstartup ~/.vnc/xstartup-
# cp ~/.xinitrc ~/.vnc/xstartup

Start the X vnc server (vncserver) at the command line and you will be prompted to enter a server password. There is a critical security issue with maintaining this password since it automatically logs the user in as the client running the server.  Which will be required when using a client to access the machine. 

After the server has started it will notify at the terminal which 'display' the X will be serving on. For example, localhost:0 is the physically connected screen and server:1 is the 1st available outside X client.

# vncserver

 

You will require a password to access your desktops.

Password:<-- password is not echoed
Verify:  <-- not echoed

New 'X' desktop is iwill:2

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/iwill:2.log

I now have vncserver running at desktop [ iwill:2 ] and session information logging to iwill:2.log. The desktop is at "iwill" since that is my machine hostname, and it is giving me the vncserver on display 2.

The password is stored as an encrypted file in ~/.vnc/passwd so don't let anyone else get at it. The password will be used for all vncserver sessions (including new vncserver configurations) until I delete the file.

From my Windows 2000 machine I can now use vncViewer to connect to my OpenBSD box. After installing the vnc programs on the Win2000 box I start "Run vnc Viewer" and answer the dialog boxes:

VNC server -        [ iwill:2           ]
Session Password -  [                   ]

Now I'm browsing the OpenBSD box using KDE on Windows 2000, great for those KDE Games?

For further information on stopping vncserver (vncserver -kill :2) and other options, browse the documentation (no man or info pages) supplied as html in the /usr/local/share/doc directory.

X Servers for Windows NT

As I do most of my work under Windows NT (2000 etc.) it is always useful to be able to use the one keyboard/screen combination to access all the computers. Usually, since most administration work for OpenBSD is character based, I am more than satisfied with using an SSH connection. Some people prefer a full X environment; X for Windows can be searched on google, and some of the below might be useful. Apart from vnc above, I haven't used them, but have come across their reference on the web and in lists.

Freeware

Mix-NT
CygWin http://sources.redhat.com/cygwin/
vnc http://www.uk.research.att.com/vnc/

Shareware

XWin32 - http://www.starnet.com/products/
XWinPro

Commercial

Hummingbird Xceed - http://www.hummingbird.com/products/nc/exceed/index.html

Unknown

Reflections X - http://www.wrq.com/products/reflection/rsx/
Kea X - http://www.attachmate.com/products/profile/0,1016,3194_1,00.html
Chameleon - ?
? - http://www.microimages.com/

Author and Copyright

Copyright (c) 2000/1/2 Samiuela LV Taufa. All Rights Reserved.

You are permitted and encouraged to use this guide for fun or for profit as you see fit. If you republish this work in what-ever form, it would be nice (though not enforceable) to be credited.

 X a pretty face on OpenBSD

Copyright  © 2000/1/2 NoMoa.COM All rights reserved.