diff --git a/en_US.ISO8859-1/books/handbook/x11/chapter.xml b/en_US.ISO8859-1/books/handbook/x11/chapter.xml index 188155f246..362e3de511 100644 --- a/en_US.ISO8859-1/books/handbook/x11/chapter.xml +++ b/en_US.ISO8859-1/books/handbook/x11/chapter.xml @@ -1,1743 +1,1810 @@ Ken Tom Updated for X.Org's X11 server by Marc Fonvieille The X Window System Synopsis FreeBSD uses X11 to provide users with a powerful graphical user interface. X11 is a freely available version of the X Window System that is implemented in &xorg; - (and other software - packages not discussed here). - The + (and other software packages not discussed here). The default and official flavor of X11 in &os; is &xorg;, the X11 server developed by - the X.Org Foundation under a license very similar to the one used - by &os;. Commercial X servers for &os; are also available. + the X.Org Foundation under a license very similar to the one + used by &os;. Commercial X servers for &os; are also + available. For more information on the video hardware that X11 supports, check the &xorg; web site. After reading this chapter, you will know: - The various components of the X Window System, and how they - interoperate. + The various components of the X Window System, and how + they interoperate. How to install and configure X11. How to install and use different window managers. How to use &truetype; fonts in X11. How to set up your system for graphical logins (XDM). Before reading this chapter, you should: Know how to install additional third-party software (). Understanding X - Using X for the first time can be somewhat of a shock to someone - familiar with other graphical environments, such as µsoft.windows; or - &macos;. + Using X for the first time can be somewhat of a shock to + someone familiar with other graphical environments, such as + µsoft.windows; or &macos;. - While it is not necessary to understand all of the details of various - X components and how they interact, some basic knowledge makes - it possible to take advantage of X's strengths. + While it is not necessary to understand all of the details + of various X components and how they interact, some basic + knowledge makes it possible to take advantage of X's + strengths. Why X? - X is not the first window system written for &unix;, but it is the - most popular of them. X's original development team had worked on another - window system prior to writing X. That system's name was - W (for Window). X was just the next - letter in the Roman alphabet. - - X can be called X, X Window System, - X11, and a number of other terms. You may find - that using the term X Windows to describe X11 - can be offensive to some people; for a bit more insight on - this, see &man.X.7;. + X is not the first window system written for &unix;, but + it is the most popular of them. X's original development team + had worked on another window system prior to writing X. That + system's name was W (for + Window). X was just the next letter in the + Roman alphabet. + + X can be called X, X Window + System, X11, and a number of other + terms. You may find that using the term X + Windows to describe X11 can be offensive to some + people; for a bit more insight on this, see &man.X.7;. The X Client/Server Model - X was designed from the beginning to be network-centric, and - adopts a client-server model. + X was designed from the beginning to be network-centric, + and adopts a client-server model. In the X model, the - X server runs on the computer that has the keyboard, - monitor, and mouse attached. The server's responsibility includes tasks such as managing - the display, handling input from the keyboard and mouse, and other - input or output devices (i.e., a tablet can be used as - an input device, and a video projector may be an alternative output - device). - Each X application (such as XTerm, or - &netscape;) is a client. A - client sends messages to the server such as Please draw a - window at these coordinates, and the server sends back - messages such as The user just clicked on the OK + X server runs on the computer that has the + keyboard, monitor, and mouse attached. The server's + responsibility includes tasks such as managing the + display, handling input from the keyboard and mouse, and + other input or output devices (i.e., a tablet + can be used as an input device, and a video projector + may be an alternative output device). Each X application + (such as XTerm, or + &netscape;) is a + client. A client sends messages to the server + such as Please draw a window at these + coordinates, and the server sends back messages such + as The user just clicked on the OK button. - In a home or small - office environment, the X server and the X clients commonly run on - the same computer. However, it is perfectly possible to run the X - server on a less powerful desktop computer, and run X applications - (the clients) on, say, the powerful and expensive machine that serves - the office. In this scenario the communication between the X client - and server takes place over the network. + In a home or small office environment, the X server and + the X clients commonly run on the same computer. However, it + is perfectly possible to run the X server on a less powerful + desktop computer, and run X applications (the clients) on, + say, the powerful and expensive machine that serves the + office. In this scenario the communication between the X + client and server takes place over the network. This confuses some people, because the X terminology is - exactly backward to what they expect. They expect the X - server to be the big powerful machine down the hall, and - the X client to be the machine on their desk. - - It is important to remember that the X server is the machine with the monitor and - keyboard, and the X clients are the programs that display the - windows. - - There is nothing in the protocol that forces the client and - server machines to be running the same operating system, or even to - be running on the same type of computer. It is certainly possible to - run an X server on µsoft.windows; or Apple's &macos;, and there are - various free and commercial applications available that do exactly - that. + exactly backward to what they expect. They expect the + X server to be the big powerful machine down + the hall, and the X client to be the machine + on their desk. + + It is important to remember that the X server is the + machine with the monitor and keyboard, and the X clients are + the programs that display the windows. + + There is nothing in the protocol that forces the client + and server machines to be running the same operating system, + or even to be running on the same type of computer. It is + certainly possible to run an X server on µsoft.windows; + or Apple's &macos;, and there are various free and commercial + applications available that do exactly that. The Window Manager - The X design philosophy is much like the &unix; design philosophy, - tools, not policy. This means that X does not try to - dictate how a task is to be accomplished. Instead, tools are provided - to the user, and it is the user's responsibility to decide how to use - those tools. - - This philosophy extends to X not dictating what windows should - look like on screen, how to move them around with the mouse, what - keystrokes should be used to move between windows (i.e., + The X design philosophy is much like the &unix; design + philosophy, tools, not policy. This means + that X does not try to dictate how a task is to be + accomplished. Instead, tools are provided to the user, and + it is the user's responsibility to decide how to use those + tools. + + This philosophy extends to X not dictating what windows + should look like on screen, how to move them around with the + mouse, what keystrokes should be used to move between windows + (i.e., Alt Tab - , in the case of µsoft.windows;), what the title bars - on each window should look like, whether or not they have close - buttons on them, and so on. - - Instead, X delegates this responsibility to an application called - a Window Manager. There are dozens of window - managers available for X: AfterStep, - Blackbox, ctwm, + , in the case of µsoft.windows;), what the + title bars on each window should look like, whether or not + they have close buttons on them, and so on. + + Instead, X delegates this responsibility to an + application called a Window Manager. There + are dozens of window managers available for X: + AfterStep, + Blackbox, + ctwm, Enlightenment, - fvwm, Sawfish, + fvwm, + Sawfish, twm, - Window Maker, and more. Each of these - window managers provides a different look and feel; some of them - support virtual desktops; some of them allow customized - keystrokes to manage the desktop; some have a Start - button or similar device; some are themeable, allowing - a complete change of look-and-feel by applying a new theme. These - window managers, and many more, are available in the - x11-wm category of the Ports Collection. + Window Maker, and more. Each of + these window managers provides a different look and feel; + some of them support virtual desktops; some + of them allow customized keystrokes to manage the desktop; + some have a Start button or similar device; + some are themeable, allowing a complete change + of look-and-feel by applying a new theme. These window + managers, and many more, are available in the + x11-wm category of the Ports + Collection. In addition, the KDE and - GNOME desktop environments both have their - own window managers which integrate with the desktop. + GNOME desktop environments both + have their own window managers which integrate with the + desktop. - Each window manager also has a different configuration mechanism; - some expect configuration file written by hand, others feature - GUI tools for most of the configuration tasks; at least one - (Sawfish) has a configuration file written - in a dialect of the Lisp language. + Each window manager also has a different configuration + mechanism; some expect configuration file written by hand, + others feature GUI tools for most of the configuration tasks; + at least one (Sawfish) has a + configuration file written in a dialect of the Lisp + language. Focus Policy - Another feature the window manager is responsible for is the - mouse focus policy. Every windowing system - needs some means of choosing a window to be actively receiving - keystrokes, and should visibly indicate which window is active as - well. + Another feature the window manager is responsible for + is the mouse focus policy. Every windowing + system needs some means of choosing a window to be actively + receiving keystrokes, and should visibly indicate which + window is active as well. - A familiar focus policy is called click-to-focus. - This is the model utilized by µsoft.windows;, in which a window - becomes active upon receiving a mouse click. + A familiar focus policy is called + click-to-focus. This is the model utilized + by µsoft.windows;, in which a window becomes active + upon receiving a mouse click. - X does not support any particular focus policy. Instead, the - window manager controls which window has the focus at any one time. - Different window managers will support different focus methods. All - of them support click to focus, and the majority of them support - several others. + X does not support any particular focus policy. + Instead, the window manager controls which window has the + focus at any one time. Different window managers will + support different focus methods. All of them support + click to focus, and the majority of them support several + others. The most popular focus policies are: focus-follows-mouse - The window that is under the mouse pointer is the - window that has the focus. This may not necessarily be - the window that is on top of all the other windows. - The focus is changed by pointing at another window, there - is no need to click in it as well. + The window that is under the mouse pointer is + the window that has the focus. This may not + necessarily be the window that is on top of all the + other windows. The focus is changed by pointing at + another window, there is no need to click in it as + well. sloppy-focus - This policy is a small extension to focus-follows-mouse. - With focus-follows-mouse, if the mouse is moved over the - root window (or background) then no window has the focus, - and keystrokes are simply lost. With sloppy-focus, focus is - only changed when the cursor enters a new window, and not - when exiting the current window. + This policy is a small extension to + focus-follows-mouse. With focus-follows-mouse, if + the mouse is moved over the root window (or + background) then no window has the focus, and + keystrokes are simply lost. With sloppy-focus, focus + is only changed when the cursor enters a new + window, and not when exiting the current + window. click-to-focus - The active window is selected by mouse click. The - window may then be raised, and appear in - front of all other windows. All keystrokes will now be - directed to this window, even if the cursor is moved to - another window. + The active window is selected by mouse click. + The window may then be raised, and + appear in front of all other windows. All keystrokes + will now be directed to this window, even if the + cursor is moved to another window. - Many window managers support other policies, as well as - variations on these. Be sure to consult the documentation for - the window manager itself. + Many window managers support other policies, as well + as variations on these. Be sure to consult the + documentation for the window manager itself. Widgets - The X approach of providing tools and not policy extends to the - widgets seen on screen in each application. - - Widget is a term for all the items in the user - interface that can be clicked or manipulated in some way; buttons, - check boxes, radio buttons, icons, lists, and so on. µsoft.windows; - calls these controls. - - µsoft.windows; and Apple's &macos; both have a very rigid widget - policy. Application developers are supposed to ensure that their - applications share a common look and feel. With X, it was not - considered sensible to mandate a particular graphical style, or set - of widgets to adhere to. - - As a result, do not expect X applications to have a common - look and feel. There are several popular widget sets and - variations, including the original Athena widget set from MIT, - &motif; (on which the widget set in - µsoft.windows; was modeled, all bevelled edges and three shades of - grey), OpenLook, and others. - - Most newer X applications today will use a modern-looking widget - set, either Qt, used by KDE, or - GTK+, used by the - GNOME - project. In this respect, there is some convergence in - look-and-feel of the &unix; desktop, which certainly makes things - easier for the novice user. + The X approach of providing tools and not policy + extends to the widgets seen on screen in each + application. + + Widget is a term for all the items in + the user interface that can be clicked or manipulated in + some way; buttons, check boxes, radio buttons, icons, lists, + and so on. µsoft.windows; calls these + controls. + + µsoft.windows; and Apple's &macos; both have a + very rigid widget policy. Application developers are + supposed to ensure that their applications share a common + look and feel. With X, it was not considered sensible to + mandate a particular graphical style, or set of widgets to + adhere to. + + As a result, do not expect X applications to have a + common look and feel. There are several popular widget sets + and variations, including the original Athena widget set from + MIT, &motif; (on which the widget + set in µsoft.windows; was modeled, all bevelled edges and + three shades of grey), OpenLook, + and others. + + Most newer X applications today will use a + modern-looking widget set, either Qt, used by + KDE, or GTK+, used by the + GNOME project. In this respect, + there is some convergence in look-and-feel of the &unix; + desktop, which certainly makes things easier for the novice + user. Installing X11 &xorg; is the default X11 - implementation for &os;. &xorg; is - the X server of the open source X Window System implementation released by the X.Org - Foundation. &xorg; is based on the code of + implementation for &os;. &xorg; + is the X server of the open source X Window System + implementation released by the X.Org Foundation. + &xorg; is based on the code of &xfree86; 4.4RC2 and X11R6.6. The version of &xorg; currently available in the &os; Ports Collection is &xorg.version;. - To build and install &xorg; from the - Ports Collection: + To build and install &xorg; + from the Ports Collection: &prompt.root; cd /usr/ports/x11/xorg &prompt.root; make install clean To build &xorg; in its entirety, be sure to have at least 4 GB of free space available. Alternatively, X11 can be installed directly from packages. - Binary packages to use with &man.pkg.add.1; tool are also available for - X11. When the remote fetching - feature of &man.pkg.add.1; is used, the version number of the - package must be removed. &man.pkg.add.1; will automatically fetch + Binary packages to use with &man.pkg.add.1; tool are also + available for X11. When the remote fetching feature of + &man.pkg.add.1; is used, the version number of the package + must be removed. &man.pkg.add.1; will automatically fetch the latest version of the application. So to fetch and install the package of &xorg;, simply type: &prompt.root; pkg_add -r xorg The examples above will install the complete X11 distribution including the servers, clients, fonts etc. Separate packages and ports of X11 are also available. - To install a minimal X11 distribution you can alternatively install + To install a minimal X11 distribution you can + alternatively install x11/xorg-minimal. The rest of this chapter will explain how to configure X11, and how to set up a productive desktop environment. Christopher Shumway Contributed by X11 Configuration &xorg; X11 Before Starting In most cases, X11 is self-configuring. Those with older or unusual equipment may find it helpful to gather some hardware information before beginning configuration. Monitor sync frequencies Video card chipset Video card memory horizontal sync frequency horizontal scan rate horizontal sync frequency refresh rate vertical sync frequency refresh rate vertical scan rate refresh rate Screen resolution and refresh rate are determined by the monitor's horizontal and vertical sync frequencies. Almost all monitors support electronic autodetection of these values. A few monitors do not provide these values, and the specifications must be determined from the printed manual or manufacturer web site. The video card chipset is also autodetected, and used to select the proper video driver. It is beneficial for the user to be aware of which chipset is installed for when autodetection does not provide the desired result. Video card memory determines the maximum resolution and color depth which can be displayed. Configuring X11 &xorg; uses HAL to autodetect keyboards and mice. The sysutils/hal and - devel/dbus ports are installed - as dependencies of x11/xorg, but - must be enabled by the following entries in the + devel/dbus ports are + installed as dependencies of x11/xorg, but must be enabled by + the following entries in the /etc/rc.conf file: hald_enable="YES" dbus_enable="YES" These services should be started (either manually or by rebooting) before further &xorg; configuration or use is attempted. &xorg; can - often work without any further configuration steps by simply typing at - prompt: + often work without any further configuration steps by + simply typing at prompt: &prompt.user; startx - The automatic configuration may fail to work with some hardware, - or may not set things up quite as desired. In these cases, manual - configuration will be necessary. + The automatic configuration may fail to work with some + hardware, or may not set things up quite as desired. In + these cases, manual configuration will be necessary. Desktop environments like GNOME, KDE or Xfce have tools allowing the user to easily set the screen parameters such as the resolution. So if the default configuration is not acceptable and you planned to install a desktop environment then just continue with the installation of the desktop environment and use the appropriate screen settings tool. - Configuration of X11 is - a multi-step process. The first step is to build an initial - configuration file. - As the super user, simply - run: + Configuration of X11 is a multi-step process. The first + step is to build an initial configuration file. As the super + user, simply run: &prompt.root; Xorg -configure This will generate an X11 configuration skeleton file in the /root directory called xorg.conf.new (whether you &man.su.1; or do a direct login affects the inherited supervisor $HOME directory variable). The X11 program will attempt to probe the graphics hardware on the system and write a configuration file to load the proper drivers for the detected hardware on the target system. The next step is to test the existing configuration to verify that &xorg; can work with the graphics hardware on the target system. Type: &prompt.root; Xorg -config xorg.conf.new -retro If a black and grey grid and an X mouse cursor appear, - the configuration was successful. To exit the test, switch to the - virtual console used to start it by pressing + the configuration was successful. To exit the test, switch + to the virtual console used to start it by pressing Ctrl Alt Fn - (F1 for the first virtual console) - and press + (F1 for the first virtual + console) and press Ctrl C . The Ctrl Alt Backspace key combination may also be used to break out of &xorg;. To enable it, you can either type the following command from any X terminal emulator: &prompt.user; setxkbmap -option terminate:ctrl_alt_bksp or create a keyboard configuration file for hald called x11-input.fdi and saved in the /usr/local/etc/hal/fdi/policy directory. This file should contain the following lines: <?xml version="1.0" encoding="iso-8859-1"?> <deviceinfo version="0.2"> <device> <match key="info.capabilities" contains="input.keyboard"> <merge key="input.x11_options.XkbOptions" type="string">terminate:ctrl_alt_bksp</merge> </match> </device> </deviceinfo> You will have to reboot your machine to force hald to read this file. The following line will also have to be added to xorg.conf.new, in the - ServerLayout or ServerFlags - section: + ServerLayout or + ServerFlags section: Option "DontZap" "off" If the mouse does not work, you will need to first configure it before proceeding. See in the &os; install chapter. In recent Xorg versions, the InputDevice sections in xorg.conf are ignored in favor of the autodetected devices. To restore the old behavior, add the following line to the ServerLayout or ServerFlags section of this file: Option "AutoAddDevices" "false" - Input devices may then be configured as in previous versions, - along with any other options needed (e.g., keyboard layout - switching). + Input devices may then be configured as in previous + versions, along with any other options needed (e.g., + keyboard layout switching). As previously explained the hald daemon will, by default, automatically detect your keyboard. There are chances that your keyboard layout or model will not be correct, desktop environments like GNOME, KDE or Xfce provide tools to configure the keyboard. However, it is possible to set the keyboard properties directly either with the help of the &man.setxkbmap.1; utility or with a hald's configuration rule. For example if one wants to use a PC 102 keys keyboard coming with a french layout, we have to create a keyboard configuration file for hald called x11-input.fdi and saved in the /usr/local/etc/hal/fdi/policy directory. This file should contain the following lines: <?xml version="1.0" encoding="iso-8859-1"?> <deviceinfo version="0.2"> <device> <match key="info.capabilities" contains="input.keyboard"> <merge key="input.x11_options.XkbModel" type="string">pc102</merge> <merge key="input.x11_options.XkbLayout" type="string">fr</merge> </match> </device> </deviceinfo> If this file already exists, just copy and add to your file the lines regarding the keyboard configuration. You will have to reboot your machine to force hald to read this file. It is possible to do the same configuration from an X terminal or a script with this command line: &prompt.user; setxkbmap -model pc102 -layout fr The /usr/local/share/X11/xkb/rules/base.lst file lists the various keyboard, layouts and options available. X11 tuning The xorg.conf.new - configuration file may now be tuned to taste. Open the file in a text editor such - as &man.emacs.1; or &man.ee.1;. If the monitor is an older - or unusual model that does not support autodetection of - sync frequencies, those settings can - be added to xorg.conf.new + configuration file may now be tuned to taste. Open the + file in a text editor such as &man.emacs.1; or &man.ee.1;. + If the monitor is an older or unusual model that does not + support autodetection of sync frequencies, those settings + can be added to xorg.conf.new under the "Monitor" section: Section "Monitor" Identifier "Monitor0" VendorName "Monitor Vendor" ModelName "Monitor Model" HorizSync 30-107 VertRefresh 48-120 EndSection - Most monitors support sync frequency autodetection, making - manual entry of these values unnecessary. For the few - monitors that do not support autodetection, avoid potential - damage by only entering values provided by the + Most monitors support sync frequency autodetection, + making manual entry of these values unnecessary. For the + few monitors that do not support autodetection, avoid + potential damage by only entering values provided by the manufacturer. - X allows DPMS (Energy Star) features to be used with capable - monitors. The &man.xset.1; program controls the time-outs and can force - standby, suspend, or off modes. If you wish to enable DPMS features - for your monitor, you must add the following line to the monitor - section: + X allows DPMS (Energy Star) features to be used with + capable monitors. The &man.xset.1; program controls the + time-outs and can force standby, suspend, or off modes. If + you wish to enable DPMS features for your monitor, you must + add the following line to the monitor section: - - Option "DPMS" + Option "DPMS" xorg.conf While the xorg.conf.new configuration file is still open in an editor, select the default resolution and color depth desired. This is defined in the "Screen" section: Section "Screen" Identifier "Screen0" Device "Card0" Monitor "Monitor0" DefaultDepth 24 SubSection "Display" Viewport 0 0 Depth 24 Modes "1024x768" EndSubSection EndSection The DefaultDepth keyword describes the color depth to run at by default. This can be overridden with the command line switch to &man.Xorg.1;. The Modes keyword describes the resolution to run at for the given color depth. Note that only VESA standard modes are supported as defined by the target system's graphics hardware. In the example above, the default color depth is twenty-four - bits per pixel. At this color depth, the accepted resolution is - 1024 by 768 - pixels. + bits per pixel. At this color depth, the accepted + resolution is 1024 by 768 pixels. Finally, write the configuration file and test it using the test mode given above. One of the tools available to assist you during - troubleshooting process are the X11 log files, which contain - information on each device that the X11 server attaches to. - &xorg; log file names are in the format - of /var/log/Xorg.0.log. The exact name - of the log can vary from Xorg.0.log to - Xorg.8.log and so forth. + troubleshooting process are the X11 log files, which + contain information on each device that the X11 server + attaches to. &xorg; log file + names are in the format of + /var/log/Xorg.0.log. The exact name + of the log can vary from Xorg.0.log + to Xorg.8.log and so forth. If all is well, the configuration file needs to be installed in a common location where &man.Xorg.1; can find it. This is typically /etc/X11/xorg.conf or /usr/local/etc/X11/xorg.conf. &prompt.root; cp xorg.conf.new /etc/X11/xorg.conf The X11 configuration process is now complete. &xorg; may be now started with the &man.startx.1; utility. The X11 server may also be started with the use of &man.xdm.1;. Advanced Configuration Topics - Configuration with &intel; <literal>i810</literal> Graphics Chipsets + Configuration with &intel; <literal>i810</literal> + Graphics Chipsets Intel i810 graphic chipset Configuration with &intel; i810 integrated chipsets requires the agpgart AGP programming interface for X11 to drive the card. See the &man.agp.4; driver manual page for more information. - This will allow configuration of the hardware as any other - graphics board. Note on systems without the &man.agp.4; - driver compiled in the kernel, trying to load the module - with &man.kldload.8; will not work. This driver has to be - in the kernel at boot time through being compiled in or - using /boot/loader.conf. + This will allow configuration of the hardware as any + other graphics board. Note on systems without the + &man.agp.4; driver compiled in the kernel, trying to load + the module with &man.kldload.8; will not work. This + driver has to be in the kernel at boot time through being + compiled in or using + /boot/loader.conf. Adding a Widescreen Flatpanel to the Mix widescreen flatpanel configuration - This section assumes a bit of advanced configuration knowledge. - If attempts to use the standard configuration tools above have not - resulted in a working configuration, there is information enough - in the log files to be of use in getting the setup working. - Use of a text editor will be necessary. - - Current widescreen (WSXGA, WSXGA+, WUXGA, WXGA, WXGA+, et.al.) - formats support 16:10 and 10:9 formats or aspect ratios that can - be problematic. Examples of some common screen resolutions for - 16:10 aspect ratios are: + This section assumes a bit of advanced configuration + knowledge. If attempts to use the standard configuration + tools above have not resulted in a working configuration, + there is information enough in the log files to be of use + in getting the setup working. Use of a text editor will + be necessary. + + Current widescreen (WSXGA, WSXGA+, WUXGA, WXGA, + WXGA+, et.al.) formats support 16:10 and 10:9 formats or + aspect ratios that can be problematic. Examples of some + common screen resolutions for 16:10 aspect ratios + are: 2560x1600 1920x1200 1680x1050 1440x900 1280x800 At some point, it will be as easy as adding one of these - resolutions as a possible Mode in the Section - "Screen" as such: + resolutions as a possible Mode in the + Section "Screen" as such: Section "Screen" Identifier "Screen0" Device "Card0" Monitor "Monitor0" DefaultDepth 24 SubSection "Display" Viewport 0 0 Depth 24 Modes "1680x1050" EndSubSection EndSection - &xorg; is smart enough to pull the - resolution information from the widescreen via I2C/DDC information - so it knows what the monitor can handle as far as frequencies - and resolutions. + &xorg; is smart enough to + pull the resolution information from the widescreen via + I2C/DDC information so it knows what the monitor can + handle as far as frequencies and resolutions. - If those ModeLines do not exist in the drivers, - one might need to give &xorg; a little hint. - Using /var/log/Xorg.0.log one can extract - enough information to manually create a ModeLine that - will work. Simply look for information resembling this: + If those ModeLines do not exist in + the drivers, one might need to give + &xorg; a little hint. Using + /var/log/Xorg.0.log one can extract + enough information to manually create a + ModeLine that will work. Simply look + for information resembling this: (II) MGA(0): Supported additional Video Mode: (II) MGA(0): clock: 146.2 MHz Image Size: 433 x 271 mm (II) MGA(0): h_active: 1680 h_sync: 1784 h_sync_end 1960 h_blank_end 2240 h_border: 0 (II) MGA(0): v_active: 1050 v_sync: 1053 v_sync_end 1059 v_blanking: 1089 v_border: 0 (II) MGA(0): Ranges: V min: 48 V max: 85 Hz, H min: 30 H max: 94 kHz, PixClock max 170 MHz This information is called EDID information. Creating a - ModeLine from this is just a matter of putting the - numbers in the correct order: + ModeLine from this is just a matter of + putting the numbers in the correct order: ModeLine <name> <clock> <4 horiz. timings> <4 vert. timings> - So that the ModeLine in Section "Monitor" + So that the ModeLine in + Section "Monitor" for this example would look like this: Section "Monitor" Identifier "Monitor1" VendorName "Bigname" ModelName "BestModel" ModeLine "1680x1050" 146.2 1680 1784 1960 2240 1050 1053 1059 1089 Option "DPMS" EndSection - Now having completed these simple editing steps, X should start - on your new widescreen monitor. + Now having completed these simple editing steps, X + should start on your new widescreen monitor. Murray Stokely Contributed by Using Fonts in X11 Type1 Fonts - The default fonts that ship with - X11 are less than ideal for typical - desktop publishing applications. Large presentation fonts show up - jagged and unprofessional looking, and small fonts in - &netscape; are almost completely unintelligible. - However, there are several free, high quality Type1 (&postscript;) fonts - available which can be readily used - with X11. For instance, the URW font collection - (x11-fonts/urwfonts) includes - high quality versions of standard type1 fonts (Times Roman, - Helvetica, Palatino and others). The Freefonts collection - (x11-fonts/freefonts) includes - many more fonts, but most of them are intended for use in - graphics software such as the Gimp, and are not - complete enough to serve as screen fonts. In addition, - X11 can be configured to use - &truetype; fonts with a minimum of effort. For more details on - this, see the &man.X.7; manual page or the - section on &truetype; fonts. + + The default fonts that ship with X11 are less than ideal + for typical desktop publishing applications. Large + presentation fonts show up jagged and unprofessional looking, + and small fonts in &netscape; are + almost completely unintelligible. However, there are several + free, high quality Type1 (&postscript;) fonts available which + can be readily used with X11. For instance, the URW font + collection (x11-fonts/urwfonts) includes high + quality versions of standard type1 fonts (Times Roman, + Helvetica, Palatino and others). The + Freefonts collection (x11-fonts/freefonts) includes + many more fonts, but most of them are intended for use in + graphics software such as the Gimp, + and are not complete enough to serve as screen fonts. In + addition, X11 can be configured to use &truetype; fonts with + a minimum of effort. For more details on this, see the + &man.X.7; manual page or the section + on &truetype; fonts. To install the above Type1 font collections from the Ports Collection, run the following commands: &prompt.root; cd /usr/ports/x11-fonts/urwfonts &prompt.root; make install clean - And likewise with the freefont or other collections. To have the X - server detect these fonts, add an appropriate line to the - X server configuration file (/etc/X11/xorg.conf), - which reads: + And likewise with the freefont or other collections. To + have the X server detect these fonts, add an appropriate line + to the X server configuration file + (/etc/X11/xorg.conf), which reads: FontPath "/usr/local/lib/X11/fonts/URW/" Alternatively, at the command line in the X session run: &prompt.user; xset fp+ /usr/local/lib/X11/fonts/URW &prompt.user; xset fp rehash - This will work but will be lost when the X session is closed, - unless it is added to the startup file (~/.xinitrc - for a normal startx session, - or ~/.xsession when logging in through a - graphical login manager like XDM). - A third way is to use the new - /usr/local/etc/fonts/local.conf file: see the - section on anti-aliasing. + This will work but will be lost when the X session is + closed, unless it is added to the startup file + (~/.xinitrc for a normal + startx session, or + ~/.xsession when logging in through a + graphical login manager like XDM). + A third way is to use the new + /usr/local/etc/fonts/local.conf file: see + the section on anti-aliasing. &truetype; Fonts TrueType Fonts fonts TrueType &xorg; has built in support - for rendering &truetype; fonts. There are two different modules - that can enable this functionality. The freetype module is used - in this example because it is more consistent with the other font - rendering back-ends. To enable the freetype module just add the - following line to the "Module" section of the - /etc/X11/xorg.conf file. + for rendering &truetype; fonts. There are two different + modules that can enable this functionality. The freetype + module is used in this example because it is more consistent + with the other font rendering back-ends. To enable the + freetype module just add the following line to the + "Module" section of the + /etc/X11/xorg.conf file. Load "freetype" - Now make a directory for the &truetype; fonts (for example, + Now make a directory for the &truetype; fonts (for + example, /usr/local/lib/X11/fonts/TrueType) - and copy all of the &truetype; fonts into this directory. Keep in - mind that &truetype; fonts cannot be directly taken from a - &macintosh;; they must be in &unix;/&ms-dos;/&windows; format for use by - X11. Once the files have been - copied into this directory, use - ttmkfdir to create a - fonts.dir file, so that the X font renderer - knows that these new files have been installed. + and copy all of the &truetype; fonts into this directory. + Keep in mind that &truetype; fonts cannot be directly taken + from a &macintosh;; they must be in &unix;/&ms-dos;/&windows; + format for use by X11. Once the files have been copied into + this directory, use ttmkfdir to + create a fonts.dir file, so that the X + font renderer knows that these new files have been installed. ttmkfdir is available from the FreeBSD Ports Collection as x11-fonts/ttmkfdir. &prompt.root; cd /usr/local/lib/X11/fonts/TrueType &prompt.root; ttmkfdir -o fonts.dir Now add the &truetype; directory to the font path. This is just the same as described above for Type1 fonts, that is, use &prompt.user; xset fp+ /usr/local/lib/X11/fonts/TrueType &prompt.user; xset fp rehash or add a FontPath line to the xorg.conf file. That's it. Now &netscape;, Gimp, - &staroffice;, and all of the other X - applications should now recognize the installed &truetype; - fonts. Extremely small fonts (as with text in a high resolution - display on a web page) and extremely large fonts (within - &staroffice;) will look much better - now. + &staroffice;, and all of the + other X applications should now recognize the installed + &truetype; fonts. Extremely small fonts (as with text in a + high resolution display on a web page) and extremely large + fonts (within &staroffice;) will + look much better now. Joe Marcus Clarke Updated by Anti-Aliased Fonts anti-aliased fonts fonts anti-aliased All fonts in X11 that are found in /usr/local/lib/X11/fonts/ and ~/.fonts/ are automatically made available for anti-aliasing to Xft-aware applications. Most recent applications are Xft-aware, including - KDE, GNOME, and + KDE, + GNOME, and Firefox. In order to control which fonts are anti-aliased, or to configure anti-aliasing properties, create (or edit, if it already exists) the file /usr/local/etc/fonts/local.conf. Several advanced features of the Xft font system can be tuned using this file; this section describes only some simple possibilities. For more details, please see &man.fonts-conf.5;. XML - This file must be in XML format. Pay careful attention to - case, and make sure all tags are properly closed. The file - begins with the usual XML header followed by a DOCTYPE - definition, and then the <fontconfig> tag: + This file must be in XML format. Pay careful attention + to case, and make sure all tags are properly closed. The + file begins with the usual XML header followed by a DOCTYPE + definition, and then the <fontconfig> + tag: <?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> - <fontconfig> - + <fontconfig> As previously stated, all fonts in /usr/local/lib/X11/fonts/ as well as ~/.fonts/ are already made available to Xft-aware applications. If you wish to add another directory outside of these two directory trees, add a line similar to the following to /usr/local/etc/fonts/local.conf: <dir>/path/to/my/fonts</dir> After adding new fonts, and especially new font directories, you should run the following command to rebuild the font caches: &prompt.root; fc-cache -f - Anti-aliasing makes borders slightly fuzzy, which makes very - small text more readable and removes staircases from - large text, but can cause eyestrain if applied to normal text. To - exclude font sizes smaller than 14 point from anti-aliasing, include - these lines: + Anti-aliasing makes borders slightly fuzzy, which makes + very small text more readable and removes + staircases from large text, but can cause + eyestrain if applied to normal text. To exclude font sizes + smaller than 14 point from anti-aliasing, include these + lines: <match target="font"> <test name="size" compare="less"> <double>14</double> </test> <edit name="antialias" mode="assign"> <bool>false</bool> </edit> </match> <match target="font"> <test name="pixelsize" compare="less" qual="any"> <double>14</double> </test> <edit mode="assign" name="antialias"> <bool>false</bool> </edit> </match> fonts spacing Spacing for some monospaced fonts may also be inappropriate with anti-aliasing. This seems to be an issue with - KDE, in particular. One possible fix for - this is to force the spacing for such fonts to be 100. Add the - following lines: + KDE, in particular. One possible + fix for this is to force the spacing for such fonts to be 100. + Add the following lines: <match target="pattern" name="family"> <test qual="any" name="family"> <string>fixed</string> </test> <edit name="family" mode="assign"> <string>mono</string> </edit> </match> <match target="pattern" name="family"> <test qual="any" name="family"> <string>console</string> </test> <edit name="family" mode="assign"> <string>mono</string> </edit> </match> (this aliases the other common names for fixed fonts as "mono"), and then add: <match target="pattern" name="family"> <test qual="any" name="family"> <string>mono</string> </test> <edit name="spacing" mode="assign"> <int>100</int> </edit> </match> Certain fonts, such as Helvetica, may have a problem when anti-aliased. Usually this manifests itself as a font that seems cut in half vertically. At worst, it may cause applications to crash. To avoid this, consider adding the following to local.conf: <match target="pattern" name="family"> <test qual="any" name="family"> <string>Helvetica</string> </test> <edit name="family" mode="assign"> <string>sans-serif</string> </edit> </match> Once you have finished editing local.conf make sure you end the file - with the </fontconfig> tag. Not doing this will cause - your changes to be ignored. + with the </fontconfig> tag. Not + doing this will cause your changes to be ignored. - Finally, users can add their own settings via their personal - .fonts.conf files. To do this, each user should - simply create a ~/.fonts.conf. This file must - also be in XML format. + Finally, users can add their own settings via their + personal .fonts.conf files. To do + this, each user should simply create a + ~/.fonts.conf. This file must also be + in XML format. LCD screen Fonts LCD screen - One last point: with an LCD screen, sub-pixel sampling may be - desired. This basically treats the (horizontally separated) - red, green and blue components separately to improve the horizontal - resolution; the results can be dramatic. To enable this, add the - line somewhere in the local.conf file: + One last point: with an LCD screen, sub-pixel sampling + may be desired. This basically treats the (horizontally + separated) red, green and blue components separately to + improve the horizontal resolution; the results can be + dramatic. To enable this, add the line somewhere in the + local.conf file: <match target="font"> <test qual="all" name="rgba"> <const>unknown</const> </test> <edit name="rgba" mode="assign"> <const>rgb</const> </edit> - </match> - + </match> Depending on the sort of display, - rgb may need to be changed to bgr, - vrgb or vbgr: experiment and - see which works best. + rgb may need to be changed to + bgr, vrgb or + vbgr: experiment and see which works + best. Seth Kingsley Contributed by The X Display Manager + Overview X Display Manager - The X Display Manager (XDM) is - an optional part of the X Window System that is used for login - session management. This is useful for several types of - situations, including minimal X Terminals, - desktops, and large network display - servers. Since the X Window System is network and protocol - independent, there are a wide variety of possible configurations - for running X clients and servers on different machines - connected by a network. XDM provides - a graphical interface for choosing which display server to - connect to, and entering authorization information such as a - login and password combination. + The X Display Manager (XDM) + is an optional part of the X Window System that is used for + login session management. This is useful for several types + of situations, including minimal X Terminals, + desktops, and large network display servers. Since the X + Window System is network and protocol independent, there are + a wide variety of possible configurations for running X + clients and servers on different machines connected by a + network. XDM provides a graphical + interface for choosing which display server to connect to, + and entering authorization information such as a login and + password combination. Think of XDM as providing the same functionality to the user as the &man.getty.8; utility (see for - details). That is, it performs system logins to the display - being connected to and then runs a session manager on behalf of - the user (usually an X window - manager). XDM then waits for this - program to exit, signaling that the user is done and should be - logged out of the display. At this point, - XDM can display the login and display - chooser screens for the next user to login. + details). That is, it performs system logins to the display + being connected to and then runs a session manager on + behalf of the user (usually an X window manager). + XDM then waits for this program to + exit, signaling that the user is done and should be logged out + of the display. At this point, XDM + can display the login and display chooser screens for the next + user to login. Using XDM - To start using XDM, install the - x11/xdm port (it is not - installed by default in recent versions of - &xorg;). - The XDM daemon program may then be - found in /usr/local/bin/xdm. This program - can be run at any time as root and it will - start managing the X display on the local machine. If - XDM is to be run every + To start using XDM, install + the x11/xdm port (it is + not installed by default in recent versions of + &xorg;). The + XDM daemon program may then be + found in /usr/local/bin/xdm. This + program can be run at any time as root + and it will start managing the X display on the local machine. + If XDM is to be run every time the machine boots up, a convenient way to do this is by adding an entry to /etc/ttys. For more information about the format and usage of this file, see . There is a line in the default /etc/ttys file for running the - XDM daemon on a virtual terminal: + XDM daemon on a virtual + terminal: ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure By default this entry is disabled; in order to enable it change field 5 from off to on and restart &man.init.8; using the - directions in . The first field, the - name of the terminal this program will manage, is + directions in . The first field, + the name of the terminal this program will manage, is ttyv8. This means that XDM will start running on the 9th virtual terminal. Configuring XDM The XDM configuration directory - is located in /usr/local/lib/X11/xdm. In - this directory there are several files used to change the + is located in /usr/local/lib/X11/xdm. + In this directory there are several files used to change the behavior and appearance of XDM. Typically these files will be found: File Description Xaccess Client authorization ruleset. Xresources Default X resource values. Xservers - List of remote and local displays to manage. + List of remote and local displays to + manage. Xsession Default session script for logins. Xsetup_* Script to launch applications before the login interface. xdm-config - Global configuration for all displays running on - this machine. + Global configuration for all displays running + on this machine. xdm-errors Errors generated by the server program. xdm-pid - The process ID of the currently running XDM. + The process ID of the currently running + XDM. - Also in this directory are a few scripts and programs used - to set up the desktop when XDM is - running. The purpose of each of these files will be briefly - described. The exact syntax and usage of all of these files is - described in &man.xdm.1;. + Also in this directory are a few scripts and programs + used to set up the desktop when XDM + is running. The purpose of each of these files will be + briefly described. The exact syntax and usage of all of + these files is described in &man.xdm.1;. The default configuration is a simple rectangular login - window with the hostname of the machine displayed at the top in - a large font and Login: and - Password: prompts below. This is a good starting - point for changing the look and feel of + window with the hostname of the machine displayed at the + top in a large font and Login: and + Password: prompts below. This is a good + starting point for changing the look and feel of XDM screens. Xaccess The protocol for connecting to - XDM-controlled displays is called - the X Display Manager Connection Protocol (XDMCP). This file - is a ruleset for controlling XDMCP connections from remote - machines. It is ignored unless the xdm-config - is changed to listen for remote connections. By default, it does - not allow any clients to connect. + XDM-controlled displays is + called the X Display Manager Connection Protocol (XDMCP). + This file is a ruleset for controlling XDMCP connections + from remote machines. It is ignored unless the + xdm-config is changed to listen for + remote connections. By default, it does not allow any + clients to connect. Xresources + This is an application-defaults file for the display chooser and login screens. In it, the appearance - of the login program can be modified. The format is identical - to the app-defaults file described in the + of the login program can be modified. The format is + identical to the app-defaults file described in the X11 documentation. Xservers + This is a list of the remote displays the chooser should provide as choices. Xsession + This is the default session script for - XDM to run after a user has logged - in. Normally each user will have a customized session script - in ~/.xsession that overrides this - script. + XDM to run after a user has + logged in. Normally each user will have a customized + session script in ~/.xsession that + overrides this script. Xsetup_* + These will be run automatically before displaying the chooser or login interfaces. There is a script for each - display being used, named Xsetup_ followed - by the local display number (for instance - Xsetup_0). Typically these scripts will - run one or two programs in the background such as + display being used, named Xsetup_ + followed by the local display number (for instance + Xsetup_0). Typically these scripts + will run one or two programs in the background such as xconsole. xdm-config + This contains settings in the form of app-defaults that are applicable to every display that this installation manages. xdm-errors + This contains the output of the X servers that - XDM is trying to run. If a display - that XDM is trying to start hangs - for some reason, this is a good place to look for error - messages. These messages are also written to the user's - ~/.xsession-errors file on a per-session - basis. + XDM is trying to run. If a + display that XDM is trying to + start hangs for some reason, this is a good place to look + for error messages. These messages are also written to the + user's ~/.xsession-errors file on a + per-session basis. Running a Network Display Server In order for other clients to connect to the display - server, you must edit the access control rules and enable the connection - listener. By default these are set to conservative values. - To make XDM listen for connections, - first comment out a line in the xdm-config - file: + server, you must edit the access control rules and enable + the connection listener. By default these are set to + conservative values. To make XDM + listen for connections, first comment out a line in the + xdm-config file: ! SECURITY: do not listen for XDMCP or Chooser requests ! Comment out this line if you want to manage X terminals with xdm DisplayManager.requestPort: 0 - and then restart XDM. Remember that - comments in app-defaults files begin with a ! - character, not the usual #. More strict - access controls may be desired — look at the example - entries in Xaccess, and refer to the - &man.xdm.1; manual page for further information. + and then restart XDM. + Remember that comments in app-defaults files begin with a + ! character, not the usual #. + More strict access controls may be desired — look at the + example entries in Xaccess, and refer to + the &man.xdm.1; manual page for further information. Replacements for XDM Several replacements for the default XDM program exist. One of them, KDM (bundled with KDE) is described later in this - chapter. The KDM display manager offers many visual - improvements and cosmetic frills, as well as the - functionality to allow users to choose their window manager - of choice at login time. + chapter. The KDM display + manager offers many visual improvements and cosmetic frills, + as well as the functionality to allow users to choose their + window manager of choice at login time. Valentino Vaschetto Contributed by Desktop Environments This section describes the different desktop environments - available for X on FreeBSD. A desktop environment - can mean anything ranging from a simple window manager to a - complete suite of desktop applications, such as - KDE or GNOME. + available for X on FreeBSD. A desktop + environment can mean anything ranging from a simple + window manager to a complete suite of desktop applications, such + as KDE or + GNOME. GNOME About GNOME GNOME GNOME is a user-friendly desktop environment that enables users to easily use and configure their computers. GNOME includes a panel (for starting applications and displaying status), a desktop (where data and applications can be - placed), a set of standard desktop tools and applications, and - a set of conventions that make it easy for applications to - cooperate and be consistent with each other. Users of other - operating systems or environments should feel right at home - using the powerful graphics-driven environment that + placed), a set of standard desktop tools and applications, + anda set of conventions that make it easy for applications + to cooperate and be consistent with each other. Users of + other operating systems or environments should feel right + at home using the powerful graphics-driven environment that GNOME provides. More information regarding GNOME on FreeBSD can be found on the FreeBSD GNOME - Project's web site. The web site also contains fairly - comprehensive FAQs about installing, configuring, and managing - GNOME. + Project's web site. The web site also contains + fairly comprehensive FAQs about installing, configuring, + and managing GNOME. Installing GNOME - The software can be easily installed from a package or the - Ports Collection: + The software can be easily installed from a package + or the Ports Collection: To install the GNOME package from the network, simply type: &prompt.root; pkg_add -r gnome2 - To build GNOME from source, use - the ports tree: + To build GNOME from source, + use the ports tree: &prompt.root; cd /usr/ports/x11/gnome2 &prompt.root; make install clean - For proper operation, GNOME requires - the /proc filesystem to be mounted. Add + For proper operation, GNOME + requires the /proc filesystem to be + mounted. Add proc /proc procfs rw 0 0 to /etc/fstab to mount &man.procfs.5; automatically during startup. Once GNOME is installed, the X server must be told to start GNOME instead of a default window manager. The easiest way to start GNOME is with GDM, the GNOME Display Manager. GDM is installed as part of the GNOME desktop, although it is disabled by default. It can be enabled by adding this line to /etc/rc.conf: gdm_enable="YES" Once you have rebooted, - GDM will start automatically. + GDM will start + automatically. It is often desirable to start all GNOME services together with GDM. To achieve this, add the following line to /etc/rc.conf: gnome_enable="YES" GNOME may also be started from the command-line by properly configuring a file named .xinitrc. If a custom .xinitrc is already in - place, simply replace the line that starts the current window - manager with one that starts - /usr/local/bin/gnome-session instead. - If nothing special has been done to the configuration file, - then it is enough simply to type: + place, simply replace the line that starts the current + window manager with one that starts + /usr/local/bin/gnome-session + instead. If nothing special has been done to the + configuration file, then it is enough simply to type: &prompt.user; echo "/usr/local/bin/gnome-session" > ~/.xinitrc Next, type startx, and the - GNOME desktop environment will be - started. + GNOME desktop environment will + be started. If an older display manager, like - XDM, is being used, this will not work. - Instead, create an executable .xsession - file with the same command in it. To do this, edit the file - and replace the existing window manager command with + XDM, is being used, this will + not work. Instead, create an executable + .xsession file with the same command + in it. To do this, edit the file and replace the existing + window manager command with /usr/local/bin/gnome-session: &prompt.user; echo "#!/bin/sh" > ~/.xsession &prompt.user; echo "/usr/local/bin/gnome-session" >> ~/.xsession &prompt.user; chmod +x ~/.xsession - Yet another option is to configure the display manager to - allow choosing the window manager at login time; the section on + Yet another option is to configure the display manager + to allow choosing the window manager at login time; the + section on KDE details - explains how to do this for KDM, the - display manager of KDE. + explains how to do this for KDM, + the display manager of + KDE. KDE KDE About KDE KDE is an easy to use - contemporary desktop environment. Some of the things that - KDE brings to the user are: + contemporary desktop environment. Some of the things + that KDE brings to the user + are: A beautiful contemporary desktop - A desktop exhibiting complete network transparency + A desktop exhibiting complete network + transparency An integrated help system allowing for convenient, consistent access to help on the use of the KDE desktop and its applications Consistent look and feel of all KDE applications - Standardized menu and toolbars, keybindings, color-schemes, - etc. + Standardized menu and toolbars, keybindings, + color-schemes, etc. Internationalization: KDE is available in more than 55 languages Centralized, consistent, dialog-driven desktop configuration A great number of useful KDE applications - KDE comes with a web browser called - Konqueror, which is - a solid competitor to other existing web browsers on &unix; - systems. More information on KDE - can be found on the KDE - website. For FreeBSD specific information and - resources on KDE, consult - the KDE/FreeBSD - initiative's website. - - There are two versions of KDE - available on FreeBSD. Version 3 has been around for a long - time, and is still available in the Ports Collection though - it's now unmaintained and partially broken. Version 4 is + KDE comes with a web + browser called Konqueror, which + is a solid competitor to other existing web browsers on + &unix; systems. More information on + KDE can be found on the KDE website. For FreeBSD + specific information and resources on + KDE, consult the KDE/FreeBSD + initiative's website. + + There are two versions of + KDE available on FreeBSD. + Version 3 has been around for a long time, and is still + available in the Ports Collection though it's now + unmaintained and partially broken. Version 4 is punctually updated and is the default choice for KDE users. They can even be installed side by side. Installing KDE Just as with GNOME or any - other desktop environment, the software can be easily installed - from a package or the Ports Collection: + other desktop environment, the software can be easily + installed from a package or the Ports Collection: To install the KDE 3 package from the network, type: &prompt.root; pkg_add -r kde To install the KDE 4 package from the network, type: &prompt.root; pkg_add -r kde4 - &man.pkg.add.1; will automatically fetch the latest version - of the application. + &man.pkg.add.1; will automatically fetch the latest + version of the application. To build KDE 3 from source, use the ports tree: &prompt.root; cd /usr/ports/x11/kde3 &prompt.root; make install clean To build KDE 4 from source, use the ports tree: &prompt.root; cd /usr/ports/x11/kde4 &prompt.root; make install clean After KDE has been installed, the X server must be told to launch this application instead of the default window manager. This is accomplished by editing the .xinitrc file: For KDE 3: &prompt.user; echo "exec startkde" > ~/.xinitrc For KDE 4: &prompt.user; echo "exec /usr/local/kde4/bin/startkde" > ~/.xinitrc Now, whenever the X Window System is invoked with startx, KDE will be the desktop. If a display manager such as XDM is being used, the configuration is slightly different. Edit the .xsession file instead. Instructions for KDM are described later in this chapter. - More Details on KDE - - Now that KDE is installed on - the system, most things can be discovered through the - help pages, or just by pointing and clicking at various menus. - &windows; or &mac; users will feel quite at home. - - The best reference for KDE is - the on-line documentation. KDE - comes with its own web browser, - Konqueror, dozens of useful - applications, and extensive documentation. The remainder of - this section discusses the technical items that are - difficult to learn by random exploration. + More Details on KDE + + Now that KDE is installed + on the system, most things can be discovered through the + help pages, or just by pointing and clicking at various + menus. &windows; or &mac; users will feel quite at + home. + + The best reference for KDE + is the on-line documentation. + KDE comes with its own web + browser, Konqueror, dozens of + useful applications, and extensive documentation. The + remainder of this section discusses the technical items + that are difficult to learn by random exploration. The KDE Display Manager KDE display manager - An administrator of a multi-user system may wish to have - a graphical login screen to welcome users. - XDM can be - used, as described earlier. However, - KDE includes an - alternative, KDM, which is designed - to look more attractive and include more login-time options. - In particular, users can easily choose (via a menu) which - desktop environment (KDE, - GNOME, or something else) to run - after logging on. - - To enable KDM, different files - need to be edited depending on the version of + An administrator of a multi-user system may wish to + have a graphical login screen to welcome users. + XDM can be used, as described + earlier. However, KDE includes + an alternative, KDM, which is + designed to look more attractive and include more login-time + options. In particular, users can easily choose (via a + menu) which desktop environment + (KDE, + GNOME, or something else) to + run after logging on. + + To enable KDM, different + files need to be edited depending on the version of KDE. - For KDE 3, the ttyv8 - entry in /etc/ttys has to be adapted as + For KDE 3, the + ttyv8 entry in + /etc/ttys has to be adapted as follows: ttyv8 "/usr/local/bin/kdm -nodaemon" xterm on secure For KDE 4, you have to mount &man.procfs.5; and add the following line to /etc/rc.conf: kdm4_enable="YES" Xfce + About Xfce Xfce is a desktop environment based on the GTK+ - toolkit used by GNOME, but is much - more lightweight and meant for those who want a simple, + toolkit used by GNOME, but is + much more lightweight and meant for those who want a simple, efficient desktop which is nevertheless easy to use and configure. Visually, it looks very much like CDE, found on commercial &unix; systems. Some of Xfce's features are: A simple, easy-to-handle desktop Fully configurable via mouse, with drag and drop, etc. - Main panel similar to CDE, with - menus, applets and applications launchers + Main panel similar to + CDE, with menus, applets + and applications launchers - Integrated window manager, file manager, sound manager, - GNOME compliance module, and more + Integrated window manager, file manager, sound + manager, GNOME compliance + module, and more Themeable (since it uses GTK+) - Fast, light and efficient: ideal for older/slower machines - or machines with memory limitations + Fast, light and efficient: ideal for older/slower + machines or machines with memory limitations More information on Xfce can be found on the Xfce website. Installing Xfce A binary package for Xfce - exists (at the time of writing). To install, simply type: + exists (at the time of writing). To install, simply + type: &prompt.root; pkg_add -r xfce4 Alternatively, to build from source, use the Ports Collection: &prompt.root; cd /usr/ports/x11-wm/xfce4 &prompt.root; make install clean Now, tell the X server to launch Xfce the next time X is started. Simply type this: &prompt.user; echo "/usr/local/bin/startxfce4" > ~/.xinitrc The next time X is started, Xfce will be the desktop. As before, if a display manager like XDM is being used, create an .xsession, as described in the section on GNOME, but with the /usr/local/bin/startxfce4 command; or, configure the display manager to allow choosing a desktop at login time, as explained in - the section on kdm. + the section on + kdm. -