diff --git a/documentation/content/en/books/handbook/desktop/_index.adoc b/documentation/content/en/books/handbook/desktop/_index.adoc --- a/documentation/content/en/books/handbook/desktop/_index.adoc +++ b/documentation/content/en/books/handbook/desktop/_index.adoc @@ -1,10 +1,10 @@ --- -title: Chapter 7. Desktop Applications +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 applications, including web browsers, productivity software, document viewers, and financial software -tags: ["desktop", "browsers", "firefox", "chromium", "productivity", "calligra", "AbiWord", "LibreOffice", "GIMP", "Xpdf", "gv", "Geeqie", "ePDFView", "okular", "Finance", "GnuCash", "Gnumeric", "KMyMoney"] +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/" @@ -12,7 +12,7 @@ --- [[desktop]] -= Desktop Applications += Desktop Environments :doctype: book :toc: macro :toclevels: 1 @@ -52,570 +52,1066 @@ [[desktop-synopsis]] == Synopsis -While FreeBSD is popular as a server for its performance and stability, it is also suited for day-to-day use as a desktop. -With over {numports} applications available as FreeBSD packages or ports, it is easy to build a customized desktop that runs a wide variety of desktop applications. -This chapter demonstrates how to install numerous desktop applications, including web browsers, productivity software, document viewers, and financial software. +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. -[NOTE] +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 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] ==== -Users who prefer to install a pre-built desktop version of FreeBSD rather than configuring one from scratch should refer to https://ghostbsd.org[GhostBSD], https://www.midnightbsd.org[MidnightBSD] or https://nomadbsd.org[NomadBSD]. +This is installation is *really* minimal. +Konsole must be installed separately executing: + +[source,shell] +.... +# pkg install konsole +.... ==== -Readers of this chapter should know how to: +[[kde-configuration]] +==== Configure KDE Plasma -* Install additional software using packages or ports as described in crossref:ports[ports,Installing Applications: Packages and Ports]. -* Install X and a window manager as described in crossref:x11[x11,The X Window System]. +KDE Plasma requires `/proc` to be mounted. +Add this line to `/etc/fstab` to mount this file system automatically during system startup: -For information on how to configure a multimedia environment, refer to crossref:multimedia[multimedia,Multimedia]. +[.programlisting] +.... +# Device Mountpoint FStype Options Dump Pass# +proc /proc procfs rw 0 0 +.... -[[desktop-browsers]] -== Browsers +KDE Plasma uses man:dbus-daemon[1] for a message bus and hardware abstraction. +This application is automatically installed as dependencies of KDE Plasma. -FreeBSD does not come with a pre-installed web browser. -Instead, the https://www.FreeBSD.org/ports/[www] category of the Ports Collection contains many browsers which can be installed as a package or compiled from the Ports Collection. +Enable D-BUS service in `/etc/rc.conf` to start at system boot: -The KDE and GNOME desktop environments include their own HTML browser. -Refer to crossref:x11[x11-wm,“Desktop Environments”] for more information on how to set up these complete desktops. +[source,shell] +.... +# sysrc dbus_enable="YES" +.... -Some lightweight browsers include package:www/dillo2[], package:www/links[], and package:www/w3m[]. +To increase messages size execute: -This section demonstrates how to install the following popular web browsers and indicates if the application is resource-heavy, takes time to compile from ports, or has any major dependencies. +[source,shell] +.... +sysctl net.local.stream.recvspace=65536 +sysctl net.local.stream.sendspace=65536 +.... -[.informaltable] -[cols="1,1,1,1", frame="none", options="header"] -|=== -| Application Name -| Resources Needed -| Installation from Ports -| Notes - -|Firefox -|medium -|heavy -|FreeBSD, Linux(R), and localized versions are available - -|Konqueror -|medium -|heavy -|Requires KDE libraries - -|Chromium -|medium -|heavy -|Requires Gtk+ -|=== +[[kde-start]] +==== Start KDE Plasma -=== Firefox +Preferred KDE Plasma display manager is package:x11/sddm[]. +To install package:x11/sddm[] execute: -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. +[source,shell] +.... +# pkg install sddm +.... -To install the package of the latest release version of Firefox, type: +Enable SDDM service in `/etc/rc.conf` to start at system boot: [source,shell] .... -# pkg install firefox +# sysrc sddm_enable="YES" .... -To instead install Firefox Extended Support Release (ESR) version, use: +The keyboard language can be set in SDDM by running the following command: [source,shell] .... -# pkg install firefox-esr +# sysrc sddm_lang="es_ES" .... -The Ports Collection can instead be used to compile the desired version of Firefox from source code. -This example builds package:www/firefox[], where `firefox` can be replaced with the ESR or localized version to install. +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] .... -# cd /usr/ports/www/firefox -# make install clean +% echo "exec ck-launch-session startplasma-x11" > ~/.xinitrc .... -=== Konqueror +[[gnome-environment]] +=== GNOME -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. +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. -Konqueror can be installed as a package by typing: +[[gnome-meta-install]] +==== Install GNOME meta pacakge + +To install the GNOME meta pacakge with GNOME Desktop and Applications execute: [source,shell] .... -# pkg install konqueror +# pkg install gnome .... -To install from the Ports Collection: +[[gnome-minimal-install]] +==== Minimal GNOME installation + +To install the GNOME lite meta package with GNOME desktop slimmed down for only the basics execute: [source,shell] .... -# cd /usr/ports/x11-fm/konqueror/ -# make install clean +# pkg install gnome-lite .... -=== Chromium +[[gnome-configuration]] +==== Configure GNOME -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. +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. -Chromium can be installed as a package by typing: +Enable D-BUS service in `/etc/rc.conf` to start at system boot: [source,shell] .... -# pkg install chromium +# sysrc dbus_enable="YES" .... -Alternatively, Chromium can be compiled from source using the Ports Collection: +It is often desirable to also start all GNOME services. + +Enable GNOME services in `/etc/rc.conf` to start at system boot: [source,shell] .... -# cd /usr/ports/www/chromium -# make install clean +# sysrc gnome_enable="YES" .... -[NOTE] -==== -The executable for Chromium is [.filename]#/usr/local/bin/chrome#, not [.filename]#/usr/local/bin/chromium#. -==== +[[gnome-start]] +==== Start GNOME -[[desktop-productivity]] -== Productivity +GNOME Display Manager is the preferred display manager for GNOME. +GDM is installed as part of the GNOME package. -When it comes to productivity, users often look for an office suite or an easy-to-use word processor. -While some <> like KDE 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 window manager. +Enable GDM in `/etc/rc.conf` to start at system boot: -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. +[source,shell] +.... +# sysrc gdm_enable="YES" +.... -[.informaltable] -[cols="1,1,1,1", frame="none", options="header"] -|=== -| Application Name -| Resources Needed -| Installation from Ports -| Major Dependencies - -|Calligra -|light -|heavy -|KDE - -|AbiWord -|light -|light -|Gtk+ or GNOME - -|The Gimp -|light -|heavy -|Gtk+ - -|Apache OpenOffice -|heavy -|huge -|JDK(TM) and Mozilla - -|LibreOffice -|somewhat heavy -|huge -|Gtk+, or KDE/ GNOME, or JDK(TM) -|=== +A second method to start GNOME is by manually invoking man:startx[1]. +For this to work, the following line is needed in ~/.xinitrc: -=== Calligra +[source,shell] +.... +% echo "exec gnome-session" > ~/.xinitrc +.... -The KDE desktop environment includes an office suite which can be installed separately from KDE. -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. +[[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 -In FreeBSD, package:editors/calligra[] can be installed as a package or a port. -To install the package: +To install the XFCE meta package execute: [source,shell] .... -# pkg install calligra +# 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 .... -If the package is not available, use the Ports Collection instead: +XFCE uses man:dbus-daemon[1] for a message bus and hardware abstraction. +This application is automatically installed as dependencies of XFCE. + +Enable D-BUS in `/etc/rc.conf` to start at system boot: [source,shell] .... -# cd /usr/ports/editors/calligra -# make install clean +# sysrc dbus_enable="YES" .... -=== AbiWord +[[xfce-start]] +==== Start XFCE -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. +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. -AbiWord can import or export many file formats, including some proprietary ones like Microsoft(R) [.filename]#.rtf#. +To install it execute: -To install the AbiWord package: +[source,shell] +.... +# pkg install lightdm lightdm-gtk-greeter +.... + +Enable lightdm in `/etc/rc.conf` to start at system boot: [source,shell] .... -# pkg install abiword +# sysrc lightdm_enable="YES" .... -If the package is not available, it can be compiled from the Ports Collection: +A second method to start XFCE is by manually invoking man:startx[1]. +For this to work, the following line is needed in ~/.xinitrc: [source,shell] .... -# cd /usr/ports/editors/abiword -# make install clean +% echo '. /usr/local/etc/xdg/xfce4/xinitrc' > ~/.xinitrc .... -=== The GIMP +[[mate-environment]] +=== MATE -For image authoring or picture retouching, The GIMP provides a sophisticated image manipulation program. -It can be used as a simple paint program or as a quality photo retouching suite. -It supports a large number of plugins and features a scripting interface. -The GIMP can read and write a wide range of file formats and supports interfaces with scanners and tablets. +The MATE Desktop Environment is the continuation of GNOME 2. +It provides an intuitive and attractive desktop environment using traditional metaphors. -To install the package: +[[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: [source,shell] .... -# pkg install gimp +# pkg install mate .... -Alternately, use the Ports Collection: +[[mate-minimal-install]] +==== Minimal MATE installation + +To install the MATE lite meta package with MATE desktop slimmed down for only the basics execute: [source,shell] .... -# cd /usr/ports/graphics/gimp -# make install clean +# pkg install mate-base .... -The graphics category (https://www.FreeBSD.org/ports/graphics/[freebsd.org/ports/graphics/]) of the Ports Collection contains several GIMP-related plugins, help files, and user manuals. +[[mate-configuration]] +==== Configure MATE -=== Apache OpenOffice +MATE requires `/proc` to be mounted. +Add this line to `/etc/fstab` to mount this file system automatically during system startup: -Apache OpenOffice is an open source office suite which is developed under the wing of the Apache Software Foundation's Incubator. -It includes all of the applications found in a complete office productivity suite: a word processor, spreadsheet, presentation manager, and drawing program. -Its user interface is similar to other office suites, and it can import and export in various popular file formats. -It is available in a number of different languages and internationalization has been extended to interfaces, spell checkers, and dictionaries. +[.programlisting] +.... +# Device Mountpoint FStype Options Dump Pass# +proc /proc procfs rw 0 0 +.... -The word processor of Apache OpenOffice uses a native XML file format for increased portability and flexibility. -The spreadsheet program features a macro language which can be interfaced with external databases. -Apache OpenOffice is stable and runs natively on Windows(R), Solaris(TM), Linux(R), FreeBSD, and Mac OS(R) X. -More information about Apache OpenOffice can be found at http://openoffice.org/[openoffice.org]. -For FreeBSD specific information refer to http://porting.openoffice.org/freebsd/[porting.openoffice.org/freebsd/]. +MATE uses man:dbus-daemon[1] for a message bus and hardware abstraction. +This application is automatically installed as dependencies of MATE. +Enable D-BUS in `/etc/rc.conf` to start at system boot: -To install the Apache OpenOffice package: +[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: + +[source,shell] +.... +# pkg install lightdm lightdm-gtk-greeter +.... + +Enable lightdm in `/etc/rc.conf` to start at system boot: [source,shell] .... -# pkg install apache-openoffice +# sysrc lightdm_enable="YES" .... -Once the package is installed, type the following command to launch Apache OpenOffice: +A second method to start MATE is by manually invoking man:startx[1]. +For this to work, the following line is needed in ~/.xinitrc: [source,shell] .... -% openoffice-X.Y.Z +% echo "exec ck-launch-session mate-session" > ~/.xinitrc .... -where _X.Y.Z_ is the version number of the installed version of Apache OpenOffice. -The first time Apache OpenOffice launches, some questions will be asked and a [.filename]#.openoffice.org# folder will be created in the user's home directory. +[[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 -If the desired Apache OpenOffice package is not available, compiling the port is still an option. -However, this requires a lot of disk space and a fairly long time to compile: +To install the Cinnamon package execute: [source,shell] .... -# cd /usr/ports/editors/openoffice-4 -# make install clean +# pkg install cinnamon .... -[NOTE] -==== -To build a localized version, replace the previous command with: +[[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. +Enable D-BUS in `/etc/rc.conf` to start at system boot: [source,shell] .... -# make LOCALIZED_LANG=your_language install clean +# sysrc dbus_enable="YES" .... -Replace _your_language_ with the correct language ISO-code. -A list of supported language codes is available in [.filename]#files/Makefile.localized#, located in the port's directory. -==== +[[cinnamon-start]] +==== Start Cinnamon -=== LibreOffice +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. -LibreOffice is a free software office suite developed by http://www.documentfoundation.org/[documentfoundation.org]. -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. +To install it execute: -The word processor of LibreOffice uses a native XML file format for increased portability and flexibility. -The spreadsheet program features a macro language which can be interfaced with external databases. -LibreOffice is stable and runs natively on Windows(R), Linux(R), FreeBSD, and Mac OS(R) X. -More information about LibreOffice can be found at http://www.libreoffice.org/[libreoffice.org]. +[source,shell] +.... +# pkg install lightdm lightdm-gtk-greeter +.... -To install the English version of the LibreOffice package: +Enable lightdm in `/etc/rc.conf` to start at system boot: [source,shell] .... -# pkg install libreoffice +# 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: + +[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: + +[source,shell] +.... +# pkg install lxqt .... -The editors category (https://www.FreeBSD.org/ports/editors/[freebsd.org/ports/editors/]) of the Ports Collection contains several localizations for LibreOffice. -When installing a localized package, replace `libreoffice` with the name of the localized package. +[[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. + +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: + +[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: + +[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: + +[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. + +.Supported browser +[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: + +[source,shell] +.... +# pkg install firefox +.... -Once the package is installed, type the following command to run LibreOffice: +To instead install Firefox Extended Support Release (ESR) version execute: [source,shell] .... -% libreoffice +# pkg install firefox-esr .... -During the first launch, some questions will be asked and a [.filename]#.libreoffice# folder will be created in the user's home directory. +[[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. -If the desired LibreOffice package is not available, compiling the port is still an option. -However, this requires a lot of disk space and a fairly long time to compile. -This example compiles the English version: +To install Chromium execute: [source,shell] .... -# cd /usr/ports/editors/libreoffice -# make install clean +# pkg install chromium .... [NOTE] ==== -To build a localized version, `cd` into the port directory of the desired language. -Supported languages can be found in the editors category (https://www.FreeBSD.org/ports/editors/[freebsd.org/ports/editors/]) of the Ports Collection. +The executable for Chromium is [.filename]#/usr/local/bin/chrome#, not [.filename]#/usr/local/bin/chromium#. ==== -[[desktop-viewers]] -== Document Viewers +[[iridium]] +=== Iridium browser -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: +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: + +[source,shell] +.... +# pkg install iridium +.... + +[[falkon]] +=== Falkon -[.informaltable] -[cols="1,1,1,1", frame="none", options="header"] +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: + +[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. + +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: + +[source,shell] +.... +# pkg install konqueror +.... + +[[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 was inspired by other browsers/addons like dwb and Vimperator/Pentadactyl. + +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. +This new, experimental version of Dillo is based upon FLTK toolkit, rather than GTK1, and has been substantially rewritten. + +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. + +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: + +[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"] |=== -| Application Name -| Resources Needed -| Installation from Ports -| Major Dependencies - -|Xpdf -|light -|light -|FreeType - -|gv -|light -|light -|Xaw3d - -|Geeqie -|light -|light -|Gtk+ or GNOME - -|ePDFView -|light -|light -|Gtk+ - -|Okular -|light -|heavy -|KDE +| 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 + |=== -=== Xpdf +[[vs-code]] +=== Visual Studio Code -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. +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 the Xpdf package: +To install Visual Studio Code execute: [source,shell] .... -# pkg install xpdf +# pkg install vscode .... -If the package is not available, use the Ports Collection: +[[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: [source,shell] .... -# cd /usr/ports/graphics/xpdf -# make install clean +# pkg install qtcreator .... -Once the installation is complete, launch `xpdf` and use the right mouse button to activate the menu. +[[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. + +To install kdevelop execute: + +[source,shell] +.... +# pkg install kdevelop +.... -=== gv +[[eclipse]] +=== Eclipse IDE -gv is a PostScript(R) and PDF viewer. -It is based on ghostview, but has a nicer look as it is based on the Xaw3d widget toolkit. -gv has many configurable features, such as orientation, paper size, scale, and anti-aliasing. -Almost any operation can be performed with either the keyboard or the mouse. +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 gv as a package: +To install Eclipse IDE execute: [source,shell] .... -# pkg install gv +# pkg install eclipse .... -If a package is unavailable, use the Ports Collection: +[[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: [source,shell] .... -# cd /usr/ports/print/gv -# make install clean +# pkg install vim .... -=== Geeqie +[[neovim]] +=== Neovim -Geeqie is a fork from the unmaintained GQView project, in an effort to move development forward and integrate the existing patches. -Geeqie is an image manager which supports viewing a file with a single click, launching an external editor, and thumbnail previews. -It also features a slideshow mode and some basic file operations, making it easy to manage image collections and to find duplicate files. -Geeqie supports full screen viewing and internationalization. +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 the Geeqie package: +To install Neovim execute: [source,shell] .... -# pkg install geeqie +# pkg install neovim .... -If the package is not available, use the Ports Collection: +[[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: [source,shell] .... -# cd /usr/ports/graphics/geeqie -# make install clean +# pkg install emacs .... -=== ePDFView +[[desktop-productivity]] +== Desktop office productivity -ePDFView is a lightweight `PDF` document viewer that only uses the Gtk+ and Poppler libraries. -It is currently under development, but already opens most `PDF` files (even encrypted), save copies of documents, and has support for printing using CUPS. +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. -To install ePDFView as a package: +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: [source,shell] .... -# pkg install epdfview +# pkg install libreoffice .... -If a package is unavailable, use the Ports Collection: +The LibreOffice package comes by default only in English. +To have a localized version of LibreOffice it is necessary to install the 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] .... -# cd /usr/ports/graphics/epdfview -# make install clean +# pkg install libreoffice-es .... -=== Okular +[[calligra]] +=== Calligra -Okular is a universal document viewer based on KPDF for KDE. -It can open many document formats, including `PDF`, PostScript(R), DjVu, `CHM`, `XPS`, and ePub. +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 Okular as a package: +To install Calligra execute: [source,shell] .... -# pkg install okular +# pkg install calligra .... -If a package is unavailable, use the Ports Collection: +[[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: [source,shell] .... -# cd /usr/ports/graphics/okular -# make install clean +# pkg install abiword .... -[[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. +[[desktop-viewers]] +== Document Viewers -This section covers these programs: +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: -[.informaltable] -[cols="1,1,1,1", frame="none", options="header"] +.Supported Document Viewers +[options="header", cols="1,1,1,1"] |=== -| Application Name -| Resources Needed -| Installation from Ports -| Major Dependencies - -|GnuCash -|light -|heavy -|GNOME - -|Gnumeric -|light -|heavy -|GNOME - -|KMyMoney -|light -|heavy -|KDE +| 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 + |=== -=== GnuCash +[[okular]] +=== Okular -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. +Okular is a universal document viewer, part of the KDE Plasma project. -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. +Okular combines the excellent functionalities with the versatility of supporting different kind of documents, like PDF, Postscript, DjVu, CHM, XPS, ePub and others. -To install the GnuCash package: +To install Okular execute: [source,shell] .... -# pkg install gnucash +# pkg install okular .... -If the package is not available, use the Ports Collection: +[[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: [source,shell] .... -# cd /usr/ports/finance/gnucash -# make install clean +# pkg install evince .... -=== Gnumeric +[[epdfview]] +=== ePDFView -Gnumeric is a spreadsheet program developed by the GNOME community. -It features convenient automatic guessing of user input according to the cell format with an autofill system for many sequences. -It can import files in a number of popular formats, including Excel, Lotus 1-2-3, and Quattro Pro. -It has a large number of built-in functions and allows all of the usual cell formats such as number, currency, date, time, and much more. +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. -To install Gnumeric as a package: +To install ePDFView execute: [source,shell] .... -# pkg install gnumeric +# pkg install epdfview .... -If the package is not available, use the Ports Collection: +[[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: [source,shell] .... -# cd /usr/ports/math/gnumeric -# make install clean +# 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. @@ -623,17 +1119,28 @@ 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 as a package: +To install KMyMoney execute: [source,shell] .... -# pkg install kmymoney-kde4 +# pkg install kmymoney .... -If the package is not available, use the Ports Collection: +[[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: [source,shell] .... -# cd /usr/ports/finance/kmymoney-kde4 -# make install clean +# pkg install gnucash .... diff --git a/documentation/content/en/books/handbook/x11/_index.adoc b/documentation/content/en/books/handbook/x11/_index.adoc --- a/documentation/content/en/books/handbook/x11/_index.adoc +++ b/documentation/content/en/books/handbook/x11/_index.adoc @@ -4,7 +4,7 @@ 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", "DE", "KDE", "Plasma", "Xfce", "Gnome", "XDM", "SDDM", "GDM", "KMS", "Intel", "AMD", "NVIDIA", "Anti-Aliased"] +tags: ["X11", "Xorg", "TrueType", "Intel", "AMD", "NVIDIA", "Anti-Aliased", "VESA", "SCFB"] showBookMenu: true weight: 7 path: "/books/handbook/" @@ -56,354 +56,348 @@ 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. -[NOTE] -==== -Users who prefer an installation method that automatically configures the Xorg should refer to https://ghostbsd.org[GhostBSD], https://www.midnightbsd.org[MidnightBSD] or https://nomadbsd.org[NomadBSD]. -==== +Before reading this chapter, you should: -For more information on the video hardware that Xorg supports, refer to the http://www.x.org/[x.org] website. +* 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 install and configure several window managers and desktop environments. * How to use TrueType(R) fonts in Xorg. * How to set up your system for graphical logins (XDM). -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]. - -[[x-understanding]] -== Terminology - -While it is not necessary to understand all of the details of the various components in the X Window System and how they interact, some basic knowledge of these components can be useful. - -X server:: -X was designed from the beginning to be network-centric, and adopts a "client-server" model. -In this 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 handling input or output from other devices such as a tablet or a video projector. -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. - -X client:: -Each X application, such as XTerm or Firefox, 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. -It is also possible to run the X server on a less powerful computer and to run the X applications on a more powerful system. -In this scenario, the communication between the X client and server takes place over the network. - -window manager:: -X does not dictate what windows should look like on-screen, how to move them around with the mouse, which keystrokes should be used to move between 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 a separate window manager application. -There are http://www.xwinman.org/[dozens of window managers] available. -Each window manager provides a different look and feel: some support virtual desktops, some allow customized keystrokes to manage the desktop, some have a "Start" button, and some are themeable, allowing a complete change of the desktop's look-and-feel. -Window managers are available in the [.filename]#x11-wm# category of the Ports Collection. -+ -Each window manager uses a different configuration mechanism. -Some expect configuration file written by hand while others provide graphical tools for most configuration tasks. - -desktop environment:: -KDE and GNOME are considered to be desktop environments as they include an entire suite of applications for performing common desktop tasks. -These may include office suites, web browsers, and games. - -focus policy:: -The window manager is responsible for the mouse focus policy. -This policy provides some means for choosing which window is actively receiving keystrokes and it should also visibly indicate which window is currently active. -+ -One focus policy is called "click-to-focus". -In this model, a window becomes active upon receiving a mouse click. -In the "focus-follows-mouse" policy, the window that is under the mouse pointer has focus and the focus is changed by pointing at another window. -If the mouse is over the root window, then this window is focused. -In the "sloppy-focus" model, if the mouse is moved over the root window, the most recently used window still has the focus. -With sloppy-focus, focus is only changed when the cursor enters a new window, and not when exiting the current window. -In the "click-to-focus" policy, 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. -+ -Different window managers support different focus models. -All of them support click-to-focus, and the majority of them also support other policies. -Consult the documentation for the window manager to determine which focus models are available. - -widgets:: -Widget is a term for all of the items in the user interface that can be clicked or manipulated in some way. -This includes buttons, check boxes, radio buttons, icons, and lists. -A widget toolkit is a set of widgets used to create graphical applications. -There are several popular widget toolkits, including Qt, used by KDE, and GTK+, used by GNOME. -As a result, applications will have a different look and feel, depending upon which widget toolkit was used to create the application. - [[x-install]] == Installing Xorg On FreeBSD, Xorg can be installed as a package or port. -The binary package can be installed quickly but with fewer options for customization: +The binary meta package can be installed quickly but with fewer options for customization: [source,shell] .... # pkg install xorg .... -To build and install from the Ports Collection: +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: [source,shell] .... -# cd /usr/ports/x11/xorg -# make install clean +# pw groupmod video -m username .... -Either of these installations results in the complete Xorg system being installed. -Binary packages are the best option for most users. - +[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. +==== -[[x-config]] -== Xorg Configuration +[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-config-quick-start]] -=== Quick Start +[[x-graphic-card-drivers]] +== Graphic card drivers -Xorg supports most common video cards, keyboards, and pointing devices. +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: + +[source,shell] +.... +# pkg install drm-kmod +.... + +Then add the module to `/etc/rc.conf` file executing the following command: + +[source,shell] +.... +# sysrc kld_list+=i915kms +.... [TIP] ==== -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 `-configure` step unless automatic configuration fails. +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 +.... ==== -[.procedure] -. If Xorg has been used on this computer before, move or remove any existing configuration files: -+ +[[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: + [source,shell] .... -# mv /etc/X11/xorg.conf ~/xorg.conf.etc -# mv /usr/local/etc/X11/xorg.conf ~/xorg.conf.localetc +# pkg install drm-kmod .... -. Add the user who will run Xorg to the `video` or `wheel` group to enable 3D acceleration when available. To add user _jru_ to whichever group is available: -+ +For post-HD7000 or Tahiti graphic cards add the module to `/etc/rc.conf` file executing the following command: + [source,shell] .... -# pw groupmod video -m jru || pw groupmod wheel -m jru +# sysrc kld_list+=amdgpu .... -. The `TWM` window manager is included by default. It is started when Xorg starts: -+ +For older graphic cards (pre-HD7000 or pre-Tahiti) add the module to `/etc/rc.conf` file executing the following command: + [source,shell] .... -% startx +# sysrc kld_list+=radeonkms .... -. On some older versions of FreeBSD, the system console must be set to man:vt[4] before switching back to the text console will work properly. See <>. +[[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. + +.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] -[[x-config-user-group]] -=== User Group for Accelerated Video +| x11/nvidia-driver-470 +| link:https://www.nvidia.com/Download/driverResults.aspx/191234/en-us/[supported hardware] -Access to [.filename]#/dev/dri# is needed to allow 3D acceleration on video cards. -It is usually simplest to add the user who will be running X to either the `video` or `wheel` group. -Here, man:pw[8] is used to add user _slurms_ to the `video` group, or to the `wheel` group if there is no `video` group: +| 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: [source,shell] .... -# pw groupmod video -m slurms || pw groupmod wheel -m slurms +# pkg install nvidia-driver .... -[[x-config-kms]] -=== Kernel Mode Setting (`KMS`) +Then add the module to `/etc/rc.conf` file executing the following command: -When the computer switches from displaying the console to a higher screen resolution for X, it must set the video output _mode_. -Recent versions of `Xorg` use a system inside the kernel to do these mode changes more efficiently. -Older versions of FreeBSD use man:sc[4], which is not aware of the `KMS` system. -The end result is that after closing X, the system console is blank, even though it is still working. -The newer man:vt[4] console avoids this problem. +[source,shell] +.... +# sysrc kld_list+=nvidia +.... -Add this line to [.filename]#/boot/loader.conf# to enable man:vt[4]: +[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`: [.programlisting] .... -kern.vty=vt +(II) NVIDIA(0): Validated MetaModes: +(II) NVIDIA(0): "NULL" .... +==== -[[x-config-files]] -=== Configuration Files +[[x-config]] +== Xorg Configuration + +Xorg supports most common video cards, keyboards, and pointing devices. -Manual configuration is usually not necessary. -Please do not manually create configuration files unless autoconfiguration does not work. +[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-directory]] -==== Directory +[[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. +[.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. -Storing configuration files in the legacy [.filename]#/etc/X11/# still works. -However, this mixes application files with the base FreeBSD files and is not recommended. - [[x-config-files-single-or-multi]] -==== Single or Multiple Files +=== 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]#xorg.conf.d/# subdirectory of the main configuration file directory. -The full path is typically [.filename]#/usr/local/etc/X11/xorg.conf.d/#. +These files are stored in the [.filename]#/usr/local/etc/X11/xorg.conf.d/# subdirectory. -Examples of these files are shown later in this section. - -The traditional single [.filename]#xorg.conf# still works, but is neither as clear nor as flexible as multiple files in the [.filename]#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 Ports framework provides the drm graphics drivers necessary for X11 operation on recent hardware. -Users can use one of the following drivers available from package:graphics/drm-kmod[]. -These drivers use interfaces in the kernel that are normally private. -As such, it is strongly recommended that the drivers be built via the ports system via the `PORTS_MODULES` variable. -With `PORTS_MODULES`, every time you build the kernel, the corresponding port(s) containing kernel modules are re-built against the updated sources. -This ensures the kernel module stays in-sync with the kernel itself. -The kernel and ports trees should be updated together for maximum compatibility. -You can add `PORTS_MODULES` to your [.filename]#/etc/make.conf# file to ensure all kernels you build rebuild this module. -Advanced users can add it to their kernel config files with the `makeoptions` directive. -If you run GENERIC and use freebsd-update, you can just build the [.filename]#graphics/drm-kmod# or [.filename]#x11/nvidia-driver# port after each `freebsd-update install` invocation. +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]#/etc/make.conf# +[.filename]#/usr/local/etc/X11/xorg.conf.d/20-intel.conf# [.programlisting] .... -SYSDIR=path/to/src/sys -PORTS_MODULES=graphics/drm-kmod x11/nvidia-driver +Section "Device" + Identifier "Card0" + Driver "intel" +EndSection .... -This will rebuild everything, but can select one or the other depending on which GPU / graphics card you have. ==== -[[x-config-video-cards-ports]] -Intel KMS driver, Radeon KMS driver, AMD KMS driver:: -2D and 3D acceleration is supported on most Intel KMS driver graphics cards provided by Intel. -+ -Driver name: `i915kms` -+ -2D and 3D acceleration is supported on most older Radeon KMS driver graphics cards provided by AMD. -+ -Driver name: `radeonkms` -+ -2D and 3D acceleration is supported on most newer AMD KMS driver graphics cards provided by AMD. -+ -Driver name: `amdgpu` -+ -For reference, please see https://en.wikipedia.org/wiki/List_of_Intel_graphics_processing_units[] or https://en.wikipedia.org/wiki/List_of_AMD_graphics_processing_units[] for a list of supported GPUs. - -[[x-config-video-cards-intel]] -Intel(R):: -3D acceleration is supported on most Intel(R) graphics up to Ivy Bridge (HD Graphics 2500, 4000, and P4000), including Iron Lake (HD Graphics) and Sandy Bridge (HD Graphics 2000). -+ -Driver name: `intel` -+ -For reference, see https://en.wikipedia.org/wiki/List_of_Intel_graphics_processing_units[]. - -[[x-config-video-cards-radeon]] -AMD(R) Radeon:: -2D and 3D acceleration is supported on Radeon cards up to and including the HD6000 series. -+ -Driver name: `radeon` -+ -For reference, see https://en.wikipedia.org/wiki/List_of_AMD_graphics_processing_units[]. - -[[x-config-video-cards-nvidia]] -NVIDIA:: -Several NVIDIA drivers are available in the [.filename]#x11# category of the Ports Collection. -Install the driver that matches the video card. -+ -For reference, see https://en.wikipedia.org/wiki/List_of_Nvidia_graphics_processing_units[]. -+ -Kernel support for NVIDIA cards is found in either the [.filename]#x11/nvidia-driver# port or the [.filename]#x11/nvidia-driver-xxx# port. -Modern cards use the former. -Legacy cards use the -xxx ports, where xxx is one of 304, 340 or 390 indicating the version of the driver. -For those, fill in the `-xxx` using the http://download.nvidia.com/XFree86/FreeBSD-x86_64/465.19.01/README/[ Supported NVIDIA GPU Products ] page. -This page lists the devices supported by different versions of the driver. -Legacy drivers run on both i386 and amd64. -The current driver only supports amd64. -Read http://download.nvidia.com/XFree86/FreeBSD-x86_64/465.19.01/README/[installation and configuration of NVIDIA driver] for details. -While we recommend this driver be rebuilt with each kernel rebuild for maximum safety, it uses almost no private kernel interfaces and is usually safe across kernel updates. - -[[x-config-video-cards-hybrid]] -Hybrid Combination Graphics:: -Some notebook computers add additional graphics processing units to those built into the chipset or processor. -_Optimus_ combines Intel(R) and NVIDIA hardware. -_Switchable Graphics_ or _Hybrid Graphics_ are a combination of an Intel(R) or AMD(R) processor and an AMD(R) Radeon `GPU`. -+ -Implementations of these hybrid graphics systems vary, and Xorg on FreeBSD is not able to drive all versions of them. -+ -Some computers provide a `BIOS` option to disable one of the graphics adapters or select a _discrete_ mode which can be used with one of the standard video card drivers. -For example, it is sometimes possible to disable the NVIDIA `GPU` in an Optimus system. -The Intel(R) video can then be used with an Intel(R) driver. -+ -`BIOS` settings depend on the model of computer. -In some situations, both ``GPU``s can be left enabled, but creating a configuration file that only uses the main `GPU` in the `Device` section is enough to make such a system functional. - -[[x-config-video-cards-other]] -Other Video Cards:: -Drivers for some less-common video cards can be found in the [.filename]#x11-drivers# directory of the Ports Collection. -+ -Cards that are not supported by a specific driver might still be usable with the package:x11-drivers/xf86-video-vesa[] driver. -This driver is installed by package:x11/xorg[]. -It can also be installed manually as package:x11-drivers/xf86-video-vesa[]. -Xorg attempts to use this driver when a specific driver is not found for the video card. -+ -package:x11-drivers/xf86-video-scfb[] is a similar nonspecialized video driver that works on many `UEFI` and ARM(R) computers. - -[[x-config-video-cards-file]] -Setting the Video Driver in a File:: -To set the Intel(R) driver in a configuration file: -+ +To configure the AMD(R) driver in a configuration file: + [[x-config-video-cards-file-intel]] -.Select Intel(R) Video Driver in a File +.Select AMD(R) Video Driver in a File [example] ==== -[.filename]#/usr/local/etc/X11/xorg.conf.d/driver-intel.conf# +[.filename]#/usr/local/etc/X11/xorg.conf.d/20-radeon.conf# [.programlisting] .... Section "Device" Identifier "Card0" - Driver "intel" - # BusID "PCI:1:0:0" + Driver "radeon" EndSection .... - -If more than one video card is present, the `BusID` identifier can be uncommented and set to select the desired card. -A list of video card bus ``ID``s can be displayed with `pciconf -lv | grep -B3 display`. ==== -+ -To set the Radeon driver in a configuration file: -+ -[[x-config-video-cards-file-radeon]] -.Select Radeon Video Driver in a File + +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/driver-radeon.conf# +[.filename]#/usr/local/etc/X11/xorg.conf.d/20-nvidia.conf# [.programlisting] .... Section "Device" Identifier "Card0" - Driver "radeon" + Driver "nvidia" EndSection .... - ==== -+ -To set the `VESA` driver in a configuration file: -+ -[[x-config-video-cards-file-vesa]] -.Select `VESA` Video Driver in a File + +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/driver-vesa.conf# +[.filename]#/usr/local/etc/X11/xorg.conf.d/20-vesa.conf# [.programlisting] .... @@ -412,16 +406,15 @@ Driver "vesa" EndSection .... - ==== -+ -To set the `scfb` driver for use with a `UEFI` or ARM(R) computer: -+ -[[x-config-video-cards-file-scfb]] -.Select `scfb` Video Driver in a File + +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/driver-scfb.conf# +[.filename]#/usr/local/etc/X11/xorg.conf.d/20-scfb.conf# [.programlisting] .... @@ -432,6 +425,52 @@ .... ==== +To configure multiple video cards, the `BusID` can be added. +A list of video card bus ``ID``s can be displayed 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 @@ -442,91 +481,72 @@ 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 man:xrandr[1]:: +==== 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 -Screen 0: minimum 320 x 200, current 3000 x 1920, maximum 8192 x 8192 -DVI-0 connected primary 1920x1200+1080+0 (normal left inverted right x axis y axis) 495mm x 310mm - 1920x1200 59.95*+ - 1600x1200 60.00 - 1280x1024 85.02 75.02 60.02 - 1280x960 60.00 - 1152x864 75.00 - 1024x768 85.00 75.08 70.07 60.00 - 832x624 74.55 - 800x600 75.00 60.32 - 640x480 75.00 60.00 - 720x400 70.08 -DisplayPort-0 disconnected (normal left inverted right x axis y axis) -HDMI-0 disconnected (normal left inverted right x axis y axis) -.... -+ -This shows that the `DVI-0` output is being used to display a screen resolution of 1920x1200 pixels at a refresh rate of about 60 Hz. -Monitors are not attached to the `DisplayPort-0` and `HDMI-0` connectors. -+ +.... + +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. +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 DVI-0 --mode 1280x1024 --rate 60 -.... -+ -A common task is using the external video output on a notebook computer for a video projector. -+ -The type and quantity of output connectors varies between devices, and the name given to each output varies from driver to driver. -What one driver calls `HDMI-1`, another might call `HDMI1`. -So the first step is to run man:xrandr[1] to list all the available outputs: -+ -[source,shell] -.... -% xrandr -Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192 -LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 193mm - 1366x768 60.04*+ - 1024x768 60.00 - 800x600 60.32 56.25 - 640x480 59.94 -VGA1 connected (normal left inverted right x axis y axis) - 1280x1024 60.02 + 75.02 - 1280x960 60.00 - 1152x864 75.00 - 1024x768 75.08 70.07 60.00 - 832x624 74.55 - 800x600 72.19 75.00 60.32 56.25 - 640x480 75.00 72.81 66.67 60.00 - 720x400 70.08 -HDMI1 disconnected (normal left inverted right x axis y axis) -DP1 disconnected (normal left inverted right x axis y axis) -.... -+ -Four outputs were found: the built-in panel `LVDS1`, and external `VGA1`, `HDMI1`, and `DP1` connectors. -+ -The projector has been connected to the `VGA1` output. -man:xrandr[1] is now used to set that output to the native resolution of the projector and add the additional space to the right side of the desktop: -+ + [source,shell] .... -% xrandr --output VGA1 --auto --right-of LVDS1 +% xrandr --output LVDS-1 --mode 1280x720 --rate 60 .... -+ -`--auto` chooses the resolution and refresh rate detected by `EDID`. -If the resolution is not correctly detected, a fixed value can be given with `--mode` instead of the `--auto` statement. -For example, most projectors can be used with a 1024x768 resolution, which is set with `--mode 1024x768`. -+ -man:xrandr[1] is often run from [.filename]#.xinitrc# to set the appropriate mode when X starts. [[x-config-monitors-files]] -Setting Monitor Resolution in a File:: +==== 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/screen-resolution.conf# +[.filename]#/usr/local/etc/X11/xorg.conf.d/10-monitor.conf# [.programlisting] .... @@ -538,174 +558,51 @@ EndSubSection EndSection .... - -==== -+ -The few monitors that do not have `EDID` can be configured by setting `HorizSync` and `VertRefresh` to the range of frequencies supported by the monitor. -+ -.Manually Setting Monitor Frequencies -[example] -==== -[.filename]#/usr/local/etc/X11/xorg.conf.d/monitor0-freq.conf# - -[.programlisting] -.... -Section "Monitor" - Identifier "Monitor0" - HorizSync 30-83 # kHz - VertRefresh 50-76 # Hz -EndSection -.... - ==== [[x-config-input]] === Input Devices -[[x-config-input-keyboard]] -==== Keyboards - -[[x-config-input-keyboard-layout]] -Keyboard Layout:: -The standardized location of keys on a keyboard is called a _layout_. -Layouts and other adjustable parameters are listed in man:xkeyboard-config[7]. -+ -A United States layout is the default. -To select an alternate layout, set the `XkbLayout` and `XkbVariant` options in an `InputClass`. -This will be applied to all input devices that match the class. -+ -This example selects a French keyboard layout. -+ -.Setting a Keyboard Layout -[example] -==== -[.filename]#/usr/local/etc/X11/xorg.conf.d/keyboard-fr.conf# - -[.programlisting] -.... -Section "InputClass" - Identifier "KeyboardDefaults" - MatchIsKeyboard "on" - Option "XkbLayout" "fr" -EndSection -.... - -==== -+ -.Setting Multiple Keyboard Layouts -[example] -==== -Set United States, Spanish, and Ukrainian keyboard layouts. -Cycle through these layouts by pressing kbd:[Alt+Shift]. -package:x11/xxkb[] or package:x11/sbxkb[] can be used for improved layout switching control and current layout indicators. - -[.filename]#/usr/local/etc/X11/xorg.conf.d/kbd-layout-multi.conf# - -[.programlisting] -.... -Section "InputClass" - Identifier "All Keyboards" - MatchIsKeyboard "yes" - Option "XkbLayout" "us, es, ua" -EndSection -.... - -==== +Through package:x11/libinput[] Xorg supports the vast majority of input devices. -[[x-config-input-keyboard-zap]] -Closing Xorg From the Keyboard:: -X can be closed with a combination of keys. -By default, that key combination is not set because it conflicts with keyboard commands for some applications. -Enabling this option requires changes to the keyboard `InputDevice` section: -+ -.Enabling Keyboard Exit from X -[example] +[TIP] ==== -[.filename]#/usr/local/etc/X11/xorg.conf.d/keyboard-zap.conf# - -[.programlisting] -.... -Section "InputClass" - Identifier "KeyboardDefaults" - MatchIsKeyboard "on" - Option "XkbOptions" "terminate:ctrl_alt_bksp" -EndSection -.... - +Some desktop environments (such as KDE Plasma) provide a graphical UI for setting these parameters. +Check it before resorting to manual configuration editing. ==== -[[x11-input-mice]] -==== Mice and Pointing Devices - -[IMPORTANT] -==== -If using package:xorg-server[] 1.20.8 or later under FreeBSD {rel121-current} and not using man:moused[8], add `kern.evdev.rcpt_mask=12` to [.filename]#/etc/sysctl.conf#. -==== +[[x-config-input-keyboard-layout]] +For example, to configure the keyboard layout: -Many mouse parameters can be adjusted with configuration options. -See man:mousedrv[4] for a full list. -[[x11-input-mice-buttons]] -Mouse Buttons:: -The number of buttons on a mouse can be set in the mouse `InputDevice` section of [.filename]#xorg.conf#. -To set the number of buttons to 7: -+ -.Setting the Number of Mouse Buttons +.Setting a Keyboard Layout [example] ==== -[.filename]#/usr/local/etc/X11/xorg.conf.d/mouse0-buttons.conf# +[.filename]#/usr/local/etc/X11/xorg.conf.d/00-keyboard.conf# [.programlisting] .... -Section "InputDevice" - Identifier "Mouse0" - Option "Buttons" "7" +Section "InputClass" + Identifier "Keyboard1" + MatchIsKeyboard "on" + Option "XkbLayout" "es, fr" + Option "XkbModel" "pc104" + Option "XkbVariant" ",qwerty" + Option "XkbOptions" "grp:win_space_toggle" EndSection .... - -==== - -[[x-config-manual-configuration]] -=== Manual Configuration - -In some cases, Xorg autoconfiguration does not work with particular hardware, or a different configuration is desired. -For these cases, a custom configuration file can be created. - -[WARNING] -==== -Do not create manual configuration files unless required. -Unnecessary manual configuration can prevent proper operation. ==== -A configuration file can be generated by Xorg based on the detected hardware. -This file is often a useful starting point for custom configurations. - -Generating an [.filename]#xorg.conf#: - -[source,shell] -.... -# Xorg -configure -.... - -The configuration file is saved to [.filename]#/root/xorg.conf.new#. -Make any changes desired, then test that file (using `-retro` so there is a visible background) with: - -[source,shell] -.... -# Xorg -retro -config /root/xorg.conf.new -.... - -After the new configuration has been adjusted and tested, it can be split into smaller files in the normal location, [.filename]#/usr/local/etc/X11/xorg.conf.d/#. - [[x-fonts]] == Using Fonts in Xorg -[[type1]] -=== Type1 Fonts - 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. -For instance, 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). + +[[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 <>. @@ -717,20 +614,14 @@ # pkg install urwfonts .... -Alternatively, to build from the Ports Collection, run the following commands: - -[source,shell] -.... -# cd /usr/ports/x11-fonts/urwfonts -# 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 ([.filename]#/etc/X11/xorg.conf#), which reads: +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] .... -FontPath "/usr/local/share/fonts/urwfonts/" +Section "Files" + FontPath "/usr/local/share/fonts/urwfonts/" +EdnSection .... Alternatively, at the command line in the X session run: @@ -750,7 +641,7 @@ 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]#/etc/X11/xorg.conf#. +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] .... @@ -829,7 +720,7 @@ [.programlisting] .... - + 14 @@ -876,7 +767,7 @@ [.programlisting] .... - + mono @@ -893,7 +784,7 @@ [.programlisting] .... - + Helvetica @@ -930,714 +821,4 @@ Depending on the sort of display, `rgb` may need to be changed to `bgr`, `vrgb` or `vbgr`: experiment and see which works best. ==== -[[x-xdm]] -== The X Display Manager - -Xorg provides an X Display Manager, XDM, which can be used for login session management. -XDM provides a graphical interface for choosing which display server to connect to and for entering authorization information such as a login and password combination. - -This section demonstrates how to configure the X Display Manager on FreeBSD. -Some desktop environments provide their own graphical login manager. -Refer to <> for instructions on how to configure the GNOME Display Manager and <> for instructions on how to configure the KDE Display Manager. - -=== Configuring XDM - -To install XDM, use the package:x11/xdm[] package or port. -Once installed, XDM can be configured to run when the machine boots up by adding the following line to [.filename]#/etc/rc.conf#: - -[.programlisting] -.... -xdm_enable="YES" -.... - -XDM will run on the ninth virtual terminal by default. - -The XDM configuration directory is located in [.filename]#/usr/local/etc/X11/xdm#. -This directory contains several files used to change the behavior and appearance of XDM, as well as a few scripts and programs used to set up the desktop when XDM is running. -<> summarizes the function of each of these files. -The exact syntax and usage of these files is described in man:xdm[8]. - -[[xdm-config-files]] -.XDM Configuration Files -[cols="1,1", frame="none", options="header"] -|=== -| File -| Description - -|[.filename]#Xaccess# -|The protocol for connecting to XDM is called the X Display Manager Connection Protocol (`XDMCP`). This file is a client authorization ruleset for controlling `XDMCP` connections from remote machines. By default, this file does not allow any remote clients to connect. - -|[.filename]#Xresources# -|This file controls the look and feel of the XDM display chooser and login screens. 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. The format of this file is identical to the app-defaults file described in the Xorg documentation. - -|[.filename]#Xservers# -|The list of local and remote displays the chooser should provide as login choices. - -|[.filename]#Xsession# -|Default session script for logins which is run by XDM after a user has logged in. This points to a customized session script in [.filename]#~/.xsession#. - -|[.filename]#Xsetup_#* -|Script to automatically launch applications before displaying the chooser or login interfaces. There is a script for each display being used, named [.filename]#Xsetup_*#, where `*` is the local display number. Typically these scripts run one or two programs in the background such as `xconsole`. - -|[.filename]#xdm-config# -|Global configuration for all displays running on this machine. - -|[.filename]#xdm-errors# -|Contains errors generated by the server program. If a display that XDM is trying to start hangs, look at this file for error messages. These messages are also written to the user's [.filename]#~/.xsession-errors# on a per-session basis. - -|[.filename]#xdm-pid# -|The running process `ID` of XDM. -|=== - -=== Configuring Remote Access - -By default, only users on the same system can login using XDM. -To enable users on other systems to connect to the display server, edit the access control rules and enable the connection listener. - -To configure XDM to listen for any remote connection, comment out the `DisplayManager.requestPort` line in [.filename]#/usr/local/etc/X11/xdm/xdm-config# by putting a `!` in front of it: - -[source,shell] -.... -! 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 -.... - -Save the edits and restart XDM. -To restrict remote access, look at the example entries in [.filename]#/usr/local/etc/X11/xdm/Xaccess# and refer to man:xdm[8] for further information. - -[[x11-wm]] -== Desktop Environments - -This section describes how to install three popular desktop environments on a FreeBSD system. -A desktop environment can range from a simple window manager to a complete suite of desktop applications. -Over a hundred desktop environments are available in the [.filename]#x11-wm# category of the Ports Collection. - -[[x11-wm-gnome]] -=== 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. -More information regarding GNOME on FreeBSD can be found at https://www.FreeBSD.org/gnome[https://www.FreeBSD.org/gnome]. -That web site contains additional documentation about installing, configuring, and managing GNOME on FreeBSD. - -This desktop environment can be installed from a package: - -[source,shell] -.... -# pkg install gnome -.... - -To instead build GNOME from ports, use the following command. -GNOME is a large application and will take some time to compile, even on a fast computer. - -[source,shell] -.... -# cd /usr/ports/x11/gnome -# make install clean -.... - -GNOME requires [.filename]#/proc# to be mounted. -Add this line to [.filename]#/etc/fstab# to mount this file system automatically during system startup: - -[.programlisting] -.... -proc /proc procfs rw 0 0 -.... - -GNOME uses D-Bus for a message bus and hardware abstraction. -These applications are automatically installed as dependencies of GNOME. -Enable them in [.filename]#/etc/rc.conf# so they will be started when the system boots: - -[.programlisting] -.... -dbus_enable="YES" -.... - -After installation, configure Xorg to start GNOME. -The easiest way to do this is to enable the GNOME Display Manager, GDM, which is installed as part of the GNOME package or port. -It can be enabled by adding this line to [.filename]#/etc/rc.conf#: - -[.programlisting] -.... -gdm_enable="YES" -.... - -It is often desirable to also start all GNOME services. -To achieve this, add a second line to [.filename]#/etc/rc.conf#: - -[.programlisting] -.... -gnome_enable="YES" -.... - -GDM will start automatically when the system boots. - -A second method for starting GNOME is to type `startx` from the command-line after configuring [.filename]#~/.xinitrc#. -If this file already exists, replace the line that starts the current window manager with one that starts [.filename]#/usr/local/bin/gnome-session#. -If this file does not exist, create it with this command: - -[source,shell] -.... -% echo "exec /usr/local/bin/gnome-session" > ~/.xinitrc -.... - -A third method is to use XDM as the display manager. -In this case, create an executable [.filename]#~/.xsession#: - -[source,shell] -.... -% echo "exec /usr/local/bin/gnome-session" > ~/.xsession -.... - -[[x11-wm-kde]] -=== KDE - -KDE is another 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 http://www.kde.org/[http://www.kde.org/]. -For FreeBSD-specific information, consult http://freebsd.kde.org/[http://freebsd.kde.org]. - -To install the KDE package, type: - -[source,shell] -.... -# pkg install x11/kde5 -.... - -To instead build the KDE port, use the following command. -Installing the port will provide a menu for selecting which components to install. -KDE is a large application and will take some time to compile, even on a fast computer. - -[source,shell] -.... -# cd /usr/ports/x11/kde5 -# make install clean -.... - -KDE requires [.filename]#/proc# to be mounted. -Add this line to [.filename]#/etc/fstab# to mount this file system automatically during system startup: - -[.programlisting] -.... -proc /proc procfs rw 0 0 -.... - -KDE uses D-Bus for a message bus and hardware abstraction. -These applications are automatically installed as dependencies of KDE. -Enable them in [.filename]#/etc/rc.conf# so they will be started when the system boots: - -[.programlisting] -.... -dbus_enable="YES" -.... - -Since KDE Plasma 5, the KDE Display Manager, KDM is no longer developed. -A possible replacement is SDDM. -To install it, type: - -[source,shell] -.... -# pkg install x11/sddm -.... - -Add this line to [.filename]#/etc/rc.conf#: - -[.programlisting] -.... -sddm_enable="YES" -.... - -A second method for launching KDE Plasma is to type `startx` from the command line. -For this to work, the following line is needed in [.filename]#~/.xinitrc#: - -[.programlisting] -.... -exec ck-launch-session startplasma-x11 -.... - -A third method for starting KDE Plasma is through XDM. -To do so, create an executable [.filename]#~/.xsession# as follows: - -[source,shell] -.... -% echo "exec ck-launch-session startplasma-x11" > ~/.xsession -.... - -Once KDE Plasma is started, refer to its built-in help system for more information on how to use its various menus and applications. - -[[x11-wm-xfce]] -=== Xfce - -Xfce is a desktop environment based on the GTK+ toolkit used by GNOME. -However, it is more 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. -More information on Xfce can be found at http://www.xfce.org/[http://www.xfce.org]. - -To install the Xfce package: - -[source,shell] -.... -# pkg install xfce -.... - -Alternatively, to build the port: - -[source,shell] -.... -# cd /usr/ports/x11-wm/xfce4 -# make install clean -.... - -Xfce uses D-Bus for a message bus. -This application is automatically installed as dependency of Xfce. -Enable it in [.filename]#/etc/rc.conf# so it will be started when the system boots: - -[.programlisting] -.... -dbus_enable="YES" -.... - -Unlike GNOME or KDE, Xfce does not provide its own login manager. -In order to start Xfce from the command line by typing `startx`, first create [.filename]#~/.xinitrc# with this command: - -[source,shell] -.... -% echo ". /usr/local/etc/xdg/xfce4/xinitrc" > ~/.xinitrc -.... - -An alternate method is to use XDM. -To configure this method, create an executable [.filename]#~/.xsession#: - -[source,shell] -.... -% echo ". /usr/local/etc/xdg/xfce4/xinitrc" > ~/.xsession -.... - -[[x-compiz-fusion]] -== Installing Compiz Fusion - -One way to make using a desktop computer more pleasant is with nice 3D effects. - -Installing the Compiz Fusion package is easy, but configuring it requires a few steps that are not described in the port's documentation. - -[[x-compiz-video-card]] -=== Setting up the FreeBSD nVidia Driver - -Desktop effects can cause quite a load on the graphics card. -For an nVidia-based graphics card, the proprietary driver is required for good performance. -Users of other graphics cards can skip this section and continue with the [.filename]#xorg.conf# configuration. - -To determine which nVidia driver is needed see the extref:{faq}[FAQ question on the subject, idp59950544]. - -Having determined the correct driver to use for your card, installation is as simple as installing any other package. - -For example, to install the latest driver: - -[source,shell] -.... -# pkg install x11/nvidia-driver -.... - -The driver will create a kernel module, which needs to be loaded at system startup. -Use man:sysrc[8] to load the module at startup: - -[source,shell] -.... -# sysrc kld_list+="nvidia" -.... - -Alternatively, add the following line to [.filename]#/boot/loader.conf#: - -[.programlisting] -.... -nvidia_load="YES" -.... - -[NOTE] -==== -To immediately load the kernel module into the running kernel issue a command like `kldload nvidia`. -However, it has been noted that some versions of Xorg will not function properly if the driver is not loaded at boot time. -After editing [.filename]#/boot/loader.conf#, a reboot is recommended. -Improper settings in [.filename]#/boot/loader.conf# can cause the system not to boot properly. -==== - -With the kernel module loaded, you normally only need to change a single line in [.filename]#xorg.conf# to enable the proprietary driver: - -Find the following line in [.filename]#/etc/X11/xorg.conf#: - -[.programlisting] -.... -Driver "nv" -.... - -and change it to: - -[.programlisting] -.... -Driver "nvidia" -.... - -Start the GUI as usual, and you should be greeted by the nVidia splash. -Everything should work as usual. - -[[xorg-configuration]] -=== Configuring `xorg.conf` for Desktop Effects - -To enable Compiz Fusion, [.filename]#/etc/X11/xorg.conf# needs to be modified: - -Add the following section to enable composite effects: - -[.programlisting] -.... -Section "Extensions" - Option "Composite" "Enable" -EndSection -.... - -Locate the "Screen" section which should look similar to the one below: - -[.programlisting] -.... -Section "Screen" - Identifier "Screen0" - Device "Card0" - Monitor "Monitor0" - ... -.... - -and add the following two lines (after "Monitor" will do): - -[.programlisting] -.... -DefaultDepth 24 -Option "AddARGBGLXVisuals" "True" -.... - -Locate the "Subsection" that refers to the screen resolution that you wish to use. -For example, if you wish to use 1280x1024, locate the section that follows. -If the desired resolution does not appear in any subsection, you may add the relevant entry by hand: - -[.programlisting] -.... -SubSection "Display" - Viewport 0 0 - Modes "1280x1024" -EndSubSection -.... - -A color depth of 24 bits is needed for desktop composition, change the above subsection to: - -[.programlisting] -.... -SubSection "Display" - Viewport 0 0 - Depth 24 - Modes "1280x1024" -EndSubSection -.... - -Finally, confirm that the "glx" and "extmod" modules are loaded in the "Module" section: - -[.programlisting] -.... -Section "Module" - Load "extmod" - Load "glx" - ... -.... - -The preceding can be done automatically with package:x11/nvidia-xconfig[] by running (as root): - -[source,shell] -.... -# nvidia-xconfig --add-argb-glx-visuals -# nvidia-xconfig --composite -# nvidia-xconfig --depth=24 -.... - -[[compiz-fusion]] -=== Installing and Configuring Compiz Fusion - -Installing Compiz Fusion is as simple as any other package: - -[source,shell] -.... -# pkg install x11-wm/compiz-fusion -.... - -When the installation is finished, start your graphic desktop and at a terminal, enter the following commands (as a normal user): - -[source,shell] -.... -% compiz --replace --sm-disable --ignore-desktop-hints ccp & -% emerald --replace & -.... - -Your screen will flicker for a few seconds, as your window manager (e.g., Metacity if you are using GNOME) is replaced by Compiz Fusion. -Emerald takes care of the window decorations (i.e., close, minimize, maximize buttons, title bars and so on). - -You may convert this to a trivial script and have it run at startup automatically (e.g., by adding to "Sessions" in a GNOME desktop): - -[.programlisting] -.... -#! /bin/sh -compiz --replace --sm-disable --ignore-desktop-hints ccp & -emerald --replace & -.... - -Save this in your home directory as, for example, [.filename]#start-compiz# and make it executable: - -[source,shell] -.... -% chmod +x ~/start-compiz -.... - -Then use the GUI to add it to [.guimenuitem]#Startup Programs# (located in [.guimenuitem]#System#, [.guimenuitem]#Preferences#, [.guimenuitem]#Sessions# on a GNOME desktop). - -To actually select all the desired effects and their settings, execute (again as a normal user) the Compiz Config Settings Manager: - -[source,shell] -.... -% ccsm -.... - -[NOTE] -==== -In GNOME, this can also be found in the [.guimenuitem]#System#, [.guimenuitem]#Preferences# menu. -==== - -If you have selected "gconf support" during the build, you will also be able to view these settings using `gconf-editor` under `apps/compiz`. - -[[x11-troubleshooting]] -== Troubleshooting - -If the mouse does not work, you will need to first configure it before proceeding. -In recent Xorg versions, the `InputDevice` sections in [.filename]#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: - -[.programlisting] -.... -Option "AutoAddDevices" "false" -.... - -Input devices may then be configured as in previous versions, along with any other options needed (e.g., keyboard layout switching). - -[NOTE] -==== -[WARNING] -===== -This section contains partially outdated information. -The HAL daemon (hald) is no longer a part of the FreeBSD desktop setup. -===== -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 [.filename]#x11-input.fdi# and saved in the [.filename]#/usr/local/etc/hal/fdi/policy# directory. -This file should contain the following lines: - -[.programlisting] -.... - - - - - pc102 - fr - - - -.... - -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: - -[source,shell] -.... -% setxkbmap -model pc102 -layout fr -.... - -[.filename]#/usr/local/share/X11/xkb/rules/base.lst# lists the various keyboard, layouts and options available. -==== - -The [.filename]#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 [.filename]#xorg.conf.new# under the `"Monitor"` section: - -[.programlisting] -.... -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 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: - -[.programlisting] -.... -Option "DPMS" -.... - -While the [.filename]#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: - -[.programlisting] -.... -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 `-depth` 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. - -Finally, write the configuration file and test it using the test mode given above. - -[NOTE] -==== -One of the tools available to assist you during troubleshooting process are the Xorg log files, which contain information on each device that the Xorg server attaches to. -Xorg log file names are in the format of [.filename]#/var/log/Xorg.0.log#. -The exact name of the log can vary from [.filename]#Xorg.0.log# to [.filename]#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 [.filename]#/etc/X11/xorg.conf# or [.filename]#/usr/local/etc/X11/xorg.conf#. - -[source,shell] -.... -# cp xorg.conf.new /etc/X11/xorg.conf -.... - -The Xorg configuration process is now complete. -Xorg may be now started with the man:startx[1] utility. -The Xorg server may also be started with the use of man:xdm[8]. - -=== Configuration with Intel(R) `i810` Graphics Chipsets - -Configuration with Intel(R) i810 integrated chipsets requires the [.filename]#agpgart# AGP programming interface for Xorg 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 [.filename]#/boot/loader.conf#. - -=== Adding a Widescreen Flatpanel to the Mix - -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: - -[.programlisting] -.... -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. - -If those `ModeLines` do not exist in the drivers, one might need to give Xorg a little hint. -Using [.filename]#/var/log/Xorg.0.log# one can extract enough information to manually create a `ModeLine` that will work. -Simply look for information resembling this: - -[.programlisting] -.... -(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: - -[.programlisting] -.... -ModeLine <4 horiz. timings> <4 vert. timings> -.... - -So that the `ModeLine` in `Section "Monitor"` for this example would look like this: - -[.programlisting] -.... -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. - -[[compiz-troubleshooting]] -=== Troubleshooting Compiz Fusion - -==== I have installed Compiz Fusion, and after running the commands you mention, my windows are left without title bars and buttons. What is wrong? - -You are probably missing a setting in [.filename]#/etc/X11/xorg.conf#. -Review this file carefully and check especially the `DefaultDepth` and `AddARGBGLXVisuals` directives. - -==== When I run the command to start Compiz Fusion, the X server crashes and I am back at the console. What is wrong? - -If you check [.filename]#/var/log/Xorg.0.log#, you will probably find error messages during the X startup. -The most common would be: - -[source,shell] -.... -(EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X -(EE) NVIDIA(0): log file that the GLX module has been loaded in your X -(EE) NVIDIA(0): server, and that the module is the NVIDIA GLX module. If -(EE) NVIDIA(0): you continue to encounter problems, Please try -(EE) NVIDIA(0): reinstalling the NVIDIA driver. -.... - -This is usually the case when you upgrade Xorg. -You will need to reinstall the package:x11/nvidia-driver[] package so glx is built again. +For more information about how to install and configure Fonts on FreeBSD, please read the article link:{fonts}[Fonts and FreeBSD].