https://wiki.archlinux.org/api.php?action=feedcontributions&user=Cilyan&feedformat=atomArchWiki - User contributions [en]2024-03-29T01:55:19ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Install_Arch_Linux_from_existing_Linux&diff=647603Install Arch Linux from existing Linux2020-12-29T16:48:20Z<p>Cilyan: /* Selecting a mirror and downloading basic tools */ Remove selecting a mirror as the step is done in the previous chapter</p>
<hr />
<div>[[Category:Installation process]]<br />
[[de:Arch Linux auf einem Root-Server]]<br />
[[es:Install Arch Linux from existing Linux]]<br />
[[fr:Install chroot]]<br />
[[it:Install Arch Linux from existing Linux]]<br />
[[ja:既存の Linux からインストール]]<br />
[[pt:Install Arch Linux from existing Linux]]<br />
[[ru:Install Arch Linux from existing Linux]]<br />
[[zh-hans:Install Arch Linux from existing Linux]]<br />
[[zh-hant:Install Arch Linux from existing Linux]]<br />
{{Related articles start}}<br />
{{Related|Install from SSH}}<br />
{{Related articles end}}<br />
<br />
This document describes the bootstrapping process required to install Arch Linux from a running Linux host system.<br />
After bootstrapping, the installation proceeds as described in the [[Installation guide]].<br />
<br />
Installing Arch Linux from a running Linux is useful for:<br />
<br />
* remotely installing Arch Linux, e.g. a (virtual) root server<br />
* replacing an existing Linux without a LiveCD (see [[#Replacing the existing system without a LiveCD]])<br />
* creating a new Linux distribution or [[Arch-based distributions|LiveMedia based on Arch Linux]]<br />
* creating an Arch Linux chroot environment, e.g. for a Docker base container<br />
* [[Diskless network boot NFS root|rootfs-over-NFS for diskless machines]]<br />
<br />
The goal of the bootstrapping procedure is to setup an environment from which the scripts from {{Pkg|arch-install-scripts}} (such as {{ic|pacstrap}} and {{ic|arch-chroot}}) can be run.<br />
<br />
If the host system runs Arch Linux, this can be achieved by simply installing {{Pkg|arch-install-scripts}}. If the host system runs another Linux distribution, you will first need to set up an Arch Linux-based chroot.<br />
<br />
{{Note|This guide requires that the existing host system be able to execute the new target Arch Linux architecture programs. This means it has to be an x86_64 host.}}<br />
<br />
{{Warning|Please make sure you understand each step before proceeding. It is easy to destroy your system or to lose critical data, and your service provider will likely charge a lot to help you recover. }}<br />
<br />
== Backup and preparation ==<br />
<br />
Backup all your data including mails, webservers, etc. Have all information at your fingertips. Preserve all your server configurations, hostnames, etc.<br />
<br />
Here is a list of data you will likely need:<br />
<br />
* IP address<br />
* hostname(s), (note: rootserver are mostly also part of the providers domain, check or save your {{ic|/etc/hosts}} before you delete)<br />
* DNS server (check {{ic|/etc/resolv.conf}})<br />
* SSH keys (if other people work on your server, they will have to accept new keys otherwise. This includes keys from your Apache, your mail servers, your SSH server and others.)<br />
* Hardware info (network card, etc. Refer to your pre-installed {{ic|/etc/modules.conf}} )<br />
* Grub configuration files.<br />
<br />
In general, it is a good idea to have a local copy of your original {{ic|/etc}} directory on your local hard drive.<br />
<br />
== From a host running Arch Linux ==<br />
<br />
Install the {{Pkg|arch-install-scripts}} package.<br />
<br />
Follow [[Installation guide#Mount the file systems]] to mount the filesystem that will be used for the root directory as well as all the other needed mount points. If you already use the {{ic|/mnt}} directory for something else, just create another directory such as {{ic|/mnt/install}} and use it as the mount point base for the rest of the installation.<br />
<br />
At this stage, Arch Linux can either be installed from scratch or it can mirror the host installation. The two options are described thereafter.<br />
<br />
=== Create a new Arch installation ===<br />
<br />
Follow [[Installation guide#Installation]].<br />
<br />
In the procedure, the first step, [[Installation guide#Select the mirrors]], can be skipped since the host should already have a correct mirrorlist.<br />
<br />
{{Tip|<br />
* In order to avoid redownloading all the packages, consider following [[Pacman/Tips and tricks#Network shared pacman cache]], or use ''pacstrap''<nowiki>'</nowiki>s {{ic|-c}} option to use your host machine's package cache.<br />
* When the grub boot-loader is used, the {{ic|grub-mkconfig}} may detect devices incorrectly. This will result in {{ic|Error:no such device}} when trying to boot from the stick. To solve this problem, from the host running Arch Linux, mount the newly installed partitions, ''arch-chroot'' to the new partition, then install and configure grub. The last step may require disabling ''lvmetad'' from {{ic|/etc/lvm/lvm.conf}} by setting {{ic|1=use_lvmetad=0}}.<br />
}}<br />
<br />
=== Create a copy of an existing Arch installation ===<br />
<br />
It is possible to replicate an existing Arch Linux installation by copying the host filesystem to the new partition and make some adjustments to it to make it bootable and unique.<br />
<br />
The first step is to copy the host files into the mounted new partition, for this, consider using the approach exhibited in [[rsync#Full system backup]].<br />
<br />
Then, follow the procedure described in [[Installation guide#Configure the system]] with some caveats and additional steps:<br />
<br />
* [[Installation guide#Time zone]], [[Installation guide#Localization]] and [[Installation guide#Root password]] can be skipped<br />
* [[Installation guide#Initramfs]] may be required in particular if changing filesystem, for example from [[ext4]] to [[Btrfs]]<br />
* Regarding [[Installation guide#Boot loader]], it is necessary to reinstall the bootloader<br />
* Delete {{ic|/etc/machine-id}} so that a new, unique one, is generated at the next boot<br />
<br />
If the mirrored Arch installation may be used within a different configuration or with another hardware, consider the following additional operations:<br />
<br />
* Use the CPU [[microcode]] update adapted to the target system during the step [[Installation guide#Boot loader]]<br />
* If any specific [[Xorg#Configuration]] was present on the host and may be incompatible with the target system, follow [[Moving an existing install into (or out of) a virtual machine#Disable any Xorg-related files]]<br />
* Make any other adjustment appropriate to the target system, like reconfiguring the network or the audio.<br />
<br />
== From a host running another Linux distribution ==<br />
<br />
There are multiple tools which automate a large part of the steps described in the following subsections. See their respective homepages for detailed instructions.<br />
<br />
* [https://github.com/tokland/arch-bootstrap arch-bootstrap] (Bash)<br />
* [https://github.com/gh2o/digitalocean-debian-to-arch digitalocean-debian-to-arch] (repartition disk, DigitalOcean specific)<br />
* [https://github.com/hartwork/image-bootstrap image-bootstrap] (Python)<br />
* [https://gitlab.com/drizzt/vps2arch vps2arch] (Bash)<br />
* [https://github.com/BiteDasher/archbashstrap archbashstrap] (Bash)<br />
<br />
The manual way is presented in the following subsections. The idea is to either get [[pacman]] working directly on the host system, or to run an Arch system inside the host system, with the actual installation being executed from the Arch system. The nested system is contained inside a chroot.<br />
<br />
=== Using pacman from the host system ===<br />
<br />
[https://git.archlinux.org/pacman.git/ Pacman] can be compiled on most Linux distributions, and used directly on the host system to bootstrap Arch Linux. The [https://git.archlinux.org/arch-install-scripts.git/about/ arch-install-scripts] should run without issues directly from the downloaded sources on any recent distribution.<br />
<br />
Some distributions provide a package for ''pacman'' and/or ''arch-install-scripts'' in their official repositories which can be used for this purpose. As of July 2020, Void Linux is known to provide the ''pacman'' package, and Alpine Linux and Fedora are known to provide both ''pacman'' and ''arch-install-scripts''.<br />
<br />
=== Creating a chroot ===<br />
<br />
Two methods to setup and enter the chroot are presented below, from the easiest to the most complicated. Select only one of the two methods. Then, continue at [[#Using a chroot environment]].<br />
<br />
==== Method A: Using the bootstrap image (recommended) ====<br />
<br />
Download the bootstrap image from a [https://archlinux.org/download mirror] into {{ic|/tmp}}.<br />
<br />
You can also download the signature (same URL with {{ic|.sig}} added) and [[GnuPG#Verify_a_signature|verify it with GnuPG]].<br />
<br />
* Extract the tarball:<br />
<br />
# tar xzf <path-to-bootstrap-image>/archlinux-bootstrap-*-x86_64.tar.gz<br />
<br />
* Select a repository server by editing {{ic|/tmp/root.x86_64/etc/pacman.d/mirrorlist}}.<br />
<br />
* Enter the chroot<br />
** If bash 4 or later is installed, and unshare supports the --fork and --pid options:<br><!--<br />
-->{{bc|# /tmp/root.x86_64/bin/arch-chroot /tmp/root.x86_64/}}<br />
** Otherwise, run the following commands:<br><!--<br />
-->{{bc|<nowiki><br />
# mount --bind /tmp/root.x86_64 /tmp/root.x86_64<br />
# cd /tmp/root.x86_64<br />
# cp /etc/resolv.conf etc<br />
# mount -t proc /proc proc<br />
# mount --make-rslave --rbind /sys sys<br />
# mount --make-rslave --rbind /dev dev<br />
# mount --make-rslave --rbind /run run # (assuming /run exists on the system)<br />
# chroot /tmp/root.x86_64 /bin/bash<br />
</nowiki>}}<br />
<br />
==== Method B: Using the LiveCD image ====<br />
<br />
It is possible to mount the root image of the latest Arch Linux installation media and then chroot into it. This method has the advantage of providing a working Arch Linux installation right within the host system without the need to prepare it by installing specific packages.<br />
<br />
{{Note|Before proceeding, make sure the latest version of [http://squashfs.sourceforge.net/ squashfs] is installed on the host system. Otherwise, errors like the following are to be expected: {{ic|FATAL ERROR aborting: uncompress_inode_table: failed to read block}}.}}<br />
<br />
* The root image can be found on one of the [https://archlinux.org/download mirrors] under {{ic|arch/x86_64/}}. The squashfs format is not editable, so we unsquash the root image and mount it.<br />
<br />
*To unsquash the root image, run<br />
<br />
# unsquashfs airootfs.sfs<br />
<br />
* Before [[Change root|chrooting]] to it, we need to set up some mount points and copy the resolv.conf for networking.<br />
<br />
# mount --bind squashfs-root squashfs-root<br />
# mount -t proc none squashfs-root/proc<br />
# mount -t sysfs none squashfs-root/sys<br />
# mount -o bind /dev squashfs-root/dev<br />
# mount -o bind /dev/pts squashfs-root/dev/pts ## important for pacman (for signature check)<br />
# cp -L /etc/resolv.conf squashfs-root/etc ## this is needed to use networking within the chroot<br />
<br />
* Select a repository server by editing {{ic|squashfs-root/etc/pacman.d/mirrorlist}}.<br />
<br />
* Now, everything is prepared to chroot into the newly installed Arch environment<br />
# chroot squashfs-root bash<br />
<br />
=== Using a chroot environment ===<br />
<br />
The bootstrap environment is really barebones (no {{Pkg|nano}} or {{Pkg|lvm2}}). Therefore, we need to set up pacman in order to download other necessary packages.<br />
<br />
==== Initializing pacman keyring ====<br />
<br />
Before starting the installation, pacman keys need to be setup. Before running the following two commands, read [[pacman-key#Initializing the keyring]] to understand the entropy requirements:<br />
<br />
# pacman-key --init<br />
# pacman-key --populate archlinux<br />
<br />
{{Tip|If you need to run {{ic|pacman-key --init}} on a computer that does not generate much entropy (e.g. a headless server), key generation may take a very long time. To generate pseudo-entropy, install either [[haveged]] or [[rng-tools]] '''on the host system''' and start the corresponding service before running {{ic|pacman-key --init}}. (Installing these services on the target system instead will not work, since ''systemd'' will [https://superuser.com/questions/688733/start-a-systemd-service-inside-chroot refuse to start services from a chroot] and you need to initialize the pacman keyring prior to installing any packages anyway.)<br><br />
<br />
If you prefer generating entropy through system activity and decide to run {{ic|ls -Ra /}} in another console (TTY, terminal, SSH session...), do not be afraid of running it in a loop a few times: five or six runs from the host proved sufficient to generate enough entropy on a remote headless server.}}<br />
<br />
==== Downloading basic tools ====<br />
<br />
[[Mirrors#Force_pacman_to_refresh_the_package_lists|Refresh the package lists]] and [[install]] what you need: {{Grp|base-devel}}, {{Pkg|parted}} etc.<br />
<br />
{{Note|<br />
When you try to install packages with pacman, you might get {{ic|''error: could not determine cachedir mount point /var/cache/pacman/pkg''}}. To workaround it, run {{bc|mount --bind ''directory-to-livecd-or-bootstrap'' ''directory-to-livecd-or-bootstrap''}} before chrooting. See {{Bug|46169}}.<br />
}}<br />
<br />
=== Installation tips ===<br />
<br />
You can now proceed to [[Installation guide#Partition the disks]] and follow the rest of the [[Installation guide]].<br />
<br />
Some host systems or configurations may require certain extra steps. See the sections below for tips.<br />
<br />
===== Debian-based host =====<br />
<br />
====== /dev/shm ======<br />
<br />
On some Debian-based host systems, ''pacstrap'' may produce the following error:<br />
<br />
{{hc|# pacstrap /mnt base|<br />
==> Creating install root at /mnt<br />
mount: mount point /mnt/dev/shm is a symbolic link to nowhere<br />
==> ERROR: failed to setup API filesystems in new root<br />
}}<br />
<br />
This is because in some versions of Debian, {{ic|/dev/shm}} points to {{ic|/run/shm}} while in the Arch-based chroot, {{ic|/run/shm}} does not exist and the link is broken. To correct this error, create a directory {{ic|/run/shm}}:<br />
<br />
# mkdir /run/shm<br />
<br />
====== /dev/pts ======<br />
<br />
While installing {{ic|archlinux-2015.07.01-x86_64}} from a Debian 7 host, the following error prevented both [https://projects.archlinux.org/arch-install-scripts.git/tree/pacstrap.in pacstrap] and [[Change root#Using arch-chroot|arch-chroot]] from working:<br />
<br />
{{hc|# pacstrap -i /mnt|<br />
mount: mount point /mnt/dev/pts does not exist<br />
==> ERROR: failed to setup chroot /mnt<br />
}}<br />
<br />
Apparently, this is because these two scripts use a common function. {{ic|chroot_setup()}}[https://projects.archlinux.org/arch-install-scripts.git/tree/common#n76] relies on newer features of {{Pkg|util-linux}}, which are incompatible with Debian 7 userland (see {{Bug|45737}}).<br />
<br />
The solution for ''pacstrap'' is to manually execute its [https://projects.archlinux.org/arch-install-scripts.git/tree/pacstrap.in#n77 various tasks], but use the [[Change root#Using_chroot|regular procedure]] to mount the kernel filesystems on the target directory ({{ic|"$newroot"}}):<br />
<br />
# newroot=/mnt<br />
# mkdir -m 0755 -p "$newroot"/var/{cache/pacman/pkg,lib/pacman,log} "$newroot"/{dev,run,etc}<br />
# mkdir -m 1777 -p "$newroot"/tmp<br />
# mkdir -m 0555 -p "$newroot"/{sys,proc}<br />
# mount --bind "$newroot" "$newroot"<br />
# mount -t proc /proc "$newroot/proc"<br />
# mount --rbind /sys "$newroot/sys"<br />
# mount --rbind /run "$newroot/run"<br />
# mount --rbind /dev "$newroot/dev"<br />
# pacman -r "$newroot" --cachedir="$newroot/var/cache/pacman/pkg" -Sy base base-devel ... ## add the packages you want<br />
# cp -a /etc/pacman.d/gnupg "$newroot/etc/pacman.d/" ## copy keyring<br />
# cp -a /etc/pacman.d/mirrorlist "$newroot/etc/pacman.d/" ## copy mirrorlist<br />
<br />
Instead of using ''arch-chroot'' for [[Installation guide#Chroot]], simply use:<br />
<br />
# chroot "$newroot"<br />
<br />
====== lvmetad ======<br />
<br />
Trying to create [[LVM]] [[LVM#Logical volumes|logical volumes]] from an {{ic|archlinux-bootstrap-2015.07.01-x86_64}} environment on a Debian 7 host resulted in the following error:<br />
<br />
{{hc|# lvcreate -L 20G lvm -n root|<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/dev/lvm/root: not found: device not cleared<br />
Aborting. Failed to wipe start of new LV.}}<br />
<br />
(Physical volume and volume group creation worked despite {{ic|/run/lvm/lvmetad.socket: connect failed: No such file or directory}} being displayed.)<br />
<br />
This could be easily worked around by creating the logical volumes outside the chroot (from the Debian host). They are then available once chrooted again.<br />
<br />
{{Accuracy|This problem did not arise when installing from a Debian 7 host without ''lvmetad'' enabled. The recommended messaround with {{ic|/etc/lvm/lvm.conf}} looks rather error prone (2015-07-26).}}<br />
<br />
Also, if the system you are using has lvm, you might have the following output:<br />
<br />
{{hc|1=# grub-install --target=i386-pc --recheck /dev/main/archroot|2=<br />
Installing for i386-pc platform.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
}}<br />
<br />
This is because debian does not use lvmetad by default. You need to edit {{ic|/etc/lvm/lvm.conf}} and set {{ic|use_lvmetad}} to {{ic|0}}:<br />
<br />
use_lvmetad = 0<br />
{{Accuracy|Is it the problem with LVM on Debian or with trying to install Arch on LVM?}}<br />
{{Style|poor style}}<br />
This will trigger later an error on boot in the initrd stage. Therefore, you have to change it back after the grub generation. In a software RAID + LVM, steps would be the following:<br />
<br />
* After installing the system, double check your [[Mkinitcpio]] and your bootloader settings. See [[Arch boot process#Boot loader]] for a list of bootloaders.<br />
* You may need to change your {{ic|/etc/mdadm.conf}} to reflect your [[RAID]] settings (if applicable).<br />
* You may need to change your {{ic|HOOKS}} and {{ic|MODULES}} according to your [[LVM]] and [[RAID]] requirements: {{ic|1=MODULES="dm_mod" HOOKS="base udev '''mdadm_udev''' ... block '''lvm2''' filesystems ..."}}<br />
* You will most likely need to generate new initrd images with mkinitcpio. See [[Mkinitcpio#Image creation and activation]].<br />
* Set {{ic|1=use_lvmetad = 0}} in {{ic|/etc/lvm/lvm.conf}}.<br />
* Update your bootloader settings. See your bootloader's wiki page for details.<br />
* Set {{ic|1=use_lvmetad = 1}} in {{ic|/etc/lvm/lvm.conf}}.<br />
<br />
===== Fedora-based host =====<br />
<br />
On Fedora based hosts and live USBs you may encounter problems when using ''genfstab'' to generate your [[fstab]]. Remove duplicate entries and the "seclabel" option where it appears, as this is Fedora-specific and will keep your system from booting normally.<br />
<br />
== Things to check before you reboot ==<br />
<br />
Before rebooting, doublecheck a few details in your installation to achieve a successful installation. To do so, first chroot into the newly-installed system, and then:<br />
<br />
* [[Users and groups#User management|create a user with password]], so you can login via ''ssh''. This is critical since root login is disabled by default since OpenSSH-7.1p2.<br />
* [[Users and groups#User management|set a root password]] so that you can switch to root via ''su'' later<br />
* [[install]] a [[ssh]] solution and [[enable]] its server instance to start automatically at boot.<br />
* set up your [[network configuration]] in order to have a connection started automatically at boot.<br />
* set up a [[boot loader]] and configure it to use the swap partition you appropriated earlier as the root partition. You might want to configure your bootloader to be able to boot into your old system; it is helpful to re-use the server's existing {{ic|/boot}} partition in the new system for this purpose.<br />
<br />
== Replacing the existing system without a LiveCD ==<br />
<br />
Find ~700 MB of free space somewhere on the disk, e.g. by partitioning a swap partition. You can disable the swap partition and set up your system there. <br />
<br />
===Set old swap partition as new root partition===<br />
<br />
Check {{ic|cfdisk}}, {{ic|/proc/swaps}} or {{ic|/etc/fstab}} to find your swap partition. Assuming your hard drive is located on {{ic|sda''X''}} ({{ic|''X''}} will be a number). <br />
<br />
Do the following:<br />
<br />
Disable the swap space:<br />
<br />
# swapoff /dev/sda''X''<br />
<br />
Create a filesystem on it<br />
<br />
# fdisk /dev/sda<br />
(set /dev/sda''X'' ID field to "Linux" - Hex 83)<br />
# mke2fs -j /dev/sda''X''<br />
<br />
Create a directory to mount it in<br />
<br />
# mkdir /mnt/newsys<br />
<br />
Finally, mount the new directory for installing the intermediate system.<br />
<br />
# mount -t ext4 /dev/sda''X'' /mnt/newsys<br />
<br />
=== Installation ===<br />
<br />
[[Installation guide#Install essential packages|Install essentials packages]] and any other package required to get a system with internet connection up and running in the temporary partition, being careful with the limit of ~700 MB space. When specifying packages to be installed with ''pacstrap'', consider adding the {{ic|-c}} flag to avoid filling up valuable space by downloading packages to the host system.<br />
<br />
Once the new Arch Linux system is installed, fix the bootloader configuration, then reboot into the newly created system, and [[rsync#Full system backup|rsync the entire system]] to the primary partition.</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Install_Arch_Linux_from_existing_Linux&diff=647601Install Arch Linux from existing Linux2020-12-29T16:43:49Z<p>Cilyan: /* Method B: Using the LiveCD image */ Recall to select a mirror prior to chroot</p>
<hr />
<div>[[Category:Installation process]]<br />
[[de:Arch Linux auf einem Root-Server]]<br />
[[es:Install Arch Linux from existing Linux]]<br />
[[fr:Install chroot]]<br />
[[it:Install Arch Linux from existing Linux]]<br />
[[ja:既存の Linux からインストール]]<br />
[[pt:Install Arch Linux from existing Linux]]<br />
[[ru:Install Arch Linux from existing Linux]]<br />
[[zh-hans:Install Arch Linux from existing Linux]]<br />
[[zh-hant:Install Arch Linux from existing Linux]]<br />
{{Related articles start}}<br />
{{Related|Install from SSH}}<br />
{{Related articles end}}<br />
<br />
This document describes the bootstrapping process required to install Arch Linux from a running Linux host system.<br />
After bootstrapping, the installation proceeds as described in the [[Installation guide]].<br />
<br />
Installing Arch Linux from a running Linux is useful for:<br />
<br />
* remotely installing Arch Linux, e.g. a (virtual) root server<br />
* replacing an existing Linux without a LiveCD (see [[#Replacing the existing system without a LiveCD]])<br />
* creating a new Linux distribution or [[Arch-based distributions|LiveMedia based on Arch Linux]]<br />
* creating an Arch Linux chroot environment, e.g. for a Docker base container<br />
* [[Diskless network boot NFS root|rootfs-over-NFS for diskless machines]]<br />
<br />
The goal of the bootstrapping procedure is to setup an environment from which the scripts from {{Pkg|arch-install-scripts}} (such as {{ic|pacstrap}} and {{ic|arch-chroot}}) can be run.<br />
<br />
If the host system runs Arch Linux, this can be achieved by simply installing {{Pkg|arch-install-scripts}}. If the host system runs another Linux distribution, you will first need to set up an Arch Linux-based chroot.<br />
<br />
{{Note|This guide requires that the existing host system be able to execute the new target Arch Linux architecture programs. This means it has to be an x86_64 host.}}<br />
<br />
{{Warning|Please make sure you understand each step before proceeding. It is easy to destroy your system or to lose critical data, and your service provider will likely charge a lot to help you recover. }}<br />
<br />
== Backup and preparation ==<br />
<br />
Backup all your data including mails, webservers, etc. Have all information at your fingertips. Preserve all your server configurations, hostnames, etc.<br />
<br />
Here is a list of data you will likely need:<br />
<br />
* IP address<br />
* hostname(s), (note: rootserver are mostly also part of the providers domain, check or save your {{ic|/etc/hosts}} before you delete)<br />
* DNS server (check {{ic|/etc/resolv.conf}})<br />
* SSH keys (if other people work on your server, they will have to accept new keys otherwise. This includes keys from your Apache, your mail servers, your SSH server and others.)<br />
* Hardware info (network card, etc. Refer to your pre-installed {{ic|/etc/modules.conf}} )<br />
* Grub configuration files.<br />
<br />
In general, it is a good idea to have a local copy of your original {{ic|/etc}} directory on your local hard drive.<br />
<br />
== From a host running Arch Linux ==<br />
<br />
Install the {{Pkg|arch-install-scripts}} package.<br />
<br />
Follow [[Installation guide#Mount the file systems]] to mount the filesystem that will be used for the root directory as well as all the other needed mount points. If you already use the {{ic|/mnt}} directory for something else, just create another directory such as {{ic|/mnt/install}} and use it as the mount point base for the rest of the installation.<br />
<br />
At this stage, Arch Linux can either be installed from scratch or it can mirror the host installation. The two options are described thereafter.<br />
<br />
=== Create a new Arch installation ===<br />
<br />
Follow [[Installation guide#Installation]].<br />
<br />
In the procedure, the first step, [[Installation guide#Select the mirrors]], can be skipped since the host should already have a correct mirrorlist.<br />
<br />
{{Tip|<br />
* In order to avoid redownloading all the packages, consider following [[Pacman/Tips and tricks#Network shared pacman cache]], or use ''pacstrap''<nowiki>'</nowiki>s {{ic|-c}} option to use your host machine's package cache.<br />
* When the grub boot-loader is used, the {{ic|grub-mkconfig}} may detect devices incorrectly. This will result in {{ic|Error:no such device}} when trying to boot from the stick. To solve this problem, from the host running Arch Linux, mount the newly installed partitions, ''arch-chroot'' to the new partition, then install and configure grub. The last step may require disabling ''lvmetad'' from {{ic|/etc/lvm/lvm.conf}} by setting {{ic|1=use_lvmetad=0}}.<br />
}}<br />
<br />
=== Create a copy of an existing Arch installation ===<br />
<br />
It is possible to replicate an existing Arch Linux installation by copying the host filesystem to the new partition and make some adjustments to it to make it bootable and unique.<br />
<br />
The first step is to copy the host files into the mounted new partition, for this, consider using the approach exhibited in [[rsync#Full system backup]].<br />
<br />
Then, follow the procedure described in [[Installation guide#Configure the system]] with some caveats and additional steps:<br />
<br />
* [[Installation guide#Time zone]], [[Installation guide#Localization]] and [[Installation guide#Root password]] can be skipped<br />
* [[Installation guide#Initramfs]] may be required in particular if changing filesystem, for example from [[ext4]] to [[Btrfs]]<br />
* Regarding [[Installation guide#Boot loader]], it is necessary to reinstall the bootloader<br />
* Delete {{ic|/etc/machine-id}} so that a new, unique one, is generated at the next boot<br />
<br />
If the mirrored Arch installation may be used within a different configuration or with another hardware, consider the following additional operations:<br />
<br />
* Use the CPU [[microcode]] update adapted to the target system during the step [[Installation guide#Boot loader]]<br />
* If any specific [[Xorg#Configuration]] was present on the host and may be incompatible with the target system, follow [[Moving an existing install into (or out of) a virtual machine#Disable any Xorg-related files]]<br />
* Make any other adjustment appropriate to the target system, like reconfiguring the network or the audio.<br />
<br />
== From a host running another Linux distribution ==<br />
<br />
There are multiple tools which automate a large part of the steps described in the following subsections. See their respective homepages for detailed instructions.<br />
<br />
* [https://github.com/tokland/arch-bootstrap arch-bootstrap] (Bash)<br />
* [https://github.com/gh2o/digitalocean-debian-to-arch digitalocean-debian-to-arch] (repartition disk, DigitalOcean specific)<br />
* [https://github.com/hartwork/image-bootstrap image-bootstrap] (Python)<br />
* [https://gitlab.com/drizzt/vps2arch vps2arch] (Bash)<br />
* [https://github.com/BiteDasher/archbashstrap archbashstrap] (Bash)<br />
<br />
The manual way is presented in the following subsections. The idea is to either get [[pacman]] working directly on the host system, or to run an Arch system inside the host system, with the actual installation being executed from the Arch system. The nested system is contained inside a chroot.<br />
<br />
=== Using pacman from the host system ===<br />
<br />
[https://git.archlinux.org/pacman.git/ Pacman] can be compiled on most Linux distributions, and used directly on the host system to bootstrap Arch Linux. The [https://git.archlinux.org/arch-install-scripts.git/about/ arch-install-scripts] should run without issues directly from the downloaded sources on any recent distribution.<br />
<br />
Some distributions provide a package for ''pacman'' and/or ''arch-install-scripts'' in their official repositories which can be used for this purpose. As of July 2020, Void Linux is known to provide the ''pacman'' package, and Alpine Linux and Fedora are known to provide both ''pacman'' and ''arch-install-scripts''.<br />
<br />
=== Creating a chroot ===<br />
<br />
Two methods to setup and enter the chroot are presented below, from the easiest to the most complicated. Select only one of the two methods. Then, continue at [[#Using a chroot environment]].<br />
<br />
==== Method A: Using the bootstrap image (recommended) ====<br />
<br />
Download the bootstrap image from a [https://archlinux.org/download mirror] into {{ic|/tmp}}.<br />
<br />
You can also download the signature (same URL with {{ic|.sig}} added) and [[GnuPG#Verify_a_signature|verify it with GnuPG]].<br />
<br />
* Extract the tarball:<br />
<br />
# tar xzf <path-to-bootstrap-image>/archlinux-bootstrap-*-x86_64.tar.gz<br />
<br />
* Select a repository server by editing {{ic|/tmp/root.x86_64/etc/pacman.d/mirrorlist}}.<br />
<br />
* Enter the chroot<br />
** If bash 4 or later is installed, and unshare supports the --fork and --pid options:<br><!--<br />
-->{{bc|# /tmp/root.x86_64/bin/arch-chroot /tmp/root.x86_64/}}<br />
** Otherwise, run the following commands:<br><!--<br />
-->{{bc|<nowiki><br />
# mount --bind /tmp/root.x86_64 /tmp/root.x86_64<br />
# cd /tmp/root.x86_64<br />
# cp /etc/resolv.conf etc<br />
# mount -t proc /proc proc<br />
# mount --make-rslave --rbind /sys sys<br />
# mount --make-rslave --rbind /dev dev<br />
# mount --make-rslave --rbind /run run # (assuming /run exists on the system)<br />
# chroot /tmp/root.x86_64 /bin/bash<br />
</nowiki>}}<br />
<br />
==== Method B: Using the LiveCD image ====<br />
<br />
It is possible to mount the root image of the latest Arch Linux installation media and then chroot into it. This method has the advantage of providing a working Arch Linux installation right within the host system without the need to prepare it by installing specific packages.<br />
<br />
{{Note|Before proceeding, make sure the latest version of [http://squashfs.sourceforge.net/ squashfs] is installed on the host system. Otherwise, errors like the following are to be expected: {{ic|FATAL ERROR aborting: uncompress_inode_table: failed to read block}}.}}<br />
<br />
* The root image can be found on one of the [https://archlinux.org/download mirrors] under {{ic|arch/x86_64/}}. The squashfs format is not editable, so we unsquash the root image and mount it.<br />
<br />
*To unsquash the root image, run<br />
<br />
# unsquashfs airootfs.sfs<br />
<br />
* Before [[Change root|chrooting]] to it, we need to set up some mount points and copy the resolv.conf for networking.<br />
<br />
# mount --bind squashfs-root squashfs-root<br />
# mount -t proc none squashfs-root/proc<br />
# mount -t sysfs none squashfs-root/sys<br />
# mount -o bind /dev squashfs-root/dev<br />
# mount -o bind /dev/pts squashfs-root/dev/pts ## important for pacman (for signature check)<br />
# cp -L /etc/resolv.conf squashfs-root/etc ## this is needed to use networking within the chroot<br />
<br />
* Select a repository server by editing {{ic|squashfs-root/etc/pacman.d/mirrorlist}}.<br />
<br />
* Now, everything is prepared to chroot into the newly installed Arch environment<br />
# chroot squashfs-root bash<br />
<br />
=== Using a chroot environment ===<br />
<br />
The bootstrap environment is really barebones (no {{Pkg|nano}} or {{Pkg|lvm2}}). Therefore, we need to set up pacman in order to download other necessary packages.<br />
<br />
==== Initializing pacman keyring ====<br />
<br />
Before starting the installation, pacman keys need to be setup. Before running the following two commands, read [[pacman-key#Initializing the keyring]] to understand the entropy requirements:<br />
<br />
# pacman-key --init<br />
# pacman-key --populate archlinux<br />
<br />
{{Tip|If you need to run {{ic|pacman-key --init}} on a computer that does not generate much entropy (e.g. a headless server), key generation may take a very long time. To generate pseudo-entropy, install either [[haveged]] or [[rng-tools]] '''on the host system''' and start the corresponding service before running {{ic|pacman-key --init}}. (Installing these services on the target system instead will not work, since ''systemd'' will [https://superuser.com/questions/688733/start-a-systemd-service-inside-chroot refuse to start services from a chroot] and you need to initialize the pacman keyring prior to installing any packages anyway.)<br><br />
<br />
If you prefer generating entropy through system activity and decide to run {{ic|ls -Ra /}} in another console (TTY, terminal, SSH session...), do not be afraid of running it in a loop a few times: five or six runs from the host proved sufficient to generate enough entropy on a remote headless server.}}<br />
<br />
==== Selecting a mirror and downloading basic tools ====<br />
<br />
After [[Mirrors#Enabling_a_specific_mirror|selecting a mirror]], [[Mirrors#Force_pacman_to_refresh_the_package_lists|refresh the package lists]] and [[install]] what you need: {{Grp|base-devel}}, {{Pkg|parted}} etc.<br />
<br />
{{Note|<br />
* As there is no any text editor yet, you need to exit arch-chroot and edit mirrorlist using host's text editor.<br />
* When you try to install packages with pacman, you could get {{ic|''error: could not determine cachedir mount point /var/cache/pacman/pkg''}}. To workaround it, you could run {{bc|mount --bind ''directory-to-livecd-or-bootstrap'' ''directory-to-livecd-or-bootstrap''}} before chrooting. See {{Bug|46169}}.<br />
}}<br />
<br />
=== Installation tips ===<br />
<br />
You can now proceed to [[Installation guide#Partition the disks]] and follow the rest of the [[Installation guide]].<br />
<br />
Some host systems or configurations may require certain extra steps. See the sections below for tips.<br />
<br />
===== Debian-based host =====<br />
<br />
====== /dev/shm ======<br />
<br />
On some Debian-based host systems, ''pacstrap'' may produce the following error:<br />
<br />
{{hc|# pacstrap /mnt base|<br />
==> Creating install root at /mnt<br />
mount: mount point /mnt/dev/shm is a symbolic link to nowhere<br />
==> ERROR: failed to setup API filesystems in new root<br />
}}<br />
<br />
This is because in some versions of Debian, {{ic|/dev/shm}} points to {{ic|/run/shm}} while in the Arch-based chroot, {{ic|/run/shm}} does not exist and the link is broken. To correct this error, create a directory {{ic|/run/shm}}:<br />
<br />
# mkdir /run/shm<br />
<br />
====== /dev/pts ======<br />
<br />
While installing {{ic|archlinux-2015.07.01-x86_64}} from a Debian 7 host, the following error prevented both [https://projects.archlinux.org/arch-install-scripts.git/tree/pacstrap.in pacstrap] and [[Change root#Using arch-chroot|arch-chroot]] from working:<br />
<br />
{{hc|# pacstrap -i /mnt|<br />
mount: mount point /mnt/dev/pts does not exist<br />
==> ERROR: failed to setup chroot /mnt<br />
}}<br />
<br />
Apparently, this is because these two scripts use a common function. {{ic|chroot_setup()}}[https://projects.archlinux.org/arch-install-scripts.git/tree/common#n76] relies on newer features of {{Pkg|util-linux}}, which are incompatible with Debian 7 userland (see {{Bug|45737}}).<br />
<br />
The solution for ''pacstrap'' is to manually execute its [https://projects.archlinux.org/arch-install-scripts.git/tree/pacstrap.in#n77 various tasks], but use the [[Change root#Using_chroot|regular procedure]] to mount the kernel filesystems on the target directory ({{ic|"$newroot"}}):<br />
<br />
# newroot=/mnt<br />
# mkdir -m 0755 -p "$newroot"/var/{cache/pacman/pkg,lib/pacman,log} "$newroot"/{dev,run,etc}<br />
# mkdir -m 1777 -p "$newroot"/tmp<br />
# mkdir -m 0555 -p "$newroot"/{sys,proc}<br />
# mount --bind "$newroot" "$newroot"<br />
# mount -t proc /proc "$newroot/proc"<br />
# mount --rbind /sys "$newroot/sys"<br />
# mount --rbind /run "$newroot/run"<br />
# mount --rbind /dev "$newroot/dev"<br />
# pacman -r "$newroot" --cachedir="$newroot/var/cache/pacman/pkg" -Sy base base-devel ... ## add the packages you want<br />
# cp -a /etc/pacman.d/gnupg "$newroot/etc/pacman.d/" ## copy keyring<br />
# cp -a /etc/pacman.d/mirrorlist "$newroot/etc/pacman.d/" ## copy mirrorlist<br />
<br />
Instead of using ''arch-chroot'' for [[Installation guide#Chroot]], simply use:<br />
<br />
# chroot "$newroot"<br />
<br />
====== lvmetad ======<br />
<br />
Trying to create [[LVM]] [[LVM#Logical volumes|logical volumes]] from an {{ic|archlinux-bootstrap-2015.07.01-x86_64}} environment on a Debian 7 host resulted in the following error:<br />
<br />
{{hc|# lvcreate -L 20G lvm -n root|<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/dev/lvm/root: not found: device not cleared<br />
Aborting. Failed to wipe start of new LV.}}<br />
<br />
(Physical volume and volume group creation worked despite {{ic|/run/lvm/lvmetad.socket: connect failed: No such file or directory}} being displayed.)<br />
<br />
This could be easily worked around by creating the logical volumes outside the chroot (from the Debian host). They are then available once chrooted again.<br />
<br />
{{Accuracy|This problem did not arise when installing from a Debian 7 host without ''lvmetad'' enabled. The recommended messaround with {{ic|/etc/lvm/lvm.conf}} looks rather error prone (2015-07-26).}}<br />
<br />
Also, if the system you are using has lvm, you might have the following output:<br />
<br />
{{hc|1=# grub-install --target=i386-pc --recheck /dev/main/archroot|2=<br />
Installing for i386-pc platform.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
}}<br />
<br />
This is because debian does not use lvmetad by default. You need to edit {{ic|/etc/lvm/lvm.conf}} and set {{ic|use_lvmetad}} to {{ic|0}}:<br />
<br />
use_lvmetad = 0<br />
{{Accuracy|Is it the problem with LVM on Debian or with trying to install Arch on LVM?}}<br />
{{Style|poor style}}<br />
This will trigger later an error on boot in the initrd stage. Therefore, you have to change it back after the grub generation. In a software RAID + LVM, steps would be the following:<br />
<br />
* After installing the system, double check your [[Mkinitcpio]] and your bootloader settings. See [[Arch boot process#Boot loader]] for a list of bootloaders.<br />
* You may need to change your {{ic|/etc/mdadm.conf}} to reflect your [[RAID]] settings (if applicable).<br />
* You may need to change your {{ic|HOOKS}} and {{ic|MODULES}} according to your [[LVM]] and [[RAID]] requirements: {{ic|1=MODULES="dm_mod" HOOKS="base udev '''mdadm_udev''' ... block '''lvm2''' filesystems ..."}}<br />
* You will most likely need to generate new initrd images with mkinitcpio. See [[Mkinitcpio#Image creation and activation]].<br />
* Set {{ic|1=use_lvmetad = 0}} in {{ic|/etc/lvm/lvm.conf}}.<br />
* Update your bootloader settings. See your bootloader's wiki page for details.<br />
* Set {{ic|1=use_lvmetad = 1}} in {{ic|/etc/lvm/lvm.conf}}.<br />
<br />
===== Fedora-based host =====<br />
<br />
On Fedora based hosts and live USBs you may encounter problems when using ''genfstab'' to generate your [[fstab]]. Remove duplicate entries and the "seclabel" option where it appears, as this is Fedora-specific and will keep your system from booting normally.<br />
<br />
== Things to check before you reboot ==<br />
<br />
Before rebooting, doublecheck a few details in your installation to achieve a successful installation. To do so, first chroot into the newly-installed system, and then:<br />
<br />
* [[Users and groups#User management|create a user with password]], so you can login via ''ssh''. This is critical since root login is disabled by default since OpenSSH-7.1p2.<br />
* [[Users and groups#User management|set a root password]] so that you can switch to root via ''su'' later<br />
* [[install]] a [[ssh]] solution and [[enable]] its server instance to start automatically at boot.<br />
* set up your [[network configuration]] in order to have a connection started automatically at boot.<br />
* set up a [[boot loader]] and configure it to use the swap partition you appropriated earlier as the root partition. You might want to configure your bootloader to be able to boot into your old system; it is helpful to re-use the server's existing {{ic|/boot}} partition in the new system for this purpose.<br />
<br />
== Replacing the existing system without a LiveCD ==<br />
<br />
Find ~700 MB of free space somewhere on the disk, e.g. by partitioning a swap partition. You can disable the swap partition and set up your system there. <br />
<br />
===Set old swap partition as new root partition===<br />
<br />
Check {{ic|cfdisk}}, {{ic|/proc/swaps}} or {{ic|/etc/fstab}} to find your swap partition. Assuming your hard drive is located on {{ic|sda''X''}} ({{ic|''X''}} will be a number). <br />
<br />
Do the following:<br />
<br />
Disable the swap space:<br />
<br />
# swapoff /dev/sda''X''<br />
<br />
Create a filesystem on it<br />
<br />
# fdisk /dev/sda<br />
(set /dev/sda''X'' ID field to "Linux" - Hex 83)<br />
# mke2fs -j /dev/sda''X''<br />
<br />
Create a directory to mount it in<br />
<br />
# mkdir /mnt/newsys<br />
<br />
Finally, mount the new directory for installing the intermediate system.<br />
<br />
# mount -t ext4 /dev/sda''X'' /mnt/newsys<br />
<br />
=== Installation ===<br />
<br />
[[Installation guide#Install essential packages|Install essentials packages]] and any other package required to get a system with internet connection up and running in the temporary partition, being careful with the limit of ~700 MB space. When specifying packages to be installed with ''pacstrap'', consider adding the {{ic|-c}} flag to avoid filling up valuable space by downloading packages to the host system.<br />
<br />
Once the new Arch Linux system is installed, fix the bootloader configuration, then reboot into the newly created system, and [[rsync#Full system backup|rsync the entire system]] to the primary partition.</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Install_Arch_Linux_from_existing_Linux&diff=647600Install Arch Linux from existing Linux2020-12-29T16:41:09Z<p>Cilyan: /* Method A: Using the bootstrap image (recommended) */ Make steps more visual, specially to highlight to select a mirror prior to chroot</p>
<hr />
<div>[[Category:Installation process]]<br />
[[de:Arch Linux auf einem Root-Server]]<br />
[[es:Install Arch Linux from existing Linux]]<br />
[[fr:Install chroot]]<br />
[[it:Install Arch Linux from existing Linux]]<br />
[[ja:既存の Linux からインストール]]<br />
[[pt:Install Arch Linux from existing Linux]]<br />
[[ru:Install Arch Linux from existing Linux]]<br />
[[zh-hans:Install Arch Linux from existing Linux]]<br />
[[zh-hant:Install Arch Linux from existing Linux]]<br />
{{Related articles start}}<br />
{{Related|Install from SSH}}<br />
{{Related articles end}}<br />
<br />
This document describes the bootstrapping process required to install Arch Linux from a running Linux host system.<br />
After bootstrapping, the installation proceeds as described in the [[Installation guide]].<br />
<br />
Installing Arch Linux from a running Linux is useful for:<br />
<br />
* remotely installing Arch Linux, e.g. a (virtual) root server<br />
* replacing an existing Linux without a LiveCD (see [[#Replacing the existing system without a LiveCD]])<br />
* creating a new Linux distribution or [[Arch-based distributions|LiveMedia based on Arch Linux]]<br />
* creating an Arch Linux chroot environment, e.g. for a Docker base container<br />
* [[Diskless network boot NFS root|rootfs-over-NFS for diskless machines]]<br />
<br />
The goal of the bootstrapping procedure is to setup an environment from which the scripts from {{Pkg|arch-install-scripts}} (such as {{ic|pacstrap}} and {{ic|arch-chroot}}) can be run.<br />
<br />
If the host system runs Arch Linux, this can be achieved by simply installing {{Pkg|arch-install-scripts}}. If the host system runs another Linux distribution, you will first need to set up an Arch Linux-based chroot.<br />
<br />
{{Note|This guide requires that the existing host system be able to execute the new target Arch Linux architecture programs. This means it has to be an x86_64 host.}}<br />
<br />
{{Warning|Please make sure you understand each step before proceeding. It is easy to destroy your system or to lose critical data, and your service provider will likely charge a lot to help you recover. }}<br />
<br />
== Backup and preparation ==<br />
<br />
Backup all your data including mails, webservers, etc. Have all information at your fingertips. Preserve all your server configurations, hostnames, etc.<br />
<br />
Here is a list of data you will likely need:<br />
<br />
* IP address<br />
* hostname(s), (note: rootserver are mostly also part of the providers domain, check or save your {{ic|/etc/hosts}} before you delete)<br />
* DNS server (check {{ic|/etc/resolv.conf}})<br />
* SSH keys (if other people work on your server, they will have to accept new keys otherwise. This includes keys from your Apache, your mail servers, your SSH server and others.)<br />
* Hardware info (network card, etc. Refer to your pre-installed {{ic|/etc/modules.conf}} )<br />
* Grub configuration files.<br />
<br />
In general, it is a good idea to have a local copy of your original {{ic|/etc}} directory on your local hard drive.<br />
<br />
== From a host running Arch Linux ==<br />
<br />
Install the {{Pkg|arch-install-scripts}} package.<br />
<br />
Follow [[Installation guide#Mount the file systems]] to mount the filesystem that will be used for the root directory as well as all the other needed mount points. If you already use the {{ic|/mnt}} directory for something else, just create another directory such as {{ic|/mnt/install}} and use it as the mount point base for the rest of the installation.<br />
<br />
At this stage, Arch Linux can either be installed from scratch or it can mirror the host installation. The two options are described thereafter.<br />
<br />
=== Create a new Arch installation ===<br />
<br />
Follow [[Installation guide#Installation]].<br />
<br />
In the procedure, the first step, [[Installation guide#Select the mirrors]], can be skipped since the host should already have a correct mirrorlist.<br />
<br />
{{Tip|<br />
* In order to avoid redownloading all the packages, consider following [[Pacman/Tips and tricks#Network shared pacman cache]], or use ''pacstrap''<nowiki>'</nowiki>s {{ic|-c}} option to use your host machine's package cache.<br />
* When the grub boot-loader is used, the {{ic|grub-mkconfig}} may detect devices incorrectly. This will result in {{ic|Error:no such device}} when trying to boot from the stick. To solve this problem, from the host running Arch Linux, mount the newly installed partitions, ''arch-chroot'' to the new partition, then install and configure grub. The last step may require disabling ''lvmetad'' from {{ic|/etc/lvm/lvm.conf}} by setting {{ic|1=use_lvmetad=0}}.<br />
}}<br />
<br />
=== Create a copy of an existing Arch installation ===<br />
<br />
It is possible to replicate an existing Arch Linux installation by copying the host filesystem to the new partition and make some adjustments to it to make it bootable and unique.<br />
<br />
The first step is to copy the host files into the mounted new partition, for this, consider using the approach exhibited in [[rsync#Full system backup]].<br />
<br />
Then, follow the procedure described in [[Installation guide#Configure the system]] with some caveats and additional steps:<br />
<br />
* [[Installation guide#Time zone]], [[Installation guide#Localization]] and [[Installation guide#Root password]] can be skipped<br />
* [[Installation guide#Initramfs]] may be required in particular if changing filesystem, for example from [[ext4]] to [[Btrfs]]<br />
* Regarding [[Installation guide#Boot loader]], it is necessary to reinstall the bootloader<br />
* Delete {{ic|/etc/machine-id}} so that a new, unique one, is generated at the next boot<br />
<br />
If the mirrored Arch installation may be used within a different configuration or with another hardware, consider the following additional operations:<br />
<br />
* Use the CPU [[microcode]] update adapted to the target system during the step [[Installation guide#Boot loader]]<br />
* If any specific [[Xorg#Configuration]] was present on the host and may be incompatible with the target system, follow [[Moving an existing install into (or out of) a virtual machine#Disable any Xorg-related files]]<br />
* Make any other adjustment appropriate to the target system, like reconfiguring the network or the audio.<br />
<br />
== From a host running another Linux distribution ==<br />
<br />
There are multiple tools which automate a large part of the steps described in the following subsections. See their respective homepages for detailed instructions.<br />
<br />
* [https://github.com/tokland/arch-bootstrap arch-bootstrap] (Bash)<br />
* [https://github.com/gh2o/digitalocean-debian-to-arch digitalocean-debian-to-arch] (repartition disk, DigitalOcean specific)<br />
* [https://github.com/hartwork/image-bootstrap image-bootstrap] (Python)<br />
* [https://gitlab.com/drizzt/vps2arch vps2arch] (Bash)<br />
* [https://github.com/BiteDasher/archbashstrap archbashstrap] (Bash)<br />
<br />
The manual way is presented in the following subsections. The idea is to either get [[pacman]] working directly on the host system, or to run an Arch system inside the host system, with the actual installation being executed from the Arch system. The nested system is contained inside a chroot.<br />
<br />
=== Using pacman from the host system ===<br />
<br />
[https://git.archlinux.org/pacman.git/ Pacman] can be compiled on most Linux distributions, and used directly on the host system to bootstrap Arch Linux. The [https://git.archlinux.org/arch-install-scripts.git/about/ arch-install-scripts] should run without issues directly from the downloaded sources on any recent distribution.<br />
<br />
Some distributions provide a package for ''pacman'' and/or ''arch-install-scripts'' in their official repositories which can be used for this purpose. As of July 2020, Void Linux is known to provide the ''pacman'' package, and Alpine Linux and Fedora are known to provide both ''pacman'' and ''arch-install-scripts''.<br />
<br />
=== Creating a chroot ===<br />
<br />
Two methods to setup and enter the chroot are presented below, from the easiest to the most complicated. Select only one of the two methods. Then, continue at [[#Using a chroot environment]].<br />
<br />
==== Method A: Using the bootstrap image (recommended) ====<br />
<br />
Download the bootstrap image from a [https://archlinux.org/download mirror] into {{ic|/tmp}}.<br />
<br />
You can also download the signature (same URL with {{ic|.sig}} added) and [[GnuPG#Verify_a_signature|verify it with GnuPG]].<br />
<br />
* Extract the tarball:<br />
<br />
# tar xzf <path-to-bootstrap-image>/archlinux-bootstrap-*-x86_64.tar.gz<br />
<br />
* Select a repository server by editing {{ic|/tmp/root.x86_64/etc/pacman.d/mirrorlist}}.<br />
<br />
* Enter the chroot<br />
** If bash 4 or later is installed, and unshare supports the --fork and --pid options:<br><!--<br />
-->{{bc|# /tmp/root.x86_64/bin/arch-chroot /tmp/root.x86_64/}}<br />
** Otherwise, run the following commands:<br><!--<br />
-->{{bc|<nowiki><br />
# mount --bind /tmp/root.x86_64 /tmp/root.x86_64<br />
# cd /tmp/root.x86_64<br />
# cp /etc/resolv.conf etc<br />
# mount -t proc /proc proc<br />
# mount --make-rslave --rbind /sys sys<br />
# mount --make-rslave --rbind /dev dev<br />
# mount --make-rslave --rbind /run run # (assuming /run exists on the system)<br />
# chroot /tmp/root.x86_64 /bin/bash<br />
</nowiki>}}<br />
<br />
==== Method B: Using the LiveCD image ====<br />
<br />
It is possible to mount the root image of the latest Arch Linux installation media and then chroot into it. This method has the advantage of providing a working Arch Linux installation right within the host system without the need to prepare it by installing specific packages.<br />
<br />
{{Note|Before proceeding, make sure the latest version of [http://squashfs.sourceforge.net/ squashfs] is installed on the host system. Otherwise, errors like the following are to be expected: {{ic|FATAL ERROR aborting: uncompress_inode_table: failed to read block}}.}}<br />
<br />
* The root image can be found on one of the [https://archlinux.org/download mirrors] under {{ic|arch/x86_64/}}. The squashfs format is not editable, so we unsquash the root image and mount it.<br />
<br />
*To unsquash the root image, run<br />
<br />
# unsquashfs airootfs.sfs<br />
<br />
* Before [[Change root|chrooting]] to it, we need to set up some mount points and copy the resolv.conf for networking.<br />
<br />
# mount --bind squashfs-root squashfs-root<br />
# mount -t proc none squashfs-root/proc<br />
# mount -t sysfs none squashfs-root/sys<br />
# mount -o bind /dev squashfs-root/dev<br />
# mount -o bind /dev/pts squashfs-root/dev/pts ## important for pacman (for signature check)<br />
# cp -L /etc/resolv.conf squashfs-root/etc ## this is needed to use networking within the chroot<br />
<br />
* Now, everything is prepared to chroot into the newly installed Arch environment<br />
# chroot squashfs-root bash<br />
<br />
=== Using a chroot environment ===<br />
<br />
The bootstrap environment is really barebones (no {{Pkg|nano}} or {{Pkg|lvm2}}). Therefore, we need to set up pacman in order to download other necessary packages.<br />
<br />
==== Initializing pacman keyring ====<br />
<br />
Before starting the installation, pacman keys need to be setup. Before running the following two commands, read [[pacman-key#Initializing the keyring]] to understand the entropy requirements:<br />
<br />
# pacman-key --init<br />
# pacman-key --populate archlinux<br />
<br />
{{Tip|If you need to run {{ic|pacman-key --init}} on a computer that does not generate much entropy (e.g. a headless server), key generation may take a very long time. To generate pseudo-entropy, install either [[haveged]] or [[rng-tools]] '''on the host system''' and start the corresponding service before running {{ic|pacman-key --init}}. (Installing these services on the target system instead will not work, since ''systemd'' will [https://superuser.com/questions/688733/start-a-systemd-service-inside-chroot refuse to start services from a chroot] and you need to initialize the pacman keyring prior to installing any packages anyway.)<br><br />
<br />
If you prefer generating entropy through system activity and decide to run {{ic|ls -Ra /}} in another console (TTY, terminal, SSH session...), do not be afraid of running it in a loop a few times: five or six runs from the host proved sufficient to generate enough entropy on a remote headless server.}}<br />
<br />
==== Selecting a mirror and downloading basic tools ====<br />
<br />
After [[Mirrors#Enabling_a_specific_mirror|selecting a mirror]], [[Mirrors#Force_pacman_to_refresh_the_package_lists|refresh the package lists]] and [[install]] what you need: {{Grp|base-devel}}, {{Pkg|parted}} etc.<br />
<br />
{{Note|<br />
* As there is no any text editor yet, you need to exit arch-chroot and edit mirrorlist using host's text editor.<br />
* When you try to install packages with pacman, you could get {{ic|''error: could not determine cachedir mount point /var/cache/pacman/pkg''}}. To workaround it, you could run {{bc|mount --bind ''directory-to-livecd-or-bootstrap'' ''directory-to-livecd-or-bootstrap''}} before chrooting. See {{Bug|46169}}.<br />
}}<br />
<br />
=== Installation tips ===<br />
<br />
You can now proceed to [[Installation guide#Partition the disks]] and follow the rest of the [[Installation guide]].<br />
<br />
Some host systems or configurations may require certain extra steps. See the sections below for tips.<br />
<br />
===== Debian-based host =====<br />
<br />
====== /dev/shm ======<br />
<br />
On some Debian-based host systems, ''pacstrap'' may produce the following error:<br />
<br />
{{hc|# pacstrap /mnt base|<br />
==> Creating install root at /mnt<br />
mount: mount point /mnt/dev/shm is a symbolic link to nowhere<br />
==> ERROR: failed to setup API filesystems in new root<br />
}}<br />
<br />
This is because in some versions of Debian, {{ic|/dev/shm}} points to {{ic|/run/shm}} while in the Arch-based chroot, {{ic|/run/shm}} does not exist and the link is broken. To correct this error, create a directory {{ic|/run/shm}}:<br />
<br />
# mkdir /run/shm<br />
<br />
====== /dev/pts ======<br />
<br />
While installing {{ic|archlinux-2015.07.01-x86_64}} from a Debian 7 host, the following error prevented both [https://projects.archlinux.org/arch-install-scripts.git/tree/pacstrap.in pacstrap] and [[Change root#Using arch-chroot|arch-chroot]] from working:<br />
<br />
{{hc|# pacstrap -i /mnt|<br />
mount: mount point /mnt/dev/pts does not exist<br />
==> ERROR: failed to setup chroot /mnt<br />
}}<br />
<br />
Apparently, this is because these two scripts use a common function. {{ic|chroot_setup()}}[https://projects.archlinux.org/arch-install-scripts.git/tree/common#n76] relies on newer features of {{Pkg|util-linux}}, which are incompatible with Debian 7 userland (see {{Bug|45737}}).<br />
<br />
The solution for ''pacstrap'' is to manually execute its [https://projects.archlinux.org/arch-install-scripts.git/tree/pacstrap.in#n77 various tasks], but use the [[Change root#Using_chroot|regular procedure]] to mount the kernel filesystems on the target directory ({{ic|"$newroot"}}):<br />
<br />
# newroot=/mnt<br />
# mkdir -m 0755 -p "$newroot"/var/{cache/pacman/pkg,lib/pacman,log} "$newroot"/{dev,run,etc}<br />
# mkdir -m 1777 -p "$newroot"/tmp<br />
# mkdir -m 0555 -p "$newroot"/{sys,proc}<br />
# mount --bind "$newroot" "$newroot"<br />
# mount -t proc /proc "$newroot/proc"<br />
# mount --rbind /sys "$newroot/sys"<br />
# mount --rbind /run "$newroot/run"<br />
# mount --rbind /dev "$newroot/dev"<br />
# pacman -r "$newroot" --cachedir="$newroot/var/cache/pacman/pkg" -Sy base base-devel ... ## add the packages you want<br />
# cp -a /etc/pacman.d/gnupg "$newroot/etc/pacman.d/" ## copy keyring<br />
# cp -a /etc/pacman.d/mirrorlist "$newroot/etc/pacman.d/" ## copy mirrorlist<br />
<br />
Instead of using ''arch-chroot'' for [[Installation guide#Chroot]], simply use:<br />
<br />
# chroot "$newroot"<br />
<br />
====== lvmetad ======<br />
<br />
Trying to create [[LVM]] [[LVM#Logical volumes|logical volumes]] from an {{ic|archlinux-bootstrap-2015.07.01-x86_64}} environment on a Debian 7 host resulted in the following error:<br />
<br />
{{hc|# lvcreate -L 20G lvm -n root|<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/dev/lvm/root: not found: device not cleared<br />
Aborting. Failed to wipe start of new LV.}}<br />
<br />
(Physical volume and volume group creation worked despite {{ic|/run/lvm/lvmetad.socket: connect failed: No such file or directory}} being displayed.)<br />
<br />
This could be easily worked around by creating the logical volumes outside the chroot (from the Debian host). They are then available once chrooted again.<br />
<br />
{{Accuracy|This problem did not arise when installing from a Debian 7 host without ''lvmetad'' enabled. The recommended messaround with {{ic|/etc/lvm/lvm.conf}} looks rather error prone (2015-07-26).}}<br />
<br />
Also, if the system you are using has lvm, you might have the following output:<br />
<br />
{{hc|1=# grub-install --target=i386-pc --recheck /dev/main/archroot|2=<br />
Installing for i386-pc platform.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
}}<br />
<br />
This is because debian does not use lvmetad by default. You need to edit {{ic|/etc/lvm/lvm.conf}} and set {{ic|use_lvmetad}} to {{ic|0}}:<br />
<br />
use_lvmetad = 0<br />
{{Accuracy|Is it the problem with LVM on Debian or with trying to install Arch on LVM?}}<br />
{{Style|poor style}}<br />
This will trigger later an error on boot in the initrd stage. Therefore, you have to change it back after the grub generation. In a software RAID + LVM, steps would be the following:<br />
<br />
* After installing the system, double check your [[Mkinitcpio]] and your bootloader settings. See [[Arch boot process#Boot loader]] for a list of bootloaders.<br />
* You may need to change your {{ic|/etc/mdadm.conf}} to reflect your [[RAID]] settings (if applicable).<br />
* You may need to change your {{ic|HOOKS}} and {{ic|MODULES}} according to your [[LVM]] and [[RAID]] requirements: {{ic|1=MODULES="dm_mod" HOOKS="base udev '''mdadm_udev''' ... block '''lvm2''' filesystems ..."}}<br />
* You will most likely need to generate new initrd images with mkinitcpio. See [[Mkinitcpio#Image creation and activation]].<br />
* Set {{ic|1=use_lvmetad = 0}} in {{ic|/etc/lvm/lvm.conf}}.<br />
* Update your bootloader settings. See your bootloader's wiki page for details.<br />
* Set {{ic|1=use_lvmetad = 1}} in {{ic|/etc/lvm/lvm.conf}}.<br />
<br />
===== Fedora-based host =====<br />
<br />
On Fedora based hosts and live USBs you may encounter problems when using ''genfstab'' to generate your [[fstab]]. Remove duplicate entries and the "seclabel" option where it appears, as this is Fedora-specific and will keep your system from booting normally.<br />
<br />
== Things to check before you reboot ==<br />
<br />
Before rebooting, doublecheck a few details in your installation to achieve a successful installation. To do so, first chroot into the newly-installed system, and then:<br />
<br />
* [[Users and groups#User management|create a user with password]], so you can login via ''ssh''. This is critical since root login is disabled by default since OpenSSH-7.1p2.<br />
* [[Users and groups#User management|set a root password]] so that you can switch to root via ''su'' later<br />
* [[install]] a [[ssh]] solution and [[enable]] its server instance to start automatically at boot.<br />
* set up your [[network configuration]] in order to have a connection started automatically at boot.<br />
* set up a [[boot loader]] and configure it to use the swap partition you appropriated earlier as the root partition. You might want to configure your bootloader to be able to boot into your old system; it is helpful to re-use the server's existing {{ic|/boot}} partition in the new system for this purpose.<br />
<br />
== Replacing the existing system without a LiveCD ==<br />
<br />
Find ~700 MB of free space somewhere on the disk, e.g. by partitioning a swap partition. You can disable the swap partition and set up your system there. <br />
<br />
===Set old swap partition as new root partition===<br />
<br />
Check {{ic|cfdisk}}, {{ic|/proc/swaps}} or {{ic|/etc/fstab}} to find your swap partition. Assuming your hard drive is located on {{ic|sda''X''}} ({{ic|''X''}} will be a number). <br />
<br />
Do the following:<br />
<br />
Disable the swap space:<br />
<br />
# swapoff /dev/sda''X''<br />
<br />
Create a filesystem on it<br />
<br />
# fdisk /dev/sda<br />
(set /dev/sda''X'' ID field to "Linux" - Hex 83)<br />
# mke2fs -j /dev/sda''X''<br />
<br />
Create a directory to mount it in<br />
<br />
# mkdir /mnt/newsys<br />
<br />
Finally, mount the new directory for installing the intermediate system.<br />
<br />
# mount -t ext4 /dev/sda''X'' /mnt/newsys<br />
<br />
=== Installation ===<br />
<br />
[[Installation guide#Install essential packages|Install essentials packages]] and any other package required to get a system with internet connection up and running in the temporary partition, being careful with the limit of ~700 MB space. When specifying packages to be installed with ''pacstrap'', consider adding the {{ic|-c}} flag to avoid filling up valuable space by downloading packages to the host system.<br />
<br />
Once the new Arch Linux system is installed, fix the bootloader configuration, then reboot into the newly created system, and [[rsync#Full system backup|rsync the entire system]] to the primary partition.</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Install_Arch_Linux_from_existing_Linux&diff=647598Install Arch Linux from existing Linux2020-12-29T16:24:35Z<p>Cilyan: /* Initializing pacman keyring */ Reword tip about haveged to make it more clear</p>
<hr />
<div>[[Category:Installation process]]<br />
[[de:Arch Linux auf einem Root-Server]]<br />
[[es:Install Arch Linux from existing Linux]]<br />
[[fr:Install chroot]]<br />
[[it:Install Arch Linux from existing Linux]]<br />
[[ja:既存の Linux からインストール]]<br />
[[pt:Install Arch Linux from existing Linux]]<br />
[[ru:Install Arch Linux from existing Linux]]<br />
[[zh-hans:Install Arch Linux from existing Linux]]<br />
[[zh-hant:Install Arch Linux from existing Linux]]<br />
{{Related articles start}}<br />
{{Related|Install from SSH}}<br />
{{Related articles end}}<br />
<br />
This document describes the bootstrapping process required to install Arch Linux from a running Linux host system.<br />
After bootstrapping, the installation proceeds as described in the [[Installation guide]].<br />
<br />
Installing Arch Linux from a running Linux is useful for:<br />
<br />
* remotely installing Arch Linux, e.g. a (virtual) root server<br />
* replacing an existing Linux without a LiveCD (see [[#Replacing the existing system without a LiveCD]])<br />
* creating a new Linux distribution or [[Arch-based distributions|LiveMedia based on Arch Linux]]<br />
* creating an Arch Linux chroot environment, e.g. for a Docker base container<br />
* [[Diskless network boot NFS root|rootfs-over-NFS for diskless machines]]<br />
<br />
The goal of the bootstrapping procedure is to setup an environment from which the scripts from {{Pkg|arch-install-scripts}} (such as {{ic|pacstrap}} and {{ic|arch-chroot}}) can be run.<br />
<br />
If the host system runs Arch Linux, this can be achieved by simply installing {{Pkg|arch-install-scripts}}. If the host system runs another Linux distribution, you will first need to set up an Arch Linux-based chroot.<br />
<br />
{{Note|This guide requires that the existing host system be able to execute the new target Arch Linux architecture programs. This means it has to be an x86_64 host.}}<br />
<br />
{{Warning|Please make sure you understand each step before proceeding. It is easy to destroy your system or to lose critical data, and your service provider will likely charge a lot to help you recover. }}<br />
<br />
== Backup and preparation ==<br />
<br />
Backup all your data including mails, webservers, etc. Have all information at your fingertips. Preserve all your server configurations, hostnames, etc.<br />
<br />
Here is a list of data you will likely need:<br />
<br />
* IP address<br />
* hostname(s), (note: rootserver are mostly also part of the providers domain, check or save your {{ic|/etc/hosts}} before you delete)<br />
* DNS server (check {{ic|/etc/resolv.conf}})<br />
* SSH keys (if other people work on your server, they will have to accept new keys otherwise. This includes keys from your Apache, your mail servers, your SSH server and others.)<br />
* Hardware info (network card, etc. Refer to your pre-installed {{ic|/etc/modules.conf}} )<br />
* Grub configuration files.<br />
<br />
In general, it is a good idea to have a local copy of your original {{ic|/etc}} directory on your local hard drive.<br />
<br />
== From a host running Arch Linux ==<br />
<br />
Install the {{Pkg|arch-install-scripts}} package.<br />
<br />
Follow [[Installation guide#Mount the file systems]] to mount the filesystem that will be used for the root directory as well as all the other needed mount points. If you already use the {{ic|/mnt}} directory for something else, just create another directory such as {{ic|/mnt/install}} and use it as the mount point base for the rest of the installation.<br />
<br />
At this stage, Arch Linux can either be installed from scratch or it can mirror the host installation. The two options are described thereafter.<br />
<br />
=== Create a new Arch installation ===<br />
<br />
Follow [[Installation guide#Installation]].<br />
<br />
In the procedure, the first step, [[Installation guide#Select the mirrors]], can be skipped since the host should already have a correct mirrorlist.<br />
<br />
{{Tip|<br />
* In order to avoid redownloading all the packages, consider following [[Pacman/Tips and tricks#Network shared pacman cache]], or use ''pacstrap''<nowiki>'</nowiki>s {{ic|-c}} option to use your host machine's package cache.<br />
* When the grub boot-loader is used, the {{ic|grub-mkconfig}} may detect devices incorrectly. This will result in {{ic|Error:no such device}} when trying to boot from the stick. To solve this problem, from the host running Arch Linux, mount the newly installed partitions, ''arch-chroot'' to the new partition, then install and configure grub. The last step may require disabling ''lvmetad'' from {{ic|/etc/lvm/lvm.conf}} by setting {{ic|1=use_lvmetad=0}}.<br />
}}<br />
<br />
=== Create a copy of an existing Arch installation ===<br />
<br />
It is possible to replicate an existing Arch Linux installation by copying the host filesystem to the new partition and make some adjustments to it to make it bootable and unique.<br />
<br />
The first step is to copy the host files into the mounted new partition, for this, consider using the approach exhibited in [[rsync#Full system backup]].<br />
<br />
Then, follow the procedure described in [[Installation guide#Configure the system]] with some caveats and additional steps:<br />
<br />
* [[Installation guide#Time zone]], [[Installation guide#Localization]] and [[Installation guide#Root password]] can be skipped<br />
* [[Installation guide#Initramfs]] may be required in particular if changing filesystem, for example from [[ext4]] to [[Btrfs]]<br />
* Regarding [[Installation guide#Boot loader]], it is necessary to reinstall the bootloader<br />
* Delete {{ic|/etc/machine-id}} so that a new, unique one, is generated at the next boot<br />
<br />
If the mirrored Arch installation may be used within a different configuration or with another hardware, consider the following additional operations:<br />
<br />
* Use the CPU [[microcode]] update adapted to the target system during the step [[Installation guide#Boot loader]]<br />
* If any specific [[Xorg#Configuration]] was present on the host and may be incompatible with the target system, follow [[Moving an existing install into (or out of) a virtual machine#Disable any Xorg-related files]]<br />
* Make any other adjustment appropriate to the target system, like reconfiguring the network or the audio.<br />
<br />
== From a host running another Linux distribution ==<br />
<br />
There are multiple tools which automate a large part of the steps described in the following subsections. See their respective homepages for detailed instructions.<br />
<br />
* [https://github.com/tokland/arch-bootstrap arch-bootstrap] (Bash)<br />
* [https://github.com/gh2o/digitalocean-debian-to-arch digitalocean-debian-to-arch] (repartition disk, DigitalOcean specific)<br />
* [https://github.com/hartwork/image-bootstrap image-bootstrap] (Python)<br />
* [https://gitlab.com/drizzt/vps2arch vps2arch] (Bash)<br />
* [https://github.com/BiteDasher/archbashstrap archbashstrap] (Bash)<br />
<br />
The manual way is presented in the following subsections. The idea is to either get [[pacman]] working directly on the host system, or to run an Arch system inside the host system, with the actual installation being executed from the Arch system. The nested system is contained inside a chroot.<br />
<br />
=== Using pacman from the host system ===<br />
<br />
[https://git.archlinux.org/pacman.git/ Pacman] can be compiled on most Linux distributions, and used directly on the host system to bootstrap Arch Linux. The [https://git.archlinux.org/arch-install-scripts.git/about/ arch-install-scripts] should run without issues directly from the downloaded sources on any recent distribution.<br />
<br />
Some distributions provide a package for ''pacman'' and/or ''arch-install-scripts'' in their official repositories which can be used for this purpose. As of July 2020, Void Linux is known to provide the ''pacman'' package, and Alpine Linux and Fedora are known to provide both ''pacman'' and ''arch-install-scripts''.<br />
<br />
=== Creating a chroot ===<br />
<br />
Two methods to setup and enter the chroot are presented below, from the easiest to the most complicated. Select only one of the two methods. Then, continue at [[#Using a chroot environment]].<br />
<br />
==== Method A: Using the bootstrap image (recommended) ====<br />
<br />
Download the bootstrap image from a [https://archlinux.org/download mirror] into {{ic|/tmp}}.<br />
<br />
You can also download the signature (same URL with {{ic|.sig}} added) and [[GnuPG#Verify_a_signature|verify it with GnuPG]].<br />
<br />
Extract the tarball:<br />
<br />
# tar xzf <path-to-bootstrap-image>/archlinux-bootstrap-*-x86_64.tar.gz<br />
<br />
Select a repository server by editing {{ic|/tmp/root.x86_64/etc/pacman.d/mirrorlist}}.<br />
<br />
Enter the chroot<br />
<br />
* If bash 4 or later is installed, and unshare supports the --fork and --pid options:<br />
# /tmp/root.x86_64/bin/arch-chroot /tmp/root.x86_64/<br />
* Otherwise, run the following commands:<br />
# mount --bind /tmp/root.x86_64 /tmp/root.x86_64<br />
# cd /tmp/root.x86_64<br />
# cp /etc/resolv.conf etc<br />
# mount -t proc /proc proc<br />
# mount --make-rslave --rbind /sys sys<br />
# mount --make-rslave --rbind /dev dev<br />
# mount --make-rslave --rbind /run run # (assuming /run exists on the system)<br />
# chroot /tmp/root.x86_64 /bin/bash<br />
<br />
==== Method B: Using the LiveCD image ====<br />
<br />
It is possible to mount the root image of the latest Arch Linux installation media and then chroot into it. This method has the advantage of providing a working Arch Linux installation right within the host system without the need to prepare it by installing specific packages.<br />
<br />
{{Note|Before proceeding, make sure the latest version of [http://squashfs.sourceforge.net/ squashfs] is installed on the host system. Otherwise, errors like the following are to be expected: {{ic|FATAL ERROR aborting: uncompress_inode_table: failed to read block}}.}}<br />
<br />
* The root image can be found on one of the [https://archlinux.org/download mirrors] under {{ic|arch/x86_64/}}. The squashfs format is not editable, so we unsquash the root image and mount it.<br />
<br />
*To unsquash the root image, run<br />
<br />
# unsquashfs airootfs.sfs<br />
<br />
* Before [[Change root|chrooting]] to it, we need to set up some mount points and copy the resolv.conf for networking.<br />
<br />
# mount --bind squashfs-root squashfs-root<br />
# mount -t proc none squashfs-root/proc<br />
# mount -t sysfs none squashfs-root/sys<br />
# mount -o bind /dev squashfs-root/dev<br />
# mount -o bind /dev/pts squashfs-root/dev/pts ## important for pacman (for signature check)<br />
# cp -L /etc/resolv.conf squashfs-root/etc ## this is needed to use networking within the chroot<br />
<br />
* Now, everything is prepared to chroot into the newly installed Arch environment<br />
# chroot squashfs-root bash<br />
<br />
=== Using a chroot environment ===<br />
<br />
The bootstrap environment is really barebones (no {{Pkg|nano}} or {{Pkg|lvm2}}). Therefore, we need to set up pacman in order to download other necessary packages.<br />
<br />
==== Initializing pacman keyring ====<br />
<br />
Before starting the installation, pacman keys need to be setup. Before running the following two commands, read [[pacman-key#Initializing the keyring]] to understand the entropy requirements:<br />
<br />
# pacman-key --init<br />
# pacman-key --populate archlinux<br />
<br />
{{Tip|If you need to run {{ic|pacman-key --init}} on a computer that does not generate much entropy (e.g. a headless server), key generation may take a very long time. To generate pseudo-entropy, install either [[haveged]] or [[rng-tools]] '''on the host system''' and start the corresponding service before running {{ic|pacman-key --init}}. (Installing these services on the target system instead will not work, since ''systemd'' will [https://superuser.com/questions/688733/start-a-systemd-service-inside-chroot refuse to start services from a chroot] and you need to initialize the pacman keyring prior to installing any packages anyway.)<br><br />
<br />
If you prefer generating entropy through system activity and decide to run {{ic|ls -Ra /}} in another console (TTY, terminal, SSH session...), do not be afraid of running it in a loop a few times: five or six runs from the host proved sufficient to generate enough entropy on a remote headless server.}}<br />
<br />
==== Selecting a mirror and downloading basic tools ====<br />
<br />
After [[Mirrors#Enabling_a_specific_mirror|selecting a mirror]], [[Mirrors#Force_pacman_to_refresh_the_package_lists|refresh the package lists]] and [[install]] what you need: {{Grp|base-devel}}, {{Pkg|parted}} etc.<br />
<br />
{{Note|<br />
* As there is no any text editor yet, you need to exit arch-chroot and edit mirrorlist using host's text editor.<br />
* When you try to install packages with pacman, you could get {{ic|''error: could not determine cachedir mount point /var/cache/pacman/pkg''}}. To workaround it, you could run {{bc|mount --bind ''directory-to-livecd-or-bootstrap'' ''directory-to-livecd-or-bootstrap''}} before chrooting. See {{Bug|46169}}.<br />
}}<br />
<br />
=== Installation tips ===<br />
<br />
You can now proceed to [[Installation guide#Partition the disks]] and follow the rest of the [[Installation guide]].<br />
<br />
Some host systems or configurations may require certain extra steps. See the sections below for tips.<br />
<br />
===== Debian-based host =====<br />
<br />
====== /dev/shm ======<br />
<br />
On some Debian-based host systems, ''pacstrap'' may produce the following error:<br />
<br />
{{hc|# pacstrap /mnt base|<br />
==> Creating install root at /mnt<br />
mount: mount point /mnt/dev/shm is a symbolic link to nowhere<br />
==> ERROR: failed to setup API filesystems in new root<br />
}}<br />
<br />
This is because in some versions of Debian, {{ic|/dev/shm}} points to {{ic|/run/shm}} while in the Arch-based chroot, {{ic|/run/shm}} does not exist and the link is broken. To correct this error, create a directory {{ic|/run/shm}}:<br />
<br />
# mkdir /run/shm<br />
<br />
====== /dev/pts ======<br />
<br />
While installing {{ic|archlinux-2015.07.01-x86_64}} from a Debian 7 host, the following error prevented both [https://projects.archlinux.org/arch-install-scripts.git/tree/pacstrap.in pacstrap] and [[Change root#Using arch-chroot|arch-chroot]] from working:<br />
<br />
{{hc|# pacstrap -i /mnt|<br />
mount: mount point /mnt/dev/pts does not exist<br />
==> ERROR: failed to setup chroot /mnt<br />
}}<br />
<br />
Apparently, this is because these two scripts use a common function. {{ic|chroot_setup()}}[https://projects.archlinux.org/arch-install-scripts.git/tree/common#n76] relies on newer features of {{Pkg|util-linux}}, which are incompatible with Debian 7 userland (see {{Bug|45737}}).<br />
<br />
The solution for ''pacstrap'' is to manually execute its [https://projects.archlinux.org/arch-install-scripts.git/tree/pacstrap.in#n77 various tasks], but use the [[Change root#Using_chroot|regular procedure]] to mount the kernel filesystems on the target directory ({{ic|"$newroot"}}):<br />
<br />
# newroot=/mnt<br />
# mkdir -m 0755 -p "$newroot"/var/{cache/pacman/pkg,lib/pacman,log} "$newroot"/{dev,run,etc}<br />
# mkdir -m 1777 -p "$newroot"/tmp<br />
# mkdir -m 0555 -p "$newroot"/{sys,proc}<br />
# mount --bind "$newroot" "$newroot"<br />
# mount -t proc /proc "$newroot/proc"<br />
# mount --rbind /sys "$newroot/sys"<br />
# mount --rbind /run "$newroot/run"<br />
# mount --rbind /dev "$newroot/dev"<br />
# pacman -r "$newroot" --cachedir="$newroot/var/cache/pacman/pkg" -Sy base base-devel ... ## add the packages you want<br />
# cp -a /etc/pacman.d/gnupg "$newroot/etc/pacman.d/" ## copy keyring<br />
# cp -a /etc/pacman.d/mirrorlist "$newroot/etc/pacman.d/" ## copy mirrorlist<br />
<br />
Instead of using ''arch-chroot'' for [[Installation guide#Chroot]], simply use:<br />
<br />
# chroot "$newroot"<br />
<br />
====== lvmetad ======<br />
<br />
Trying to create [[LVM]] [[LVM#Logical volumes|logical volumes]] from an {{ic|archlinux-bootstrap-2015.07.01-x86_64}} environment on a Debian 7 host resulted in the following error:<br />
<br />
{{hc|# lvcreate -L 20G lvm -n root|<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/dev/lvm/root: not found: device not cleared<br />
Aborting. Failed to wipe start of new LV.}}<br />
<br />
(Physical volume and volume group creation worked despite {{ic|/run/lvm/lvmetad.socket: connect failed: No such file or directory}} being displayed.)<br />
<br />
This could be easily worked around by creating the logical volumes outside the chroot (from the Debian host). They are then available once chrooted again.<br />
<br />
{{Accuracy|This problem did not arise when installing from a Debian 7 host without ''lvmetad'' enabled. The recommended messaround with {{ic|/etc/lvm/lvm.conf}} looks rather error prone (2015-07-26).}}<br />
<br />
Also, if the system you are using has lvm, you might have the following output:<br />
<br />
{{hc|1=# grub-install --target=i386-pc --recheck /dev/main/archroot|2=<br />
Installing for i386-pc platform.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
/run/lvm/lvmetad.socket: connect failed: No such file or directory<br />
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.<br />
}}<br />
<br />
This is because debian does not use lvmetad by default. You need to edit {{ic|/etc/lvm/lvm.conf}} and set {{ic|use_lvmetad}} to {{ic|0}}:<br />
<br />
use_lvmetad = 0<br />
{{Accuracy|Is it the problem with LVM on Debian or with trying to install Arch on LVM?}}<br />
{{Style|poor style}}<br />
This will trigger later an error on boot in the initrd stage. Therefore, you have to change it back after the grub generation. In a software RAID + LVM, steps would be the following:<br />
<br />
* After installing the system, double check your [[Mkinitcpio]] and your bootloader settings. See [[Arch boot process#Boot loader]] for a list of bootloaders.<br />
* You may need to change your {{ic|/etc/mdadm.conf}} to reflect your [[RAID]] settings (if applicable).<br />
* You may need to change your {{ic|HOOKS}} and {{ic|MODULES}} according to your [[LVM]] and [[RAID]] requirements: {{ic|1=MODULES="dm_mod" HOOKS="base udev '''mdadm_udev''' ... block '''lvm2''' filesystems ..."}}<br />
* You will most likely need to generate new initrd images with mkinitcpio. See [[Mkinitcpio#Image creation and activation]].<br />
* Set {{ic|1=use_lvmetad = 0}} in {{ic|/etc/lvm/lvm.conf}}.<br />
* Update your bootloader settings. See your bootloader's wiki page for details.<br />
* Set {{ic|1=use_lvmetad = 1}} in {{ic|/etc/lvm/lvm.conf}}.<br />
<br />
===== Fedora-based host =====<br />
<br />
On Fedora based hosts and live USBs you may encounter problems when using ''genfstab'' to generate your [[fstab]]. Remove duplicate entries and the "seclabel" option where it appears, as this is Fedora-specific and will keep your system from booting normally.<br />
<br />
== Things to check before you reboot ==<br />
<br />
Before rebooting, doublecheck a few details in your installation to achieve a successful installation. To do so, first chroot into the newly-installed system, and then:<br />
<br />
* [[Users and groups#User management|create a user with password]], so you can login via ''ssh''. This is critical since root login is disabled by default since OpenSSH-7.1p2.<br />
* [[Users and groups#User management|set a root password]] so that you can switch to root via ''su'' later<br />
* [[install]] a [[ssh]] solution and [[enable]] its server instance to start automatically at boot.<br />
* set up your [[network configuration]] in order to have a connection started automatically at boot.<br />
* set up a [[boot loader]] and configure it to use the swap partition you appropriated earlier as the root partition. You might want to configure your bootloader to be able to boot into your old system; it is helpful to re-use the server's existing {{ic|/boot}} partition in the new system for this purpose.<br />
<br />
== Replacing the existing system without a LiveCD ==<br />
<br />
Find ~700 MB of free space somewhere on the disk, e.g. by partitioning a swap partition. You can disable the swap partition and set up your system there. <br />
<br />
===Set old swap partition as new root partition===<br />
<br />
Check {{ic|cfdisk}}, {{ic|/proc/swaps}} or {{ic|/etc/fstab}} to find your swap partition. Assuming your hard drive is located on {{ic|sda''X''}} ({{ic|''X''}} will be a number). <br />
<br />
Do the following:<br />
<br />
Disable the swap space:<br />
<br />
# swapoff /dev/sda''X''<br />
<br />
Create a filesystem on it<br />
<br />
# fdisk /dev/sda<br />
(set /dev/sda''X'' ID field to "Linux" - Hex 83)<br />
# mke2fs -j /dev/sda''X''<br />
<br />
Create a directory to mount it in<br />
<br />
# mkdir /mnt/newsys<br />
<br />
Finally, mount the new directory for installing the intermediate system.<br />
<br />
# mount -t ext4 /dev/sda''X'' /mnt/newsys<br />
<br />
=== Installation ===<br />
<br />
[[Installation guide#Install essential packages|Install essentials packages]] and any other package required to get a system with internet connection up and running in the temporary partition, being careful with the limit of ~700 MB space. When specifying packages to be installed with ''pacstrap'', consider adding the {{ic|-c}} flag to avoid filling up valuable space by downloading packages to the host system.<br />
<br />
Once the new Arch Linux system is installed, fix the bootloader configuration, then reboot into the newly created system, and [[rsync#Full system backup|rsync the entire system]] to the primary partition.</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Iwd&diff=605951Iwd2020-04-12T22:33:06Z<p>Cilyan: /* iwctl */ Show that WPS/WSC is possible for quick network setup</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Wireless networking]]<br />
[[Category:Network configuration]]<br />
[[ja:Iwd]]<br />
{{Related articles start}}<br />
{{Related|Network configuration}}<br />
{{Related|Wireless network configuration}}<br />
{{Related|WPA supplicant}}<br />
{{Related articles end}}<br />
[https://iwd.wiki.kernel.org/ iwd] (iNet wireless daemon) is a wireless daemon for Linux written by Intel. The core goal of the project is to optimize resource utilization by not depending on any external libraries and instead utilizing features provided by the Linux Kernel to the maximum extent possible. [https://www.youtube.com/watch?v=F2Q86cphKDo]<br />
<br />
iwd can work in standalone mode or in combination with comprehensive network managers like [[ConnMan]], [[systemd-networkd]] and [[NetworkManager#Using_iwd_as_the_Wi-Fi_backend|NetworkManager]].<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|iwd}} package.<br />
<br />
== Usage ==<br />
<br />
The {{Pkg|iwd}} package provides the client program {{ic|iwctl}}, the daemon {{ic|iwd}} and the Wi-Fi monitoring tool {{ic|iwmon}}.<br />
<br />
[[Start/enable]] {{ic|iwd.service}} so it can be controlled using the {{ic|iwctl}} command.<br />
<br />
=== iwctl ===<br />
<br />
To get an interactive prompt do:<br />
<br />
$ iwctl<br />
<br />
The interactive prompt is then displayed with a prefix of {{ic|[iwd]#}}.<br />
<br />
{{Tip|<br />
* In the {{ic|iwctl}} prompt you can auto-complete commands and device names by hitting {{ic|Tab}}.<br />
* You can use all commands as command line arguments without entering an interactive prompt. For example: {{ic|iwctl device wlp3s0 show}}.}}<br />
<br />
To list all available commands:<br />
<br />
[iwd]# help<br />
<br />
==== Connect to a network ====<br />
<br />
First, if you do not know your wireless device name, list all wifi devices:<br />
<br />
[iwd]# device list<br />
<br />
Then, to scan for networks:<br />
<br />
[iwd]# station ''device'' scan<br />
<br />
You can then list all available networks:<br />
<br />
[iwd]# station ''device'' get-networks<br />
<br />
Finally, to connect to a network:<br />
<br />
[iwd]# station ''device'' connect ''SSID''<br />
<br />
If a passphrase is required, you will be prompted to enter it. Alternatively, you can supply as a command line argument:<br />
<br />
$ iwctl --passphrase ''passphrase'' station ''device'' connect ''SSID''<br />
<br />
{{Note|<br />
* {{ic|iwd}} automatically stores network passphrases in the {{ic|/var/lib/iwd}} directory and uses them to auto-connect in the future. See [[#Optional configuration]].<br />
* To connect to a network with spaces in the SSID, the network name should be double quoted when connecting.<br />
* iwd only supports PSK pass-phrases from 8 to 63 ASCII-encoded characters. The following error message will be given if the requirements are not met: "PMK generation failed. Ensure Crypto Engine is properly configured"<br />
}}<br />
<br />
==== Connect to a network using WPS/WSC ====<br />
<br />
If your network is configured such that you can connect to it by pressing a button ([[Wikipedia:Wi-Fi Protected Setup]]), check first that your network device is also capable of using this setup procedure.<br />
<br />
[iwd]# wsc list<br />
<br />
Then, provided that your device appeared in the above list,<br />
<br />
[iwd]# wsc ''device'' push-button<br />
<br />
and go push the button on your router. That's it. The procedure works also if the button was pushed beforehand, less than 2 minutes earlier.<br />
<br />
If your network requires to validate a PIN number to connect that way, check the {{ic|help}} command output to see how to provide the right options to the {{ic|wsc}} command.<br />
<br />
==== Disconnect from a network ====<br />
<br />
To disconnect from a network:<br />
<br />
[iwd]# station ''device'' disconnect<br />
<br />
==== Show device and connection information ====<br />
<br />
To display the details of a WiFi device, like MAC address:<br />
<br />
[iwd]# device ''device'' show<br />
<br />
To display the connection state, including the connected network of a WiFi device:<br />
<br />
[iwd]# station ''device'' show<br />
<br />
==== Manage known networks ====<br />
<br />
To list networks you have connected to previously:<br />
<br />
[iwd]# known-networks list<br />
<br />
To forget a known network:<br />
<br />
[iwd]# known-networks ''SSID'' forget<br />
<br />
== WPA Enterprise ==<br />
<br />
=== EAP-PWD ===<br />
<br />
For connecting to a EAP-PWD protected enterprice access point you need to create a file called: {{ic|''essid''.8021x}} in the folder {{ic|/var/lib/iwd}} with the following content:<br />
<br />
{{hc|/var/lib/iwd/''essid''.8021x|2=<br />
[Security]<br />
EAP-Method=PWD<br />
EAP-Identity=''your_enterprise_email''<br />
EAP-Password=''your_password''<br />
<br />
[Settings]<br />
AutoConnect=True<br />
}}<br />
<br />
If you do not want autoconnect to the AP you can set the option to False and connect manually to the access point via {{ic|iwctl}}. The same applies to the password, if you do not want to store it plaintext leave the option out of the file and just connect to the enterprise AP.<br />
<br />
=== EAP-PEAP ===<br />
Like EAP-PWD, you also need to create a {{ic|''essid''.8021x}} in the folder. Before you proceed to write the configuration file, this is also a good time to find out which CA certificate your organization uses. This is an example configuration file that uses MSCHAPv2 password authentication:<br />
<br />
{{hc|/var/lib/iwd/''essid''.8021x|2=[Security]<br />
EAP-Method=PEAP<br />
EAP-Identity=anonymous@realm.edu<br />
EAP-PEAP-CACert=/path/to/root.crt<br />
EAP-PEAP-ServerDomainMask=radius.realm.edu<br />
EAP-PEAP-Phase2-Method=MSCHAPV2<br />
EAP-PEAP-Phase2-Identity=johndoe@realm.edu<br />
EAP-PEAP-Phase2-Password=hunter2<br />
<br />
[Settings]<br />
AutoConnect=true}}<br />
<br />
{{Tip|If you are planning on using ''eduroam'' and you are affiliated with a US-based institution, your CA is likely {{ic|Addtrust External CA Root}}, as your institution probably issues certificates through Internet2's InCommon. However, you should always refer to your organization's help desk if in doubt. See also [[#Eduroam]].}}<br />
<br />
=== TTLS-PAP ===<br />
<br />
Like EAP-PWD, you also need to create a {{ic|''essid''.8021x}} in the folder. Before you proceed to write the configuration file, this is also a good time to find out which CA certificate your organization uses. This is an example configuration file that uses PAP password authentication:<br />
<br />
{{hc|/var/lib/iwd/''essid''.8021x|2=[Security]<br />
EAP-Method=TTLS<br />
EAP-Identity=anonymous@uni-test.de<br />
EAP-TTLS-CACert=cert.pem<br />
EAP-TTLS-ServerDomainMask=*.uni-test.de<br />
EAP-TTLS-Phase2-Method=Tunneled-PAP<br />
EAP-TTLS-Phase2-Identity=user<br />
EAP-TTLS-Phase2-Password=password<br />
<br />
[Settings]<br />
AutoConnect=true}}<br />
<br />
=== TLS Based EAP Methods on older kernels ===<br />
<br />
Linux kernels older than v4.20 (e.g. {{Pkg|linux-lts}}) have to be patched to connect to EAP-TLS, EAP-TTLS, and EAP-PEAP.<br />
Edit the PKGBUILD for the kernel and add the following sources<br />
{{hc|PKGBUILD|2=<br />
"iwd1.patch::https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/patch/?id=ab2a33c1c0b1b0a45c16746dd0101057c6d432ed"<br />
"iwd2.patch::https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/patch/?id=3a478ace6154e33009f9b01acbd4eaf7615fef0e"<br />
"iwd3.patch::https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/patch/?id=5faadff684460b7f4064f9f28db8915a56601147"<br />
"iwd4.patch::https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/patch/?id=3c7f3a6c70b47858a065b7a86313f390b083ee40" <br />
"iwd5.patch::https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/patch/?id=5362bbfdf2a8a5810d4237e4dbbf5da043e47fb6"<br />
"iwd6.patch::https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/patch/?id=5c93ce3acc010425eab01dc8e0ffb5529f3f85c1"<br />
"iwd7.patch::https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/patch/?id=ca4d545b92cf52ffe777cc7cfbaf64100dfa6e9c"<br />
"iwd8.patch::https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/patch/?id=f2ac228eaba9fe3f4fcf80b121eb92707afdd4de"<br />
}}<br />
And add the following line to the end of the kernel config:<br />
{{hc|config|2=<br />
CONFIG_PKCS8_PRIVATE_KEY_PARSER=y<br />
}}<br />
Then update the checksums of the PKGBUILD with {{ic|updpkgsums}} (from {{Pkg|pacman-contrib}}):<br />
<br />
$ updpkgsums<br />
<br />
and build the package.<br />
<br />
=== Eduroam ===<br />
<br />
Eduroam offers a [https://cat.eduroam.org/ configuration assistant tool (CAT)], which unfortunately does not support iwd. However, the installer, which you can download by clicking on the download button then selecting your university, is just a Python script. It is easy to extract the necessary configuration options, including the certificate and server domain mask.<br />
<br />
The following table contains a mapping of iwd configuration options to eduroam CAT install script variables.<br />
<br />
{| class="wikitable<br />
! Iwd Configuration Option !! CAT Script Variable<br />
|-<br />
| file name || one of {{ic|Config.ssids}}<br />
|-<br />
| {{ic|EAP-Method}} || {{ic|Config.eap_outer}}<br />
|-<br />
| {{ic|EAP-Identity}} || {{ic|Config.email}}<br />
|-<br />
| {{ic|EAP-PEAP-CACert}} || {{ic|Config.CA}}<br />
|-<br />
| {{ic|EAP-PEAP-ServerDomainMask}} || one of {{ic|Config.servers}}<br />
|-<br />
| {{ic|EAP-PEAP-Phase2-Method}} || {{ic|Config.eap_inner}}<br />
|-<br />
| {{ic|EAP-PEAP-Phase2-Identity}} || username@{{ic|Config.user_realm}}<br />
|}<br />
<br />
{{Note| {{ic|EAP-Identity}} may not be required by your Eduroam provider, in which case you can use {{ic|anonymous}} in this field.}}<br />
<br />
=== Other cases ===<br />
<br />
More example tests can be [https://git.kernel.org/pub/scm/network/wireless/iwd.git/tree/autotests found in the test cases] of the upstream repository.<br />
<br />
== Optional configuration ==<br />
<br />
File {{ic|/etc/iwd/main.conf}} can be used for main configuration. See {{man|5|iwd.config}}.<br />
<br />
By default, {{ic|iwd}} stores the network configuration in {{ic|/var/lib/iwd}} directory. The configuration file is named as {{ic|''network''.''type''}} where ''network'' is network SSID and ''type'' is network type i.e. one of "open", "wep", "psk", "8021x". The file is used to store the encrypted {{ic|PreSharedKey}} and optionally the cleartext {{ic|Passphrase}} and can be created by the user without invoking {{ic|iwctl}}. The file can also be used for other configuration pertaining to that network SSID. For more settings, see {{man|5|iwd.network}}.<br />
<br />
A minimal example file to connect to a WPA2/PSK secured network with SSID "spaceship" and passphrase "test1234":<br />
<br />
{{hc|/var/lib/iwd/spaceship.psk|2=<br />
[Security]<br />
PreSharedKey=aafb192ce2da24d8c7805c956136f45dd612103f086034c402ed266355297295<br />
}}<br />
<br />
The PreSharedKey can be calculated from the SSID and the WiFi passphrase using ''wpa_passphrase'' (from {{Pkg|wpa_supplicant}}) or {{AUR|wpa-psk}}:<br />
<br />
{{hc|$ wpa_passphrase "spaceship" "test1234"|2=<br />
network={<br />
ssid="spaceship"<br />
#psk="test1234"<br />
psk=aafb192ce2da24d8c7805c956136f45dd612103f086034c402ed266355297295<br />
}<br />
}}<br />
<br />
{{Note|The SSID of the network is used as a filename only when it contains only alphanumeric characters or one of {{ic|- _}}. If it contains any other characters, the name will instead be an {{ic|1==}}-character followed by the hex-encoded version of the SSID.}}<br />
<br />
=== Disable auto-connect for a particular network ===<br />
<br />
Create / edit file {{ic|/var/lib/iwd/''network''.''type''}}. Add the following section to it:<br />
<br />
{{hc|/var/lib/iwd/spaceship.psk (for example)|2=<nowiki><br />
[Settings]<br />
AutoConnect=false<br />
</nowiki>}}<br />
<br />
=== Disable periodic scan for available networks ===<br />
<br />
By default when {{ic|iwd}} is in disconnected state, it periodically scans for available networks. To disable periodic scan (so as to always scan manually), create / edit file {{ic|/etc/iwd/main.conf}} and add the following section to it:<br />
<br />
{{hc|/etc/iwd/main.conf|2=<br />
[Scan]<br />
DisablePeriodicScan=true<br />
}}<br />
<br />
=== Enable built-in network configuration ===<br />
<br />
Since version 0.19, iwd can assign IP address(es) and set up routes using a built-in DHCP client or with static configuration.<br />
<br />
To activate iwd's network configuration feature, create/edit {{ic|/etc/iwd/main.conf}} and add the following section to it:<br />
<br />
{{hc|/etc/iwd/main.conf|2=<br />
[General]<br />
EnableNetworkConfiguration=true<br />
}}<br />
<br />
There is also ability to set route metric with {{ic|route_priority_offset}}:<br />
<br />
{{hc|/etc/iwd/main.conf|2=<br />
[General]<br />
route_priority_offset=300<br />
}}<br />
<br />
==== Setting static IP address in network configuration ====<br />
<br />
Add the following section to {{ic|/var/lib/iwd/''network''.''type''}} file. For example:<br />
<br />
{{hc|/var/lib/iwd/spaceship.psk|2=<br />
[IPv4]<br />
ip=192.168.1.10<br />
netmask=255.255.255.0<br />
gateway=192.168.1.1<br />
broadcast=192.168.1.255<br />
dns=192.168.1.1<br />
}}<br />
<br />
==== Select DNS manager ====<br />
<br />
At the moment, iwd supports two DNS managers—[[systemd-resolved]] and [[resolvconf]].<br />
<br />
Add the following section to {{ic|/etc/iwd/main.conf}} for {{ic|systemd-resolved}}:<br />
<br />
{{hc|/etc/iwd/main.conf|2=<br />
[Network]<br />
NameResolvingService=systemd<br />
}}<br />
<br />
For {{ic|resolvconf}}:<br />
<br />
{{hc|/etc/iwd/main.conf|2=<br />
[Network]<br />
NameResolvingService=resolvconf<br />
}}<br />
<br />
=== Deny console (local) user from modifying the settings ===<br />
<br />
By default {{ic|iwd}} D-Bus interface allows ''any'' console user to connect to {{ic|iwd}} daemon and modify the settings, even if that user is not a ''root'' user.<br />
<br />
If you do not want to allow console user to modify the settings but allow reading the status information, then create a D-Bus configuration file as follows.<br />
<br />
{{hc|/etc/dbus-1/system.d/iwd-strict.conf|2=<nowiki><br />
<!-- prevent local users from changing iwd settings, but allow<br />
reading status information. overrides some part of<br />
/usr/share/dbus-1/system.d/iwd-dbus.conf. --><br />
<br />
<!-- This configuration file specifies the required security policies<br />
for iNet Wireless Daemon to work. --><br />
<br />
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"<br />
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"><br />
<busconfig><br />
<br />
<policy at_console="true"><br />
<deny send_destination="net.connman.iwd"/><br />
<allow send_destination="net.connman.iwd" send_interface="org.freedesktop.DBus.Properties" send_member="GetAll" /><br />
<allow send_destination="net.connman.iwd" send_interface="org.freedesktop.DBus.Properties" send_member="Get" /><br />
<allow send_destination="net.connman.iwd" send_interface="org.freedesktop.DBus.ObjectManager" send_member="GetManagedObjects" /><br />
<allow send_destination="net.connman.iwd" send_interface="net.connman.iwd.Device" send_member="RegisterSignalLevelAgent" /><br />
<allow send_destination="net.connman.iwd" send_interface="net.connman.iwd.Device" send_member="UnregisterSignalLevelAgent" /><br />
</policy><br />
<br />
</busconfig><br />
</nowiki>}}<br />
<br />
{{Tip|Remove ''<allow>'' lines above to deny reading the status information as well.}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Verbose TLS debugging ===<br />
<br />
This can be useful, if you have trouble setting up MSCHAPv2 or TTLS. You can set the following environment variable via {{ic|systemctl edit iwd.service}}:<br />
<br />
{{hc|/etc/systemd/system/iwd.conf.d/override.conf|2=<br />
[Service]<br />
Environment=IWD_TLS_DEBUG=TRUE<br />
}}<br />
<br />
Check the iwd logs afterwards via {{ic|journalctl -u iwd}}<br />
<br />
=== Connect issues after reboot ===<br />
<br />
A low entropy pool can cause connection problems in particular noticeable after reboot. See [[Random number generation]] for suggestions to increase the entropy pool.<br />
<br />
=== Systemd unit fails on startup due to device not being available ===<br />
<br />
Some users have reported that the provided systemd unit does not wait for the wireless device to become available [https://bbs.archlinux.org/viewtopic.php?id=241803]. Unfortunately, if iwd is started before udev renaming is done, the network device will be blocked and renaming will fail. Thus, the unit fails on startup [https://iwd.wiki.kernel.org/interface_lifecycle#udev_interface_renaming]. The issue can be fixed by forcing iwd to legacy mode and thus, not renaming newly detected devices, by adding an option to {{ic|/etc/iwd/main.conf}} as follows:<br />
<br />
{{hc|/etc/iwd/main.conf|2=<br />
[General]<br />
use_default_interface=true<br />
}}<br />
<br />
Optionally, bind iwd to a specific wireless device by creating a systemd unit with the following content. As of ''0.21'', it has been observed that this will not prevent iwd from renaming the wireless device later, thus the use of iwd's legacy mode is mandatory:<br />
<br />
{{hc|1=/etc/systemd/system/iwd@.service|2=<br />
[Unit]<br />
Description=Wireless service on %I<br />
BindsTo=sys-subsystem-net-devices-%i.device<br />
After=sys-subsystem-net-devices-%i.device<br />
<br />
[Service]<br />
Type=dbus<br />
BusName=net.connman.iwd<br />
ExecStart=/usr/lib/iwd/iwd --interface %i<br />
LimitNPROC=1<br />
Restart=on-failure}}<br />
<br />
Then, disable {{ic|iwd.service}} and enable {{ic|iwd@''device''.service}} unit for the specific wireless ''device''.<br />
<br />
Alternatively, set a proper dependency for iwd to run after systemd/udevd by creating a [[drop-in file]] as follows: [https://lists.01.org/pipermail/iwd/2019-March/005837.html]<br />
<br />
{{Accuracy|1=Is "After=network-pre.target" needed? If so, is "After=systemd-udevd" even needed? This solution does not seem to work for all cases. See [https://lists.01.org/pipermail/iwd/2019-March/005839.html] and {{man|7|systemd.special}}.}}<br />
<br />
{{hc|1=/etc/systemd/system/iwd.service.d/override.conf|2=<br />
[Unit]<br />
After=systemd-udevd.service}}<br />
<br />
If systemd-networkd is used, since both systemd-udevd/networkd play relatively well together, and both are involved, it is reasonable to start iwd after both of them:<br />
<br />
{{hc|1=/etc/systemd/system/iwd.service.d/override.conf|2=<br />
[Unit]<br />
After=systemd-udevd.service systemd-networkd.service}} <br />
<br />
See {{Bug|61367}}.<br />
<br />
=== Wireless device is not renamed by udev ===<br />
<br />
Upgrade to {{Pkg|iwd}} 1.0 introduces the systemd network link configuration file:<br />
<br />
{{hc|1=/usr/lib/systemd/network/80-iwd.link|2=<br />
[Match]<br />
Type=wlan<br />
<br />
[Link]<br />
NamePolicy=keep kernel}}<br />
<br />
This prevents udev from renaming the interface to {{ic|wlp#s#}}. As a result the wireless link name {{ic|wlan#}} is kept after boot.<br />
<br />
If this results in issues try masking it with:<br />
<br />
# ln -s /dev/null /etc/systemd/network/80-iwd.link<br />
<br />
=== WPA Enterprise connection with NetworkManager ===<br />
<br />
{{Move|NetworkManager#Troubleshooting|This is not a problem of iwd.}}<br />
<br />
If you try to connect to an WPA Enterprise network like 'eduroam' with NetworkManager with the iwd backend then you will get the following error from NetworkManager:<br />
<br />
Connection 'eduroam' is not avialable on device wlan0 because profile is not compatible with device (802.1x connections must have IWD provisioning files)<br />
<br />
This is because NetworkManager can not configure a WPA Enterprise network. Therefore you have to configure it using an iwd config file {{ic|/var/lib/iwd/''essid''.8021x}} like described in [[#WPA Enterprise]].<br />
<br />
== See also ==<br />
<br />
* [https://iwd.wiki.kernel.org/gettingstarted Getting Started with iwd]<br />
* [https://iwd.wiki.kernel.org/networkconfigurationsettings Network Configuration Settings]<br />
* [https://git.kernel.org/pub/scm/network/wireless/iwd.git/tree/autotests More Examples for WPA Enterprise]</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Nginx&diff=492103Nginx2017-10-01T23:05:38Z<p>Cilyan: Warn about missing dependencies in the chroot</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Web server]]<br />
[[de:Nginx]]<br />
[[ja:Nginx]]<br />
[[ru:Nginx]]<br />
[[zh-hans:Nginx]]<br />
<br />
[[Wikipedia:nginx|nginx]] (pronounced "engine X"), is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server, written by Igor Sysoev in 2005. According to Netcraft's [http://news.netcraft.com/archives/2015/04/20/april-2015-web-server-survey.html April 2015 Web Server Survey], nginx now hosts 14.48% of all domains worldwide, while [[Apache]] hosts about 38.39%. nginx is now well known for its stability, rich feature set, simple configuration, and low resource consumption.<br />
<br />
Nginx is often used together with a scripting language such as [[PHP]] and database such as [[MySQL]]. This combination is often referred to as a LEMP stack (Linux, EngineX, MySQL, PHP).<br />
<br />
== Installation ==<br />
<br />
[[Install]] the package {{Pkg|nginx-mainline}} (mainline branch: new features, updates, bugfixes) or {{Pkg|nginx}} (stable branch: major bugfixes only).<br />
<br />
Using the mainline branch is recommended. The main reason to use the stable branch is that you are concerned about possible impacts of new features, such as incompatibility with third-party modules or the inadvertent introduction of bugs in new features [https://www.nginx.com/blog/nginx-1-6-1-7-released/].<br />
<br />
For a Ruby on Rails setup with nginx, see [[Ruby on Rails#The Perfect Rails Setup]].<br />
<br />
For a chroot-based installation for additional security, see [[#Installation in a chroot]].<br />
<br />
== Running ==<br />
<br />
[[Start/enable]] {{ic|nginx.service}}.<br />
<br />
The default page served at http://127.0.0.1 is {{ic|/usr/share/nginx/html/index.html}}.<br />
<br />
== Configuration ==<br />
<br />
First steps with nginx are described in the [http://nginx.org/en/docs/beginners_guide.html Beginner’s Guide]. You can modify the configuration by editing the files in {{ic|/etc/nginx/}} The main configuration file is located at {{ic|/etc/nginx/nginx.conf}}.<br />
<br />
More details and examples can be found in http://wiki.nginx.org/Configuration and the [http://nginx.org/en/docs/ official documentation].<br />
<br />
The examples below cover the most common use cases. It is assumed that you use the default location for documents ({{ic|/usr/share/nginx/html}}). If that is not the case, substitute your path instead.<br />
<br />
=== Configuration example ===<br />
{{hc|/etc/nginx/nginx.conf|<nowiki><br />
user http;<br />
worker_processes auto;<br />
worker_cpu_affinity auto;<br />
pcre_jit on;<br />
<br />
events {<br />
worker_connections 2048;<br />
}<br />
<br />
<br />
http {<br />
include mime.types;<br />
default_type application/octet-stream;<br />
sendfile on;<br />
tcp_nopush on;<br />
aio threads;<br />
server_tokens off; # Security: Disables nginx version in error messages and in the “Server” response header field.<br />
charset utf-8; # Force usage of UTF-8<br />
index index.php index.html index.htm;<br />
# include sites-enabled/*; # See Server blocks<br />
}<br />
</nowiki>}}<br />
<br />
=== General configuration ===<br />
<br />
==== Processes and connections ====<br />
<br />
You should choose a fitting value for {{ic|worker_processes}}. This setting ultimately defines how many connections nginx will accept and how many processors it will be able to make use of. Generally, making it the number of hardware threads in your system is a good start. Alternatively, {{ic|worker_processes}} accepts the {{ic|auto}} value since versions 1.3.8 and 1.2.5, which will try to autodetect the optimal value ([http://nginx.org/en/docs/ngx_core_module.html#worker_processes source]).<br />
<br />
The maximum connections nginx will accept is given by {{ic|1=max_clients = worker_processes * worker_connections}}.<br />
<br />
==== Running under different user ====<br />
<br />
By default, {{Pkg|nginx}} runs the master process as {{ic|root}} and worker processes as user {{ic|http}}. To run worker processes as another user, change the {{ic|user}} directive in {{ic|nginx.conf}}:<br />
<br />
{{hc|/etc/nginx/nginx.conf|<br />
user ''user'' [''group''];<br />
}}<br />
<br />
If the group is omitted, a group whose name equals that of ''user'' is used.<br />
<br />
{{Tip|1=It is also possible to run nginx without anything running as {{ic|root}} using [[systemd]]. See [[#Running unprivileged using systemd]].}}<br />
<br />
==== Server blocks ====<br />
<br />
It is possible to serve multiple domains using {{ic|server}} blocks. It may be referred as "VirtualHosts", however this is an [[Apache]] term. The usage of {{ic|server}} blocks also differs from [http://wiki.nginx.org/ServerBlockExample Apache].<br />
<br />
In the example below the server listens for incoming connections for two domains: {{ic|domainname1.dom}} and {{ic|domainname2.dom}}:<br />
<br />
{{hc|/etc/nginx/nginx.conf|<nowiki><br />
...<br />
server {<br />
listen 80;<br />
server_name domainname1.dom;<br />
root /usr/share/nginx/domainname1.dom/html;<br />
location / {<br />
index index.php index.html index.htm;<br />
}<br />
}<br />
<br />
server {<br />
listen 80;<br />
server_name domainname2.dom;<br />
root /usr/share/nginx/domainname2.dom/html;<br />
...<br />
}<br />
...<br />
</nowiki>}}<br />
<br />
[[Restart]] {{ic|nginx.service}} to apply any changes.<br />
<br />
You should configure a DNS-server like [[BIND]] or [[dnsmasq]] so that these domain names could be resolved for connecting clients.<br />
<br />
For now you can just add them manually in {{ic|/etc/hosts}} replacing {{ic|192.168.0.101}} with the actual IP address of server:<br />
<br />
192.168.0.101 domainname1.dom<br />
192.168.0.101 domainname2.dom<br />
<br />
=====Managing server entries=====<br />
<br />
It may be easier to use an [[Apache]] like [[Apache#Managing_many_virtual_hosts|Virtual hosts]] system.<br />
<br />
Create the following directories:<br />
<br />
# mkdir /etc/nginx/sites-available<br />
# mkdir /etc/nginx/sites-enabled<br />
<br />
Create a file inside the {{ic|sites-available}} directory that contains one or more server blocks:<br />
<br />
{{hc|/etc/nginx/sites-available/example|<nowiki><br />
server {<br />
..<br />
}<br />
</nowiki>}}<br />
<br />
Append the following line at the end of the {{ic|http}} block in /etc/nginx/nginx.conf: <br />
<br />
include sites-enabled/*;<br />
<br />
To enable a {{ic|server}}, simple create a symlink:<br />
<br />
# ln -s /etc/nginx/sites-available/example /etc/nginx/sites-enabled/example<br />
<br />
To remove a {{ic|server}}, delete the symlink:<br />
<br />
# unlink /etc/nginx/sites-enabled/example<br />
<br />
Reload or restart {{ic|nginx.service}} to enable the new configuration.<br />
<br />
==== TLS/SSL ====<br />
<br />
[[OpenSSL]] provides TLS/SSL support and is installed by default on Arch installations.<br />
<br />
{{Tip|<br />
* You may want to read the [http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_certificate ngx_http_ssl_module] docs first before configuring SSL.<br />
* [[Let’s Encrypt]] is a free, automated, and open certificate authority. A plugin is available to request valid SSL certificates straight from the command line and automatic configuration.<br />
* Mozilla has a useful [https://wiki.mozilla.org/Security/Server_Side_TLS SSL/TLS article] which includes [https://wiki.mozilla.org/Security/Server_Side_TLS#Nginx nginx specific] configuration guidelines as well as an [https://mozilla.github.io/server-side-tls/ssl-config-generator/ automated tool] to help create a more secure configuration.<br />
* [https://cipherli.st Cipherli.st] provides strong SSL implementation examples and tutorial for most modern webservers.<br />
}}<br />
<br />
{{Warning|If you plan on implementing SSL/TLS, know that some variations and implementations are [https://weakdh.org/#affected still] [[wikipedia:Transport_Layer_Security#Attacks_against_TLS.2FSSL|vulnerable to attack]]. For details on these current vulnerabilities within SSL/TLS and how to apply appropriate changes to nginx, visit http://disablessl3.com/ and https://weakdh.org/sysadmin.html}}<br />
<br />
Create a private key and self-signed certificate. This is adequate for most installations that do not require a [[OpenSSL#Making_requests|CSR]]:<br />
<br />
# mkdir /etc/nginx/ssl<br />
# cd /etc/nginx/ssl<br />
# openssl req -new -x509 -nodes -newkey rsa:4096 -keyout server.key -out server.crt -days 1095<br />
# chmod 400 server.key<br />
# chmod 444 server.crt<br />
<br />
{{Note|The {{ic|-days}} switch is optional and RSA keysize can be as low as 2048 (default).}}<br />
<br />
If you need to create a CSR, follow these instructions instead of the above:<br />
<br />
# mkdir /etc/nginx/ssl<br />
# cd /etc/nginx/ssl<br />
# openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:4096 -out server.key<br />
# chmod 400 server.key<br />
# openssl req -new -sha256 -key server.key -out server.csr<br />
# openssl x509 -req -days 1095 -in server.csr -signkey server.key -out server.crt<br />
<br />
{{Note|For more ''openssl'' options, read its [https://www.openssl.org/docs/apps/openssl.html man page] or peruse its [https://www.openssl.org/docs/ extensive documentation].}}<br />
<br />
Example of a {{ic|nginx.conf}} using SSL:<br />
<br />
{{hc|/etc/nginx/nginx.conf|<nowiki><br />
http {<br />
...<br />
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";<br />
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;<br />
ssl_prefer_server_ciphers on;<br />
ssl_session_cache shared:SSL:10m;<br />
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";<br />
add_header X-Frame-Options DENY;<br />
add_header X-Content-Type-Options nosniff;<br />
ssl_session_tickets off;<br />
ssl_stapling on;<br />
ssl_stapling_verify on;<br />
resolver 8.8.8.8 8.8.4.4 valid=300s; # Google DNS Servers<br />
resolver_timeout 5s;<br />
<br />
# Redirect to HTTPS<br />
server {<br />
listen 80;<br />
server_name localhost;<br />
return 301 https://$server_name$request_uri;<br />
}<br />
<br />
server {<br />
#listen 80; # Uncomment to also listen for HTTP requests<br />
listen 443 ssl http2; # HTTP/2 is only possible when using SSL<br />
server_name localhost;<br />
<br />
ssl_certificate ssl/server.crt;<br />
ssl_certificate_key ssl/server.key;<br />
<br />
root /usr/share/nginx/html;<br />
location / {<br />
index index.html index.htm;<br />
}<br />
}<br />
}<br />
</nowiki>}}<br />
<br />
[[Restart]] {{ic|nginx.service}} to apply any changes.<br />
<br />
==== Per-User Directories ====<br />
<br />
To replicate Apache-style {{ic|~user}} URLs to users' {{ic|~/public_html}} directories, try the following. (Note: if both rules are used, below, the more-specific PHP rule must come first.)<br />
<br />
{{hc|/etc/nginx/nginx.conf|<nowiki><br />
...<br />
server {<br />
...<br />
# PHP in user directories, e.g. http://example.com/~user/test.php<br />
location ~ ^/~(.+?)(/.+\.php)$ {<br />
alias /home/$1/public_html$2;<br />
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;<br />
fastcgi_index index.php;<br />
include fastcgi.conf;<br />
}<br />
<br />
# User directories, e.g. http://example.com/~user/<br />
location ~ ^/~(.+?)(/.*)?$ {<br />
alias /home/$1/public_html$2;<br />
index index.html index.htm;<br />
autoindex on;<br />
}<br />
...<br />
}<br />
...<br />
</nowiki>}}<br />
<br />
See [[#PHP implementation]] for more information on PHP configuration with {{ic|nginx}}.<br />
<br />
Restart {{ic|nginx.service}} to enable the new configuration.<br />
<br />
=== FastCGI ===<br />
<br />
FastCGI, also FCGI, is a protocol for interfacing interactive programs with a web server. FastCGI is a variation on the earlier CGI (Common Gateway Interface); FastCGI's main aim is to reduce the overhead associated with interfacing the web server and CGI programs, allowing a server to handle more web page requests at once.<br />
<br />
FastCGI technology is introduced into nginx to work with many external tools, i.e.: Perl, [[PHP]] and [[Python]].<br />
<br />
==== PHP implementation ====<br />
<br />
[http://php-fpm.org/ PHP-FPM] is the recommended solution to run as FastCGI server for PHP. [[Install]] the {{Pkg|php}} and {{Pkg|php-fpm}} packages and configure PHP as described on the [[PHP]] page.<br />
<br />
The main configuration file of PHP-FPM is {{ic|/etc/php/php-fpm.conf}}, then [[enable]] and [[start]] the systemd unit {{ic|php-fpm.service}}.<br />
<br />
{{Note|<br />
* If you [[#Running_under_different_user|run nginx under different user]], make sure that the PHP-FPM socket file is accessible by this user, or use a TCP socket.<br />
* If you run nginx in chrooted environment (chroot is {{ic|/srv/nginx-jail}}, web pages are served at {{ic|/srv/nginx-jail/www}}), you must modify the file {{ic|/etc/php/php-fpm.conf}} to include the {{ic|chroot /srv/nginx-jail}} and {{ic|1=listen = /srv/nginx-jail/run/php-fpm/php-fpm.sock}} directives within the pool section (a default one is {{ic|[www]}}). Create the directory for the socket file, if missing. Moreover, for modules that are dynamically linked to dependencies, you will need to copy those dependencies to the chroot (e.g. for php-imagick, you will need to copy the ImageMagick libraries to the chroot, but not imagick.so itself).<br />
}}<br />
<br />
===== nginx configuration =====<br />
<br />
====== Adding to main configuration ======<br />
<br />
Inside each {{ic|server}} block serving a PHP web application should appear a {{ic|location}} block similar to:<br />
<br />
location ~ \.php$ {<br />
try_files $uri $document_root$fastcgi_script_name =404;<br />
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;<br />
fastcgi_index index.php;<br />
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br />
include fastcgi.conf;<br />
}<br />
<br />
If it is needed to process other extensions with PHP (e.g. ''.html'' and ''.htm''):<br />
<br />
location ~ \.(php'''|html|htm''')$ {<br />
...<br />
}<br />
<br />
Non ''.php'' extension processing in PHP-FPM should be explicitly added in {{ic|/etc/php/php-fpm.d/www.conf}}:<br />
<br />
security.limit_extensions = .php .html .htm<br />
<br />
{{Note|Pay attention to the {{ic|fastcgi_pass}} argument, as it must be the TCP or Unix socket defined by the chosen FastCGI server in its config file. The '''default''' (Unix) socket for {{ic|php-fpm}} is:<br />
<br />
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;<br />
<br />
You might use the common TCP socket, '''not default''',<br />
<br />
fastcgi_pass 127.0.0.1:9000;<br />
<br />
Unix domain sockets should however be faster.}}<br />
<br />
======PHP configuration file======<br />
If using multiple {{ic|server}} blocks with enabled PHP support, it might be easier to create a PHP config file instead:<br />
{{hc|/etc/nginx/php.conf|<nowiki><br />
location ~ \.php$ {<br />
...<br />
}<br />
</nowiki>}}<br />
<br />
To enable PHP support for a particular server, simple include {{ic|php.conf}}:<br />
{{hc|/etc/nginx/nginx.conf|<nowiki><br />
server {<br />
server_name example.com;<br />
...<br />
include php.conf;<br />
}<br />
</nowiki>}}<br />
<br />
===== Test configuration =====<br />
<br />
You need to [[restart]] the {{ic|php-fpm.service}} and {{ic|nginx.service}} units if the configuration has been changed in order to apply changes.<br />
<br />
To test the FastCGI implementation, create a new PHP file inside the {{ic|root}} folder containing:<br />
<br />
<?php phpinfo();<br />
<br />
Navigate this file inside a browser and you will see the informational page with the current PHP configuration.<br />
<br />
==== CGI implementation ====<br />
<br />
This implementation is needed for CGI applications.<br />
<br />
===== fcgiwrap =====<br />
<br />
[[Install]] {{Pkg|fcgiwrap}}. The configuration file is {{ic|/usr/lib/systemd/system/fcgiwrap.socket}}. [[Enable]] and [[start]] {{ic|fcgiwrap.socket}}.<br />
<br />
====== Multiple worker threads ======<br />
<br />
If you want to spawn multiple worker threads, it is recommended that you use {{AUR|multiwatch}}, which will take care of restarting crashed children. You will need to use {{ic|spawn-fcgi}} to create the unix socket, as multiwatch seems unable to handle the systemd-created socket, even though fcgiwrap itself does not have any trouble if invoked directly in the unit file.<br />
<br />
Copy the unit file from {{ic|/usr/lib/systemd/system/fcgiwrap.service}} to {{ic|/etc/systemd/system/fcgiwrap.service}} (and the {{ic|fcgiwrap.socket}} unit, if present), and modify the {{ic|ExecStart}} line to suit your needs. Here is a unit file that uses {{AUR|multiwatch}}. Make sure {{ic|fcgiwrap.socket}} is not started or enabled, because it will conflict with this unit:<br />
<br />
{{hc|/etc/systemd/system/fcgiwrap.service|2=<br />
[Unit]<br />
Description=Simple CGI Server<br />
After=nss-user-lookup.target<br />
<br />
[Service]<br />
ExecStartPre=/bin/rm -f /run/fcgiwrap.socket<br />
ExecStart=/usr/bin/spawn-fcgi -u http -g http -s /run/fcgiwrap.sock -n -- /usr/bin/multiwatch -f 10 -- /usr/sbin/fcgiwrap<br />
ExecStartPost=/usr/bin/chmod 660 /run/fcgiwrap.sock<br />
PrivateTmp=true<br />
Restart=on-failure<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
Tweak {{ic|-f 10}} to change the number of children that are spawned.<br />
<br />
{{Warning|The {{ic|ExecStartPost}} line is required because of strange behaviour I'm seeing when I use the {{ic|-M 660}} option for {{ic|spawn-fcgi}}. The wrong mode is set. This may be a bug?}}<br />
<br />
===== nginx configuration =====<br />
<br />
Inside each {{ic|server}} block serving a CGI web application should appear a {{ic|location}} block similar to:<br />
<br />
location ~ \.cgi$ {<br />
root /path/to/server/cgi-bin;<br />
fastcgi_pass unix:/run/fcgiwrap.sock;<br />
include fastcgi.conf;<br />
}<br />
<br />
The default socket file for {{ic|fcgiwrap}} is {{ic|/run/fcgiwrap.sock}}.<br />
<br />
If you keep getting a {{ic|502 - bad Gateway}} error, you should check if your CGI-application first announces the mime-type of the following content. For html this needs to be {{ic|Content-type: text/html}}.<br />
<br />
== Installation in a chroot ==<br />
<br />
Installing nginx in a [[chroot]] adds an additional layer of security. For maximum security the chroot should include only the files needed to run the nginx server and all files should have the most restrictive permissions possible, e.g., as much as possible should be owned by root, directories such as {{ic|/usr/bin}} should be unreadable and unwriteable, etc.<br />
<br />
Arch comes with an {{ic|http}} user and group by default which will run the server. The chroot will be in {{ic|/srv/http}}.<br />
<br />
A perl script to create this jail is available at [https://gist.github.com/4365696 jail.pl gist]. You can either use that or follow the instructions in this article. It expects to be run as root. You will need to uncomment a line before it makes any changes.<br />
<br />
=== Create necessary devices ===<br />
<br />
nginx needs {{ic|/dev/null}}, {{ic|/dev/random}}, and {{ic|/dev/urandom}}. To install these in the chroot create the {{ic|/dev/}} directory and add the devices with ''mknod''. Avoid mounting all of {{ic|/dev/}} to ensure that, even if the chroot is compromised, an attacker must break out of the chroot to access important devices like {{ic|/dev/sda1}}.<br />
<br />
{{Tip|Be sure that {{ic|/srv/http}} is mounted without no-dev option}}<br />
{{Tip|See {{man|1|mknod}} and {{ic|<nowiki>ls -l /dev/{null,random,urandom}</nowiki>}} to better understand the ''mknod'' options.}}<br />
<br />
# export JAIL=/srv/http<br />
# mkdir $JAIL/dev<br />
# mknod -m 0666 $JAIL/dev/null c 1 3<br />
# mknod -m 0666 $JAIL/dev/random c 1 8<br />
# mknod -m 0444 $JAIL/dev/urandom c 1 9<br />
<br />
=== Create necessary directories ===<br />
<br />
nginx requires a bunch of files to run properly. Before copying them over, create the folders to store them. This assumes your nginx document root will be {{ic|/srv/http/www}}.<br />
<br />
# mkdir -p $JAIL/etc/nginx/logs<br />
# mkdir -p $JAIL/usr/{lib,bin}<br />
# mkdir -p $JAIL/usr/share/nginx<br />
# mkdir -p $JAIL/var/{log,lib}/nginx<br />
# mkdir -p $JAIL/www/cgi-bin<br />
# mkdir -p $JAIL/{run,tmp}<br />
# cd $JAIL; ln -s usr/lib lib<br />
<br />
{{Note|If using a 64 bit kernel you will need to create symbolic links {{ic|lib64}} and {{ic|usr/lib64}} to {{ic|usr/lib}}: {{ic|cd $JAIL; ln -s usr/lib lib64}} and {{ic|cd $JAIL/usr; ln -s lib lib64}}.}}<br />
<br />
Then mount {{ic|$JAIL/tmp}} and {{ic|$JAIL/run}} as tmpfs's. The size should be limited to ensure an attacker cannot eat all the RAM.<br />
<br />
# mount -t tmpfs none $JAIL/run -o 'noexec,size=1M'<br />
# mount -t tmpfs none $JAIL/tmp -o 'noexec,size=100M'<br />
<br />
In order to preserve the mounts across reboots, the following entries should be added to {{ic|/etc/fstab}}:<br />
<br />
{{hc|/etc/fstab|<nowiki><br />
tmpfs /srv/http/run tmpfs rw,noexec,relatime,size=1024k 0 0<br />
tmpfs /srv/http/tmp tmpfs rw,noexec,relatime,size=102400k 0 0<br />
</nowiki>}}<br />
<br />
=== Populate the chroot ===<br />
<br />
First copy over the easy files.<br />
<br />
# cp -r /usr/share/nginx/* $JAIL/usr/share/nginx<br />
# cp -r /usr/share/nginx/html/* $JAIL/www<br />
# cp /usr/bin/nginx $JAIL/usr/bin/<br />
# cp -r /var/lib/nginx $JAIL/var/lib/nginx<br />
<br />
Now copy over required libraries. Use ''ldd'' to list them and then copy them all to the correct location. Copying is preferred over hardlinks to ensure that even if an attacker gains write access to the files they cannot destroy or alter the true system files.<br />
<br />
{{hc|$ ldd /usr/bin/nginx|<nowiki><br />
linux-vdso.so.1 (0x00007fffc41fe000)<br />
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f57ec3e8000)<br />
libcrypt.so.1 => /usr/lib/libcrypt.so.1 (0x00007f57ec1b1000)<br />
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f57ebead000)<br />
libm.so.6 => /usr/lib/libm.so.6 (0x00007f57ebbaf000)<br />
libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f57eb94c000)<br />
libssl.so.1.0.0 => /usr/lib/libssl.so.1.0.0 (0x00007f57eb6e0000)<br />
libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0x00007f57eb2d6000)<br />
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f57eb0d2000)<br />
libz.so.1 => /usr/lib/libz.so.1 (0x00007f57eaebc000)<br />
libGeoIP.so.1 => /usr/lib/libGeoIP.so.1 (0x00007f57eac8d000)<br />
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f57eaa77000)<br />
libc.so.6 => /usr/lib/libc.so.6 (0x00007f57ea6ca000)<br />
/lib64/ld-linux-x86-64.so.2 (0x00007f57ec604000)</nowiki>}}<br />
<br />
# cp /lib64/ld-linux-x86-64.so.2 $JAIL/lib<br />
<br />
For files residing in {{ic|/usr/lib}} you may try the following one-liner:<br />
<br />
# cp $(ldd /usr/bin/nginx | grep /usr/lib | sed -sre 's/(.+)(\/usr\/lib\/\S+).+/\2/g') $JAIL/usr/lib<br />
<br />
{{Note|Do not try to copy {{ic|linux-vdso.so}}: it is not a real library and does not exist in {{ic|/usr/lib}}. Also {{ic|ld-linux-x86-64.so}} will likely be listed in {{ic|/lib64}} for a 64 bit system.}}<br />
<br />
Copy over some miscellaneous but necessary libraries and system files.<br />
<br />
# cp /usr/lib/libnss_* $JAIL/usr/lib<br />
# cp -rfvL /etc/{services,localtime,nsswitch.conf,nscd.conf,protocols,hosts,ld.so.cache,ld.so.conf,resolv.conf,host.conf,nginx} $JAIL/etc<br />
<br />
Create restricted user/group files for the chroot. This way only the users needed for the chroot to function exist as far as the chroot knows, and none of the system users/groups are leaked to attackers should they gain access to the chroot.<br />
<br />
{{hc|$JAIL/etc/group|<br />
http:x:33:<br />
nobody:x:99:<br />
}}<br />
<br />
{{hc|$JAIL/etc/passwd|<br />
http:x:33:33:http:/:/bin/false<br />
nobody:x:99:99:nobody:/:/bin/false<br />
}}<br />
<br />
{{hc|$JAIL/etc/shadow|<br />
http:x:14871::::::<br />
nobody:x:14871::::::<br />
}}<br />
<br />
{{hc|$JAIL/etc/gshadow|<br />
http:::<br />
nobody:::<br />
}}<br />
<br />
# touch $JAIL/etc/shells<br />
# touch $JAIL/run/nginx.pid<br />
<br />
Finally make set very restrictive permissions. As much as possible should be owned by root and set unwritable.<br />
<br />
# chown -R root:root $JAIL/<br />
<br />
# chown -R http:http $JAIL/www<br />
# chown -R http:http $JAIL/etc/nginx<br />
# chown -R http:http $JAIL/var/{log,lib}/nginx<br />
# chown http:http $JAIL/run/nginx.pid<br />
<br />
# find $JAIL/ -gid 0 -uid 0 -type d -print | xargs chmod -rw<br />
# find $JAIL/ -gid 0 -uid 0 -type d -print | xargs chmod +x<br />
# find $JAIL/etc -gid 0 -uid 0 -type f -print | xargs chmod -x<br />
# find $JAIL/usr/bin -type f -print | xargs chmod ug+rx<br />
# find $JAIL/ -group http -user http -print | xargs chmod o-rwx<br />
# chmod +rw $JAIL/tmp<br />
# chmod +rw $JAIL/run<br />
<br />
If your server will bind port 80 (or any other port in range [1-1023]), give the chrooted executable permission to bind these ports without root.<br />
<br />
# setcap 'cap_net_bind_service=+ep' $JAIL/usr/bin/nginx<br />
<br />
=== Modify nginx.service to start chroot ===<br />
<br />
Before modifying the {{ic|nginx.service}} unit file, it may be a good idea to copy it to {{ic|/etc/systemd/system/}} since the unit files there take priority over those in {{ic|/usr/lib/systemd/system/}}. This means upgrading nginx would not modify your custom ''.service'' file.<br />
<br />
# cp /usr/lib/systemd/system/nginx.service /etc/systemd/system/nginx.service<br />
<br />
The systemd unit must be changed to start up nginx in the chroot, as the http user, and store the pid file in the chroot.<br />
<br />
{{Note|I'm not sure if the pid file needs to be stored in the chroot jail.}}<br />
<br />
{{hc|/etc/systemd/system/nginx.service|<nowiki><br />
[Unit]<br />
Description=A high performance web server and a reverse proxy server<br />
After=syslog.target network.target<br />
<br />
[Service]<br />
Type=forking<br />
PIDFile=/srv/http/run/nginx.pid<br />
ExecStartPre=/usr/bin/chroot --userspec=http:http /srv/http /usr/bin/nginx -t -q -g 'pid /run/nginx.pid; daemon on; master_process on;'<br />
ExecStart=/usr/bin/chroot --userspec=http:http /srv/http /usr/bin/nginx -g 'pid /run/nginx.pid; daemon on; master_process on;'<br />
ExecReload=/usr/bin/chroot --userspec=http:http /srv/http /usr/bin/nginx -g 'pid /run/nginx.pid; daemon on; master_process on;' -s reload<br />
ExecStop=/usr/bin/chroot --userspec=http:http /srv/http /usr/bin/nginx -g 'pid /run/nginx.pid;' -s quit<br />
<br />
[Install]<br />
WantedBy=multi-user.target</nowiki>}}<br />
<br />
{{Note|Upgrading nginx with pacman will not upgrade the chrooted nginx installation. You have to take care of the updates manually by repeating some of the steps above. Do not forget to also update the libraries it links against.}}<br />
<br />
You can now safely get rid of the non-chrooted nginx installation.<br />
<br />
# pacman -Rsc nginx<br />
<br />
If you do not remove the non-chrooted nginx installation, you may want to make sure that the running nginx process is in fact the chrooted one. You can do so by checking where {{ic|/proc/''PID''/root}} symmlinks to. If should link to {{ic|/srv/http}} instead of {{ic|/}}.<br />
<br />
# ps -C nginx | awk '{print $1}' | sed 1d | while read -r PID; do ls -l /proc/$PID/root; done<br />
<br />
== Tips and tricks ==<br />
<br />
=== Running unprivileged using [[systemd]] ===<br />
<br />
[[systemd#Editing_provided_units|Edit nginx.service]] and set the {{ic|User}} and optionally {{ic|Group}} options under {{ic|[Service]}}:<br />
{{hc|/etc/systemd/system/nginx.service.d/user.conf|2=<br />
[Service]<br />
User=''user''<br />
Group=''group''<br />
}}<br />
<br />
We can harden the service against ever elevating privileges:<br />
{{hc|/etc/systemd/system/nginx.service.d/user.conf|2=<br />
[Service]<br />
...<br />
NoNewPrivileges=yes<br />
}}<br />
<br />
{{Tip|1=See [http://www.freedesktop.org/software/systemd/man/systemd.exec.html#User= systemd.exec(5)] for more options of confinement.}}<br />
<br />
Then we need to ensure that {{ic|''user''}} has access to everything it needs:<br />
<br />
<dl><br />
<dt>Port</dt><br />
<dd><br />
Linux does not permit non-{{ic|root}} processes to bind to ports below 1024 by default. A port above 1024 can be used:<br />
<br />
{{hc|/etc/nginx/nginx.conf|<br />
server {<br />
listen 8080;<br />
}<br />
}}<br />
<br />
{{Tip|1=If you want nginx accessible on port 80 or 443, configure your [[firewall]] to redirect requests from 80 or 443 to the ports nginx listens to.}}<br />
</dd><br />
<dd><br />
Or you may grant the nginx process the CAP_NET_BIND_SERVICE capability which will allow it to bind to ports below 1024:<br />
<br />
{{hc|/etc/systemd/system/nginx.service.d/user.conf|2=<br />
[Service]<br />
...<br />
CapabilityBoundingSet=<br />
CapabilityBoundingSet=CAP_NET_BIND_SERVICE<br />
AmbientCapabilities=<br />
AmbientCapabilities=CAP_NET_BIND_SERVICE<br />
}}<br />
</dd><br />
<br />
<dt>PID file</dt><br />
<dd><br />
{{Pkg|nginx}} uses {{ic|/run/nginx.pid}} by default. We can create a directory that ''user'' has write access to and place our PID file in there. An example using [[systemd#Temporary_files|systemd-tmpfiles]]:<br />
<br />
{{hc|/etc/tmpfiles.d/nginx.conf|2=<br />
d /run/nginx 0775 root ''group'' - -<br />
}}<br />
<br />
Run the configuration:<br />
<br />
# systemd-tmpfiles --create<br />
<br />
[[systemd#Editing_provided_units|Edit nginx.service]]:<br />
<br />
{{hc|/etc/systemd/system/nginx.service.d/user.conf|2=<br />
[Service]<br />
...<br />
PIDFile=/run/nginx/nginx.pid<br />
ExecStart=<br />
ExecStart=/usr/bin/nginx -g 'pid /run/nginx/nginx.pid; error_log stderr;' # copied from nginx.service<br />
ExecReload=<br />
ExecReload=/usr/bin/nginx -s reload -g 'pid /run/nginx/nginx.pid;'<br />
}}<br />
</dd><br />
<br />
<dt>{{ic|/var/lib/nginx/*}}</dt><br />
<dd><br />
Some directories under {{ic|/var/lib/nginx}} need to be bootstrapped by nginx running as {{ic|root}}. It is not necessary to start the whole server to do that, nginx will do it on a simple [[#Configuration_validation|configuration test]]. So just run one of those and you're good to go.<br />
</dd><br />
<br />
<dt>Log file & Directory Permissions</dt><br />
<dd><br />
The step of running a configuration test will create a dangling {{ic|root}}-owned log. Remove logs in {{ic|/var/log/nginx}} to start fresh.<br />
<dd> <br />
The nginx service user needs write permission to {{ic|/var/log/nginx}}. This may require [[File_permissions_and_attributes#Changing_permissions|changing permission]] and/or ownership of this directory on your system. <br />
</dl><br />
<br />
Now we should be good to go. Go ahead and [[start]] nginx, and enjoy your completely rootless nginx.<br />
<br />
{{Tip|The same setup may be desirable for your [[#FastCGI|FastCGI server]] as well.}}<br />
<br />
=== Alternative script for systemd ===<br />
<br />
On pure systemd you can get advantages of chroot + systemd. [http://0pointer.de/blog/projects/changing-roots.html] Based on set [http://wiki.nginx.org/CoreModule#user user group] an pid on:<br />
<br />
{{hc|/etc/nginx/nginx.conf|2=<br />
user http;<br />
pid /run/nginx.pid;<br />
}}<br />
<br />
the absolute path of file is {{ic|/srv/http/etc/nginx/nginx.conf}}.<br />
<br />
{{hc|/etc/systemd/system/nginx.service|2=<br />
[Unit]<br />
Description=nginx (Chroot)<br />
After=syslog.target network.target<br />
<br />
[Service]<br />
Type=forking<br />
PIDFile=/srv/http/run/nginx.pid<br />
RootDirectory=/srv/http<br />
ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf<br />
ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf<br />
ExecReload=/usr/sbin/nginx -c /etc/nginx/nginx.conf -s reload<br />
ExecStop=/usr/sbin/nginx -c /etc/nginx/nginx.conf -s stop<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
It is not necesary to set the default location, nginx loads at default {{ic| -c /etc/nginx/nginx.conf}}, but it is a good idea though.<br />
<br />
Alternatively you can run '''only''' {{ic|ExecStart}} as chroot with parameter {{ic|RootDirectoryStartOnly}} set as {{ic|yes}} [http://www.freedesktop.org/software/systemd/man/systemd.service.html man systemd service] or start it before mount point as effective or a [http://www.freedesktop.org/software/systemd/man/systemd.path.html systemd path] is available.<br />
<br />
{{hc|/etc/systemd/system/nginx.path|2=<br />
[Unit]<br />
Description=nginx (Chroot) path<br />
[Path]<br />
PathExists=/srv/http/site/Public_html<br />
[Install]<br />
WantedBy=default.target<br />
}}<br />
<br />
[[Enable]] the created {{ic|nginx.path}} and change the {{ic|1=WantedBy=default.target}} to {{ic|1=WantedBy=nginx.path}} in {{ic|/etc/systemd/system/nginx.service}}.<br />
<br />
The {{ic|PIDFile}} in unit file allows systemd to monitor process (absolute path required). If it is undesired, you can change to default one-shot type, and delete the reference from the unit file.<br />
<br />
=== Nginx Beautifier ===<br />
<br />
{{AUR|nginxbeautifier}} is a commandline tool used to beautify and format nginx configuration files.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Configuration validation ===<br />
<br />
# nginx -t<br />
<br />
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok<br />
nginx: configuration file /etc/nginx/nginx.conf test is successful<br />
<br />
=== Accessing local IP redirects to localhost ===<br />
<br />
Solution from the Arch Linux [https://bbs.archlinux.org/viewtopic.php?pid=780561#p780561 forum].<br />
<br />
In {{ic|/etc/nginx/nginx.conf}} locate the {{ic|server_name localhost}} line without a {{ic|#}} in front of it, and add below:<br />
<br />
server_name_in_redirect off;<br />
<br />
Default behavior is that nginx redirects any requests to the value given as {{ic|server_name}} in the config.<br />
<br />
=== Error: The page you are looking for is temporarily unavailable. Please try again later. (502 Bad Gateway) ===<br />
<br />
This is because the FastCGI server has not been started, or the socket used has wrong permissions.<br />
<br />
Try [https://stackoverflow.com/questions/4252368/nginx-502-bad-gateway/16497957#16497957 out this answer] to fix the 502 error.<br />
<br />
In Archlinux, the configuration file mentioned in above link is {{ic|/etc/php/php-fpm.conf}}.<br />
<br />
=== Error: No input file specified ===<br />
<br />
1. Verify that variable {{ic|open_basedir}} in {{ic|/etc/php/php.ini}} contains the correct path specified as {{ic|root}} argument in {{ic|nginx.conf}} (usually {{ic|/usr/share/nginx/}}). When using [http://php-fpm.org/ PHP-FPM] as FastCGI server for PHP, you may add {{ic|<nowiki>fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/"</nowiki>;}} in the {{ic|location}} block which aims for processing php file in {{ic|nginx.conf}}.<br />
<br />
2. Another occasion is that, wrong {{ic|root}} argument in the {{ic|location ~ \.php$}} section in {{ic|nginx.conf}}. Make sure the {{ic|root}} points to the same directory as it in {{ic|location /}} in the same server. Or you may just set root as global, do not define it in any location section.<br />
<br />
3. Check permissions: e.g. {{ic|http}} for user/group, {{ic|755}} for directories and {{ic|644}} for files. Remember the entire path to the {{ic|html}} directory should have the correct permissions. See [[File permissions and attributes#Bulk chmod]] to bulk modify a directory tree. <br />
<br />
4. You do not have the {{ic|SCRIPT_FILENAME}} containing the full path to your scripts. If the configuration of nginx ({{ic|fastcgi_param SCRIPT_FILENAME}}) is correct, this kind of error means php failed to load the requested script. Usually it is simply a permissions issue, you can just run php-cgi as root:<br />
<br />
# spawn-fcgi -a 127.0.0.1 -p 9000 -f /usr/bin/php-cgi<br />
<br />
or you should create a group and user to start the php-cgi:<br />
<br />
# groupadd www<br />
# useradd -g www www<br />
# chmod +w /srv/www/nginx/html<br />
# chown -R www:www /srv/www/nginx/html<br />
# spawn-fcgi -a 127.0.0.1 -p 9000 -u www -g www -f /usr/bin/php-cgi<br />
<br />
5. If you are running php-fpm with chrooted nginx ensure {{ic|chroot}} is set correctly within {{ic|/etc/php-fpm/php-fpm.d/www.conf}} (or {{ic|/etc/php-fpm/php-fpm.conf}} if working on older version)<br />
<br />
== See also ==<br />
<br />
* [https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/ nginx configuration pitfalls]<br />
* [https://calomel.org/nginx.html Very good in-depth 2014 look at nginx security and Reverse Proxying]<br />
* [http://www.tecmint.com/install-nginx-php-mysql-with-mariadb-engine-and-phpmyadmin-in-arch-linux/ Installing LEMP (nginx, PHP, MySQL with MariaDB engine and PhpMyAdmin) in Arch Linux]<br />
* [[Let’s Encrypt|Using SSL certificates generated with Let's Encrypt]]</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Talk:Xfce&diff=468610Talk:Xfce2017-02-20T01:16:45Z<p>Cilyan: Volume Keyboard Shortcut: answer questions from main page</p>
<hr />
<div>== Lock screen on suspend ==<br />
<br />
[[Xfce#Lock the screen]] gives an introduction to screen locking, but I can't get it to work with xfce4-power-manager on resuming from suspend. I've found little on this [https://bbs.archlinux.org/viewtopic.php?id=180985] [https://www.reddit.com/r/archlinux/comments/2eyt80/xfce_slock_not_locking_screen_when_suspending/] and an old bug for Xfce 4.8. [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=738124]. Locking via {{ic|Ctrl+Alt+L}} works as expected (slock). Can others reproduce, and if yes, should I investigate further and file a bug upstream? Perhaps this could be related to the light-locker transition (where I use [[xinitrc]]). -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 10:52, 13 July 2015 (UTC)<br />
: This functionality works fine for me but I use {{Pkg|gnome-screensaver}}. This might be an issue for specific screen lockers as opposed to a general Xfce issue. I notice that there is an alternative "lock screen before sleep" option under ''Applications'' -> ''Settings'' -> ''Session and Startup'' -> ''Advanced''. Perhaps that works where the xfpm option does not? -- [[User:Chazza|Chazza]] ([[User talk:Chazza|talk]]) 11:05, 13 July 2015 (UTC)<br />
<br />
::Indeed, it works with gnome-screensaver. It even uses gnome-screensaver when I symlink slock in /usr/local/bin to xflock4 (though the shortcut and menu do respect xflock4). Looking through the source, xfpm is supposed to use xflock4 though [http://git.xfce.org/xfce/xfce4-power-manager/tree/common/xfpm-common.c#n58], so not sure what's happening here. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 06:04, 14 July 2015 (UTC)<br />
<br />
:::It's worth taking a look at what xflock4 is actually doing here - it's just a shell script. As can be seen from the first for loop, it will try to execute {{ic|xscreensaver-command -lock}} and {{ic|gnome-screensaver-command --lock}} in that order and it will exit. Only if neither of those can be executed will it move on to deal with xclock and slock. So xfpm's behaviour is correct here.<br />
:::Edit: Whoops, misread. Yes I see the problem here, the symlink isn't being respected. Not sure why that would be the case.<br />
:::Edit2: The lock screen panel action button first tries to find the program in path before executing.[http://git.xfce.org/xfce/xfce4-panel/tree/plugins/actions/actions.c#n868] The power manager doesn't. That's probably the source of the inconsistency. -- [[User:Chazza|Chazza]] ([[User talk:Chazza|talk]]) 08:01, 14 July 2015 (UTC)<br />
<br />
::::No activity since mid July - was a decision reached on this? -- [[User:Chazza|Chazza]] ([[User talk:Chazza|talk]]) 16:34, 17 September 2015 (UTC)<br />
<br />
:::::I couldn't get this working outside gnome-screensaver/x-screensaver, even when putting a symbolic link directly in /usr/bin, but I'm afraid I didn't get the chance to contact upstream yet. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 11:16, 19 September 2015 (UTC)<br />
<br />
<br />
== XFCE and GTK3 Theme ==<br />
<br />
My edit [https://wiki.archlinux.org/index.php?title=Xfce&diff=prev&oldid=467430] for the section [[Xfce#Theming]] was removed without clearly explaining why, with the comment "not sure where this was copied from, but copying a theme-specific .css file to .config has no impact, in particular not to use the 'same theme colors as the rest (?) of XFCE'. cf [https://blogs.gnome.org/mclasen/2014/05/06/tweaking-a-the-gtk-theme-using-css/]". This link does not address the same issue at all. To answer "where this was copied from", the commands comes from here: [https://bbs.archlinux.org/viewtopic.php?id=119251].<br />
<br />
This fix enabled me to have a dark Adwita theme with dark colors in GTK3 apps, such as Firefox or the XFCE Terminal Emulator, in different Arch installations. Even though I didn't delve in the details to know how this fix work, the thing is that it works, and is needed. Maybe a better fix exists, but it's not documented on the wiki. This picture illustrates the fix: [http://hpics.li/0591d91].<br />
<br />
Could you, [[User:Alad|Alad]], explain to me why you think it has "no impact", as it solved my issue ? -- [[User:Jeatra|Jeatra]] ([[User talk:Jeatra|talk]]) 13:07, 2 February 2017 (UTC)<br />
<br />
:Adwaita has light and dark variants. If you look at the file {{ic|/usr/share/themes/Adwaita/gtk-3.0/gtk.css}} you'll see that it contains a line for importing the Adwaita dark theme resource. So by copying that css file to your home directory you're effectively forcing the dark Adwaita variant as theme files in the home directory take precedence over the global ones. So what you did does work though it's not the cleanest solution. Does [[GTK+#Dark_theme_variant|this]] accomplish the same thing? -- [[User:Chazza|Chazza]] ([[User talk:Chazza|talk]]) 13:58, 2 February 2017 (UTC)<br />
<br />
::[[GTK+#Dark_theme_variant|This]] does nothing on my system. However, with further tests, I found that just copying (or linking) {{ic|/usr/share/themes/Adwaita/gtk-3.0/gtk.css}} into {{ic|~/.config/gtk-3.0/}} corrects the theme. This file contains only the line {{ic|@import url("resource:///org/gtk/libgtk/theme/Adwaita/gtk-contained-dark.css");}}. Why is that needed? Did I miss a configuration step (which one)?<br />
<br />
::I agree that my suggested fix is not a good fix as this force gtk3 applications to use the dark colors instead of the settings configured in ''Settings > Appearance'' or via {{ic|lxappearance}}. So I'm still looking for a good one, do you have any pointers or ideas? -- [[User:Jeatra|Jeatra]] ([[User talk:Jeatra|talk]]) 14:28, 2 February 2017 (UTC)<br />
<br />
:::<s>As I understand it, adding a gtk.css file to {{ic|~/.config/gtk-3.0/'''''theme-name'''''}} affects the theme called theme-name.</s> (misread, I was thinking of {{ic|~/.themes}}) Adding a gtk.css file to {{ic|~/.config/gtk-3.0/}} affects all themes. So of the two solutions, I'd say the original is cleaner actually. I'm not really a fan of either solution though. <br />
:::In terms of what that line is doing, @import is a css statement which says, import the rules from the resource specified. The resource in question is {{ic|gtk-contained-dark.css}} which is provided with GTK+ 3 and contains the rules for the Adwaita dark theme. So what you're doing is forcing the rules of the Adwaita light theme to be overridden by the rules of the Adwaita dark theme.<br />
:::Are you certain that you cannot select the Adwaita dark theme from Settings -> Appearance in Xfce? In MATE, you can {{ic|Adwaita-dark}} is listed as an option and it works fine. If the Adwaita dark theme cannot be applied from within the Xfce GUI then I would regard that as an Xfce bug that should be filed upstream. -- [[User:Chazza|Chazza]] ([[User talk:Chazza|talk]]) 15:23, 2 February 2017 (UTC)<br />
<br />
::::I can select the Adwaita dark theme from ''Settings -> Appearance'' in Xfce, or using the LXDE application {{ic|lxappearance}}, however this does not impact gtk3 applications. I did not try with the Gnome or MATE tools. -- [[User:Jeatra|Jeatra]] ([[User talk:Jeatra|talk]]) 16:45, 2 February 2017 (UTC)<br />
<br />
:::::Tested again using MATE and you're right. Adwaita-dark is GTK+ 2 only and setting {{ic|gtk-application-prefer-dark-theme &#61; true}} in {{ic|~/.config/gtk-3.0/settings.ini}} does not work. So this isn't Xfce specific The only trouble with creating {{ic|~/.config/gtk-3.0/settings.ini}} is that users won't be able to change the theme for GTK+ 3 applications until that file is removed. I think the best approach might be to expand [[GTK+#Dark theme variant]], adding the solution you suggested and making a note of the fact that the {{ic|gtk-application-prefer-dark-theme}} doesn't appear to work. -- [[User:Chazza|Chazza]] ([[User talk:Chazza|talk]]) 10:29, 3 February 2017 (UTC)<br />
<br />
<br />
== Volume Keyboard Shortcut ==<br />
<br />
xfce4-mixer is still maintained, but it is not packaged. Not sure why, but maybe the problem is that it rely on a feature of GStreamer 0.10 which is not available in GStreamer 1.0 and as such the devs decided to drop it? xfce4-volumed is clearly abandoned. And to answer that long standing question: no, it did not rely on xfce4-mixer itself, but on the same GStreamer interface as xfce4-mixer. As this interface is going to be removed, the support for xfce4-volumed was stopped 2 years ago. --[[User:Cilyan|Cilyan]] ([[User talk:Cilyan|talk]]) 01:14, 20 February 2017 (UTC)</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Xfce&diff=468608Xfce2017-02-20T01:10:01Z<p>Cilyan: /* Keyboard volume buttons */ Try to freshen the information there</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[cs:Xfce]]<br />
[[de:Xfce]]<br />
[[es:Xfce]]<br />
[[fa:Xfce]]<br />
[[fr:Xfce]]<br />
[[it:Xfce]]<br />
[[ja:Xfce]]<br />
[[pl:Xfce]]<br />
[[ru:Xfce]]<br />
[[tr:Xfce Masaüstü Ortamı]]<br />
[[uk:Xfce]]<br />
[[zh-hans:Xfce]]<br />
[[ko:Xfce]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Window manager}}<br />
{{Related|Xfwm}}<br />
{{Related|Thunar}}<br />
{{Related|LXDE}}<br />
{{Related|GNOME}}<br />
{{Related articles end}}<br />
<br />
[http://www.xfce.org Xfce] is a lightweight and modular [[Desktop environment]] currently based on GTK+ 2. To provide a complete user experience, it includes a window manager, a file manager, desktop and panel.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Grp|xfce4}} group. You may also wish to install the {{Grp|xfce4-goodies}} group which includes extra plugins and a number of useful utilities such as the {{Pkg|mousepad}} editor. Xfce uses the [[Xfwm]] window manager by default.<br />
<br />
== Starting Xfce ==<br />
<br />
Choose ''Xfce Session'' from the menu in a [[display manager]] of choice, or add {{ic|exec startxfce4}} to [[Xinitrc]].<br />
<br />
{{Note|Do not call the {{ic|xfce4-session}} executable directly; {{ic|startxfce4}} is the correct command which, in turn, calls the former when appropriate.}}<br />
<br />
== Configuration ==<br />
<br />
Xfce stores configuration options in [http://docs.xfce.org/xfce/xfconf/start Xfconf]. There are several ways to modify these options:<br />
<br />
* In the main menu, select [http://docs.xfce.org/xfce/xfce4-settings/start Settings] and the category you want to customize. Categories are programs usually located in {{ic|/usr/bin/xfce4-*}} and {{ic|/usr/bin/xfdesktop-settings}}.<br />
* {{ic|xfce4-settings-editor}} can see and modify all settings. Options modified here will take effect immediately. Use {{ic|xfconf-query}} to change settings from the commandline; see [http://docs.xfce.org/xfce/xfconf/xfconf-query the documentation] for details.<br />
* Settings are stored in XML files in {{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/}} which can be edited by hand. However, changes made here will ''not'' take effect immediately.<br />
<br />
=== Menu ===<br />
<br />
==== Whisker menu ====<br />
<br />
{{Pkg|xfce4-whiskermenu-plugin}} (also included in {{Grp|xfce4-goodies}}) is an alternate application launcher. It shows a list of favorites, browses through all installed applications through category buttons, and supports fuzzy searching. After package being installed, it can replace 'Applications Menu' as first item in Panel 1 (in 'Settings/Panel/Items' add 'Whisker Menu'...).<br />
<br />
==== Edit entries ====<br />
<br />
A number of graphical tools are available for this task:<br />
<br />
* {{App|XAME|GUI tool written in Gambas designed specifically for editing menu entries in Xfce, it will not work in other environments. (Discontinued)|http://www.redsquirrel87.com/XAME.php|{{AUR|xame}}}}<br />
* {{App|MenuLibre|An advanced menu editor that provides modern features in a clean, easy-to-use interface.|https://launchpad.net/menulibre|{{AUR|menulibre}}}}.<br />
* {{App|Alacarte|Menu editor for GNOME|http://www.gnome.org/|{{Pkg|alacarte}}}}<br />
<br />
Alternatively, create the file {{ic|~/.config/menus/xfce-applications.menu}} manually. See the example configuration below:<br />
<br />
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"<br />
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"><br />
<br />
<Menu><br />
<Name>Xfce</Name><br />
<MergeFile type="parent">/etc/xdg/menus/xfce-applications.menu</MergeFile><br />
<br />
<Exclude><br />
<Filename>xfce4-run.desktop</Filename><br />
<Filename>exo-terminal-emulator.desktop</Filename><br />
<Filename>exo-file-manager.desktop</Filename><br />
<Filename>exo-mail-reader.desktop</Filename><br />
<Filename>exo-web-browser.desktop</Filename><br />
<Filename>xfce4-about.desktop</Filename><br />
<Filename>xfhelp4.desktop</Filename><br />
</Exclude><br />
<br />
<Layout><br />
<Merge type="all"/><br />
<Separator/><br />
<Menuname>Settings</Menuname><br />
<Separator/><br />
<Filename>xfce4-session-logout.desktop</Filename><br />
</Layout><br />
</Menu><br />
<br />
The {{ic|<MergeFile>}} tag includes the default Xfce menu.<br />
<br />
The {{ic|<Exclude>}} tag excludes applications which we do not want to appear in the menu. Here we excluded some Xfce default shortcuts, but you can exclude {{ic|firefox.desktop}} or any other application.<br />
<br />
The {{ic|<Layout>}} tag defines the layout of the menu. The applications can be organized in folders or however we wish. For more details see the [http://wiki.xfce.org/howto/customize-menu Xfce wiki].<br />
<br />
You can also make changes to the Xfce menu by editing the {{ic|.desktop}} files themselves. To hide entries, see [[Desktop entries#Hide desktop entries]]. You can edit the application's category by modifying the {{ic|1=Categories=}} line of the desktop entry, see [[Desktop entries#File example]].<br />
<br />
=== Desktop ===<br />
<br />
==== Transparent background for icon titles ====<br />
<br />
To change the default white background of desktop icon titles to something more suitable, create or edit {{ic|~/.gtkrc-2.0}}:<br />
<br />
{{bc|<nowiki><br />
style "xfdesktop-icon-view" {<br />
XfdesktopIconView::label-alpha = 10<br />
base[NORMAL] = "#000000"<br />
base[SELECTED] = "#71B9FF"<br />
base[ACTIVE] = "#71B9FF"<br />
fg[NORMAL] = "#fcfcfc"<br />
fg[SELECTED] = "#ffffff"<br />
fg[ACTIVE] = "#ffffff"<br />
}<br />
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"<br />
</nowiki>}}<br />
<br />
==== Remove Thunar options from right-click menu ====<br />
<br />
Issue the following command:<br />
<br />
$ xfconf-query -c xfce4-desktop -v --create -p /desktop-icons/style -t int -s 0<br />
<br />
==== One wallpaper across multihead ====<br />
<br />
Open {{ic|xfce4-settings-editor}} and create a new property with the following settings:<br />
<br />
Property: /backdrop/screen0/xinerama-stretch<br />
Type: Boolean<br />
Value: TRUE|1|Enabled<br />
<br />
==== Kill window shortcut ====<br />
<br />
Xfce does not have a shortcut to kill a window, for example when a program freezes.<br />
<br />
With {{Pkg|xorg-xkill}}, use {{ic|xkill}} to interactively kill a window. For the currently active window, use {{Pkg|xdotool}}:<br />
<br />
$ xdotool getwindowfocus windowkill<br />
<br />
Alternatively:<br />
<br />
$ xkill -id "$(xprop -root -notype | sed -n '/^_NET_ACTIVE_WINDOW/ s/^.*# *\|\,.*$//g p')"<br />
<br />
To add the shortcut, use ''Settings > Keyboard'' or an application like {{pkg|xbindkeys}}.<br />
<br />
=== Session ===<br />
<br />
==== Startup applications ====<br />
<br />
To launch custom applications when Xfce starts up, click the ''Applications Menu > Settings > Settings Manager'' and then choose the ''Session and Startup'' option and click the tab ''Application Autostart''.<br />
You will see a list of programs that get launched on startup. To add an entry, click the ''Add'' button and fill out the form, specifying the path to an executable you want to run.<br />
<br />
Alternatively, add the commands you wish to run (including setting environment variables) to [[xinitrc]] (or [[xprofile]] when a [[display manager]] is being used).<br />
<br />
===== Delay application startup =====<br />
<br />
Sometimes it might be useful to delay the startup of an application. Specifying a command such as {{ic|sleep 3 && command}} under ''Application Autostart'' does not work. As a workaround, one can use the following syntax instead:<br />
<br />
sh -c "sleep 3 && command"<br />
<br />
==== Lock the screen ====<br />
<br />
To lock an Xfce4 session through the ''xflock4'' script one of {{Pkg|xscreensaver}}, {{Pkg|gnome-screensaver}}, {{Pkg|slock}} or {{Pkg|xlockmore}} packages needs to be installed. <br />
Alternatively you can set a lock command with<br />
<br />
$ xfconf-query -c xfce4-session -p /general/LockCommand -s "light-locker-command -l" --create -t string''<br />
<br />
If you want to update the command, you can use <br />
<br />
$ xfconf-query -c xfce4-session -p /general/LockCommand -s "light-locker-command -l"<br />
<br />
See [[List of applications/Security#Screen lockers]] for a comprehensive list of screen lockers.<br />
<br />
{{Tip|The {{Pkg|light-locker}} session locker integrates with {{Pkg|xfce4-power-manager}}. If light-locker is installed, a ''Security'' tab is added to the power manager settings and the existing ''Lock screen when system is going for sleep'' setting is relocated under the ''Security'' tab.}}<br />
<br />
==== User switching ====<br />
<br />
Xfce4 has support for user switching when used with a [[Display manager]] that has this functionality - examples being [[LightDM]] and [[GDM]]. Please consult your display manager's wiki page for more information. When you have a display manager installed and configured correctly you can switch users from the 'action buttons' menu item in the panel.<br />
<br />
{{Style|1=This is a [https://bugzilla.xfce.org/show_bug.cgi?id=9307 Xfce bug], so it makes little sense to keep the workaround on 3 pages.}}<br />
<br />
For the User Switch action button to work without GDM, a workaround is required:<br />
* For LXDM - [[LXDM#Simultaneous users and switching users]].<br />
* For LightDM - [[LightDM#User switching under Xfce4]].<br />
<br />
==== Disable saved sessions ====<br />
<br />
Per user, saved sessions can be disabled by executing the following:<br />
$ xfconf-query -t bool -c xfce4-session -p /general/SaveOnExit -s false<br />
Then navigate to ''Applications'' -> ''Settings'' -> ''Session and Startup'' -> ''Sessions'' and click the ''Clear saved sessions'' button.<br />
<br />
{{Tip|If the command above does not change the setting persistently, use the following command instead: {{ic|xfconf-query -c xfce4-session -p /general/SaveOnExit -n -t bool -s false}}}}<br />
<br />
Alternatively, Xfce [https://wiki.xfce.org/howto/kiosk_mode kiosk mode] can be used to disable the saving of sessions systemwide. To disable sessions, create or edit the file {{ic|/etc/xdg/xfce4/kiosk/kioskrc}} and add the following:<br />
<br />
[xfce4-session]<br />
SaveSession=NONE<br />
<br />
If kiosk mode is not working, the user can set read only permissions for the sessions directory:<br />
<br />
$ rm ~/.cache/sessions/* && chmod 500 ~/.cache/sessions<br />
<br />
This will prevent Xfce from saving any sessions despite any configuration that specifies otherwise.<br />
<br />
==== Default window manager ====<br />
<br />
{{Note|For the changes to take effect, you will need to clear the saved sessions and ensure that session saving is disabled when logging out for the first time. Once the window manager of choice is running, session saving can be enabled again.}}<br />
<br />
The files specifying the default window manager are found in the following locations:<br />
*{{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml}} - per user<br />
*{{ic|/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml}} - systemwide<br />
<br />
The default window manager for the user can be set easily using ''xfconf-query'':<br />
$ xfconf-query -c xfce4-session -p /sessions/Failsafe/Client0_Command -t string -sa '''wm_name'''<br />
<br />
If you want to start the window manager with command line options, see the command below:<br />
$ xfconf-query -c xfce4-session -p /sessions/Failsafe/Client0_Command -t string -t string -s '''wm_name''' -s '''--wm-option'''<br />
If you need more command line options, simply add more {{ic|-t string}} and {{ic|-s '''--wm-option'''}} arguments to the command.<br />
<br />
If you want to change the default window manager systemwide, edit the file specified above manually, changing ''xfwm4'' to the preferred window manager and adding more {{ic|1=<value type="string" value="'''--wm-option'''"/>}} lines for extra command line options if needed.<br />
<br />
You can also change the window manager by autostarting {{ic|'''wm_name''' --replace}} using the autostart facility or by running {{ic|'''wm_name''' --replace &}} in a terminal and making sure the session is saved on logout. Be aware though that this method does not truly change the default manager, it merely replaces it at login. Note that if you are using the autostart facility, you should disable saved sessions as this could lead to the new window manager being started twice after the default window manager.<br />
<br />
=== Theming ===<br />
<br />
XFCE themes are available at [http://www.xfce-look.org xfce-look.org]. ''Xfwm'' themes are stored in {{ic|/usr/share/themes/xfce4}}, and set in ''Settings > Window Manager''. [[GTK+]] themes are set in ''Settings > Appearance''.<br />
<br />
To achieve a uniform look for all applications, see [[Uniform look for Qt and GTK applications]].<br />
<br />
See also [[Cursor themes]], [[Icons]], and [[Font configuration]].<br />
<br />
=== Sound ===<br />
<br />
==== Keyboard volume buttons ====<br />
<br />
{{Pkg|xfce4-pulseaudio-plugin}} provides a panel applet which has support for keyboard volume control and volume notifications. As an alternative, you can install {{AUR|xfce4-volumed-pulse}}, which also provides keybinding and notification control, but without an icon sitting in the panel. This is handy, for example, when using {{AUR|pasystray}} at the same time for a finer control.<br />
<br />
Alternatively, [https://git.xfce.org/apps/xfce4-mixer/ xfce4-mixer] also provides a panel applet and keyboard shortcuts which supports Alsa as well. Note however, that it is based on a feature of GStreamer 0.10 which has been abandoned in 1.0.<br />
<br />
For non desktop environment specific alternatives, see [[List of applications#Volume managers]].<br />
<br />
===== Shortcuts =====<br />
<br />
If you are not using an applet or daemon that controls the volume keys, you can map volume control commands to your volume keys manually using Xfce's keyboard settings. For the sound system you are using, see the sections linked to below for the appropriate commands.<br />
*ALSA: see [[Advanced Linux Sound Architecture#Keyboard volume control]].<br />
*PulseAudio: see [[PulseAudio#Keyboard volume control]]<br />
*OSS: see [[OSS#Using multimedia keys with OSS]].<br />
<br />
=== Keyboard Shortcuts ===<br />
<br />
Keyboard shortcuts are defined in two places: ''Settings > Window Manager > Keyboard'', and ''Settings > Keyboard > Shortcuts''.<br />
<br />
=== Polkit Authentication Agent ===<br />
<br />
The {{Pkg|polkit-gnome}} agent will be installed along with {{Pkg|xfce4-session}} and autostarted automatically; no user intervention is required. For more information, see [[Polkit#Authentication agents]].<br />
<br />
A third party polkit authentication agent for Xfce is also available, see {{AUR|xfce-polkit}} or {{AUR|xfce-polkit-git}}.<br />
<br />
=== Display blanking ===<br />
<br />
{{Note|1=There are some issues associated with blanking and resuming from blanking in some configurations. See [https://bbs.archlinux.org/viewtopic.php?id=194313&p=2][https://bugzilla.xfce.org/show_bug.cgi?id=11107].}}<br />
<br />
Some programs that are commonly used with Xfce will control monitor blanking and [[DPMS]] (monitor powersaving) settings. They are discussed below.<br />
<br />
;Xfce Power Manager<br />
Xfce Power Manager will control blanking and DPMS settings. These settings can be configured by running ''xfce4-power-manager-settings'' and clicking the ''Display'' tab. Note that unticking the ''Handle display power management'' option means that the Power Manager will disable DPMS - it does not mean that the Power Manager will relinquish control of DPMS. Also note that it will not disable screen blanking. To disable both blanking and DPMS, right click on the power manager system tray icon or left click on the panel applet and make sure that the option labelled ''Presentation mode'' is ticked.<br />
<br />
;XScreenSaver<br />
{{Out of date|With xfce4-power-manager>1.5.1 the issue described below should in theory no longer apply. [http://git.xfce.org/xfce/xfce4-power-manager/commit/?id&#61;a805071464ecf0fee27d59de15620b035d855eb0]}}<br />
See [[XScreenSaver#DPMS and blanking settings]]. Note that if XScreenSaver is running alongside Xfce Power Manager, it may not be entirely clear which application is in control of blanking and DPMS as both applications are competing for control of the same settings. Therefore, in a situation where it is important that the monitor not be blanked (when watching a film for instance), it is advisable to disable blanking and DPMS through both applications.<br />
<br />
;xset<br />
If neither of the above applications are running, then blanking and DPMS settings can be controlled using the ''xset'' command, see [[DPMS#Modifying DPMS and screensaver settings using xset]].<br />
<br />
== Tips and tricks ==<br />
<br />
=== Hide partitions from thunar and xfdesktop ===<br />
<br />
If your installation partitions are shown as mounted devices on the desktop and in Thunar, try to install {{Pkg|gvfs}}. See [[Udisks#Hide selected partitions]] for more advanced configuration options.<br />
<br />
=== Screenshots ===<br />
<br />
Xfce has its own screenshot tool, {{pkg|xfce4-screenshooter}}. It is part of the {{grp|xfce4-goodies}} group.<br />
<br />
Go to ''Applications > Settings > Keyboard'', ''Application Shortcuts''. Add the {{ic|xfce4-screenshooter -f}} (or {{ic|-w}} for the active window) command to use the {{ic|Print}} key in order to take fullscreen screenshots. See screenshooter's man page for other optional arguments.<br />
<br />
Alternatively, an independent screenshot program like [[Taking a screenshot#scrot|scrot]] can be used.<br />
<br />
=== Disable Terminal F1 and F11 shortcuts ===<br />
<br />
The xfce terminal binds F1 and F11 to help and fullscreen, respectively, which can make using programs like htop difficult. To disable those shortcuts, create or edit its configuration file, then log out and log back in. F10 can disabled in the Preferences menu.<br />
<br />
{{hc|~/.config/xfce4/terminal/accels.scm|<br />
(gtk_accel_path "<Actions>/terminal-window/fullscreen" "")<br />
(gtk_accel_path "<Actions>/terminal-window/contents" "")<br />
}}<br />
<br />
=== Terminal color themes or palettes ===<br />
<br />
Terminal color themes or palettes can be changed in GUI under Appearance tab in Preferences. These are the colors that are available to most console applications like [[Emacs]], [[Vi]] and so on. Their settings are stored individually for each system user in {{ic|~/.config/xfce4/terminal/terminalrc}} file. There are also so many other themes to choose from. Check forum thread [https://bbs.archlinux.org/viewtopic.php?id=51818 Terminal Colour Scheme Screenshots] for hundreds of available choices and themes.<br />
<br />
==== Changing default color theme ====<br />
<br />
XFCE's {{ic|extra/terminal}} package comes with a darker color palette. To change this, append the following in your terminalrc file for a lighter color theme, that is always visible in darker Terminal backgrounds.<br />
<br />
~/.config/xfce4/terminal/terminalrc<br />
<br />
ColorPalette5=#38d0fcaaf3a9<br />
ColorPalette4=#e013a0a1612f<br />
ColorPalette2=#d456a81b7b42<br />
ColorPalette6=#ffff7062ffff<br />
ColorPalette3=#7ffff7bd7fff<br />
ColorPalette13=#82108210ffff<br />
<br />
==== Terminal tango color theme ====<br />
<br />
To switch to tango color theme, open with your favorite editor<br />
<br />
~/.config/xfce4/terminal/terminalrc<br />
<br />
And add(replace) these lines:<br />
<br />
ColorForeground=White<br />
ColorBackground=#323232323232<br />
ColorPalette1=#2e2e34343636<br />
ColorPalette2=#cccc00000000<br />
ColorPalette3=#4e4e9a9a0606<br />
ColorPalette4=#c4c4a0a00000<br />
ColorPalette5=#34346565a4a4<br />
ColorPalette6=#757550507b7b<br />
ColorPalette7=#060698989a9a<br />
ColorPalette8=#d3d3d7d7cfcf<br />
ColorPalette9=#555557575353<br />
ColorPalette10=#efef29292929<br />
ColorPalette11=#8a8ae2e23434<br />
ColorPalette12=#fcfce9e94f4f<br />
ColorPalette13=#72729f9fcfcf<br />
ColorPalette14=#adad7f7fa8a8<br />
ColorPalette15=#3434e2e2e2e2<br />
ColorPalette16=#eeeeeeeeecec<br />
<br />
=== Open URLs by middle mouse in terminal ===<br />
On update to version 0.8 open URL with middle mouse turned off by default and just paste clip to cursor.<br />
To enable old behavior fix next option in {{ic|${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc}} ({{ic|<nowiki>XDG_CONFIG_HOME=${HOME}/.config</nowiki>}} by default)<br />
{{hc|${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc|<nowiki>[Configuration]<br />
MiscMiddleClickOpensUri=TRUE</nowiki>}}<br />
<br />
=== Colour management ===<br />
<br />
Xfce has no native support for colour management. [https://bugzilla.xfce.org/show_bug.cgi?id=8559] See [[ICC profiles]] for alternatives.<br />
<br />
=== Multiple monitors ===<br />
<br />
As of {{Pkg|xfce4-settings}} version 4.11.4, Xfce has support for multiple monitors. Settings can be configured in the ''Applications'' -> ''Settings'' -> ''Display'' dialog. For more information, see the [http://docs.xfce.org/xfce/xfce4-settings/display display] article from the Xfce documentation.<br />
<br />
=== SSH agents ===<br />
<br />
By default Xfce 4.10 will try to load gpg-agent or ssh-agent in that order during session initialization. To disable this, create an xfconf key using the following command:<br />
<br />
xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false<br />
<br />
To force using ssh-agent even if gpg-agent is installed, run the following instead:<br />
<br />
xfconf-query -c xfce4-session -p /startup/ssh-agent/type -n -t string -s ssh-agent<br />
<br />
To use [[GNOME Keyring]], simply tick the checkbox ''Launch GNOME services on startup'' in the ''Advanced'' tab of ''Session and Startup'' in Xfce's settings. This will also disable gpg-agent and ssh-agent.<br />
<br />
Source: http://docs.xfce.org/xfce/xfce4-session/advanced<br />
<br />
=== Scroll a background window without shifting focus on it ===<br />
<br />
Go to ''Main Menu > Settings > Window Manager Tweaks > Accessibility'' tab.<br />
Uncheck ''Raise windows when any mouse button is pressed''.<br />
<br />
=== Mouse button modifier ===<br />
<br />
By default, the mouse button modifier in Xfce is set to {{ic|Alt}}. This can be changed with ''xfconf-query''. For instance, the following command will set the {{ic|Super}} key as the mouse button modifier:<br />
<br />
$ xfconf-query -c xfwm4 -p /general/easy_click -n -t string -s "Super"<br />
<br />
Strictly speaking, using multiple modifiers is not supported. However, as a workaround, multiple modifiers can be specified if the key names are separated with {{ic|><}}. For instance, to set {{ic|Ctrl+Alt}} as the mouse button modifier, you can use the following command:<br />
<br />
$ xfconf-query -c xfwm4 -p /general/easy_click -n -t string -s "Ctrl><Alt"<br />
<br />
=== Set the two fingers click to middle click for a touchpad ===<br />
<br />
{{Style|Convoluted way of simply configuring [[Touchpad Synaptics]]}}<br />
<br />
If you want the 2 finger click on the touchpad to do a middle click, create or edit the following file:<br />
<br />
{{hc|~/.config/xfce4/xfconf/xfce-perchannel-xml/pointers.xml|<nowiki><br />
<channel name="pointers" version="1.0"><br />
<property name="SynPS2_Synaptics_TouchPad" type="empty"><br />
<property name="Properties" type="empty"><br />
<property name="Synaptics_Tap_Action" type="array"><br />
<value type="int" value="0"/><br />
<value type="int" value="0"/><br />
<value type="int" value="0"/><br />
<value type="int" value="0"/><br />
<value type="int" value="1"/><br />
<value type="int" value="2"/><br />
<value type="int" value="3"/><br />
</property><br />
</property><br />
</property><br />
</channel><br />
</nowiki>}}<br />
<br />
The 2 in the array is the middle click.<br />
<br />
=== Limit the minimum brightness of the brightness-slider ===<br />
Limiting the minimum brightness can be useful for displays which turn off backlight on a brightness level of 0. In {{ic|xfce4-power-manager 1.3.2}} a new hidden option had been introduced to set a minimum brightness value with a xfconf4-property. Add {{ic|brightness-slider-min-level}} as an int property in xfconf4. Adjust the int value to get a suitable minimum brightness level.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Action buttons are missing icons ===<br />
<br />
This happens if icons for some actions (Suspend, Hibernate) are missing from the icon theme, or do not have the expected names. To fix this, install an icon theme which has the necessary icons already added; see [[Icons#Xfce icons]]. <br />
<br />
Then, you can switch to that icon theme using Applications -> Settings -> Appearance -> Icons.<br />
<br />
Alternatively you can use the required icons provided by the icon theme you installed in your current icon theme. To do so, you first need to find out what the currently used icon theme is called. You can do so by using the command below:<br />
<br />
$ xfconf-query -c xsettings -p /Net/IconThemeName<br />
<br />
Then set the following variable:<br />
<br />
$ icontheme=/usr/share/icons/''theme-name''<br />
<br />
where ''theme-name'' is the name of the current icon theme.<br />
<br />
Then create symbolic links from the current icon theme into the icon theme providing the icons (this example assumes the icons are being provided by the {{AUR|elementary-xfce-icons}} theme.)<br />
<br />
ln -s /usr/share/icons/elementary-xfce/apps/16/system-suspend.svg ${icontheme}/16x16/actions/system-suspend.svg<br />
ln -s /usr/share/icons/elementary-xfce/apps/16/system-suspend-hibernate.svg ${icontheme}/16x16/actions/system-hibernate.svg<br />
ln -s /usr/share/icons/elementary-xfce/apps/22/system-suspend.svg ${icontheme}/22x22/actions/system-suspend.svg<br />
ln -s /usr/share/icons/elementary-xfce/apps/22/system-suspend-hibernate.svg ${icontheme}/22x22/actions/system-hibernate.svg<br />
ln -s /usr/share/icons/elementary-xfce/apps/24/system-suspend.svg ${icontheme}/24x24/actions/system-suspend.svg<br />
ln -s /usr/share/icons/elementary-xfce/apps/24/system-suspend-hibernate.svg ${icontheme}/24x24/actions/system-hibernate.svg<br />
ln -s /usr/share/icons/elementary-xfce/apps/48/system-suspend.svg ${icontheme}/48x48/actions/system-suspend.svg<br />
ln -s /usr/share/icons/elementary-xfce/apps/48/system-suspend-hibernate.svg ${icontheme}/48x48/actions/system-hibernate.svg<br />
<br />
Log out and in again, and you should see icons for all actions.<br />
<br />
=== Desktop icons rearrange themselves ===<br />
<br />
At certain events (such as opening the panel settings dialog) icons on the desktop rearrange themselves. This is because icon positions are determined by files in the {{ic|~/.config/xfce4/desktop/}} directory. Each time a change is made to the desktop (icons are added or removed or change position) a new file is generated in this directory and these files can conflict.<br />
<br />
To solve the problem, navigate to the directory and delete all the files other than the one which correctly defines the icon positions. You can determine which file defines the correct icon positions by opening it and examining the locations of the icons. The topmost row is defined as {{ic|row 0}} and the leftmost column is defined by {{ic|col 0}}. Therefore an entry of:<br />
<br />
[Firefox]<br />
row=3<br />
col=0<br />
<br />
means that the Firefox icon will be located on the 4th row of the leftmost column.<br />
<br />
=== GTK themes not working with multiple monitors ===<br />
<br />
{{Expansion|Which configuration tools? What does ''ceasing to work'' mean? Is it that new themes cannot be selected or that themes display incorrectly? Is there a bug report?}}<br />
<br />
Some configuration tools may corrupt displays.xml, which results in GTK themes under ''Applications Menu > Settings > Appearance'' ceasing to work. To fix the issue, delete {{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml}} and reconfigure your screens.<br />
<br />
=== Icons do not appear in right-click menus ===<br />
<br />
{{Note|Despite the deprecation of GConf, this method does still work.}}<br />
<br />
Users may find that icons do not appear when right-clicking options within some applications, including those made with [[Qt]]. This problem only appears to happen within Xfce. Run these two commands:<br />
<br />
$ gconftool-2 --type boolean --set /desktop/gnome/interface/buttons_have_icons true<br />
$ gconftool-2 --type boolean --set /desktop/gnome/interface/menus_have_icons true<br />
<br />
=== Keyboard settings are not saved in xkb-plugin ===<br />
<br />
There is a bug in {{Pkg|xfce4-xkb-plugin}} ''0.5.4.1-1'' which causes it to lose keyboard, layout switching and compose key settings. [https://bugzilla.xfce.org/show_bug.cgi?id=10226] As a workaround, enable ''Use system defaults'' in {{ic|xfce4-keyboard-settings}}, then reconfigure ''xfce4-xkb-plugin''.<br />
<br />
=== NVIDIA and xfce4-sensors-plugin ===<br />
<br />
To detect and use sensors of nvidia gpu you need to install {{Pkg|libxnvctrl}} and then rebuild {{Pkg|xfce4-sensors-plugin}} with [[ABS]]. You also have the option of using {{AUR|xfce4-sensors-plugin-nvidia}} which replaces {{Pkg|xfce4-sensors-plugin}}.<br />
<br />
=== Panel applets keep being aligned on the left ===<br />
<br />
Add a separator someplace before the right end and set its "expand" property. [https://forums.linuxmint.com/viewtopic.php?f=110&t=155602}]<br />
<br />
=== Preferred Applications preferences have no effect ===<br />
<br />
Most applications rely on [[xdg-open]] for opening a preferred application for a given file or URL.<br />
<br />
In order for xdg-open and xdg-settings to detect and integrate with the Xfce desktop environment correctly, you need to [[install]] the {{Pkg|xorg-xprop}} package.<br />
<br />
If you do not do that, your preferred applications preferences (set by exo-preferred-applications) will not be obeyed.<br />
Installing the package and allowing ''xdg-open'' to detect that you are running Xfce makes it forward all calls to ''exo-open'' instead, which correctly uses all your preferred applications preferences.<br />
<br />
To make sure xdg-open integration is working correctly, ask ''xdg-settings'' for the default web browser and see what the result is:<br />
<br />
# xdg-settings get default-web-browser<br />
<br />
If it replies with:<br />
<br />
xdg-settings: unknown desktop environment<br />
<br />
it means that it has failed to detect Xfce as your desktop environment, which is likely due to a missing {{Pkg|xorg-xprop}} package.<br />
<br />
=== Restore default settings ===<br />
<br />
If for any reason you need to revert back: to the default settings, rename {{ic|~/.config/xfce4-session/}} and {{ic|~/.config/xfce4/}}<br />
<br />
$ mv ~/.config/xfce4-session/ ~/.config/xfce4-session-bak<br />
$ mv ~/.config/xfce4/ ~/.config/xfce4-bak<br />
<br />
Relogin for changes to take effect. If you get {{ic|Unable to load a failsafe session}} upon login, see the [[#Session failure]] section.<br />
<br />
=== Session failure ===<br />
<br />
Symptoms include:<br />
<br />
* The mouse is an X and/or does not appear at all;<br />
* Window decorations have disappeared and windows cannot be closed;<br />
* ({{ic|xfwm4-settings}}) will not start, reporting {{ic|These settings cannot work with your current window manager (unknown)}};<br />
* Errors reported by a [[display manager]] such as {{ic|No window manager registered on screen 0}}.<br />
* Unable to load a failsafe session:<br />
<br />
Unable to load a failsafe session.<br />
Unable to determine failsafe session name. Possible causes: xfconfd isn't running (D-Bus setup problem); environment variable $XDG_CONFIG_DIRS is set incorrectly (must include "/etc"), or xfce4-session is installed incorrectly. <br />
<br />
Restarting xfce or rebooting your system may solve the problem, but a corrupt session is the likely cause. Delete the session folder:<br />
<br />
$ rm -r ~/.cache/sessions/<br />
<br />
Also make sure that the relevant folders in {{ic|$HOME}} are owned by the user starting {{ic|xfce4}}. See [[Chown]].<br />
<br />
=== Fonts in window title crashing xfce4-title ===<br />
<br />
[[Install]] {{Pkg|ttf-droid}} and {{Pkg|ttf-dejavu}}. See also {{Bug|44382}}.<br />
<br />
=== Laptop lid settings ignored ===<br />
<br />
You may find that the lid close settings in Xfce4 Power Manager are ignored, meaning that the laptop will always suspend on lid close, no matter what settings are chosen in the power manager. This is because the power manager is not set to handle lid close events by default. Instead, logind handles the lid close event. To change this behavior so that the the power manager handles lid close events, execute the following command:<br />
$ xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s false<br />
<br />
{{Note|Under some circumstances, the {{ic|logind-handle-lid-switch}} setting will get set to true when changes are made to the laptop lid actions or the lock on suspend setting. See [https://bugzilla.xfce.org/show_bug.cgi?id&#61;12756#c2]. In this case, you will need to toggle {{ic|logind-handle-lid-switch}} to false again.}}<br />
<br />
=== Power Manager Plugin shows battery time and remaining percentage ===<br />
<br />
Since 1.5.1 an hidden option has been introduced to configure a label on the statusbar. The new xfconf4 option {{ic|show-panel-label}} of type {{ic|int}} can be configured for different label formats. {{ic|show-panel-label}} can be set to 0 (no label), 1 (percentage), 2 (remaining time) or 3 (both).<br />
<br />
Source: [https://mail.xfce.org/pipermail/xfce-announce/2015-June/000424.html 1.5.1 release notes]<br />
<br />
== See also ==<br />
<br />
* [http://www.xfce.org/about/ Xfce - About]<br />
* http://docs.xfce.org/ - The complete documentation.<br />
* [http://www.xfce-look.org/ Xfce-Look] - Themes, wallpapers, and more.<br />
* [http://xfce.wikia.com/wiki/Frequently_Asked_Questions Xfce Wikia] - How to edit the auto generated menu with the menu editor<br />
* [http://wiki.xfce.org Xfce Wiki]</div>Cilyanhttps://wiki.archlinux.org/index.php?title=KDE&diff=377896KDE2015-06-08T13:59:58Z<p>Cilyan: /* Use Telegram with KDE Telepathy */ Wrong phone code for Germany</p>
<hr />
<div>[[Category:KDE]]<br />
[[cs:KDE]]<br />
[[de:KDE]]<br />
[[es:KDE]]<br />
[[fr:KDE]]<br />
[[it:KDE]]<br />
[[ja:KDE]]<br />
[[pl:KDE]]<br />
[[ru:KDE]]<br />
[[tr:KDE Masaüstü Ortamı]]<br />
[[zh-CN:KDE]]<br />
[[zh-TW:KDE]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Window manager}}<br />
{{Related|Plasma}}<br />
{{Related|Qt}}<br />
{{Related|KDM}}<br />
{{Related|KDevelop 4}}<br />
{{Related|Uniform Look for Qt and GTK Applications}}<br />
{{Related articles end}}<br />
<br />
From [http://www.kde.org/community/whatiskde/softwarecompilation.php KDE Software Compilation] and [http://www.kde.org/download/ Getting KDE Software]:<br />
<br />
:The KDE Software Compilation is the set of frameworks, workspaces, and applications produced by KDE to create a beautiful, functional and free desktop computing environment for Linux and similar operating systems. It consists of a large number of individual applications and a desktop workspace as a shell to run these applications.<br />
<br />
The KDE upstream has a well maintained [http://userbase.kde.org/ UserBase wiki]. Users can get detailed information about most KDE applications there.<br />
<br />
{{note| The term "KDE Software Compilation" is now outdated. KDE is moving to a new way of organizing itself, see: [[Plasma]].}}<br />
== Installation ==<br />
<br />
Before installing KDE, make sure you have a working [[Xorg]] installation on your system.<br />
<br />
Starting in 2014, the KDE project has changed the way it names and organizes itself. There is no KDE Software Compilation anymore, the project is now split into different products with their own names, version numbering and development cycles including: Frameworks (KDE libraries), Plasma (the workspace) and Applications (built on top of KDE libraries). <br />
<br />
=== Plasma 5 ===<br />
<br />
See [[Plasma]].<br />
<br />
=== KDE 4 Workspace ===<br />
<br />
To get the KDE4 version of the Plasma Desktop, install the {{Pkg|kdebase-workspace}} package and, optionally, the {{Pkg|kdebase-plasma}} package (folder view applet) and the {{Grp|kdeplasma4-addons}} and {{Grp|kdeartwork}} groups for additional plasmoids and artwork. Note that the KDE4 Plasma Desktop is currently in maintenance mode, and is expected to reach EOL in August 2015.<br />
<br />
=== KDE Applications ===<br />
<br />
To install the full set of KDE Applications, use the {{Grp|kde-applications}} group, or the {{Pkg|kde-applications-meta}} meta-packages to install specific modules. Note that this will only install Applications, it will not install any version of the Plasma Desktop.<br />
<br />
==== Language pack ====<br />
<br />
If you need language files, install {{ic|kde-l10n-yourlanguagehere}} (e.g. {{Pkg|kde-l10n-de}} for the German language).<br />
<br />
For a full list of available languages see [https://www.archlinux.org/packages/extra/any/kde-l10n/ this link].<br />
<br />
== Starting Plasma ==<br />
See [[Plasma#Starting Plasma]].<br />
<br />
== Configuration ==<br />
<br />
All KDE 4 configurations are saved in the {{ic|~/.kde4}} folder, otherwise {{ic|~/.config}} is used. If KDE is giving you a lot of trouble or if you ever want a fresh installation of KDE, just backup and rename this folder and restart your X session. KDE will re-create it with all the default configuration files. If you want very fine-grained control over KDE programs, you may want to edit the files in this folder.<br />
<br />
However, configuring KDE is primarily done in '''System Settings'''. A few other options for the desktop are available in '''Default Desktop Settings''' in the desktop's context menu.<br />
<br />
For other personalization options not covered below such as activities, different wallpapers on one cube, etc., please refer to the [[Plasma]] wiki page.<br />
<br />
=== Personalization ===<br />
<br />
How to set up the KDE desktop to your personal style: use different Plasma themes, window decorations and icon themes.<br />
{{tip|1=Applications using the new frameworks 5 use the same configurations as under the old kdebase-workspace 4 but read from new locations. To allow frameworks 5 applications running in kdebase-workspace 4 to share the same configurations they may be moved to the new locations and symlinked back to the old. Examples are:<br />
*Konsole profiles from ~/.kde4/share/apps/konsole to ~/.local/share/konsole/<br />
*Application appearance from ~/.kde4/share/config/kdeglobals to ~/.config/kdeglobals<br />
This information was gathered from the [https://bbs.archlinux.org/viewforum.php?id=18 Applications & Desktop Environments] section of the forums. }}<br />
<br />
==== Plasma desktop ====<br />
<br />
===== Themes =====<br />
See [[Plasma#Themes]]<br />
<br />
===== Widgets =====<br />
<br />
Plasmoids are little scripted (plasmoid scripts) or coded (plasmoid binaries) KDE applications designed to enhance the functionality of your desktop.<br />
<br />
Plasmoid binaries can be installed using PKGBUILDs from [https://aur.archlinux.org/packages.php?O=0&K=plasmoid&do_Search=Go&PP=25&SO=d&SB=v AUR], or you can write your own PKGBUILD.<br />
<br />
The easiest way to install plasmoid scripts is by right-clicking onto a panel or the desktop:<br />
<br />
Add Widgets > Get new Widgets > Download Widgets<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Most plasmoids are not created officially by KDE developers. You can also try installing Mac OS X widgets, Microsoft Windows Vista/7 widgets, Google Widgets, and even SuperKaramba widgets.<br />
<br />
===== Sound applet in the system tray =====<br />
<br />
Install Kmix ({{Pkg|kdemultimedia-kmix}} for KDE 4, or {{Pkg|kmix}} for Plasma 5) from the official repositories and start it from the application launcher. Since KDE, by default, autostarts programs from the previous session, it does not need to be started manually upon every login.<br />
<br />
{{Note|1=To adjust the [https://bugs.kde.org/show_bug.cgi?id=313579#c28 step size of volume increments/decrements], add e.g. {{ic|1=VolumePercentageStep=1}} in the {{ic|[Global]}} section of {{ic|~/.kde4/share/config/kmixrc}}}}<br />
<br />
===== Adding a Global Menu to the desktop =====<br />
<br />
Install {{Pkg|appmenu-qt}} from the official repositories and {{AUR|appmenu-gtk}} and {{AUR|appmenu-qt5}} from the AUR in order to complete the preliminaries for a Mac OS X style always-on global menu. To get Firefox and LibreOffice to use the global menu as well, install {{AUR|firefox-extension-globalmenu}}{{Broken package link|package not found}} and {{AUR|libreoffice-extension-menubar}} from the AUR.<br />
<br />
{{Note|<br />
* {{AUR|appmenu-gtk}} is orphaned and Canonical has abandoned appmenu-gtk in favor of unity-gtk-module that is depending on Unity desktop. As of October 2014 there is no way of exporting gtk2,3 menus in KDE.<br />
* Install {{AUR|firefox-ubuntu}}, available in the AUR, which has Canonical's patch for getting the global menu to work with the current version of Firefox (as of November 2013).<br />
}}<br />
<br />
To actually get the global menu, install {{AUR|kdeplasma-applets-menubar}} from the AUR. Create a plasma-panel on top of your screen and add the window menubar applet to the panel. To export the menus to your global menu, go to <br />
System Settings > Application Appearance > Style<br />
Now click the fine-tuning tab and use the drop-down list to select ''only export'' as your menubar style.<br />
<br />
===== Disable panel shadow =====<br />
<br />
As the plasma panel is on top of other windows, its shadow is drawn over them. [https://bbs.archlinux.org/viewtopic.php?pid=1228394#p1228394] To disable this behaviour without impacting other shadows, [[install]] {{Pkg|xorg-xprop}} and run:<br />
<br />
$ xprop -remove _KDE_NET_WM_SHADOW<br />
<br />
then select the panel with the plus-sized cursor. [https://forum.kde.org/viewtopic.php?f=285&t=121592] For automation, install {{Pkg|xorg-xwininfo}} and create the following script:<br />
<br />
{{hc|/usr/local/bin/kde-no-shadow|<nowiki><br />
#!/bin/bash<br />
for WID in $(xwininfo -root -tree | sed '/"plasma-desktop": ("Plasma" "Plasma")/!d; s/^ *\([^ ]*\) .*/\1/g'); do<br />
xprop -id $WID -remove _KDE_NET_WM_SHADOW<br />
done<br />
</nowiki>}}<br />
<br />
The script can be run on login with ''Add Script'' in ''Autostart'':<br />
<br />
$ kcmshell4 autostart<br />
<br />
==== Window decorations ====<br />
<br />
[http://kde-look.org/index.php?xcontentmode=75 Window decorations] can be changed in:<br />
System Settings > Workspace Appearance > Window Decorations<br />
There you can also directly download and install more themes with one click, and some are available in the [https://aur.archlinux.org/packages.php?O=0&K=kdestyle&do_Search=Go&PP=25&SO=d&SB=v AUR].<br />
<br />
==== Icon themes ====<br />
<br />
Not many full system icons themes are available for KDE 4. You can open up <br />
System Settings > Application Appearance > Icons<br />
and browse for new ones or install them manually. Many of them can be found on [http://www.kde-look.org/ kde-look.org].<br />
<br />
Official logos, icons, CD labels and other artwork for Arch Linux are provided in the {{AUR|archlinux-artwork}} package. After installing you can find such artwork at {{ic|/usr/share/archlinux/}}.<br />
<br />
===== Qt 5 icons theme =====<br />
<br />
If you are on Plasma 5, use <br />
System Settings > Icons<br />
While if you are on KDE 4 use {{ic|kcmshell5 icons}} to set the icons theme.<br />
<br />
==== Fonts ====<br />
<br />
===== Fonts in KDE look poor =====<br />
<br />
Try installing the {{Pkg|ttf-dejavu}} and {{Pkg|ttf-liberation}} packages.<br />
<br />
After the installation, be sure to log out and back in. You should not have to modify anything in ''System Settings > Fonts''.<br />
<br />
If you have personally set up how your [[Fonts]] render, be aware that System Settings may alter their appearance. When you go ''System Settings > Appearance > Fonts'', System Settings will likely alter your font configuration file ({{ic|fonts.conf}}).<br />
<br />
There is no way to prevent this, but, if you set the values to match your {{ic|fonts.conf}} file, the expected font rendering will return (it will require you to restart your application or in a few cases restart your desktop). Note that Gnome's Font Preferences also does this.<br />
<br />
===== Fonts are huge or seem disproportional =====<br />
<br />
Try to force font DPI to '''96''' in ''System Settings > Application Appearance > Fonts''.<br />
<br />
If that does not work, try setting the DPI directly in your Xorg configuration as documented [[Xorg#Setting_DPI_manually|here]].<br />
<br />
==== Space efficiency ====<br />
<br />
Users with small screens (e.g. netbooks) can change some setting to make KDE more space efficient. See the [http://userbase.kde.org/KWin#Using_with_small_screens_(eg_Netbooks) upstream wiki] for more information. Also, you can use [http://www.kde.org/workspaces/plasmanetbook/ KDE's Plasma Netbook] which is a workspace made specifically for small, lightweight netbook devices.<br />
<br />
=== Networking ===<br />
<br />
You can choose from the following tools:<br />
* NetworkManager. See [[NetworkManager#KDE|NetworkManager]] for more information.<br />
* Wicd. See [[Wicd]] for more information.<br />
<br />
=== Printing ===<br />
<br />
{{Tip|Use the [[CUPS]] web interface for faster configuration. Printers configured in this way can be used in KDE applications. }}<br />
<br />
You can also configure printers in ''System Settings > Printer Configuration''. To use this method, you must first install {{Pkg|print-manager}} and {{Pkg|cups}}.<br />
<br />
The {{ic|avahi-daemon}} and {{ic|cupsd}} daemons must be started first; otherwise, you will get the following error:<br />
The service 'Printer Configuration' does not provide an interface 'KCModule'<br />
with keyword 'system-config- printer-kde/system-config-printer-kde.py'<br />
The factory does not support creating components of the specified type.<br />
<br />
If you are getting the following error, you need to give your user the right to manage printers.<br />
There was an error during CUPS operation: 'cups-authorization-canceled'<br />
<br />
For CUPS, this is set in {{ic|/etc/cups/cups-files.conf}}.<br />
<br />
Adding {{ic|lpadmin}} to {{ic|/etc/group}} and then to the {{ic|SystemGroup}} directive in {{ic|/etc/cups/cups-files.conf}} allows anyone in the {{ic|lpadmin}} group to configure printers. Do ''not'' add the {{ic|lp}} group to the {{ic|SystemGroup}} directive, or printing will fail.<br />
<br />
# groupadd -g107 lpadmin<br />
<br />
{{hc|/etc/cups/cups-files.conf|# Administrator user group...<br />
SystemGroup sys root lpadmin}}<br />
<br />
{{Tip|Read [[CUPS#CUPS administration]] to get more details on how to configure CUPS.}}<br />
<br />
=== Samba/Windows support ===<br />
<br />
If you want to have access to Windows services, install [[Samba]] (package {{Pkg|samba}}).<br />
<br />
The Dolphin share functionality requires usershares, which the stock smb.conf does not have enabled. Instructions to add them are in [[Samba#Creating usershare path]], after which sharing in Dolphin should work out of the box after restarting Samba.<br />
<br />
=== KDE Desktop activities ===<br />
<br />
KDE Desktop Activities are Plasma-based virtual-desktop-like sets of Plasma Widgets where you can independently configure widgets as if you have more than one screen or desktop.<br />
<br />
On your desktop, click the Cashew Plasmoid and, on the pop-up window, press "Activities".<br />
<br />
A plasma bar presenting you the current existing Plasma Desktop Activities will appear at the bottom of the screen. You can navigate between them by pressing the correspondent icons.<br />
<br />
=== Power saving ===<br />
<br />
KDE has an integrated power saving service called "'''Powerdevil Power Management'''" that may adjust the power saving profile of the system and/or the brightness of the screen (if supported).<br />
<br />
Since KDE 4.6, CPU frequency scaling is no longer managed by KDE. Instead it is assumed to be handled automatically by the the hardware and/or kernel. Arch has used {{ic|ondemand}} as the default CPU frequency governor since kernel version 3.3, so no additional configuration is needed in most cases. For details on fine-tuning the governor, see [[CPU frequency scaling]].<br />
<br />
=== Monitoring changes on local files and directories ===<br />
<br />
KDE now uses '''inotify''' directly from the kernel with '''kdirwatch''' (included in kdelibs), so Gamin or FAM are no longer needed. You may want to install this {{AUR|kdirwatch}} from AUR which is a GUI frontend for kdirwatch.<br />
<br />
== System administration ==<br />
<br />
=== Set keyboard ===<br />
<br />
Navigate to:<br />
System Settings > Hardware > Input Devices > Keyboard<br />
In the first tab, you can choose your keyboard model.<br />
<br />
In the "'''Layouts'''" tab, you can choose the languages you may want to use by pressing the "Add Layout" button and subsequently choosing the variant and the language.<br />
<br />
In the "'''Advanced'''" tab, you can choose the keyboard combination you want in order to change the layouts in the "Key(s) to change layout" sub-menu.<br />
<br />
=== Terminate Xorg server through KDE system settings ===<br />
<br />
Navigate to the submenu:<br />
System Settings > Input Devices > Keyboard > Advanced (tab) > "Key Sequence to kill the X server"<br />
and ensure that the checkbox is ticked.<br />
<br />
=== KCM ===<br />
<br />
KCM stands for '''KC'''onfig '''M'''odule. KCMs can help you configure your system by providing interfaces in System Settings.<br />
<br />
'''Configuration for look and feel of GTK applications.'''<br />
* {{Pkg|kde-gtk-config}}<br />
* {{AUR|kcm-gtk}}<br />
* {{AUR|kcm-qt-graphicssystem}}<br />
<br />
'''Configuration for the GRUB bootloader.'''<br />
* {{AUR|grub2-editor}}<br />
<br />
'''Configuration for Synaptics touchpads.'''<br />
* {{Pkg|kcm-touchpad}}<br />
* {{Pkg|kcm-touchpad-frameworks}}{{Broken package link|replaced by {{Pkg|plasma-desktop}}}} (Plasma 5)<br />
* {{AUR|synaptiks}}{{Broken package link|package not found}}<br />
* {{AUR|kcm_touchpad}}<br />
* {{AUR|kcm-touchpad-git}}{{Broken package link|package not found}}<br />
<br />
'''Configuration for the [[Uncomplicated Firewall]] (UFW)'''<br />
* {{AUR|kcm-ufw}}<br />
<br />
'''Configuration for [[PolicyKit]]'''<br />
* {{AUR|kcm-polkit-kde-git}}<br />
<br />
'''Configuration for Wacom tablets'''<br />
* {{AUR|kcm-wacomtablet}}<br />
<br />
'''Configuration for systemd'''<br />
* {{Pkg|kcmsystemd}} (Plasma 5)<br />
<br />
More KCMs can be found at [http://kde-apps.org/index.php?xcontentmode=273 kde-apps.org].<br />
<br />
===Auto Login===<br />
Navigate to the submenu:<br />
System Settings > System Administration > Login Screen > Convenience<br />
check ''Enable Auto-Login'' box and select user.<br />
<br />
== Desktop search and semantic desktop ==<br />
<br />
According to [[wikipedia:Semantic_desktop|Wikipedia]]:<br />
:''"the Semantic Desktop is a collective term for ideas related to changing a computer's user interface and data handling capabilities so that data is more easily shared between different applications or tasks and so that data that once could not be automatically processed by a computer can be (automatically processed)."''<br />
<br />
The KDE implementation of this concept is tied to (as of KDE Applications 4.13) two major pieces of software: Akonadi and Baloo. Between the two of them, these programs look at your data and make an easily searchable index of it. The idea behind these pieces of software is to make your system "aware" of your data and give it context using meta-data and user-supplied tags. Baloo uses Xapian to store its data.<br />
<br />
=== Baloo ===<br />
<br />
==== Using and configuring Baloo ====<br />
<br />
In order to search using Baloo on the KDE Plasma Desktop, press {{ic|ALT+F2}} and type in your query. Within Dolphin press {{ic|CTRL+F}}.<br />
<br />
By default the Desktop Search KCM exposes only two options: A panel to blacklist folders and, as of 4.13.1, a way to disable it with one click.<br />
<br />
Alternatively you can edit your {{ic|~/.kde4/share/config/baloofilerc}} (KDE4) or {{ic|~/.config/baloofilerc}} (KF5) file ([https://community.kde.org/Baloo/Configuration info]). Additionally the {{ic|balooctl}} process can also be used. In order to disable Baloo run {{ic|balooctl disable}}.<br />
<br />
Once you added additional folders to the blacklist or disabled Baloo entirely, a process named {{ic|baloo_file_cleaner}} removes all unneeded index files automatically. They are stored under {{ic|~/.local/share/baloo/}}.<br />
<br />
More advanced configuration options are available through {{AUR|kcm_baloo_advanced}}.<br />
<br />
==== How do I index a removable device? ====<br />
<br />
By default every removable device is blacklisted. You just have to remove your device from the blacklist in the KCM panel.<br />
<br />
=== Akonadi ===<br />
<br />
Akonadi is a system meant to act as a local cache for PIM data, regardless of its origin, which can be then used by other applications. This includes the user's emails, contacts, calendars, events, journals, alarms, notes, and so on.<br />
<br />
Akonadi does not store any data by itself: the storage format depends on the nature of the data (for example, contacts may be stored in vCard format).<br />
<br />
==== Disabling Akonadi ====<br />
<br />
See this [http://userbase.kde.org/Akonadi#Disabling_the_Akonadi_subsystem section in the KDE userbase]. Alternatively, install {{AUR|akonadi-fake}} from the [[AUR]].<br />
<br />
==== Database configuration ====<br />
<br />
Start {{ic|akonaditray}} from package {{Pkg|kdepim-runtime}}. Right click on it and select '''configure'''. In the Akonadi server configure tab, you can:<br />
* Configuring Akonadi to use MySQL/MariaDB Server<br />
** If your home directory is on a ZFS pool, you will need to create {{ic|~/.config/akonadi/mysql-local.conf}} with the following contents:<br />
<br />
[mysqld]<br />
innodb_use_native_aio = 0<br />
<br />
Otherwise you will get the [[MySQL#OS error 22 when running on ZFS|OS error 22]]<br />
* Configuring Akonadi to use PostgreSQL Server<br />
* Configuring Akonadi to use SQLite<br />
** Edit {{ic|~/.config/akonadi/akonadiserverrc}} to match the below<br />
<br />
[General]<br />
Driver=QSQLITE3<br />
<br />
[QSQLITE3]<br />
Name=/home/username/.local/akonadi/akonadi.db<br />
<br />
== Phonon ==<br />
<br />
From [[Wikipedia:Phonon|Wikipedia]]:<br />
<br />
:''"Phonon is the multimedia API for KDE 4. Phonon was created to allow KDE 4 to be independent of any single multimedia framework such as GStreamer or xine and to provide a stable API for KDE 4's lifetime. It was done for various reasons: to create a simple KDE/Qt style multimedia API, to better support native multimedia frameworks on Windows and Mac OS X, and to fix problems of frameworks becoming unmaintained or having API or ABI instability."''<br />
<br />
'''Phonon''' is being widely used within KDE, for both audio (e.g., the System notifications or KDE audio apps) and video (e.g., the Dolphin video thumbnails).<br />
<br />
=== Which backend should I choose? ===<br />
<br />
You can choose between various backends like [[GStreamer]] ({{Pkg|phonon-qt4-gstreamer}}, {{Pkg|phonon-qt5-gstreamer}}) or [[VLC]] ({{Pkg|phonon-qt4-vlc}}, {{Pkg|phonon-qt5-vlc}}), available in the [[official repositories]], and [[MPlayer]] ({{AUR|phonon-qt4-mplayer-git}}), QuickTime ({{AUR|phonon-quicktime-git}}) or [http://martinsandsmark.wordpress.com/2012/07/07/akademy/ AVKode] ({{AUR|phonon-avkode-git}}), available in the [[AUR]].<br />
<br />
Most users will want VLC which has the best upstream support. GStreamer is currently not well maintained. Note that multiple backends can be installed at once and chosen at ''System Settings > Multimedia > Phonon > Backend''. For Plasma 5 this would be <br />
System Settings > Multimedia > Backend<br />
<br />
{{Note|<br />
* According to the [http://community.kde.org/Phonon/FeatureMatrix Feature Matrix], the GStreamer backend has some more features that the VLC backend.<br />
* According to the [http://userbase.kde.org/Phonon#Backend_libraries KDE UserBase], Phonon-MPlayer is currently unmaintained.<br />
* According to [https://forum.kde.org/viewtopic.php?f&#61;250&t&#61;126476&p&#61;335080 this thread] on KDE forums, the VLC backend lacks support for [[wikipedia:ReplayGain|ReplayGain]]}}<br />
<br />
== Useful applications ==<br />
<br />
The official set of KDE applications may be found [http://www.kde.org/applications/ here].<br />
<br />
=== Yakuake ===<br />
<br />
[[Yakuake]] provides a Quake-like terminal emulator whose visibility is toggled by the F12 key. It also has support for multiple tabs. Yakuake is available in the package {{Pkg|yakuake}}.<br />
<br />
=== KDE Telepathy ===<br />
<br />
[http://community.kde.org/KTp KDE Telepathy] is a project with the goal to closely integrate Instant Messaging with the KDE desktop. It utilizes the Telepathy framework as a backend and is intended to replace Kopete.<br />
<br />
To install all Telepathy protocols, install the {{Grp|telepathy}} group.<br />
To use the KDE Telepathy client, install the {{Pkg|telepathy-kde-meta}} package that includes all the packages contained in the {{Grp|telepathy-kde}} group.<br />
<br />
==== Use Telegram with KDE Telepathy ====<br />
<br />
Telegram protocol is avaible using {{pkg|telepathy-haze}}, installing {{aur|telegram-purple}} or {{aur|telegram-purple-git}}. The username is the Telegram account telephone number (complete with the national prefix '+xx', e.g. '+49' for Germany). The configuration though the GUI may be tricky: if the phone number is not accepted when configuring a new account in the KDE Telepathy client (with an error message complaining about an invalid parameter which prevents the account creation), insert it between single quotes and then remove the quotes manually from the configuration file ({{ic|~/.local/share/telepathy/mission-control/accounts.cfg}}) after the account creation (if the quotes are not removed after, an authentication error should rise). Note that the configuration file should be edited manually when KDE Telepathy is not running, e.g. when there is no KDE desktop session active, otherwise manual changes may be overwritten by the software.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Using an alternative window manager in KDE ===<br />
<br />
To use an alternative [[window manager]] with KDE open the ''System Settings'' panel, navigate to ''Default Applications > Window Manager > Use a different window manager'' and select the window manager you wish to use from the list.<br />
<br />
==== KDE/Openbox Session ====<br />
<br />
The {{Pkg|openbox}} package provides a session for using KDE with [[Openbox]]. To make use of this session, select ''KDE/Openbox'' from the [[display manager]] menu.<br />
<br />
For those starting the session manually, add the following line to your {{ic|.xinitrc}} file:<br />
exec openbox-kde-session<br />
<br />
==== Compiz custom ====<br />
<br />
If you need to run Compiz with custom options and switches select ''Compiz custom'' and then create a script called {{ic|compiz-kde-launcher}} and add to it the commands you wish to use to start Compiz. See the example below:<br />
<br />
{{hc|/usr/local/bin/compiz-kde-launcher|<nowiki><br />
#!/bin/bash<br />
LIBGL_ALWAYS_INDIRECT=1<br />
compiz --replace &<br />
wait<br />
</nowiki>}}<br />
<br />
Then make it executable:<br />
$ chmod +x /usr/local/bin/compiz-kde-launcher<br />
<br />
==== Re-enabling compositing effects ====<br />
<br />
When replacing Kwin with a window manager which does not provide a Compositor (such as Openbox), any desktop compositing effects e.g. transparency will be lost. In this case, install and run a separate Composite manager to provide the effects such as [[Xcompmgr]] or [[Compton]].<br />
<br />
=== Integrate Android with the KDE Desktop ===<br />
<br />
KDE connect provides several features for you:<br />
* Share files and URLs to/from KDE from/to any app, without wires.<br />
* Touchpad emulation: Use your phone screen as your computer's touchpad.<br />
* Notifications sync (4.3+): Read your Android notifications from the desktop.<br />
* Shared clipboard: copy and paste between your phone and your computer.<br />
* Multimedia remote control: Use your phone as a remote for Linux media players.<br />
* WiFi connection: no usb wire or bluetooth needed.<br />
* RSA Encryption: your information is safe.<br />
<br />
You will need to install KDE Connect both on your computer and on your Android. For PC side, install {{Pkg|kdeconnect}} if you are using KDE4 or if you are using Plasma 5, then you should install {{AUR|kdeconnect-git}} instead. For Android side, install {{ic|KDE Connect}} from the [https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp&hl=en Google Play Store] or from [https://f-droid.org/repository/browse/?fdid=org.kde.kdeconnect_tp F-Droid].<br />
<br />
=== Configure KWin to use OpenGL ES ===<br />
<br />
Beginning with KWin version 4.8 it is possible to use the separately built binary '''kwin_gles''' as a replacement for kwin. It behaves almost the same as the kwin executable in OpenGL2 mode with the slight difference that it uses ''egl'' instead of ''glx'' as the native platform interface. To test kwin_gles you just have to run {{ic|kwin_gles --replace}} in Konsole.<br />
If you want to make this change permanent you have to create a script in {{ic|$(kde4-config --localprefix)/env/}} which exports {{ic|1=KDEWM=kwin_gles}}.<br />
<br />
=== Enabling audio/video thumbnails under Konqueror/Dolphin file managers ===<br />
<br />
For thumbnails of videos in konqueror and dolphin install {{Pkg|kdemultimedia-mplayerthumbs}} or {{Pkg|kdemultimedia-ffmpegthumbs}} and activate the installed package in <br />
Settings> Configure Konqueror> General> Previews> Video Files<br />
For thumbnails of audio files in Konqueror and Dolphin install {{AUR|audiothumbs}} from AUR.<br />
<br />
=== Speed up application startup ===<br />
<br />
User Rob described a "[http://kdemonkey.blogspot.nl/2008/04/magic-trick.html magic trick]" on his blog to improve application start-up time by 50-150ms.<br />
To enable it, create this folder in your home:<br />
$ mkdir ~/.compose-cache/<br />
It can produce freezes under heavy io. To avoid this, also do:<br />
$ ln -sfv /run/user/$UID/ /home/$USER/.compose-cache<br />
<br />
{{Note|For those curious about what is going on here, this enables an optimization which Lubos (of general KDE speediness fame) came up with some time ago and was then rewritten and integrated into libx11. Ordinarily, on startup, applications read input method information from {{ic|/usr/share/X11/locale/''your locale''/Compose}}. This file is quite long (>5000 lines for the en_US.UTF-8 one) and takes some time to process. libX11 can create a cache of the parsed information which is much quicker to read subsequently, but it will only re-use an existing cache or create a new one in {{ic|~/.compose-cache}} if the directory already exists.}}<br />
<br />
=== Hiding partitions ===<br />
<br />
In Dolphin, it is as simple as right-clicking on the partition in the {{ic|Places}} sidebar and selecting {{ic|Hide ''partition''}}. Otherwise...<br />
<br />
If you wish to prevent your internal partitions from appearing in your file manager, you can create an udev rule, e.g:<br />
<br />
{{hc|/etc/udev/rules.d/10-local.rules|2=<br />
KERNEL=="sda[0-9]", ENV{UDISKS_IGNORE}="1"<br />
}}<br />
<br />
The same thing for a certain partition:<br />
<br />
KERNEL=="sda1", ENV{UDISKS_IGNORE}="1"<br />
KERNEL=="sda2", ENV{UDISKS_IGNORE}="1"<br />
<br />
=== Konqueror tips ===<br />
<br />
==== Disabling Access Keys ====<br />
<br />
Every time you pressing the Ctrl key while browsing, small square tooltips appear for each of the active areas (hyperlinks) on a webpage. This is useful when you browsing with only a keyboard.<br />
<br />
To disable Access Keys, go to ''Settings > Configure Konqueror > Web Browsing'' and uncheck ''Enable Access Key activation with Ctrl key''.<br />
<br />
==== Using WebKit ====<br />
<br />
WebKit is an open source browser engine developed by Apple Inc. It is a derivative from the KHTML and KJS libraries and contains many improvements. WebKit is used by Safari, Google Chrome and rekonq.<br />
<br />
It is possible to use WebKit in Konqueror instead of KHTML. First install the {{Pkg|kwebkitpart}} package.<br />
<br />
Then, after executing Konqueror, navigate to ''Settings > Configure Konqueror > General > Default web browser engine'' and set it as {{ic|WebKit}}.<br />
<br />
=== Firefox integration ===<br />
<br />
See [[Firefox#KDE_integration|Firefox]].<br />
<br />
=== Setting the background for lock screen ===<br />
<br />
In Plasma 5, you can set a custom wallpaper for the lock screen. This is [https://bugs.kde.org/show_bug.cgi?id=312828 not possible] in KDE 4, but here a workaround from OpenSUSE mailing lists: http://lists.opensuse.org/opensuse-kde/2013-02/msg00082.html<br />
<br />
For this you should modify the file {{ic|/usr/share/kde4/apps/ksmserver/screenlocker/org.kde.passworddialog/contents/ui/main.qml}}, replacing a line<br />
<br />
source: theme.wallpaperPathForSize(parent.width, parent.height)<br />
<br />
with something like<br />
<br />
source: "1920x1080.jpg"<br />
<br />
Now you simply put a wallpaper image {{ic|1920x1080.jpg}} to the {{ic|/usr/share/kde4/apps/ksmserver/screenlocker/org.kde.passworddialog/contents/ui}} directory.<br />
<br />
{{Note|You have to redo this for each update of the package {{Pkg|kdebase-workspace}}.}}<br />
<br />
=== Setting lockscreen wallpaper to arbitrary image ===<br />
<br />
Copy an existing wallpaper profile as a template:<br />
$ cp -r /usr/share/wallpapers/''ExistingWallpaper'' ~/.kde4/share/wallpapers/<br />
<br />
Change the name of the directory, and edit {{ic|metadata.desktop}}:<br />
<br />
{{hc|~/.kde4/share/wallpapers/''MyWallpaper''/metadata.desktop|2=<br />
[Desktop Entry]<br />
Name=MyWallpaper<br />
X-KDE-PluginInfo-Name=MyWallpaper<br />
}}<br />
<br />
Remove existing images ({{ic|contents/screenshot.png}} and {{ic|images/*}}):<br />
$ rm ~/.kde4/share/wallpapers/MyWallpaper/contents/screenshot.png<br />
$ rm ~/.kde4/share/wallpapers/MyWallpaper/contents/images/*<br />
<br />
Copy new image in:<br />
$ cp ''path/to/MyWallpaper.png'' MyWallpaper/contents/images/1920x1080.png<br />
<br />
Edit the metadata profile for the current theme:<br />
{{hc|~/.kde4/share/apps/desktoptheme/MyTheme/metadata.desktop|2=<br />
[Wallpaper]<br />
defaultWallpaperTheme=MyWallpaper<br />
defaultFileSuffix=.png<br />
defaultWidth=1920<br />
defaultHeight=1080<br />
}}<br />
<br />
Lock the screen to check that it worked.<br />
<br />
{{Note|This method sets the lockscreen background without changing any system-wide settings. For a system-wide change, create the new wallpaper profile in {{ic|/usr/share/wallpapers}}.}}<br />
<br />
=== Configuring monitor resolution / multiple monitors ===<br />
<br />
To enable display resolution management and multiple monitors in Plasma 5, install {{Pkg|kscreen}}. This adds the additional options to System Settings/Display and Monitor.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Configuration related ===<br />
<br />
Many problems in KDE are related to configuration. One way to resolve upgrade problems is to start over with a fresh KDE config.<br />
<br />
==== Reset all KDE configuration ====<br />
<br />
To test whether your config is the problem try quitting your KDE session by logging out and, in a tty, run<br />
$ cp -r ~/.kde4 ~/.kde4.safekeeping<br />
$ rm .kde4/{cache,socket,tmp}-$(hostname)<br />
<br />
The ''rm'' command just removes symbolic links which will be recreated by KDE automatically. Now start a new KDE session to see the results.<br />
<br />
If the problem is resolved, you will have a fresh, problem-free {{ic|~/.kde4/}}. You can gradually move parts of your saved configuration back, restarting your session regularly to test, to identify the problematic parts of your config. Some files here are named after applications so you will probably be able to test these without needing to restart KDE.<br />
<br />
==== Plasma desktop behaves strangely ====<br />
<br />
Plasma problems are usually caused by unstable '''plasmoids''' or '''plasma themes'''. First, find which was the last plasmoid or plasma theme you had installed and disable it or uninstall it.<br />
<br />
So, if your desktop suddenly exhibits "locking up", this is likely caused by a faulty installed widget. If you cannot remember which widget you installed before the problem began (sometimes it can be an irregular problem), try to track it down by removing each widget until the problem ceases. Then you can uninstall the widget, and file a bug report (bugs.kde.org) '''only if it is an official widget'''. If it is not, it is recommended you find the entry on kde-look.org and inform the developer of that widget about the problem (detailing steps to reproduce, etc).<br />
<br />
If you cannot find the problem, but you do not want ''all'' the KDE settings to be lost, do:<br />
<br />
$ rm -r ~/.kde4/share/config/plasma*<br />
<br />
This command will '''delete all plasma related configs''' of your user and when you will relogin into KDE, you will have the '''default''' settings back. You should know that this action '''cannot be undone'''. You should create a backup folder and copy all the plasma related configs in it.<br />
<br />
==== Clean cache to resolve upgrade problems ====<br />
<br />
The [https://bbs.archlinux.org/viewtopic.php?id=135301 problem] may be caused by old cache. Sometimes after an upgrade, the old cache might introduce strange, hard to debug behaviour such as unkillable shells, hangs when changing various settings and several other problems such as ark being unable to unrar or unzip or amarok not recognizing any of your musics. This solution can also resolve problems with KDE and QT programmes looking bad following upgrade.<br />
<br />
Rebuild your cache with the following commands:<br />
<br />
$ rm ~/.config/Trolltech.conf<br />
$ kbuildsycoca4 --noincremental<br />
<br />
Hopefully, your problems are now fixed.<br />
<br />
=== Clean akonadi configuration to fix KMail ===<br />
<br />
First, make sure that KMail is not running. Then backup configuration:<br />
$ mv ~/.local/share/akonadi ~/.local/share/akonadi-old<br />
$ mv ~/.config/akonadi ~/.config/akonadi-old<br />
<br />
Start ''SystemSettings > Personal'' and remove all the resources. Go back to Dolphin and remove the original {{ic|~/.local/share/akonadi}} and<br />
{{ic|~/.config/akonadi}} - the copies you made ensure that you can back-track if necessary.<br />
<br />
Now go back to the System Settings page and carefully add the necessary resources. You should see the resource reading in your mail folders. Then start Kontact/KMail to see if it work properly.<br />
<br />
=== Getting current state of KWin for support and debug purposes ===<br />
<br />
This command prints out a wonderful summary of the current state of KWin including used options, used compositing backend and relevant OpenGL driver capabilities. See more on [http://blog.martin-graesslin.com/blog/2012/03/on-getting-help-for-kwin-and-helping-kwin/ Martin's blog].<br />
<br />
$ qdbus org.kde.kwin /KWin supportInformation<br />
<br />
=== KDE4 does not finish loading ===<br />
<br />
There might be a situation in which the graphic driver might create a conflict when starting KDE4. This situation happens after the login but before finishing loading the desktop, making the user wait indefinitely at the loading screen. Until now the only users confirmed to be affected by this are the ones that use [[NVIDIA|Nvidia drivers]] and KDE4.<br />
<br />
A solution for Nvidia users:<br />
<br />
{{hc|~/.kde4/share/config/kwinrc|2=<br />
[Compositing]<br />
Enabled=false<br />
}}<br />
For more information, see [https://bbs.archlinux.org/viewtopic.php?pid=932598 this] thread.<br />
<br />
If a minimal install was done, make sure you installed the required font by your phonon backend listed here: [[#Minimal install]]<br />
<br />
=== KDE and Qt programs look bad when in a different window manager ===<br />
<br />
If you are using KDE or Qt programs but not in a full KDE session (specifically, you did not run {{ic|startkde}}), then as of KDE 4.6.1 you will need to tell Qt how to find KDE's styles (Oxygen, QtCurve etc.)<br />
<br />
You just need to set the environment variable {{ic|QT_PLUGIN_PATH}}. E.g. put:<br />
<br />
export QT_PLUGIN_PATH=$HOME/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/<br />
<br />
into your {{ic|/etc/profile}} (or {{ic|~/.profile}} if you do not have root access). {{ic|qtconfig-qt4}}should then be able to find your KDE styles and everything should look nice again!<br />
<br />
Alternatively, you can symlink the Qt styles directory to the KDE styles one:<br />
# ln -s /usr/lib/kde4/plugins/styles/ /usr/lib/qt4/pluginlib32-libdbusmenu-glibs/styles<br />
<br />
Under Gnome you can try to install the package libgnomeui.<br />
<br />
=== Graphical related problems ===<br />
<br />
==== Low 2D desktop performance (or) artifacts appear when on 2D ====<br />
<br />
===== GPU driver problem =====<br />
<br />
Make sure you have the proper driver for your card installed, so that your desktop is at least 2D accelerated. Follow these articles for more information: [[ATI]], [[NVIDIA]], [[Intel]] for more information, in order to make sure that everything is all right.<br />
The open-source ATI and Intel drivers and the proprietary (binary) Nvidia driver should theoretically provide the best 2D and 3D acceleration.<br />
<br />
===== The Raster engine workaround =====<br />
<br />
If this does not solve your problems, your driver may not provide a good '''XRender''' acceleration which the current Qt painter engine relies on by default.<br />
<br />
You can change the painter engine to software based only by invoking the application with the {{ic|-graphicssystem raster}} command line. This rendering engine can be set as the default one by recompiling Qt with the same as configure option, {{ic|-graphicssystem raster}}.<br />
<br />
The raster paint engine enables the CPU to do the majority of the painting, as opposed to the GPU. You may get better performance, depending on your system. This is basically a work-around for the terrible Linux driver stack, since the CPU should obviously not be doing graphical computations since it is designed for fewer threads of greater complexity, as opposed to the GPU which is many threads but lesser computational strength. So, only use Raster engine if you are having problems or your GPU is much slower than you CPU, otherwise is better to use XRender.<br />
<br />
Since Qt 4.7+, recompiling Qt is not needed. Simply export {{ic|1=QT_GRAPHICSSYSTEM=raster}}, or {{ic|opengl}}, or {{ic|native}} (for the default). Raster depends on the CPU, OpenGL depends on the GPU and high driver support, and Native is just using the X11 rendering (mixture, usually).<br />
<br />
'''The best and automatic way to do that''' is to install {{AUR|kcm-qt-graphicssystem}} from AUR and configure this particular Qt setting through:<br />
<br />
System Settings > Qt Graphics System<br />
<br />
For more information, consult this [http://apachelog.wordpress.com/2010/09/05/qt-graphics-system-kcm/ KDE Developer blog entry] and/or this [http://labs.trolltech.com/blogs/2009/12/18/qt-graphics-and-performance-the-raster-engine/ Qt Developer blog entry].<br />
<br />
==== Low 3D desktop performance====<br />
<br />
KDE begins with desktop effects enabled. Older cards may be insufficient for 3D desktop acceleration. You can disable desktop effects in:<br />
System Settings > Desktop Effects<br />
and you can toggle desktop effects with {{ic|Alt+Shift+F12}}.<br />
<br />
{{Note| You may encounter such problems with 3D desktop performance even when using a more powerful graphics card, especially the catalyst proprietary driver ({{ic|fglrx}}). This driver is known for having problems with 3D acceleration. Visit [[ATI|the ATI Wiki page]] for more troubleshooting.}}<br />
<br />
==== Desktop compositing is disabled on my system with a modern Nvidia GPU ====<br />
<br />
Sometimes, KWin may have settings in its configuration file ({{ic|kwinrc}}) that ''may'' cause a problem on re-activating the 3D desktop {{ic|OpenGL}} compositing. That could be caused randomly (for example, due to a sudden Xorg crash or restart, and it gets corrupted), so, in case that happens, delete your {{ic|~/.kde4/share/config/kwinrc}} file and relogin. The KWin settings will turn to the KDE default ones and the problem should be probably gone.<br />
<br />
==== Flickering in fullscreen when compositing is enabled ====<br />
<br />
As of KDE SC 4.6.0, there is an option in ''Sytem Settings > Desktop Effect > Advanced > Suspend desktop effects for fullscreen windows''. Uncheck it would tell kwin to disable unredirect fullscren.<br />
<br />
==== Screen Tearing with desktop compositing enabled ====<br />
<br />
KWin may suffer from [[Wikipedia:Screen tearing|screen tearing]] while desktop effects are enabled. Uncheck the VSync option under ''System Settings > Desktop Effects > Advanced > Use Vsync''.<br />
<br />
{{Note|With the release of KDE 4.11, several new Vsync options have been added, which may help with screen tearing.}}<br />
<br />
For proprietary driver users, ensure that the driver's VSync option is enabled (''amdccle'' for [[Catalyst]] users, and ''nvidia-settings'' for [[NVIDIA]] users).<br />
<br />
==== Display settings lost on reboot (multiple monitors) ====<br />
There is a [https://bugs.kde.org/show_bug.cgi?id=346961 bug] in kscreen that makes it forget dual screen settings after reboot with certain displays.<br />
A possible workaround is to delete kscreen and make sure that your screen resolution is specified in a xorg.conf file:<br />
* For Nouveau you can use the template at [[Nouveau#Dual Head]], just edit it to suit your setup.<br />
* For the proprietary nvidia driver you can use the [[NVIDIA#Using_NVIDIA_Settings|nvidia-settings]] utility as root to write the config file.<br />
<br />
''' Other suggestion '''<br />
<br />
Installing {{Pkg|kscreen4}} might fix the problem unless your screens share the same EDID. Kscreen is the improved screen management software for KDE, more information can be found [https://fedoraproject.org/wiki/Changes/KScreen?rd=Features/KScreen here].<br />
<br />
=== Sound problems under KDE ===<br />
<br />
==== ALSA related problems ====<br />
<br />
{{Note|First make sure you have {{Pkg|alsa-lib}} and {{Pkg|alsa-utils}} installed.}}<br />
<br />
===== "Falling back to default" messages when trying to listen to any sound in KDE =====<br />
<br />
When you encounter such messages:<br />
The audio playback device ''name_of_the_sound_device'' does not work.<br />
Falling back to default<br />
Go to:<br />
System Settings > Multimedia > Phonon<br />
and set the device named {{ic|default}} above all the other devices in each box you see.<br />
<br />
===== MP3 files cannot be played when using the GStreamer Phonon backend =====<br />
<br />
This can be solved by installing the GStreamer libav plugin (package {{Pkg|gst-libav}}). If you still encounter problems, you can try changing the Phonon backend used by installing another such as {{Pkg|phonon-qt4-vlc}} or {{Pkg|phonon-qt5-vlc}}.<br />
Then, make sure the backend is preferred via:<br />
<br />
System Settings > Multimedia > Phonon > Backend (tab)<br />
<br />
=== Konsole does not save commands' history ===<br />
<br />
By default console command history is saved only when you type 'exit' in console. When you close Konsole with 'x' in the corner it does not happen.<br />
To enable autosaving after every command execution:<br />
<br />
{{hc|~/.bashrc|<nowiki><br />
shopt -s histappend<br />
[[ "${PROMPT_COMMAND}" ]] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a"<br />
</nowiki>}}<br />
<br />
=== KDE password prompts display three bullets per char ===<br />
<br />
This setting can be changed at ''System Settings > Account Details > Password & User Account'':<br />
* Show one bullet for each letter<br />
* Show three bullets for each letter<br />
* Show nothing<br />
<br />
=== Dolphin and File Dialogs are extremely slow to start ===<br />
<br />
This may be caused by the upower service. If the upower service is not needed on your system, it can be disabled:<br />
<br />
# systemctl disable upower<br />
# systemctl mask upower<br />
<br />
Obviously this will not have any side effect on a desktop system.<br />
<br />
=== Default PDF viewer in GTK applications under KDE ===<br />
<br />
In some cases when you have installed [[Inkscape]], [[Gimp]] or other graphic programs, GTK applications ([[Firefox]] among all) might not select Okular as the default PDF application, and they are not going to follow the KDE settings on default applications. You can use the following user command to make Okular the default application again.<br />
<br />
$ xdg-mime default kde4-okularApplication_pdf.desktop application/pdf<br />
<br />
If you are using a different PDF viewer application, or a different mime-type is misbehaving, you should change {{ic|kde4-okularApplication_pdf.desktop}} and {{ic|application/pdf}} respectively according to your needs.<br />
<br />
For more information, consult [[Default applications]] wiki page.<br />
<br />
=== Inotify folder watch limit ===<br />
<br />
If you get the following error:<br />
<br />
KDE Baloo Filewatch service reached the inotify folder watch limit. File changes may be ignored.<br />
<br />
Then you will need to increase the inotify folder watch limit:<br />
<br />
# echo 10000 > /proc/sys/fs/inotify/max_user_watches<br />
<br />
To make changes permanent, create {{ic|/etc/sysctl.d/90-inotify.conf}} with<br />
<br />
#increase inotify watch limit<br />
fs.inotify.max_user_watches = 10000<br />
<br />
=== GTK+ 2 applications react slowly to user input ===<br />
<br />
If you are using [[GTK+]] 2 applications such as [[firefox]] or [[eclipse]] under KDE and you are experiencing slow responses to user input (for example, when opening a popup menu or switching tabs), try using a different GTK+ 2 theme. For instance, {{Pkg|gtk-engines}} contains the popular ''Clearlooks'' theme. The theme can be applied in KDE System Settings - or alternatively refer to [[GTK+#GTK+ 2.x]].<br />
<br />
== Unstable releases ==<br />
<br />
When KDE is reaching beta or RC milestone, KDE "unstable" packages are uploaded to the ''kde-unstable'' repository. They stay there until KDE is declared stable and passes to the ''extra'' repository.<br />
<br />
You can add ''kde-unstable'' with:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
[kde-unstable]<br />
Include = /etc/pacman.d/mirrorlist<br />
}}<br />
<br />
{{Warning|Make sure to add these lines '''before''' the ''extra'' repository. Adding the section after ''extra'' will cause [[pacman]] to prefer the older packages in the extra repository. {{ic|pacman -Syu}} will not install them, and will warn that they are "too new" if installed manually. Also, some of the libraries will stay at the older versions, which may cause file conflicts and/or instability!}}<br />
<br />
# ''kde-unstable'' is based upon ''testing''. Therefore, you need to enable the repositories in the following order: ''kde-unstable'', ''testing'', ''core'', ''extra'', ''community-testing'', ''community''.<br />
# To update from a previous KDE installation, run: {{ic|# pacman -Syu}} or {{ic|# pacman -S kde-unstable/kde}}<br />
# If you do not have KDE installed, you might have difficulties to install it by using groups (limitation of pacman)<br />
# '''Subscribe and read the [https://mailman.archlinux.org/pipermail/arch-dev-public/ arch-dev-public] mailing list'''<br />
# Make sure [[#Bugs|you make bug reports]] if you find any problems.<br />
<br />
== KDE forks ==<br />
<br />
=== Trinity ===<br />
<br />
From the release of KDE 4.x, the developers dropped support for KDE 3.5.x. Trinity Desktop Environment is a fork of KDE3 developed by Timothy Pearson ([http://trinitydesktop.org/ trinitydesktop.org]). This project aims to keep the KDE3.5 computing style alive, as well as polish off any rough edges that were present as of KDE 3.5.10. See [[Trinity]] for more info.<br />
<br />
== Bugs ==<br />
<br />
It is preferrable that if you find a minor or serious bug, you should visit [https://bugs.archlinux.org the Arch Bug Tracker] or/and [http://bugs.kde.org KDE Bug Tracker] in order to report that. Make sure that you are clear about what you want to report.<br />
<br />
If you have any problem and you write about in on the Arch forums, first make sure that you have '''fully''' updated your system using a good sync mirror (check [https://www.archlinux.de/?page=MirrorStatus here]) or try [[Reflector]].<br />
<br />
== See also ==<br />
<br />
* [http://www.kde.org KDE homepage]<br />
* [https://bugs.kde.org KDE bug tracker]<br />
* [https://projects.kde.org KDE Projects]<br />
* [http://blog.martin-graesslin.com/blog/kategorien/kde/ Martin Graesslin's blog]</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Steam/Game-specific_troubleshooting&diff=369166Steam/Game-specific troubleshooting2015-04-09T23:44:49Z<p>Cilyan: /* Unity3D */</p>
<hr />
<div>[[Category:Gaming]]<br />
[[ja:Steam/ゲーム別のトラブルシューティング]]<br />
{{Poor writing|Lots of content duplication, highly dubious "solutions"}}<br />
{{Note|[[Steam]] installs library dependencies of a game to a library directory, but some are missing at the moment. Report bugs involving missing libraries on Valve's bug tracker on their [https://github.com/ValveSoftware/steam-for-linux GitHub page] before adding workarounds here, and then provide a link to the bug so it can be removed as the problems are fixed.}}<br />
{{Tip|If a game fails to start, a possible reason is that it is missing required libraries. You can find out what libraries it requests by running {{ic|ldd ''game_executable''}}. {{ic|''game_executable''}} is likely located somewhere in {{ic|~/.steam/root/SteamApps/common/}}. Please note that most of these "missing" libraries are actually already included with Steam, and do not need to be installed globally.}}<br />
<br />
==Amnesia: The Dark Descent==<br />
===Dependencies===<br />
* {{AUR|lib32-freealut}}<br />
* {{pkg|lib32-glu}}<br />
* {{pkg|lib32-libxmu}}<br />
* {{pkg|lib32-sdl_ttf}}<br />
<br />
==And Yet It Moves==<br />
===Dependencies===<br />
* {{AUR|lib32-libtheora}}<br />
* {{AUR|lib32-libjpeg6}}<br />
* {{AUR|lib32-libtiff4}}<br />
* {{AUR|lib32-libpng12}}<br />
<br />
===Compatibility===<br />
Game refuses to launch and one of the following messages can be observed on console<br />
readlink: extra operand ‘Yet’<br />
Try 'readlink --help' for more information.<br />
OR<br />
This script must be run as a user with write priviledges to game directory<br />
To fix this, use:<br />
{{hc|~/.steam/root/SteamApps/common/And Yet It Moves/AndYetItMovesSteam.sh|<nowiki><br />
#ayim_dir="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"<br />
ayim_dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"<br />
</nowiki>}}<br />
<br />
==Anodyne==<br />
===Dependencies===<br />
* {{AUR|adobe-air-sdk}}<br />
* {{pkg|xterm}} (probably not actually required)<br />
<br />
===Compatibility===<br />
Follow the same steps as [[#Defender.27s_Quest:_Valley_of_the_Forgotten|Defender's Quest]]<br />
<br />
==Aquaria==<br />
<br />
=== Mouse pointer gets stuck in one direction ===<br />
If the mouse pointer gets stuck in any one direction, the game becomes unplayable. You may try:<br />
{{hc|~/.local/share/Steam/SteamApps/common/Aquaria/usersettings.xml|<nowiki><br />
#<JoystickEnabled on=”1″ /><br />
<JoystickEnabled on=”0″ /></nowiki>}}<br />
<br />
If that does not fix the issue, unplug any joystick or joystick adapter devices you may have plugged in.<br />
<br />
==Binding of Isaac: Rebirth==<br />
===Troubleshooting===<br />
====No sound====<br />
Right click on {{ic|Binding of Isaac: Rebirth}} on your game list, click on {{ic|Properties}}, click on {{ic|SET LAUNCH OPTIONS}}, then add this: <br />
LD_LIBRARY_PATH="/usr/lib:$LD_LIBRARY_PATH" %command%<br />
<br />
In the game, go to the options and set all audio to the proper volume.<br />
<br />
==Borderlands 2==<br />
Steam Cloud syncing does not (intentionally) work between platforms. With that said gave save files can be manually moved between systems. Save locations can be found here: http://pcgamingwiki.com/wiki/Borderlands_2#Game_data. Once backed up to a FAT32 or other cross-compatible file-system thumbdrive (or the cloud), move the saved files to your GNU/Linux system, locate your saved file location, and move into the 17-digit long numeric file name. If previous saves on your GNU/Linux system can be deleted you can do so now. The key fix that I found was a need to change the ownership, group, and permissions. I used {{ic|chown steam:steam *}} and then {{ic|chmod 0660 *}} to get my moved saved files to work.<br />
<br />
<br />
==Borderlands the Pre-Sequel==<br />
Borderlands the Pre-Sequle (and maybe Borderlands 2) might not be able to connect to the Gearbox SHIFT-service, this is related to a wrong path to the available SSL certificates. This can be solved by creating a symbolic link from {{ic|/etc/ssl}} to {{ic|/usr/lib/ssl}}. See [http://steamcommunity.com/app/49520/discussions/0/616189742722687689/#c616189742811551908 this comment on the steam dissuscion forum].<br />
<br />
==Cities in Motion 2==<br />
<br />
=== Dialog boxes fail to display properly ===<br />
<br />
You will not be able to read or see anything, and you will have this in your logs:<br />
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 69: non-double matrix element<br />
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 69: wrong number of matrix elements<br />
<br />
Workaround for the bug {{Bug|35039}} is available [http://bpaste.net/show/167019/ here] (replace {{ic|/etc/fonts/conf.d/10-scale-bitmap-fonts.conf}}).<br />
<br />
== Civilization V==<br />
<br />
=== Stuttering sound with PulseAudio ===<br />
<br />
See [[PulseAudio/Troubleshooting#Laggy_sound]].<br />
<br />
== Counter-Strike: Global Offensive ==<br />
<br />
=== Game runs on the wrong screen ===<br />
<br />
[https://github.com/ValveSoftware/Counter-Strike-Global-Offensive/issues/60 GitHub Counter-Strike: Global Offensive issue #60]<br />
<br />
If it happens, you can fix it by going into fullscreen windowed or windowed mode and then dragging the game onto the correct monitor. After you go back in fullscreen, the game should be on the correct monitor.<br />
<br />
=== Audio is not synced ===<br />
<br />
[https://github.com/ValveSoftware/Counter-Strike-Global-Offensive/issues/45 GitHub Counter-Strike: Global Offensive issue #45]<br />
<br />
See [[PulseAudio/Troubleshooting#Laggy_sound]] for a possible solution.<br />
<br />
=== Unable to aim when in game ===<br />
<br />
Unable to aim when in game. However, the mouse cursor does works in GUI such as main menu, game menu, etc.<br />
Add this line to your {{ic|.bash_profile}} and relogin:<br />
<br />
export SDL_VIDEO_X11_DGAMOUSE=0<br />
<br />
See also [https://bbs.archlinux.org/viewtopic.php?id=184905].<br />
<br />
==Crusader Kings II==<br />
Game is installed into {{ic|$HOME/Steam/SteamApps/common/Crusader Kings II}}.<br />
Game can be started directly, without need of running Steam on background, using command {{ic|$HOME/Steam/SteamApps/common/Crusader Kings II/ck2}}.<br />
<br />
Saves are stored in {{ic|$HOME/Documents/Paradox Interactive/Crusader Kings II/save games/}}.<br />
In the newest version (2.03), save-game files seem to be stored to {{ic|$HOME/.paradoxinteractive/Crusader Kings II/}}. If your documents folder is empty, try looking there.<br />
<br />
===Troubleshooting===<br />
====No audio====<br />
The default audio driver used by Crusader Kings 2 is for [[PulseAudio]], so an override is necessary:<br />
<br />
{{hc|~/.pam_environment|2=SDL_AUDIODRIVER=alsa}}<br />
====Odd Sized Starting Window====<br />
Enable full screen mode as the default. In {{ic|~/.paradoxinteractive/Crusader Kings II/settings.txt}} change fullscreen=no to fullscreen=yes.<br />
<br />
==Defender's Quest: Valley of the Forgotten==<br />
===Dependencies===<br />
* {{AUR|adobe-air-sdk}}<br />
* {{pkg|xterm}}<br />
* {{pkg|lib32-libcanberra}}<br />
<br />
===Troubleshooting===<br />
====Game does not start====<br />
* Package {{AUR|adobe-air-sdk}} installs Adobe Air not in the place where the game expects it to be, fix this by creating a symlink (requires root permissions):<br />
{{bc|$ ln -s /opt/adobe-air-sdk/runtimes/air/linux/Adobe\ AIR /opt/Adobe\ AIR}}<br />
<br />
* Adobe AIR will want to check whether the EULA was accepeted and fail in doing so. To fix it, issue the following commands (from under your user, not under root):<br />
{{bc|$ mkdir -p ~/.appdata/Adobe/AIR<br />
$ echo 2 > ~/.appdata/Adobe/AIR/eulaAccepted}}<br />
{{Note|By issuing these commands you're accepting Adobe Air's EULA.}}<br />
<br />
==Don't Starve==<br />
===Dependencies (x86_64)===<br />
* {{pkg|lib32-flashplugin}}<br />
* {{pkg|lib32-alsa-plugins}} (Looks like it fixes sound in some cases. See [https://github.com/ValveSoftware/steam-for-linux/issues/2968 this github issue] for details)<br />
===Troubleshooting===<br />
====No sound====<br />
Right click on Don't Starve on your game list, click on Properties, click on SET LAUNCH OPTIONS, then add this: <br />
LD_LIBRARY_PATH="/usr/lib:$LD_LIBRARY_PATH" %command%<br />
<br />
On the game, go to the option and set all audio to the proper volume.<br />
<br />
==Dota 2==<br />
===Dependencies (x86_64)===<br />
* {{pkg|lib32-openal}}<br />
* {{pkg|lib32-libpulse}} (if you use PulseAudio)<br />
* {{pkg|lib32-fontconfig}}<br />
<br />
===Troubleshooting===<br />
====In-game font is unreadable====<br />
Start Steam (or Dota 2) with the environment variable:<br />
MESA_GL_VERSION_OVERRIDE=2.1<br />
<br />
====Everything seems OK but the game doesn't start====<br />
If you run the game from the terminal and, although no error is shown, the '''disabling''': ''Steam > Settings > In-Game > Enable Steam Community In-Game''.<br />
Apparently the game [[#The Book of Unwritten Tales|The Book of Unwritten Tales]] has the same problem. It also describes a workaround that is untested in Dota 2.<br />
<br />
====Game runs on the wrong screen====<br />
:[https://github.com/ValveSoftware/Dota-2/issues/11 GitHub Dota 2 issue #11]<br />
<br />
==== Game does not start with libxcb-dri3 error message ====<br />
After a recent Mesa update, Dota 2 stopped working. The error message is:<br />
SDL_GL_LoadLibrary(NULL) failed: Failed loading libGL.so.1: /usr/lib32/libxcb-dri3.so.0: undefined symbol: xcb_send_fd<br />
Simply remove the bundled libxcb to force Steam to use the system-wide version. Restart Steam to apply.<br />
$ find ~/.local/share/Steam -name 'libxcb*' -type f | grep -v installed | xargs rm<br />
:[https://github.com/ValveSoftware/steam-for-linux/issues/3204 GitHub Steam issue #3204]<br />
<br />
==== Steam overlay ====<br />
Steam distributes a copy of libxcb which is incompatible with the latest xorg libxcb. If you're having issues with steam overlay and on recent xorg try removing the bundled lib.<br />
mv ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libxcb.so.1 /tmp/libxcb.so.1.bak<br />
See more information here:<br />
:[https://github.com/ValveSoftware/steam-for-linux/issues/3199]<br />
:[https://github.com/ValveSoftware/steam-for-linux/issues/3093]<br />
<br />
==Dwarfs F2P==<br />
===Dependencies===<br />
* {{AUR|lib32-libgdiplus}}<br />
<br />
===Troubleshooting===<br />
====Game does not start====<br />
There was a bug that stopped Steam from fetching all the needed files. It should be resolved, if you still bump into this problem, try verifying integrity of game cache from game properties, local files tab.<br />
<br />
If the game still crashes at startup, edit {{ic|~/.local/share/Steam/SteamApps/common/Dwarfs - F2P/Run.sh}} and change<br />
export LD_LIBRARY_PATH=.:${LD_LIBRARY_PATH}<br />
to<br />
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:.<br />
{{Note|This file may be overwritten by updates or by verifying integrity of game cache. You may need to modify it again.}}<br />
<br />
If these do not help, you may have outdated libraries in the game installation folder that are crashing the game on startup. Try moving/removing the following files out of {{ic|~/.local/share/Steam/SteamApps/common/Dwarfs - F2P/}} to fix it:<br />
<br />
libX11.so.6, libsteam.so libtier0_s.so, libvstdlib_s.so, steamclient.so<br />
<br />
====Game crashes====<br />
In some cases, the game crashes about 2 minutes before the end of every arcade. This bug has been reported, but there's no known solution to it.<br />
<br />
==Dynamite Jack==<br />
===Dependencies===<br />
* {{pkg|lib32-sdl}}<br />
<br />
===Troubleshooting===<br />
====Sound Issues====<br />
When running on 64-bit Arch Linux, there may be "pops and hisses" when running Dynamite Jack. This could be caused by not having {{ic|1=STEAM_RUNTIME=0}} set. (However, even with {{ic|1=STEAM_RUNTIME=0}} set, the game may still sometimes start with this issue. Exiting and restarting the game seems to make the problem go away.)<br />
<br />
====Game does not start====<br />
If running steam with the {{ic|1=STEAM_RUNTIME=0}}, Dynamite Jack may have a problem starting. Check the steam error messages for this message:<br />
/home/<USER>/.local/share/Steam/SteamApps/common/Dynamite Jack/bin/main: error while loading shared libraries: libSDL-1.2.so.0: cannot open shared object file: No such file or directory<br />
Install {{pkg|lib32-sdl}} from [[multilib]] and Dynamite Jack should start up.<br />
<br />
==Football Manager 2014==<br />
This game will not run when installed on an XFS or reiserfs filesystem. Workaround is to install on an ext4 filesystem.<br />
<br />
==FORCED==<br />
This game has 32-bit and 64-bit binaries. For unknown reason, steam will launch the 32-bit binary even on 64-bit Arch Linux.<br />
When manually launching the 64-bit binary, the game starts, but cannot connect to Steam account, so you cannot play.<br />
So install 32-bits dependencies, and launch the game from Steam.<br />
<br />
===Dependencies===<br />
* {{pkg|lib32-alsa-plugins}}<br />
* {{pkg|lib32-glu}}<br />
<br />
==FTL: Faster than Light==<br />
===Dependencies===<br />
Libraries are downloaded and and placed in the game's data directory for both architectures. As long as you run FTL by the launcher script (or via the shortcut in Steam) you should not need to download any further libraries.<br />
<br />
===Compatibility===<br />
After installation, FTL may fail to run due to a 'Text file busy' error (characterised in Steam by your portrait border going green then blue again). The easiest way to mend this is to just reboot your system. Upon logging back in FTL should run.<br />
<br />
The Steam overlay in FTL does not function as it is not a 3D accelerated game. Because of this the desktop notifications will be visible. If playing in fullscreen, therefore, these notifications in some systems may steal focus and revert you back to windowed mode with no way of going back to fullscreen without relaunching. The binaries for FTL on Steam have no DRM and it is possible to run the game ''without'' Steam running, so in some cases that may be optimum - just ensure that you launch FTL via the launcher script in {{ic|~/.steam/root/SteamApps/common/FTL Faster than Light/data/}} rather than the FTL binary in the $arch directory.<br />
<br />
===Problems with open-source video driver===<br />
FTL may fail to run if you are using an opensource driver for your video card. There are two solutions: install a proprietary video driver or delete (rename if you are unsure) the library "libstdc++.so.6" inside {{ic|~/.steam/root/SteamApps/common/FTL\ Faster\ Than\ Light/data/amd64/lib}}. This is if you are using a 64bit system. In case you are using a 32bit system you have to remove (rename) the same library located into {{ic|~/.steam/root/SteamApps/common/FTL\ Faster\ Than\ Light/data/x86/lib}}.<br />
<br />
==Game Dev Tycoon==<br />
===Troubleshooting===<br />
====Game does not start====<br />
Error about missing libudev.so.0 might appear, solution:<br />
# ln -s /lib/libudev.so /lib/libudev.so.0<br />
<br />
==Garry's Mod==<br />
===Troubleshooting===<br />
====Game does not start====<br />
Error about missing client.so might appear, solution:<br />
cd SteamLibrary/SteamApps/common/GarrysMod/bin/<br />
ln -s libawesomium-1-7.so.0 libawesomium-1-7.so.2<br />
ln -s ../garrysmod/bin/client.so ./<br />
====Opening some menus causes the game to crash====<br />
Most menus work fine, but ones with checkboxes (LAN multiplayer, mounted games list) do not work at all. This is a bug in the menu code.<br />
<br />
If you prefer the default menu style and do not mind a hacky solution: [https://github.com/Facepunch/garrysmod-issues/issues/86#issuecomment-30935491 Simon311] has written code with instructions to fix it.<br />
<br />
If you do not care for the default menu style and want a more stable but feature-incomplete solution, Facepunch developer [https://github.com/robotboy655/gmod-lua-menu robotboy655] has written a new menu.<br />
<br />
==Half-Life 2 & episodes==<br />
===Cyrillic fonts problem===<br />
This problem can be solved by deleting "Helvetica" font.<br />
<br />
==Hammerwatch==<br />
===Troubleshooting===<br />
====The game not starting from Steam GUI====<br />
Right click on Hammerwatch on your game list, click on Properties, click on SET LAUNCH OPTIONS, then add this: <br />
LD_LIBRARY_PATH="/usr/lib:$LD_LIBRARY_PATH" %command%<br />
====No sound====<br />
Hammerwatch opens with a popup: "Sound Error" -- "Could not initialize OpenAL, no sounds will be played. Try updating your OpenAL drivers."<br />
<br />
OpenAL, which Hammerwatch uses, defaults to PulseAudio. To change that, add the following line to {{ic|/etc/openal/alsoft.conf}}:<br />
<br />
drivers=alsa,pulse<br />
<br />
This way, Hammerwatch will use ALSA. This solution was found [https://stackoverflow.com/questions/9547396/what-does-al-lib-pulseaudio-c612-context-did-not-connect-access-denied-me here].<br />
<br />
==Harvest: Massive Encounter==<br />
===Dependencies===<br />
* {{pkg|lib32-gtk2}}<br />
* {{pkg|lib32-libvorbis}}<br />
* {{pkg|lib32-openal}}<br />
* {{Pkg|lib32-nvidia-cg-toolkit}}<br />
* {{AUR|lib32-libjpeg6}}<br />
* {{AUR|lib32-sfml}}<br />
<br />
===Compatibility===<br />
Game refuses to launch and throws you to library installer loop. Just edit {{ic| ~/.steam/root/SteamApps/common/Harvest Massive Encounter/run_harvest}} and remove everything but<br />
#!/bin/bash<br />
exec ./Harvest<br />
<br />
==Invisible Apartment==<br />
===Dependencies===<br />
* {{pkg|qt5-multimedia}}<br />
<br />
===Game does not run===<br />
Game does not run if you try to launch it via Steam, but you can run it directly if you run the following in terminal<br />
/home/<username>/.steam/steam/SteamApps/common/Invisible\ Apartment/ia1<br />
where for <username> you put your Linux username.<br />
<br />
==Joe Danger 2: The Movie==<br />
===Dependencies===<br />
* {{pkg|lib32-libpulse}}<br />
* {{pkg|lib32-alsa-plugins}}<br />
<br />
===Compatibility===<br />
Game only worked after obtaining from the [https://www.humblebundle.com/ Humble Bundle] directly and {{pkg|lib32-libpulse}} was installed.<br />
<br />
==[[Kerbal Space Program]]==<br />
===Troubleshooting===<br />
=== Game never progresses past initial loading ===<br />
To fix this, set:<br />
LC_ALL=C<br />
<br />
=== No text display ===<br />
The game requires Arial and Arial Black fonts, provided in the {{AUR|ttf-ms-fonts}} [[AUR]] package.<br />
<br />
=== Graphics flickering when using primusrun ===<br />
Run with PRIMUS_SYNC=2 (but you will get reduced frame rate this way)<br />
<br />
=== Game crashes when accessing settings or saves on 64 bit systems on Steam ===<br />
In the properties for Kerbal Space program, set a launch option of:<br />
LC_ALL=C %command%_64<br />
<br />
=== Locale settings ===<br />
See https://bugs.kerbalspaceprogram.com/issues/504 if you have troubles with building Ships.<br />
<br />
=== No audio on 64-bit systems ===<br />
<br />
Run the 64-bit executable.<br />
<br />
Steam launches the KSP.x86 executable vs. the KSP.x86_64 executable. <br />
Navigate to:<br />
/home/$USER/.local/share/Steam/SteamApps/common/Kerbal\ Space\ Program/ <br />
Launch with:<br />
./KSP.x86_64<br />
<br />
Or you can simply right click on "Kerbal Space Program" in your game list, click ''Properties'', click ''SET LAUNCH OPTIONS'', then add this: <br />
LD_LIBRARY_PATH="/usr/lib:$LD_LIBRARY_PATH" LC_ALL=C %command%_64<br />
<br />
==Killing Floor==<br />
===Troubleshooting===<br />
====Screen resolution====<br />
Killing Floor runs pretty much from scratch, although you might have to change in-game resolution screen as the default one is '''800x600''' and a '''4:3''' screen format.<br />
If you try to modify screen resolution in-game, it might crash your desktop enviroment.<br />
To fix this, please set the desired resolution screen size by modifing your {{ic|~/.killingfloor/System/KillingFloor.ini}} with your prefered editor.<br />
{{hc|~/.killingfloor/System/KillingFloor.ini|<nowiki><br />
...<br />
<br />
[WinDrv.WindowsClient]<br />
WindowedViewportX=????<br />
WindowedViewportY=????<br />
FullscreenViewportX=????<br />
FullscreenViewportY=????<br />
MenuViewportX=???<br />
MenuViewportY=???<br />
<br />
...<br />
<br />
[SDLDrv.SDLClient]<br />
WindowedViewportX=????<br />
WindowedViewportY=????<br />
FullscreenViewportX=????<br />
FullscreenViewportY=????<br />
MenuViewportX=????<br />
MenuViewportY=????<br />
<br />
...<br />
</nowiki>}}<br />
{{Note|Replace all the {{ic|????}} with the corresponding numbers according the desired resolution. If you have an 1366x768 screen and want to use it at it's fullest, change all the Viewport fields to something like {{ic|ViewportX&#61;1366}} and {{ic|ViewportY&#61;768}} in the corresponding areas.}}<br />
{{Note| The dots in the middle indicate that there are more fields in that .ini file. But for screen resolution troubleshooting, you do not need to modify anything else.}}<br />
<br />
Save the file and restart the game, it should work now.<br />
<br />
====Windowed mode====<br />
Uncheck fullscreen in the options menu, and use {{ic|Ctrl+g}} to stop mouse capturing (that was non-obvious to discover..). This way you can easily minimize it and do other other things..and let your WM handle things.<br />
<br />
====Stuttering Sound====<br />
KillingFloor comes with its own libopenal.so (called openal.so). To use system lib instead install {{pkg|openal}} or {{pkg|lib32-openal }} (if using 64bit system).<br />
Then go to {{ic|$HOME/Steam/SteamApps/common/KillingFloor/System}}. and rename openal.so to openal.so.bak<br />
Then create symlink to /usr/lib32/libopenal.so.1 or /usr/lib/libopenal.so.1 called openal.so<br />
<br />
==Metro: Last Light==<br />
This game is not allowing to change its resolution on a multimonitor setup on GNOME with Catalyst drivers. <br />
===Attempted fixes===<br />
Various changes to the games config file was tried without success.<br />
{{ic|wmctrl}} was not able to force the games resolution.<br />
<br />
===Hacky solution===<br />
Disabled the side monitors.<br />
<br />
===Possible solutions===<br />
Jason over at [http://unencumberedbyfacts.com/2013/11/20/multiple-monitor-gaming-on-linux/ unencumbered by fact] is using Nvidia drivers on his multimonitor setup. However he notes he is using a single display server setup. This is being explored.<br />
<br />
==Multiwinia==<br />
===Dependencies===<br />
* {{pkg|lib32-openal}}<br />
<br />
==Natural Selection 2==<br />
Game mostly works out of the box.<br />
===No Sound===<br />
If there is no sound in-game. Try installing {{pkg|lib32-sdl}}, {{AUR|lib32-sdl2}}, and {{pkg|lib32-alsa-plugins}}<br />
<br />
If this fails, try setting the game's launch options in Steam to:<br />
LD_LIBRARY_PATH="/usr/lib32:$LD_LIBRARY_PATH" %command%<br />
<br />
==Penumbra: Overture==<br />
===Dependencies===<br />
(Taken from {{AUR|penumbra-collection}} and {{AUR|penumbra-overture-ep1-demo}})<br />
* {{pkg|lib32-glu}}<br />
* {{pkg|lib32-libxft}}<br />
* {{pkg|lib32-libvorbis}}<br />
* {{pkg|lib32-openal}}<br />
* {{pkg|lib32-sdl_ttf}}<br />
* {{pkg|lib32-sdl_image}}<br />
<br />
===Troubleshooting===<br />
====Windowed mode====<br />
There is no in-game option to change to the windowed mode, you will have to edit {{ic|~/.frictionalgames/Penumbra/Overture/settings.cfg}} to activate it.<br />
Find {{ic|FullScreen&#61;"true"}} and change it to {{ic|FullScreen&#61;"false"}}, after this the game should start in windowed mode.<br />
<br />
==Portal 2==<br />
===Troubleshooting===<br />
====Game does not start====<br />
If you get the error {{ic|PROBLEM: You appear to have OpenGL 1.4.0, but we need at least 2.0.0!}},<br />
<br />
Re/move {{ic|~/.local/share/Steam/SteamApps/common/Portal\ 2/bin/libstdc++.so.6}}.<br />
<br />
==Prison Architect==<br />
===Troubleshooting===<br />
====ALSA error when using PulseAudio====<br />
The error:<br />
{{ic|ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave}}<br />
was resolved by installing:<br />
* {{pkg|pulseaudio-alsa}} <br />
* {{pkg|lib32-alsa-plugins}}<br />
* {{pkg|lib32-libpulse}}<br />
per [[PulseAudio#ALSA]]<br />
<br />
==Project Zomboid==<br />
===Dependencies===<br />
* {{pkg|jre7-openjdk}}<br />
<br />
==Redshirt==<br />
===Dependencies (x86_64)===<br />
* {{pkg|lib32-libpulse}} (if you use PulseAudio)<br />
<br />
==Revenge of the Titans==<br />
===Dependencies===<br />
* {{pkg|libxtst}} and {{pkg|lib32-libxtst}}<br />
<br />
==Serious Sam 3: BFE==<br />
===Dependencies===<br />
* {{pkg|lib32-alsa-plugins}}<br />
<br />
===Troubleshooting===<br />
====No audio====<br />
Try running:<br />
# mkdir -p /usr/lib/i386-linux-gnu/alsa-lib/<br />
# ln -s /usr/lib32/alsa-lib/libasound_module_pcm_pulse.so /usr/lib/i386-linux-gnu/alsa-lib/<br />
<br />
If that does not work, try tweaking {{ic|~/.alsoftrc}} as proposed by the [http://steamcommunity.com/app/221410/discussions/3/846940248238406974/ Steam community] (Serious Sam 3: BFE uses OpenAL to output sound). If you are not using Pulse Audio, you may want to write the following configuration:<br />
<br />
{{hc|~/.alsoftrc|<nowiki><br />
[general]<br />
drivers = alsa<br />
[alsa]<br />
device = default<br />
capture = default<br />
mmap = true<br />
</nowiki>}}<br />
<br />
==Sir, you are being hunted==<br />
===Dependencies===<br />
* {{pkg|lib32-alsa-plugins}}<br />
<br />
==Spacechem==<br />
===Dependencies===<br />
* {{pkg|lib32-sqlite}}<br />
* {{pkg|lib32-sdl_image}}<br />
* {{AUR|lib32-sdl_mixer}}<br />
<br />
===Troubleshooting===<br />
====Game crash====<br />
The shipped x86 version of Spacechem does not work on x64 with the game's own libSDL* files, and crashes with some strange output.<br />
<br />
To solve this just remove or move the three files {{ic|libSDL-1.2.so.0}}, {{ic|libSDL_image-1.2.so.0}}, {{ic|libSDL_mixer-1.2.so.0}} from {{ic|~/.steam/root/SteamApps/common/SpaceChem}}<br />
<br />
==Space Pirates and Zombies==<br />
===Dependencies===<br />
* {{pkg|lib32-alsa-plugins}}<br />
* {{pkg|lib32-openal}}<br />
<br />
===Troubleshooting===<br />
====No audio====<br />
Try running:<br />
# mkdir -p /usr/lib/i386-linux-gnu/alsa-lib/<br />
# ln -s /usr/lib32/alsa-lib/libasound_module_pcm_pulse.so /usr/lib/i386-linux-gnu/alsa-lib/<br />
<br />
If that does not work, try tweaking {{ic|~/.alsoftrc}} as proposed by the Steam community (Serious Sam 3: BFE uses OpenAL to output sound). If you are not using Pulse Audio, you may want to write the following configuration:<br />
{{hc|~/.alsoftrc|<nowiki><br />
[general]<br />
drivers = alsa<br />
[alsa]<br />
device = default<br />
capture = default<br />
mmap = true<br />
</nowiki>}}<br />
<br />
==Splice==<br />
Splice comes with both x86 and x64 binaries. Steam does not have to be running to launch this game.<br />
===Dependencies===<br />
* {{pkg|glu}}<br />
<br />
==Steel Storm: Burning Retribution==<br />
===Troubleshooting===<br />
====Start with black screen====<br />
The game tries to launch in 1024x768 resolution with fullscreen mode by default. It is impossible on some devices.<br />
(for example laptop Samsung Series9 with intel hd4000 video).<br />
<br />
You can launch the game in windowed mode. To do this open game Properties in Steam, in General tab select "Set launch options..." and type "-window".<br />
<br />
Now you can change the resolution in game.<br />
<br />
====No English fonts====<br />
If you use Intel video card, just disable S3TC in DriConf.<br />
<br />
==Strike Suite Zero==<br />
===Dependencies===<br />
* {{pkg|lib32-alsa-plugins}}<br />
<br />
==Superbrothers: Sword & Sworcery EP==<br />
===Dependencies===<br />
* {{pkg|lib32-glu}}<br />
* {{pkg|lib32-alsa-plugins}}<br />
* {{pkg|lib32-libpulse}} (if you use PulseAudio)<br />
<br />
==Team Fortress 2 ==<br />
===Dependencies===<br />
* {{AUR|lib32-libpng12}}<br />
<br />
===Making HRTF work===<br />
Assuming HRTF has been set up properly in the operating system, hrtf won't be enabled unless you disable the original processing. To do so, use<br />
dsp_slow_cpu 1<br />
For best results, also change the following:<br />
snd_spatialize_roundrobin 1<br />
dsp_enhance_stereo 0<br />
snd_pitchquality 1<br />
<br />
===Troubleshooting===<br />
====Loading screen freeze====<br />
If you are a non-english (speaking) user, you have to enable "en_US.UTF-8" in the locale.gen! Generate a new locale after that.<br />
<br />
====No audio====<br />
It happens if there is no PulseAudio in your system.<br />
If you want to use [[ALSA]], you need to launch Steam or the game directly with {{ic|1=SDL_AUDIODRIVER=alsa}} <br />
(From [http://steamcommunity.com/app/221410/discussions/0/882966056462819091/#c882966056470753683 SteamCommunity]).<br />
<br />
If it still does not work, you may also need to set the environment variable AUDIODEV. For instance {{ic|1=AUDIODEV=Live}}. Use {{ic|aplay -l}} to list the available sound cards.<br />
<br />
====Slow loading textures====<br />
If you are using Chris' FPS Configs or any other FPS config, you may have set {{ic|mat_picmip}} to {{ic|2}}. This spawns multiple threads for texture loading, which may cause more jittering and lag on Linux, especially on alternative kernels. Try setting it to {{ic|-1}}, the default.<br />
<br />
==The Book of Unwritten Tales==<br />
If the game does not start, uncheck: ''Properties > Enable Steam Community In-Game''.<br />
<br />
The game may segfault upon clicking the Setting menu and possibly during or before gameplay. This is a known problem and you will unfortunately have to wait for a fix from the developer. A workaround (taken from the [http://steamcommunity.com/app/221410/discussions/3/846939071081758230/#p2 Steam forums]) is to replace the game's RenderSystem_GL.so with one from Debian's repositories. To do that download this [https://launchpad.net/ubuntu/+archive/primary/+files/libogre-1.7.4_1.7.4-3_i386.deb deb file], extract it (with {{ic|{{AUR|dpkg}} -x libogre-*.deb outdir}}) and replace {{ic|~/.local/share/Steam/SteamApps/common/The Book of Unwritten Tales/lib/32/RenderSystem_GL.so}} with the one that comes with the {{ic|.deb}} package.<br />
<br />
===Dependencies===<br />
* {{AUR|lib32-libxaw}}<br />
* {{AUR|lib32-jasper}}<br />
<br />
==The Book of Unwritten Tales: The Critter Chronicles==<br />
Because it's based on the same engine, the things that apply to ''The Book of Unwritten Tales'' also apply for this game.<br />
<br />
To prevent the game from crashing at the very end when the credits are shown, change the size of the credits image as described here: http://steamcommunity.com/app/221830/discussions/0/828925849276110960/#c810921273836530791<br />
<br />
==The Clockwork Man==<br />
===Dependencies===<br />
* {{pkg|lib32-libidn}}<br />
<br />
==The Polynomial==<br />
===Dependencies===<br />
* {{AUR|ilmbase102-libs}}<br />
* {{AUR|openexr170-libs}}<br />
[https://github.com/ValveSoftware/steam-for-linux/issues/2721 Steam for Linux issue #2721]<br />
<br />
===Troubleshooting===<br />
====Segfaults during program start on 64-bit systems====<br />
The game segfaults during program start because of the {{ic|LD_LIBRARY_PATH}} setting in the launcher script. Edit {{ic|~/.local/share/Steam/SteamApps/common/ThePolynomial/Polynomial64}}, and comment out the {{ic|LD_LIBRARY_PATH}} variable. Make sure to put the {{ic|./bin/Polynomial64 "$@"}} command on a new line.<br />
<br />
==Towns / Towns Demo==<br />
===Crash on launch===<br />
Ensure you have [[Java]] installed.<br />
<br />
==Trine 2==<br />
===Dependencies===<br />
* {{pkg|lib32-glu}}<br />
* {{pkg|lib32-libxxf86vm}}<br />
* {{pkg|lib32-openal}}<br />
* {{pkg|xorg-xwininfo}}<br />
<br />
===Troubleshooting===<br />
* If colors are wrong with FOSS drivers (r600g at least), try to run the game in windowed mode, rendering will be corrected. ([https://bugs.freedesktop.org/show_bug.cgi?id=60553 bugreport])<br />
* If sound plays choppy, try:<br />
{{hc|/etc/openal/alsoft.conf|<nowiki><br />
drivers=pulse,alsa<br />
frequency=48000<br />
</nowiki>}}<br />
<br />
* If the game resolution is wrong when using a dual monitor setup and you can't see the whole window edit {{ic|~/.frozenbyte/Trine2/options.txt}} and change the options {{ic|ForceFullscreenWidth}} and {{ic|ForceFullscreenHeight}} to the resolution of your monitor on which you want to play the game.<br />
<br />
==Unity3D==<br />
<br />
Games based on the Unity3D engine, like ''War For The Overworld'' or ''Pixel Piracy'' may need the package {{pkg|lsb-release}} to understand that they run on linux and work properly.<br />
<br />
==Unity of Command==<br />
===Dependencies===<br />
* {{pkg|lib32-pango}}<br />
* {{pkg|lib32-alsa-plugins}}<br />
<br />
===Troubleshooting===<br />
* If squares are shown instead of text, try removing {{ic|$HOME/Steam/SteamApps/common/Unity of Command/bin/libpangoft2-1.0.so.0}}.<br />
<br />
====No audio====<br />
If you get this error:<br />
ALSA lib dlmisc.c:254:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/i386-linux-gnu/alsa-lib/libasound_module_pcm_pulse.so<br />
<br />
Try running:<br />
# mkdir -p /usr/lib/i386-linux-gnu/alsa-lib/<br />
# ln -s /usr/lib32/alsa-lib/libasound_module_pcm_pulse.so /usr/lib/i386-linux-gnu/alsa-lib/<br />
<br />
==Unrest==<br />
===Dependencies===<br />
* {{pkg|fluidsynth}}<br />
<br />
== Witcher 2: Assassin of Kings ==<br />
<br />
=== Dependencies ===<br />
<br />
* {{Pkg|lib32-freetype2}}<br />
* {{AUR|lib32-libcurl-compat}}<br />
* {{Pkg|lib32-gnutls}}<br />
<br />
* {{AUR|lib32-sdl2}}<br />
* {{AUR|lib32-sdl2_image}}<br />
* {{AUR|lib32-libcurl-gnutls}}<br />
<br />
=== Troubleshooting ===<br />
<br />
If the game does not run, enable error messages:<br />
<br />
cd "${HOME}/.local/share/Steam/SteamApps/common/the witcher 2"<br />
LIBGL_DEBUG=verbose ./witcher2<br />
<br />
==Wizardry 6: Bane of the Cosmic Forge==<br />
===Dependencies===<br />
* {{pkg|dosbox}}<br />
<br />
To fix the crash at start, edit {{ic|~/.local/share/Steam/SteamApps/common/Wizardry6/dosbox_linux/launch_wizardry6.sh}} and change<br />
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./libs<br />
exec ./dosbox -conf dosbox_wiz6.conf -conf dosbox_wiz6_launch_linux.conf -noconsole "$@"<br />
to<br />
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./libs<br />
exec dosbox -conf dosbox_wiz6.conf -conf dosbox_wiz6_launch_linux.conf -noconsole "$@"<br />
<br />
==World of Goo==<br />
===Changing resolution===<br />
* To change the game resolution edit the section "Graphics display" in the configuration file {{ic|$HOME/Steam/SteamApps/common/World of Goo/properties/config.txt}}. For example, see below:<br />
<!-- Graphics display --><br />
<param name="screen_width" value="1680" /><br />
<param name="screen_height" value="1050" /><br />
<param name="color_depth" value="0" /><br />
<param name="fullscreen" value="true" /><br />
<param name="ui_inset" value="10" /><br />
<br />
==Worms Reloaded==<br />
===Dependencies===<br />
* {{pkg|lib32-alsa-plugins}}<br />
<br />
==XCOM==<br />
===Hangs on startup===<br />
Steam ships its own versions of some libraries, and they sometimes are too old to work with archlinux system libraries.<br />
Removing the library supplied by Steam means Steam has to use the newer arch-specific version. [https://bbs.archlinux.org/viewtopic.php?pid=1428375#p1428375].<br />
<br />
{{bc|rm ~.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libgcc_s.so.1<br />
rm ~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libstdc++.so.6}}</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Fail2ban&diff=342650Fail2ban2014-11-01T13:43:26Z<p>Cilyan: /* SSH jail */ Update shorewall rule advice for current version 4.6</p>
<hr />
<div>[[Category:Secure Shell]]<br />
[[ro:Fail2ban]]<br />
{{Warning|Using an IP blacklist will stop trivial attacks but it relies on an additional daemon and successful logging (the partition containing /var can become full, especially if an attacker is pounding on the server). Additionally, if the attacker knows your IP address, they can send packets with a spoofed source header and get you locked out of the server. [[SSH keys]] provide an elegant solution to the problem of brute forcing without these problems.}}<br />
<br />
[http://www.fail2ban.org/wiki/index.php/Main_Page Fail2ban] scans various textual log files and bans IP that makes too many password failures by updating firewall rules to reject the IP address, similar to [[Sshguard]]. <br />
<br />
{{Warning|For correct function it is essential that the tool parses the IP addresses in the log correctly. You should always '''test''' the log filters work as intended per application you want to protect.}}<br />
<br />
== Installation ==<br />
<br />
Install {{Pkg|fail2ban}} from the [[official repositories]].<br />
<br />
If you want Fail2ban to send an email when someone has been banned, you have to configure [[SSMTP]] (for example).<br />
<br />
=== systemd ===<br />
<br />
Use the service unit {{ic|fail2ban.service}}, refer to [[systemd]] for instructions.<br />
<br />
== Hardening ==<br />
<br />
Currently, fail2ban requires to run as root, therefore you may wish to consider some additional hardening on the process with systemd. Ref:[http://0pointer.de/blog/projects/security.html systemd for Administrators, Part XII]<br />
<br />
=== Capabilities ===<br />
<br />
For added security consider limiting fail2ban capabilities by specifying {{ic|CapabilityBoundingSet}} in the [[Systemd#Editing_provided_unit_files|drop-in configuration file]] for the provided {{ic|fail2ban.service}}:<br />
<br />
{{hc|/etc/systemd/system/fail2ban.service.d/capabilities.conf|2=<br />
[Service]<br />
CapabilityBoundingSet=CAP_DAC_READ_SEARCH CAP_NET_ADMIN CAP_NET_RAW<br />
}}<br />
<br />
In the example above, {{ic|CAP_DAC_READ_SEARCH}} will allow fail2ban full read access, and {{ic|CAP_NET_ADMIN}} and {{ic|CAP_NET_RAW}} allow setting of firewall rules with [[iptables]]. Additional capabilities may be required, depending on your fail2ban configuration. See {{ic|man capabilities}} for more info.<br />
<br />
=== Filesystem Access ===<br />
<br />
Also considering limiting file system read and write access, by using ''ReadOnlyDirectories'' and ''ReadWriteDirectories'', again under the {{ic|[Service]}} section. For example:<br />
ReadOnlyDirectories=/<br />
ReadWriteDirectories=/var/run/fail2ban /var/lib/fail2ban /var/spool/postfix/maildrop /tmp<br />
In the example above, this limits the file system to read-only, except for {{ic|/var/run/fail2ban}} for pid and socket files, and {{ic|/var/spool/postfix/maildrop}} for [[postfix]] sendmail. Again, this will be dependent on you system configuration and fail2ban configuration. The {{ic|/tmp}} directory is needed for some fail2ban actions. Note that adding {{ic|/var/log}} is necessary if you want fail2ban to log its activity.<br />
<br />
== SSH jail ==<br />
<br />
Edit {{ic|/etc/fail2ban/jail.conf}} and modify the ssh-iptables section to enable it and configure the action.<br />
<br />
If your firewall is iptables:<br />
[ssh-iptables]<br />
enabled = true<br />
filter = sshd<br />
action = iptables[name=SSH, port=ssh, protocol=tcp] <br />
sendmail-whois[name=SSH, dest=your@mail.org, sender=fail2ban@mail.com]<br />
logpath = /var/log/auth.log <br />
maxretry = 5<br />
<br />
Fail2Ban from version 0.9 can also read directly from the systemd journal by setting {{ic|1=backend = systemd}}.<br />
<br />
If your firewall is shorewall:<br />
[ssh-shorewall]<br />
enabled = true<br />
filter = sshd<br />
action = shorewall<br />
sendmail-whois[name=SSH, dest=your@mail.org, sender=fail2ban@mail.com]<br />
logpath = /var/log/auth.log <br />
maxretry = 5<br />
<br />
{{Note|You can set {{Ic|BLACKLIST}} to {{Ic|ALL}} in {{ic|/etc/shorewall/shorewall.conf}} otherwise the rule added to ban an IP address will affect only new connections.}}<br />
<br />
Also do not forget to add/change:<br />
LogLevel VERBOSE<br />
in your {{ic|/etc/ssh/sshd_config}}. Else, password failures are not logged correctly.<br />
<br />
== See also ==<br />
<br />
* [[sshguard]]</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Sugar&diff=105239Sugar2010-05-02T15:26:24Z<p>Cilyan: Introduction sugar taxonomy</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
A product of the [http://en.wikipedia.org/wiki/One_Laptop_per_Child OLPC] initiative, [http://en.wikipedia.org/wiki/Sugar_(GUI) Sugar] is a Desktop Environment akin to [[KDE]] and [[GNOME]], but geared towards children and education. If you have a young son, daughter, brother, sister, puppy or alien, the best way to introduce them to the world of Arch Linux is by deploying an Arch/Sugar platform and then forgetting about it. That's the beauty of Arch Linux (TM) - Deploy and Forget (But Know How to Deploy).<br />
<br />
But wait..where art thou, O Sugar?<br />
<br />
That's right. To lead such a good life, you need at least some Sugar-related packages in at least [[AUR]].<br />
<br />
Sugar has a special [http://wiki.sugarlabs.org/go/Taxonomy Taxonomy] to name the parts of its system. The desktop itself constitute the '''glucose''' group. This is the basic system an activity can reasonably expect to be present when installing Sugar. But to really use the environment, you need activities. Basic and sample activities are part of '''fructose'''. Then, '''sucrose''' is constituted by both <tt>glucose</tt> and <tt>fructose</tt> and represents what should be distributed as a basic sugar desktop environment. Note that <tt>ribose</tt> (the underlaying operating system) is here replaced by Arch.<tt>Honey</tt> (the extra activities) are not currently provided in AUR but can be installed as shown in the [[#Building]] section.<br />
<br />
== Getting started: Glucose ==<br />
=== Building from AUR ===<br />
<br />
The esiest way is to use ''yaourt'' or a similar aur helper.<br />
yaourt -S sugar<br />
<br />
=== Building a Bundle ===<br />
[http://wiki.sugarlabs.org/go/Development_Team/Jhbuild This] is a cool build system provided by the developers that allows one to download and build Sugar ''almost'' in its entirety. You will be told what you need, and of course, it will not help if what you need has not yet been packaged for us mighty Archers.<br />
<br />
The resulting project can then be offered as a bundle. This method of building should not be encouraged, since it is not "modular". A likely analogy is the [[E17#Installing_E17_using_easy_e17.sh|easy-e17 script]], except that we are in the opposite situation whereby there are no modular packages and thus no group - yet. Adding the provision is a safety measure, .eg:<br />
<br />
pkgname=sugar-bundle<br />
pkgdesc="The Sugar environment and applications built with jhbuild"<br />
provides=('sugar-desktop') # as in provides=('e')<br />
conflicts=('sugar-desktop')<br />
<br />
But as soon as someone uploads a component of the build/Sugar as a separate package, it must be part of the group (and the bundle package will automatically conflict), eg.:<br />
<br />
pkgname=sugar-toolkit<br />
pkgdesc="The Sugar environment toolkit"<br />
groups=('sugar-desktop' 'sugar-desktop-base')<br />
<br />
''Note: It might be possible to use the new split functions of makepkg here, in which case it will end up as a modular build :)''<br />
<br />
=== Depedency tree===<br />
Below is the dependency tree of sugar 0.86<br />
|--sugar<br />
|--hicolor-icon-theme<br />
|--shared-mime-info<br />
|--metacity<br />
|--libwnck<br />
|--pygtksourceview2<br />
|--sugar-artwork<br />
|--python-xklavier<br />
| |--libxklavier<br />
| |--pygobject<br />
| |--gtk2<br />
|--sugar-toolkit<br />
|--alsa-lib<br />
|--gnome-python-desktop<br />
|--hippo-canvas<br />
| |--librsvg<br />
| |--gtk2<br />
| |--libcroco<br />
|--sugar-datastore<br />
| |--dbus-python<br />
| |--xapian-python-bindings<br />
| |--python-cjson<br />
| |--sugar-base<br />
| |--pygobject<br />
| |--python-decorator<br />
|--sugar-presence-service<br />
|--telepathy-gabble<br />
|--telepathy-salut<br />
|--python-telepathy<br />
|--sugar-base<br />
| |--pygobject<br />
| |--python-decorator<br />
|--gnome-python<br />
|--pygtk<br />
|--pyorbit<br />
|--libgnomeui<br />
|--libsm<br />
<br />
=== Building a Modular Group ===<br />
This is the more appropriate route to take. Here is the current list of noted dependencies, acquired by inspecting the build trees of distributions supported by Sugar (Gentoo in particular):<br />
<br />
# Syntax: pkgname .. :-> location + comment1 + comment2 ..<br />
<br />
espeak :-> [community]<br />
squeak :-> [unsupported]<br />
evince :-> [extra]<br />
pyabiword :-> [unsupported]<br />
python-cjson :-> [community]<br />
python-telepathy :-> [community]<br />
gstreamer0.10-espeak :-> [unsupported]<br />
olpcsound :-> [unsupported]<br />
telepathy-glib :-> [community]<br />
xulrunner :-> [extra]<br />
telepathy-gabble :-> [community]<br />
telepathy-salut :-> [community]<br />
hippo-canvas :-> [unsupported]<br />
<br />
== Activities ==<br />
<br />
=== Fructose ===<br />
<br />
All <tt>fructose</tt> activities are available on the AUR. To install them, you may issue<br />
yaourt sugar-activity<br />
or equivalent and select the activities you want to install.<br />
Currently provided activities are<br />
browse<br />
calculate<br />
chat<br />
imageviewer<br />
jukebox<br />
log<br />
pippy<br />
read<br />
terminal<br />
turtleart<br />
write<br />
etoys<br />
<br />
=== Etoys ===<br />
<br />
<tt>etoys</tt> is provided separately as it is part of glucose but also include the fructose activity. You may install it using<br />
yaourt -S etoys<br />
or an equivalent AUR helper.<br />
<br />
=== Building===<br />
<br />
Now you have a working Sugar environment, it is time to populate it with activities such as a browser, a calculator, an image viewer or games and toys. They almost all have the same building procedure, a {{Filename|setup.py}} that calls functions shipped with sugar. Below is a typical {{Filename|PKGBUILD}}:<br />
{{File|name=PKGBUILD|content=<br />
# Contributor: Name <name@mail.com><br />
pkgname=sugar-activity-calculate<br />
_realname=Calculate<br />
pkgver=30<br />
pkgrel=1<br />
pkgdesc="A calculator for Sugar."<br />
arch=('i686' 'x86_64')<br />
url="http://www.sugarlabs.org/"<br />
license=('GPL')<br />
groups=('sucrose' 'fructose')<br />
depends=('sugar')<br />
source=(http://download.sugarlabs.org/sources/sucrose/fructose/${_realname}/${_realname}-$pkgver.tar.bz2)<br />
md5sums=('011bd911516f27d05194320164c7dcd7')<br />
<br />
build() {<br />
cd "$srcdir/${_realname}-$pkgver"<br />
./setup.py install --prefix="$pkgdir/usr" &#124;&#124; return 1<br />
}<br />
# vim:set ts=2 sw=2 et:<br />
}}<br />
You may need <tt>squeak</tt> to run some activities (like <tt>etoys</tt>).<br />
<br />
===Notes===<br />
<br />
* Activity building procedure is not made for packaging and using <tt>--prefix</tt> can be dangerous if the application uses this path internally. I think the correct way to do this would be to patch the installation procedure in <tt>sugar</tt> so it accept an argument such as <tt>--destdir=</tt>.<br />
<br />
* I ''suggest'' that we prefix sugar activities packages in AUR with <tt>sugar-activity-</tt>.</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Sugar&diff=105238Sugar2010-05-02T15:17:35Z<p>Cilyan: Update fructose</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
A product of the [http://en.wikipedia.org/wiki/One_Laptop_per_Child OLPC] initiative, [http://en.wikipedia.org/wiki/Sugar_(GUI) Sugar] is a Desktop Environment akin to [[KDE]] and [[GNOME]], but geared towards children and education. If you have a young son, daughter, brother, sister, puppy or alien, the best way to introduce them to the world of Arch Linux is by deploying an Arch/Sugar platform and then forgetting about it. That's the beauty of Arch Linux (TM) - Deploy and Forget (But Know How to Deploy).<br />
<br />
But wait..where art thou, O Sugar?<br />
<br />
That's right. To lead such a good life, you need at least some Sugar-related packages in at least [[AUR]].<br />
<br />
== Getting Started ==<br />
=== Building from AUR ===<br />
<br />
The esiest way is to use ''yaourt'' or a similar aur helper.<br />
yaourt -S sugar<br />
<br />
=== Building a Bundle ===<br />
[http://wiki.sugarlabs.org/go/Development_Team/Jhbuild This] is a cool build system provided by the developers that allows one to download and build Sugar ''almost'' in its entirety. You will be told what you need, and of course, it will not help if what you need has not yet been packaged for us mighty Archers.<br />
<br />
The resulting project can then be offered as a bundle. This method of building should not be encouraged, since it is not "modular". A likely analogy is the [[E17#Installing_E17_using_easy_e17.sh|easy-e17 script]], except that we are in the opposite situation whereby there are no modular packages and thus no group - yet. Adding the provision is a safety measure, .eg:<br />
<br />
pkgname=sugar-bundle<br />
pkgdesc="The Sugar environment and applications built with jhbuild"<br />
provides=('sugar-desktop') # as in provides=('e')<br />
conflicts=('sugar-desktop')<br />
<br />
But as soon as someone uploads a component of the build/Sugar as a separate package, it must be part of the group (and the bundle package will automatically conflict), eg.:<br />
<br />
pkgname=sugar-toolkit<br />
pkgdesc="The Sugar environment toolkit"<br />
groups=('sugar-desktop' 'sugar-desktop-base')<br />
<br />
''Note: It might be possible to use the new split functions of makepkg here, in which case it will end up as a modular build :)''<br />
<br />
=== Depedency tree===<br />
Below is the dependency tree of sugar 0.86<br />
|--sugar<br />
|--hicolor-icon-theme<br />
|--shared-mime-info<br />
|--metacity<br />
|--libwnck<br />
|--pygtksourceview2<br />
|--sugar-artwork<br />
|--python-xklavier<br />
| |--libxklavier<br />
| |--pygobject<br />
| |--gtk2<br />
|--sugar-toolkit<br />
|--alsa-lib<br />
|--gnome-python-desktop<br />
|--hippo-canvas<br />
| |--librsvg<br />
| |--gtk2<br />
| |--libcroco<br />
|--sugar-datastore<br />
| |--dbus-python<br />
| |--xapian-python-bindings<br />
| |--python-cjson<br />
| |--sugar-base<br />
| |--pygobject<br />
| |--python-decorator<br />
|--sugar-presence-service<br />
|--telepathy-gabble<br />
|--telepathy-salut<br />
|--python-telepathy<br />
|--sugar-base<br />
| |--pygobject<br />
| |--python-decorator<br />
|--gnome-python<br />
|--pygtk<br />
|--pyorbit<br />
|--libgnomeui<br />
|--libsm<br />
<br />
=== Building a Modular Group ===<br />
This is the more appropriate route to take. Here is the current list of noted dependencies, acquired by inspecting the build trees of distributions supported by Sugar (Gentoo in particular):<br />
<br />
# Syntax: pkgname .. :-> location + comment1 + comment2 ..<br />
<br />
espeak :-> [community]<br />
squeak :-> [unsupported]<br />
evince :-> [extra]<br />
pyabiword :-> [unsupported]<br />
python-cjson :-> [community]<br />
python-telepathy :-> [community]<br />
gstreamer0.10-espeak :-> [unsupported]<br />
olpcsound :-> [unsupported]<br />
telepathy-glib :-> [community]<br />
xulrunner :-> [extra]<br />
telepathy-gabble :-> [community]<br />
telepathy-salut :-> [community]<br />
hippo-canvas :-> [unsupported]<br />
<br />
== Activities ==<br />
<br />
=== Fructose ===<br />
<br />
All <tt>fructose</tt> activities are available on the AUR. To install them, you may issue<br />
yaourt sugar-activity<br />
or equivalent and select the activities you want to install.<br />
Currently provided activities are<br />
browse<br />
calculate<br />
chat<br />
imageviewer<br />
jukebox<br />
log<br />
pippy<br />
read<br />
terminal<br />
turtleart<br />
write<br />
etoys<br />
<br />
=== Etoys ===<br />
<br />
<tt>etoys</tt> is provided separately as it is part of glucose but also include the fructose activity. You may install it using<br />
yaourt -S etoys<br />
or an equivalent AUR helper.<br />
<br />
=== Building===<br />
<br />
Now you have a working Sugar environment, it is time to populate it with activities such as a browser, a calculator, an image viewer or games and toys. They almost all have the same building procedure, a {{Filename|setup.py}} that calls functions shipped with sugar. Below is a typical {{Filename|PKGBUILD}}:<br />
{{File|name=PKGBUILD|content=<br />
# Contributor: Name <name@mail.com><br />
pkgname=sugar-activity-calculate<br />
_realname=Calculate<br />
pkgver=30<br />
pkgrel=1<br />
pkgdesc="A calculator for Sugar."<br />
arch=('i686' 'x86_64')<br />
url="http://www.sugarlabs.org/"<br />
license=('GPL')<br />
groups=('sucrose' 'fructose')<br />
depends=('sugar')<br />
source=(http://download.sugarlabs.org/sources/sucrose/fructose/${_realname}/${_realname}-$pkgver.tar.bz2)<br />
md5sums=('011bd911516f27d05194320164c7dcd7')<br />
<br />
build() {<br />
cd "$srcdir/${_realname}-$pkgver"<br />
./setup.py install --prefix="$pkgdir/usr" &#124;&#124; return 1<br />
}<br />
# vim:set ts=2 sw=2 et:<br />
}}<br />
You may need <tt>squeak</tt> to run some activities (like <tt>etoys</tt>).<br />
<br />
===Notes===<br />
<br />
* Activity building procedure is not made for packaging and using <tt>--prefix</tt> can be dangerous if the application uses this path internally. I think the correct way to do this would be to patch the installation procedure in <tt>sugar</tt> so it accept an argument such as <tt>--destdir=</tt>.<br />
<br />
* I ''suggest'' that we prefix sugar activities packages in AUR with <tt>sugar-activity-</tt>.</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Sugar&diff=105237Sugar2010-05-02T15:09:43Z<p>Cilyan: Moved dependency tree</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
A product of the [http://en.wikipedia.org/wiki/One_Laptop_per_Child OLPC] initiative, [http://en.wikipedia.org/wiki/Sugar_(GUI) Sugar] is a Desktop Environment akin to [[KDE]] and [[GNOME]], but geared towards children and education. If you have a young son, daughter, brother, sister, puppy or alien, the best way to introduce them to the world of Arch Linux is by deploying an Arch/Sugar platform and then forgetting about it. That's the beauty of Arch Linux (TM) - Deploy and Forget (But Know How to Deploy).<br />
<br />
But wait..where art thou, O Sugar?<br />
<br />
That's right. To lead such a good life, you need at least some Sugar-related packages in at least [[AUR]].<br />
<br />
== Getting Started ==<br />
=== Building from AUR ===<br />
<br />
The esiest way is to use ''yaourt'' or a similar aur helper.<br />
yaourt -S sugar<br />
<br />
=== Building a Bundle ===<br />
[http://wiki.sugarlabs.org/go/Development_Team/Jhbuild This] is a cool build system provided by the developers that allows one to download and build Sugar ''almost'' in its entirety. You will be told what you need, and of course, it will not help if what you need has not yet been packaged for us mighty Archers.<br />
<br />
The resulting project can then be offered as a bundle. This method of building should not be encouraged, since it is not "modular". A likely analogy is the [[E17#Installing_E17_using_easy_e17.sh|easy-e17 script]], except that we are in the opposite situation whereby there are no modular packages and thus no group - yet. Adding the provision is a safety measure, .eg:<br />
<br />
pkgname=sugar-bundle<br />
pkgdesc="The Sugar environment and applications built with jhbuild"<br />
provides=('sugar-desktop') # as in provides=('e')<br />
conflicts=('sugar-desktop')<br />
<br />
But as soon as someone uploads a component of the build/Sugar as a separate package, it must be part of the group (and the bundle package will automatically conflict), eg.:<br />
<br />
pkgname=sugar-toolkit<br />
pkgdesc="The Sugar environment toolkit"<br />
groups=('sugar-desktop' 'sugar-desktop-base')<br />
<br />
''Note: It might be possible to use the new split functions of makepkg here, in which case it will end up as a modular build :)''<br />
<br />
=== Depedency tree===<br />
Below is the dependency tree of sugar 0.86<br />
|--sugar<br />
|--hicolor-icon-theme<br />
|--shared-mime-info<br />
|--metacity<br />
|--libwnck<br />
|--pygtksourceview2<br />
|--sugar-artwork<br />
|--python-xklavier<br />
| |--libxklavier<br />
| |--pygobject<br />
| |--gtk2<br />
|--sugar-toolkit<br />
|--alsa-lib<br />
|--gnome-python-desktop<br />
|--hippo-canvas<br />
| |--librsvg<br />
| |--gtk2<br />
| |--libcroco<br />
|--sugar-datastore<br />
| |--dbus-python<br />
| |--xapian-python-bindings<br />
| |--python-cjson<br />
| |--sugar-base<br />
| |--pygobject<br />
| |--python-decorator<br />
|--sugar-presence-service<br />
|--telepathy-gabble<br />
|--telepathy-salut<br />
|--python-telepathy<br />
|--sugar-base<br />
| |--pygobject<br />
| |--python-decorator<br />
|--gnome-python<br />
|--pygtk<br />
|--pyorbit<br />
|--libgnomeui<br />
|--libsm<br />
<br />
=== Building a Modular Group ===<br />
This is the more appropriate route to take. Here is the current list of noted dependencies, acquired by inspecting the build trees of distributions supported by Sugar (Gentoo in particular):<br />
<br />
# Syntax: pkgname .. :-> location + comment1 + comment2 ..<br />
<br />
espeak :-> [community]<br />
squeak :-> [unsupported]<br />
evince :-> [extra]<br />
pyabiword :-> [unsupported]<br />
python-cjson :-> [community]<br />
python-telepathy :-> [community]<br />
gstreamer0.10-espeak :-> [unsupported]<br />
olpcsound :-> [unsupported]<br />
telepathy-glib :-> [community]<br />
xulrunner :-> [extra]<br />
telepathy-gabble :-> [community]<br />
telepathy-salut :-> [community]<br />
hippo-canvas :-> [unsupported]<br />
<br />
== The Applications ==<br />
<br />
===Activities===<br />
<br />
Now you have a working Sugar environment, it is time to populate it with activities such as a browser, a calculator, an image viewer or games and toys. They almost all have the same building procedure, a {{Filename|setup.py}} that calls functions shipped with sugar. Below is a typical {{Filename|PKGBUILD}}:<br />
{{File|name=PKGBUILD|content=<br />
# Contributor: Name <name@mail.com><br />
pkgname=sugar-activity-calculate<br />
_realname=Calculate<br />
pkgver=30<br />
pkgrel=1<br />
pkgdesc="A calculator for Sugar."<br />
arch=('i686' 'x86_64')<br />
url="http://www.sugarlabs.org/"<br />
license=('GPL')<br />
groups=('sucrose' 'fructose')<br />
depends=('sugar')<br />
source=(http://download.sugarlabs.org/sources/sucrose/fructose/${_realname}/${_realname}-$pkgver.tar.bz2)<br />
md5sums=('011bd911516f27d05194320164c7dcd7')<br />
<br />
build() {<br />
cd "$srcdir/${_realname}-$pkgver"<br />
./setup.py install --prefix="$pkgdir/usr" &#124;&#124; return 1<br />
}<br />
# vim:set ts=2 sw=2 et:<br />
}}<br />
You may need <tt>squeak</tt> to run some activities (like <tt>etoys</tt>).<br />
<br />
===Notes===<br />
<br />
* Activity building procedure is not made for packaging and using <tt>--prefix</tt> can be dangerous if the application uses this path internally. I think the correct way to do this would be to patch the installation procedure in <tt>sugar</tt> so it accept an argument such as <tt>--destdir=</tt>.<br />
<br />
* I ''suggest'' that we prefix sugar activities packages in AUR with <tt>sugar-activity-</tt>.<br />
<br />
* About groups according to the official site, the desktop itself consitute the <tt>glucose</tt> group. Main activities are part of <tt>fructose</tt>. And <tt>sucrose</tt> is constituted by both <tt>glucose</tt> and <tt>fructose</tt> and represents what should be distributed as a basic sugar desktop environment.<br />
<br />
* Below is a list of basic activities we should probably provide in AUR:<br />
imageviewer<br />
browse<br />
terminal<br />
turtleart<br />
etoys<br />
chat<br />
pippy<br />
read<br />
calculate<br />
jukebox<br />
write</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Sugar&diff=105236Sugar2010-05-02T15:07:29Z<p>Cilyan: /* Building a Modular Group */ Let the user decide what to do. Keep the dependencies for reference.</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
A product of the [http://en.wikipedia.org/wiki/One_Laptop_per_Child OLPC] initiative, [http://en.wikipedia.org/wiki/Sugar_(GUI) Sugar] is a Desktop Environment akin to [[KDE]] and [[GNOME]], but geared towards children and education. If you have a young son, daughter, brother, sister, puppy or alien, the best way to introduce them to the world of Arch Linux is by deploying an Arch/Sugar platform and then forgetting about it. That's the beauty of Arch Linux (TM) - Deploy and Forget (But Know How to Deploy).<br />
<br />
But wait..where art thou, O Sugar?<br />
<br />
That's right. To lead such a good life, you need at least some Sugar-related packages in at least [[AUR]].<br />
<br />
== Getting Started ==<br />
=== Building from AUR ===<br />
<br />
The esiest way is to use ''yaourt'' or a similar aur helper.<br />
yaourt -S sugar<br />
<br />
=== Building a Bundle ===<br />
[http://wiki.sugarlabs.org/go/Development_Team/Jhbuild This] is a cool build system provided by the developers that allows one to download and build Sugar ''almost'' in its entirety. You will be told what you need, and of course, it will not help if what you need has not yet been packaged for us mighty Archers.<br />
<br />
The resulting project can then be offered as a bundle. This method of building should not be encouraged, since it is not "modular". A likely analogy is the [[E17#Installing_E17_using_easy_e17.sh|easy-e17 script]], except that we are in the opposite situation whereby there are no modular packages and thus no group - yet. Adding the provision is a safety measure, .eg:<br />
<br />
pkgname=sugar-bundle<br />
pkgdesc="The Sugar environment and applications built with jhbuild"<br />
provides=('sugar-desktop') # as in provides=('e')<br />
conflicts=('sugar-desktop')<br />
<br />
But as soon as someone uploads a component of the build/Sugar as a separate package, it must be part of the group (and the bundle package will automatically conflict), eg.:<br />
<br />
pkgname=sugar-toolkit<br />
pkgdesc="The Sugar environment toolkit"<br />
groups=('sugar-desktop' 'sugar-desktop-base')<br />
<br />
''Note: It might be possible to use the new split functions of makepkg here, in which case it will end up as a modular build :)''<br />
<br />
=== Building a Modular Group ===<br />
This is the more appropriate route to take. Here is the current list of noted dependencies, acquired by inspecting the build trees of distributions supported by Sugar (Gentoo in particular):<br />
<br />
# Syntax: pkgname .. :-> location + comment1 + comment2 ..<br />
<br />
espeak :-> [community]<br />
squeak :-> [unsupported]<br />
evince :-> [extra]<br />
pyabiword :-> [unsupported]<br />
python-cjson :-> [community]<br />
python-telepathy :-> [community]<br />
gstreamer0.10-espeak :-> [unsupported]<br />
olpcsound :-> [unsupported]<br />
telepathy-glib :-> [community]<br />
xulrunner :-> [extra]<br />
telepathy-gabble :-> [community]<br />
telepathy-salut :-> [community]<br />
hippo-canvas :-> [unsupported]<br />
<br />
== The Applications ==<br />
=== Depedency tree===<br />
Below is the dependency tree of sugar 0.86<br />
|--sugar<br />
|--hicolor-icon-theme<br />
|--shared-mime-info<br />
|--metacity<br />
|--libwnck<br />
|--pygtksourceview2<br />
|--sugar-artwork<br />
|--python-xklavier<br />
| |--libxklavier<br />
| |--pygobject<br />
| |--gtk2<br />
|--sugar-toolkit<br />
|--alsa-lib<br />
|--gnome-python-desktop<br />
|--hippo-canvas<br />
| |--librsvg<br />
| |--gtk2<br />
| |--libcroco<br />
|--sugar-datastore<br />
| |--dbus-python<br />
| |--xapian-python-bindings<br />
| |--python-cjson<br />
| |--sugar-base<br />
| |--pygobject<br />
| |--python-decorator<br />
|--sugar-presence-service<br />
|--telepathy-gabble<br />
|--telepathy-salut<br />
|--python-telepathy<br />
|--sugar-base<br />
| |--pygobject<br />
| |--python-decorator<br />
|--gnome-python<br />
|--pygtk<br />
|--pyorbit<br />
|--libgnomeui<br />
|--libsm<br />
<br />
===Activities===<br />
<br />
Now you have a working Sugar environment, it is time to populate it with activities such as a browser, a calculator, an image viewer or games and toys. They almost all have the same building procedure, a {{Filename|setup.py}} that calls functions shipped with sugar. Below is a typical {{Filename|PKGBUILD}}:<br />
{{File|name=PKGBUILD|content=<br />
# Contributor: Name <name@mail.com><br />
pkgname=sugar-activity-calculate<br />
_realname=Calculate<br />
pkgver=30<br />
pkgrel=1<br />
pkgdesc="A calculator for Sugar."<br />
arch=('i686' 'x86_64')<br />
url="http://www.sugarlabs.org/"<br />
license=('GPL')<br />
groups=('sucrose' 'fructose')<br />
depends=('sugar')<br />
source=(http://download.sugarlabs.org/sources/sucrose/fructose/${_realname}/${_realname}-$pkgver.tar.bz2)<br />
md5sums=('011bd911516f27d05194320164c7dcd7')<br />
<br />
build() {<br />
cd "$srcdir/${_realname}-$pkgver"<br />
./setup.py install --prefix="$pkgdir/usr" &#124;&#124; return 1<br />
}<br />
# vim:set ts=2 sw=2 et:<br />
}}<br />
You may need <tt>squeak</tt> to run some activities (like <tt>etoys</tt>).<br />
<br />
===Notes===<br />
<br />
* Activity building procedure is not made for packaging and using <tt>--prefix</tt> can be dangerous if the application uses this path internally. I think the correct way to do this would be to patch the installation procedure in <tt>sugar</tt> so it accept an argument such as <tt>--destdir=</tt>.<br />
<br />
* I ''suggest'' that we prefix sugar activities packages in AUR with <tt>sugar-activity-</tt>.<br />
<br />
* About groups according to the official site, the desktop itself consitute the <tt>glucose</tt> group. Main activities are part of <tt>fructose</tt>. And <tt>sucrose</tt> is constituted by both <tt>glucose</tt> and <tt>fructose</tt> and represents what should be distributed as a basic sugar desktop environment.<br />
<br />
* Below is a list of basic activities we should probably provide in AUR:<br />
imageviewer<br />
browse<br />
terminal<br />
turtleart<br />
etoys<br />
chat<br />
pippy<br />
read<br />
calculate<br />
jukebox<br />
write</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Sugar&diff=105235Sugar2010-05-02T15:05:24Z<p>Cilyan: /* Building a Modular Group */ pyabiword needs abiword</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
A product of the [http://en.wikipedia.org/wiki/One_Laptop_per_Child OLPC] initiative, [http://en.wikipedia.org/wiki/Sugar_(GUI) Sugar] is a Desktop Environment akin to [[KDE]] and [[GNOME]], but geared towards children and education. If you have a young son, daughter, brother, sister, puppy or alien, the best way to introduce them to the world of Arch Linux is by deploying an Arch/Sugar platform and then forgetting about it. That's the beauty of Arch Linux (TM) - Deploy and Forget (But Know How to Deploy).<br />
<br />
But wait..where art thou, O Sugar?<br />
<br />
That's right. To lead such a good life, you need at least some Sugar-related packages in at least [[AUR]].<br />
<br />
== Getting Started ==<br />
=== Building from AUR ===<br />
<br />
The esiest way is to use ''yaourt'' or a similar aur helper.<br />
yaourt -S sugar<br />
<br />
=== Building a Bundle ===<br />
[http://wiki.sugarlabs.org/go/Development_Team/Jhbuild This] is a cool build system provided by the developers that allows one to download and build Sugar ''almost'' in its entirety. You will be told what you need, and of course, it will not help if what you need has not yet been packaged for us mighty Archers.<br />
<br />
The resulting project can then be offered as a bundle. This method of building should not be encouraged, since it is not "modular". A likely analogy is the [[E17#Installing_E17_using_easy_e17.sh|easy-e17 script]], except that we are in the opposite situation whereby there are no modular packages and thus no group - yet. Adding the provision is a safety measure, .eg:<br />
<br />
pkgname=sugar-bundle<br />
pkgdesc="The Sugar environment and applications built with jhbuild"<br />
provides=('sugar-desktop') # as in provides=('e')<br />
conflicts=('sugar-desktop')<br />
<br />
But as soon as someone uploads a component of the build/Sugar as a separate package, it must be part of the group (and the bundle package will automatically conflict), eg.:<br />
<br />
pkgname=sugar-toolkit<br />
pkgdesc="The Sugar environment toolkit"<br />
groups=('sugar-desktop' 'sugar-desktop-base')<br />
<br />
''Note: It might be possible to use the new split functions of makepkg here, in which case it will end up as a modular build :)''<br />
<br />
=== Building a Modular Group ===<br />
This is the more appropriate route to take. Here is the current list of noted dependencies, acquired by inspecting the build trees of distributions supported by Sugar (Gentoo in particular):<br />
<br />
# Syntax: pkgname .. :-> location + comment1 + comment2 ..<br />
<br />
espeak :-> [community]<br />
squeak :-> [unsupported] + outdated + needs patching for sugar<br />
evince :-> [extra] + needs patching for sugar<br />
pyabiword :-> [unsupported]<br />
python-cjson :-> [community]<br />
python-telepathy :-> [community]<br />
gstreamer0.10-espeak :-> [unsupported]<br />
olpcsound :-> [unsupported]<br />
telepathy-glib :-> [community]<br />
xulrunner :-> [extra]<br />
telepathy-gabble :-> [community]<br />
telepathy-salut :-> [community]<br />
hippo-canvas :-> [unsupported]<br />
<br />
And the ''bash-fu'' to install all existing packages (if you have saved the above in a file called '''sugar.todo'''):<br />
<br />
~# pacman -S $(grep ":->" sugar.todo | grep -v unsupported | awk '{print $1}')<br />
<br />
The above basically filters the output, first matching a string with '''grep''', then leaving out matches with '''grep -v''', and finally showing only the first coloumn of ''stdout'' with '''awk'''.<br />
<br />
== The Applications ==<br />
=== Depedency tree===<br />
Below is the dependency tree of sugar 0.86<br />
|--sugar<br />
|--hicolor-icon-theme<br />
|--shared-mime-info<br />
|--metacity<br />
|--libwnck<br />
|--pygtksourceview2<br />
|--sugar-artwork<br />
|--python-xklavier<br />
| |--libxklavier<br />
| |--pygobject<br />
| |--gtk2<br />
|--sugar-toolkit<br />
|--alsa-lib<br />
|--gnome-python-desktop<br />
|--hippo-canvas<br />
| |--librsvg<br />
| |--gtk2<br />
| |--libcroco<br />
|--sugar-datastore<br />
| |--dbus-python<br />
| |--xapian-python-bindings<br />
| |--python-cjson<br />
| |--sugar-base<br />
| |--pygobject<br />
| |--python-decorator<br />
|--sugar-presence-service<br />
|--telepathy-gabble<br />
|--telepathy-salut<br />
|--python-telepathy<br />
|--sugar-base<br />
| |--pygobject<br />
| |--python-decorator<br />
|--gnome-python<br />
|--pygtk<br />
|--pyorbit<br />
|--libgnomeui<br />
|--libsm<br />
<br />
===Activities===<br />
<br />
Now you have a working Sugar environment, it is time to populate it with activities such as a browser, a calculator, an image viewer or games and toys. They almost all have the same building procedure, a {{Filename|setup.py}} that calls functions shipped with sugar. Below is a typical {{Filename|PKGBUILD}}:<br />
{{File|name=PKGBUILD|content=<br />
# Contributor: Name <name@mail.com><br />
pkgname=sugar-activity-calculate<br />
_realname=Calculate<br />
pkgver=30<br />
pkgrel=1<br />
pkgdesc="A calculator for Sugar."<br />
arch=('i686' 'x86_64')<br />
url="http://www.sugarlabs.org/"<br />
license=('GPL')<br />
groups=('sucrose' 'fructose')<br />
depends=('sugar')<br />
source=(http://download.sugarlabs.org/sources/sucrose/fructose/${_realname}/${_realname}-$pkgver.tar.bz2)<br />
md5sums=('011bd911516f27d05194320164c7dcd7')<br />
<br />
build() {<br />
cd "$srcdir/${_realname}-$pkgver"<br />
./setup.py install --prefix="$pkgdir/usr" &#124;&#124; return 1<br />
}<br />
# vim:set ts=2 sw=2 et:<br />
}}<br />
You may need <tt>squeak</tt> to run some activities (like <tt>etoys</tt>).<br />
<br />
===Notes===<br />
<br />
* Activity building procedure is not made for packaging and using <tt>--prefix</tt> can be dangerous if the application uses this path internally. I think the correct way to do this would be to patch the installation procedure in <tt>sugar</tt> so it accept an argument such as <tt>--destdir=</tt>.<br />
<br />
* I ''suggest'' that we prefix sugar activities packages in AUR with <tt>sugar-activity-</tt>.<br />
<br />
* About groups according to the official site, the desktop itself consitute the <tt>glucose</tt> group. Main activities are part of <tt>fructose</tt>. And <tt>sucrose</tt> is constituted by both <tt>glucose</tt> and <tt>fructose</tt> and represents what should be distributed as a basic sugar desktop environment.<br />
<br />
* Below is a list of basic activities we should probably provide in AUR:<br />
imageviewer<br />
browse<br />
terminal<br />
turtleart<br />
etoys<br />
chat<br />
pippy<br />
read<br />
calculate<br />
jukebox<br />
write</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Sugar&diff=105234Sugar2010-05-02T15:02:10Z<p>Cilyan: /* Activities */</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
A product of the [http://en.wikipedia.org/wiki/One_Laptop_per_Child OLPC] initiative, [http://en.wikipedia.org/wiki/Sugar_(GUI) Sugar] is a Desktop Environment akin to [[KDE]] and [[GNOME]], but geared towards children and education. If you have a young son, daughter, brother, sister, puppy or alien, the best way to introduce them to the world of Arch Linux is by deploying an Arch/Sugar platform and then forgetting about it. That's the beauty of Arch Linux (TM) - Deploy and Forget (But Know How to Deploy).<br />
<br />
But wait..where art thou, O Sugar?<br />
<br />
That's right. To lead such a good life, you need at least some Sugar-related packages in at least [[AUR]].<br />
<br />
== Getting Started ==<br />
=== Building from AUR ===<br />
<br />
The esiest way is to use ''yaourt'' or a similar aur helper.<br />
yaourt -S sugar<br />
<br />
=== Building a Bundle ===<br />
[http://wiki.sugarlabs.org/go/Development_Team/Jhbuild This] is a cool build system provided by the developers that allows one to download and build Sugar ''almost'' in its entirety. You will be told what you need, and of course, it will not help if what you need has not yet been packaged for us mighty Archers.<br />
<br />
The resulting project can then be offered as a bundle. This method of building should not be encouraged, since it is not "modular". A likely analogy is the [[E17#Installing_E17_using_easy_e17.sh|easy-e17 script]], except that we are in the opposite situation whereby there are no modular packages and thus no group - yet. Adding the provision is a safety measure, .eg:<br />
<br />
pkgname=sugar-bundle<br />
pkgdesc="The Sugar environment and applications built with jhbuild"<br />
provides=('sugar-desktop') # as in provides=('e')<br />
conflicts=('sugar-desktop')<br />
<br />
But as soon as someone uploads a component of the build/Sugar as a separate package, it must be part of the group (and the bundle package will automatically conflict), eg.:<br />
<br />
pkgname=sugar-toolkit<br />
pkgdesc="The Sugar environment toolkit"<br />
groups=('sugar-desktop' 'sugar-desktop-base')<br />
<br />
''Note: It might be possible to use the new split functions of makepkg here, in which case it will end up as a modular build :)''<br />
<br />
=== Building a Modular Group ===<br />
This is the more appropriate route to take. Here is the current list of noted dependencies, acquired by inspecting the build trees of distributions supported by Sugar (Gentoo in particular):<br />
<br />
# Syntax: pkgname .. :-> location + comment1 + comment2 ..<br />
<br />
espeak :-> [community]<br />
squeak :-> [unsupported] + outdated + needs patching for sugar<br />
evince :-> [extra] + needs patching for sugar<br />
pyabiword :-> [unsupported]<br />
python-cjson :-> [community]<br />
python-telepathy :-> [community]<br />
gstreamer0.10-espeak :-> [unsupported]<br />
olpcsound :-> [unsupported]<br />
telepathy-glib :-> [community]<br />
xulrunner :-> [extra]<br />
telepathy-gabble :-> [community]<br />
telepathy-salut :-> [community]<br />
hippo-canvas :-> [unsupported]<br />
<br />
And the ''bash-fu'' to install all existing packages (if you have saved the above in a file called '''sugar.todo'''):<br />
<br />
~# pacman -S $(grep ":->" sugar.todo | grep -v unsupported | awk '{print $1}')<br />
<br />
The above basically filters the output, first matching a string with '''grep''', then leaving out matches with '''grep -v''', and finally showing only the first coloumn of ''stdout'' with '''awk'''.<br />
<br />
The following are "Level 2" dependencies:<br />
<br />
abiword-devel :-> [unsupported] + required by pyabiword<br />
<br />
== The Applications ==<br />
=== Depedency tree===<br />
Below is the dependency tree of sugar 0.86<br />
|--sugar<br />
|--hicolor-icon-theme<br />
|--shared-mime-info<br />
|--metacity<br />
|--libwnck<br />
|--pygtksourceview2<br />
|--sugar-artwork<br />
|--python-xklavier<br />
| |--libxklavier<br />
| |--pygobject<br />
| |--gtk2<br />
|--sugar-toolkit<br />
|--alsa-lib<br />
|--gnome-python-desktop<br />
|--hippo-canvas<br />
| |--librsvg<br />
| |--gtk2<br />
| |--libcroco<br />
|--sugar-datastore<br />
| |--dbus-python<br />
| |--xapian-python-bindings<br />
| |--python-cjson<br />
| |--sugar-base<br />
| |--pygobject<br />
| |--python-decorator<br />
|--sugar-presence-service<br />
|--telepathy-gabble<br />
|--telepathy-salut<br />
|--python-telepathy<br />
|--sugar-base<br />
| |--pygobject<br />
| |--python-decorator<br />
|--gnome-python<br />
|--pygtk<br />
|--pyorbit<br />
|--libgnomeui<br />
|--libsm<br />
<br />
===Activities===<br />
<br />
Now you have a working Sugar environment, it is time to populate it with activities such as a browser, a calculator, an image viewer or games and toys. They almost all have the same building procedure, a {{Filename|setup.py}} that calls functions shipped with sugar. Below is a typical {{Filename|PKGBUILD}}:<br />
{{File|name=PKGBUILD|content=<br />
# Contributor: Name <name@mail.com><br />
pkgname=sugar-activity-calculate<br />
_realname=Calculate<br />
pkgver=30<br />
pkgrel=1<br />
pkgdesc="A calculator for Sugar."<br />
arch=('i686' 'x86_64')<br />
url="http://www.sugarlabs.org/"<br />
license=('GPL')<br />
groups=('sucrose' 'fructose')<br />
depends=('sugar')<br />
source=(http://download.sugarlabs.org/sources/sucrose/fructose/${_realname}/${_realname}-$pkgver.tar.bz2)<br />
md5sums=('011bd911516f27d05194320164c7dcd7')<br />
<br />
build() {<br />
cd "$srcdir/${_realname}-$pkgver"<br />
./setup.py install --prefix="$pkgdir/usr" &#124;&#124; return 1<br />
}<br />
# vim:set ts=2 sw=2 et:<br />
}}<br />
You may need <tt>squeak</tt> to run some activities (like <tt>etoys</tt>).<br />
<br />
===Notes===<br />
<br />
* Activity building procedure is not made for packaging and using <tt>--prefix</tt> can be dangerous if the application uses this path internally. I think the correct way to do this would be to patch the installation procedure in <tt>sugar</tt> so it accept an argument such as <tt>--destdir=</tt>.<br />
<br />
* I ''suggest'' that we prefix sugar activities packages in AUR with <tt>sugar-activity-</tt>.<br />
<br />
* About groups according to the official site, the desktop itself consitute the <tt>glucose</tt> group. Main activities are part of <tt>fructose</tt>. And <tt>sucrose</tt> is constituted by both <tt>glucose</tt> and <tt>fructose</tt> and represents what should be distributed as a basic sugar desktop environment.<br />
<br />
* Below is a list of basic activities we should probably provide in AUR:<br />
imageviewer<br />
browse<br />
terminal<br />
turtleart<br />
etoys<br />
chat<br />
pippy<br />
read<br />
calculate<br />
jukebox<br />
write</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Sugar&diff=105233Sugar2010-05-02T14:58:38Z<p>Cilyan: /* Activities */</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
A product of the [http://en.wikipedia.org/wiki/One_Laptop_per_Child OLPC] initiative, [http://en.wikipedia.org/wiki/Sugar_(GUI) Sugar] is a Desktop Environment akin to [[KDE]] and [[GNOME]], but geared towards children and education. If you have a young son, daughter, brother, sister, puppy or alien, the best way to introduce them to the world of Arch Linux is by deploying an Arch/Sugar platform and then forgetting about it. That's the beauty of Arch Linux (TM) - Deploy and Forget (But Know How to Deploy).<br />
<br />
But wait..where art thou, O Sugar?<br />
<br />
That's right. To lead such a good life, you need at least some Sugar-related packages in at least [[AUR]].<br />
<br />
== Getting Started ==<br />
=== Building from AUR ===<br />
<br />
The esiest way is to use ''yaourt'' or a similar aur helper.<br />
yaourt -S sugar<br />
<br />
=== Building a Bundle ===<br />
[http://wiki.sugarlabs.org/go/Development_Team/Jhbuild This] is a cool build system provided by the developers that allows one to download and build Sugar ''almost'' in its entirety. You will be told what you need, and of course, it will not help if what you need has not yet been packaged for us mighty Archers.<br />
<br />
The resulting project can then be offered as a bundle. This method of building should not be encouraged, since it is not "modular". A likely analogy is the [[E17#Installing_E17_using_easy_e17.sh|easy-e17 script]], except that we are in the opposite situation whereby there are no modular packages and thus no group - yet. Adding the provision is a safety measure, .eg:<br />
<br />
pkgname=sugar-bundle<br />
pkgdesc="The Sugar environment and applications built with jhbuild"<br />
provides=('sugar-desktop') # as in provides=('e')<br />
conflicts=('sugar-desktop')<br />
<br />
But as soon as someone uploads a component of the build/Sugar as a separate package, it must be part of the group (and the bundle package will automatically conflict), eg.:<br />
<br />
pkgname=sugar-toolkit<br />
pkgdesc="The Sugar environment toolkit"<br />
groups=('sugar-desktop' 'sugar-desktop-base')<br />
<br />
''Note: It might be possible to use the new split functions of makepkg here, in which case it will end up as a modular build :)''<br />
<br />
=== Building a Modular Group ===<br />
This is the more appropriate route to take. Here is the current list of noted dependencies, acquired by inspecting the build trees of distributions supported by Sugar (Gentoo in particular):<br />
<br />
# Syntax: pkgname .. :-> location + comment1 + comment2 ..<br />
<br />
espeak :-> [community]<br />
squeak :-> [unsupported] + outdated + needs patching for sugar<br />
evince :-> [extra] + needs patching for sugar<br />
pyabiword :-> [unsupported]<br />
python-cjson :-> [community]<br />
python-telepathy :-> [community]<br />
gstreamer0.10-espeak :-> [unsupported]<br />
olpcsound :-> [unsupported]<br />
telepathy-glib :-> [community]<br />
xulrunner :-> [extra]<br />
telepathy-gabble :-> [community]<br />
telepathy-salut :-> [community]<br />
hippo-canvas :-> [unsupported]<br />
<br />
And the ''bash-fu'' to install all existing packages (if you have saved the above in a file called '''sugar.todo'''):<br />
<br />
~# pacman -S $(grep ":->" sugar.todo | grep -v unsupported | awk '{print $1}')<br />
<br />
The above basically filters the output, first matching a string with '''grep''', then leaving out matches with '''grep -v''', and finally showing only the first coloumn of ''stdout'' with '''awk'''.<br />
<br />
The following are "Level 2" dependencies:<br />
<br />
abiword-devel :-> [unsupported] + required by pyabiword<br />
<br />
== The Applications ==<br />
=== Depedency tree===<br />
Below is the dependency tree of sugar 0.86<br />
|--sugar<br />
|--hicolor-icon-theme<br />
|--shared-mime-info<br />
|--metacity<br />
|--libwnck<br />
|--pygtksourceview2<br />
|--sugar-artwork<br />
|--python-xklavier<br />
| |--libxklavier<br />
| |--pygobject<br />
| |--gtk2<br />
|--sugar-toolkit<br />
|--alsa-lib<br />
|--gnome-python-desktop<br />
|--hippo-canvas<br />
| |--librsvg<br />
| |--gtk2<br />
| |--libcroco<br />
|--sugar-datastore<br />
| |--dbus-python<br />
| |--xapian-python-bindings<br />
| |--python-cjson<br />
| |--sugar-base<br />
| |--pygobject<br />
| |--python-decorator<br />
|--sugar-presence-service<br />
|--telepathy-gabble<br />
|--telepathy-salut<br />
|--python-telepathy<br />
|--sugar-base<br />
| |--pygobject<br />
| |--python-decorator<br />
|--gnome-python<br />
|--pygtk<br />
|--pyorbit<br />
|--libgnomeui<br />
|--libsm<br />
<br />
===Activities===<br />
<br />
Now you have a working Sugar environment, it is time to populate it with activities such as a browser, a calculator, an image viewer or games and toys. They almost all have the same building procedure, a {{Filename|setup.py}} that calls functions shipped with sugar. Below is a typical {{Filename|PKGBUILD}}:<br />
{{File|name=PKGBUILD|content=<br />
# Contributor: Name <name@mail.com><br />
pkgname=sugar-activity-calculate<br />
_realname=Calculate<br />
pkgver=30<br />
pkgrel=1<br />
pkgdesc="A calculator for Sugar."<br />
arch=('i686' 'x86_64')<br />
url="http://www.sugarlabs.org/"<br />
license=('GPL')<br />
groups=('sucrose' 'fructose')<br />
depends=('sugar')<br />
source=(http://download.sugarlabs.org/sources/sucrose/fructose/${_realname}/${_realname}-$pkgver.tar.bz2)<br />
md5sums=('011bd911516f27d05194320164c7dcd7')<br />
<br />
build() {<br />
cd "$srcdir/${_realname}-$pkgver"<br />
./setup.py install --prefix="$pkgdir/usr" || return 1<br />
}<br />
<br />
# vim:set ts=2 sw=2 et:<br />
}}<br />
You may need <tt>squeak</tt> to run some activities (like <tt>etoys</tt>).<br />
<br />
===Notes===<br />
<br />
* Activity building procedure is not made for packaging and using <tt>--prefix</tt> can be dangerous if the application uses this path internally. I think the correct way to do this would be to patch the installation procedure in <tt>sugar</tt> so it accept an argument such as <tt>--destdir=</tt>.<br />
<br />
* I ''suggest'' that we prefix sugar activities packages in AUR with <tt>sugar-activity-</tt>.<br />
<br />
* About groups according to the official site, the desktop itself consitute the <tt>glucose</tt> group. Main activities are part of <tt>fructose</tt>. And <tt>sucrose</tt> is constituted by both <tt>glucose</tt> and <tt>fructose</tt> and represents what should be distributed as a basic sugar desktop environment.<br />
<br />
* Below is a list of basic activities we should probably provide in AUR:<br />
imageviewer<br />
browse<br />
terminal<br />
turtleart<br />
etoys<br />
chat<br />
pippy<br />
read<br />
calculate<br />
jukebox<br />
write</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Sugar&diff=93473Sugar2010-01-24T13:31:35Z<p>Cilyan: /* The Applications */ Update according to what is now provided in AUR.</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
== Introduction ==<br />
A product of the [http://en.wikipedia.org/wiki/One_Laptop_per_Child OLPC] initiative, [http://en.wikipedia.org/wiki/Sugar_(GUI) Sugar] is a Desktop Environment akin to [[KDE]] and [[GNOME]], but geared towards children and education. If you have a young son, daughter, brother, sister, puppy or alien, the best way to introduce them to the world of Arch Linux is by deploying an Arch/Sugar platform and then forgetting about it. That's the beauty of Arch Linux (TM) - Deploy and Forget (But Know How to Deploy).<br />
<br />
But wait..where art thou, O Sugar?<br />
<br />
That's right. To lead such a good life, you need at least some Sugar-related packages in at least [[AUR]].<br />
<br />
== Getting Started ==<br />
=== Building from AUR ===<br />
<br />
The esiest way is to use ''yaourt'' or a similar aur helper.<br />
yaourt -S sugar<br />
<br />
=== Building a Bundle ===<br />
[http://wiki.sugarlabs.org/go/Development_Team/Jhbuild This] is a cool build system provided by the developers that allows one to download and build Sugar ''almost'' in its entirety. You will be told what you need, and of course, it will not help if what you need has not yet been packaged for us mighty Archers.<br />
<br />
The resulting project can then be offered as a bundle. This method of building should not be encouraged, since it is not "modular". A likely analogy is the [[E17#Installing_E17_using_easy_e17.sh|easy-e17 script]], except that we are in the opposite situation whereby there are no modular packages and thus no group - yet. Adding the provision is a safety measure, .eg:<br />
<br />
pkgname=sugar-bundle<br />
pkgdesc="The Sugar environment and applications built with jhbuild"<br />
provides=('sugar-desktop') # as in provides=('e')<br />
conflicts=('sugar-desktop')<br />
<br />
But as soon as someone uploads a component of the build/Sugar as a separate package, it must be part of the group (and the bundle package will automatically conflict), eg.:<br />
<br />
pkgname=sugar-toolkit<br />
pkgdesc="The Sugar environment toolkit"<br />
groups=('sugar-desktop' 'sugar-desktop-base')<br />
<br />
''Note: It might be possible to use the new split functions of makepkg here, in which case it will end up as a modular build :)''<br />
<br />
=== Building a Modular Group ===<br />
This is the more appropriate route to take. Here is the current list of noted dependencies, acquired by inspecting the build trees of distributions supported by Sugar (Gentoo in particular):<br />
<br />
# Syntax: pkgname .. :-> location + comment1 + comment2 ..<br />
<br />
espeak :-> [community]<br />
squeak :-> [unsupported] + outdated + needs patching for sugar<br />
evince :-> [extra] + needs patching for sugar<br />
pyabiword :-> [unsupported]<br />
python-cjson :-> [community]<br />
python-telepathy :-> [community]<br />
gstreamer0.10-espeak :-> [unsupported]<br />
olpcsound :-> [unsupported]<br />
telepathy-glib :-> [community]<br />
xulrunner :-> [extra]<br />
telepathy-gabble :-> [community]<br />
telepathy-salut :-> [community]<br />
hippo-canvas :-> [unsupported]<br />
<br />
And the ''bash-fu'' to install all existing packages (if you have saved the above in a file called '''sugar.todo'''):<br />
<br />
~# pacman -S $(grep ":->" sugar.todo | grep -v unsupported | awk '{print $1}')<br />
<br />
The above basically filters the output, first matching a string with '''grep''', then leaving out matches with '''grep -v''', and finally showing only the first coloumn of ''stdout'' with '''awk'''.<br />
<br />
The following are "Level 2" dependencies:<br />
<br />
abiword-devel :-> [unsupported] + required by pyabiword<br />
<br />
== The Applications ==<br />
=== Depedency tree===<br />
Below is the dependency tree of sugar 0.86<br />
|--sugar<br />
|--hicolor-icon-theme<br />
|--shared-mime-info<br />
|--metacity<br />
|--libwnck<br />
|--pygtksourceview2<br />
|--sugar-artwork<br />
|--python-xklavier<br />
| |--libxklavier<br />
| |--pygobject<br />
| |--gtk2<br />
|--sugar-toolkit<br />
|--alsa-lib<br />
|--gnome-python-desktop<br />
|--hippo-canvas<br />
| |--librsvg<br />
| |--gtk2<br />
| |--libcroco<br />
|--sugar-datastore<br />
| |--dbus-python<br />
| |--xapian-python-bindings<br />
| |--python-cjson<br />
| |--sugar-base<br />
| |--pygobject<br />
| |--python-decorator<br />
|--sugar-presence-service<br />
|--telepathy-gabble<br />
|--telepathy-salut<br />
|--python-telepathy<br />
|--sugar-base<br />
| |--pygobject<br />
| |--python-decorator<br />
|--gnome-python<br />
|--pygtk<br />
|--pyorbit<br />
|--libgnomeui<br />
|--libsm<br />
<br />
===Activities===<br />
<br />
Now you have a working Sugar environment, it is time to populate it with activities such as a browser, a calculator, an image viewer or games and toys. They almost all have the same building procedure, a {{Filename|setup.py}} that calls functions shipped with sugar. Below is a typical {{Filename|PKGBUILD}}:<br />
{{File|name=PKGBUILD|content=<br />
# Contributor: Name <name@mail.com><br />
pkgname=sugar-activity-calculate<br />
_activity=Calculate<br />
pkgver=30<br />
pkgrel=1<br />
pkgdesc="Sugar Calculator with simple gui."<br />
arch=('i686' 'x86_64')<br />
url="http://www.sugarlabs.org/"<br />
license=('GPL')<br />
groups=('sucrose' 'fructose')<br />
depends=('sugar')<br />
source=(http://download.sugarlabs.org/sources/sucrose/fructose/${_activity}/${_activity}-${pkgver}.tar.bz2)<br />
md5sums=('011bd911516f27d05194320164c7dcd7')<br />
<br />
build() {<br />
cd "${srcdir}/${_activity}-${pkgver}"<br />
<br />
./setup.py build<br />
./setup.py install --prefix=$pkgdir/usr<br />
}<br />
<br />
# vim:set ts=2 sw=2 et:<br />
}}<br />
You may need <tt>squeak</tt> to run some activities (like <tt>etoys</tt>).<br />
<br />
===Notes===<br />
<br />
* Activity building procedure is not made for packaging and using <tt>--prefix</tt> can be dangerous if the application uses this path internally. I think the correct way to do this would be to patch the installation procedure in <tt>sugar</tt> so it accept an argument such as <tt>--destdir=</tt>.<br />
<br />
* I ''suggest'' that we prefix sugar activities packages in AUR with <tt>sugar-activity-</tt>.<br />
<br />
* About groups according to the official site, the desktop itself consitute the <tt>glucose</tt> group. Main activities are part of <tt>fructose</tt>. And <tt>sucrose</tt> is constituted by both <tt>glucose</tt> and <tt>fructose</tt> and represents what should be distributed as a basic sugar desktop environment.<br />
<br />
* Below is a list of basic activities we should probably provide in AUR:<br />
imageviewer<br />
browse<br />
terminal<br />
turtleart<br />
etoys<br />
chat<br />
pippy<br />
read<br />
calculate<br />
jukebox<br />
write</div>Cilyanhttps://wiki.archlinux.org/index.php?title=PCManFM&diff=93343PCManFM2010-01-23T19:48:55Z<p>Cilyan: Add Filename and File tags</p>
<hr />
<div>[[Category: Utilities (English)]]<br />
[[Category: File systems (English)]]<br />
{{stub}}<br />
'''PCManFM''' is "an extremly fast, lightweight, yet feature-rich file manager with tabbed browsing". Source: [http://pcmanfm.sourceforge.net/ PCManFM on sourceforge]. PCManFM is the default file manager of the [[LXDE]] (Lightweight X11 Desktop Environment).<br />
<br />
==Installation==<br />
Run the following command to install:<br />
# pacman -S pcmanfm<br />
<br />
You will also require the FAM (File Alteration Monitor) daemon to pick up events such as files and directories changes. This is required by PCManFM to start:<br />
# pacman -S fam<br />
<br />
You can start FAM by typing:<br />
# /etc/rc.d/fam start<br />
<br />
And if you like add it to your ''/etc/rc.conf'' file:<br />
DAEMONS==(@syslog-ng '''fam''' network netfs @crond)<br />
<br />
Or, instead of fam, you could install gamin, which does not require a daemon running:<br />
# pacman -S gamin<br />
Then launch PCManFM with:<br />
$ pcmanfm<br />
<br />
==Troubleshooting==<br />
===No icons?===<br />
If you are using a window manager over a desktop environment and notice you have no icons for folders and files, install an icon theme:<br />
# pacman -S tango-icon-theme<br />
<br />
Then edit {{Filename|~/.gtkrc-2.0}} and add the following line:<br />
gtk-icon-theme-name = "Tango"<br />
<br />
===NTFS write support===<br />
You have to tell PCManFM explicitly how to manage the ntfs-3g driver. It is not difficult, you just have to edit the configuration file at {{Filename|/usr/share/pcmanfm/mount.rules}} like the following:<br />
{{File|name=/usr/share/pcmanfm/mount.rules|content=<br />
[ntfs-3g]<br />
#mount_options=locale=;exec<br />
mount_options=uid=1000;gid=100;fmask=0113;dmask=0002;locale=;exec<br />
}}<br />
<br />
Obviously, you can select the permission you want.<br />
<br />
===Removable devices can't be mounted===<br />
Add the following lines to {{Filename|/etc/dbus-1/system.d/hal.conf}} :<br />
{{File|name=/etc/dbus-1/system.d/hal.conf|content=<br />
<policy context="default"><br />
...<br />
<allow send_destination="org.freedesktop.Hal"<br />
send_interface="org.freedesktop.Hal.Device.Volume"/><br />
...<br />
</policy><br />
}}<br />
(Credits to shpelda -- http://bbs.archlinux.org/viewtopic.php?pid=679118#p679118)</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Intel_graphics&diff=93342Intel graphics2010-01-23T19:43:18Z<p>Cilyan: Add tips and tricks section</p>
<hr />
<div>{{Article summary start| Summary}}<br />
{{Article summary text|Information on Intel Graphics Cards/Chipsets}}<br />
{{Article summary heading|Languages}}<br />
{{i18n_entry|English|Intel}}<br />
{{i18n_entry|Italiano|Intel (Italiano)}}<br />
{{i18n_entry|简体中文|Intel (简体中文)}}<br />
{{i18n_entry|正體中文|Intel (正體中文)}}<br />
{{Article summary end}}<br />
<br />
[[Category: Graphics (English)]][[Category: X Server (English)]][[Category: HOWTOs (English)]]<br />
<br />
== Introduction ==<br />
''For use within the console (without X), see also [[Uvesafb]].''<br />
<br />
Since Intel provides and supports open source drivers, Intel graphics are now essentially plug-and-play.<br />
<br />
=== Models ===<br />
It is a popular mistake to think of "Intel 945G" and "Intel GMA 945" as being the same graphics chip with different names. As a matter of fact, the latter does not exist. Intel uses "GMA" to indicate the graphics core, or the GPU. Anything other than that is actually the model of the '''motherboard chipset''', like "915G", "945GM", "G965" or "G45".<br />
<br />
The more common GPUs and their corresponding motherboard chipsets are:<br />
<br />
* Intel GMA 900 (910, 915)<br />
* Intel GMA 950 (945)<br />
<br />
The "i810" chipset (again, motherboard; not GPU) is actually really old and was manufactured long before the 9xx product line with which the GMA onboard-graphics branding began. Similarly, alternative names for the 910, 915 and 945 chips may include the ''i'' prefix.<br />
<br />
See [http://en.wikipedia.org/wiki/Intel_GMA#Table_of_GMA_graphics_cores_and_chipsets this] for a list.<br />
<br />
=== Drivers ===<br />
* intel (latest and greatest)<br />
* intel-legacy (old and obsolete, incompatible with newer xorg-server implementations)<br />
<br />
It is highly recommended that you try the latest driver before falling back to legacy support.<br />
<br />
== Installation ==<br />
Prerequisite: [[Xorg]]<br />
<br />
# pacman -S xf86-video-intel<br />
<br />
OR<br />
<br />
# pacman -S xf86-video-intel-legacy<br />
<br />
== Configuration ==<br />
<br />
There is no need for any kind of configuration ever since HAL has taken over. See [[Xorg_input_hotplugging|Xorg input hotplugging]] for more information.<br />
<br />
One thing that you should have already done from the start (not a configuration step per se) is to add your user to the relevant group:<br />
<br />
# gpasswd -a username video<br />
<br />
== KMS (Kernel Mode Setting) ==<br />
<br />
[[KMS]] is supported by Intel chipsets that use the i915 DRM driver and is now enabled by default as of kernel v2.6.32.<br />
<br />
'''Important:''' When using KMS, you ''must'' remove any references to "vga=" or "video=" from the kernel commandline in /boot/grub/menu.lst<br />
<br />
=== Early start ===<br />
KMS is typically initialized after the kernel is bootstrapped. It is possible however to enable KMS during bootstrap itself, allowing the entire boot process to run at native resolution. There are currently two methods to achieve this:<br />
<br />
==== Simplest method ====<br />
This method is simple because it enables KMS in the bootloader. Using this method it is easy to disable KMS temporarily if/when necessary.<br />
<br />
Edit the boot loader configuration file and append "i915.modeset=1" to your "kernel" line. For example, users of [[GRUB]] would add the option to /boot/grub/menu.lst:<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,0)<br />
kernel /boot/vmlinuz26 root=/dev/... '''i915.modeset=1'''<br />
initrd /boot/kernel26.img<br />
<br />
Now add the '''intel_agp''' and '''i915''' modules to the MODULES line in /etc/mkinitcpio.conf:<br />
MODULES="'''intel_agp i915'''"<br />
<br />
Finally, regenerate the initramfs:<br />
$ sudo mkinitcpio -p kernel26<br />
<br />
If you ever want to disable KMS, you can change the "i915.modeset" option to 0 in grub, without rebuilding anything. For this, turn on the machine and when you see grub's screen, hit a key to disable the timeout. Select the kernel you want to boot (probably the one already selected) and hit "e" for "edit". Now select the line starting with "kernel" and hit again "e" for editing. You can now edit the i915.modeset option and disable KMS by setting it to 0. Press enter and then "b" to boot. Note that this will be temporary, so at next reboot it will be enable again.<br />
<br />
==== Alternative method ====<br />
This requires rebuilding the initramfs each time you want to disable/enable KMS so can be tricky if for some reason KMS prevents the machine from booting.<br />
<br />
First, add the following line to /etc/modprobe.d/modprobe.conf:<br />
options i915 modeset=1<br />
To disable mode-setting with this alternative method (in case something is broken), just comment that line and regenerate the initramfs again.<br />
<br />
Secondly, change the MODULES and FILES lines in /etc/mkinitcpio.conf to look like this (Don't actually add the "...", it stands for what was there before):<br />
MODULES="[...] '''intel_agp i915'''"<br />
FILES="[...] '''/etc/modprobe.d/modprobe.conf'''"<br />
<br />
Now regenerate the initramfs:<br />
$ sudo mkinitcpio -p kernel26<br />
<br />
=== See also ===<br />
* [[KMS]] - Arch wiki article on kernel mode setting<br />
* Arch Linux forums: [http://bbs.archlinux.org/viewtopic.php?id=69083 HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel]<br />
* Arch Linux forums: [http://bbs.archlinux.org/viewtopic.php?pid=522665#p522665 Intel 945GM, Xorg, Kernel - performance]<br />
<br />
== Tips and tricks ==<br />
<br />
=== Setting scaling mode ===<br />
<br />
This can be useful for some full screen applications.<br />
xrandr --output LVDS1 --set PANEL_FITTING param<br />
where <tt>param</tt> can be<br />
* <tt>center</tt>: resolution will be kept exactly as defined, no scaling will be made,<br />
* <tt>full</tt>: scale the resolution so it uses the entire screen or<br />
* <tt>full_aspect</tt>: scale the resolution to the maximum possible but keep the aspect ratio.<br />
If it does not work, you can try<br />
xrandr --output LVDS1 --set "scaling mode" param<br />
where <tt>param</tt> is one of <tt>"Full"</tt>, <tt>"Center"</tt> or <tt>"Full aspect"</tt>.</div>Cilyanhttps://wiki.archlinux.org/index.php?title=PCManFM&diff=90777PCManFM2010-01-03T16:14:52Z<p>Cilyan: Troubleshooting section, Removable devices can't be mounted</p>
<hr />
<div>[[Category: Utilities (English)]]<br />
[[Category: File systems (English)]]<br />
{{stub}}<br />
'''PCManFM''' is "an extremly fast, lightweight, yet feature-rich file manager with tabbed browsing". Source: [http://pcmanfm.sourceforge.net/ PCManFM on sourceforge]. PCManFM is the default file manager of the [[LXDE]] (Lightweight X11 Desktop Environment).<br />
<br />
==Installation==<br />
Run the following command to install:<br />
# pacman -S pcmanfm<br />
<br />
You will also require the FAM (File Alteration Monitor) daemon to pick up events such as files and directories changes. This is required by PCManFM to start:<br />
# pacman -S fam<br />
<br />
You can start FAM by typing:<br />
# /etc/rc.d/fam start<br />
<br />
And if you like add it to your ''/etc/rc.conf'' file:<br />
DAEMONS==(@syslog-ng '''fam''' network netfs @crond)<br />
<br />
Or, instead of fam, you could install gamin, which does not require a daemon running:<br />
# pacman -S gamin<br />
Then launch PCManFM with:<br />
$ pcmanfm<br />
<br />
==Troubleshooting==<br />
===No icons?===<br />
If you are using a window manager over a desktop environment and notice you have no icons for folders and files, install an icon theme:<br />
# pacman -S tango-icon-theme<br />
<br />
Then edit {{Filename|~/.gtkrc-2.0}} and add the following line:<br />
gtk-icon-theme-name = "Tango"<br />
<br />
===NTFS write support===<br />
You have to tell PCManFM explicitly how to manage the ntfs-3g driver. It is not difficult, you just have to edit the configuration file at {{Filename|/usr/share/pcmanfm/mount.rules}} like the following:<br />
{{File|name=/usr/share/pcmanfm/mount.rules|content=<br />
[ntfs-3g]<br />
#mount_options=locale=;exec<br />
mount_options=uid=1000;gid=100;fmask=0113;dmask=0002;locale=;exec<br />
}}<br />
<br />
Obviously, you can select the permission you want.<br />
<br />
===Removable devices can't be mounted===<br />
Add the following lines to '''/etc/dbus-1/system.d/hal.conf''' :<br />
<policy context="default"><br />
...<br />
<allow send_destination="org.freedesktop.Hal"<br />
send_interface="org.freedesktop.Hal.Device.Volume"/><br />
...<br />
</policy><br />
(Credits to shpelda -- http://bbs.archlinux.org/viewtopic.php?pid=679118#p679118)</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Sugar&diff=90776Sugar2010-01-03T16:09:00Z<p>Cilyan: /* Getting Started */ Building from AUR</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
== Introduction ==<br />
A product of the [http://en.wikipedia.org/wiki/One_Laptop_per_Child OLPC] initiative, [http://en.wikipedia.org/wiki/Sugar_(GUI) Sugar] is a Desktop Environment akin to [[KDE]] and [[GNOME]], but geared towards children and education. If you have a young son, daughter, brother, sister, puppy or alien, the best way to introduce them to the world of Arch Linux is by deploying an Arch/Sugar platform and then forgetting about it. That's the beauty of Arch Linux (TM) - Deploy and Forget (But Know How to Deploy).<br />
<br />
But wait..where art thou, O Sugar?<br />
<br />
That's right. To lead such a good life, you need at least some Sugar-related packages in at least [[AUR]].<br />
<br />
== Getting Started ==<br />
=== Building from AUR ===<br />
<br />
The esiest way is to use ''yaourt'' or a similar aur helper.<br />
yaourt -S sugar<br />
<br />
=== Building a Bundle ===<br />
[http://wiki.sugarlabs.org/go/Development_Team/Jhbuild This] is a cool build system provided by the developers that allows one to download and build Sugar ''almost'' in its entirety. You will be told what you need, and of course, it will not help if what you need has not yet been packaged for us mighty Archers.<br />
<br />
The resulting project can then be offered as a bundle. This method of building should not be encouraged, since it is not "modular". A likely analogy is the [[E17#Installing_E17_using_easy_e17.sh|easy-e17 script]], except that we are in the opposite situation whereby there are no modular packages and thus no group - yet. Adding the provision is a safety measure, .eg:<br />
<br />
pkgname=sugar-bundle<br />
pkgdesc="The Sugar environment and applications built with jhbuild"<br />
provides=('sugar-desktop') # as in provides=('e')<br />
conflicts=('sugar-desktop')<br />
<br />
But as soon as someone uploads a component of the build/Sugar as a separate package, it must be part of the group (and the bundle package will automatically conflict), eg.:<br />
<br />
pkgname=sugar-toolkit<br />
pkgdesc="The Sugar environment toolkit"<br />
groups=('sugar-desktop' 'sugar-desktop-base')<br />
<br />
''Note: It might be possible to use the new split functions of makepkg here, in which case it will end up as a modular build :)''<br />
<br />
=== Building a Modular Group ===<br />
This is the more appropriate route to take. Here is the current list of noted dependencies, acquired by inspecting the build trees of distributions supported by Sugar (Gentoo in particular):<br />
<br />
# Syntax: pkgname .. :-> location + comment1 + comment2 ..<br />
<br />
espeak :-> [community]<br />
squeak :-> [unsupported] + outdated + needs patching for sugar<br />
evince :-> [extra] + needs patching for sugar<br />
pyabiword :-> [unsupported]<br />
python-cjson :-> [community]<br />
python-telepathy :-> [community]<br />
gstreamer0.10-espeak :-> [unsupported]<br />
olpcsound :-> [unsupported]<br />
telepathy-glib :-> [community]<br />
xulrunner :-> [extra]<br />
telepathy-gabble :-> [community]<br />
telepathy-salut :-> [community]<br />
hippo-canvas :-> [unsupported]<br />
<br />
And the ''bash-fu'' to install all existing packages (if you have saved the above in a file called '''sugar.todo'''):<br />
<br />
~# pacman -S $(grep ":->" sugar.todo | grep -v unsupported | awk '{print $1}')<br />
<br />
The above basically filters the output, first matching a string with '''grep''', then leaving out matches with '''grep -v''', and finally showing only the first coloumn of ''stdout'' with '''awk'''.<br />
<br />
The following are "Level 2" dependencies:<br />
<br />
abiword-devel :-> [unsupported] + required by pyabiword<br />
<br />
== The Applications ==<br />
From inspection of build trees and [http://wiki.sugarlabs.org/go/DevelopmentTeam/Release/Releases/Sucrose/0.84.0 the Sugar Wiki], the following appear to be the Sugar components that we ''should'' be distributing:<br />
<br />
hulahop<br />
sugar-toolkit<br />
sugar-datastore<br />
sugar-presence-service<br />
sugar<br />
sugar-base<br />
sugar-artwork<br />
imageviewer-activity<br />
web-activity<br />
log-activity<br />
terminal-activity<br />
turtleart-activity<br />
etoys<br />
chat-activity<br />
pippy-activity<br />
read-activity<br />
calculate<br />
jukebox<br />
write<br />
<br />
Things to ponder about:<br />
<br />
* Should we prepend "sugar" to ''all'' the individual packages (some of the names are pretty generic) eg.'''sugar-hulahop'''?<br />
** Even if the name has ''not'' been taken by another package in the repos/AUR?</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Sugar&diff=87625Sugar2009-12-14T10:57:44Z<p>Cilyan: /* The Applications */</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
== Introduction ==<br />
A product of the [http://en.wikipedia.org/wiki/One_Laptop_per_Child OLPC] initiative, [http://en.wikipedia.org/wiki/Sugar_(GUI) Sugar] is a Desktop Environment akin to [[KDE]] and [[GNOME]], but geared towards children and education. If you have a young son, daughter, brother, sister, puppy or alien, the best way to introduce them to the world of Arch Linux is by deploying an Arch/Sugar platform and then forgetting about it. That's the beauty of Arch Linux (TM) - Deploy and Forget (But Know How to Deploy).<br />
<br />
But wait..where art thou, O Sugar?<br />
<br />
That's right. To lead such a good life, you need at least some Sugar-related packages in at least [[AUR]].<br />
<br />
== Getting Started ==<br />
=== Building a Bundle ===<br />
[http://wiki.sugarlabs.org/go/Development_Team/Jhbuild This] is a cool build system provided by the developers that allows one to download and build Sugar ''almost'' in its entirety. You will be told what you need, and of course, it will not help if what you need has not yet been packaged for us mighty Archers.<br />
<br />
The resulting project can then be offered as a bundle. This method of building should not be encouraged, since it is not "modular". A likely analogy is the [[E17#Installing_E17_using_easy_e17.sh|easy-e17 script]], except that we are in the opposite situation whereby there are no modular packages and thus no group - yet. Adding the provision is a safety measure, .eg:<br />
<br />
pkgname=sugar-bundle<br />
pkgdesc="The Sugar environment and applications built with jhbuild"<br />
provides=('sugar-desktop') # as in provides=('e')<br />
conflicts=('sugar-desktop')<br />
<br />
But as soon as someone uploads a component of the build/Sugar as a separate package, it must be part of the group (and the bundle package will automatically conflict), eg.:<br />
<br />
pkgname=sugar-toolkit<br />
pkgdesc="The Sugar environment toolkit"<br />
groups=('sugar-desktop' 'sugar-desktop-base')<br />
<br />
''Note: It might be possible to use the new split functions of makepkg here, in which case it will end up as a modular build :)''<br />
<br />
=== Building a Modular Group ===<br />
This is the more appropriate route to take. Here is the current list of noted dependencies, acquired by inspecting the build trees of distributions supported by Sugar (Gentoo in particular):<br />
<br />
# Syntax: pkgname .. :-> location + comment1 + comment2 ..<br />
<br />
espeak :-> [community]<br />
squeak :-> [unsupported] + outdated + needs patching for sugar<br />
evince :-> [extra] + needs patching for sugar<br />
pyabiword :-> [unsupported]<br />
python-cjson :-> [community]<br />
python-telepathy :-> [community]<br />
gstreamer0.10-espeak :-> [unsupported]<br />
olpcsound :-> [unsupported]<br />
telepathy-glib :-> [community]<br />
xulrunner :-> [extra]<br />
telepathy-gabble :-> [community]<br />
telepathy-salut :-> [community]<br />
hippo-canvas :-> [unsupported]<br />
<br />
And the ''bash-fu'' to install all existing packages (if you have saved the above in a file called '''sugar.todo'''):<br />
<br />
~# pacman -S $(grep ":->" sugar.todo | grep -v unsupported | awk '{print $1}')<br />
<br />
The above basically filters the output, first matching a string with '''grep''', then leaving out matches with '''grep -v''', and finally showing only the first coloumn of ''stdout'' with '''awk'''.<br />
<br />
The following are "Level 2" dependencies:<br />
<br />
abiword-devel :-> [unsupported] + required by pyabiword<br />
<br />
== The Applications ==<br />
From inspection of build trees and [http://wiki.sugarlabs.org/go/DevelopmentTeam/Release/Releases/Sucrose/0.84.0 the Sugar Wiki], the following appear to be the Sugar components that we ''should'' be distributing:<br />
<br />
hulahop<br />
sugar-toolkit<br />
sugar-datastore<br />
sugar-presence-service<br />
sugar<br />
sugar-base<br />
sugar-artwork<br />
imageviewer-activity<br />
web-activity<br />
log-activity<br />
terminal-activity<br />
turtleart-activity<br />
etoys<br />
chat-activity<br />
pippy-activity<br />
read-activity<br />
calculate<br />
jukebox<br />
write<br />
<br />
Things to ponder about:<br />
<br />
* Should we prepend "sugar" to ''all'' the individual packages (some of the names are pretty generic) eg.'''sugar-hulahop'''?<br />
** Even if the name has ''not'' been taken by another package in the repos/AUR?</div>Cilyanhttps://wiki.archlinux.org/index.php?title=Talk:Xorg&diff=47117Talk:Xorg2008-08-05T11:32:40Z<p>Cilyan: </p>
<hr />
<div>I added a paragraph about switching between different layouts. I'm not sure that it should really go in this article but I think it needs to be on the wiki somewhere. Finding out how to it by searching the web or different forums is a bit hard at this point.<br />
[[User:Frood|Frood]] 09:28, 10 January 2008 (EST)<br />
<br />
----<br />
<br />
Most links of example xorg.conf are broken. They should either be relinked or removed.<br />
[[User:Cilyan|Cilyan]] 13:31, 05 August 2008 (EST)</div>Cilyanhttps://wiki.archlinux.org/index.php?title=AUR_Cleanup_Day/2010&diff=41240AUR Cleanup Day/20102008-05-13T15:38:21Z<p>Cilyan: Adding comments for flumotion</p>
<hr />
<div>The AUR has a large number of obsolete packages which could use cleaning up. Examples of packages that may be cleaned up are:<br />
*packages that have been renamed or replaced<br />
*old and unmaintained developmental (cvs/svn/etc) packages<br />
<br />
Post suggestions of packages on this pages. Trusted Users will get together and go though the list in a couple of weeks and confirm which packages should be removed. '''Please DO NOT REMOVE suggestions from the wiki page but add a comment on why it should be kept instead.''' TUs will not delete any useful package.<br />
<br />
==Package List==<br />
* [http://aur.archlinux.org/packages.php?ID=11463 4c] - Home page and source not reachable<br />
* [http://aur.archlinux.org/packages.php?ID=2787 9base-devel] - Hasn't been update since 25/12/2005. I think its not needed.<br />
* [http://aur.archlinux.org/packages.php?ID=12840 abraca-hg] - Replaced by abraca-git<br />
* [http://aur.archlinux.org/packages.php?ID=13014 advi] - seems to be unmaintainable for the following reasons<br />
** The newest version 1.7.3 needs camlimages 3.0.0, which cannot be found on the net<br />
** camlimages' cvs-sources do not compile<br />
** package advi 1.6.0 has a patchfile of 102k size<br />
** package advi worked fine in former days but does does not compile anymore. It is a pity!<br />
* [http://aur.archlinux.org/packages.php?ID=7086 alienarena2007] - Replaced by alienarena<br />
* [http://aur.archlinux.org/packages.php?ID=573 amavisd-new] - old version, won't compile, maintainer don't answare for e-mails (I have made new package [http://aur.archlinux.org/packages.php?ID=14650 amavisdnew])<br />
* [http://aur.archlinux.org/packages.php?ID=7241 ampache-devel] - Out of date since 08/19/07. It is also the stable branch, not development branch. <br />
* [http://aur.archlinux.org/packages.php?ID=7978 audacious-mac] - Included in audacious-plugins>=1.5.0<br />
* [http://aur.archlinux.org/packages.php?ID=5769 audacious-xosd] - Included in audacious-plugins>=1.5.0<br />
* [http://aur.archlinux.org/packages.php?ID=3194 azrael] - dead project, does not compile<br />
* [http://aur.archlinux.org/packages.php?ID=3880 boombox] - dead project, does not compile<br />
* [http://aur.archlinux.org/packages.php?ID=3402 cddb] - Last release 31 Aug 2003<br />
* [http://aur.archlinux.org/packages.php?ID=1404 cdrtools-dvd] - Outdated, replaced by [http://aur.archlinux.org/packages.php?ID=323 cdrtools] or [http://www.archlinux.org/packages/search/?q=cdrkit cdrkit], maintainer's e-mail address is not valid<br />
* [http://aur.archlinux.org/packages.php?ID=1727 creapkg] - web site no longer exists<br />
* [http://aur.archlinux.org/packages.php?ID=1308 dx9wine] - contains a patch not needed anymore<br />
* [http://aur.archlinux.org/packages.php?ID=2492 e16-devel] - Outdated, replaced by enlightenment in extra<br />
* [http://aur.archlinux.org/packages.php?ID=1430 e16keyedit] - Outdated, never updated since Tue, 05 Jul 2005<br />
* [http://aur.archlinux.org/packages.php?ID=4493 eclipse-kde] - Dead<br />
* [http://aur.archlinux.org/packages.php?ID=14049 eduke32] - Outdated, replaced by [http://aur.archlinux.org/packages.php?ID=15513 bin32-eduke32]<br />
** although it is outdated, it is not replaced by bin32-eduke32, 'cause bin32-eduke32 is for Arch64 bit (this is 32bit package)<br />
* [http://aur.archlinux.org/packages.php?ID=16613 emacs-without-x] - Dublette of emacs-nox<br />
* [http://aur.archlinux.org/packages.php?ID=6249 epiphany-unofficial-extensions] - Out of date<br />
* [http://aur.archlinux.org/packages.php?ID=13227 ethereal] - Renamed to wireshark, available in extra<br />
* [http://aur.archlinux.org/packages.php?ID=7489 firefox-ca] - included in firefox-i18n<br />
* [http://aur.archlinux.org/packages.php?ID=7259 firefox2-ca] - firefox2 is depreciated.<br />
* [http://aur.archlinux.org/packages.php?ID=10229 flumotion] - removed from community a year ago, orphan and 1 year out of date without any complain.<br />
** Note that the last version compiles fine when just changing the version and md5sum. Maybe a call should be made to ask for a maintainer.<br />
* [http://aur.archlinux.org/packages.php?ID=1790 fusesmb] or [http://aur.archlinux.org/packages.php?ID=14475 fusesmb2] - duplicate (and both outdated, version 8.7 is available)<br />
* [http://aur.archlinux.org/packages.php?ID=13063 fftw2single] - part of fftw2 from [extra]<br />
* [http://aur.archlinux.org/packages.php?ID=12045 freeciv-beta-svn] - Outdated svn beta for version 2.1, stable 2.1 version already in Extra. Replaced by freeciv-svn<br />
* [http://aur.archlinux.org/packages.php?ID=6630 fretsonfire], [http://aur.archlinux.org/packages.php?ID=16429 bin32-fretsonfire] which of these should be maintained?<br />
** I think two both should be maintained, because their dependencies are different, and an Arch64 user should be warned if package provides 32-bit binaries by bin32/lib32 prefix.<br />
* [http://aur.archlinux.org/packages.php?ID=6054 gaim-openq-2006] - Old plugin for gaim that has since been merged into pidgin source<br />
* [http://aur.archlinux.org/packages.php?ID=6087 galaxymage] - Webpage is gone.<br />
* [http://aur.archlinux.org/packages.php?ID=3698 galeon] - doesn't compile (not even the latest version)<br />
* [http://aur.archlinux.org/packages.php?ID=13589 gimp-freetype] - This plugin was developed for gimp 2.0 and is not needed according to the notes [http://ftp.gwdg.de/pub/misc/grafik/gimp/gimp/plug-ins/v2.0/freetype/ here.] <br />
* [http://aur.archlinux.org/packages.php?ID=6823 gimp-resynth] or [http://aur.archlinux.org/packages.php?ID=12273 gimp-plugin-resynthesizer] - duplicate (best to keep latter)<br />
* [http://aur.archlinux.org/packages.php?ID=3754 gnash-cvs] - Hasn't been update since 18/11/2006. gnash is in extra now too.<br />
** Does the project still use CVS? If so, then this package is useful. --[[User:Slash|Slash]] <br />
* gmpc*-svn - replaced by git<br />
* [http://aur.archlinux.org/packages.php?ID=6069 gnuserv] - Deprecated in emacs-22+<br />
* [http://aur.archlinux.org/packages.php?ID=6845 guifications-gaim2] - Outdated beta version, a current version is in community.<br />
* [http://aur.archlinux.org/packages.php?ID=3689 ii-hg] - outdated, probably discontinued as the project website isn't available anymore (moved maybe?)<br />
** The project website is available at http://www.suckless.org/wiki/tools/irc/irc_it, so it's not dead. It only needs some changes to work again. --[[User:CuleX|CuleX]]<br />
* [http://aur.archlinux.org/packages.php?ID=12993 ion-modules] - ion3 is not part of official repos anymore so i dont see why this should stay here. I hope AUR CleanUp involves [community].<br />
** The modules should be updated, but there's an ion3 package in the AUR: http://aur.archlinux.org/packages.php?ID=16754 --[[User:CuleX|CuleX]]<br />
* [http://aur.archlinux.org/packages.php?ID=7488 ionice] - part of util-linux-ng<br />
* jabberd1* - jabberd v.2 is in extra<br />
* [http://aur.archlinux.org/packages.php?ID=7884 jfduke3d] - Is not updated by his author anymore, [http://aur.archlinux.org/packages.php?ID=15513 eduke32] was made to remplace it<br />
* [http://aur.archlinux.org/packages.php?ID=7037 kanola] - probably dead project, didn't went past the 0.0.1 release since 2006<br />
* [http://aur.archlinux.org/packages.php?ID=8231 kdelibs-noarts] - out-of-date, modified official package<br />
* [http://aur.archlinux.org/packages.php?ID=12581 kdenlive 0.5_1-1] - out-of-date, doesn't compile<br />
** Latest stable version is 0.5, last updated in AUR on Sun, 09 Mar 2008 --[[User:Doc Angelo|Doc Angelo]]<br />
** It's not even out of date, nor duplicate of another package – 6xx<br />
* [http://aur.archlinux.org/packages.php?ID=6296 kernel26thinkpad] - obsolete, out of date since 2006<br />
* [http://aur.archlinux.org/packages.php?ID=3429 lam 7.1.3-1] - Doesn't compile and is orphaned. The successor openmpi works.<br />
* [http://aur.archlinux.org/packages.php?ID=16889 libqglviewer-latest] - the same package as [http://aur.archlinux.org/packages.php?ID=7801 libqglviewer]<br />
* [http://aur.archlinux.org/packages.php?ID=10572 librtorrent] - duplicate package, already in [community]<br />
* [http://aur.archlinux.org/packages.php?ID=14220 linuxdcpp-cvs] - Old, orphaned CVS version of a package in community<br />
* [http://aur.archlinux.org/packages.php?ID=10305 linux-uvc-isight] and [http://aur.archlinux.org/packages.php?ID=13687 linux-uvc-isight-svn] - Outdated, [http://aur.archlinux.org/packages.php?ID=6906 linux-uvc-svn] does the same thing<br />
* [http://aur.archlinux.org/packages.php?ID=3610 lmms-cvs] - Orphan, outdated, and project switched to svn.<br />
* [http://aur.archlinux.org/packages.php?ID=5408 mlame] - just a small bash script, no project page, could be moved to the wiki maybe<br />
* [http://aur.archlinux.org/packages.php?ID=10526 moaceyahoo] - Dead project. Will post new one, someday.<br />
* [http://aur.archlinux.org/packages.php?ID=11581 mouseemu] - Project not updated since 2006; xautomation also allows mouse emulation.<br />
* [http://aur.archlinux.org/packages.php?ID=4619 mozilla-firefox-es_es] - included in firefox-i18n<br />
* [http://aur.archlinux.org/packages.php?ID=14946 mplayer-w32codecs] - duplicate package <br />
** I don't think it is. This packages has more codecs than the "codecs" package. It has more DLLs. <br />
* [http://aur.archlinux.org/packages.php?ID=11498 mpd-pausemode] - "Website" is orig. contributor's email addr.; orphaned by this contributor, so presumably no longer developed.<br />
* [http://aur.archlinux.org/packages.php?ID=2700 mutt-cvs] - mutt switched to mercurial a while back; way outdated anyway.<br />
* [http://aur.archlinux.org/packages.php?ID=16295 nautilus-open-terminal-gianvito 0.9-1] - not needed anymore since original version update to 0.9<br />
* [http://aur.archlinux.org/packages.php?ID=12101 netbeans-rubyide-hudson] - useless since NetBeans supports this feature in 6.1<br />
* [http://aur.archlinux.org/packages.php?ID=12051 netscape-navigator] - Not supported upstream anymore making it vulnerable to security issues.<br />
** Can be used for web development – 6xx <br />
** For composer functionality, seamonkey does a better job.<br />
* [http://aur.archlinux.org/packages.php?ID=7748 openarena] - Obsolete, remplaced by [http://aur.archlinux.org/packages.php?ID=16719 openarena-bin]<br />
* [http://aur.archlinux.org/packages.php?ID=15312 openssh-snapshot] - Not needed anymore<br />
* [http://aur.archlinux.org/packages.php?ID=15401 org] - Out of date; also, included in Emacs 22+<br />
* [http://aur.archlinux.org/packages.php?ID=12193 pidgin-xfire] - Broke; Replaced by [http://aur.archlinux.org/packages.php?ID=16776 pidgin-gfire].<br />
* [http://aur.archlinux.org/packages.php?ID=7279 pinkytagger] - Outdated by two years.<br />
** Latest version 2.1-0 (October 21, 2007) needs new musicbrainz, which is out of date in [extra] -- [[User:Dragonlord|Dragonlord]]<br />
* [http://aur.archlinux.org/packages.php?ID=10189 python-gnuplot] - Duplicate of [http://aur.archlinux.org/packages.php?ID=1952 gnuplot-py] which was submitted almost 3 years before.<br />
* [http://aur.archlinux.org/packages.php?ID=14998 rb_libtorrent-svn] - not needed, strange download location<br />
* [http://aur.archlinux.org/packages.php?ID=10573 rs_rtorrent] - duplicate package, already in [community]<br />
* [http://aur.archlinux.org/packages.php?ID=10514 rt61-cvs] - This driver is included in linus's tree and is therefore obsolete<br />
* [http://aur.archlinux.org/packages.php?ID=16225 slim_pam] - just slim with extra configure option<br />
* [http://aur.archlinux.org/packages.php?ID=494 sonic-rainbow] - dead project, does not compile<br />
* [http://aur.archlinux.org/packages.php?ID=2612 stepmania-bin] - orphan, replaced by [http://aur.archlinux.org/packages.php?ID=5453 stepmania]<br />
* [http://aur.archlinux.org/packages.php?ID=12801 swiftfox-pentium2] - obsolete for a long time.<br />
* [http://aur.archlinux.org/packages.php?ID=10121 Super Mario War] - The source is no longer hosted through svn. Could be easily updated though...<br />
* [http://aur.archlinux.org/packages.php?ID=12229 supertux-svn] - It won't compile since it uses cmake insted of jam ... it must be easy to update<br />
* [http://aur.archlinux.org/packages.php?ID=15910 tar-fixed] - This bug is verified fixed in tar 1.20<br />
* [http://aur.archlinux.org/packages.php?ID=3947 viki-svn] - old, pkgbuild is broken<br />
* [http://aur.archlinux.org/packages.php?ID=13622 wicd-svn] - Outdated, wicd on repository extra is newer.<br />
** Does the project still use SVN? If so, then this package is useful. --[[User:Slash|Slash]]<br />
** Yes, definitely not a candidate. However, PKGBUILD needs updating. --[[User:Schivmeister|schiv]]<br />
* [http://aur.archlinux.org/packages.php?ID=8958 wildfire] - Replaced by openfire.<br />
* [http://aur.archlinux.org/packages.php?ID=13019 xf86-video-radeonhd-git] - Seems to not be found : "error: 'xf86-video-radeonhd-git': not found in sync db" with yaourt<br />
** So file an yaourt bug; the files are there<br />
* [http://aur.archlinux.org/packages.php?ID=647 ximian-openoffice] - Ximian port of OpenOffice 1.x. Users should use the more secure OpenOffice 2.x. Also Ximian openoffice is what is now known as ooo-build.<br />
* [http://aur.archlinux.org/packages.php?ID=12067 pidgimpd-svn] - This package is orphaned and it doesn't build. There is mpd support in musictracker.<br />
<br />
==Remove from Filesystem==<br />
<br />
This is a list of files on the AUR filesystem that have been created when poorly formed packages were uploaded. This is a secondary consideration.<br />
<br />
<pre><br />
/packages/0verkill-0.16.tar.gz/<br />
/packages/2007.02.17-2/<br />
/packages/abakus-0.91-1/<br />
/packages/abakus-0.91.tar.gz/<br />
/packages/abakus-0.91/<br />
/packages/akgregator/<br />
/packages/akregator/<br />
/packages/akregator1.0.2/<br />
/packages/akregator_1.0.2/<br />
/packages/amsn-0.97ec1/<br />
/packages/amsn-0.97rc1/<br />
/packages/amsn-097rc1-1/<br />
/packages/amsn-097rc1/<br />
/packages/amsn-cvs/<br />
/packages/amsn-svn_update/<br />
/packages/amsn096/<br />
/packages/amsn096rc1/<br />
/packages/bashstyle-5.0<br />
/packages/bashstyle-5.0rc1.tar.gz/<br />
/packages/bashstyle-5.0rc1.tar.gz1/<br />
/packages/bashstyle-5.0rc1/<br />
/packages/bashstyle.tar.gz/<br />
/packages/bashstyle-ng/<br />
/packages/bashstyle1/<br />
/packages/braero-svn<br />
/packages/braser-cvs/<br />
/packages/brasero-cvs/<br />
/packages/brasero.svn/<br />
/packages/brlcad-cvs/<br />
/packages/ccd2iso-0.3/<br />
/packages/cdcollect-0.6.0/<br />
/packages/centerim-4.22.2/<br />
/packages/centerim/<br />
/packages/ploticus-test/<br />
/packages/test-louipc/<br />
/packages/test/<br />
/packages/test_pkg/<br />
/packages/yacas-1.1.17-2/<br />
/packages/yacas-1.2.2/<br />
/packages/yacas-1.17-2/<br />
/packages/yacas-new/<br />
/packages/yacasnew/<br />
/packages/zzztest/<br />
/packages/zzzztest/<br />
</pre><br />
<br />
==Remove from Filesystem (AUR Bugs)==<br />
<br />
This is a list of files that need to be removed due to AUR bugs as they hinder proper submission and maintenance of packages.<br />
<br />
AUR Bugs<br />
* FS#8672 - http://bugs.archlinux.org/task/8672<br />
<br />
<pre><br />
/packages/isight-firmware-tools<br />
/packages/perl-devel-stacktrace<br />
/packages/psi-qt4<br />
/packages/xcursor-industrial<br />
/packages/zaptel<br />
</pre><br />
<br />
/packages/lib32-dbus is now in community - Allan</div>Cilyan