10.1. | What is the X Window System? |
The X Window System (commonly Many implementations are available for different
architectures and operating systems. An implementation of
the server-side code is properly known as an | |
10.2. | I want to run Xorg, how do I go about it? |
To install Xorg do one of the following: Use the Use Install Xorg from FreeBSD packages:
or on systems using pkg:
After the installation of Xorg, follow the instructions from the X11 Configuration section of the FreeBSD Handbook. | |
10.3. | I tried to run X, but I get a
No devices detected. error when I
type
|
Your system is probably running at a raised
There are two solutions to the problem:
Set your
See Q: 10.10 for more information about running xdm(1) at boot time. | |
10.4. | Why does my mouse not work with X? |
If you are using syscons(4) (the default console
driver), you can configure FreeBSD to support a mouse pointer on
each virtual screen. To avoid conflicting with X,
syscons(4) supports a virtual device called
Then edit Section "InputDevice"
Option "Protocol" "SysMouse"
Option "Device" "/dev/sysmouse"
..... Starting with Xorg version 7.4, the
Option "AutoAddDevices" "false" Some people prefer to use
link sysmouse mouse This link can be created by restarting devfs(5)
with the following command (as
# service devfs restart | |
10.5. | My mouse has a fancy wheel. Can I use it in X? |
Yes. You need to tell X that you have a 5 button mouse. To
do this, simply add the lines Example 10.1. “InputDevice” Section for Wheeled Mouse
in Xorg Configuration File Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/sysmouse"
Option "Buttons" "5"
Option "ZAxisMapping" "4 5"
EndSection Example 10.2. “.emacs” Example for Naive Page
Scrolling with Wheeled Mouse (optional) ;; wheel mouse
(global-set-key [mouse-4] 'scroll-down)
(global-set-key [mouse-5] 'scroll-up) | |
10.6. | My laptop has a Synaptics touchpad. Can I use it in X? |
Yes, you will have to configure a few things to make it work. If you plan to use the Xorg synaptics driver you
must remove moused_enable from
To enable synaptics in the psm(4) driver you need
to add the following into
hw.psm.synaptics_support="1" You also need the following into
Section "InputDevice"
Identifier "Touchpad0"
Driver "synaptics"
Option "Protocol" "psm"
Option "Device" "/dev/psm0"
EndSection And be sure to add the following into the “ServerLayout” section: InputDevice "Touchpad0" "SendCoreEvents" | |
10.7. | How do I use remote X displays? |
For security reasons, the default setting is to not allow a machine to remotely open a window. To enable this feature, simply start
X with the optional
% startx -listen_tcp | |
10.8. | What is a virtual console and how do I make more? |
Virtual consoles, put simply, enable you to have several simultaneous sessions on the same machine without doing anything complicated like setting up a network or running X. When the system starts, it will display a login prompt on the monitor after displaying all the boot messages. You can then type in your login name and password and start working (or playing!) on the first virtual console. At some point, you will probably wish to start another session, perhaps to look at documentation for a program you are running or to read your mail while waiting for an FTP transfer to finish. Just do Alt+F2 (hold down Alt and press F2), and you will find a login prompt waiting for you on the second “virtual console”! When you want to go back to the original session, do Alt+F1. The default FreeBSD installation has eight virtual consoles enabled. Alt+F1, Alt+F2, Alt+F3, and so on will switch between these virtual consoles. To enable more of them, edit
# Edit the existing entry for ttyv8 in /etc/ttys and change
# "off" to "on".
ttyv8 "/usr/libexec/getty Pc" xterm on secure
ttyv9 "/usr/libexec/getty Pc" xterm on secure
ttyva "/usr/libexec/getty Pc" xterm on secure
ttyvb "/usr/libexec/getty Pc" xterm on secure Use as many or as few as you want. The more virtual
terminals you have, the more resources that are used; this
can be important if you have 8 MB RAM or less. You may
also want to change the Note:Versions of FreeBSD prior to 9.0 used the “
cons25” terminal type, and not “
xterm”. Existing entries in
Important:If you want to run an X server you must leave at least one virtual terminal unused (or turned off) for it to use. That is to say that if you want to have a login prompt pop up for all twelve of your Alt-function keys, you are out of luck — you can only do this for eleven of them if you also want to run an X server on the same machine. The easiest way to disable a console is by turning it off. For example, if you had the full 12 terminal allocation mentioned above and you wanted to run X, you would change settings for virtual terminal 12 from: ttyvb "/usr/libexec/getty Pc" xterm on secure to: ttyvb "/usr/libexec/getty Pc" xterm off secure If your keyboard has only ten function keys, you would end up with: ttyv9 "/usr/libexec/getty Pc" xterm off secure
ttyva "/usr/libexec/getty Pc" xterm off secure
ttyvb "/usr/libexec/getty Pc" xterm off secure (You could also just delete these lines.) Next, the easiest (and cleanest) way to activate the
virtual consoles is to reboot. However, if you really do
not want to reboot, you can just shut down the X Window
system and execute (as # kill -HUP 1 It is imperative that you completely shut down X Window
if it is running, before running this command. If you do not,
your system will probably appear to hang or lock up after
executing | |
10.9. | How do I access the virtual consoles from X? |
Use Ctrl+Alt+F Once you are back to a text console, you can then use
Alt+F To return to the X session, you must switch to the
virtual console running X. If you invoked X from the
command line, (e.g., using | |
10.10. | How do I start XDM on boot? |
There are two schools of thought on how to start
xdm(1). One school starts The ttys(5) method has the advantage of documenting
which vty X will start on and passing the responsibility of
restarting the X server on logout to init(8). The
rc(8) method makes it easy to If loaded from rc(8), If you are to start :0 local /usr/local/bin/X vt4 The above example will direct the X server to run in
| |
10.11. | Why do I get Couldn't open
console when I run
|
If you start X with
This is because of the way console permissions are set by default. On a multi-user system, one does not necessarily want just any user to be able to write on the system console. For users who are logging directly onto a machine with a VTY, the fbtab(5) file exists to solve such problems. In a nutshell, make sure an uncommented line of the form
is in /dev/ttyv0 0600 /dev/console It will ensure that whomever logs in on
| |
10.12. | Why does my PS/2 mouse misbehave under X? |
Your mouse and the mouse driver may have somewhat become out of synchronization. In rare cases the driver may erroneously report synchronization problem and you may see the kernel message: psmintr: out of sync (xxxx != yyyy) and notice that your mouse does not work properly. If this happens, disable the synchronization check code
by setting the driver flags for the PS/2 mouse driver to
hint.psm.0.flags="0x100"
to
| |
10.13. | How do I reverse the mouse buttons? |
Run the command | |
10.14. | How do I install a splash screen and where do I find them? |
The detailed answer for this question can be found in the Boot Time Splash Screens section of the FreeBSD Handbook. | |
10.15. | Can I use the Windows keys on my keyboard in X? |
Yes. All you need to do is use xmodmap(1) to define what function you wish them to perform. Assuming all “Windows” keyboards are standard then the keycodes for these three keys are the following:
To have the left Windows key print a comma, try this. # xmodmap -e "keycode 115 = comma" To have the Windows key-mappings
enabled automatically every time you start X either put the
xmodmap $HOME/.xmodmaprc For example, you could map the 3 keys to be F13, F14, and F15, respectively. This would make it easy to map them to useful functions within applications or your window manager, as demonstrated further down. To do this put the following in
keycode 115 = F13
keycode 116 = F14
keycode 117 = F15 If you use the The following entries in Key F13 FTIWS A Iconify
Key F14 FTIWS A RaiseLower
Key F15 A A Menu Workplace Nop | |
10.16. | How can I get 3D hardware acceleration for OpenGL®? |
The availability of 3D acceleration depends on the version of Xorg that you are using and the type of video chip you have. If you have an nVidia chip, you can use the binary drivers provided for FreeBSD by installing one of the following ports:
nVidia provides detailed information on which card is supported by which driver on their web site: http://www.nvidia.com/object/IO_32667.html. For Matrox G200/G400, check the
For ATI Rage 128 and Radeon see ati(4), r128(4) and radeon(4). |
This, and other documents, can be downloaded from http://ftp.FreeBSD.org/pub/FreeBSD/doc/
For questions about FreeBSD, read the
documentation before
contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.