diff --git a/documentation/content/en/books/handbook/desktop/_index.adoc b/documentation/content/en/books/handbook/desktop/_index.adoc index 9f44263803..f2b114d4c6 100644 --- a/documentation/content/en/books/handbook/desktop/_index.adoc +++ b/documentation/content/en/books/handbook/desktop/_index.adoc @@ -1,1146 +1,1146 @@ --- title: Chapter 7. Desktop Environments part: Part II. Common Tasks prev: books/handbook/partii next: books/handbook/multimedia description: This chapter demonstrates how to install numerous desktop environments, including web browsers, productivity software, document viewers, and financial software tags: ["desktop", "KDE Plasma", "GNOME", "XFCE", "MATE", "Cinnamon", "LXQT", "browsers", "Firefox", "Chromium", "Iridium", "Falkon", "Konqueror", "Epiphany", "qutebrowser", "Dillo", "Links", "w3m", "Development tools", "Visual Studio Code", "Qt Creator", "Kdevelop", "Eclipse IDE", "Vim", "Neovim", "GNU Emacs", "Productivity", "LibreOffice", "Calligra", "AbiWord", "Viewers", "Okular", "Evince", "ePDFView", "Xpdf", "Finance", "KMyMoney", "GnuCash"] showBookMenu: true weight: 10 path: "/books/handbook/" aliases: ["/en/books/handbook/desktop-browsers/","/en/books/handbook/desktop-productivity/","/en/books/handbook/desktop-viewers/","/en/books/handbook/desktop-finance/"] --- [[desktop]] = Desktop Environments :doctype: book :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 :sectnumoffset: 7 :partnums: :source-highlighter: rouge :experimental: :images-path: books/handbook/desktop/ ifdef::env-beastie[] ifdef::backend-html5[] :imagesdir: ../../../../images/{images-path} endif::[] ifndef::book[] include::shared/authors.adoc[] include::shared/mirrors.adoc[] include::shared/releases.adoc[] include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists.adoc[] include::shared/{{% lang %}}/urls.adoc[] toc::[] endif::[] ifdef::backend-pdf,backend-epub3[] include::../../../../../shared/asciidoctor.adoc[] endif::[] endif::[] ifndef::env-beastie[] toc::[] include::../../../../../shared/asciidoctor.adoc[] endif::[] [[desktop-synopsis]] == Synopsis While FreeBSD is popular as a server for its performance and stability, it is also well suited for day-to-day use as a desktop. With over {numports} applications available in the FreeBSD ports tree, it is straightforward to build a customized desktop that can run a wide variety of desktop applications. -This chapter demonstrates how to install popular desktop environments as well as desktop application such as web browsers, productivity software, document viewers, and financial software. +This chapter demonstrates how to install popular desktop environments as well as desktop applications such as web browsers, productivity software, document viewers, and financial software. Prerequisites: -* Readers of this chapter should already understand how to either install either the crossref:x11[x11,X Window System] or crossref:wayland[wayland,Wayland] on FreeBSD. +* Readers of this chapter should already understand how to install either the crossref:x11[x11,X Window System] or crossref:wayland[wayland,Wayland] on FreeBSD. * Readers are instructed throughout this chapter to install official packages. Refer to the section on crossref:ports[ports-using,using the ports collection] to build customized packages from ports. [[desktop-environments]] == Desktop Environments This section describes how to install and configure some popular desktop environments on a FreeBSD system. A desktop environment can range from a simple window manager to a complete suite of desktop applications. .Supported desktop environments [options="header", cols="1,1,1"] |=== | Name | License | Package | KDE Plasma | GPL 2.0 or later | x11/kde5 | GNOME | GPL 2.0 or later | x11/gnome | XFCE | GPL, LGPL, BSD | x11-wm/xfce4 | MATE | GPL 2.0, LGPL 2.0 | x11/mate | Cinnamon | GPL 2.0 or later | x11/cinnamon | LXQT | GPL, LGPL | x11-wm/lxqt |=== [[kde-environment]] === KDE Plasma KDE Plasma is an easy-to-use desktop environment. This desktop provides a suite of applications with a consistent look and feel, a standardized menu and toolbars, keybindings, color-schemes, internationalization, and a centralized, dialog-driven desktop configuration. More information on KDE can be found at the link:https://kde.org/[KDE homepage]. For FreeBSD-specific information, consult the link:https://freebsd.kde.org/[FreeBSD homepage at KDE]. [[kde-meta-install]] ==== Install KDE Plasma meta package To install the KDE Plasma meta package with KDE Frameworks, Plasma Desktop and Applications execute: [source,shell] .... # pkg install kde5 .... [[kde-minimal-install]] ==== Minimal KDE Plasma installation To install a minimal KDE Plasma execute: [source,shell] .... # pkg install plasma5-plasma .... [TIP] ==== -This is installation is *really* minimal. +This installation is *really* minimal. Konsole must be installed separately executing: [source,shell] .... # pkg install konsole .... ==== [[kde-configuration]] ==== Configure KDE Plasma KDE Plasma requires `/proc` to be mounted. Add this line to `/etc/fstab` to mount this file system automatically during system startup: [.programlisting] .... # Device Mountpoint FStype Options Dump Pass# proc /proc procfs rw 0 0 .... KDE Plasma uses man:dbus-daemon[1] for a message bus and hardware abstraction. -This application is automatically installed as dependencies of KDE Plasma. +This application is automatically installed as a dependency of KDE Plasma. Enable D-BUS service in `/etc/rc.conf` to start at system boot: [source,shell] .... # sysrc dbus_enable="YES" .... To increase messages size execute: [source,shell] .... sysctl net.local.stream.recvspace=65536 sysctl net.local.stream.sendspace=65536 .... [[kde-start]] ==== Start KDE Plasma -Preferred KDE Plasma display manager is package:x11/sddm[]. -To install package:x11/sddm[] execute: +The preferred KDE Plasma display manager is package:x11/sddm[]. +To install package:x11/sddm[], execute: [source,shell] .... # pkg install sddm .... Enable SDDM service in `/etc/rc.conf` to start at system boot: [source,shell] .... # sysrc sddm_enable="YES" .... -The keyboard language can be set in SDDM by running the following command: +The keyboard language can be set in SDDM by running the following command (for Spanish, for example): [source,shell] .... # sysrc sddm_lang="es_ES" .... A second method to start KDE Plasma is by manually invoking man:startx[1]. For this to work, the following line is needed in ~/.xinitrc: [source,shell] .... % echo "exec ck-launch-session startplasma-x11" > ~/.xinitrc .... [[gnome-environment]] === GNOME GNOME is a user-friendly desktop environment. It includes a panel for starting applications and displaying status, a desktop, a set of tools and applications, and a set of conventions that make it easy for applications to cooperate and be consistent with each other. [[gnome-meta-install]] ==== Install GNOME meta pacakge -To install the GNOME meta pacakge with GNOME Desktop and Applications execute: +To install the GNOME meta package with GNOME Desktop and Applications, execute: [source,shell] .... # pkg install gnome .... [[gnome-minimal-install]] ==== Minimal GNOME installation -To install the GNOME lite meta package with GNOME desktop slimmed down for only the basics execute: +To install the GNOME-lite meta package with a GNOME desktop slimmed down for only the basics, execute: [source,shell] .... # pkg install gnome-lite .... [[gnome-configuration]] ==== Configure GNOME GNOME requires `/proc` to be mounted. Add this line to `/etc/fstab` to mount this file system automatically during system startup: [.programlisting] .... # Device Mountpoint FStype Options Dump Pass# proc /proc procfs rw 0 0 .... GNOME uses man:dbus-daemon[1] for a message bus and hardware abstraction. -This application is automatically installed as dependencies of GNOME. +This application is automatically installed as a dependency of GNOME. Enable D-BUS service in `/etc/rc.conf` to start at system boot: [source,shell] .... # sysrc dbus_enable="YES" .... It is often desirable to also start all GNOME services. Enable GNOME services in `/etc/rc.conf` to start at system boot: [source,shell] .... # sysrc gnome_enable="YES" .... [[gnome-start]] ==== Start GNOME GNOME Display Manager is the preferred display manager for GNOME. GDM is installed as part of the GNOME package. Enable GDM in `/etc/rc.conf` to start at system boot: [source,shell] .... # sysrc gdm_enable="YES" .... A second method to start GNOME is by manually invoking man:startx[1]. -For this to work, the following line is needed in ~/.xinitrc: +For this to work, the following line is needed in `~/.xinitrc`: [source,shell] .... % echo "exec gnome-session" > ~/.xinitrc .... [[xfce-environment]] === XFCE XFCE is a desktop environment based on the GTK+, lightweight and provides a simple, efficient, easy-to-use desktop. It is fully configurable, has a main panel with menus, applets, and application launchers, provides a file manager and sound manager, and is themeable. Since it is fast, light, and efficient, it is ideal for older or slower machines with memory limitations. [[xfce-install]] ==== Install XFCE -To install the XFCE meta package execute: +To install the XFCE meta package, execute: [source,shell] .... # pkg install xfce .... [[xfce-configuration]] ==== Configure XFCE XFCE requires `/proc` to be mounted. Add this line to `/etc/fstab` to mount this file system automatically during system startup: [.programlisting] .... # Device Mountpoint FStype Options Dump Pass# proc /proc procfs rw 0 0 .... XFCE uses man:dbus-daemon[1] for a message bus and hardware abstraction. -This application is automatically installed as dependencies of XFCE. +This application is automatically installed as a dependency of XFCE. Enable D-BUS in `/etc/rc.conf` to start at system boot: [source,shell] .... # sysrc dbus_enable="YES" .... [[xfce-start]] ==== Start XFCE package:x11/lightdm[] is a display manager that supports different display technologies and is a good choice as it is very lightweight, requires little memory usage, and has fast performance. -To install it execute: +To install it, execute: [source,shell] .... # pkg install lightdm lightdm-gtk-greeter .... Enable lightdm in `/etc/rc.conf` to start at system boot: [source,shell] .... # sysrc lightdm_enable="YES" .... A second method to start XFCE is by manually invoking man:startx[1]. -For this to work, the following line is needed in ~/.xinitrc: +For this to work, the following line is needed in `~/.xinitrc`: [source,shell] .... % echo '. /usr/local/etc/xdg/xfce4/xinitrc' > ~/.xinitrc .... [[mate-environment]] === MATE The MATE Desktop Environment is the continuation of GNOME 2. +// What does "traditional metaphors" mean? It provides an intuitive and attractive desktop environment using traditional metaphors. [[mate-meta-install]] ==== Install MATE meta package -To install the MATE meta package with MATE Desktop with some extra applications such as text editor, archiver manager, etc. execute: +To install the MATE meta package that includes the MATE Desktop with some extra applications such as text editor, archiver manager, etc., execute: [source,shell] .... # pkg install mate .... [[mate-minimal-install]] ==== Minimal MATE installation -To install the MATE lite meta package with MATE desktop slimmed down for only the basics execute: +To install the MATE lite meta package with MATE desktop slimmed down for only the basics, execute: [source,shell] .... # pkg install mate-base .... [[mate-configuration]] ==== Configure MATE MATE requires `/proc` to be mounted. Add this line to `/etc/fstab` to mount this file system automatically during system startup: [.programlisting] .... # Device Mountpoint FStype Options Dump Pass# proc /proc procfs rw 0 0 .... MATE uses man:dbus-daemon[1] for a message bus and hardware abstraction. -This application is automatically installed as dependencies of MATE. +This application is automatically installed as a dependency of MATE. Enable D-BUS in `/etc/rc.conf` to start at system boot: [source,shell] .... # sysrc dbus_enable="YES" .... [[mate-start]] ==== Start MATE package:x11/lightdm[] is a display manager that supports different display technologies and is a good choice as it is very lightweight, requires little memory usage, and has fast performance. -To install it execute: +To install it, execute: [source,shell] .... # pkg install lightdm lightdm-gtk-greeter .... Enable lightdm in `/etc/rc.conf` to start at system boot: [source,shell] .... # sysrc lightdm_enable="YES" .... A second method to start MATE is by manually invoking man:startx[1]. -For this to work, the following line is needed in ~/.xinitrc: +For this to work, the following line is needed in `~/.xinitrc`: [source,shell] .... % echo "exec ck-launch-session mate-session" > ~/.xinitrc .... [[cinnamon-environment]] === Cinnamon Cinnamon is a UNIX(R) desktop which provides advanced innovative features and a traditional user experience. The desktop layout is similar to Gnome 2. The underlying technology is forked from Gnome Shell. The emphasis is put on making users feel at home and providing them with an easy to use and comfortable desktop experience. [[cinnamon-install]] === Install Cinnamon -To install the Cinnamon package execute: +To install the Cinnamon package, execute: [source,shell] .... # pkg install cinnamon .... [[cinnamon-configuration]] ==== Configure Cinnamon Cinnamon requires `/proc` to be mounted. Add this line to `/etc/fstab` to mount this file system automatically during system startup: [.programlisting] .... # Device Mountpoint FStype Options Dump Pass# proc /proc procfs rw 0 0 .... Cinnamon uses man:dbus-daemon[1] for a message bus and hardware abstraction. -This application is automatically installed as dependencies of Cinnamon. +This application is automatically installed as a dependency of Cinnamon. Enable D-BUS in `/etc/rc.conf` to start at system boot: [source,shell] .... # sysrc dbus_enable="YES" .... [[cinnamon-start]] ==== Start Cinnamon package:x11/lightdm[] is a display manager that supports different display technologies and is a good choice as it is very lightweight, requires little memory usage, and has fast performance. To install it execute: [source,shell] .... # pkg install lightdm lightdm-gtk-greeter .... Enable lightdm in `/etc/rc.conf` to start at system boot: [source,shell] .... # sysrc lightdm_enable="YES" .... A second method to start Cinnamon is by manually invoking man:startx[1]. -For this to work, the following line is needed in ~/.xinitrc: +For this to work, the following line is needed in `~/.xinitrc`: [source,shell] .... % echo "exec ck-launch-session cinnamon-session" > ~/.xinitrc .... [[lxqt-environment]] === LXQT LXQt is an advanced, easy-to-use, and fast desktop environment based on Qt technologies. It has been tailored for users who value simplicity, speed, and an intuitive interface. Unlike most desktop environments, LXQt also works fine with less powerful machines. [[lxqt-install]] ==== Install LXQT -To install the LXQT meta package execute: +To install the LXQT meta package, execute: [source,shell] .... # pkg install lxqt .... [[lxqt-configuration]] ==== Configure LXQT LXQT requires `/proc` to be mounted. Add this line to `/etc/fstab` to mount this file system automatically during system startup: [.programlisting] .... # Device Mountpoint FStype Options Dump Pass# proc /proc procfs rw 0 0 .... LXQT uses man:dbus-daemon[1] for a message bus and hardware abstraction. -This application is automatically installed as dependencies of LXQT. +This application is automatically installed as a dependency of LXQT. Enable D-BUS in `/etc/rc.conf` to start at system boot: [source,shell] .... # sysrc dbus_enable="YES" .... [[lxqt-start]] ==== Start LXQT -Preferred LXQT display manager is package:x11/sddm[]. -To install package:x11/sddm[] execute: +The preferred LXQT display manager is package:x11/sddm[]. +To install package:x11/sddm[], execute: [source,shell] .... # pkg install sddm .... Enable SDDM service in `/etc/rc.conf` to start at system boot: [source,shell] .... # sysrc sddm_enable="YES" .... -The keyboard language can be set in SDDM by running the following command: +The keyboard language can be set in SDDM by running the following command (for example, for Spanish): [source,shell] .... # sysrc sddm_lang="es_ES" .... A second method to start LXQT is by manually invoking man:startx[1]. -For this to work, the following line is needed in ~/.xinitrc: +For this to work, the following line is needed in `~/.xinitrc`: [source,shell] .... % echo "exec ck-launch-session startlxqt" > ~/.xinitrc .... [[desktop-browsers]] == Browsers -This section describes how to install and configure some popular web browsers on a FreeBSD system, -from full web browsers with high resource consumption to command line web browsers with reduced resource usage. +This section describes how to install and configure some popular web browsers on a FreeBSD system, from full web browsers with high resource consumption to command line web browsers with reduced resource usage. -.Supported browser +.Supported browsers [options="header", cols="1,1,1,1"] |=== | Name | License | Package | Resources Needed | Firefox | MPL 2.0 | package:www/firefox[] | Heavy | Chromium | BSD-3 and others | package:www/chromium[] | Heavy | Iridium browser | BSD-3 and others | package:www/iridium[] | Heavy | Falkon | MPL 2.0 | package:www/firefox[] | Heavy | Konqueror | GPL 2.0 or later | package:x11-fm/konqueror[] | Medium | Gnome Web (Epiphany) | GPL 3.0 or later | package:www/epiphany[] | Medium | qutebrowser | GPL 3.0 or later | package:www/qutebrowser[] | Medium | Dillo | GPL 3.0 or later | package:www/dillo2[] | Light | Links | GPL 2.0 or later | package:www/links[] | Light | w3m | MIT | package:www/w3m[] | Light |=== [[firefox]] === Firefox Firefox is an open source browser that features a standards-compliant HTML display engine, tabbed browsing, popup blocking, extensions, improved security, and more. Firefox is based on the Mozilla codebase. -To install the package of the latest release version of Firefox execute: +To install the package of the latest release version of Firefox, execute: [source,shell] .... # pkg install firefox .... -To instead install Firefox Extended Support Release (ESR) version execute: +To instead install Firefox Extended Support Release (ESR) version, execute: [source,shell] .... # pkg install firefox-esr .... [[chromium]] === Chromium Chromium is an open source browser project that aims to build a safer, faster, and more stable web browsing experience. Chromium features tabbed browsing, popup blocking, extensions, and much more. Chromium is the open source project upon which the Google Chrome web browser is based. -To install Chromium execute: +To install Chromium, execute: [source,shell] .... # pkg install chromium .... [NOTE] ==== The executable for Chromium is [.filename]#/usr/local/bin/chrome#, not [.filename]#/usr/local/bin/chromium#. ==== [[iridium]] === Iridium browser Iridium is a free, open, and libre browser modification of the Chromium code base, with privacy being enhanced in several key areas. Automatic transmission of partial queries, keywords, metrics to central services is inhibited and only occurs with consent. -To install Iridium execute: +To install Iridium, execute: [source,shell] .... # pkg install iridium .... [[falkon]] === Falkon Falkon is a new-ish and very fast QtWebEngine browser. It aims to be a lightweight web browser available on all major platforms. Falkon has all standard functions you expect from a web browser. It includes bookmarks, history (both also in sidebar) and tabs. Beyond that, you block ads with a builtin AdBlock plugin, block Flash content with Click2Flash and edit the local CA Certificates database with an SSL Manager. -To install Falkon execute: +To install Falkon, execute: [source,shell] .... # pkg install falkon .... [[konqueror]] === Konqueror Konqueror is more than a web browser as it is also a file manager and a multimedia viewer. -Supports WebKit as well as its own KHTML. -WebKit is a rendering engine used by many modern browsers including Chromium. +It supports WebKit, a rendering engine used by many modern browsers including Chromium, as well as its own KHTML engine. -To install Konqueror execute: +To install Konqueror, execute: [source,shell] .... # pkg install konqueror .... [[gnome-web-epiphany]] === Gnome Web (Epiphany) Gnome Web (Epiphany) is a web browser designed to be as lightweight and fast as possible, at the expense of many of the features found in other browsers. -To install Gnome Web (Epiphany) execute: +To install Gnome Web (Epiphany), execute: [source,shell] .... -# pkg install konqueror +# pkg install epiphany .... [[qutebrowser]] === qutebrowser Qutebrowser is a keyboard-focused browser with a minimal GUI. -It's based on Python and PyQt5 and free software, licensed under the GPL. +It is based on Python and PyQt5 and free software, licensed under the GPL. +// What are these and how does this information help in this context? It was inspired by other browsers/addons like dwb and Vimperator/Pentadactyl. -To install qutebrowser execute: +To install qutebrowser, execute: [source,shell] .... # pkg install qutebrowser .... [[dillo]] === Dillo -Dillo aims to be a multiplatform alternative browser that's small, stable, developer-friendly, usable, fast, and extensible. +Dillo aims to be a multiplatform alternative browser that is small, stable, developer-friendly, usable, fast, and extensible. This new, experimental version of Dillo is based upon FLTK toolkit, rather than GTK1, and has been substantially rewritten. -To install Dillo execute: +To install Dillo, execute: [source,shell] .... # pkg install dillo2 .... [[links]] === Links -Lynx-like WWW browser with text and graphics modes with many features like displaying tables, menus, etc. +A lynx-like WWW browser with text and graphics modes with many features like displaying tables, menus, etc. -To install Links execute: +To install Links, execute: [source,shell] .... # pkg install links .... [[w3m]] === w3m w3m is a pager/text-based web browser. It is a similar application to Lynx, but it has several features Lynx doesn't have like rendering tables and rendering frames. -To install w3m execute: +To install w3m, execute: [source,shell] .... # pkg install w3m .... [[desktop-development]] == Development tools This section describes how to install and configure some popular development tools on a FreeBSD system. .Supported development tools [options="header", cols="1,1,1,1"] |=== | Name | License | Package | Resources Needed | Visual Studio Code | MIT | package:editors/vscode[] | Heavy | Qt Creator | QtGPL | package:devel/qtcreator[] | Heavy | Kdevelop | GPL 2.0 or later and LGPL 2.0 or later | package:devel/kdevelop[] | Heavy | Eclipse IDE | EPL | package:java/eclipse[] | Heavy | Vim | VIM | package:editors/vim[] | Light | Neovim | Apache 2.0 | package:editors/neovim[] | Light | GNU Emacs | GPL 3.0 or later | package:editors/emacs[] | Light |=== [[vs-code]] === Visual Studio Code Visual Studio Code is a type of tool that combines the simplicity of a code editor with what developers need for their core edit-build-debug cycle. It provides comprehensive editing and debugging support, an extensibility model, and lightweight integration with existing tools. -To install Visual Studio Code execute: +To install Visual Studio Code, execute: [source,shell] .... # pkg install vscode .... [[qt-creator]] === Qt Creator Qt Creator is a cross-platform IDE (integrated development environment) tailored to the needs of Qt developers. Functionalities included with Qt Creator are: * code editor with C++, QML and ECMAscript support; * rapid code navigation tools; * static code checking and style hints as you type; * context sensitive help; * visual debugger; * integrated GUI layout and forms designer. -To install Qt Creator execute: +To install Qt Creator, execute: [source,shell] .... # pkg install qtcreator .... [[kdevelop]] === kdevelop Open source, feature-full, plugin extensible IDE for C/C++ and other programming languages. -It is based on KDevPlatform and the KDE and Qt libraries, and it's under development since 1998. +It is based on KDevPlatform and the KDE and Qt libraries, and it has been under development since 1998. -To install kdevelop execute: +To install kdevelop, execute: [source,shell] .... # pkg install kdevelop .... [[eclipse]] === Eclipse IDE The Eclipse Platform is an open extensible IDE for anything and yet nothing in particular. The Eclipse Platform provides building blocks and a foundation for constructing and running integrated software-development tools. The Eclipse Platform allows tool builders to independently develop tools that integrate with other people's tools. -To install Eclipse IDE execute: +To install Eclipse IDE, execute: [source,shell] .... # pkg install eclipse .... [[vim]] === Vim Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems. Vim is often called a "programmer's editor," and so useful for programming that many consider it an entire IDE. It's not just for programmers, though. Vim is perfect for all kinds of text editing, from composing email to editing configuration files. -To install Vim execute: +To install Vim, execute: [source,shell] .... # pkg install vim .... [[neovim]] === Neovim Neovim is an aggressive refactor of package:editors/vim[]. It represents a complete overhaul of the codebase with many sanity improvements, including sensible defaults, a built-in terminal emulator, asynchronous plugin architecture, and powerful APIs designed for speed and extensibility. It retains full compatibility with almost all Vim plugins and scripts. -To install Neovim execute: +To install Neovim, execute: [source,shell] .... # pkg install neovim .... [[gnu-emacs]] === GNU Emacs GNU Emacs is an extensible, customizable, free/libre text editor. At its core is an interpreter for Emacs Lisp, a dialect of the Lisp programming language with extensions to support text editing. -To install GNU Emacs execute: +To install GNU Emacs, execute: [source,shell] .... # pkg install emacs .... [[desktop-productivity]] == Desktop office productivity When it comes to productivity, users often look for an office suite or an easy-to-use word processor. While some desktop environments like <> provide an office suite, there is no default productivity package. Several office suites and graphical word processors are available for FreeBSD, regardless of the installed desktop environments. This section demonstrates how to install the following popular productivity software and indicates if the application is resource-heavy, takes time to compile from ports, or has any major dependencies. .Supported Desktop office productivity suites [options="header", cols="1,1,1,1"] |=== | Name | License | Package | Resources Needed | LibreOffice | MPL 2.0 | package:editors/libreoffice[] | Heavy | Calligra Suite | LGPL and GPL | package:editors/calligra[] | Medium | AbiWord | GPL 2.0 or later | package:editors/abiword[] | Medium |=== [[libreoffice]] === LibreOffice LibreOffice is a free software office suite developed by http://www.documentfoundation.org/[The Document Foundation]. It is compatible with other major office suites and available on a variety of platforms. It is a rebranded fork of Apache OpenOffice and includes applications found in a complete office productivity suite: a word processor, spreadsheet, presentation manager, drawing program, database management program, and a tool for creating and editing mathematical formulæ. It is available in a number of different languages and internationalization has been extended to interfaces, spell checkers, and dictionaries. More information about LibreOffice can be found at http://www.libreoffice.org/[libreoffice.org]. -To install LibreOffice execute: +To install LibreOffice, execute: [source,shell] .... # pkg install libreoffice .... The LibreOffice package comes by default only in English. -To have a localized version of LibreOffice it is necessary to install the language pack. +To have a localized version of LibreOffice it is necessary to install a language pack. For example, for the version localized in Spanish, it is necessary to install the package package:editors/libreoffice-es[] with the command: [source,shell] .... # pkg install libreoffice-es .... [[calligra]] === Calligra The KDE Plasma desktop environment includes an office suite which can be installed separately from KDE Plasma. Calligra includes standard components that can be found in other office suites. Words is the word processor, Sheets is the spreadsheet program, Stage manages slide presentations, and Karbon is used to draw graphical documents. -To install Calligra execute: +To install Calligra, execute: [source,shell] .... # pkg install calligra .... [[abiword]] === AbiWord AbiWord is a free word processing program similar in look and feel to Microsoft(R) Word. It is fast, contains many features, and is user-friendly. AbiWord can import or export many file formats, including some proprietary ones like Microsoft(R) [.filename]#.rtf#. -To install AbiWord execute: +To install AbiWord, execute: [source,shell] .... # pkg install abiword .... [[desktop-viewers]] == Document Viewers Some new document formats have gained popularity since the advent of UNIX(R) and the viewers they require may not be available in the base system. This section demonstrates how to install the following document viewers: .Supported Document Viewers [options="header", cols="1,1,1,1"] |=== | Name | License | Package | Resources Needed | Okular | GPL 2.0 | package:graphics/okular[] | Heavy | Evince | GPL 2.0 | package:graphics/evince[] | Medium | ePDFView | GPL 2.0 | package:graphics/epdfview[] | Medium | Xpdf | GPL 2.0 | package:graphics/xpdf[] | light |=== [[okular]] === Okular Okular is a universal document viewer, part of the KDE Plasma project. -Okular combines the excellent functionalities with the versatility of supporting different kind of documents, like PDF, Postscript, DjVu, CHM, XPS, ePub and others. +Okular combines excellent functionality with the versatility of supporting different kind of documents, like PDF, Postscript, DjVu, CHM, XPS, ePub and others. -To install Okular execute: +To install Okular, execute: [source,shell] .... # pkg install okular .... [[evince]] === Evince Evince is a document viewer for multiple document formats including PDF and Postscript. Part of the GNOME project. The goal of evince is to replace document viewers such as ggv and gpdf with a single, simple application. -To install Evince execute: +To install Evince, execute: [source,shell] .... # pkg install evince .... [[epdfview]] === ePDFView ePDFView is a lightweight PDF document viewer that only uses the Gtk+ and Poppler libraries. -The aim of ePDFView is to make a simple PDF document viewer, in the lines of Evince but without using the GNOME libraries. +The aim of ePDFView is to make a simple PDF document viewer, similar to Evince but without using the GNOME libraries. -To install ePDFView execute: +To install ePDFView, execute: [source,shell] .... # pkg install epdfview .... [[xpdf]] === Xpdf For users that prefer a small FreeBSD PDF viewer, Xpdf provides a light-weight and efficient viewer which requires few resources. It uses the standard X fonts and does not require any additional toolkits. -To install Xpdf execute: +To install Xpdf, execute: [source,shell] .... # pkg install xpdf .... [[desktop-finance]] == Finance For managing personal finances on a FreeBSD desktop, some powerful and easy-to-use applications can be installed. Some are compatible with widespread file formats, such as the formats used by Quicken and Excel. This section covers these programs: .Supported Finance programs [options="header", cols="1,1,1,1"] |=== | Name | License | Package | Resources Needed | KMyMoney | GPL 2.0 | package:finance/kmymoney[] | Heavy | GnuCash | GPL 2.0 and GPL 3.0 | package:finance/gnucash[] | Heavy |=== [[kmymoney]] === KMyMoney KMyMoney is a personal finance application created by the KDE community. KMyMoney aims to provide the important features found in commercial personal finance manager applications. It also highlights ease-of-use and proper double-entry accounting among its features. KMyMoney imports from standard Quicken QIF files, tracks investments, handles multiple currencies, and provides a wealth of reports. -To install KMyMoney execute: +To install KMyMoney, execute: [source,shell] .... # pkg install kmymoney .... [[gnucash]] === GnuCash GnuCash is part of the GNOME effort to provide user-friendly, yet powerful, applications to end-users. GnuCash can be used to keep track of income and expenses, bank accounts, and stocks. It features an intuitive interface while remaining professional. GnuCash provides a smart register, a hierarchical system of accounts, and many keyboard accelerators and auto-completion methods. It can split a single transaction into several more detailed pieces. GnuCash can import and merge Quicken QIF files. It also handles most international date and currency formats. -To install GnuCash execute: +To install GnuCash, execute: [source,shell] .... # pkg install gnucash .... diff --git a/documentation/content/en/books/handbook/x11/_index.adoc b/documentation/content/en/books/handbook/x11/_index.adoc index 4b2f19074d..523d9d2d2e 100644 --- a/documentation/content/en/books/handbook/x11/_index.adoc +++ b/documentation/content/en/books/handbook/x11/_index.adoc @@ -1,824 +1,824 @@ --- title: Chapter 5. The X Window System part: Part I. Getting Started prev: books/handbook/ports next: books/handbook/wayland description: This chapter describes how to install and configure Xorg on FreeBSD, which provides the open source X Window System used to provide a graphical environment tags: ["X11", "Xorg", "TrueType", "Intel", "AMD", "NVIDIA", "Anti-Aliased", "VESA", "SCFB"] showBookMenu: true weight: 7 path: "/books/handbook/" aliases: ["/en/books/handbook/x-understanding/","/en/books/handbook/x-install/","/en/books/handbook/x-config/","/en/books/handbook/x-fonts/","/en/books/handbook/x-xdm/","/en/books/handbook/x11-wm/","/en/books/handbook/x-compiz-fusion/","/en/books/handbook/x11-troubleshooting/"] --- [[x11]] = The X Window System :doctype: book :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 :sectnumoffset: 5 :partnums: :source-highlighter: rouge :experimental: :images-path: books/handbook/x11/ ifdef::env-beastie[] ifdef::backend-html5[] :imagesdir: ../../../../images/{images-path} endif::[] ifndef::book[] include::shared/authors.adoc[] include::shared/mirrors.adoc[] include::shared/releases.adoc[] include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists.adoc[] include::shared/{{% lang %}}/urls.adoc[] toc::[] endif::[] ifdef::backend-pdf,backend-epub3[] include::../../../../../shared/asciidoctor.adoc[] endif::[] endif::[] ifndef::env-beastie[] toc::[] include::../../../../../shared/asciidoctor.adoc[] endif::[] [[x11-synopsis]] == Synopsis An installation of FreeBSD using bsdinstall does not automatically install a graphical user interface. This chapter describes how to install and configure Xorg, which provides the open source X Window System used to provide a graphical environment. It then describes how to find and install a desktop environment or window manager. Before reading this chapter, you should: * Know how to install additional third-party software as described in crossref:ports[ports,Installing Applications: Packages and Ports]. After reading this chapter, you will know: * The various components of the X Window System, and how they interoperate. * How to install and configure Xorg. * How to use TrueType(R) fonts in Xorg. * How to set up your system for graphical logins (XDM). [[x-install]] == Installing Xorg On FreeBSD, Xorg can be installed as a package or port. The binary meta package can be installed quickly but with fewer options for customization: [source,shell] .... # pkg install xorg .... Either of these installations results in the complete Xorg system being installed. The current user must be a member of the `video` group. -To add the current user to `video` group execute the following command: +To add a user to `video` group, execute the following command: [source,shell] .... # pw groupmod video -m username .... [TIP] ==== A smaller version of the X system suitable for experienced users is available in package:x11/xorg-minimal[]. Most of the documents, libraries, and applications will not be installed. Some applications require these additional components to function. ==== [TIP] ==== Video cards, monitors, and input devices are automatically detected and do not require any manual configuration. Do not create `xorg.conf` or run a `-configure` step unless automatic configuration fails. ==== [[x-graphic-card-drivers]] == Graphic card drivers The following table shows the different graphics cards supported by FreeBSD, which package should be installed and its corresponding module. .Graphic card packages [options="header", cols="1,1,1,1"] |=== | Brand | Type | Package | Module | Intel(R) | Open Source | drm-kmod | `i915kms` | AMD(R) | Open Source | drm-kmod | `amdgpu` and `radeonkms` | NVIDIA(R) | Proprietary | nvidia-driver | `nvidia` or `nvidia-modeset` | VESA | Open Source | xf86-video-vesa | vesa | SCFB | Open Source | xf86-video-scfb | scfb | Virtualbox | Open Source | virtualbox-ose-additions | Virtualbox OSE additions include the `vboxvideo` driver. | VMware(R) | Open Source | xf86-video-vmware | vmwgfx |=== The following command can be used to identify which graphics card is installed in the system: [source,shell] .... % pciconf -lv|grep -B4 VGA .... The output should be similar to the following: [.programlisting] .... vgapci0@pci0:0:2:0: class=0x030000 rev=0x07 hdr=0x00 vendor=0x8086 device=0x2a42 subvendor=0x17aa subdevice=0x20e4 vendor = 'Intel Corporation' device = 'Mobile 4 Series Chipset Integrated Graphics Controller' class = display subclass = VGA .... [WARNING] ==== If the graphics card is not supported by Intel(R), AMD(R) or NVIDIA(R) drivers, then VESA or SCFB modules should be used. VESA module must be used when booting in BIOS mode and SCFB module must be used when booting in UEFI mode. This command can be used to check the booting mode: [source,shell] .... % sysctl machdep.bootmethod .... The output should be similar to the following: [.programlisting] .... machdep.bootmethod: BIOS .... ==== [[x-configuration-intel]] === Intel(R) Intel(R) Graphics refers to the class of graphics chips that are integrated on the same die as an Intel(R) CPU. Wikipedia offers link:https://en.wikipedia.org/wiki/List_of_Intel_graphics_processing_units[a good overview of the variations and names used for generations of Intel HD Graphics]. The package:graphics/drm-kmod[] package indirectly provides a range of kernel modules for use with Intel(R) Graphics cards. -The Intel(R) driver can be installed executing the following command: +The Intel(R) driver can be installed by executing the following command: [source,shell] .... # pkg install drm-kmod .... -Then add the module to `/etc/rc.conf` file executing the following command: +Then add the module to `/etc/rc.conf` file, executing the following command: [source,shell] .... # sysrc kld_list+=i915kms .... [TIP] ==== If a high CPU usage is noticed or excessive tearing with HD video, the installation of package:multimedia/libva-intel-driver[] may help. To install the package execute the following command: [source,shell] .... # pkg install libva-intel-driver mesa-libs mesa-dri .... ==== [[x-configuration-amd]] === AMD(R) The package:graphics/drm-kmod[] package indirectly provides a range of kernel modules for use with AMD(R) Graphics cards. The modules `amdgpu` and `radeonkms` can be used depending the generation of the hardware. The FreeBSD project maintains an link:https://wiki.freebsd.org/Graphics/AMD-GPU-Matrix[AMD graphics support matrix to determine which driver must be used]. -AMD(R) driver can be installed executing the following command: +AMD(R) driver can be installed by executing the following command: [source,shell] .... # pkg install drm-kmod .... -For post-HD7000 or Tahiti graphic cards add the module to `/etc/rc.conf` file executing the following command: +For post-HD7000 or Tahiti graphic cards add the module to `/etc/rc.conf` file, executing the following command: [source,shell] .... # sysrc kld_list+=amdgpu .... -For older graphic cards (pre-HD7000 or pre-Tahiti) add the module to `/etc/rc.conf` file executing the following command: +For older graphic cards (pre-HD7000 or pre-Tahiti) add the module to `/etc/rc.conf` file, executing the following command: [source,shell] .... # sysrc kld_list+=radeonkms .... [[x-configuration-nvidia]] === NVIDIA(R) FreeBSD supports different versions of the proprietary NVIDIA(R) driver. -Users of newer graphics cards will have to install the package:x11/nvidia-driver[] package. -The oldest ones will have to check which version supports them. +Users of newer graphics cards should install the package:x11/nvidia-driver[] package. +Those with older cards will have to check below which version supports them. .Supported versions of NVIDIA(R) drivers [options="header", cols="1,1"] |=== | Package | Supported hardware | x11/nvidia-driver-304 | link:https://www.nvidia.com/Download/driverResults.aspx/123712/en-us/[supported hardware] | x11/nvidia-driver-340 | link:https://www.nvidia.com/Download/driverResults.aspx/156167/en-us/[supported hardware] | x11/nvidia-driver-390 | link:https://www.nvidia.com/Download/driverResults.aspx/191122/en-us/[supported hardware] | x11/nvidia-driver-470 | link:https://www.nvidia.com/Download/driverResults.aspx/191234/en-us/[supported hardware] | x11/nvidia-driver-510 | link:https://www.nvidia.com/Download/driverResults.aspx/187164/en-us/[supported hardware] |=== [WARNING] ==== Version 304 of the NVIDIA(R) graphics driver (package:x11/nvidia-driver-304[]) does not support xorg-server 1.20 or later. ==== -The latest NVIDIA(R) driver can be installed running the following command: +The latest NVIDIA(R) driver can be installed by running the following command: [source,shell] .... # pkg install nvidia-driver .... -Then add the module to `/etc/rc.conf` file executing the following command: +Then add the module to `/etc/rc.conf` file, executing the following command: [source,shell] .... # sysrc kld_list+=nvidia .... [WARNING] ==== -`nvidia-modeset` driver must be used *only* as an alternative to `nvidia` if starting the X server results in a hang or these values are observed in `/var/log/Xorg.0.log`: +The `nvidia-modeset` driver must be used *only* as an alternative to `nvidia` if starting the X server results in a hang or these values are observed in `/var/log/Xorg.0.log`: [.programlisting] .... (II) NVIDIA(0): Validated MetaModes: (II) NVIDIA(0): "NULL" .... ==== [[x-config]] == Xorg Configuration Xorg supports most common video cards, keyboards, and pointing devices. [WARNING] ==== Video cards, monitors, and input devices are automatically detected and do not require any manual configuration. Do not create [.filename]#xorg.conf# or run a `Xorg -configure` step unless automatic configuration fails. ==== [[x-config-files]] === Configuration Files Xorg looks in several directories for configuration files. [.filename]#/usr/local/etc/X11/# is the *recommended* directory for these files on FreeBSD. Using this directory helps keep application files separate from operating system files. [[x-config-files-single-or-multi]] === Single or Multiple Files It is easier to use multiple files that each configure a specific setting than the traditional single [.filename]#xorg.conf#. These files are stored in the [.filename]#/usr/local/etc/X11/xorg.conf.d/# subdirectory. [TIP] ==== The traditional single [.filename]#xorg.conf# still works, but is neither as clear nor as flexible as multiple files in the [.filename]#/usr/local/etc/X11/xorg.conf.d/# subdirectory. ==== [[x-config-video-cards]] === Video Cards The driver for the graphics card can be specified in the [.filename]#/usr/local/etc/X11/xorg.conf.d/# directory. To configure the Intel(R) driver in a configuration file: [[x-config-video-cards-file-intel]] .Select Intel(R) Video Driver in a File [example] ==== [.filename]#/usr/local/etc/X11/xorg.conf.d/20-intel.conf# [.programlisting] .... Section "Device" Identifier "Card0" Driver "intel" EndSection .... ==== To configure the AMD(R) driver in a configuration file: [[x-config-video-cards-file-intel]] .Select AMD(R) Video Driver in a File [example] ==== [.filename]#/usr/local/etc/X11/xorg.conf.d/20-radeon.conf# [.programlisting] .... Section "Device" Identifier "Card0" Driver "radeon" EndSection .... ==== To configure the NVIDIA(R) driver in a configuration file: [[x-config-video-cards-file-intel]] .Select NVIDIA(R) Video Driver in a File [example] ==== [.filename]#/usr/local/etc/X11/xorg.conf.d/20-nvidia.conf# [.programlisting] .... Section "Device" Identifier "Card0" Driver "nvidia" EndSection .... ==== To configure the VESA driver in a configuration file: [[x-config-video-cards-file-intel]] .Select VESA Video Driver in a File [example] ==== [.filename]#/usr/local/etc/X11/xorg.conf.d/20-vesa.conf# [.programlisting] .... Section "Device" Identifier "Card0" Driver "vesa" EndSection .... ==== To configure the SCFB driver in a configuration file: [[x-config-video-cards-file-intel]] .Select SCFB Video Driver in a File [example] ==== [.filename]#/usr/local/etc/X11/xorg.conf.d/20-scfb.conf# [.programlisting] .... Section "Device" Identifier "Card0" Driver "scfb" EndSection .... ==== To configure multiple video cards, the `BusID` can be added. -A list of video card bus ``ID``s can be displayed executing: +A list of video card bus ``ID``s can be displayed by executing: [source,shell] .... % pciconf -lv | grep -B3 display .... The output should be similar to the following: [.programlisting] .... vgapci0@pci0:0:2:0: class=0x030000 rev=0x07 hdr=0x00 vendor=0x8086 device=0x2a42 subvendor=0x17aa subdevice=0x20e4 vendor = 'Intel Corporation' device = 'Mobile 4 Series Chipset Integrated Graphics Controller' class = display -- vgapci1@pci0:0:2:1: class=0x038000 rev=0x07 hdr=0x00 vendor=0x8086 device=0x2a43 subvendor=0x17aa subdevice=0x20e4 vendor = 'Intel Corporation' device = 'Mobile 4 Series Chipset Integrated Graphics Controller' class = display .... [[x-config-video-cards-file-multiple]] .Select Intel(R) Video Driver and NVIDIA(R) Video Driver in a File [example] ==== [.filename]#/usr/local/etc/X11/xorg.conf.d/20-drivers.conf# [.programlisting] .... Section "Device" Identifier "Card0" Driver "intel" BusID "pci0:0:2:0" EndSection Section "Device" Identifier "Card0" Driver "nvidia" BusID "pci0:0:2:1" EndSection .... ==== [[x-config-monitors]] === Monitors Almost all monitors support the Extended Display Identification Data standard (`EDID`). Xorg uses `EDID` to communicate with the monitor and detect the supported resolutions and refresh rates. Then it selects the most appropriate combination of settings to use with that monitor. Other resolutions supported by the monitor can be chosen by setting the desired resolution in configuration files, or after the X server has been started with man:xrandr[1]. [[x-config-monitors-xrandr]] ==== Using RandR (Resize and Rotate) Run man:xrandr[1] without any parameters to see a list of video outputs and detected monitor modes: [source,shell] .... % xrandr .... The output should be similar to the following: [.programlisting] .... Screen 0: minimum 320 x 200, current 2560 x 960, maximum 8192 x 8192 LVDS-1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 261mm x 163mm 1280x800 59.99*+ 59.81 59.91 50.00 1280x720 59.86 59.74 1024x768 60.00 1024x576 59.90 59.82 960x540 59.63 59.82 800x600 60.32 56.25 864x486 59.92 59.57 640x480 59.94 720x405 59.51 58.99 640x360 59.84 59.32 VGA-1 connected primary 1280x960+1280+0 (normal left inverted right x axis y axis) 410mm x 257mm 1280x1024 75.02 60.02 1440x900 74.98 60.07 1280x960 60.00* 1280x800 74.93 59.81 1152x864 75.00 1024x768 75.03 70.07 60.00 832x624 74.55 800x600 72.19 75.00 60.32 56.25 640x480 75.00 72.81 66.67 59.94 720x400 70.08 HDMI-1 disconnected (normal left inverted right x axis y axis) DP-1 disconnected (normal left inverted right x axis y axis) HDMI-2 disconnected (normal left inverted right x axis y axis) DP-2 disconnected (normal left inverted right x axis y axis) DP-3 disconnected (normal left inverted right x axis y axis) .... This shows that the `VGA-1` output is being used to display a screen resolution of 1280x960 pixels at a refresh rate of about 60 Hz. -And the `LVDS-1` is being used as a secondary monitor to display a screen resolution of 1280x800 pixels at a refresh rate of about 60 Hz. +The `LVDS-1` is being used as a secondary monitor to display a screen resolution of 1280x800 pixels at a refresh rate of about 60 Hz. Monitors are not attached to the `HDMI-1`, `HDMI-2`, `DP-1`, `DP-2` and `DP-3` connectors. Any of the other display modes can be selected with man:xrandr[1]. For example, to switch to 1280x1024 at 60 Hz: [source,shell] .... % xrandr --output LVDS-1 --mode 1280x720 --rate 60 .... [[x-config-monitors-files]] ==== Using the Xorg configuration file The monitor configuration can also be set in a configuration file. To set a screen resolution of 1024x768 in a configuration file: .Set Screen Resolution in a File [example] ==== [.filename]#/usr/local/etc/X11/xorg.conf.d/10-monitor.conf# [.programlisting] .... Section "Screen" Identifier "Screen0" Device "Card0" SubSection "Display" Modes "1024x768" EndSubSection EndSection .... ==== [[x-config-input]] === Input Devices -Through package:x11/libinput[] Xorg supports the vast majority of input devices. +Xorg supports the vast majority of input devices via package:x11/libinput[]. [TIP] ==== Some desktop environments (such as KDE Plasma) provide a graphical UI for setting these parameters. -Check it before resorting to manual configuration editing. +Check if this is the case before resorting to manual configuration editing. ==== [[x-config-input-keyboard-layout]] For example, to configure the keyboard layout: .Setting a Keyboard Layout [example] ==== [.filename]#/usr/local/etc/X11/xorg.conf.d/00-keyboard.conf# [.programlisting] .... Section "InputClass" Identifier "Keyboard1" MatchIsKeyboard "on" Option "XkbLayout" "es, fr" Option "XkbModel" "pc104" Option "XkbVariant" ",qwerty" Option "XkbOptions" "grp:win_space_toggle" EndSection .... ==== [[x-fonts]] == Using Fonts in Xorg The default fonts that ship with Xorg are less than ideal for typical desktop publishing applications. Large presentation fonts show up jagged and unprofessional looking, and small fonts are almost completely unintelligible. However, there are several free, high quality Type1 (PostScript(R)) fonts available which can be readily used with Xorg. [[type1]] === Type1 Fonts The URW font collection (package:x11-fonts/urwfonts[]) includes high quality versions of standard type1 fonts (Times Roman(TM), Helvetica(TM), Palatino(TM) and others). The Freefonts collection (package: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, Xorg can be configured to use TrueType(R) fonts with a minimum of effort. For more details on this, see the man:X[7] manual page or <>. To install the above Type1 font collections from binary packages, run the following commands: [source,shell] .... # pkg install urwfonts .... 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 ([.filename]#/usr/local/etc/X11/xorg.conf.d/90-fonts.conf#), which reads: [.programlisting] .... Section "Files" FontPath "/usr/local/share/fonts/urwfonts/" -EdnSection +EndSection .... Alternatively, at the command line in the X session run: [source,shell] .... % xset fp+ /usr/local/share/fonts/urwfonts % xset fp rehash .... This will work but will be lost when the X session is closed, unless it is added to the startup file ([.filename]#~/.xinitrc# for a normal `startx` session, or [.filename]#~/.xsession# when logging in through a graphical login manager like XDM). A third way is to use the new [.filename]#/usr/local/etc/fonts/local.conf# as demonstrated in <>. [[truetype]] === TrueType(R) Fonts Xorg has built in support for rendering TrueType(R) 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 [.filename]#/usr/local/etc/X11/xorg.conf.d/90-fonts.conf#. [.programlisting] .... Load "freetype" .... Now make a directory for the TrueType(R) fonts (for example, [.filename]#/usr/local/share/fonts/TrueType#) and copy all of the TrueType(R) fonts into this directory. Keep in mind that TrueType(R) fonts cannot be directly taken from an Apple(R) Mac(R); they must be in UNIX(R)/MS-DOS(R)/Windows(R) format for use by Xorg. Once the files have been copied into this directory, use mkfontscale to create a [.filename]#fonts.dir#, so that the X font renderer knows that these new files have been installed. `mkfontscale` can be installed as a package: [source,shell] .... # pkg install mkfontscale .... Then create an index of X font files in a directory: [source,shell] .... # cd /usr/local/share/fonts/TrueType # mkfontscale .... Now add the TrueType(R) directory to the font path. This is just the same as described in <>: [source,shell] .... % xset fp+ /usr/local/share/fonts/TrueType % xset fp rehash .... or add a `FontPath` line to [.filename]#xorg.conf#. Now Gimp, LibreOffice, and all of the other X applications should now recognize the installed TrueType(R) fonts. Extremely small fonts (as with text in a high resolution display on a web page) and extremely large fonts (within LibreOffice) will look much better now. [[antialias]] === Anti-Aliased Fonts All fonts in Xorg that are found in [.filename]#/usr/local/share/fonts/# and [.filename]#~/.fonts/# are automatically made available for anti-aliasing to Xft-aware applications. Most recent applications are Xft-aware, including KDE, GNOME, and Firefox. To control which fonts are anti-aliased, or to configure anti-aliasing properties, create (or edit, if it already exists) the file [.filename]#/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]. 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 `` tag: [.programlisting] .... .... As previously stated, all fonts in [.filename]#/usr/local/share/fonts/# as well as [.filename]#~/.fonts/# are already made available to Xft-aware applications. To add another directory outside of these two directory trees, add a line like this to [.filename]#/usr/local/etc/fonts/local.conf#: [.programlisting] .... /path/to/my/fonts .... After adding new fonts, and especially new font directories, rebuild the font caches: [source,shell] .... # 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: [.programlisting] .... 14 false 14 false .... Spacing for some monospaced fonts might also be inappropriate with anti-aliasing. This seems to be an issue with KDE, in particular. One possible fix is to force the spacing for such fonts to be 100. Add these lines: [.programlisting] .... fixed mono console mono .... (this aliases the other common names for fixed fonts as `"mono"`), and then add: [.programlisting] .... mono 100 .... 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 [.filename]#local.conf#: [.programlisting] .... Helvetica sans-serif .... After editing [.filename]#local.conf#, make certain to end the file with the `` tag. Not doing this will cause changes to be ignored. Users can add personalized settings by creating their own [.filename]#~/.config/fontconfig/fonts.conf#. This file uses the same `XML` format described above. 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 [.filename]#local.conf#: [.programlisting] .... unknown rgb .... [NOTE] ==== Depending on the sort of display, `rgb` may need to be changed to `bgr`, `vrgb` or `vbgr`: experiment and see which works best. ==== -For more information about how to install and configure Fonts on FreeBSD, please read the article link:{fonts}[Fonts and FreeBSD]. +For more information about how to install and configure fonts on FreeBSD, please read the article link:{fonts}[Fonts and FreeBSD].