Difference between revisions of "Beginners' guide/Post-installation"

From ArchWiki
Jump to: navigation, search
m
(Message bus)
Line 153: Line 153:
  
 
Install [[dbus]]:
 
Install [[dbus]]:
{{bc|# pacman -S dbus}}
+
{{bc|# pacman -S systemd}}
  
 
Start the dbus daemon:
 
Start the dbus daemon:

Revision as of 22:00, 30 August 2012

Tip: This is part of a multi-page article for The Beginners' Guide. Click here if you would rather read the guide in its entirety.

Extra

You should now have a completely functional Arch system which will act as a suitable base for you to build upon based on your needs. However, most people are interested in a desktop system, complete with sound and graphics. This part of the guide will provide a brief overview of the procedure to acquire these extras.

Sudo

Sudo can make administering your system as a non-root user a much simpler proposition.

Sound

If you want sound, proceed to Advanced Linux Sound Architecture for instructions. Alternatively, proceed to the next section first, and set up sound later.

Note: ALSA usually works out-of-the-box, it just needs to be unmuted.

The Advanced Linux Sound Architecture (ALSA) is included with the kernel and it is recommended to try it first. However, if it does not work or you are not satisfied with the quality, the Open Sound System is a viable alternative. OSSv4 has been released under a free license and is generally considered a significant improvement over the older OSSv3 which was replaced by ALSA. Instructions can be found in the OSS article.

If you have advanced audio requirements, take a look at Sound for an overview of various articles.

Graphical User Interface

Install X

Note: If you are installing Arch as a Virtualbox guest, you need a different way to complete X installation. See Arch Linux VirtualBox Guest, then jump to the configuration part below.

The X Window System (commonly X11, or X) is a networking and display protocol which provides windowing on bitmap displays. It provides the standard toolkit and protocol to build graphical user interfaces (GUIs).

Now we will install the base Xorg packages using pacman.

Install the base packages:

# pacman -S xorg-server xorg-xinit xorg-server-utils

Install mesa for 3D support:

# pacman -S mesa

The 3D utilities glxgears and glxinfo are included in the mesa-demos package. Install if needed:

# pacman -S mesa-demos

Install video driver

Next, you should install a driver for your graphics card.

You will need knowledge of which video chipset your machine has. If you do not know, use the /usr/sbin/lspci program:

# lspci | grep VGA
Note: The vesa driver is the most generic, and should work with almost any modern video chipset. If you cannot find a suitable driver for your video chipset, vesa should work with any video card, but it offers only unaccelerated 2D performance.

For a complete list of all open-source video drivers, search the package database:

# pacman -Ss xf86-video | less
Note: Proprietary drivers for NVIDIA and ATI are covered in the next sections. If you plan on doing heavy 3D processing such as gaming, consider using these.

Use pacman to install the appropriate video driver for your video card/onboard video. Example for the Savage driver:

# pacman -S xf86-video-savage
Tip: For some Intel graphics cards, configuration may be necessary to get proper 2D or 3D performance, see Intel for more information.
NVIDIA Graphics Cards

NVIDIA users have three options for drivers (in addition to the vesa driver):

  • The open-source nouveau driver, which offers fast 2d acceleration and basic 3d support which is good enough for basic compositing (note: does not fully support powersaving yet). Feature Matrix.
  • The open-source (but obfuscated) nv driver, which is very slow and only has 2d support.
  • The proprietary nvidia drivers, which offer good 3d performance and powersaving. Even if you plan on using the proprietary drivers, it is recommended to start with nouveau and then switch to the binary driver after you have X set up and working. Nouveau often works out-of-the-box, while nvidia will require configuration and likely some troubleshooting. See NVIDIA for more information.

The open-source nouveau driver should be good enough for most users and is recommended:

# pacman -S xf86-video-nouveau

For experimental 3D support:

# pacman -S nouveau-dri
Tip: For advanced instructions, see Nouveau.
ATI Graphics Cards

ATI owners have two options for drivers (in addition to the vesa driver):

  • The open source radeon driver provided by the xf86-video-ati package. See the radeon feature matrix for details.
  • The proprietary fglrx driver provided by the catalystAUR package located in the AUR. It supports only newer devices (HD2xxx and newer). It was once a package offered by Arch in the extra repository, but as of March 2009, official support has been dropped because of dissatisfaction with the quality and speed of development of the proprietary driver. See ATI Catalyst for more information.

The open-source driver is the recommended choice. Install the radeon ATI Driver:

# pacman -S xf86-video-ati
Tip: For advanced instructions, see ATI.
SiS Graphics Cards

SiS cards are not officially supported on Linux. Despite this fact 3 more or less outdated drivers can be installed from the official repositories:

# pacman -S xf86-video-sis

or

# pacman -S xf86-video-sisusb

or

# pacman -S xf86-video-sisimedia

If none of them works for you, searching in the AUR and compiling a driver (with possible downgrading of xorg-server) is the only option.

Tip:

Install input drivers

Udev should be capable of detecting your hardware without problems and evdev (xf86-input-evdev) is the modern, hotplugging input driver for almost all devices so in most cases, installing input drivers is not needed. At this point, evdev has already been installed as a dependency of Xorg.

If evdev does not support your device, install the needed driver from the xorg-input-drivers group.

For a complete list of available input drivers, invoke a pacman search:

# pacman -Ss xf86-input | less
Note: You only need xf86-input-keyboard or xf86-input-mouse if you plan on disabling hotplugging, otherwise, evdev will act as the input driver.

Laptop users (or users with a touchscreen) will also need the synaptics package to allow X to configure the touchpad/touchscreen:

# pacman -S xf86-input-synaptics
Tip: For instructions on fine tuning or troubleshooting touchpad settings, see the Touchpad Synaptics article.

Configure X (Optional)

Warning: Proprietary drivers usually require a reboot after installation along with configuration. See NVIDIA or ATI Catalyst for details.

X Server features auto-configuration and therefore can function without an xorg.conf. If you still wish to manually configure X Server, please see the Xorg wiki page.

Non-US keyboard

If you do not use a standard US keyboard, you need to set the keyboard layout in /etc/X11/xorg.conf.d/10-evdev.conf:

Section "InputClass"
    Identifier "evdev keyboard catchall"
    MatchIsKeyboard "on"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
    Option "XkbLayout" "be"
EndSection

If, for example, you wish to use a variant of the US keyboard, add the following into the same section from the previous example:

Option "XkbLayout" "us"
Option "XkbVariant" "dvorak"
Note: The XkbLayout key may differ from the keymap code you used with the km or loadkeys command. A list of many keyboard layouts and variants can be found in /usr/share/X11/xkb/rules/base.lst (see text after line beginning with ! layout). For instance the layout: gb corresponds to "English (UK)".

Testing X

This section will explain how to set up the default X environment with twm in order to test X. This section below cover installing a desktop environment or window manager of your choice.

Install the default environment:

# pacman -S xorg-twm xorg-xclock xterm

If Xorg was installed before creating the non-root user, there will be a template .xinitrc file in your home directory that needs to be either deleted or edited in order to start X. Simply deleting it will cause X to run with the default environment installed above.

# rm ~/.xinitrc
Message bus
Note: You can skip this section until you install a package that depends on dbus, but you'll need to remember to set up the daemon if and when you do.

Install dbus:

# pacman -S systemd

Start the dbus daemon:

# rc.d start dbus
Note: /usr/sbin/rc.d is an Arch-specific command which acts as a shortcut for executing daemon actions in place of using the full /etc/rc.d/daemon path.

Add dbus to the DAEMONS array in /etc/rc.conf so it starts automatically on boot:

DAEMONS=(... dbus ...)
Start X
Note: The Ctrl-Alt-Backspace shortcut traditionally used to kill X has been deprecated and will not work to exit out of this test. You can enable Template:Keypress by editing xorg.conf, as described here.
Both the following commands can be found in the xorg-xinit package if you have troubles running them.

Finally, start Xorg:

# startx

or:

# xinit -- /usr/bin/X -nolisten tcp

A few movable windows should show up, and your mouse should work. Once you are satisfied that X installation was a success, you may exit out of X by issuing the exit command into the prompts until you return to the console.

If the screen goes black, you may still attempt to switch to a different virtual console (Template:Keypress, for example), and login blindly as root, followed by Template:Keypress, followed by root's password followed by Template:Keypress.

You can attempt to kill the X server with /usr/bin/pkill (note the capital letter X):

# pkill X

If pkill does not work, reboot blindly with:

# reboot
In case of errors

If a problem occurs, look for errors in /var/log/Xorg.0.log. Be on the lookout for any lines beginning with (EE) which represent errors, and also (WW) which are warnings that could indicate other issues.

# grep EE /var/log/Xorg.0.log

Errors may also be searched for in the console output of the virtual console from which X was started.

See the Xorg article for detailed instructions and troubleshooting.

Need Help?

If you are still having trouble after consulting the Xorg article and need assistance via the Arch forums, be sure to install and use wgetpaste:

# pacman -S wgetpaste

Use wgetpaste and provide links for the following files when asking for help in your forum post:

  • ~/.xinitrc
  • /etc/X11/xorg.conf
  • /var/log/Xorg.0.log
  • /var/log/Xorg.0.log.old

Use it like so:

# wgetpaste /path/to/file

Post the corresponding links given within your forum post. Be sure to provide appropriate hardware and driver information as well.

Note: It is very important to provide detail when troubleshooting X. Please provide all pertinent information as detailed above when asking for assistance on the Arch forums.

Fonts

At this point, you may wish to install a set of TrueType fonts, as only unscalable bitmap fonts are included by default. DejaVu is a set of high quality, general-purpose fonts with good Unicode coverage:

# pacman -S ttf-dejavu
  • Refer to Font Configuration for how to configure font rendering and Fonts for font suggestions and installation instructions.

Choose and install a graphical interface

The X Window System provides the basic framework for building a graphical user interface (GUI).

Note: Choosing your DE or WM is a very subjective and personal decision. Choose the best environment for your needs.
Window Manager (WM) 
Controls the placement and appearance of application windows in conjunction with the X Window System. See Window managers for more information.
Desktop Environment (DE)
Works atop and in conjunction with X, to provide a completely functional and dynamic GUI. A DE typically provides a window manager, icons, applets, windows, toolbars, folders, wallpapers, a suite of applications and abilities like drag and drop. See Desktop environments for more information.
Note: You can build your own desktop environment with a window manager and the applications of your choice.

After installing a graphical interface, you may wish to continue with General Recommendations for post-installation instructions.

Methods for starting your Graphical Environment

Manually

You might prefer to start X manually from your terminal rather than booting straight into the desktop. For DE-specific commands, please see the wiki page corrosponding to your DE for more information. For more generic X commands, please see the section on the Xorg page.

Automatically

You might prefer to have the desktop start automatically during boot instead of starting X manually. See Display Manager for instructions on using a login manager or Start X at Boot for two lightweight methods that do not rely on a display manager.

Appendix

For a list of applications that may be of interest, see Common Applications.

See General Recommendations for post-installation tutorials like setting up CPU frequency scaling or font rendering.

See Also

Template:Beginners' Guide navigation