Assuming you're using the default wscons console driver, make sure you adjust the mouse protocol and device properly in the XF86Config file's "Pointer" section:
Section "Pointer" ###Protocol "PS/2" # Linux ###Device "/dev/mouse" # Linux ##Protocol "busmouse" # NetBSD 1.4.x ##Device "/dev/pms0" # NetBSD 1.4.x Protocol "wsmouse" # NetBSD 1.5 or later Device "/dev/wsmouse" # NetBSD 1.5 or later EndSection |
If you don't use wscons (as is the default on 1.4.x
systems), use /dev/pms0
and the "busmouse" protocol for a PS/2 mouse.
Protocol "PS/2" is still supported for older kernels,
you'll have to use Device "/dev/pms0
"
with the opms mouse driver in the kernel for that,
though. Useful for X-Servers that don't support the wscons
protocol (like XFree V4 or Linux/FreeBSD X server
binaries).
XFree 3.x maps the keyboard with an english map per default. To change this to e.g. german, make sure the following is in your XF86Config file:
# XkbDisable # XkbKeymap "xfree86(us)" XkbModel "pc102" XkbLayout "de" XkbVariant "nodeadkeys" |
To get e.g. a german keyboard in XFree 4.x, put the following into your XF86Config's "InputDevices" section:
Options "XkbLayout" "de" |
Configuring the keyboard for the console under wscons is described elsewhere.
For XFree 3.x (as shipped with NetBSD 1.l5), add
“XkbOptions "ctrl:nocaps"
” if you
want the caps-lock key become a second control-key. If you
want to use the "Windows" keys on your keyboard, you can get
some useful keysyms for them by using
“XkbModel "pc105"
” instead.
XFree 4.x uses a different config file format. For it, put
Option "XkbOptions" "ctrl:nocaps" |
into the "InputDevice" section of your XF86Config file.
To fix this make sure you have xsrc of at least 2000-01-13 (otherwise you will have to also apply the patch in PR misc/9171). Then use
Option "xaa_no_color_exp" |
in the Device section of your
XF86Config
.
A patch for the NetBSD 1.3 series is available which will significantly improve the interactive performance under X while compiling or performing other tasks.
If xdm(1) is enabled but you are unable to login for some reason, possibly because there is no root password, and you do not have virtual consoles enabled (or they are not yet supported on your port), you can either press ^C at the immediately after the boot messages indicate xdm is starting, or:
ENTER
when
prompted for the shell.fsck -p ; mount -vat ffs
TERM=vt100 ; export TERM
Note: you may need to use a different terminal type such
as 'pc3' or 'sun'./etc/rc.conf
to disable xdm, run
passwd(1) to set root's password, or take whatever
other corrective action is neededstartx
' I get the message: startx: Command not found.
What's wrong? (top)
You need to add the location of the X binaries to your
shell's path
variable. For csh(1) and its
derivatives, add /usr/X11R6/bin
to the line in your .cshrc
file which
sets the path
variable. For sh
and
its derivatives, you'll need to modify you
.profile
instead.
You need /usr/X11R6/bin
in your
path. As root add 'set path = ( $path /usr/X11R6/bin )
'
to /etc/csh.cshrc
, and start a new
shell.
To see the error messages in this case, run:
shells/tcsh
:
startx >& ~/x.log |
startx > ~/x.log 2>&1 |
Then view ~/x.log
The system is outputting a line to the console indicating something has happened (such as 'su'). You should really run xconsole(1) or one 'xterm -C' to capture this console output.
You may need to ensure your kernel is compiled with the following enabled:
options UCONSOLE # allow anyone to steal the virtual console |
See How to build a kernel for details on how to build your own kernels.
If you're logged in as root, and get annoying
portmap
notices, you may wish to look at the
FAQ entry
on how to turn those messages off.
If you use a Microsoft IntelliMouse, Logitech Wheel Mouse (cordless our not) or something similar that has a scroll wheel, and you want to use the wheel under NetBSD, first make a kernel that includes the "pmsi" driver, and make sure "wsmouse" uses it. Something like this should occur in your dmesg(8) output:
pmsi0 at pckbc0 (aux slot) wsmouse0 at pmsi0 |
If you are running XFree86 3.x (as shipped with NetBSD 1.5.2
and earlier), ensure your /etc/XF86Config
contains:
Section "Pointer" Protocol "wsmouse" Device "/dev/wsmouse" ZAxisMapping 4 5 EndSection |
If you are running XFree86 4.x, ensure your
/etc/X11/XF86Config
contains:
Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "wsmouse" Option "Device" "/dev/wsmouse" Option "Buttons" "5" Option "ZAxisMapping" "4 5" EndSection |
That's enough to make xterms scroll. For other apps, you'll
need to edit your ~/.Xdefaults
. See
Colas Nahaboo X mouse wheel scroll page
for details on a lot of applications that can be made
working.
To quickly tell which version of the X server you are running, you can use xdpyinfo(1). E.g.:
$ xdpyinfo | grep release vendor release number: 335 |
In the case of XFree86, this tells us that the server version is 3.3.5.
NOTE: The paths below should be adjusted appropriately if using xpkgwedge
mkfontscale /usr/X11R6/lib/X11/fonts/TrueType
mkfontdir /usr/X11R6/lib/X11/fonts/TrueType
fonts.dir
' and
'fonts.scale
' in the TrueType font
directory.
Load "type1" Load "freetype" |
FontPath "/usr/X11R6/lib/X11/fonts/local/" FontPath "/usr/X11R6/lib/X11/fonts/TrueType/" FontPath "/usr/X11R6/lib/X11/fonts/Type1/" 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/75dpi/" FontPath "/usr/X11R6/lib/X11/fonts/100dpi/" |
/usr/X11R6/lib/X11/XftConfig
follows:
##### Example XftConfig dir "/usr/X11R6/lib/X11/fonts/TrueType" dir "/usr/X11R6/lib/X11/fonts/Type1" # Uncomment the following line if using an LCD display #match edit rgba = rgb; match any family == "fixed" edit family =+ "mono"; includeif "~/.xftconfig" match any family == "Times" edit family += "Times New Roman"; match any family == "Helvetica" edit family += "Verdana"; match any family == "Courier" edit family += "Courier New"; match any family == "serif" edit family += "Times New Roman"; match any family == "sans" edit family += "Verdana"; match any family == "mono" all slant == roman all weight < bold edit family += "monotype.com"; match any family == "mono" edit family += "Courier New"; match any family == "Charter" edit family += "Bitstream Charter"; match any family == "Bitstream Charter" edit family =+ "Charter"; match any family == "Lucidux Serif" edit family += "LuciduxSerif"; match any family == "LuciduxSerif" edit family =+ "Lucidux Serif"; match any family == "Lucidux Sans" edit family += "LuciduxSans"; match any family == "LuciduxSans" edit family =+ "Lucidux Sans"; match any family == "Lucidux Mono" edit family += "LuciduxMono"; match any family == "LuciduxMono" edit family =+ "Lucidux Mono"; match any family == "Comic Sans" edit family += "Comic Sans MS"; match any family == "Comic Sans MS" edit family =+ "Comic Sans"; match any family == "Trebuchet" edit family += "Trebuchet MS"; match any family == "Trebuchet MS" edit family =+ "Trebuchet"; match any family == "Monotype" edit family =+ "Monotype.com"; match any family == "Andale Mono" edit family += "Monotype.com"; match any family == "Monotype.com" edit family =+ "Andale Mono"; ##### End of XftConfig |
fc-cache -v |
xterm -ls -fg gray -bg black -ls -fa "Courier New Bold" -fs 10 |
This Anti-Aliased-Fonts-Mini-Howto was written by Jared D. McNeill.
It is possible that the application in question is
computing the font information that should have been
prepared by fc-cache -- re-run 'fc-cache -v
' to
make sure the information in the cache is up-to-date.
No fonts found; this probably means that the fontconfig library is not correctly configured. You may need to edit the fonts.conf configuration file. More information about fontconfig can be found in the fontconfig(3) manual page and on http://fontconfig.org |
You haven't run 'fc-cache -v
' like the
fonts/fontconfig
MESSAGE
suggests during installation. For details, see
'pkg_info -D fontconfig
' and above.
First thing to do is to install the window manager you
prefer. You can find a lot of them, ready to install, in
pkgsrc's wm
category. After
a successful installation, figure out how is the
binary named. It will usually match package's name.
Once you know how to execute the window manager, you
have to configure your X session to start it up. We will be
using twm in our examples (which comes with X), whose binary
is named twm
:
You can see that the content for each file is the same, so you may want to create a link between them.
Xm does not come with the standard X11 environment. It is part of Motif, which is a commercial graphical user interface.
A freeware implementation of Motif called Lesstif is also available.
It is available as part of the NetBSD packages collection,
under x11/lesstif
.
xpm.h
is part of the X PixMap
library, used by many programs to allow more multi (than
two) colour icons.
It is available as part of the NetBSD packages collection,
under graphics/xpm
If it is a third party item of software, you should
check if a version is available via the NetBSD packages collection.
If you are writing you own code you need to ensure you link
against the necessary X libraries. In this case, add
-L/usr/X11R6 -lX11
to the end of your link
line.