https://wiki.archlinux.org/api.php?action=feedcontributions&user=Mid-kid&feedformat=atomArchWiki - User contributions [en]2024-03-29T06:01:31ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Profile-sync-daemon&diff=786939Profile-sync-daemon2023-09-04T10:05:53Z<p>Mid-kid: overlay helper is still very much insecure</p>
<hr />
<div>[[Category:Web browser]]<br />
[[ja:Profile-sync-daemon]]<br />
[[ru:Profile-sync-daemon]]<br />
{{Related articles start}}<br />
{{Related|Anything-sync-daemon}}<br />
{{Related|Firefox}}<br />
{{Related|Chromium}}<br />
{{Related|Pdnsd}}<br />
{{Related|SSD}}<br />
{{Related articles end}}<br />
<br />
{{pkg|profile-sync-daemon}} (psd) is a tiny pseudo-daemon designed to manage browser profile(s) in tmpfs and to periodically sync back to the physical disc (HDD/SSD). This is accomplished by an innovative use of [[rsync]] to maintain synchronization between a tmpfs copy and media-bound backup of the browser profile(s). Additionally, psd features several crash recovery features.<br />
<br />
The design goals and benefits of psd are:<br />
<br />
# Transparent user experience<br />
# Reduced wear to physical drives<br />
# Speed<br />
<br />
Since the profile(s), browser cache, etc. are relocated into [[tmpfs]] (RAM disk), the corresponding I/O associated with using the browser is also redirected from the physical drive to RAM, thus reducing wear to the physical drive and also greatly improving browser speed and responsiveness.<br />
<br />
{{Note|<br />
* Some browsers such as Chrome/Chromium or Firefox (since v21) actually keep their cache directories '''separately''' from their profile directory. It is not within the scope of profile-sync-daemon to modify this behavior; users are encouraged to refer to the [[Chromium tweaks#Cache in tmpfs]] section for Chromium and to the [[Firefox on RAM]] article for several workarounds.<br />
* Occasionally, updates/changes are made to the default configuration file {{ic|/usr/share/psd/psd.conf}} upstream. The user copy {{ic|$XDG_CONFIG_HOME/psd/psd.conf}} will need to be diffed against it. On Arch Linux, pacman should notify the user to do this.<br />
* psd can slow down [https://www.reddit.com/r/archlinux/comments/4l7gvm/very_slow_when_login/d3lrx9y/ login], as that is when it copies your browser cache to RAM.}}<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{pkg|profile-sync-daemon}} package.<br />
<br />
== Configuration ==<br />
<br />
When you run psd for the first time, it will create {{ic|$XDG_CONFIG_HOME/psd/psd.conf}} (referred to hereafter as the configuration file) which contains all settings. You can run the {{ic|psd}} command before using {{ic|psd.service}} to create this file without starting synchronization.<br />
<br />
{{Note|Any edits made to this file while psd is active will be applied only after {{ic|psd.service}} has been [[restart]]ed.}}<br />
<br />
* Optionally enable the use of overlayfs to improve sync speed and to use a smaller memory footprint. Do this in the {{ic|USE_OVERLAYFS}} variable. The user will require sudo rights to {{ic|/usr/bin/psd-overlay-helper}} to use this option and the kernel must support overlayfs version 22 or higher. See [[#Overlayfs mode]] for additional details.<br />
* Optionally define which browsers are to be managed in the {{ic|BROWSERS}} array. If none are defined, the default is all detected browsers.<br />
* Optionally disable the use of crash-recovery snapshots (not recommended). Do this in the {{ic|USE_BACKUPS}} variable.<br />
* Optionally define the number of crash-recovery snapshots to keep. Do this in the {{ic|BACKUP_LIMIT}} variable.<br />
<br />
Example: Let us say that Chromium, Opera and Firefox are installed but only Chromium and Opera are to be sync'ed to tmpfs since the user keeps Firefox as a backup browser and it is seldom used:<br />
<br />
BROWSERS=(chromium opera)<br />
<br />
Beginning with version 5.54 of psd, native support for [[#Overlayfs mode|overlayfs]] is included. This feature requires at least a Linux kernel version of 3.18.0 or greater.<br />
<br />
=== Supported browsers ===<br />
<br />
Currently, the following browsers are auto-detected and managed:<br />
<br />
* [[Chromium]]<br />
* {{AUR|chromium-dev}}<br />
* {{AUR|conkeror-git}}<br />
* [[Epiphany]]<br />
* {{Pkg|falkon}}<br />
* [[Firefox]] (all flavors including stable, beta, and nightly)<br />
* {{AUR|google-chrome}}<br />
* {{AUR|google-chrome-beta}}<br />
* {{AUR|google-chrome-dev}}<br />
* [https://bbs.archlinux.org/viewtopic.php?id=117157 heftig's version of Aurora]: An Arch Linux-only browser<br />
* {{AUR|icecat}}<br />
* [[Luakit]]<br />
* [[Opera]]<br />
* [[Otter Browser]]<br />
* {{AUR|palemoon}}<br />
* [[Qutebrowser]]<br />
* {{AUR|seamonkey}}<br />
* {{AUR|surf}}<br />
* {{Pkg|vivaldi}}<br />
<br />
== Usage ==<br />
<br />
[[Start/enable]] the {{ic|psd.service}} [[user unit]]. Additionally, a provided resync-timer will run an hourly resync from tmpfs back to the disk. The resync-timer is started automatically with {{ic|psd.service}} so there is no need to manually start the timer.<br />
<br />
=== Preview (parse) mode ===<br />
<br />
Run {{ic|psd parse}} to view what psd will do/is doing based on {{ic|$XDG_CONFIG_HOME/psd/psd.conf}}. It will also provide useful information such as profile size, paths, and if any recovery snapshots have been created.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Sync at more frequent intervals ===<br />
<br />
The package provided re-sync timer triggers once per hour. Users may optionally redefine this behavior simply by [[Systemd#Editing provided units|extending the systemd unit]]. The example below changes the timer to sync once every ten minutes (note that {{ic|OnUnitActiveSec}} needs to be cleared before being re-assigned [https://bugzilla.redhat.com/show_bug.cgi?id=756787#c9]):<br />
<br />
{{hc|~/.config/systemd/user/psd-resync.timer.d/frequency.conf|2=<br />
[Unit]<br />
Description=Timer for Profile-sync-daemon - 10min<br />
<br />
[Timer]<br />
OnUnitActiveSec=<br />
OnUnitActiveSec=10min<br />
}}<br />
<br />
See {{man|5|systemd.timer}} for additional options.<br />
<br />
=== Overlayfs mode ===<br />
<br />
{{Note|There are several versions of overlayfs available to the Linux kernel in production in various distributions. Versions 22 and lower have a module called 'overlayfs' while newer versions (23 and higher) have a module called 'overlay' -- note the lack of the 'fs' in the newer version. Psd will automatically detect the overlayfs available to your kernel if it is configured to use one of them.}}<br />
<br />
Overlayfs is a simple union file-system mainlined in the Linux kernel version 3.18.0. Starting with psd version 5.54, overlayfs can be used to reduce the memory footprint of psd's tmpfs space and to speed up sync and unsync operations. The magic is in how the overlay mount only writes out data that has changed rather than the entire profile. The same recovery features psd uses in its default mode are also active when running in overlayfs mode. Overlayfs mode is enabled by uncommenting the {{ic|1=USE_OVERLAYFS="yes"}} line in {{ic|$XDG_CONFIG_HOME/psd/psd.conf}} followed by a [[restart]] of the daemon.<br />
<br />
Since version 6.05 of psd, users wanting to take advantage of this mode MUST have [[sudo]] rights (without password prompt) to {{ic|/usr/bin/psd-overlay-helper}} or global sudo rights. The following line in {{ic|/etc/sudoers}} will supply a [[user]] with these rights. Add it using [[visudo]]:<br />
<br />
''username'' ALL=(ALL) NOPASSWD: /usr/bin/psd-overlay-helper<br />
<br />
See the example in the PREVIEW MODE section above which shows a system using overlayfs to illustrate the memory savings that can be achieved. Note the "overlayfs size" report compared to the total "profile size" report for each profile. Be aware that these numbers will change depending on how much data is written to the profile, but in common use cases the overlayfs size will always be less than the profile size.<br />
<br />
{{Warning|Usage of psd in overlayfs mode (in particular, ''psd-overlay-helper'') may lead to privilege escalation. [https://github.com/graysky2/profile-sync-daemon/issues/235][https://github.com/graysky2/profile-sync-daemon/issues/286]}}<br />
<br />
The way overlayfs works is to mount a read-only base copy (browser-back-ovfs) of the profile, and manage the new data on top of that. In order to avoid resyncing to the read-only file system, a copy is used instead. So using overlayfs is a trade off: faster initial sync times and less memory usage vs. disk space in the home dir.<br />
<br />
=== Allocate more memory to accommodate profiles in /run/user/xxxx ===<br />
<br />
The standard way of controlling the size of {{ic|/run/user}} is the RuntimeDirectorySize directive in {{ic|/etc/systemd/logind.conf}} (see {{man|5|logind.conf}} for more). By default, 10% of physical memory is used but one can increase it safely. Remember that tmpfs only consumes what is actually used; the number specified here is just a maximum allowed.<br />
<br />
=== Snapshots ===<br />
<br />
Odds are the "last good" backup of your browser profiles is just fine still sitting happily on your filesystem. Upon restarting psd (on a reboot for example), a check is performed to see if the symlink to the tmpfs copy of your profile is valid. If it is invalid, psd will snapshot the "last good" backup before it rotates it back into place. This is more for a sanity check that psd did no harm and that any data loss was a function of something else.<br />
<br />
{{Note|Users can disable the snapshot/backup feature entirely by uncommenting and setting the {{ic|USE_BACKUPS}} variable to {{ic|"no"}} in {{ic|$XDG_CONFIG_HOME/psd/psd.conf}} if desired.}}<br />
<br />
You will find the snapshot in the same directory as the browser profile and it will contain a date-time-stamp that corresponds to the time at which the recovery took place. For example, chromium will be {{ic|~/.config/chromium-backup-crashrecovery-20130912_153310}} -- of course, the date_time suffix will be different for you.<br />
<br />
To restore your snapshots:<br />
<br />
* [[Stop]] the {{ic|psd.service}} [[user unit]].<br />
* Confirm that there is no symlink to the tmpfs browser profile directory. If there is, psd did not stop correctly for other reasons.<br />
* Move the "bad" copy of the profile to a backup (do not blindly delete anything).<br />
* Copy the snapshot directory to the name that browser expects.<br />
<br />
Example using Chromium:<br />
<br />
$ mv ~/.config/chromium ~/.config/chromium-bad<br />
$ cp -a ~/.config/chromium-backup-crashrecovery-20130912_153310 ~/.config/chromium<br />
<br />
At this point you can launch chromium which will use the backup snapshot you just copied into place. If all is well, close the browser and restart psd. You may safely delete {{ic|~/.config/chromium-backup-crashrecovery-20130912_153310}} at this point.<br />
<br />
==== Clean all the snapshot with the clean mode ====<br />
<br />
Running {{ic|psd clean}} will delete ALL recovery snapshots that have accumulated. Run this only if you are sure that you want to delete them.<br />
<br />
== Support ==<br />
<br />
Post in the [https://bbs.archlinux.org/viewtopic.php?pid=1026974 discussion thread] with comments or concerns.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/02/keep-your-browser-profiles-in-tmpfs-ram.html Web Upd8 - Keep Your Browser Profiles In tmpfs (RAM) For Reduced Disk Writes And Increased Performance With Profile Sync Daemon]<br />
* [https://web.archive.org/web/20220516124034/http://www.bernaerts-nicolas.fr/linux/74-ubuntu/250-ubuntu-tweaks-ssd Nicolas Bernaerts - Tweaks for SSD drive]</div>Mid-kidhttps://wiki.archlinux.org/index.php?title=Pacman/Rosetta&diff=775546Pacman/Rosetta2023-04-14T15:27:33Z<p>Mid-kid: apt-cache rdepends</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Package manager]]<br />
[[de:Rosettastein Paketverwaltung]]<br />
[[es:Pacman (Español)/Rosetta]]<br />
[[fa:Pacman/Rosetta]]<br />
[[fi:Pacman (Suomi)/Rosetta]]<br />
[[ja:Pacman/比較表]]<br />
[[pt:Pacman (Português)/Rosetta]]<br />
[[zh-hans:Pacman/Rosetta]]<br />
This page uses a table to display the correspondence of [[Wikipedia:Package manager|package management]] commands among some of the most popular Linux distributions. The original inspiration was given by [https://old-en.opensuse.org/Software_Management_Command_Line_Comparison openSUSE's Software Management Command Line Comparison].<br />
<br />
{{Tip|Arch users having to temporarily deal with another Linux distribution can use [https://github.com/icy/pacapt pacapt], a simple wrapper around other package managers.}}<br />
<br />
== Basic operations ==<br />
<br />
{| class="wikitable"<br />
! Action !! Arch !! Red Hat/Fedora !! Debian/Ubuntu !! SLES/openSUSE !! Gentoo<br />
|-<br />
| Search for package(s). What exact fields are being searched by default varies in each tool. Mostly options bring tools on par. || {{ic|pacman -Ss}} || {{ic|dnf search}} || {{ic|apt search}} || {{ic|zypper search}} or {{ic|zypper se [-s]}} || {{ic|emerge --search}} ({{ic|-s}})<br />
or {{ic|emerge --searchdesc}} ({{ic|-S}})<br />
|-<br />
| Install package(s) by name || {{ic|pacman -S}} || {{ic|dnf install}} || {{ic|apt install}} || {{ic|zypper install}} or {{ic|zypper in}} || {{ic|emerge}}<br />
|-<br />
| Get source package(s) and build dependencies || {{ic|makepkg -s PKGBUILD}} || {{ic|dnf builddep}} || {{ic|apt build-dep}} || {{ic|zypper source-install}} ({{ic|zypper si}}) or {{ic|zypper install -d}} || {{ic|emerge}}, or explicitly {{ic|emerge --with-bdeps}}<br />
|-<br />
| Only print the targets instead of performing the actual operation || {{ic|pacman --print}} (or {{ic|-p}}) || {{ic|1=dnf --setopt=tsflags=test}} || {{ic|apt --simulate}} (or {{ic|-s}}, {{ic|--dry-run}}, {{ic|--just-print}}) || {{ic|zypper --dry-run}} || {{ic|emerge --pretend}} ({{ic|-p}})<br />
|-<br />
| Toggle the manual confirmations || {{ic|pacman --confirm}} or {{ic|pacman --noconfirm}} || {{ic|dnf --assumeyes}} ({{ic|-y}}) or {{ic|dnf --assumeno}} || {{ic|apt --yes}} ({{ic|-y}}) || {{ic|zypper --non-interactive}} ({{ic|-n}}) or {{ic|zypper --no-confirm}} ({{ic|-y}}) || {{ic|emerge --ask}} ({{ic|-a}})<br />
|-<br />
| Refresh the local package repository || {{ic|pacman -Sy}} (see [[System maintenance#Partial upgrades are unsupported|the warnings about partial updates]]) || {{ic|dnf check-update}} or {{ic|dnf makecache}} || {{ic|apt update}} || {{ic|zypper refresh}} or {{ic|zypper ref}} || {{ic|emerge --sync}}<br />
|-<br />
| Upgrade Packages - Install packages which have an older version already installed || {{ic|pacman -Syu}} || {{ic|dnf upgrade}} || {{ic|apt upgrade}} || {{ic|zypper update}} or {{ic|zypper up}} || {{ic|emerge -[a]uDN @world}}<br />
|-<br />
| Upgrade Packages - Another form of the update command, which can perform more complex updates -- like distribution upgrades. When the usual update command will omit package updates, which include changes in dependencies, this command can perform those updates. || {{ic|pacman -Syu}} || {{ic|dnf distro-sync}} || {{ic|apt dist-upgrade}} || {{ic|zypper dup}} || {{ic|emerge -[a]uDN @world}}<br />
|-<br />
| Remove a package(s) and all dependencies by name || {{ic|pacman -Rs}} || {{ic|dnf remove}} || {{ic|apt autoremove}} || {{ic|zypper remove}} or {{ic|zypper rm}} || {{ic|emerge --depclean}} ({{ic|-c}})<br />
|-<br />
| Remove a package(s) and its configuration files || {{ic|pacman -Rn}} || ? || {{ic|apt purge}} || ? || n/a<br />
|-<br />
| Remove a package(s) and all dependencies and configuration files || {{ic|pacman -Rns}} || ? || {{ic|apt autoremove --purge}} || ? || n/a<br />
|-<br />
| Remove dependencies that are no longer needed (orphans), because e.g. the package which needed the dependencies was removed. || {{ic|<nowiki>pacman -Qdtq | pacman -Rs -</nowiki>}} ({{ic|-Qdttq}} to also remove optional deps)|| {{ic|dnf autoremove}} || {{ic|apt autoremove}} || {{ic|zypper rm -u}} (just for removing a package) or {{ic|zypper packages --unneeded}} (listing only and without recursion) || {{ic|emerge --depclean}} ({{ic|-c}})<br />
|-<br />
| Remove packages no longer included in any repositories. || {{ic|<nowiki>pacman -Qmq | pacman -Rs -</nowiki>}} || {{ic|dnf repoquery --extras}} || {{ic|aptitude purge '~o'}} |||| ?<br />
|-<br />
| Mark a package previously installed as a dependency as explicitly required. || {{ic|pacman -D --asexplicit}} || {{ic|dnf mark install}} || {{ic|apt-mark manual}} || {{ic|zypper install --force}} (workaround which needs to reinstall the package) || {{ic|emerge --select}} ({{ic|-w}})<br />
|-<br />
| Install package(s) as dependency / without marking as explicitly required. || {{ic|pacman -S --asdeps}} || {{ic|dnf install}} and then {{ic|dnf mark remove}} || {{ic|apt-mark auto}} || n/a ([https://bugzilla.opensuse.org/show_bug.cgi?id=1175678 feature request]) || {{ic|emerge --oneshot}} ({{ic|-1}})<br />
|-<br />
| Only downloads the given package(s) without unpacking or installing them || {{ic|pacman -Sw}} || {{ic|dnf download}} || {{ic|apt install --download-only}} (into the package cache) or {{ic|apt download}} (bypass the package cache) || {{ic|zypper --download-only}} || {{ic|emerge --fetchonly}} ({{ic|-f}})<br />
|-<br />
| Clean up all local caches. Options might limit what is actually cleaned. || {{ic|pacman -Sc}} or {{ic|pacman -Scc}} || {{ic|dnf clean all}} || {{ic|apt autoclean}} removes only unneeded, obsolete information or {{ic|apt clean}} || {{ic|zypper clean}} || {{ic|eclean distfiles}}<br />
|-<br />
| Start a shell to enter multiple commands in one session |||| {{ic|dnf shell}} || || {{ic|zypper shell}} ||<br />
|-<br />
| Show a log of actions taken by the software management. || read {{ic|/var/log/pacman.log}} || {{ic|dnf history}} || read {{ic| /var/log/dpkg.log}} || read {{ic|/var/log/zypp/history}} || read {{ic|/var/log/portage}}<br />
|-<br />
| Get a dump of the whole system information - Prints, Saves or similar the current state of the package management system. Preferred output is text or XML. (Note: Why either-or here? No tool offers the option to choose the output format.) || see {{ic|/var/lib/pacman/local}} || see {{ic|/var/lib/rpm/Packages}} || {{ic|apt-cache stats}} |||| {{ic|emerge --info}}<br />
|-<br />
| e-mail delivery of package changes |||||| {{ic|apt install apt-listchanges}} |||| {{ic|eselect news read}}<br />
|-<br />
|}<br />
<br />
== Querying specific packages ==<br />
<br />
{| class="wikitable"<br />
! Action !! Arch !! Red Hat/Fedora !! Debian/Ubuntu !! SLES/openSUSE !! Gentoo<br />
|-<br />
| Show all or most information about a package. The tools' verbosity for the default command vary. But with options, the tools are on par with each other. || {{ic|pacman -Si}} or {{ic|pacman -Qi}} || {{ic|dnf list}} or {{ic|dnf info}} || {{ic|apt show}} or {{ic|apt-cache policy}} || {{ic|zypper info}} or {{ic|zypper if}} || {{ic|emerge -S}}, {{ic|emerge -pv}} or {{ic|eix}}<br />
|-<br />
| Display local package information: Name, version, description, etc. || {{ic|pacman -Qi}} || {{ic|rpm -qi}} / {{ic|dnf info installed}} || {{ic|dpkg -s}} or {{ic|aptitude show}} || {{ic|zypper info}} or {{ic|rpm -qi}} || {{ic|emerge -pv}} or {{ic|emerge -S}}<br />
|-<br />
| Display remote package information: Name, version, description, etc.|| {{ic|pacman -Si}} || {{ic|dnf info}} || {{ic|apt-cache show}} or {{ic|aptitude show}} || {{ic|zypper info}} || {{ic|emerge -pv}} and {{ic|emerge -S}} or {{ic|equery meta}}<br />
|-<br />
| Display files provided by local package || {{ic|pacman -Ql}} || {{ic|rpm -ql}} || {{ic|dpkg -L}} || {{ic|rpm -ql}} || {{ic|equery files}} or {{ic|qlist}}<br />
|-<br />
| Display files provided by a remote package || {{ic|pacman -Fl}} || {{ic|dnf repoquery -l}} or {{ic|repoquery -l}} (from package yum-utils) || {{ic|apt-file list}} |||| {{ic|pfl}}<br />
|-<br />
| Query the package which provides FILE || {{ic|pacman -Qo}} || {{ic|rpm -qf}} (installed only) or {{ic|dnf provides}} (everything) or {{ic|repoquery -f}} (from package yum-utils) || {{ic|dpkg -S}} or {{ic|dlocate}} || {{ic|rpm -qf}} (installed only) or {{ic|zypper search -f}} (everything) || {{ic|equery belongs}} or {{ic|qfile}}<br />
|-<br />
| List the files that the package holds. Again, this functionality can be mimicked by other more complex commands. || {{ic|pacman -Ql}} or {{ic|pacman -Fl}} || {{ic|dnf repoquery -l}} || {{ic|dpkg-query -L}} || {{ic|rpm -ql}} || {{ic|equery files}} or {{ic|qlist}}<br />
|-<br />
| Displays packages which provide the given exp. aka reverse provides. Mainly a shortcut to search a specific field. Other tools might offer this functionality through the search command. || {{ic|pacman -F}} || {{ic|dnf provides}} || {{ic|apt-file search}} || {{ic|zypper what-provides}} or {{ic|zypper wp}}|| {{ic|equery belongs}} (only installed packages) or {{ic|pfl}}<br />
|-<br />
| Search all packages to find the one which holds the specified file. || {{ic|pacman -F}} || {{ic|dnf provides}} || {{ic|apt-file search}} or {{ic|auto-apt}} is using this functionality. || {{ic|zypper search -f}} || {{ic|equery belongs}} or {{ic|qfile}}<br />
|-<br />
| Show the changelog of a package|| {{ic|pacman -Qc}} || {{ic|dnf changelog}} || {{ic|apt-get changelog}} || {{ic|rpm -q --changelog}} || {{ic|equery changes -f}}<br />
|-<br />
|}<br />
<br />
== Querying package lists ==<br />
<br />
{| class="wikitable"<br />
! Action !! Arch !! Red Hat/Fedora !! Debian/Ubuntu !! SLES/openSUSE !! Gentoo<br />
|-<br />
| Search for package(s) by searching the expression in name, description, short description. What exact fields are being searched by default varies in each tool. Mostly options bring tools on par. || {{ic|pacman -Ss}} || {{ic|dnf search}} || {{ic|apt search}} || {{ic|zypper search}} or {{ic|zypper se -s}} || {{ic|emerge -S}} or {{ic|eix}}<br />
|-<br />
| Lists packages which have an update available. Note: Some provide special commands to limit the output to certain installation sources, others use options. || {{ic|pacman -Qu}} || {{ic|dnf list updates}} or {{ic|dnf check-update}} || {{ic|apt list --upgradable}} || {{ic|zypper list-updates}} or {{ic|zypper patch-check}} (just for patches) || {{ic|emerge -uDNp @world}}<br />
|-<br />
| Display a list of all packages in all installation sources that are handled by the packages management. Some tools provide options or additional commands to limit the output to a specific installation source. || {{ic|pacman -Sl}} || {{ic|dnf list available}} || {{ic|apt-cache dumpavail}} or {{ic|apt-cache dump}} (Cache only) or {{ic|apt-cache pkgnames}} || {{ic|zypper packages}} || {{ic|portageq all_best_visible /}}<br />
|-<br />
| Generates a list of installed packages || {{ic|pacman -Q}} || {{ic|dnf list installed}} || {{ic|<nowiki>dpkg --list | grep ^i</nowiki>}} || {{ic|zypper search --installed-only}} || {{ic|qlist -IC}}<br />
|-<br />
| List packages that are installed but are not available in any installation source (anymore). || {{ic|pacman -Qm}} || {{ic|dnf list extras}} || {{ic|<nowiki>apt --installed list | grep ,local</nowiki>}} || {{ic|<nowiki>zypper se -si | grep 'System Packages'</nowiki>}} || {{ic|eix-test-obsolete}}<br />
|-<br />
| List packages that were recently added to one of the installation sources, i.e. which are new to it. || || {{ic|dnf list recent}} || {{ic|aptitude search '~N'}} or {{ic|aptitude forget-new}} || || {{ic|eix-diff}}<br />
|-<br />
| List installed local packages along with version || {{ic|pacman -Q}} || {{ic|rpm -qa}} || {{ic|dpkg -l}} or {{ic|apt list --installed}} || {{ic|zypper search -s}} or {{ic|rpm -qa}} || {{ic|qlist -ICv}}<br />
|-<br />
| Search locally installed package for names or descriptions || {{ic|pacman -Qs}} || {{ic|rpm -qa '*<str>*'}} || {{ic|aptitude search <nowiki>'~i(~n $name|~d $description)'</nowiki>}} || || {{ic|eix -S -I}}<br />
|-<br />
| List packages not required by any other package || {{ic|pacman -Qtt}} || {{ic|dnf leaves}} or {{ic|package-cleanup --leaves --all}} || {{ic|deborphan -anp1}} || || {{ic|emerge -pc}}<br />
|-<br />
| List packages installed explicitly (not as dependencies) || {{ic|pacman -Qe}} || {{ic|dnf history userinstalled}} || {{ic|apt-mark showmanual}} || {{ic|zypper search '' {{!}} grep -E '^i\+'}} (workaround) || {{ic|emerge -pvO @selected}} or {{ic|eix --selected}}<br />
|-<br />
| List packages installed automatically (as dependencies) || {{ic|pacman -Qd}} || {{ic|zypper search '' {{!}} grep -E '^i[^+]'}} (workaround) || {{ic|apt-mark showauto}} || ||<br />
|-<br />
|}<br />
<br />
== Querying package dependencies ==<br />
<br />
{| class="wikitable"<br />
! Action !! Arch !! Red Hat/Fedora !! Debian/Ubuntu !! SLES/openSUSE !! Gentoo<br />
|-<br />
| Display packages which require X to be installed, aka show reverse dependencies. || {{ic|pacman -Sii}} or {{ic|pacman -Qii}} || {{ic|dnf repoquery --alldeps --whatrequires}} or {{ic|repoquery --whatrequires}} || {{ic|apt-cache rdepends}} or {{ic|aptitude search ~D$pattern}} || {{ic|zypper search --requires}} || {{ic|equery depends}}<br />
|-<br />
| Display packages which conflict with given expression (often package). Search can be used as well to mimic this function. || {{ic|pacman -Si}} or {{ic|pacman -Qi}} || {{ic|dnf repoquery --conflicts}} || {{ic|aptitude search '~C$pattern'}} || ||<br />
|-<br />
| List all packages which are required for the given package, aka show dependencies. || {{ic|pacman -Si}} or {{ic|pacman -Qi}} || {{ic|dnf repoquery --requires}} or {{ic|repoquery -R}} || {{ic|apt-cache depends}} or {{ic|apt-cache show}} || {{ic|zypper info --requires}} || {{ic|emerge -ep}}<br />
|-<br />
| List what the current package provides || {{ic|pacman -Sii}} or {{ic|pacman -Qii}} || {{ic|dnf repoquery --provides}} || {{ic|dpkg -s}} or {{ic|aptitude show}} || {{ic|zypper info --provides}} || {{ic|equery files}} or {{ic|qlist}}<br />
|-<br />
| List all packages that require a particular package || {{ic|pacman -Sii}} || {{ic|dnf repoquery --installed --alldeps --whatrequires}} || {{ic|aptitude search ~D{depends,recommends,suggests}:$pattern}} or {{ic|aptitude why}} or {{ic|apt-cache rdepends}} || {{ic|zypper search --requires}} || {{ic|equery depends -a}}<br />
|-<br />
| Display all packages that the specified packages obsoletes. || {{ic|pacman -Si}} or {{ic|pacman -Qi}} || {{ic|dnf list obsoletes}} || {{ic|apt-cache show}} || ||<br />
|-<br />
| Generates an output suitable for processing with dotty for the given package(s). || || || {{ic|apt-cache dotty}} || ||<br />
|-<br />
|}<br />
<br />
== Installation sources management ==<br />
<br />
{| class="wikitable"<br />
! Action !! Arch !! Red Hat/Fedora !! Debian/Ubuntu !! SLES/openSUSE !! Gentoo<br />
|-<br />
| Installation sources management ||edit {{ic|/etc/pacman.conf}} || edit {{ic|/etc/yum.repos.d/${REPO}.repo}}|| edit {{ic|/etc/apt/sources.list}} || edit {{ic|/etc/zypp/repos.d/${REPO}.repo}} || {{ic|layman}} or {{ic|eselect repository}}<br />
|-<br />
| Add an installation source to the system. Some tools provide additional commands for certain sources, others allow all types of source URI for the add command. Again others, like apt force editing a sources list. apt-cdrom is a special command, which offers special options design for CDs/DVDs as source. || edit {{ic|/etc/pacman.conf}} || {{ic|dnf config-manager}} || {{ic|apt-cdrom add}} || {{ic|zypper ar <URL or .repo file>}} || {{ic|layman}} or {{ic|overlays}}<br />
|-<br />
| Refresh the information about the specified installation source(s) or all installation sources. || {{ic|pacman -Sy}} ([[System maintenance#Partial upgrades are unsupported|always upgrade the whole system afterwards]]) || {{ic|dnf clean expire-cache}} and then {{ic|dnf check-update}} || {{ic|apt-get update}} || {{ic|zypper refresh}} or {{ic|zypper ref}} || {{ic|emerge --sync}} or {{ic|layman -S}}<br />
|-<br />
| Prints a list of all installation sources including important information like URI, alias etc. || {{ic|cat /etc/pacman.d/mirrorlist}} || {{ic|cat /etc/yum.repos.d/*}} || {{ic|apt-cache policy}} || {{ic|zypper repos}} or {{ic|zypper lr}} || {{ic|layman -l}} or {{ic|eselect repository list}}<br />
|-<br />
| List all packages from a certain repo|| {{ic|paclist <repo>}} || || || {{ic|zypper search -r <repo>}} or {{ic|zypper se -r <repo>}} || {{ic|eix --in-overlay}}<br />
|-<br />
| Disable an installation source for an operation || || {{ic|1=dnf --disablerepo=}}|| || || {{ic|emerge package::repo-to-use}}<br />
|-<br />
| Download packages from a different version of the distribution than the one installed. || {{ic|1=pacman -S ''repo_name''/''package''}} || {{ic|1=dnf --releasever=}} || {{ic|apt-get install -t release package}} or {{ic|apt-get install package/release}} (dependencies not covered) || {{ic|zypper install -r <repo> package}} || {{ic|echo "category/package ~amd64" >> /etc/portage/package.keywords}} and then {{ic|emerge package}}<br />
|-<br />
|}<br />
<br />
== Overrides ==<br />
<br />
{| class="wikitable"<br />
! Action !! Arch !! Red Hat/Fedora !! Debian/Ubuntu !! SLES/openSUSE !! Gentoo<br />
|-<br />
| Add a package lock rule to keep its current state from being changed || edit {{ic|/etc/pacman.conf}} modifying IgnorePkg array || edit {{ic|dnf.conf}} adding/amending the {{ic|exclude}} option || {{ic|apt-mark hold pkg}} || {{ic|zypper al}} or put package name in {{ic|/etc/zypp/locks}} || {{ic|/etc/portage/package.mask}}<br />
|-<br />
| Delete a package lock rule || edit {{ic|/etc/pacman.conf}} removing package from IgnorePkg line || || {{ic|apt-mark unhold pkg}} || {{ic|zypper rl}} or remove package name from {{ic|/etc/zypp/locks}} || {{ic|/etc/portage/package.mask}} (or {{ic|package.unmask}})<br />
|-<br />
| Show a listing of all lock rules || {{ic|cat /etc/pacman.conf}} || || {{ic|/etc/apt/preferences}} || {{ic|zypper ll}} or view {{ic|/etc/zypp/locks}} || {{ic|cat /etc/portage/package.mask}}<br />
|-<br />
| Set the priority of the given package to avoid upgrade, force downgrade or to overwrite any default behavior. Can also be used to prefer a package version from a certain installation source. || edit {{ic|/etc/pacman.conf}} modifying HoldPkg and/or IgnorePkg arrays || || {{ic|/etc/apt/preferences}}, {{ic|apt-cache policy}}|| {{ic|zypper mr -p}} || edit {{ic|/etc/portage/package.accept_keywords}} adding a line with {{ic|1==category/package-version}}<br />
|-<br />
| Remove a previously set priority || || || {{ic|/etc/apt/preferences}} || {{ic|zypper mr -p}} || edit {{ic|/etc/portage/package.accept_keywords}} removing offending line<br />
|-<br />
| Show a list of set priorities || || || {{ic|apt-cache policy}} or {{ic|/etc/apt/preferences}} || {{ic|zypper lr -p}} || {{ic|grep -r . /etc/portage/package.accept_keywords}}<br />
|-<br />
| Ignore problems that priorities may trigger. || || || || n/a ||<br />
|-<br />
|}<br />
<br />
== Verification and repair ==<br />
<br />
{| class="wikitable"<br />
! Action !! Arch !! Red Hat/Fedora !! Debian/Ubuntu !! SLES/openSUSE !! Gentoo<br />
|-<br />
| Verify single package || {{ic|pacman -Qk}} (can add another {{ic|k}}) || {{ic|rpm -V}} || {{ic|debsums}} || {{ic|rpm -V}} || {{ic|equery check}}<br />
|-<br />
| Verify all packages || {{ic|pacman -Qk}} (can add another {{ic|k}}) || {{ic|rpm -Va}} || {{ic|debsums}} || {{ic|rpm -Va}} || {{ic|equery check}}<br />
|-<br />
| Reinstall given package; this will reinstall the given package without dependency hassle || {{ic|pacman -S}} || {{ic|dnf reinstall}} || {{ic|apt install --reinstall}} || {{ic|zypper install --force}} || {{ic|emerge -1O}}<br />
|-<br />
| Verify dependencies of the complete system; used if installation process was forcefully killed || {{ic|pacman -Dk}} || {{ic|dnf repoquery --requires}} || {{ic|apt-get check}} || {{ic|zypper verify}} || {{ic|emerge -uDN @world}}<br />
|-<br />
| Use some magic to fix broken dependencies in a system || for ''pacman'' dependency level, use {{ic|pacman -Dk}}; for shared library level, use {{AUR|findbrokenpkgs}} or {{ic|lddd}} (from {{pkg|devtools}}) || {{ic|dnf repoquery --unsatisfied}} || {{ic|apt-get --fix-broken}} and then {{ic|aptitude install}} || {{ic|zypper verify}} || {{ic|revdep-rebuild}}<br />
|-<br />
| Add a checkpoint to the package system for later rollback || || (unnecessary, it is done on every transaction) || || n/a ||<br />
|-<br />
| Remove a checkpoint from the system || n/a || n/a || || n/a ||<br />
|-<br />
| Provide a list of all system checkpoints || n/a || {{ic|dnf history list}} || || n/a ||<br />
|-<br />
| Rolls entire packages back to a certain date or checkpoint || n/a || {{ic|dnf history rollback}} || || n/a ||<br />
|-<br />
| Undo a single specified transaction || n/a || {{ic|dnf history undo}} || || n/a ||<br />
|-<br />
|}<br />
<br />
== Using package files and building packages ==<br />
<br />
{| class="wikitable"<br />
! Action !! Arch !! Red Hat/Fedora !! Debian/Ubuntu !! SLES/openSUSE !! Gentoo<br />
|-<br />
| Query a package supplied on the command line rather than an entry in the package management database || {{ic|pacman -Qp}} || {{ic|rpm -qp}} || {{ic|dpkg -I}} || ||<br />
|-<br />
| List the contents of a package file || {{ic|pacman -Qpl}} || {{ic|rpmls rpm -qpl}} || {{ic|dpkg -c}} || {{ic|rpm -qpl}} ||<br />
|-<br />
| Install local package file, e.g. app.rpm and uses the installation sources to resolve dependencies || {{ic|pacman -U}} || {{ic|dnf install}} || {{ic|apt install}} || {{ic|zypper in}} || {{ic|emerge}}<br />
|-<br />
| Updates package(s) with local packages and uses the installation sources to resolve dependencies || {{ic|pacman -U}} || {{ic|dnf upgrade}} || {{ic|debi}} || || {{ic|emerge}}<br />
|-<br />
| Add a local package to the local package cache mostly for debugging purposes. || {{ic|cp ''package-filename'' /var/cache/pacman/pkg/}} || || {{ic|apt-cache add ''package-filename''}} || n/a || {{ic|cp ''package-filename'' /usr/portage/distfiles}}<br />
|-<br />
| Extract a package || {{ic|tar -xvf}} || {{ic|<nowiki>rpm2cpio | cpio -vid</nowiki>}} || {{ic|dpkg-deb -x}} || {{ic|<nowiki>rpm2cpio | cpio -vid</nowiki>}} || {{ic|tar -jxvf}}<br />
|-<br />
| Install/Remove packages to satisfy build-dependencies. Uses information in the source package || Use [[ABS]] and {{ic|makepkg -seoc}} || {{ic|dnf builddep}} || {{ic|apt-get build-dep}} || {{ic|zypper si -d}} || {{ic|emerge -o}}<br />
|-<br />
| Display the source package to the given package name(s) || || {{ic|dnf repoquery -s}} || {{ic|apt-cache showsrc}} || n/a ||<br />
|-<br />
| Download the corresponding source package(s) to the given package name(s) || Use [[ABS]] and {{ic|makepkg -o}} || {{ic|dnf download --source}} || {{ic|apt-get source}} or {{ic|debcheckout}} || {{ic|zypper source-install}} || {{ic|emerge --fetchonly}}<br />
|-<br />
| Build a package || {{ic|makepkg -s}} || {{ic|rpmbuild -ba}} (normal) or ''mock'' (in chroot) || {{ic|debuild}} || {{ic|rpmbuild -ba}}, then build, and then {{ic|osc build}} || {{ic|ebuild}} or {{ic|quickpkg}}<br />
|-<br />
| Check for possible packaging issues || ''namcap''<br>(requires {{Pkg|namcap}}) || ''rpmlint'' || ''lintian'' || ''rpmlint'' || ''repoman''<br />
|-<br />
|}<br />
<br />
== Log file rotation ==<br />
<br />
By default, Arch Linux does not rotate {{ic|pacman.log}}. See, for example, {{Bug|11272}} and {{Bug|20428#comment66480}}. This is in contrast to the default policy of most other Linux distributions. Some distributions, notably Gentoo, hardly write log files by default.<br />
<br />
== See also ==<br />
<br />
* [https://dnf.readthedocs.org/en/latest/cli_vs_yum.html Changes in DNF CLI compared to Yum]</div>Mid-kidhttps://wiki.archlinux.org/index.php?title=XDG_Base_Directory&diff=730791XDG Base Directory2022-05-27T11:20:09Z<p>Mid-kid: Add classic libxdg-basedir implementation to C category</p>
<hr />
<div>[[Category:Freedesktop.org]]<br />
[[Category:Configuration files]]<br />
[[Category:Development]]<br />
[[ja:XDG Base Directory]]<br />
[[pt:XDG Base Directory]]<br />
{{Related articles start}}<br />
{{Related|dotfiles}}<br />
{{Related|XDG user directories}}<br />
{{Related articles end}}<br />
<br />
This article summarizes the [https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html XDG Base Directory specification] in [[#Specification]] and tracks software support in [[#Support]].<br />
<br />
== Specification ==<br />
<br />
Please read the [https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html full specification]. This section will attempt to break down the essence of what it tries to achieve.<br />
<br />
Only {{ic|XDG_RUNTIME_DIR}} is set by default through [https://www.freedesktop.org/software/systemd/man/pam_systemd.html pam_systemd]. It is up to the user to explicitly define the other variables according to the specification.<br />
<br />
See [[Environment variables#Globally]] for information on defining variables.<br />
<br />
=== User directories ===<br />
<br />
* {{ic|XDG_CONFIG_HOME}}<br />
** Where user-specific configurations should be written (analogous to {{ic|/etc}}).<br />
** Should default to {{ic|$HOME/.config}}.<br />
<br />
* {{ic|XDG_CACHE_HOME}}<br />
** Where user-specific non-essential (cached) data should be written (analogous to {{ic|/var/cache}}).<br />
** Should default to {{ic|$HOME/.cache}}.<br />
<br />
* {{ic|XDG_DATA_HOME}}<br />
** Where user-specific data files should be written (analogous to {{ic|/usr/share}}).<br />
** Should default to {{ic|$HOME/.local/share}}.<br />
<br />
* {{ic|XDG_STATE_HOME}}<br />
** Where user-specific state files should be written (analogous to {{ic|/var/lib}}).<br />
** Should default to {{ic|$HOME/.local/state}}.<br />
<br />
* {{ic|XDG_RUNTIME_DIR}}<br />
** Used for non-essential, user-specific data files such as sockets, named pipes, etc.<br />
** Not required to have a default value; warnings should be issued if not set or equivalents provided.<br />
** Must be owned by the user with an access mode of {{ic|0700}}.<br />
** Filesystem fully featured by standards of OS.<br />
** Must be on the local filesystem.<br />
** May be subject to periodic cleanup.<br />
** Modified every 6 hours or set sticky bit if persistence is desired.<br />
** Can only exist for the duration of the user's login.<br />
** Should not store large files as it may be mounted as a tmpfs.<br />
** pam_systemd sets this to {{ic|/run/user/$UID}}.<br />
<br />
=== System directories ===<br />
<br />
* {{ic|XDG_DATA_DIRS}}<br />
** List of directories separated by {{ic|:}} (analogous to {{ic|PATH}}).<br />
** Should default to {{ic|/usr/local/share:/usr/share}}.<br />
<br />
* {{ic|XDG_CONFIG_DIRS}}<br />
** List of directories separated by {{ic|:}} (analogous to {{ic|PATH}}).<br />
** Should default to {{ic|/etc/xdg}}.<br />
<br />
== Support ==<br />
<br />
{{Expansion|The current supported/partial/hardcoded split is not detailed enough and can be misleading. The tables could be merged into one (with more fields added on how the programs work with the specification) or differently named categories could be used.|section=Add description of support categories}}<br />
<br />
This section exists to catalog the growing set of software using the [https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html XDG Base Directory Specification] introduced in 2003.<br />
This is here to demonstrate the viability of this specification by listing commonly found dotfiles and their support status.<br />
For those not currently supporting the Base Directory Specification, workarounds will be demonstrated to emulate it instead.<br />
<br />
The workarounds will be limited to anything not involving patching the source, executing code stored in [[environment variables]] or compile-time options.<br />
The rationale for this is that configurations should be portable across systems and having compile-time options prevent that.<br />
<br />
Hopefully this will provide a source of information about exactly what certain kinds of dotfiles are and where they come from.<br />
<br />
=== Contributing ===<br />
<br />
When contributing make sure to use the correct section.<br />
<br />
Nothing should require code evaluation (such as [[vim]] and {{ic|VIMINIT}}), patches or compile-time options to gain support and anything which does must be deemed hardcoded.<br />
Additionally, if the process is error prone or difficult, it should also be classified as hardcoded.<br />
<br />
* The first column should be either a link to an internal article, a [[Template:Pkg]] or a [[Template:AUR]].<br />
* The second column is for any legacy files and directories the project had (one per line), this is done so people can find them even if they are no longer read.<br />
* In the third, try to find the commit or version a project switched to XDG Base Directory or any open discussions and include them in the next two columns (two per line).<br />
* The last column should include any appropriate workarounds or solutions. Please verify that your solution is correct and functional.<br />
<br />
=== Supported ===<br />
<br />
{| class="wikitable sortable" style="width: 100%"<br />
! Application<br />
! Legacy Path<br />
! Supported Since<br />
! Discussion<br />
! Notes<br />
|-<br />
| {{AUR|aerc-git}}<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| [[ALSA]]<br />
| {{ic|~/.asoundrc}}<br />
| [https://github.com/alsa-project/alsa-lib/commit/577df365f66ee09579864fc771136e690927b3bf 577df36]<br />
[https://github.com/alsa-project/alsa-lib/releases/tag/v1.2.3 1.2.3]<br />
| [https://github.com/alsa-project/alsa-lib/issues/49]<br />
| {{ic|XDG_CONFIG_HOME/alsa/asoundrc}}<br />
|-<br />
| [https://developer.android.com/studio/index.html Android Studio]<br />
| {{ic|~/.AndroidStudioX.X}}<br />
| [https://developer.android.com/studio/intro/studio-config#file_location Android Studio 4.1]<br />
|<br />
|<br />
XDG_CONFIG_HOME/Google/AndroidStudioX.X<br />
XDG_DATA_HOME/Google/AndroidStudioX.X<br />
XDG_CACHE_HOME/Google/AndroidStudioX.X<br />
[https://developer.android.com/studio/intro/studio-config#file_location Location overview by Google] does not mention XDG - paths could be hardcoded instead of using the proper variable, though that is unlikely as Intellij IDEA, which Android Studio is based on, implements it properly as well<br />
|-<br />
| {{AUR|antimicrox}}<br />
| {{ic|~/.antimicro}}, {{ic|~/.antimicrox}}<br />
| [https://github.com/Antimicrox/antimicrox/commit/edba864 edba864]<br />
| [https://github.com/Antimicro/antimicro/issues/5]<br />
| <br />
|-<br />
| {{Aur|apvlv}}<br />
| {{ic|~/.apvlvrc}}<br />
| [https://github.com/naihe2010/apvlv/commit/ed0e0112b05b0cafa13ca4e215ee559c82194caf]<br />
| [https://github.com/naihe2010/apvlv/issues/70]<br />
| Uses {{ic|XDG_CONFIG_HOME/apvlv/apvlvrc}} now if it exist.<br />
|-<br />
| [[aria2]]<br />
| {{ic|~/.aria2}}<br />
| [https://github.com/tatsuhiro-t/aria2/commit/8bc1d37 8bc1d37]<br />
| [https://github.com/tatsuhiro-t/aria2/issues/27]<br />
|<br />
XDG_CONFIG_HOME/aria2/<br />
XDG_CACHE_HOME/aria2/<br />
|-<br />
| {{Pkg|asunder}}<br />
| {{ic|~/.asunder}} {{ic|~/.asunder_album_artist}} {{ic|~/.asunder_album_genre}} {{ic|~/.asunder_album_title}}<br />
| [https://littlesvr.ca/bugs/show_bug.cgi?id=31 2.9.0]{{Dead link|2021|05|17|status=SSL error}}<br />
| [https://littlesvr.ca/bugs/show_bug.cgi?id=52]{{Dead link|2021|05|17|status=SSL error}}<br />
| Uses {{ic|XDG_CONFIG_HOME/asunder/asunder}} for {{ic|~/.asunder}} and {{ic|XDG_CACHE_HOME/asunder/asunder_album_...}} for the other 3 files. Legacy paths are not removed after migration, they have to be deleted manually.<br />
|-<br />
| {{Pkg|binwalk}}<br />
| {{ic|~/.binwalk}}<br />
| [https://github.com/ReFirmLabs/binwalk/commit/2051757 2051757]<br />
| [https://github.com/ReFirmLabs/binwalk/issues/216]<br />
| {{ic|XDG_CONFIG_HOME/binwalk}}<br />
|-<br />
| [[Blender]]<br />
| {{ic|~/.blender}}<br />
| [https://git.blender.org/gitweb/gitweb.cgi/blender.git/commit/4293f47 4293f47]<br />
| [https://developer.blender.org/T28943]<br />
|<br />
|- <br />
| {{Pkg|byobu}}<br />
| {{ic|~/.byobu}}<br />
| [https://launchpad.net/byobu/+milestone/4.17 4.17]<br />
| [https://bugs.launchpad.net/byobu/+bug/553105]<br />
| <br />
{{ic|XDG_CONFIG_HOME/byobu}}<br />
<br />
Legacy path takes precedence if present, or if {{ic|XDG_CONFIG_HOME}} is ''not'' set.<br />
|-<br />
| {{Pkg|calcurse}}<br />
| {{ic|~/.calcurse}}<br />
| [https://github.com/lfos/calcurse/commit/04162d 04162d]<br />
| [https://github.com/lfos/calcurse/pull/254] [https://github.com/lfos/calcurse/issues/252]<br />
|<br />
XDG_CONFIG_HOME/calcurse<br />
XDG_DATA_HOME/calcurse<br />
<br />
If the legacy path {{ic|~/.calcurse}} is present, it will take precedence.<br />
|-<br />
| {{Pkg|calibre}}<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{Pkg|ccache}}<br />
| {{ic|~/.ccache}}<br />
| [https://ccache.dev/releasenotes.html#_ccache_4_0 4.0]<br />
| [https://github.com/ccache/ccache/issues/191]<br />
|<br />
XDG_CACHE_HOME/ccache<br />
XDG_CONFIG_HOME/ccache/ccache.conf<br />
|-<br />
| {{AUR|citra-git}}<br />
| {{ic|~/.citra-emu}}<br />
| [https://github.com/citra-emu/citra/commit/f7c3193 f7c3193]<br />
| [https://github.com/citra-emu/citra/pull/575]<br />
|<br />
|-<br />
| [https://clangd.llvm.org/config.html clangd]<br />
| {{ic|~/.clangd}}<br />
| [https://github.com/JohnHolmesII/llvm-project/commit/fdf7dcc fdf7dcc]<br />
| [https://github.com/clangd/clangd/issues/341]<br />
| {{ic|XDG_CONFIG_HOME/clangd/config.yml}}<br />
<br />
{{ic|XDG_CACHE_HOME/clangd}}<br />
<br />
Project specific configuration can be specified in {{ic|proj/.clangd}}.<br />
Configuration is combined when this is sensible. In case of conflicts, user config has the highest precedence, then inner project, then outer project.<br />
|-<br />
| [[Composer]]<br />
| {{ic|~/.composer}}<br />
| [https://github.com/composer/composer/releases/tag/1.0.0-beta1 1.0.0-beta1]<br />
| [https://github.com/composer/composer/pull/1407]<br />
|<br />
|-<br />
| [[cURL]]<br />
| {{ic|~/.curlrc}}<br />
| [https://curl.se/changes.html#7_73_0 7.73.0]<br />
| [https://github.com/curl/curl/issues/5829]<br />
| {{ic|XDG_CONFIG_HOME/.curlrc}}<br />
|-<br />
| {{Pkg|d-feet}}<br />
| {{ic|~/.d-feet}}<br />
| [https://gitlab.gnome.org/GNOME/d-feet/commit/7f6104b 7f6104b]<br />
|<br />
|<br />
|-<br />
| {{Pkg|dconf}}<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| [[Dolphin emulator]]<br />
| {{ic|~/.dolphin-emu}}<br />
| [https://github.com/dolphin-emu/dolphin/commit/a498c68 a498c68]<br />
| [https://github.com/dolphin-emu/dolphin/pull/2304]<br />
|<br />
|-<br />
| {{AUR|dr14_tmeter}}<br />
|<br />
| [https://github.com/simon-r/dr14_t.meter/commit/7e777ca 7e777ca]<br />
| [https://github.com/simon-r/dr14_t.meter/pull/30]<br />
| {{ic|XDG_CONFIG_HOME/dr14tmeter/}}<br />
|-<br />
| {{Pkg|dunst}}<br />
|<br />
| [https://github.com/dunst-project/dunst/commit/78b6e2b 78b6e2b]<br />
| [https://github.com/dunst-project/dunst/issues/22]<br />
|<br />
|-<br />
| [[Emacs]]<br />
| {{ic|~/.emacs}} {{ic|~/.emacs.d/init.el}}<br />
| [https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=4118297ae2fab4886b20d193ba511a229637aea3]<br />
[https://www.gnu.org/savannah-checkouts/gnu/emacs/emacs.html#Releases 27.1]<br />
|<br />
| {{ic|XDG_CONFIG_HOME/emacs/init.el}}<br />
Legacy paths have precedence over XDG paths. Emacs will never create {{ic|XDG_CONFIG_HOME/emacs/}}.<br />
Workaround for 26.3 or older: It's possible to set {{ic|HOME}}, but it has unexpected side effects.<br />
|-<br />
| [[fish]]<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| [[fontconfig]]<br />
| {{ic|~/.fontconfig}} {{ic|~/.fonts}}<br />
| [https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/8c255fb 8c255fb], [https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/437f03299bd1adc9673cd576072f1657be8fd4e0]<br />
|<br />
| Use {{ic|XDG_DATA_HOME/fonts}} to store fonts instead.<br />
|-<br />
| {{Pkg|fontforge}}<br />
| {{ic|~/.FontForge}} {{ic|~/.PfaEdit}}<br />
| [https://github.com/fontforge/fontforge/commit/e4c2cc7 e4c2cc7]<br />
|<br />
[https://github.com/fontforge/fontforge/issues/847]<br />
[https://github.com/fontforge/fontforge/issues/991]<br />
|<br />
|-<br />
| {{Pkg|freerdp}}<br />
| {{ic|~/.freerdp}}<br />
| [https://github.com/FreeRDP/FreeRDP/commit/edf6e72 edf6e72]<br />
|<br />
|<br />
|-<br />
| [[Gajim]]<br />
| {{ic|~/.gajim}}<br />
| [https://dev.gajim.org/gajim/gajim/commit/3e777ea 3e777ea]<br />
| [https://dev.gajim.org/gajim/gajim/issues/2149]<br />
|<br />
|-<br />
| {{AUR|gconf}}<br />
| {{ic|~/.gconf}}<br />
| [https://gitlab.gnome.org/Archive/gconf/commit/fc28caa fc28caa]<br />
| [https://bugzilla.gnome.org/show_bug.cgi?id=674803]<br />
|-<br />
| {{Pkg|ghc}}<br />
| {{ic|~/.ghci}}<br />
| [https://gitlab.haskell.org/ghc/ghc/-/commit/763d28551de32377a1dca8bdde02979e3686f400]<br />
| [https://ghc.haskell.org/trac/ghc/ticket/6077]<br />
| Supported upstream from 9.4.1 [https://ghc.gitlab.haskell.org/ghc/doc/users_guide/9.4.1-notes.html?highlight=xdg], but as of 2022-04-18 Arch package is 9.0.2 and not yet up-to-date.<br />
|-<br />
| [[GDB]]<br />
| {{ic|~/.gdbinit}}, {{ic|~/.gdb_history}}<br />
| [https://lists.gnu.org/archive/html/info-gnu/2021-09/msg00007.html 11.1]<br />
|<br />
| {{ic|XDG_CONFIG_HOME/gdb/gdbinit}}, {{ic|1=export GDBHISTFILE="$XDG_DATA_HOME"/gdb/history}}<br />
|-<br />
| [[GIMP]]<br />
| {{ic|~/.gimp-x.y}} {{ic|~/.thumbnails}}<br />
|<br />
[https://gitlab.gnome.org/GNOME/gimp/commit/60e0cfe 60e0cfe]<br />
[https://gitlab.gnome.org/GNOME/gimp/commit/483505f 483505f]<br />
|<br />
[https://bugzilla.gnome.org/show_bug.cgi?id=166643]<br />
[https://bugzilla.gnome.org/show_bug.cgi?id=646644]<br />
|<br />
|-<br />
| [[Git]]<br />
| {{ic|~/.gitconfig}}<br />
| [https://github.com/git/git/commit/0d94427 0d94427]<br />
|<br />
| {{ic|XDG_CONFIG_HOME/git/config}}<br />
|-<br />
| [https://github.com/google/gops gops]<br />
|<br />
| [https://github.com/google/gops/commit/71c4255 71c4255]<br />
|<br />
|<br />
|-<br />
| [[Wikipedia:gnuplot|gnuplot]]<br />
| {{ic|~/.gnuplot_history}}<br />
| [https://sourceforge.net/p/gnuplot/gnuplot-main/ci/a5562b1/ a5562b1]<br />
[https://sourceforge.net/p/gnuplot/gnuplot-main/merge-requests/12/]<br />
|<br />
|<br />
|-<br />
| {{AUR|goobook}}<br />
| {{ic|~/.goobookrc}}<br />
| [https://gitlab.com/goobook/goobook/-/blob/master/CHANGES.rst 3.5]<br />
| [https://gitlab.com/goobook/goobook/-/merge_requests/11]<br />
| {{ic|XDG_CONFIG_HOME/goobookrc}}<br />
|-<br />
| [[Godot Engine]]<br />
| {{ic|~/.godot}}<br />
| [https://github.com/godotengine/godot/pull/12988/commits/73049d115e190b8c356f0689a9079c3c73cc5765 73049d1]<br />
[https://github.com/godotengine/godot/releases/tag/3.0-stable 3.0-stable]<br />
| [https://github.com/godotengine/godot/issues/3513]<br />
|<br />
|-<br />
| [[GStreamer]]<br />
| {{ic|~/.gstreamer-0.10}}<br />
| [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/4e36f93 4e36f93]<br />
| [https://bugzilla.gnome.org/show_bug.cgi?id=518597]<br />
|<br />
|-<br />
| [[GTK]] 3<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{Pkg|helm}}<br />
| {{ic|~/.helm}}<br />
| [https://github.com/helm/helm/releases/tag/v3.0.0 3.0.0]<br />
|<br />
|<br />
|-<br />
| {{Pkg|htop}}<br />
| {{ic|~/.htoprc}}<br />
| [https://github.com/hishamhm/htop/commit/93233a6 93233a6]<br />
|<br />
|<br />
|-<br />
| {{Pkg|httpie}}<br />
| {{ic|~/.httpie}}<br />
| [https://github.com/httpie/httpie/commit/5af0874ed302e9ef79cec97836529ccf353e53f7 5af0874]<br />
| [https://github.com/httpie/httpie/issues/145]<br />
|<br />
|-<br />
| [[i3]]<br />
| {{ic|~/.i3}}<br />
| [http://code.stapelberg.de/git/i3/commit/?id=7c130fb 7c130fb]<br />
|<br />
|<br />
|-<br />
| {{Pkg|i3blocks}}, {{AUR|i3blocks-git}}<br />
|<br />
| [https://github.com/vivien/i3blocks/commit/a1782404c7d933145b048d0d1872ea40d7a293b6]<br />
|<br />
|<br />
|-<br />
| [https://archlinux.org/packages/?name=i3-gaps i3-gaps]<br />
|<br />
| [https://github.com/Airblader/i3/commit/7c130fb540da378c4ba3744d2ff39983df3ad705]<br />
|<br />
|<br />
|-<br />
| {{Pkg|i3status}}<br />
| {{ic|~/.i3status.conf}}<br />
| [http://code.stapelberg.de/git/i3status/commit/?id=c3f7fc4 c3f7fc4]<br />
|<br />
|<br />
|-<br />
| {{Pkg|i3status-rust}}<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{Pkg|imagemagick}}<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| [[Inkscape]]<br />
| {{ic|~/.inkscape}}<br />
| [https://wiki.inkscape.org/wiki/index.php/Release_notes/0.47#Preferences 0.47]<br />
| [https://bugs.launchpad.net/inkscape/+bug/199720]<br />
|<br />
|-<br />
| [http://ipython.org ipython]<br />
| {{ic|~/.ipython}}<br />
| [https://ipython.readthedocs.io/en/stable/whatsnew/version8.html#re-added-support-for-xdg-config-directories 8.0.0]<br />
| [https://github.com/ipython/ipython/pull/13224]<br />
| The default dotfile path is still $HOME but xdg directories (or ~/.config/ipython if XDG_* vars are unset) are supported and work correctly.<br />
|-<br />
| [https://iwd.wiki.kernel.org/ iwd] / iwctl<br />
| {{ic|~/.iwctl_history}}<br />
| [https://git.kernel.org/pub/scm/network/wireless/iwd.git/commit/?id=d3e00d7f d3e00d7f]<br />
|<br />
|<br />
|-<br />
| {{Pkg|intellij-idea-community-edition}} / {{AUR|intellij-idea-ultimate-edition}}<br />
| {{ic|~/.IntelliJIdeaXXXX.X}}<br />
| [https://confluence.jetbrains.com/display/IDEADEV/IntelliJ%2BIDEA%2B2020.1%2B%28201.6668.121%2Bbuild%29%2BRelease%2BNotes 2020.1]<br />
| [https://youtrack.jetbrains.com/issue/IDEA-22407]<br />
|<br />
XDG_CONFIG_HOME/JetBrains/IntelliJIdeaXXXX.X<br />
XDG_DATA_HOME/JetBrains/IntelliJIdeaXXXX.X<br />
XDG_CACHE_HOME/JetBrains/IntelliJIdeaXXXX.X<br />
|-<br />
| {{Pkg|josm}}<br />
| {{ic|~/.josm}}<br />
| [https://josm.openstreetmap.de/changeset/11162/josm 11162]<br />
| [https://josm.openstreetmap.de/ticket/6664]<br />
|<br />
|-<br />
| [[Kakoune]]<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| [[Core utilities|less]]<br />
| {{ic|~/.lesshst}}, {{ic|~/.lesskey}}<br />
| [https://www.greenwoodsoftware.com/less/news.590.html 590]<br />
full support in [https://www.greenwoodsoftware.com/less/news.600.html 600]<br />
| [https://github.com/gwsw/less/issues/153]<br />
| The environment variables {{ic|XDG_CONFIG_HOME}} and {{ic|XDG_DATA_HOME}} '''must''' be set in version 590. This is no longer necessary when version 600 lands.<br />
|-<br />
| latexmk (in {{Pkg|texlive-core}})<br />
| {{ic|~/.latexmkrc}}<br />
|<br />
|<br />
|<br />
{{ic|XDG_CONFIG_HOME/latexmk/latexmkrc}}<br />
|-<br />
| {{Pkg|lftp}}<br />
| {{ic|~/.lftp}}<br />
| [https://github.com/lavv17/lftp/commit/21dc400 21dc400]<br />
| [https://www.mail-archive.com/lftp@uniyar.ac.ru/msg04301.html]<br />
|<br />
|-<br />
| {{AUR|lgogdownloader}}<br />
| {{ic|~/.gogdownloader}}<br />
| [https://github.com/Sude-/lgogdownloader/commit/d430af6 d430af6]<br />
| [https://github.com/Sude-/lgogdownloader/issues/4]<br />
|<br />
|-<br />
| [[LibreOffice]]<br />
|<br />
|<br />
[https://cgit.freedesktop.org/libreoffice/ure/commit/?id=a6f56f7 a6f56f7]<br />
[https://cgit.freedesktop.org/libreoffice/bootstrap/commit/?id=25bd2ee 25bd2ee]<br />
| [https://bugs.documentfoundation.org/show_bug.cgi?id=32263]<br />
|<br />
|-<br />
| {{Pkg|luarocks}}<br />
| {{ic|~/.luarocks}}<br />
| [https://github.com/luarocks/luarocks/pull/1298/commits/cd16cdd5f889024f28cc384e3d721a4f4a3261d3 cd16cdd]<br />
| [https://github.com/luarocks/luarocks/pull/1298]<br />
|<br />
XDG_CONFIG_HOME/luarocks<br />
XDG_CACHE_HOME/luarocks<br />
<br />
If the legacy path {{ic|~/.luarocks}} is present, it will take precedence.<br />
|-<br />
| [https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS NSS]<br />
| {{ic|~/.pki}}<br />
| [https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.42_release_notes 3.42]<br />
| [https://bugzilla.mozilla.org/show_bug.cgi?id=818686]<br />
|<br />
|-<br />
| [[Streamlink]]<br />
| {{ic|~/.livestreamerrc}}<br />
| [https://github.com/chrippa/livestreamer/commit/ea80591 ea80591]<br />
| [https://github.com/chrippa/livestreamer/pull/106]<br />
|<br />
|-<br />
| [[mc]]<br />
| {{ic|~/.mc}}<br />
|<br />
[https://github.com/MidnightCommander/mc/commit/1b99570 1b99570]<br />
[https://github.com/MidnightCommander/mc/commit/0b71156 0b71156]<br />
[https://github.com/MidnightCommander/mc/commit/ce401d7 ce401d7]<br />
| [https://www.midnight-commander.org/ticket/1851]<br />
|<br />
|-<br />
| [[Mercurial]]<br />
| {{ic|~/.hgrc}}<br />
|<br />
[https://www.mercurial-scm.org/repo/hg/rev/3540200 3540200]<br />
[https://www.mercurial-scm.org/wiki/Release4.2 4.2]<br />
|<br />
| {{ic|XDG_CONFIG_HOME/hg/hgrc}}.<br />
|-<br />
| [[msmtp]]<br />
| {{ic|~/.msmtprc}}<br />
|<br />
[https://github.com/marlam/msmtp-mirror/commit/af2f409 af2f409]<br />
v1.6.7+<br />
|<br />
| {{ic| XDG_CONFIG_HOME/msmtp/config}}.<br />
|-<br />
| {{Pkg|mesa}}<br />
|<br />
| [https://gitlab.freedesktop.org/mesa/mesa/-/commit/87ab26b 87ab26b]<br />
|<br />
| {{ic|XDG_CACHE_HOME/mesa}}<br />
|-<br />
| {{Pkg|milkytracker}}<br />
| {{ic|~/.milkytracker_config}}<br />
| [https://github.com/Deltafire/MilkyTracker/commit/eb487c5 eb487c5]<br />
| [https://github.com/Deltafire/MilkyTracker/issues/12]<br />
|<br />
|-<br />
| [[mozc]]<br />
| {{ic|~/.mozc}}<br />
| [https://github.com/google/mozc/commit/91cc1e19ef34aeb12888b697fefa52907f1a834d 91cc1e1]<br />
| [https://github.com/google/mozc/issues/474]<br />
|<br />
|-<br />
| [[mpd]]<br />
| {{ic|~/.mpdconf}}<br />
| [https://github.com/MusicPlayerDaemon/MPD/commit/87b7328 87b7328]<br />
|<br />
|<br />
|-<br />
| [[mpv]]<br />
| {{ic|~/.mpv}}<br />
| [https://github.com/mpv-player/mpv/commit/cb250d4 cb250d4]<br />
| [https://github.com/mpv-player/mpv/pull/864]<br />
|<br />
|-<br />
| [[mutt]]<br />
| {{ic|~/.mutt}}<br />
| [https://gitlab.com/muttmua/mutt/commit/b17cd67 b17cd67]<br />
| [https://gitlab.com/muttmua/trac-tickets/raw/master/tickets/closed/3207-Conform_to_XDG_Base_Directory_Specification.txt]<br />
|<br />
|-<br />
| {{Pkg|mypaint}}<br />
| {{ic|~/.mypaint}}<br />
| [https://github.com/mypaint/mypaint/commit/cf723b7 cf723b7]<br />
|<br />
|<br />
|-<br />
| [[nano]]<br />
| {{ic|~/.nano/}} {{ic|~/.nanorc}}<br />
| [https://git.savannah.gnu.org/cgit/nano.git/commit/?id=c16e79b c16e79b]<br />
| [https://savannah.gnu.org/patch/?8523]<br />
|<br />
|-<br />
| [[ncmpcpp]]<br />
| {{ic|~/.ncmpcpp}}<br />
|<br />
[https://github.com/arybczak/ncmpcpp/commit/38d9f81 38d9f81]<br />
[https://github.com/arybczak/ncmpcpp/commit/27cd86e 27cd86e]<br />
|<br />
[https://github.com/arybczak/ncmpcpp/issues/79]<br />
[https://github.com/arybczak/ncmpcpp/issues/110]<br />
| {{ic|ncmpcpp_directory}} should be set to avoid an {{ic|error.log}} file in {{ic|~/.ncmpcpp}}.<br />
|-<br />
| [[Neovim]]<br />
| {{ic|~/.nvim}} {{ic|~/.nvimlog}} {{ic|~/.nviminfo}}<br />
| [https://github.com/neovim/neovim/commit/1ca5646 1ca5646]<br />
|<br />
[https://github.com/neovim/neovim/issues/78]<br />
[https://github.com/neovim/neovim/pull/3198]<br />
|<br />
|-<br />
| [http://0ldsk00l.ca/nestopia/ Nestopia UE]<br />
| {{ic|~/.nestopia/}}<br />
| [https://github.com/0ldsk00l/nestopia/commit/d78381198a26a10333128e9bf28bc530a610c008 610c008] [https://github.com/0ldsk00l/nestopia/releases/tag/1.51.0 1.51.0]<br />
| [https://github.com/0ldsk00l/nestopia/issues/343]<br />
|<br />
|-<br />
| [[newsbeuter]]<br />
| {{ic|~/.newsbeuter}}<br />
| [https://github.com/akrennmair/newsbeuter/commit/3c57824 3c57824]<br />
| [https://github.com/akrennmair/newsbeuter/pull/39]<br />
| It is required to create both directories [http://newsbeuter.org/doc/newsbeuter.html#_xdg_base_directory_support]:<br />
<br />
{{ic|1=mkdir -p "$XDG_DATA_HOME"/newsbeuter "$XDG_CONFIG_HOME"/newsbeuter}}<br />
|-<br />
| [https://github.com/nodejs/node-gyp node-gyp]<br />
| {{ic|~/.node-gyp}}<br />
| [https://github.com/nodejs/node-gyp/commit/2b5ce52a 2b5ce52a]<br />
| [https://github.com/nodejs/node-gyp/pull/1570]<br />
|<br />
|-<br />
| {{AUR|np2kai-git}}<br />
| {{ic|~/.config/np2kai}} {{ic|~/.config/xnp2kai}}<br />
| [https://github.com/AZO234/NP2kai/commit/56a1cc2 56a1cc2]<br />
| [https://github.com/AZO234/NP2kai/pull/50]<br />
|<br />
|-<br />
| [[notmuch]]<br />
| {{ic|~/.notmuch-config}}<br />
|<br />
| [https://notmuchmail.org/pipermail/notmuch/2011/007007.html]<br />
| {{ic|mkdir -p $XDG_CONFIG_HOME/notmuch/default; mv ~/.notmuch-config $XDG_CONFIG_HOME/notmuch/default/config}}<br />
|-<br />
| {{AUR|nteract-bin}}<br />
|<br />
| [https://github.com/nteract/nteract/commit/4593e72 4593e72]<br />
| [https://github.com/nteract/nteract/issues/180] [https://github.com/nteract/nteract/pull/3870]<br />
| [https://github.com/nteract/nteract/issues/4517 does not recognize workarounds for ipython/jupyter]<br />
|-<br />
| [[OfflineIMAP]]<br />
| {{ic|~/.offlineimaprc}}<br />
| [https://github.com/OfflineIMAP/offlineimap/commit/5150de5 5150de5]<br />
| [https://github.com/OfflineIMAP/offlineimap/issues/32]<br />
|<br />
|-<br />
| {{AUR|opentyrian}}<br />
| {{ic|~/.opentyrian}}<br />
| [https://github.com/opentyrian/opentyrian/commit/39559c3 39559c3]<br />
| [https://web.archive.org/web/20140815181350/http://code.google.com/p/opentyrian/issues/detail?id=125]<br />
|<br />
|-<br />
| {{Pkg|pandoc}}<br />
| {{ic|~/.pandoc/}}<br />
| [https://github.com/jgm/pandoc/commit/0bed0ab5a308f5e72a01fa9bee76488556288862 0bed0ab]<br />
| [https://github.com/jgm/pandoc/issues/3582]<br />
|<br />
|-<br />
| [[PCManFM]]<br />
| {{ic|~/.thumbnails}}<br />
| [https://github.com/lxde/libfm/issues/57 1.3.2]<br />
|<br />
|<br />
|-<br />
| {{Pkg|pcsx2}}<br />
| {{ic|~/.pcsx2}}<br />
|<br />
[https://github.com/PCSX2/pcsx2/commit/87f1e8f 87f1e8f]<br />
[https://github.com/PCSX2/pcsx2/commit/a9020c6 a9020c6]<br />
[https://github.com/PCSX2/pcsx2/commit/3b22f0f 3b22f0f]<br />
[https://github.com/PCSX2/pcsx2/commit/0a012ae 0a012ae]<br />
| [https://github.com/PCSX2/pcsx2/issues/352] [https://github.com/PCSX2/pcsx2/issues/381]<br />
|<br />
|-<br />
| [https://pry.github.io/ Pry]<br />
| {{ic|~/.pryrc}} {{ic|~/.pry_history}}<br />
|<br />
[https://github.com/pry/pry/commit/a0be0cc7b2070edff61c0c7f10fa37fce9b730bd a0be0cc7]<br />
[https://github.com/pry/pry/commit/15e1fc929ed84c161abc5afc9be73488a41df397 15e1fc92]<br />
[https://github.com/pry/pry/commit/e9d1be0e17b294318dbb2f70f74a50486cfa044c e9d1be0e]<br />
| [https://github.com/pry/pry/issues/1316]<br />
|<br />
|-<br />
| {{Pkg|python-pylint}}<br />
| {{ic|~/.pylint.d}}<br />
| [https://github.com/PyCQA/pylint/pull/4661 2.10]<br />
| [https://github.com/PyCQA/pylint/issues/1364]<br />
| Formerly {{ic|1=export PYLINTHOME="$XDG_CACHE_HOME"/pylint}}<br />
|-<br />
| {{Pkg|python-pip}}<br />
| {{ic|~/.pip}}<br />
| [https://github.com/pypa/pip/blob/548a9136525815dff41acd845c558a0b36eb1c5f/NEWS.rst#60-2014-12-22 6.0]<br />
| [https://github.com/pypa/pip/issues/1733]<br />
|<br />
|-<br />
| {{Pkg|python-poetry}}<br />
| {{ic|~/.poetry}}<br />
| [https://github.com/python-poetry/poetry/pull/3706]<br />
| [https://github.com/python-poetry/poetry/issues/2148]<br />
| Still creates {{ic|~/.poetry}} according to [https://github.com/python-poetry/poetry/issues/2148#issuecomment-943951697]<br />
|-<br />
| {{AUR|powershell}}<br />
|<br />
| [https://docs.microsoft.com/en-us/powershell/scripting/whats-new/what-s-new-in-powershell-core-60#filesystem 6.0]<br />
|<br />
|<br />
|-<br />
| {{Pkg|ppsspp}}<br />
| {{ic|~/.ppsspp}}<br />
| [https://github.com/hrydgard/ppsspp/commit/132fe47 132fe47]<br />
| [https://github.com/hrydgard/ppsspp/issues/4623]<br />
|<br />
|-<br />
| {{Pkg|procps-ng}}<br />
| {{ic|~/.toprc}}<br />
| [https://gitlab.com/procps-ng/procps/commit/af53e17 af53e17]<br />
|<br />
[https://gitlab.com/procps-ng/procps/merge_requests/38]<br />
[https://bugzilla.redhat.com/show_bug.cgi?id=1155265]<br />
|<br />
|-<br />
| [[pacman]]<br />
| {{ic|~/.makepkg.conf}}<br />
| [https://gitlab.archlinux.org/pacman/pacman/commit/80eca94 80eca94]<br />
| [https://mailman.archlinux.org/pipermail/pacman-dev/2014-July/019178.html]<br />
|<br />
|-<br />
| {{AUR|panda3d}}<br />
| {{ic|~/.panda3d}}<br />
| [https://github.com/panda3d/panda3d/commit/2b537d2 2b537d2]<br />
|<br />
|<br />
|-<br />
| {{AUR|poezio}}<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| [[PulseAudio]]<br />
| {{ic|~/.pulse}} {{ic|~/.pulse-cookie}}<br />
|<br />
[https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/59a8618 59a8618]<br />
[https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/87ae830 87ae830]<br />
[https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/9ab510a 9ab510a]<br />
[https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/4c195bc 4c195bc]<br />
| [https://bugzilla.redhat.com/show_bug.cgi?id=845607]<br />
|<br />
|-<br />
| {{AUR|pyroom}}<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{Pkg|quodlibet}}<br />
| {{ic|~/.quodlibet}}<br />
| 3.10.0<br />
| [https://github.com/quodlibet/quodlibet/issues/138]<br />
|<br />
|-<br />
| [[qutebrowser]]<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| [[qtile]]<br />
|<br />
|<br />
[https://github.com/qtile/qtile/commit/fd8686e fd8686e]<br />
[https://github.com/qtile/qtile/commit/66d704b 66d704b]<br />
[https://github.com/qtile/qtile/commit/51cff01 51cff01]<br />
| [https://github.com/qtile/qtile/pull/835]<br />
| Some optional bar widgets can create files and directories in non-compliant paths, but most often these are still configurable.<br />
|-<br />
| {{Pkg|rclone}}<br />
| {{ic|~/.rclone.conf}}<br />
| [https://github.com/ncw/rclone/commit/9d36258 9d36258]<br />
| [https://github.com/ncw/rclone/issues/868]<br />
|<br />
|-<br />
| {{Pkg|retroarch}}<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{AUR|rr}}<br />
| {{ic|~/.rr}}<br />
| [https://github.com/mozilla/rr/commit/02e7d41 02e7d41]<br />
| [https://github.com/mozilla/rr/issues/1455]<br />
|<br />
|-<br />
| [https://rspec.info RSpec]<br />
| {{ic|~/.rspec}}<br />
| [https://github.com/rspec/rspec-core/commit/5e395e2016f1da19475e6db2817eb26dae828c4c 5e395e2]<br />
| [https://github.com/rspec/rspec-core/issues/1773]<br />
|<br />
|-<br />
| [[rTorrent]]<br />
| {{ic|~/.rtorrent.rc}}<br />
| [https://github.com/rakshasa/rtorrent/commit/6a8d332 6a8d332]<br />
|<br />
|<br />
|-<br />
| [https://www.rubocop.org RuboCop]<br />
| {{ic|~/.rubocop.yml}}<br />
| [https://github.com/rubocop-hq/rubocop/commit/6fe5956c177ca369cfaa70bdf748b70020a56bf4 6fe5956]<br />
| [https://github.com/rubocop-hq/rubocop/issues/6662]<br />
|<br />
|-<br />
| [https://github.com/benvan/sandboxd sandboxd]<br />
| {{ic|~/.sandboxrc}}<br />
| [https://github.com/benvan/sandboxd/pull/14]<br />
| [https://github.com/benvan/sandboxd/issues/11]<br />
| {{ic|XDG_CONFIG_HOME/sandboxd/sandboxrc}}<br />
|-<br />
| {{Pkg|scribus}}<br />
| {{ic|~/.scribus}}<br />
| [https://wiki.scribus.net/canvas/Versione_1.5.3 1.5.3]<br />
| <br />
|-<br />
| {{Pkg|scummvm}}<br />
| {{ic|~/.scummvmrc}} {{ic|~/.scummvm/}}<br />
| [https://github.com/scummvm/scummvm/commit/7d014be0a2b796175a7ce40a9315603f711b2a30 7d014be]<br />
| [https://github.com/scummvm/scummvm/pull/656]<br />
| It is required to migrate data by hand.<br />
{{ic|mkdir "$XDG_CONFIG_HOME"/scummvm/ "$XDG_DATA_HOME"/scummvm}}<br />
{{ic|mv ~/.scummvmrc "$XDG_CONFIG_HOME"/scummvm/scummvm.ini}}<br />
{{ic|mv ~/.scummvm "$XDG_DATA_HOME"/scummvm/saves}}<br />
|-<br />
| {{Pkg|sdcv}}<br />
| {{ic|~/.stardict/}} {{ic|~/.sdcv_history}}<br />
| [https://github.com/Dushistov/sdcv/commit/958ec35 958ec35]<br />
| [https://github.com/Dushistov/sdcv/issues/51]<br />
|<br />
|-<br />
| {{AUR|skypeforlinux-stable-bin}}<br />
| {{ic|~/.Skype}}<br />
| 8.0<br />
|<br />
|<br />
|-<br />
| {{Pkg|snes9x}}<br />
| {{ic|~/.snes9x}}<br />
| [https://github.com/snes9xgit/snes9x/commit/93b5f11 93b5f11]<br />
| [https://github.com/snes9xgit/snes9x/issues/194]<br />
| By default, the configuration file is left blank with intention that the user will fill it at their will (through the gui or manually).<br />
|-<br />
| [[spectrwm]]<br />
| {{ic|~/.spectrwm}}<br />
| [https://github.com/conformal/spectrwm/commit/a30bbb a30bbb]<br />
| [https://github.com/conformal/spectrwm/pull/153]<br />
|<br />
|-<br />
| {{AUR|sublime-text-dev}}<br />
|<br />
| [https://www.sublimetext.com/dev build 4105]<br />
|<br />
| Prior to build 4105, the cache was placed in {{ic|XDG_CONFIG_HOME/sublime-text-3/Cache}}.<br />
|-<br />
| [[surfraw]]<br />
| {{ic|~/.surfraw.conf}} {{ic|~/.surfraw.bookmarks}}<br />
|<br />
[https://gitlab.com/surfraw/Surfraw/commit/3e4591d 3e4591d]<br />
[https://gitlab.com/surfraw/Surfraw/commit/bd8c427 bd8c427]<br />
[https://gitlab.com/surfraw/Surfraw/commit/f57fc71 f57fc71]<br />
|<br />
|<br />
|-<br />
| [[sway]]<br />
| {{ic|~/.sway/config}}<br />
| [https://github.com/SirCmpwn/sway/commit/614393c 614393c]<br />
| [https://github.com/SirCmpwn/sway/issues/5]<br />
| {{ic|XDG_CONFIG_HOME/sway/config}}<br />
|-<br />
| [[sxhkd]]<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| [[systemd]]<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{Pkg|teeworlds}}<br />
| {{ic|~/.teeworlds}}<br />
| [https://github.com/teeworlds/teeworlds/commit/d2e39d2f50684151490da446156622e69dd84a48]<br />
|<br />
|<br />
|-<br />
| [[termite]]<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{Pkg|tig}}<br />
| {{ic|~/.tigrc}}, {{ic|~/.tig_history}}<br />
| [https://github.com/jonas/tig/blob/master/NEWS.adoc#tig-22 2.2]<br />
| [https://github.com/jonas/tig/issues/513]<br />
| {{ic|~/.local/share/tig}} directory must exist, writes to {{ic|~/.tig_history}} otherwise.<br />
|-<br />
| [[tmux]]<br />
| {{ic|~/.tmux.conf}}<br />
| [https://raw.githubusercontent.com/tmux/tmux/3.1/CHANGES 3.1]<br />
| [https://github.com/tmux/tmux/issues/142]<br />
| 3.1 introduced {{ic|~/.config/tmux/tmux.conf}} and in [https://github.com/tmux/tmux/blob/a5f99e14c6f264e568b860692b89d11f5298a3f2/CHANGES#L145 3.2] {{ic|XDG_CONFIG_HOME/tmux/tmux.conf}} was added<br />
|-<br />
|-<br />
| [[tmuxp]]<br />
| {{ic|~/.tmuxp}}<br />
| [https://tmuxp.git-pull.com/history.html#tmuxp-1-5-0-2018-10-02 1.5.0]<br />
| [https://github.com/tmux-python/tmuxp/pull/404]<br />
| Fixed in [https://tmuxp.git-pull.com/history.html#tmuxp-1-5-2-2019-06-02 1.5.2]<br />
|-<br />
| {{AUR|tmuxinator}}<br />
| {{ic|~/.tmuxinator}}<br />
| [https://github.com/tmuxinator/tmuxinator/pull/511/commits/2636923 2636923]<br />
| [https://github.com/tmuxinator/tmuxinator/pull/511]<br />
|<br />
|-<br />
| [[Transmission]]<br />
| {{ic|~/.transmission}}<br />
| [https://github.com/transmission/transmission/commit/b71a298 b71a298]<br />
|<br />
|<br />
|-<br />
| {{Pkg|util-linux}}<br />
|<br />
| [https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=570b321 570b321]<br />
|<br />
|<br />
|-<br />
| [[Uzbl]]<br />
|<br />
| [https://github.com/uzbl/uzbl/commit/c6fd63a c6fd63a]<br />
| [https://github.com/uzbl/uzbl/pull/150]<br />
|<br />
|-<br />
| {{Pkg|vimb}}<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| [[VirtualBox]]<br />
| {{ic|~/.VirtualBox}}<br />
| [https://www.virtualbox.org/ticket/5099?action=diff&version=7 4.3]<br />
| [https://www.virtualbox.org/ticket/5099]<br />
|<br />
|-<br />
| {{Pkg|vis}}<br />
| {{ic|~/.vis}}<br />
|<br />
[https://github.com/martanne/vis/commit/68a25c7 68a25c7]<br />
[https://github.com/martanne/vis/commit/d138908 d138908]<br />
| [https://github.com/martanne/vis/pull/303]<br />
|<br />
|-<br />
| [[VLC]]<br />
| {{ic|~/.vlcrc}}<br />
| [https://git.videolan.org/?p=vlc.git;a=commit;h=16f32e1 16f32e1]<br />
| [https://trac.videolan.org/vlc/ticket/1267]<br />
|<br />
|-<br />
| {{Pkg|warsow}}<br />
| {{ic|~/.warsow-2.x}}<br />
| [https://github.com/Qfusion/qfusion/commit/98ece3f 98ece3f]<br />
| [https://github.com/Qfusion/qfusion/issues/298]<br />
|<br />
|-<br />
| [[WeeChat]]<br />
| {{ic|~/.weechat}}<br />
| [https://github.com/weechat/weechat/commit/70cdf21681d75090c3df9858c9e7ce5a85433856]<br />
[https://github.com/weechat/weechat/releases/tag/v3.2 3.2]<br />
| [https://github.com/weechat/weechat/issues/1285] [https://specs.weechat.org/specs/001285-follow-xdg-base-dir-spec.html]<br />
|<br />
XDG_CONFIG_HOME/weechat<br />
XDG_CACHE_HOME/weechat<br />
XDG_DATA_HOME/weechat<br />
|-<br />
| [[Wireshark]]<br />
| {{ic|~/.wireshark}}<br />
| [https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=b0b53fa b0b53fa]<br />
|<br />
|<br />
|-<br />
| [https://wxwidgets.org/ wxWidgets]<br />
| <br />
| [https://trac.wxwidgets.org/ticket/17727]<br />
|<br />
|<br />
|-<br />
| [[Xsettingsd]]<br />
| {{ic|~/.xsettingsd}}<br />
| [https://github.com/derat/xsettingsd/commit/b4999f5 b4999f5]<br />
|<br />
|<br />
|-<br />
| [[xmobar]]<br />
| {{ic|~/.xmobarrc}}<br />
| [https://github.com/jaor/xmobar/commit/7b0d6bf 7b0d6bf]<br />
[https://github.com/jaor/xmobar/commit/9fc6b37 9fc6b37]<br />
[https://github.com/jaor/xmobar/commit/eaccf70 eaccf70]<br />
| [https://github.com/jaor/xmobar/pull/99]<br />
[https://github.com/jaor/xmobar/pull/131]<br />
| {{ic|XDG_CONFIG_HOME/xmobar/xmobarrc}}<br />
|-<br />
| [[xmonad]]<br />
| {{ic|~/.xmonad/}}<br />
| [https://github.com/xmonad/xmonad/commit/40fc10b 40fc10b]<br />
|<br />
[https://github.com/xmonad/xmonad/issues/61]<br />
[https://code.google.com/p/xmonad/issues/detail?id=484]<br />
| All of these must exist, otherwise it gives up and falls back to {{ic|~/.xmonad/}} for each:<br />
XDG_CACHE_HOME/xmonad<br />
XDG_CONFIG_HOME/xmonad<br />
XDG_DATA_HOME/xmonad<br />
Alternatively, it always respects {{ic|XMONAD_CACHE_DIR}}, {{ic|XMONAD_CONFIG_DIR}}, and {{ic|XMONAD_DATA_DIR}}.<br />
|-<br />
| {{Pkg|xournalpp}}<br />
| {{ic|~/.xournalpp}}<br />
|<br />
[https://github.com/xournalpp/xournalpp/commit/20db937f 20db937f]<br />
[https://github.com/xournalpp/xournalpp/releases/tag/1.1.0 1.1.0]<br />
|<br />
[https://github.com/xournalpp/xournalpp/issues/1101]<br />
[https://github.com/xournalpp/xournalpp/pull/1384]<br />
|-<br />
| {{Pkg|xsel}}<br />
| {{ic|~/.xsel.log}}<br />
| [https://github.com/kfish/xsel/commit/ee7b481 ee7b481]<br />
| [https://github.com/kfish/xsel/issues/10]<br />
|<br />
|-<br />
| [[Zim]]<br />
| <br />
| [https://github.com/zim-desktop-wiki/zim-desktop-wiki/commit/e42b8b0 e42b8b0]<br />
| <br />
|<br />
|-<br />
| {{Pkg|zoxide}}<br />
| {{ic|~/.zo}}<br />
| [https://github.com/ajeetdsouza/zoxide/releases/tag/v0.3.0 0.3.0]<br />
| [https://github.com/ajeetdsouza/zoxide/pull/47]<br />
|<br />
|}<br />
<br />
=== Partial ===<br />
<br />
{| class="wikitable sortable" style="width: 100%"<br />
! Application<br />
! Legacy Path<br />
! Supported Since<br />
! Discussion<br />
! Notes<br />
|-<br />
| {{AUR|abook}}<br />
| {{ic|~/.abook}}<br />
|<br />
|<br />
| {{ic|1=abook --config "$XDG_CONFIG_HOME"/abook/abookrc --datafile "$XDG_DATA_HOME"/abook/addressbook}}<br />
|-<br />
| {{Aur|anaconda}}<br />
| {{ic|~/.conda/.condarc}}, {{ic|~/.conda/condarc}}, {{ic|~/.conda/condarc.d/}}, {{ic|~/.condarc}}<br />
|<br />
| [https://conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html#searching-for-condarc]<br />
| {{ic|1=export CONDARC="$XDG_CONFIG_HOME/conda/condarc"}}<br />
|-<br />
| {{Pkg|ack}}<br />
| {{ic|~/.ackrc}}<br />
|<br />
| [https://github.com/beyondgrep/ack2/issues/516]<br />
| {{ic|1=export ACKRC="$XDG_CONFIG_HOME/ack/ackrc"}}<br />
|-<br />
| [[Anki]]<br />
| {{ic|~/Anki}}, {{ic|~/Documents/Anki}}<br />
|<br />
| [https://github.com/dae/anki/pull/49] [https://github.com/dae/anki/pull/58]<br />
| {{ic|1=anki -b "$XDG_DATA_HOME"/Anki}}<br />
|-<br />
| {{AUR|asdf-vm}}<br />
| {{ic|~/.asdfrc}}, {{ic|~/.asdf/}}<br />
|<br />
| [https://github.com/asdf-vm/asdf/issues/687]<br />
| {{ic|1=export ASDF_CONFIG_FILE="${XDG_CONFIG_HOME}/asdf/asdfrc"}}, {{ic|1=export ASDF_DATA_DIR=${XDG_DATA_HOME}/asdf"}}<br />
|-<br />
| [[aspell]]<br />
| {{ic|~/.aspell.conf}}<br />
|<br />
| [https://github.com/GNUAspell/aspell/issues/560]<br />
| {{ic|1=export ASPELL_CONF="per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; personal $XDG_CONFIG_HOME/aspell/en.pws; repl $XDG_CONFIG_HOME/aspell/en.prepl"}}<br />
|-<br />
| [[Atom]]<br />
| {{ic|~/.atom}}<br />
|<br />
| [https://github.com/atom/atom/issues/8281]<br />
| {{ic|1=export ATOM_HOME="$XDG_DATA_HOME"/atom}}<br />
|-<br />
| {{Pkg|aws-cli}}<br />
| {{ic|~/.aws}}<br />
| [https://github.com/aws/aws-cli/commit/fc5961ea2cc0b5976ac9f777e20e4236fd7540f5 1.7.45]<br />
| [https://github.com/aws/aws-cli/issues/2433]<br />
| {{ic|1=export AWS_SHARED_CREDENTIALS_FILE="$XDG_CONFIG_HOME"/aws/credentials}}, {{ic|1=export AWS_CONFIG_FILE="$XDG_CONFIG_HOME"/aws/config}}<br />
|-<br />
| {{Pkg|bash-completion}}<br />
| {{ic|~/.bash_completion}}<br />
|<br />
|<br />
| {{ic|1=export BASH_COMPLETION_USER_FILE="$XDG_CONFIG_HOME"/bash-completion/bash_completion}}<br />
|-<br />
| {{AUR|bashdb}}<br />
| {{ic|~/.bashdbinit, ~/.bashdb_hist}}<br />
|<br />
|<br />
| Like documented at [http://bashdb.sourceforge.net/bashdb.html#Command-Files], you can specify a file to run commands from. Thus, move the init file to {{ic|XDG_CONFIG_HOME/bashdb/bashdbinit}} and create an alias {{ic|1=alias bashdb='bashdb -x ${XDG_CONFIG_HOME:-$HOME/.config}/bashdb/bashdbinit'}}. Unfortunately the history file is hardcoded [https://sourceforge.net/p/bashdb/code/ci/bash-5.1/tree/lib/hist.sh#l28].<br />
|-<br />
| [[bazaar]]<br />
| {{ic|~/.bazaar}}, {{ic|~/.bzr.log}}<br />
| [https://bugs.launchpad.net/bzr/+bug/195397/comments/15 2.3.0]<br />
| [https://bugs.launchpad.net/bzr/+bug/195397]<br />
| Discussion in upstream bug states that bazaar will use {{ic|~/.config/bazaar}} if it exists. The logfile {{ic|~/.bzr.log}} might still be written.<br />
|-<br />
| {{Aur|btpd-git}}<br />
| {{ic|~/.btpd/}}<br />
|<br />
| [https://github.com/btpd/btpd/issues/55]<br />
| {{ic|1=btpd -d "$XDG_DATA_HOME"/.btpd}}<br />
{{ic|1=HOME="$XDG_DATA_HOME" btcli}}<br />
|-<br />
| [[Ruby#Bundler]]<br />
| {{ic|~/.bundle}}<br />
| 2.1.0<br />
| [https://github.com/bundler/bundler/pull/6024] [https://github.com/bundler/bundler/issues/4333] [https://github.com/rubygems/rubygems/issues/1599]<br />
|<br />
export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME"/bundle<br />
export BUNDLE_USER_CACHE="$XDG_CACHE_HOME"/bundle<br />
export BUNDLE_USER_PLUGIN="$XDG_DATA_HOME"/bundle<br />
<br />
Is considered as fixed by the environment variables.<br />
|-<br />
| [https://www.haskell.org/cabal cabal]<br />
| {{ic|~/.cabal/}}<br />
|<br />
| [https://github.com/haskell/cabal/issues/680]<br />
|<br />
export CABAL_CONFIG="$XDG_CONFIG_HOME"/cabal/config<br />
export CABAL_DIR="$XDG_CACHE_HOME"/cabal<br />
<br />
See documentation on [https://cabal.readthedocs.io/en/3.4/installing-packages.html#environment-variables environment variables].<br />
<br />
CABAL_DIR may be put into DATA if you consider downloaded files as such.<br />
|-<br />
| {{Pkg|calc}}<br />
| {{ic|~/.calc_history}}<br />
|<br />
|<br />
|<br />
export CALCHISTFILE="$XDG_CACHE_HOME"/calc_history<br />
|-<br />
| [[Rust#Cargo]]<br />
| {{ic|~/.cargo}}<br />
|<br />
| [https://github.com/rust-lang/cargo/issues/1734] [https://github.com/rust-lang/rfcs/pull/1615] [https://github.com/rust-lang/cargo/pull/5183] [https://github.com/rust-lang/cargo/pull/148]<br />
| {{ic|1=export CARGO_HOME="$XDG_DATA_HOME"/cargo}}<br />
|-<br />
| [https://github.com/mollifier/cd-bookmark cd-bookmark]<br />
| {{ic|~/.cdbookmark}}<br />
|<br />
| [https://github.com/mollifier/cd-bookmark/issues/3]<br />
| {{ic|1=export CD_BOOKMARK_FILE=$XDG_CONFIG_HOME/cd-bookmark/bookmarks}}<br />
or use the fork that has native XDG support: [https://github.com/erikw/cd-bookmark/]<br />
|-<br />
| {{pkg|cgdb}}<br />
| {{ic|~/.cgdb}}<br />
| [On master branch, but no release yet]<br />
| [https://github.com/cgdb/cgdb/issues/203] [https://github.com/cgdb/cgdb/blob/master/NEWS]<br />
| Set {{ic|1=export CGDB_DIR=$XDG_CONFIG_HOME/cgdb}} and move the config file to {{ic|XDG_CONFIG_HOME/cgdb/cgdbrc}}<br />
|-<br />
| {{AUR|chez-scheme}}<br />
| {{ic|~/.chezscheme_history}}<br />
|<br />
|<br />
| {{ic|1=petite --eehistory "$XDG_DATA_HOME"/chezscheme/history}}<br />
|-<br />
| [[Chromium]]<br />
| {{ic|~/.chromium}}, {{ic|~/.pki}}<br />
| [https://src.chromium.org/viewvc/chrome?revision=23057&view=revision 23057]<br />
|<br />
[https://groups.google.com/forum/#!topic/chromium-dev/QekVQxF3nho]<br />
[https://code.google.com/p/chromium/issues/detail?id=16976]<br />
[https://bugs.chromium.org/p/chromium/issues/detail?id=1038587]<br />
|<br />
|-<br />
| [https://www.cinelerra-gg.org/ cinelerra]<br />
| {{ic|~/.bcast5}}<br />
|<br />
| [https://cinelerra-gg.org/download/CinelerraGG_Manual/Environment_Variables_Custo.html]<br />
| {{ic|1=export CIN_CONFIG="$XDG_CONFIG_HOME"/bcast5}}<br />
|-<br />
| [[conky]]<br />
| {{ic|~/.conkyrc}}<br />
| [https://github.com/brndnmtthws/conky/commit/00481ee9a97025e8e2acd7303d080af1948f7980 00481ee]<br />
| [https://github.com/brndnmtthws/conky/issues/144]<br />
| {{ic|1=conky --config="$XDG_CONFIG_HOME"/conky/conkyrc}}<br />
|-<br />
| {{Pkg|claws-mail}}<br />
| {{ic|~/.claws-mail}}<br />
|<br />
| [https://lists.claws-mail.org/pipermail/users/2013-April/006087.html]<br />
| {{ic|1=claws-mail --alternate-config-dir "$XDG_DATA_HOME"/claws-mail}}<br />
|-<br />
| [[coreutils]]<br />
| {{ic|~/.dircolors}}<br />
|<br />
|<br />
| {{ic|1=eval $(dircolors "$XDG_CONFIG_HOME"/dircolors)}}<br />
|-<br />
| [http://www.dungeoncrawl.org/ crawl]<br />
| {{ic|~/.crawl}}<br />
|<br />
|<br />
| The trailing slash is required:<br />
<br />
{{ic|1=export CRAWL_DIR="$XDG_DATA_HOME"/crawl/}}<br />
|-<br />
| {{Pkg|clusterssh}}<br />
| {{ic|~/.clusterssh/}}<br />
|<br />
|<br />
| {{ic|1=alias cssh="cssh --config-file '$XDG_CONFIG_HOME/clusterssh/config'" }}<br />
{{hc|$XDG_CONFIG_HOME/clusterssh/config|2=<br />
extra_cluster_file=$HOME/.config/clusterssh/clusters<br />
extra_tag_file=$HOME/.config/clusterssh/tags<br />
}}<br />
Despite this, clusterssh will still create {{ic|~/.clusterssh/}}.<br />
|-<br />
| [[CUDA]]<br />
| {{ic|~/.nv}}<br />
|<br />
|<br />
| {{ic|1=export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv}}<br />
|-<br />
| [[dict]]<br />
| {{ic|~/.dictrc}}<br />
|<br />
|<br />
| {{ic|1=dict -c "$XDG_CONFIG_HOME"/dict/dictrc}}<br />
|-<br />
| [[Docker]]<br />
| {{ic|~/.docker}}<br />
|<br />
|<br />
| {{ic|1=export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker}}<br />
|-<br />
| {{Pkg|docker-machine}}<br />
| {{ic|~/.docker/machine}}<br />
|<br />
|<br />
| {{ic|1=export MACHINE_STORAGE_PATH="$XDG_DATA_HOME"/docker-machine}}<br />
|-<br />
| [[DOSBox]]<br />
| {{ic|~/.dosbox/dosbox-0.74-2.conf}}<br />
|<br />
| [https://www.vogons.org/viewtopic.php?t=29599]<br />
| {{ic|1=dosbox -conf "$XDG_CONFIG_HOME"/dosbox/dosbox.conf}}<br />
|-<br />
| [https://electrum.org Electrum Bitcoin Wallet]<br />
| {{ic|~/.electrum}}<br />
| [https://github.com/spesmilo/electrum/commit/c121230 c121230]<br />
|<br />
| {{ic|1=export ELECTRUMDIR="$XDG_DATA_HOME/electrum"}}<br />
|-<br />
| [[ELinks]]<br />
| {{ic|~/.elinks}}<br />
|<br />
|<br />
| {{ic|1=export ELINKS_CONFDIR="$XDG_CONFIG_HOME"/elinks}}<br />
|-<br />
| {{Pkg|elixir}}<br />
| {{ic|~/.mix}}<br />
| [https://github.com/elixir-lang/elixir/commit/afaf889 afaf889]<br />
| [https://github.com/elixir-lang/elixir/issues/8818] [https://github.com/elixir-lang/elixir/pull/9937]<br />
| Elixir do not fully conform to XDG specs, it will use XDG only if the environment variables are present, otherwise it will by default use legacy path.<br />
|-<br />
| [https://elm-lang.org/ Elm]<br />
| {{ic|~/.elm}}<br />
| <br />
| <br />
| {{ic|1=export ELM_HOME="$XDG_CONFIG_HOME"/elm}}<br />
|-<br />
| {{Pkg|fceux}}<br />
| {{ic|~/.fceux/}}<br />
|<br />
| [https://github.com/TASEmulators/fceux/issues/412]<br />
| {{ic|1=export FCEUX_HOME="$XDG_CONFIG_HOME"/fceux}}. Fceux will create {{ic|1=.fceux}} directory inside {{ic|1=$FCEUX_HOME}}.<br />
|-<br />
| [[FFmpeg]]<br />
| {{ic|~/.ffmpeg}}<br />
|<br />
|<br />
| {{ic|1=export FFMPEG_DATADIR="$XDG_CONFIG_HOME"/ffmpeg}}<br />
|-<br />
| {{AUR|flutter}}<br />
| {{ic|~/.flutter}}, {{ic|~/.flutter_settings}}, {{ic|~/.flutter_tool_state}}<br />
|<br />
| [https://github.com/flutter/flutter/issues/59430]<br />
|<br />
|-<br />
| {{AUR|fzf-git}}<br />
| {{ic|~/.fzf.bash, ~/.fzf.zsh}}<br />
| <br />
| [https://github.com/junegunn/fzf/pull/1282]<br />
| The shell init files will be installed to {{ic|XDG_CONFIG_HOME/fzf}} if the installation script is called with {{ic|--xdg}} for example {{ic| /usr/local/opt/fzf/install --xdg}}.<br />
|-<br />
| {{Pkg|emscripten}}<br />
| {{ic|~/.emscripten}}, {{ic|~/.emscripten_sanity}}, {{ic|~/.emscripten_ports}}, {{ic|~/.emscripten_cache__last_clear}}<br />
|<br />
| [https://github.com/kripken/emscripten/issues/3624]<br />
| {{ic|1=export EM_CONFIG="$XDG_CONFIG_HOME"/emscripten/config}}, {{ic|1=export EM_CACHE="$XDG_CACHE_HOME"/emscripten/cache}}, {{ic|1=export EM_PORTS="$XDG_DATA_HOME"/emscripten/cache}}, {{ic|emcc --em-config "$XDG_CONFIG_HOME"/emscripten/config --em-cache "$XDG_CACHE_HOME"/emscripten/cache}}<br />
|-<br />
| {{Pkg|freecad}}<br />
| {{ic|~/.FreeCAD}}<br />
|<br />
| [https://tracker.freecadweb.org/view.php?id=2956]<br />
| {{ic|1=freecad -u "$XDG_CONFIG_HOME"/FreeCAD/user.cfg -s "$XDG_CONFIG_HOME"/FreeCAD/system.cfg}}<br />
<br />
Despite these options, {{Pkg|freecad}} will still create the file {{ic|.FreeCAD/cookie}} as the web module has it [https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Web/Gui/CookieJar.cpp#L55 hard coded]<br />
|-<br />
| {{AUR|get_iplayer}}<br />
| {{ic|~/.get_iplayer}}<br />
|<br />
|<br />
| {{ic|1=export GETIPLAYERUSERPREFS="$XDG_DATA_HOME"/get_iplayer}}<br />
|-<br />
| [[getmail]]<br />
| {{ic|~/.getmail/getmailrc}}<br />
|<br />
|<br />
| {{ic|1=getmail --rcfile="$XDG_CONFIG_HOME/getmail/getmailrc" --getmaildir="$XDG_DATA_HOME/getmail"}}<br />
|-<br />
| {{AUR|ghcup-hs-bin}}<br />
| {{ic|~/.ghcup}}<br />
| [https://gitlab.haskell.org/haskell/ghcup-hs/-/commit/80603662b4fcc42fd936f45608dc3bc924c7e498]<br />
| [https://gitlab.haskell.org/haskell/ghcup-hs/issues/39]<br />
| {{ic|1=export GHCUP_USE_XDG_DIRS=true}}<br />
The environment variable {{ic|GHCUP_USE_XDG_DIRS}} can be set to any non-empty value. See [https://www.haskell.org/ghcup/guide/#xdg-support].<br />
|-<br />
| {{AUR|gliv}}<br />
| {{ic|~/.glivrc}}<br />
|<br />
|<br />
| {{ic|1=gliv --glivrc="$XDG_CONFIG_HOME"/gliv/glivrc}}<br />
|-<br />
| {{Pkg|gnuradio}}<br />
| {{ic|~/.gnuradio}}<br />
|<br />
| [https://github.com/gnuradio/gnuradio/issues/3631]<br />
|<br />
|-<br />
| [[GnuPG]]<br />
| {{ic|~/.gnupg}}<br />
|<br />
| [https://bugs.gnupg.org/gnupg/issue1456] [https://bugs.gnupg.org/gnupg/issue1018]<br />
| {{ic|1=export GNUPGHOME="$XDG_DATA_HOME"/gnupg}}, {{ic|gpg2 --homedir "$XDG_DATA_HOME"/gnupg}}<br />
Note that this currently does not work out-of-the-box using systemd user units and socket-based activation, since the socket directory changes based on the hash of {{ic|$GNUPGHOME}}. You can get the new socket directory using {{ic|gpgconf --dry-run --create-socketdir}} and have to modify the systemd user units to listen on the correct sockets accordingly.<br />
|-<br />
| [[Go]]<br />
| {{ic|~/go}}<br />
| [https://github.com/golang/go/commit/ca8a055f5cc7c1dfa0eb542c60071c7a24350f76]<br />
|<br />
| {{ic|1=export GOPATH="$XDG_DATA_HOME"/go}}<br />
|-<br />
| [[Google Earth]]<br />
| {{ic|~/.googleearth}}<br />
|<br />
|<br />
| Some paths can be changed with the {{ic|KMLPath}} and {{ic|CachePath}} options in {{ic|~/.config/Google/GoogleEarthPlus.conf}}<br />
|-<br />
| {{Pkg|gopass}}<br />
| {{ic|~/.password-store}}<br />
|<br />
|<br />
| Override settings in {{ic|~/.config/gopass/config.yml}}:<br />
{{hc|~/.config/gopass/config.yml|<br />
root:<br />
path: gpgcli-gitcli-fs+file:///home/<userid>/.config/password-store<br />
}}<br />
|-<br />
| {{Pkg|gpodder}}<br />
| {{ic|~/gPodder}}<br />
|<br />
|<br />
| {{ic|1=GPODDER_DOWNLOAD_DIR}} sets the download folder. {{ic|1=GPODDER_HOME}} - where config and database files are stored, downloads also if {{ic|1=GPODDER_DOWNLOAD_DIR}} is not set.<br />
|-<br />
| [https://sourceforge.net/projects/gqclient GQ LDAP client]<br />
| {{ic|~/.gq}}, {{ic|~/.gq-state}}<br />
| [https://sourceforge.net/p/gqclient/mailman/message/2053978 1.51]<br />
|<br />
| {{ic|1=export GQRC="$XDG_CONFIG_HOME"/gqrc}}, {{ic|1=export GQSTATE="$XDG_DATA_HOME"/gq/gq-state}}, {{ic|mkdir -p "$(dirname "$GQSTATE")"}}<br />
|-<br />
| [[Gradle]]<br />
| {{ic|~/.gradle}}<br />
|<br />
| [https://discuss.gradle.org/t/be-a-nice-freedesktop-citizen-move-the-gradle-to-the-appropriate-location-in-linux/2199]<br />
| {{ic|1=export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle}}<br />
|-<br />
| [[GTK]] 1<br />
| {{ic|~/.gtkrc}}<br />
|<br />
|<br />
| {{ic|1=export GTK_RC_FILES="$XDG_CONFIG_HOME"/gtk-1.0/gtkrc}}<br />
|-<br />
| [[GTK]] 2<br />
| {{ic|~/.gtkrc-2.0}}<br />
|<br />
|<br />
| {{ic|1=export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc}}<br />
|-<br />
| {{Pkg|hledger}}<br />
| {{ic|~/.hledger.journal}}<br />
|<br />
| [https://github.com/simonmichael/hledger/issues/1081]<br />
| {{ic|1=export LEDGER_FILE="$XDG_DATA_HOME"/hledger.journal}}<br />
|-<br />
| [https://www.sidefx.com/products/houdini/ Houdini]<br />
| {{ic|~/houdini''MAJOR''.''MINOR'')}}<br />
|<br />
| [https://forums.odforce.net/topic/43138-changing-home-location/]<br />
[https://www.sidefx.com/docs/houdini/ref/env.html]<br />
| {{ic|1=export HOUDINI_USER_PREF_DIR="$XDG_CACHE_HOME"/houdini__HVER__}}<br />
The value of this variable must include the substring {{ic|__HVER__}}, which will be replaced at run time with the current {{ic|''MAJOR''.''MINOR''}} version string.<br />
|-<br />
| {{AUR|imapfilter}}<br />
| {{ic|~/.imapfilter}}<br />
|<br />
|<br />
| {{ic|1=export IMAPFILTER_HOME="$XDG_CONFIG_HOME/imapfilter"}}<br />
|-<br />
| [[IPFS]]<br />
| {{ic|~/.ipfs}}<br />
|<br />
|<br />
| {{ic|1=export IPFS_PATH="$XDG_DATA_HOME"/ipfs}}<br />
|-<br />
| [https://ruby-doc.org/stdlib/libdoc/irb/rdoc/IRB.html irb]<br />
| {{ic|~/.irbrc}}<br />
|<br />
|<br />
| {{hc|1=~/.profile|2=$ export IRBRC="$XDG_CONFIG_HOME"/irb/irbrc}}<br />
{{hc|1="$XDG_CONFIG_HOME"/irb/irbrc|2=IRB.conf[:SAVE_HISTORY] {{!}}{{!}}= 1000<br />
IRB.conf[:HISTORY_FILE] {{!}}{{!}}= File.join(ENV["XDG_DATA_HOME"], "irb", "history")}}<br />
|-<br />
| [[irssi]]<br />
| {{ic|~/.irssi}}<br />
|<br />
| [https://github.com/irssi/irssi/pull/511]<br />
| {{ic|1=irssi --config="$XDG_CONFIG_HOME"/irssi/config --home="$XDG_DATA_HOME"/irssi}}<br />
|-<br />
| [[isync]]<br />
| {{ic|~/.mbsyncrc}}<br />
|<br />
| [https://sourceforge.net/p/isync/feature-requests/14/]<br />
| {{ic|1=mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc}}<br />
|-<br />
| [[Java#OpenJDK]]<br />
| {{ic|~/.java/.userPrefs}}<br />
|<br />
| [https://bugzilla.redhat.com/show_bug.cgi?id=1154277]<br />
| {{ic|1=export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java}}<br />
|-<br />
| [[jupyter]]<br />
| {{ic|~/.jupyter}}<br />
|<br />
| [https://github.com/jupyter/jupyter_core/issues/185]<br />
| {{ic|1=export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME"/jupyter}}<br />
|-<br />
| {{Pkg|k9s}}<br />
| {{ic|~/.k9s}}<br />
| [https://github.com/derailed/k9s/releases/tag/v0.20.4 0.20.4]<br />
| [https://github.com/derailed/k9s/issues/743]<br />
| {{ic|1=export K9SCONFIG="$XDG_CONFIG_HOME"/k9s}}<br />
|-<br />
| [[KDE]]<br />
| {{ic|~/.kde}}, {{ic|~/.kde4}}<br />
|<br />
| [https://userbase.kde.org/KDE_System_Administration/KDE_Filesystem_Hierarchy#KDEHOME]<br />
| {{ic|1=export KDEHOME="$XDG_CONFIG_HOME"/kde}}<br />
|-<br />
| {{Pkg|keychain}}<br />
| {{ic|~/.keychain}}<br />
| [https://github.com/funtoo/keychain/commit/d43099bcff315d24a2ca31ae83da85e115d22ef6]<br />
| [https://github.com/funtoo/keychain/issues/8]<br />
| {{ic|1=keychain --absolute --dir "$XDG_RUNTIME_DIR"/keychain}}<br />
|-<br />
| {{Pkg|kodi}}<br />
| {{ic|~/.kodi}}<br />
| [https://github.com/xbmc/xbmc/pull/14460]<br />
| [https://github.com/xbmc/xbmc/pull/6142]<br />
| {{ic|1=KODI_DATA=$XDG_DATA_HOME/kodi}}<br />
|-<br />
| {{AUR|kscript}}<br />
| {{ic|~/.kscript}}<br />
|<br />
| [https://github.com/holgerbrandl/kscript/issues/323]<br />
| {{ic|1=export KSCRIPT_CACHE_DIR="$XDG_CACHE_HOME"/kscript}}<br />
|-<br />
| [[ledger]]<br />
| {{ic|~/.ledgerrc}}, {{ic|~/.pricedb}}<br />
|<br />
| [https://github.com/ledger/ledger/issues/1820]<br />
| {{ic|1=ledger --init-file "$XDG_CONFIG_HOME"/ledgerrc}}<br />
|-<br />
| [[Leiningen]]<br />
| {{ic|~/.lein}}, {{ic|~/.m2}}<br />
|<br />
|<br />
| {{ic|1=export LEIN_HOME="$XDG_DATA_HOME"/lein}}<br />
<br />
to change the m2 repo location used by leiningen look here: [[Leiningen#m2_repo_location]]<br />
|-<br />
| {{Pkg|libdvdcss}}<br />
| {{ic|~/.dvdcss}}<br />
|<br />
| [https://mailman.videolan.org/pipermail/libdvdcss-devel/2014-August/001022.html]<br />
| {{ic|1=export DVDCSS_CACHE="$XDG_DATA_HOME"/dvdcss}}<br />
|-<br />
| {{Pkg|libice}}<br />
| {{ic|~/.ICEauthority}}<br />
|<br />
| [https://gitlab.freedesktop.org/xorg/lib/libice/issues/2]<br />
| {{ic|1=export ICEAUTHORITY="$XDG_CACHE_HOME"/ICEauthority}}<br />
Make sure {{ic|XDG_CACHE_HOME}} is set beforehand to directory user running [[Xorg]] has write access to.<br />
<br />
'''Do not''' use {{ic|XDG_RUNTIME_DIR}} as it is available '''after''' login. Display managers that launch [[Xorg]] (like [[GDM]]) will repeatedly fail otherwise.<br />
|-<br />
| [[Xorg|libx11]]<br />
| {{ic|~/.XCompose}}, {{ic|~/.compose-cache}}<br />
|<br />
|<br />
| {{ic|1=export XCOMPOSEFILE="$XDG_CONFIG_HOME"/X11/xcompose}}, {{ic|1=export XCOMPOSECACHE="$XDG_CACHE_HOME"/X11/xcompose}}<br />
|-<br />
| {{Pkg|ltrace}}<br />
| {{ic|~/.ltrace.conf}}<br />
|<br />
|<br />
| {{ic|1=ltrace -F "$XDG_CONFIG_HOME"/ltrace/ltrace.conf}}<br />
|-<br />
| {{Pkg|lynx}}<br />
| {{ic|/etc/lynx.cfg}}<br />
|<br />
|<br />
| {{ic|1=export LYNX_CFG_PATH="$XDG_CONFIG_HOME"/lynx.cfg}}<br />
|-<br />
| {{AUR|maptool-bin}}<br />
| {{ic|~/.maptool-rptools}}<br />
|<br />
| [https://github.com/RPTools/maptool/issues/2786]<br />
| {{hc|1=/opt/maptool/lib/app/MapTool.cfg|2=[JavaOptions]<br />
-DMAPTOOL_DATADIR=.local/share/maptool-rptools}}<br />
However, no way to change the location of this configuration file.<br />
|-<br />
| {{Pkg|maven}}<br />
| {{ic|~/.m2}}<br />
|<br />
| [https://issues.apache.org/jira/browse/MNG-6603]<br />
| {{ic|1=mvn -gs "$XDG_CONFIG_HOME"/maven/settings.xml}} and set {{ic|<localRepository>}} as appropriate in [https://maven.apache.org/settings.html#Simple_Values settings.xml]<br />
|-<br />
| [[Mathematica]]<br />
| {{ic|~/.Mathematica}}<br />
|<br />
|<br />
| {{ic|1=export MATHEMATICA_USERBASE="$XDG_CONFIG_HOME"/mathematica}}<br />
|-<br />
| {{Pkg|maxima}}<br />
| {{ic|~/.maxima}}<br />
|<br />
|<br />
| {{ic|1=export MAXIMA_USERDIR="$XDG_CONFIG_HOME"/maxima}}<br />
|-<br />
| {{Pkg|mednafen}}<br />
| {{ic|~/.mednafen}}<br />
|<br />
|<br />
| {{ic|1=export MEDNAFEN_HOME="$XDG_CONFIG_HOME"/mednafen}}<br />
|-<br />
| {{Pkg|minikube}}<br />
| {{ic|~/.minikube}}<br />
|<br />
| [https://github.com/kubernetes/minikube/issues/4109]<br />
| {{ic|1=export MINIKUBE_HOME="$XDG_DATA_HOME"/minikube}}<br />
<br />
Creates a further {{ic|.minikube}} directory in {{ic|MINIKUBE_HOME}} for whatever reason.<br />
|-<br />
| {{Pkg|mitmproxy}}<br />
| {{ic|~/.mitmproxy}}<br />
|<br />
|<br />
| {{ic|1=alias mitmproxy="mitmproxy --set confdir=$XDG_CONFIG_HOME/mitmproxy"}}, {{ic|1=alias mitmweb="mitmweb --set confdir=$XDG_CONFIG_HOME/mitmproxy"}}<br />
|-<br />
| [[MOC]]<br />
| {{ic|~/.moc}}<br />
|<br />
|<br />
| {{ic|1=mocp -M "$XDG_CONFIG_HOME"/moc}}, {{ic|1=mocp -O MOCDir="$XDG_CONFIG_HOME"/moc}}<br />
|-<br />
| {{Pkg|monero}}<br />
| {{ic|~/.bitmonero}}<br />
|<br />
|<br />
| {{ic|1=monerod --data-dir "$XDG_DATA_HOME"/bitmonero}}<br />
|-<br />
| {{Pkg|most}}<br />
| {{ic|~/.mostrc}}<br />
|<br />
|<br />
| {{ic|1=export MOST_INITFILE="$XDG_CONFIG_HOME"/mostrc}}<br />
|-<br />
| [[MPlayer]]<br />
| {{ic|~/.mplayer}}<br />
|<br />
|<br />
| {{ic|1=export MPLAYER_HOME="$XDG_CONFIG_HOME"/mplayer}}<br />
|-<br />
| {{Pkg|mypy}}<br />
| {{ic|~/.mypy_cache}}<br />
|<br />
|<br />
| {{ic|1=export MYPY_CACHE_DIR="$XDG_CACHE_HOME"/mypy}}<br />
|-<br />
| [[MySQL]]<br />
| {{ic|~/.mysql_history}}, {{ic|~/.my.cnf }}, {{ic|~/.mylogin.cnf}}<br />
|<br />
|<br />
| {{ic|1=export MYSQL_HISTFILE="$XDG_DATA_HOME"/mysql_history}}<br />
<br />
{{ic|~/.my.cnf}} only supported for mysql-server, not mysql-client [https://dev.mysql.com/doc/refman/8.0/en/option-files.html]<br />
<br />
{{ic|~/.mylogin.cnf}} unsupported<br />
|-<br />
| {{Pkg|mysql-workbench}}<br />
| {{ic|~/.mysql/workbench}}<br />
|<br />
|<br />
| You can run MySQL Workbench with the {{ic|1=---configdir}} flag, such as {{ic|1=mysql-workbench --configdir="$XDG_DATA_HOME/mysql/workbench"}}. The directory needs to be created manually, since MySQL Workbench default location is {{ic|1=$HOME/.mysql/workbench}} .<br />
|-<br />
|-<br />
| {{Pkg|ncurses}}<br />
| {{ic|~/.terminfo}}<br />
|<br />
|<br />
| Precludes system path searching:<br />
<br />
{{ic|1=export TERMINFO="$XDG_DATA_HOME"/terminfo}}, {{ic|1=export TERMINFO_DIRS="$XDG_DATA_HOME"/terminfo:/usr/share/terminfo}}<br />
|-<br />
| [https://github.com/tj/n n]<br />
| {{ic|/usr/local/n}}<br />
|<br />
|<br />
| {{ic|1=export N_PREFIX=$XDG_DATA_HOME/n<br />
}}<br />
|-<br />
| {{Pkg|ncmpc}}<br />
| {{ic|~/.ncmpc}}<br />
|<br />
|<br />
| {{ic|ncmpc -f "$XDG_CONFIG_HOME"/ncmpc/config}}<br />
|-<br />
| [[Netbeans]]<br />
| {{ic|~/.netbeans}}<br />
|<br />
| [https://netbeans.org/bugzilla/show_bug.cgi?id=215961]<br />
| {{ic|1=netbeans --userdir "${XDG_CONFIG_HOME}"/netbeans}}<br />
|-<br />
| [[Node.js]]<br />
| {{ic|~/.node_repl_history}}<br />
|<br />
| [https://nodejs.org/api/repl.html#repl_environment_variable_options]<br />
| {{ic|1=export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history}}<br />
|-<br />
| {{Pkg|npm}}<br />
| {{ic|~/.npm}}, {{ic|~/.npmrc}}<br />
|<br />
| [https://github.com/npm/cli/issues/654]<br />
| {{ic|1=export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc}}<br />
{{hc|npmrc|<nowiki><br />
prefix=${XDG_DATA_HOME}/npm<br />
cache=${XDG_CACHE_HOME}/npm<br />
tmp=${XDG_RUNTIME_DIR}/npm<br />
init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js<br />
</nowiki>}}<br />
{{ic|prefix}} is unnecessary (and unsupported) if Node.js is installed by {{AUR|nvm}}.<br />
<br />
If you want to configure this system-wide, the file to edit is {{ic|/usr/etc/npmrc}}, not {{ic|/etc/npmrc}}. You can confirm that the config is loaded by running {{ic|npm config list}}<br />
|-<br />
| {{Pkg|opam}}<br />
| {{ic|~/.opam}}<br />
|<br />
| [https://github.com/ocaml/opam/issues/3766]<br />
| {{ic|1=export OPAMROOT="$XDG_DATA_HOME/opam"}}<br />
Both configuration and state data are stored in {{ic|OPAMROOT}}, so this solution is not fully compliant.<br />
|-PKG_CONFIG_PATH<br />
| {{Aur|pnpm}}<br />
| {{ic|~/.pnpm-store}}<br />
|<br />
|<br />
| Add the line {{ic|1=store-dir=${XDG_DATA_HOME}/pnpm-store}} to your {{ic|npmrc}}.<br />
|-<br />
| [[PuTTY]]<br />
| {{ic|~/.putty/}}<br />
| [https://git.tartarus.org/?p=simon/putty.git;a=commit;h=9952b2d5bd5c8fbac4f5731a805bce10fe4ce47c 9952b2d]<br />
|<br />
| Will use {{ic|$XDG_CONFIG_HOME/putty}} if it already exists. Creates {{ic|~/.putty}} if not. Prioritises {{ic|$XDG_CONFIG_HOME/putty}} if both exist. Tested in 0.74<br />
|-<br />
| {{Pkg|nuget}}<br />
| {{ic|~/.nuget/packages}}<br />
|<br />
| [https://docs.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders]<br />
| {{ic|1=export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages}}<br />
|-<br />
| [[NVIDIA]]<br />
| {{ic|~/.nv}}<br />
|<br />
|<br />
| Uses {{ic|XDG_CACHE_HOME}} if set, otherwise improperly falls back to {{ic|~/.nv}} instead of {{ic|~/.cache}}.<br />
|-<br />
| {{Pkg|nvidia-settings}}<br />
| {{ic|~/.nvidia-settings-rc}}<br />
|<br />
|<br />
| {{ic|1=nvidia-settings --config="$XDG_CONFIG_HOME"/nvidia/settings}}<br />
|-<br />
| {{AUR|nvm}}<br />
| {{ic|~/.nvm}}<br />
|<br />
|<br />
| {{ic|1=export NVM_DIR="$XDG_DATA_HOME"/nvm}}<br />
|-<br />
| [[Octave]]<br />
| {{ic|~/octave}}, {{ic|~/.octave_packages}}, {{ic|~/.octave_hist}}<br />
|<br />
|<br />
| {{ic|1=export OCTAVE_HISTFILE="$XDG_CACHE_HOME/octave-hsts"}}, {{ic|1=export OCTAVE_SITE_INITFILE="$XDG_CONFIG_HOME/octave/octaverc"}}<br />
<br />
{{hc|$XDG_CONFIG_HOME/octave/octaverc|<nowiki><br />
source /usr/share/octave/site/m/startup/octaverc;<br />
pkg prefix ~/.local/share/octave/packages ~/.local/share/octave/packages;<br />
pkg local_list /home/<your username>/.local/share/octave/octave_packages;<br />
</nowiki>}}<br />
The {{ic|local_list}} option must be given an absolute path.<br />
|-<br />
| {{Pkg|openscad}}<br />
| {{ic|~/.OpenSCAD}}<br />
| [https://github.com/openscad/openscad/commit/7c3077b0f 7c3077b0f]<br />
| [https://github.com/openscad/openscad/issues/125]<br />
| Does not fully honour XDG Base Directory Specification, see [https://github.com/openscad/openscad/issues/373]<br />
<br />
Currently it [https://github.com/openscad/openscad/blob/master/src/PlatformUtils-posix.cc#L20 hard-codes] {{ic|~/.local/share}}.<br />
|-<br />
| [[OpenSSL]]<br />
| {{ic|~/.rnd}}<br />
|<br />
|<br />
| Seeding file {{ic|.rnd}}'s location can be set with {{ic|RANDFILE}} environment variable per [https://www.openssl.org/docs/faq.html FAQ].<br />
|-<br />
| {{Pkg|parallel}}<br />
| {{ic|~/.parallel}}<br />
| [https://git.savannah.gnu.org/cgit/parallel.git/commit/?id=685018f532f4e2d24b84eb28d5de3d759f0d1af1 20170422]<br />
|<br />
| {{ic|1=export PARALLEL_HOME="$XDG_CONFIG_HOME"/parallel}}<br />
|-<br />
| [[pass]]<br />
| {{ic|~/.password-store}}<br />
|<br />
|<br />
| {{ic|1=export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass}}<br />
|-<br />
| [[Pidgin]]<br />
| {{ic|~/.purple}}<br />
|<br />
| [https://developer.pidgin.im/ticket/4911]<br />
| {{ic|1=pidgin --config="$XDG_DATA_HOME"/purple}}<br />
|-<br />
| [[PostgreSQL]]<br />
| {{ic|~/.psqlrc}}, {{ic|~/.psql_history}}, {{ic|~/.pgpass}}, {{ic|~/.pg_service.conf}}<br />
| 9.2<br />
| [https://www.postgresql.org/docs/current/static/app-psql.html] [https://www.postgresql.org/docs/current/static/libpq-envars.html]<br />
| {{ic|1=export PSQLRC="$XDG_CONFIG_HOME/pg/psqlrc"}}, {{ic|1=export PSQL_HISTORY="$XDG_STATE_HOME/psql_history"}}, {{ic|1=export PGPASSFILE="$XDG_CONFIG_HOME/pg/pgpass"}}, {{ic|1=export PGSERVICEFILE="$XDG_CONFIG_HOME/pg/pg_service.conf"}}<br />
<br />
It is required to create both directories: {{ic|1=mkdir "$XDG_CONFIG_HOME/pg" && mkdir "$XDG_STATE_HOME"}}<br />
|-<br />
| [[PulseAudio]]<br />
| {{ic|~/.esd_auth}}<br />
|<br />
|<br />
| Very likely generated by the {{ic|module-esound-protocol-unix.so}} module. It can be configured to use a different location but it makes much more sense to just comment out this module in {{ic|/etc/pulse/default.pa}} or {{ic|"$XDG_CONFIG_HOME"/pulse/default.pa}}.<br />
|-<br />
| {{Pkg|pyenv}}<br />
| {{ic|~/.pyenv}}<br />
|<br />
| [https://github.com/pyenv/pyenv/issues/139] [https://github.com/pyenv/pyenv/issues/1789]<br />
| {{ic|1=export PYENV_ROOT=$XDG_DATA_HOME/pyenv}}<br />
|-<br />
| {{aur|python-azure-cli}}<br />
| {{ic|~/.azure}}<br />
|<br />
|<br />
| {{ic|1=export AZURE_CONFIG_DIR=$XDG_DATA_HOME/azure}}<br />
|-<br />
| {{AUR|python-grip}}<br />
| {{ic|~/.grip}}<br />
|<br />
|<br />
| {{ic|1=export GRIPHOME="$XDG_CONFIG_HOME/grip"}}<br />
|-<br />
| {{Pkg|python-setuptools}}<br />
| {{ic|~/.python-eggs}}<br />
|<br />
|<br />
| {{ic|1=export PYTHON_EGG_CACHE="$XDG_CACHE_HOME"/python-eggs}}<br />
|-<br />
| {{Pkg|racket}}<br />
| {{ic|~/.racketrc}}, {{ic|~/.racket}}<br />
|<br />
| [https://github.com/racket/racket/issues/2740]<br />
| {{ic|1=export PLTUSERHOME="$XDG_DATA_HOME"/racket}}<br />
|-<br />
| {{AUR|rbenv}}<br />
| {{ic|~/.rbenv}}<br />
|<br />
| [https://github.com/rbenv/rbenv/issues/811] [https://github.com/rbenv/rbenv/issues/1146]<br />
| {{ic|1=export RBENV_ROOT=XDG_DATA_HOME/rbenv}}<br />
|-<br />
| [[readline]]<br />
| {{ic|~/.inputrc}}<br />
|<br />
|<br />
| {{ic|1=export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc}}<br />
|-<br />
| {{Pkg|recoll}}<br />
| {{ic|~/.recoll}}<br />
|<br />
|<br />
| {{ic|1=export RECOLL_CONFDIR="$XDG_CONFIG_HOME/recoll"}}<br />
|-<br />
| [[redis]]<br />
| {{ic|~/.rediscli_history}}, {{ic|~/.redisclirc}}<br />
|<br />
|<br />
|{{ic|1=export REDISCLI_HISTFILE="$XDG_DATA_HOME"/redis/rediscli_history}}, {{ic|1=export REDISCLI_RCFILE="$XDG_CONFIG_HOME"/redis/redisclirc}}<br />
|-<br />
| {{Pkg|ripgrep}}<br />
|<br />
|<br />
| [https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#configuration-file]<br />
|{{ic|1=export RIPGREP_CONFIG_PATH=$XDG_CONFIG_HOME/ripgrep/config}}<br />
|-<br />
| {{Pkg|rlwrap}}<br />
| {{ic|~/.*_history}}<br />
|<br />
| [https://github.com/hanslub42/rlwrap/issues/25]<br />
| {{ic|1=export RLWRAP_HOME="$XDG_DATA_HOME"/rlwrap}}<br />
|-<br />
| [[Ruby#RubyGems]]<br />
| {{ic|~/.gem}}<br />
|<br />
|<br />
| {{ic|1=export GEM_HOME="$XDG_DATA_HOME"/gem}}, {{ic|1=export GEM_SPEC_CACHE="$XDG_CACHE_HOME"/gem}}<br />
<br />
Make sure to remove {{ic|gem: --user-install}} from {{ic|/etc/gemrc}}<br />
|-<br />
| {{Aur|ruby-solargraph}}<br />
| {{ic|~/.solargraph/cache/}}<br />
|<br />
| [https://github.com/castwide/solargraph/blob/master/README.md]<br />
| {{ic|1=export SOLARGRAPH_CACHE=$XDG_CACHE_HOME/solargraph}}<br />
|-<br />
| [[Rust#Rustup]]<br />
| {{ic|~/.rustup}}<br />
|<br />
| [https://github.com/rust-lang-nursery/rustup.rs/issues/247]<br />
| {{ic|1=export RUSTUP_HOME="$XDG_DATA_HOME"/rustup}}<br />
|-<br />
| {{Pkg|sbt}}<br />
| {{ic|~/.sbt}}<br />
{{ic|~/.ivy2}}<br />
|<br />
| [https://github.com/sbt/sbt/issues/3681]<br />
| {{ic|1=sbt -ivy "$XDG_DATA_HOME"/ivy2 -sbt-dir "$XDG_DATA_HOME"/sbt}} (beware [https://github.com/sbt/sbt/issues/3598])<br />
|-<br />
| [[SageMath]]<br />
| {{ic|~/.sage}}<br />
|<br />
|<br />
| {{ic|1=export DOT_SAGE="$XDG_CONFIG_HOME"/sage}}<br />
|-<br />
| [[GNU Screen]]<br />
| {{ic|~/.screenrc}}<br />
|<br />
|<br />
| {{ic|1=export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc}}<br />
|-<br />
| {{Pkg|simplescreenrecorder}}<br />
| {{ic|~/.ssr/}}<br />
| [https://github.com/MaartenBaert/ssr/releases/tag/0.4.3 0.4.3]<br />
| [https://github.com/MaartenBaert/ssr/issues/407]<br />
[https://github.com/MaartenBaert/ssr/issues/813]<br />
| Will use {{ic|$XDG_CONFIG_HOME/simplescreenrecorder/}} ONLY if it already was created otherwise defaults to {{ic|~/.ssr}}<br />
<br />
{{ic|1=mv ~/.ssr "$XDG_CONFIG_HOME"/simplescreenrecorder}}<br />
|-<br />
| [https://www.spacemacs.org/ spacemacs]<br />
| {{ic|~/.spacemacs}}, {{ic|~/.spacemacs.d}}<br />
| [https://github.com/syl20bnr/spacemacs/commit/e1eed07c30ea395fb9cfebc8ec3376dcffbace11]<br />
| [https://github.com/syl20bnr/spacemacs/issues/3589]<br />
| Move the {{ic|~/.spacemacs}} file.<br />
<br />
{{ic|1=export SPACEMACSDIR="$XDG_CONFIG_HOME"/spacemacs}}, {{ic|mv ~/.spacemacs "$SPACEMACSDIR"/init.el}}<br />
<br />
Other files need to be configured like Emacs.<br />
|-<br />
| [[Haskell#Stack]]<br />
| {{ic|~/.stack}}<br />
|<br />
| [https://github.com/commercialhaskell/stack/issues/342]<br />
| {{ic|1=export STACK_ROOT="$XDG_DATA_HOME"/stack}}<br />
|-<br />
| [[subversion]]<br />
| {{ic|~/.subversion}}<br />
|<br />
| [https://issues.apache.org/jira/browse/SVN-4599] [https://mail-archives.apache.org/mod_mbox/subversion-users/201204.mbox/%3c4F8FBCC6.4080205@ritsuka.org%3e][https://mail-archives.apache.org/mod_mbox/subversion-dev/201509.mbox/%3C20150917222954.GA20331@teapot%3E]<br />
| {{ic|1=alias svn="svn --config-dir \"$XDG_CONFIG_HOME\"/subversion"}}<br />
|-<br />
| {{Pkg|sudo}}<br />
| {{ic|~/.sudo_as_admin_successful}}<br />
| [https://www.sudo.ws/stable.html#1.9.6 1.9.6]<br />
| [https://github.com/sudo-project/sudo/issues/56] [https://www.sudo.ws/repos/sudo/rev/d77c3876fa95]<br />
| Only present when activated at compile-time (default none). An admin_flag parameter can be used in /etc/sudoers since 1.9.6.<br />
|-<br />
| {{Pkg|task}}<br />
| {{ic|~/.task}}, {{ic|~/.taskrc}}<br />
|<br />
|<br />
| {{ic|1=export TASKDATA="$XDG_DATA_HOME"/task}}, {{ic|1=export TASKRC="$XDG_CONFIG_HOME"/task/taskrc}}}}, {{ic|[https://github.com/GothenburgBitFactory/taskwarrior/pull/2316 Fully supported in version 2.6] (note $XDG_CONFIG_HOME/task/taskrc ''must'' exist, otherwise taskwarrior will offer to create sample config in legacy $HOME/.taskrc location, even if $XDG_CONFIG_HOME is set [https://github.com/GothenburgBitFactory/taskwarrior/pull/2316#issuecomment-732821437][https://github.com/GothenburgBitFactory/taskwarrior/blob/112ac54a57adfb3cc2e6e60dbbb1f5c7d9db3e18/doc/man/task.1.in#L1451])<br />
|-<br />
| Local [[TeX Live]] TeXmf tree, TeXmf caches and config<br />
| {{ic|~/texmf}}, {{ic|~/.texlive/texmf-var}}, {{ic|~/.texlive/texmf-config}}<br />
|<br />
|<br />
| {{ic|1=export TEXMFHOME=$XDG_DATA_HOME/texmf}}, {{ic|1=export TEXMFVAR=$XDG_CACHE_HOME/texlive/texmf-var}}, {{ic|1=export TEXMFCONFIG=$XDG_CONFIG_HOME/texlive/texmf-config}}<br />
|-<br />
| [https://www.texmacs.org/ TeXmacs]<br />
| {{ic|~/.TeXmacs}}<br />
|<br />
|<br />
| {{ic|1=export TEXMACS_HOME_PATH=$XDG_STATE_HOME/texmacs}}<br />
|-<br />
| {{AUR|tiptop}}<br />
| {{ic|~/.tiptoprc}}<br />
|<br />
|<br />
| This will still expect the {{ic|.tiptoprc}} file.<br />
{{ic|tiptop -W "$XDG_CONFIG_HOME"/tiptop}}<br />
|-<br />
| {{AUR|ruby-travis}}<br />
| {{ic|~/.travis/}}<br />
|<br />
| [https://github.com/travis-ci/travis.rb/issues/219]<br />
| {{ic|1=export TRAVIS_CONFIG_PATH=$XDG_CONFIG_HOME/travis}}<br />
|-<br />
| {{Pkg|uncrustify}}<br />
| {{ic|~/.uncrustify.cfg}}<br />
|<br />
|<br />
| {{ic|1=export UNCRUSTIFY_CONFIG="$XDG_CONFIG_HOME"/uncrustify/uncrustify.cfg}}<br />
|-<br />
| [[Unison]]<br />
| {{ic|~/.unison}}<br />
|<br />
|<br />
| {{ic|1=export UNISON="$XDG_DATA_HOME"/unison}}<br />
|-<br />
| {{Pkg|units}}<br />
| {{ic|~/.units_history}}<br />
|<br />
|<br />
| {{ic|1=units --history "$XDG_CACHE_HOME"/units_history}}<br />
|-<br />
| [[Rxvt-unicode/Tips_and_tricks#Daemon-client|urxvtd]]<br />
| {{ic|~/.urxvt/urxvtd-hostname}}<br />
|<br />
|<br />
| {{ic|1=export RXVT_SOCKET="$XDG_RUNTIME_DIR"/urxvtd}}<br />
|-<br />
| [[Vagrant]]<br />
| {{ic|~/.vagrant.d}}, {{ic|~/.vagrant.d/aliases}}<br />
|<br />
| [https://www.vagrantup.com/docs/other/environmental-variables.html]<br />
| {{ic|1=export VAGRANT_HOME="$XDG_DATA_HOME"/vagrant}}, {{ic|1=export VAGRANT_ALIAS_FILE="$XDG_DATA_HOME"/vagrant/aliases}}<br />
|-<br />
| [[virtualenv]]<br />
| {{ic|~/.virtualenvs}}<br />
|<br />
|<br />
| {{ic|1=export WORKON_HOME="$XDG_DATA_HOME/virtualenvs"}}<br />
|-<br />
| [[Visual Studio Code]]<br />
| {{ic|~/.vscode-oss/}}<br />
|<br />
| [https://github.com/Microsoft/vscode/issues/3884]<br />
| You can use {{ic|1=export VSCODE_PORTABLE="$XDG_DATA_HOME"/vscode}}, which is not documented and might break unexpectedly.<br />
Setting this makes the editor look for the contents of {{ic|1=.config/Code - OSS}} in {{ic|1=$VSCODE_PORTABLE/user-data}}.<br />
<br />
You can also run Visual Studio with the {{ic|1=--extensions-dir}} flag, such as {{ic|1=code --extensions-dir "$XDG_DATA_HOME/vscode"}}. This is documented and probably will not break as unexpectedly, as it is {{ic|[https://github.com/microsoft/vscode/issues/329 has other use cases]}}.<br />
|-<br />
| {{AUR|VSCodium}}<br />
| {{ic|~/.vscode-oss/}}<br />
|<br />
| [https://github.com/VSCodium/vscodium/issues/561] [https://github.com/VSCodium/vscodium/issues/671]<br />
| You can run VSCodium with the {{ic|1=--extensions-dir}} flag, such as {{ic|1=vscodium --extensions-dir "$XDG_DATA_HOME/vscode"}}. This however won't prevent the creation of {{ic|1=~/.vscode-oss/}} directory.<br />
|-<br />
| {{Pkg|wakatime}}<br />
| {{ic|~/.wakatime.cfg}}, {{ic|~/.wakatime.data}}, {{ic|~/.wakatime.db}}, {{ic|~/.wakatime.log}}<br />
|<br />
|<br />
| {{ic|1=export WAKATIME_HOME="$XDG_CONFIG_HOME/wakatime"}}<br />
<br />
The directory needs to be created manually<br />
<br />
{{ic|1=mkdir "$XDG_CONFIG_HOME/wakatime"}}<br />
<br />
|-<br />
| [[wget]]<br />
| {{ic|~/.wgetrc}}, {{ic|~/.wget-hsts}}<br />
|<br />
|<br />
| {{ic|1=export WGETRC="$XDG_CONFIG_HOME/wgetrc"}} and add the following as an alias for wget: {{ic|1=wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"}}, or set the {{ic|1=hsts-file}} variable with an absolute path as wgetrc does not support environment variables: {{ic|1=echo hsts-file \= "$XDG_CACHE_HOME"/wget-hsts >> "$XDG_CONFIG_HOME/wgetrc"}}<br />
|-<br />
| [[wine]]<br />
| {{ic|~/.wine}}<br />
|<br />
| [https://bugs.winehq.org/show_bug.cgi?id=20888]<br />
| [[Wine#Winetricks|Winetricks]] uses XDG-alike location below for [[Wine#WINEPREFIX|WINEPREFIX]] management:<br />
{{ic|1=mkdir -p "$XDG_DATA_HOME"/wineprefixes}}, {{ic|1=export WINEPREFIX="$XDG_DATA_HOME"/wineprefixes/default}}<br />
|-<br />
| [[xbindkeys]]<br />
| {{ic|~/.xbindkeysrc}}<br />
|<br />
|<br />
| {{ic|1=xbindkeys -f "$XDG_CONFIG_HOME"/xbindkeys/config}}<br />
|-<br />
| {{Pkg|xorg-xauth}}<br />
| {{ic|~/.Xauthority}}<br />
|<br />
|<br />
| {{ic|1=export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority}}<br />
<br />
Note that [[LightDM]] does not allow you to change this variable. If you change it nonetheless, you will not be able to login. Use [[startx]] instead or [https://askubuntu.com/a/961459 configure LightDM]. According to [https://unix.stackexchange.com/a/175331] [[SLiM]] has {{ic|~/.Xauthority}} hardcoded.<br />
<br />
The [[SDDM]] Xauthority path can be changed in its own configuration files as shown below. Unfortunately, it is relative to the home directory.<br />
{{hc|1=/etc/sddm.conf.d/xauth-path.conf|2=[X11]<br />
UserAuthFile=.Xauthority}}<br />
|-<br />
| [[xinit]]<br />
| {{ic|~/.xinitrc}}, {{ic|~/.xserverrc}}<br />
|<br />
| [https://gitlab.freedesktop.org/xorg/app/xinit/issues/14]<br />
| {{ic|1=export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc}}, {{ic|1=export XSERVERRC="$XDG_CONFIG_HOME"/X11/xserverrc}}<br />
<br />
Note that these variables are respected by ''xinit'', but not by ''startx''. Instead, specify the filename as an argument:<br />
<br />
{{ic|1=startx "$XDG_CONFIG_HOME/X11/xinitrc" -- "$XDG_CONFIG_HOME/X11/xserverrc" vt1}}<br />
|-<br />
| {{Pkg|xorg-xrdb}}<br />
| {{ic|~/.Xresources}}, {{ic|~/.Xdefaults}}<br />
|<br />
|<br />
| Ultimately you [https://superuser.com/questions/243914/xresources-or-xdefaults should be] using {{ic|Xresources}} and since these resources are loaded via {{ic|xrdb}} you can specify a path such as {{ic|1=xrdb -load ~/.config/X11/xresources}}.<br />
|-<br />
| [[Xorg]]<br />
| {{ic|~/.xsession}}, {{ic|~/.xsessionrc}}, {{ic|~/.Xsession}}, {{ic|~/.xsession-errors}}<br />
|<br />
|<br />
| These can be added as part of your Xorg init script ({{ic|~/.xinitrc}}) or Xsession start script (which will often be based on {{ic|/etc/X11/Xsession}}).<br />
Depending on where you have configured your {{ic|$XDG_CACHE_HOME}}, you made need to expand the paths yourself.<br />
{{hc|# xsession start script|<nowiki><br />
USERXSESSION="$XDG_CACHE_HOME/X11/xsession"<br />
USERXSESSIONRC="$XDG_CACHE_HOME/X11/xsessionrc"<br />
ALTUSERXSESSION="$XDG_CACHE_HOME/X11/Xsession"<br />
ERRFILE="$XDG_CACHE_HOME/X11/xsession-errors"<br />
</nowiki>}}<br />
Unlike most other examples in this table, actual X11 init scripts will vary a lot between installations.<br />
|-<br />
| {{Pkg|z}}<br />
| {{ic|~/.z}}<br />
|<br />
| [https://github.com/rupa/z/issues/267]<br />
| {{ic|1=export _Z_DATA="$XDG_DATA_HOME/z"}}<br />
|-<br />
| {{Pkg|yarn}}<br />
| {{ic|~/.yarnrc}}, {{ic|~/.yarn/}}, {{ic|~/.yarncache/}}, {{ic|~/.yarn-config/}}<br />
| [https://github.com/yarnpkg/yarn/commit/2d454b5 2d454b5]<br />
| [https://github.com/yarnpkg/yarn/pull/5336] [https://github.com/yarnpkg/yarn/issues/2334]<br />
| {{ic|1=alias yarn='yarn --use-yarnrc "$XDG_CONFIG_HOME/yarn/config"'}}<br />
|-<br />
|}<br />
<br />
=== Hardcoded ===<br />
<br />
{| class="wikitable sortable" style="width: 100%"<br />
! Application<br />
! Legacy Path<br />
! Discussion<br />
! Notes<br />
|-<br />
| [[adb]] & [https://developer.android.com/studio/index.html Android Studio]<br />
| {{ic|~/.android/}}<br />
|<br />
| Despite [https://android.googlesource.com/platform/system/core/+/d5fcafaf41f8ec90986c813f75ec78402096af2d%5E%21/ appearances otherwise], adb will ''always'' generate {{ic|~/.android/adbkeys}}, though it will try keys in {{ic|ADB_VENDOR_KEYS}} as well.<br />
|-<br />
| {{Pkg|aegisub}}<br />
| {{ic|~/.aegisub/}}<br />
| [https://github.com/Aegisub/Aegisub/issues/226]<br />
|<br />
|-<br />
| [[alpine]]<br />
| {{ic|~/.pinerc}}, {{ic|~/.addressbook}}, {{ic|~/.pine-debug[1-4]}}, {{ic|~/.newsrc}}, {{ic|~/.mailcap}}, {{ic|~/.mime.types}}, {{ic|~/.pine-interrupted-mail}}<br />
| <br />
| {{ic|1=alias alpine="alpine -p $XDG_CONFIG_HOME/alpine/pinerc"}}<br />
In the above config file, some locations can be customized using options like {{ic|1=newsrc-path=}} and {{ic|1=address-book=}}.<br />
|-<br />
| [[Ansible]]<br />
| {{ic|~/.ansible}}<br />
| [https://github.com/ansible/ansible/issues/52354] [https://github.com/ansible/ansible/issues/68587] [https://github.com/ansible/ansible/issues/75788]<br />
|<br />
|-<br />
| [[aMule]]<br />
| {{ic|~/.aMule}}<br />
| [https://bugs.amule.org/view.php?id=1308] [http://forum.amule.org/index.php?topic=18056] [https://github.com/amule-project/amule/issues/254]<br />
|<br />
|-<br />
| [https://osdn.net/projects/anthy/ anthy]<br />
| {{ic|~/.anthy}}<br />
| [https://osdn.net/ticket/browse.php?group_id=14&tid=28397]<br />
|<br />
|-<br />
| [https://directory.apache.org/studio/ Apache Directory Studio]<br />
| {{ic|~/.ApacheDirectoryStudio}}<br />
|<br />
|<br />
|-<br />
| [https://christian.amsuess.com/tools/arandr/ ARandR]<br />
| {{ic|~/.screenlayout}}<br />
| [https://gitlab.com/arandr/arandr/-/issues/45]<br />
|<br />
|-<br />
| [[Arduino]]<br />
| {{ic|~/.arduino15}}, {{ic|~/.jssc}}<br />
| [https://github.com/arduino/Arduino/issues/3915 won't fix]<br />
|<br />
|-<br />
| {{Pkg|arduino-cli}}<br />
| {{ic|~.arduino15/}}<br />
| [https://github.com/arduino/arduino-cli/pull/140]<br />
| {{ic|1=mv ~/.arduino15 $XDG_CONFIG_HOME/arduino15}}<br />
Specify the new directories used by Arduino CLI in arduino-cli.yaml as mentioned in the documentation [https://arduino.github.io/arduino-cli/latest/configuration/ here].<br />
{{ic|1=alias arduino-cli='arduino-cli --config-file $XDG_CONFIG_HOME/arduino15/arduino-cli.yaml'}}<br />
<br />
|-<br />
| [https://www.audacityteam.org/ Audacity]<br />
| {{ic|~/.audacity-data/}}<br />
| [https://bugzilla.audacityteam.org/show_bug.cgi?id=2201]<br />
|<br />
<br />
|-<br />
| [http://fixounet.free.fr/avidemux/ Avidemux]<br />
| {{ic|~/.avidemux6}}<br />
| [https://avidemux.org/smif/index.php/topic,19596.0.html]<br />
|<br />
|-<br />
| [[Bash]]<br />
| {{ic|~/.bashrc}}, {{ic|~/.bash_history}}, {{ic|~/.bash_profile}}, {{ic|~/.bash_login}}, {{ic|~/.bash_logout}}<br />
| [https://savannah.gnu.org/support/?108134 won't fix]<br />
| {{ic|1=mkdir -p "$XDG_STATE_HOME"/bash}}<br />
{{ic|1=export HISTFILE="$XDG_STATE_HOME"/bash/history}}<br />
<br />
{{ic|bashrc}} can be sourced from a different location in {{ic|/etc/bash.bashrc}}.<br />
Specify {{ic|--init-file <file>}} as an alternative to {{ic|~/.bashrc}} for interactive shells.<br />
|-<br />
| [[Chef|Berkshelf]]<br />
| {{ic|~/.berkshelf/}}<br />
|<br />
|<br />
|-<br />
| {{AUR|chatty}}<br />
| {{ic|~/.chatty/}}<br />
| [https://github.com/chatty/chatty/issues/273]<br />
|<br />
|-<br />
| {{Pkg|cmake}}<br />
| {{ic|~/.cmake/}}<br />
| [https://gitlab.kitware.com/cmake/cmake/-/issues/22480]<br />
| Used for the user package registry {{ic|~/.cmake/packages/<package>}}, detailed in {{man|7|cmake-packages|User Package Registry}} and [https://gitlab.kitware.com/cmake/community/wikis/doc/tutorials/Package-Registry the Package registry wiki page]. Looks like it's hardcoded, for example in [https://gitlab.kitware.com/cmake/cmake/blob/v3.12.1/Source/cmFindPackageCommand.cxx#L1221 cmFindPackageCommand.cxx].<br />
|-<br />
| [[Cinnamon]]<br />
| {{ic|~/.cinnamon/}}<br />
| [https://github.com/linuxmint/Cinnamon/issues/7807]<br />
|<br />
|-<br />
| {{AUR|conan}}<br />
| {{ic|~/.conan/}}<br />
| [https://github.com/conan-io/conan/issues/2526]<br />
| {{ic|1=export CONAN_USER_HOME="$XDG_CONFIG_HOME"}} will set the directory in which {{ic|.conan/}} is created. It was [https://docs.conan.io/en/latest/reference/env_vars.html#conan-user-home designed to simplify CI], but can be used here too.<br />
|-<br />
| {{AUR|cryptomator}}<br />
| {{ic|~/.Cryptomator}}<br />
| [https://github.com/cryptomator/cryptomator/issues/710]<br />
|<br />
|-<br />
| {{Pkg|ctags}} (universial-ctags)<br />
| {{ic|~/.ctagsrc, .ctags.d}}<br />
| [https://github.com/universal-ctags/ctags/issues/89]<br />
|<br />
|-<br />
| [[CUPS]]<br />
| {{ic|~/.cups/}}<br />
| [https://github.com/OpenPrinting/cups/issues/10]<br />
|<br />
|-<br />
| [https://chrome.google.com/webstore/detail/cvim/ihlenndgcmojhcghmfjfneahoeklbjjh cVim]<br />
| {{ic|~/.cvimrc}}<br />
| [https://github.com/1995eaton/chromium-vim/issues/750]<br />
|<br />
|-<br />
| [[darcs]]<br />
| {{ic|~/.darcs/}}<br />
| [http://bugs.darcs.net/issue2453]<br />
|<br />
|-<br />
| {{Pkg|dart}}<br />
| {{ic|~/.dart}}, {{ic|~/.dartServer}}<br />
| [https://github.com/dart-lang/sdk/issues/41560]<br />
|<br />
|-<br />
| [[dbus]]<br />
| {{ic|~/.dbus/}}<br />
| [https://gitlab.freedesktop.org/dbus/dbus/issues/46]<br />
| Consider using {{pkg|dbus-broker}}, as it does not create or use this directory.<br />
|-<br />
| {{Pkg|devede}}<br />
| {{ic|~/.devedeng}}<br />
|<br />
| Hardcoded [https://gitlab.com/rastersoft/devedeng/blob/f0893b3ff7b14723bd148db35bdfe2d284156d19/src/devedeng/configuration_data.py#L111 here]<br />
|-<br />
| [https://wiki.gnome.org/Apps/Dia Dia]<br />
| {{ic|~/.dia/}}<br />
|<br />
|<br />
|-<br />
| {{Pkg|dotnet-sdk}}<br />
| {{ic|~/.dotnet/}}<br />
| [https://github.com/dotnet/cli/issues/7569]<br />
|<br />
|-<br />
| [[dropbox]]<br />
| {{ic|~/.dropbox/}}<br />
|<br />
|<br />
|-<br />
| [[Eclipse]]<br />
| {{ic|~/.eclipse/}}<br />
| [https://bugs.eclipse.org/bugs/show_bug.cgi?id=200809]<br />
| Option {{ic|1=-Dosgi.configuration.area=@user.home/.config/..}} overrides but must be added to {{ic|"$ECLIPSE_HOME"/eclipse.ini"}} rather than command line which means you must have write access to {{ic|$ECLIPSE_HOME}}. (Arch Linux hard-codes {{ic|$ECLIPSE_HOME}} in {{ic|/usr/bin/eclipse}})<br />
|-<br />
| [https://www.fetchmail.info/ Fetchmail]<br />
| {{ic|~/.fetchmailrc}}<br />
|<br />
|<br />
|-<br />
| [[Firefox]]<br />
| {{ic|~/.mozilla/}}<br />
| [https://bugzil.la/259356] [https://phabricator.services.mozilla.com/D6995]<br />
|<br />
|-<br />
| [[Flatpak]]<br />
| {{ic|~/.var/}}<br />
| [https://github.com/flatpak/flatpak/issues/46] [https://github.com/flatpak/flatpak.github.io/issues/191] [https://github.com/flatpak/flatpak/issues/1651 won't fix]<br />
|<br />
|-<br />
| {{Pkg|fltk}}<br />
| {{ic|~/.fltk/}}<br />
| [https://www.fltk.org/str.php?L3370+P0+S0+C0+I0+E0+V%25+Qxdg]<br />
|<br />
|-<br />
| [https://github.com/rwestlund/freesweep freesweep]<br />
| {{ic|~/.sweeprc}}<br />
| [https://github.com/rwestlund/freesweep/issues/9]<br />
|<br />
|-<br />
| {{Pkg|gftp}}<br />
| {{ic|~/.gftp/}}<br />
| [https://github.com/masneyb/gftp/issues/99#issuecomment-735030824]<br />
| Following the XDG spec is planned for gftp.<br />
|-<br />
| {{Pkg|ghidra}}<br />
|<br />
| [https://github.com/NationalSecurityAgency/ghidra/issues/908]<br />
|<br />
|-<br />
| [[GoldenDict]]<br />
| {{ic|~/.goldendict/}}<br />
| [https://github.com/goldendict/goldendict/issues/151]<br />
|<br />
|-<br />
| {{Pkg|gramps}}<br />
| {{ic|~/.gramps/}}<br />
| [https://gramps-project.org/bugs/view.php?id=8025]<br />
| 2022 Support XDG base directory specification (for next release Gramps 5.2 ) - Patch https://github.com/gramps-project/gramps/pull/1368<br />
|-<br />
| {{Pkg|groovy}}<br />
| {{ic|~/.groovy/}}<br />
|<br />
|<br />
|-<br />
| {{Pkg|grsync}}<br />
| {{ic|~/.grsync/}}<br />
| [https://sourceforge.net/p/grsync/feature-requests/15/]<br />
|<br />
|-<br />
| {{AUR|google-cloud-sdk}}<br />
| {{ic|~/.gsutil/}}<br />
| [https://github.com/GoogleCloudPlatform/gsutil/issues/991]<br />
|<br />
|-<br />
| [http://recordmydesktop.sourceforge.net/about.php gtk-recordMyDesktop]<br />
| {{ic|~/.gtk-recordmydesktop}}<br />
|<br />
|<br />
|-<br />
| {{Pkg|hplip}}<br />
| {{ic|~/.hplip/}}<br />
| [https://bugs.launchpad.net/hplip/+bug/307152]<br />
|<br />
|-<br />
| [https://www.idris-lang.org/ idris]<br />
| {{ic|~/.idris}}<br />
| [https://github.com/idris-lang/Idris-dev/pull/3456]<br />
|-<br />
| {{AUR|itch-setup-bin}}<br />
| {{ic|~/.itch}}<br />
| [https://github.com/itchio/itch/issues/2356 won't fix]<br />
| You can move the Game install location in the app settings.<br />
|-<br />
| {{Aur|lbdb}}<br />
| {{ic|~/.lbdbrc, ~/.lbdb/}}<br />
| [https://github.com/RolandRosenfeld/lbdb/blob/eb162aa9da36f699cf821c6487210c7979fcd8ee/TODO#L18]<br />
|<br />
|-<br />
| [[llpp]]<br />
| {{ic|~/.config/llpp.conf}}<br />
| [https://github.com/moosotc/llpp/issues/180]<br />
| Added in [https://repo.or.cz/w/llpp.git/commit/3ab86f0 3ab86f0] but subsequently reverted in [https://github.com/moosotc/llpp/commit/e253c9f1 e253c9f1]<br />
|-<br />
| [[Java]] OpenJDK<br />
| {{ic|~/.java/fonts}}<br />
| [https://bugzilla.redhat.com/show_bug.cgi?id=1154277]<br />
| {{ic|1=export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java}}<br />
|-<br />
| [[Java]] OpenJFX<br />
| {{ic|~/.java/webview}}<br />
|<br />
|<br />
|-<br />
| {{Pkg|jgmenu}}<br />
| {{ic|~/.jgmenu-lockfile}}<br />
| [https://github.com/johanmalm/jgmenu/blob/3e48121dc28d06efb23c7901b7e138c2de167a84/src/lockfile.c#L11] [https://github.com/johanmalm/jgmenu/blob/4e45d04502fc5f77392bef0ff33b7bada0cf07d1/src/jgmenu_run#L7]<br />
|<br />
|-<br />
| [https://julialang.org/ julia]<br />
| {{ic|~/.juliarc.jl}}, {{ic|~/.julia_history}}, {{ic|~/.julia}}<br />
| [https://github.com/JuliaLang/julia/issues/4630] [https://github.com/JuliaLang/julia/issues/10016]<br />
| The trailing {{ic|:$JULIA_DEPOT_PATH}} is necessary. See [https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_DEPOT_PATH]<br />
{{ic|1=export JULIA_DEPOT_PATH="$XDG_DATA_HOME/julia:$JULIA_DEPOT_PATH"}}<br />
|-<br />
| {{AUR|kite}}<br />
| {{ic|~/.kite/}}<br />
| [https://github.com/kiteco/issue-tracker/issues/242]<br />
|<br />
|-<br />
| {{Pkg|kotlin}}<br />
| {{ic|~/.kotlinc_history}}<br />
|<br />
| Related Konan issue: [https://youtrack.jetbrains.com/issue/KT-40763]<br />
|-<br />
| [[Kubernetes]]<br />
| {{ic|~/.kube/}}<br />
| [https://github.com/kubernetes/kubectl/issues/942][https://github.com/kubernetes/kubernetes/issues/56402]<br />
|<br />
|-<br />
| {{AUR|librewolf}}<br />
| {{ic|~/.mozilla}}<br />
{{ic|~/.librewolf}}<br />
| [https://gitlab.com/librewolf-community/browser/linux/-/issues/129]<br />
|<br />
|-<br />
| [http://www.linux-pam.org/ Linux PAM]<br />
| {{ic|~/.pam_environment}}<br />
| [https://github.com/linux-pam/linux-pam/issues/7]<br />
| Hardcoded in [https://github.com/linux-pam/linux-pam/blob/master/modules/pam_env/pam_env.c modules/pam_env/pam_env.c]<br />
|-<br />
| [https://lldb.llvm.org/ lldb]<br />
| {{ic|~/.lldb}}, {{ic|~/.lldbinit}}<br />
|<br />
|<br />
|-<br />
| [[LMMS]]<br />
| {{ic|~/.lmmsrc.xml}}<br />
| [https://github.com/LMMS/lmms/issues/5869]<br />
|<br />
|-<br />
| [http://www.mathomatic.org/ mathomatic]<br />
| {{ic|~/.mathomaticrc}}, {{ic|~/.matho_history}}<br />
|<br />
| History can be moved by using {{ic|rlwrap mathomatic -r}} with the {{ic|RLWRAP_HOME}} environment set appropriately.<br />
|-<br />
| [[Minecraft]]<br />
| {{ic|~/.minecraft/}}<br />
| [https://bugs.mojang.com/browse/MCL-2563 won't fix]<br />
|<br />
|-<br />
| [[Minetest]]<br />
| {{ic|~/.minetest/}}<br />
| [https://github.com/minetest/minetest/issues/864 won't fix] [https://github.com/minetest/minetest/issues/8151]<br />
|<br />
|-<br />
| {{Pkg|minicom}}<br />
| {{ic|~/.minirc.dfl}}<br />
|<br />
| Upstream has a TODO entry for supporting configuration files under {{ic|~/.config/minicom}}. [https://salsa.debian.org/minicom-team/minicom/-/blob/fe9ff103/TODO#L27]<br />
|-<br />
|-<br />
| [[Mono]]<br />
| {{ic|~/.mono/}}<br />
| [https://github.com/mono/mono/pull/12764]<br />
|<br />
|-<br />
| [https://www.mongodb.org/ mongodb]<br />
| {{ic|~/.mongorc.js}}, {{ic|~/.dbshell}}<br />
| [https://jira.mongodb.org/browse/DOCS-5652?jql=text%20~%20%22.mongorc.js%22]<br />
| [https://stackoverflow.com/questions/22348604/the-mongorc-js-is-not-found-but-there-is-one/22349050#22349050 This Stack Overflow thread] suggests a partial workaround using command-line switch {{ic|--norc}}.<br />
|-<br />
|<br />
| {{ic|~/.netrc}}<br />
|<br />
| Like {{ic|~/.ssh}}, many programs expect this file to be here. These include projects like curl ({{ic|CURLOPT_NETRC_FILE}}), [[ftp]] ({{ic|NETRC}}), [[s-nail]] ({{ic|NETRC}}), etc. While some of them offer alternative configurable locations, many do not such as w3m, wget and lftp.<br />
|-<br />
| [[NetworkManager|nmcli]]<br />
| {{ic|~/.nmcli-history}}<br />
| [https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/64]<br />
| Hardcoded to {{ic|g_get_home_dir()}}[https://developer.gnome.org/glib/stable/glib-Miscellaneous-Utility-Functions.html#g-get-home-dir] [https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/nmcli/connections.c#L6598]<br />
|-<br />
| [[Networkmanager-openvpn]]<br />
| {{ic|~/.cert/nm-openvpn}}<br />
| [https://gitlab.gnome.org/GNOME/NetworkManager-openvpn/issues/35]<br />
|<br />
|-<br />
| {{Aur|ocaml-utop}}<br />
| {{ic|~/.utop-history}}<br />
| [https://github.com/ocaml-community/utop/issues/361]<br />
| There's an open PR to move {{ic|~/.utop-hostory}} to {{ic|$XDG_CACHE_HOME}} [https://github.com/ocaml-community/utop/pull/362]<br />
|-<br />
| [[OpenSSH]]<br />
| {{ic|~/.ssh}}<br />
| [https://bugzilla.mindrot.org/show_bug.cgi?id=2050 won't fix]<br />
| Assumed to be present by many ssh daemons and clients such as DropBear and OpenSSH.<br />
|-<br />
| [https://www.palemoon.org/ palemoon]<br />
| {{ic|~/.moonchild productions}}<br />
| [https://forum.palemoon.org/viewtopic.php?f=5&t=9639]<br />
|<br />
|-<br />
| {{AUR|parsec-bin}}<br />
| {{ic|~/.parsec}}<br />
|<br />
|<br />
|-<br />
| {{AUR|pcsxr}}<br />
| {{ic|~/.pcsxr}}<br />
|<br />
| A {{ic|-cfg}} flag exists, but can only be set relative to {{ic|~/.pcsxr}}.<br />
|-<br />
| [https://perf.wiki.kernel.org/index.php/Main_Page perf]<br />
| {{ic|~/.debug}}<br />
|<br />
| Hardcoded in [https://github.com/torvalds/linux/blob/7d42e98182586f57f376406d033f05fe135edb75/tools/perf/util/config.c#L35 tools/perf/util/config.c]. Commit: [https://github.com/torvalds/linux/commit/45de34bbe3e1b8f4c8bc8ecaf6c915b4b4c545f8]<br />
|-<br />
| [[perl]]<br />
| {{ic|~/.cpan}}, {{ic|~/perl5}}<br />
| [https://github.com/andk/cpanpm/issues/149]<br />
| Perl5's [https://github.com/andk/cpanpm CPAN] expects {{ic|~/.cpan}}<br />
|-<br />
| {{AUR|portfolio-performance-bin}}<br />
| {{ic|~/.PortfolioPerformance/}}<br />
| [https://github.com/buchen/portfolio/issues/1922]<br />
| <br />
|-<br />
| various [[shell]]s and [[display manager]]s<br />
| {{ic|~/.profile}}<br />
|<br />
|<br />
|-<br />
| {{Pkg|psensor}}<br />
| {{ic|~/.psensor}}<br />
| [https://gitlab.com/jeanfi/psensor/-/issues/38]<br />
|<br />
|-<br />
| [[python]]<br />
| {{ic|~/.python_history}}<br />
| [https://bugs.python.org/issue29779] [https://bugs.python.org/issue20886] [https://github.com/python/cpython/pull/13208]<br />
| All history from interactive sessions is saved to {{ic|~/.python_history}} by default since [https://bugs.python.org/issue5845 version 3.4]. This can still be customized the same way as in older versions (see [https://docs.python.org/3/library/readline.html?highlight=readline#example this example]), including to [https://bugs.python.org/msg318437 use a custom path] or [https://bugs.python.org/msg265568 disable history saving].<br />
|-<br />
| {{Pkg|python-tensorflow}}<br />
| {{ic|~/.keras}}<br />
| [https://github.com/tensorflow/tensorflow/issues/38831]<br />
| The issues is for {{ic|tf.keras}} module<br />
|-<br />
| {{Pkg|qmmp}}<br />
| {{ic|~/.qmmp}}<br />
| [https://sourceforge.net/p/qmmp-dev/tickets/776]<br />
|<br />
|-<br />
| [https://doc.qt.io/qt-5/qtdesigner-manual.html Qt Designer]<br />
| {{ic|~/.designer}}<br />
| [https://bugreports.qt.io/browse/QTCREATORBUG-26093]<br />
|<br />
|-<br />
| [http://rednotebook.sourceforge.net/ RedNotebook]<br />
| {{ic|~/.rednotebook}}<br />
| [https://github.com/jendrikseipp/rednotebook/issues/404]<br />
|<br />
|-<br />
| [https://remarkableapp.github.io/linux.html Remarkable]<br />
| {{ic|~/.remarkable}}<br />
|<br />
|<br />
|-<br />
| {{AUR|renderdoc}}<br />
| {{ic|~/.renderdoc}}<br />
| [https://github.com/baldurk/renderdoc/pull/1741 won't fix]<br />
|<br />
|-<br />
| [https://www.renpy.org/ Ren'Py]<br />
| {{ic|~/.renpy}}<br />
| [https://github.com/renpy/renpy/issues/1377#issuecomment-370118555 won't fix]<br />
|<br />
|-<br />
| [https://gerrit.googlesource.com/git-repo/ repo]<br />
| {{ic|~/.repoconfig}}<br />
| [https://bugs.chromium.org/p/gerrit/issues/detail?id=13997]<br />
|<br />
|-<br />
| [[SANE]]<br />
| {{ic|~/.sane/}}<br />
|<br />
| {{ic|scanimage}} creates a {{ic|.cal}} file there<br />
|-<br />
| {{Pkg|sbcl}}<br />
| {{ic|~/.sbclrc}}<br />
|<br />
| {{hc|/etc/sbclrc|<br />
(require :asdf)<br />
(setf sb-ext:*userinit-pathname-function*<br />
(lambda () (uiop:xdg-config-home #P"sbcl/sbclrc")))<br />
}}<br />
<br />
Note that this requires root privileges and will change the location of {{ic|~/.sbclrc}} for all users. This can be mitigated by checking for an existing {{ic|~/.sbclrc}} inside the {{ic|lambda}} form.<br />
|-<br />
| [https://www.seamonkey-project.org/ SeaMonkey]<br />
| {{ic|~/.mozilla/seamonkey}}<br />
| [https://bugzil.la/726939]<br />
|<br />
|-<br />
| [https://signal.org/ Signal Desktop]<br />
| <br />
| [https://github.com/signalapp/Signal-Desktop/issues/4975]<br />
| Currently keeps messages in {{ic|~/.config/Signal}}<br />
|-<br />
| [[Snap]]<br />
| {{ic|~/snap/}}<br />
| [https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1575053]<br />
|<br />
|-<br />
| [https://www.gnu.org/software/solfege/solfege.html Solfege]<br />
| {{ic|~/.solfege}}, {{ic|~/.solfegerc}}, {{ic|~/lessonfiles}}<br />
| [https://savannah.gnu.org/bugs/index.php?50251]<br />
|<br />
|-<br />
| [https://spamassassin.apache.org/ SpamAssassin]<br />
| {{ic|~/.spamassassin}}<br />
|<br />
|<br />
|-<br />
| [[SQLite]]<br />
| {{ic|~/.sqlite_history}}, {{ic|~/.sqliterc}}<br />
| [https://www.sqlite.org/src/info/696e82f7c82d1720]<br />
| {{ic|1=export SQLITE_HISTORY=$XDG_DATA_HOME/sqlite_history}}, {{ic|sqlite3 -init "$XDG_CONFIG_HOME"/sqlite3/sqliterc}}<br />
|-<br />
| [[Steam]]<br />
| {{ic|~/.steam}}, {{ic|~/.steampath}}, {{ic|~/.steampid}}<br />
| [https://github.com/ValveSoftware/steam-for-linux/issues/1890]<br />
| Many game engines (Unity 3D, Unreal) follow the specification, but then individual game publishers hardcode the paths in [https://www.ctrl.blog/entry/flatpak-steamcloud-xdg Steam Auto-Cloud] causing game-saves to sync to the wrong directory.<br />
|-<br />
| [[TeamSpeak]]<br />
| {{ic|~/.ts3client}}<br />
|<br />
| {{ic|1=export TS3_CONFIG_DIR="$XDG_CONFIG_HOME/ts3client"}}<br />
|-<br />
| {{Pkg|terraform}}<br />
| {{ic|~/.terraform.d/}}<br />
| [https://github.com/hashicorp/terraform/issues/15389]<br />
|<br />
|-<br />
| {{pkg|texinfo}}<br />
| {{ic|~/.infokey}}<br />
|<br />
| {{ic|info --init-file "$XDG_CONFIG_HOME/infokey"}}<br />
|-<br />
| [[Thunderbird]]<br />
| {{ic|~/.thunderbird/}}<br />
| [https://bugzil.la/735285]<br />
|<br />
|-<br />
| [[TigerVNC]]<br />
| {{ic|~/.vnc}}<br />
| [https://github.com/TigerVNC/tigervnc/issues/1195]<br />
|<br />
|-<br />
| [https://gitlab.archlinux.org/remy/texlive-localmanager tllocalmgr]<br />
| {{ic|~/.texlive}}<br />
|<br />
|<br />
|-<br />
| {{Aur|urlview}}<br />
| {{ic|~/.urlview}}<br />
|<br />
| Use fork {{Aur|urlview-xdg-git}} instead. The fork will use {{ic|XDG_CONFIG_HOME/urlview/config}}<br />
|-<br />
| {{AUR|vale}}<br />
| {{ic|~/.vale.ini}}<br />
| [https://github.com/errata-ai/vale/issues/152 won't fix]<br />
| {{ic|vale --config "$XDG_CONFIG_HOME/vale/config.ini"}}<br />
|-<br />
| [[vim]]<br />
| {{ic|~/.vim}}, {{ic|~/.vimrc}}, {{ic|~/.viminfo}}<br />
| [https://github.com/vim/vim/issues/2034]<br />
| Since [https://github.com/vim/vim/commit/6a459902592e2a4ba68 7.3.1178] vim will search for {{ic|~/.vim/vimrc}} if {{ic|~/.vimrc}} is not found.<br />
<br />
{{hc|"$XDG_CONFIG_HOME"/vim/vimrc|<nowiki><br />
set runtimepath^=$XDG_CONFIG_HOME/vim<br />
set runtimepath+=$XDG_DATA_HOME/vim<br />
set runtimepath+=$XDG_CONFIG_HOME/vim/after<br />
<br />
set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim<br />
set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after<br />
<br />
let g:netrw_home = $XDG_DATA_HOME."/vim"<br />
call mkdir($XDG_DATA_HOME."/vim/spell", 'p')<br />
<br />
set backupdir=$XDG_STATE_HOME/vim/backup | call mkdir(&backupdir, 'p')<br />
set directory=$XDG_STATE_HOME/vim/swap | call mkdir(&directory, 'p')<br />
set undodir=$XDG_STATE_HOME/vim/undo | call mkdir(&undodir, 'p')<br />
set viewdir=$XDG_STATE_HOME/vim/view | call mkdir(&viewdir, 'p')<br />
<br />
if !has('nvim') | set viminfofile=$XDG_STATE_HOME/vim/viminfo | endif<br />
</nowiki>}}<br />
<br />
{{hc|~/.profile|2=<br />
export GVIMINIT='let $MYGVIMRC="$XDG_CONFIG_HOME/vim/gvimrc" {{!}} source $MYGVIMRC'<br />
export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" {{!}} source $MYVIMRC'<br />
}}<br />
<br />
{{ic|[G]VIMINIT}} environment variable will also affect Neovim. If separate configs for Vim and Neovim are desired then the following will be a better choice:<br />
export GVIMINIT='let $MYGVIMRC = !has("nvim") ? "$XDG_CONFIG_HOME/vim/gvimrc" : "$XDG_CONFIG_HOME/nvim/init.gvim" | so $MYGVIMRC'<br />
export VIMINIT='let $MYVIMRC = !has("nvim") ? "$XDG_CONFIG_HOME/vim/vimrc" : "$XDG_CONFIG_HOME/nvim/init.vim" | so $MYVIMRC'<br />
<br />
* https://blog.joren.ga/vim-xdg<br />
* https://tlvince.com/vim-respect-xdg<br />
|-<br />
| [http://www.vimperator.org/ vimperator]<br />
| {{ic|~/.vimperatorrc}}<br />
| [https://web.archive.org/web/20200514081339/http://www.mozdev.org/pipermail/vimperator/2009-October/004848.html]<br />
| {{ic|1=export VIMPERATOR_INIT=":source $XDG_CONFIG_HOME/vimperator/vimperatorrc"}}<br />
<br />
{{ic|1=export VIMPERATOR_RUNTIME="$XDG_CONFIG_HOME"/vimperator}}<br />
|-<br />
| {{Pkg|visidata}}<br />
| {{ic|~/.visidata}}<br />
| [https://github.com/saulpw/visidata/issues/487]<br />
|<br />
|-<br />
| {{Pkg|w3m}}<br />
| {{ic|~/.w3m}}<br />
| [https://sourceforge.net/p/w3m/feature-requests/31/] [https://github.com/tats/w3m/issues/130]<br />
|<br />
|-<br />
| [https://w1.fi/ wpa_cli]<br />
| {{ic|~/.wpa_cli_history}}<br />
|<br />
|<br />
|-<br />
| {{Aur|wego}}<br />
| {{ic|~/.wegorc}}<br />
| [https://github.com/schachmat/wego/issues/116]<br />
|<br />
|-<br />
| {{AUR|x2goclient}}<br />
| {{ic|~/.x2goclient}}<br />
|<br />
| {{ic|1=alias x2goclient="x2goclient --home=$HOME/.config"}}<br />
|-<br />
| {{Pkg|xdg-utils}}<br />
| {{ic|~/.gnome}}<br />
| [https://bugs.freedesktop.org/show_bug.cgi?id=90775] [https://gitlab.freedesktop.org/xdg/xdg-utils/-/issues/81] [https://gitlab.freedesktop.org/xdg/xdg-utils/-/merge_requests/22]<br />
| For some reason the script {{ic|xdg-desktop-menu}} hard-codes {{ic|1=gnome_user_dir="$HOME/.gnome/apps"}}. This is used by [[chromium]] among others. Bug discussion has moved to gitlab and PR with fix exists, however it is not merged yet.<br />
|-<br />
| {{Pkg|xpdf}}<br />
| {{ic|~/.xpdfrc}}<br />
|<br />
|<br />
|-<br />
| {{AUR|xrdp}}<br />
| {{ic|~/thinclient_drives}}, {{ic|~/.pcsc*}}<br />
|<br />
| For the directory {{ic|~/thinclient_drives}}, you may consider editing {{ic|/etc/xrdp/sesman.ini}} and modifying the section {{ic|[Chansrv]}} following the example config.<br />
|-<br />
| [https://github.com/XVimProject/XVim2 XVim2]<br />
| {{ic|~/.xvimrc}}<br />
| [https://github.com/XVimProject/XVim2/issues/389]<br />
|<br />
|-<br />
| [https://yardoc.org YARD]<br />
| {{ic|~/.yard}}<br />
| [https://github.com/lsegal/yard/issues/1230]<br />
| Would accept Pull Request if anyone want to implement it.<br />
|-<br />
| [https://nmap.org/zenmap/ zenmap] {{Pkg|nmap}}<br />
| {{ic|~/.zenmap}}<br />
| [https://seclists.org/nmap-dev/2012/q2/163] [https://github.com/nmap/nmap/issues/590]<br />
|<br />
|-<br />
| {{AUR|zoom}}<br />
| {{ic|~/.zoom}}<br />
|<br />
| Unrecommended: setting the following variable moves the contents of .zoom but the directory itself always gets created. Moreover, it breaks some functionalities eg. being able to start a meeting. {{ic|1=export SSB_HOME="$XDG_DATA_HOME"/zoom}}<br />
|-<br />
| {{AUR|zotero-bin}}<br />
| {{ic|~/.zotero}} {{ic|~/Zotero}}<br />
| [https://github.com/zotero/zotero/issues/1203]<br />
|<br />
|-<br />
| [[zsh]]<br />
| {{ic|~/.zshrc}}, {{ic|~/.zprofile}}, {{ic|~/.zshenv}}, {{ic|~/.zlogin}}, {{ic|~/.zlogout}}, {{ic|~/.histfile}}, {{ic|~/.zcompdump}}, {{ic|~/.zcompcache}}<br />
| [https://www.zsh.org/mla/workers/2013/msg00692.html]<br />
| Consider exporting {{ic|1=ZDOTDIR=$HOME/.config/zsh}} in {{ic|~/.zshenv}} (this is hardcoded due to the bootstrap problem). You could also add this to {{ic|/etc/zsh/zshenv}} and avoid the need for any dotfiles in your {{ic|HOME}}. Doing this however requires root privilege which may not be viable and is system-wide.<br />
<br />
{{ic|1=export HISTFILE="$XDG_STATE_HOME"/zsh/history}}<br />
<br />
{{ic|compinit -d $XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION}} [https://unix.stackexchange.com/questions/391641/separate-path-for-zcompdump-files] /!\ The folder needs to exist<br />
<br />
{{ic|zstyle ':completion:*' cache-path $XDG_CACHE_HOME/zsh/zcompcache}}<br />
<br />
|}<br />
<br />
== Libraries ==<br />
<br />
; C<br />
: [https://github.com/Jorengarenar/libXDGdirs libXDGdirs]<br />
: [https://github.com/devnev/libxdg-basedir libxdg-basedir]<br />
: [https://github.com/Cloudef/chck/tree/master/chck/xdg C99: Cloudef's simple implementation].<br />
<br />
; C++<br />
: [https://github.com/azubieta/xdg-utils-cxx xdg-utils-cxx]<br />
: [https://sr.ht/~danyspin97/xdgpp xdgpp]<br />
<br />
; Go<br />
: [https://github.com/adrg/xdg adrg/xdg]<br />
: [https://github.com/ProtonMail/go-appdir go-appdir] (deprecated, archived)<br />
: [https://github.com/shibukawa/configdir configdir] (deprecated, abandoned)<br />
: [https://github.com/kyoh86/xdg kyoh86/xdg] (deprecated, archived)<br />
<br />
; Haskell<br />
: Officially in [https://hackage.haskell.org/package/directory directory] since 1.2.3.0 [https://github.com/haskell/directory/commit/ab9d0810ce ab9d0810ce].<br />
: [https://hackage.haskell.org/package/xdg-basedir xdg-basedir]<br />
<br />
; JVM: Java, Kotlin, Clojure, Scala, ...<br />
: [https://github.com/soc/directories-jvm directories-jvm]<br />
<br />
; Perl<br />
: [https://search.cpan.org/dist/File-BaseDir/lib/File/BaseDir.pm File-BaseDir]<br />
<br />
; Python<br />
: [https://freedesktop.org/wiki/Software/pyxdg/ pyxdg]<br />
<br />
; Ruby<br />
: [https://github.com/bkuhlmann/xdg bkuhlmann/xdg]<br />
: [https://github.com/rubyworks/xdg rubyworks/xdg] (deprecated, abandoned)<br />
<br />
; Rust<br />
: [https://github.com/soc/directories-rs directories-rs]<br />
: [https://github.com/whitequark/rust-xdg rust-xdg]<br />
<br />
; Vala<br />
: Builtin support via [https://valadoc.org/#!api=glib-2.0/GLib.Environment GLib.Environment].<br />
: See {{ic|get_user_cache_dir}}, {{ic|get_user_data_dir}}, {{ic|get_user_config_dir}}, etc.<br />
<br />
== See also ==<br />
<br />
* [https://wiki.gnome.org/Initiatives/GnomeGoals/XDGConfigFolders GNOME Goal: XDG Base Directory Specification Usage]<br />
* [https://web.archive.org/web/20180827160401/plus.google.com/+RobPikeTheHuman/posts/R58WgWwN9jp Rob Pike: "Dotfiles" being hidden is a UNIXv2 mistake].<br />
* {{man|1|systemd-path}}<br />
* {{man|7|file-hierarchy}}<br />
* [https://github.com/grawity/dotfiles/blob/master/.dotfiles.notes Grawity's notes on dotfiles].<br />
* [https://github.com/grawity/dotfiles/blob/master/.environ.notes Grawity's notes on environment variables].<br />
* [https://ploum.net/207-modify-your-application-to-use-xdg-folders/ ploum.net: Modify Your Application to use XDG Folders].<br />
* The [https://pcgamingwiki.com/wiki/Home PCGamingWiki] attempts to document whether or not Linux PC games follow the XDG Base Directory Specification.</div>Mid-kidhttps://wiki.archlinux.org/index.php?title=Openbox&diff=324080Openbox2014-07-08T17:46:16Z<p>Mid-kid: Added how to set a grid layout for virtual desktops, because I thought it was necessary.</p>
<hr />
<div>[[Category:Stacking WMs]]<br />
[[cs:Openbox]]<br />
[[de:Openbox]]<br />
[[es:Openbox]]<br />
[[fr:Openbox]]<br />
[[it:Openbox]]<br />
[[ja:Openbox]]<br />
[[ko:Openbox]]<br />
[[lt:Openbox]]<br />
[[nl:Openbox]]<br />
[[pl:Openbox]]<br />
[[ru:Openbox]]<br />
[[sk:Openbox]]<br />
[[sr:Openbox]]<br />
[[tr:Openbox]]<br />
[[zh-CN:Openbox]]<br />
[[zh-TW:Openbox]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|File manager functionality}}<br />
{{Related|Window manager}}<br />
{{Related|Oblogout}}<br />
{{Related articles end}}<br />
<br />
Openbox is a lightweight, powerful, and highly configurable ''stacking'' [[Window manager|window manager]] with extensive standards support. It may be built upon and run independently as the basis of a unique [[desktop environment]], or within other integrated desktop environments such as [[KDE]] and [[Xfce]], as an alternative to the window managers they provide. The [[LXDE]] desktop environment is itself built around Openbox.<br />
<br />
A comprehensive list of features are documented at the [http://openbox.org/ official Openbox website]. This article pertains to specifically installing Openbox under Arch Linux.<br />
<br />
== Installation ==<br />
<br />
Install {{Pkg|openbox}}, available in the [[official repositories]].<br />
<br />
== Openbox Sessions ==<br />
<br />
Again, Openbox may be run independently as a standalone window manager, or within other integrated desktop environments such as [[KDE]] and [[XFCE]] as an alternative to the window managers they provide.<br />
<br />
=== Standalone ===<br />
<br />
Many popular [[Display manager|display managers]] such as [[LXDM]], [[SLiM]], and [[LightDM]] will automatically detect Openbox, allowing for it to be run as a standalone session.<br />
<br />
However, it may be necessary to manually specify the command to start an openbox session where intending to set it as a default session for [[SLiM]], or where not using a display manager at all (e.g. logging in at the command line, followed by the command {{ic|startx}}). In either instance, it will be necessary to modify the [[Xinitrc]] file in order to add the following command:<br />
<br />
exec openbox-session<br />
<br />
=== Within other desktop environments ===<br />
<br />
When replacing the native window manager of a desktop environment with Openbox, any desktop compositing effects - such a transparency - provided by that native window manager will be lost. This is because Openbox itself does not provide any compositing functionality. However, it is easily possible to use a separate compositing program to [[Openbox#Compositing effects|re-enable compositing]]. <br />
<br />
==== GNOME ====<br />
<br />
Openbox does not seem to work with [[GNOME|GNOME 3]]. The {{ic|Gnome-Shell}} touch-style interface requires both its native window manager and its native gtk-window-decorator packages to function. Furthermore, attempting to run Openbox within the {{ic|Classic-Gnome-Shell}} interface results in the loss of the {{ic|gnome-panel}}. Ceasing Openbox and attempting to restore the native window manager will result in crashing the desktop. Gnome 3 is tightly integrated, and is therefore deliberately designed not to be modular in nature (i.e. allowing components to be changed).<br />
<br />
==== KDE ====<br />
See the [[KDE#Using Openbox in KDE|using Openbox in KDE]] section of the main [[KDE]] article.<br />
<br />
==== Xfce ====<br />
<br />
See the [[Xfce#Replacing_the_native_window_manager|replacing the native window manager]] section of the main [[Xfce]] article.<br />
<br />
== System configuration==<br />
<br />
Those installing Openbox - particularly as a stand-alone Window Manager - will have noticed that several elements may fail to work properly, or even work at all. Examples of the common problems encountered are:<br />
<br />
* '''File Managers''': Other partitions are not displayed or accessible. The trash function - where provided - does not work <br />
* '''Authentication''': Passwords are not stored / remembered during sessions<br />
* '''Secure Shell (SSH)''': SSH agent will not start<br />
* '''Wireless Connection''': Instant failure when attempting to connect to wifi (related to authentication) <br />
* '''Themes''': Application windows are mismatched or haphazard-looking<br />
* '''Folders''': Expected folders such as {{ic|Documents}}, {{ic|Downloads}} and so forth are missing from the {{ic|Home}} folder<br />
* '''System Tray''': Installed packages fail to autostart or can be seen running twice<br />
<br />
Most of these problems are actually the result of [[Dbus]] and [[GTK]] issues, both of which can be fixed simultaneously by editing the [[xprofile|~/.xprofile]] file - or if using [[SLiM]] as a [[display manager]] instead - by editing the [[xinitrc|~/.xinitrc]] file. It will also be necessary to install some key packages to ensure full functionality.<br />
<br />
=== D-Bus ===<br />
<br />
File manager, authentication, SSH agent, and WiFi-connection problems will likely be due to that [[D-Bus]] is not functioning correctly. Most [[display manager]]s such as [[GDM]], [[KDM]], [[LightDM]] and [[LXDM]] will handle this for you.<br />
<br />
When using [[xinit]] or certain other DMs (such as [[XDM]] and [[SLiM]]), make sure {{ic|~/.xinitrc}} is based on {{ic|/etc/skel/.xinitrc}} (so that it sources {{ic|/etc/X11/xinit/xinitrc.d/}}, see [[xinitrc]] for more information).<br />
<br />
=== GTK+ 2 ===<br />
<br />
Problems with the theme and look will likely be due to the absence of the appropriate command to ensure that a uniform look must be applied to applications that use GTK 2. Again, edit {{ic|~/.xinitrc}} and/or {{ic|~/.xprofile}} with the following command:<br />
<br />
export GTK2_RC_FILES="$HOME/.gtkrc-2.0" <br />
<br />
The {{ic|~/.gtkrc-2.0}} file will be automatically generated where using [[LXDE|lxappearance]] to set themes.<br />
<br />
It will also be necessary to install {{Pkg|libgnomeui}} to ensure that [[Qt]] is also able to find GTK themes.<br />
<br />
See [[GTK+#GTK+ 2.x]] for an introduction to manually editing {{ic|~/.gtkrc-2.0}}.<br />
<br />
=== XDG ===<br />
<br />
In addition to sourcing the '''local''' {{ic|~/.config/openbox/autostart}} file to autostart applications, Openbox will also source {{ic|.desktop}} files automatically installed by some packages in the '''global''' {{ic|/etc/xdg/autostart}} directory. The package responsible for allowing Openbox to additionally source the {{ic|/etc/xdg/autostart}} directory is {{Pkg|python2-xdg}}. <br />
<br />
For example, where initially autostarting a package such as the [[NetworkManager|Network Manager]] applet ('''nm-applet''') locally, should {{Pkg|python2-xdg}} be installed at a later time - either explicitly or as a dependency for another package - its global XDG {{ic|.desktop}} file will then also be sourced as a consequence, resulting in seeing two icons running in the system tray. It is therefore recommended to install {{Pkg|python2-xdg}} explicitly, as this will ensure that applications that should automatically autostart when installed will do so.<br />
<br />
=== Home folders ===<br />
<br />
{{Tip|This fix will be especially helpful for those who wish to use a file manager to manage their desktop, as it will automatically create a special {{ic|~/Desktop}} directory, which will house all files and application shortcuts stored on the desktop itself.}}<br />
<br />
Where expected {{ic|Home}} folders such as {{ic|Downloads}}, {{ic|Documents}}, etc., are not present, then please review the [[Xdg user directories]] article.<br />
<br />
=== Authentication and passwords ===<br />
<br />
For authentication (e.g. WiFi passwords, etc.), it will be necessary to install the appropriate packages. They are:<br />
<br />
* {{Pkg|polkit}}: Application development toolkit for controlling system-wide privileges; see [[polkit]]<br />
* {{Pkg|lxpolkit}}: Simple policykit authentication agent for LXDE ({{Pkg|polkit-gnome}} currently does not work properly)<br />
* {{Pkg|gnome-keyring}}: store / remember passwords; see [[GNOME Keyring]]<br />
<br />
== Configuration ==<br />
<br />
{{Warning|Edit these files as the user you will be using Openbox with. Not as root!}}<br />
{{Tip|Local configuration files will always override global equivalents. These files may also be manually edited by any appropriate text editor, such as Leafpad or Geany; there is no need to use [[sudo]] or '''gksu''' commands to edit them.}}<br />
<br />
Four key files form the basis of the openbox configuration, each serving a unique role. They are: {{ic|rc.xml}}, {{ic|menu.xml}}, {{ic|autostart}}, and {{ic|environment}}. Although these files are discussed in more detail below, to start configuring Openbox, it will first be necessary to create a '''local''' Openbox profile (i.e for your specific user account) based on them. This can be done by copying them from the '''global''' {{ic|/etc/xdg/openbox}} profile (applicable to any and all users) as a template:<br />
<br />
$ mkdir -p ~/.config/openbox<br />
$ cp -R /etc/xdg/openbox/* ~/.config/openbox<br />
<br />
=== rc.xml ===<br />
<br />
{{Tip|Custom keyboard shortcuts (keybindings) must be added to the {{ic|<keyboard>}} section of this file, and underneath the {{ic|<nowiki><!-- Keybindings for running aplications --></nowiki>}} heading.}}<br />
<br />
{{ic|~/.config/openbox/rc.xml}} is the main configuration file, responsible for determining the behaviour and settings of the overall session, including:<br />
<br />
* Keyboard shortcuts (e.g. starting applications; controlling the volume)<br />
* Theming<br />
* Desktop and Virtual desktop settings, and<br />
* Application Window settings<br />
<br />
This file is also pre-configured, meaning that it will only be necessary to amend existing content in order to customise behaviour to suit personal preference.<br />
<br />
=== menu.xml ===<br />
<br />
{{ic|~/.config/openbox/menu.xml}} defines the type and behaviour of the desktop menu, accessable by right-clicking the background. Although the default provided is a '''static menu''' (meaning that it will not automatically update when new applications are installed), it is possible to employ the use of '''dynamic menus''' that will automatically update as well. <br />
<br />
The available options are discussed extensively below in the [[Openbox#Menus|Menus]] section.<br />
<br />
=== autostart ===<br />
<br />
{{Tip|Be aware that some applications will automatically start via {{ic|.desktop}} files installed in the {{ic|/etc/xdg/autostart/}} or {{ic|~/.config/autostart/}} directories.}}<br />
<br />
{{ic|~/.config/openbox/autostart}} determines which applications are to be launched upon beginning the Openbox session. These may include:<br />
<br />
* Panels and/or docks<br />
* Compositors<br />
* Background providers<br />
* Screensavers<br />
* Applications to autoload or autostart (e.g. [[Conky]])<br />
* [[Daemon]] processes (e.g. File Managers for automounting and other functions)<br />
* Other appropriate commands (e.g. disable [[DPMS]])<br />
<br />
==== Listing commands ====<br />
<br />
There are two very important points to note when adding commands to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
* Each and every command '''must''' be terminated with an ampersand ({{ic|&}}). Where a command does not end with an ampersand, then no further commands listed below it will be executed.<br />
* It is strongly recommended to add delays to the execution of some or all commands in the autostart file, even if only by a single second. The consequence of not doing so is that all commands will be executed simultaneously, potentially resulting in the mis- or non-starting of items. The syntax of the command to delay the execution of commands (in seconds) is:<br />
<br />
(sleep <number of seconds>s && <command>) &<br />
<br />
For example, to delay the execution of [[Conky]] by 3 seconds, the command would be (and note the termination of it with an ampersand):<br />
<br />
(sleep 3s && conky) &<br />
<br />
Here is a more complete example of a possible {{ic|~/.config/openbox/autostart}} file:<br />
<br />
## Autostart File ##<br />
<br />
##Disable DPMS<br />
xset -dpms; xset s off &<br />
<br />
##Compositor<br />
compton -CGb &<br />
<br />
##Background<br />
(sleep 1s && nitrogen --restore) &<br />
<br />
##tint2 panel<br />
(sleep 1s && tint2) &<br />
<br />
##Sound Icon<br />
(sleep 1s && volumeicon) &<br />
<br />
##Screensaver<br />
(sleep 1s && xscreensaver -no-splash) &<br />
<br />
##Conky<br />
(sleep 3s && conky) &<br />
<br />
##Disable touchpad<br />
/usr/bin/synclient TouchpadOff=1 &<br />
<br />
=== environment ===<br />
<br />
{{Note|This is the least important file, and many users may not need to edit it at all.}}<br />
<br />
{{ic|~/.config/openbox/environment}} can be used to export and set relevant environmental variables such as to:<br />
<br />
* Define new pathways (e.g. execute commands that would otherwise require the entire pathway to be listed with them)<br />
* Change language settings, and<br />
* Define other variables to be used (e.g. the fix for GTK theming could be listed here)<br />
<br />
=== Optional GUI configuration packages ===<br />
<br />
Several GUIs are available to quickly and easily configure your Openbox desktop. From the official repositories these include:<br />
<br />
* {{Pkg|obconf}}: Basic Openbox configuration manager<br />
* {{Pkg|lxappearance-obconf}}: LXDE configuration manager (provides additional options)<br />
* {{Pkg|lxinput}}: LXDE keyboard and mouse configuration<br />
* {{Pkg|lxrandr}}: LXDE monitor configuration<br />
<br />
Others, such as {{AUR|obkey}} (configure keyboard shortcuts via the {{ic|rc.xml}} file) and {{AUR|ob-autostart}} (configure the Openbox {{ic|autostart}} file) are available from the [[AUR]]. Programs and applications relating to the configuration of Openbox's desktop menu are discussed in the [[Openbox#Menus|Menus]] section.<br />
<br />
== Openbox reconfiguration ==<br />
<br />
{{Tip|where not already present, it would be worthwhile adding this command to a menu and/or as a keybind for convenience.}}<br />
<br />
Openbox will not always automatically reflect any changes made to its configuration files within a session. As a consequence, it will be necessary to manually reload those files after they have been edited. To do so, enter the following command:<br />
<br />
$ openbox --reconfigure<br />
<br />
Where intending to add this command as a keybinnd to {{ic|~/.config/openbox/rc.xml}}, it will only be necessary to list the command as {{ic|reconfigure}}. An example has been provided below, using the {{ic|Super}}+{{ic|F11}} keybind:<br />
<br />
<keybind key="W-F11"><br />
<action name="Reconfigure"/><br />
</keybind><br />
<br />
== Keybinds ==<br />
<br />
All keybinds must be added to the {{ic|~/.config/openbox/rc.xml}} file, and below the {{ic|<nowiki><!-- Keybindings for running aplications --></nowiki>}} heading. Although a brief overview has been provided here, a more in-depth explanation of keybindings can be found at [http://openbox.org/wiki/Help:Bindings openbox.org]. There is a utility 'obkey' in AUR for adjust key-binding. Before use obkey, you should use obconf to create {{ic|~/.config/openbox/rc.xml}}.<br />
<br />
=== Special keys ===<br />
<br />
While the use of standard alpha-numeric keys for keybindings is self-explanatory, special names are assigned to other types of keys, such as {{ic|modifers}}, {{ic|multimedia}} keys and {{ic|navigation}} keys.<br />
<br />
==== Modifiers ====<br />
<br />
{{ic|Modifer}} keys play an important role in keybindings (e.g. holding down the {{ic|shift}} or {{ic|CTRL / control}} key in combination with another key to undertake an action). Using modifers helps to prevent conflicting keybinds, whereby two or more actions are linked to the same key or combination of keys. The syntax to use a modifer with another key is:<br />
<br />
"<modifier>-<key>"<br />
<br />
The modifer codes are as follows:<br />
<br />
* {{ic|S}}: Shift<br />
* {{ic|C}}: Control / CTRL<br />
* {{ic|A}}: Alt<br />
* {{ic|W}}: Super / Windows<br />
* {{ic|M}}: Meta<br />
* {{ic|H}}: Hyper (If it is bound to something) <br />
<br />
For example, the code below would use {{ic|super}} and {{ic|t}} to launch {{Pkg|lxterminal}}<br />
<br />
<keybind key="W-t"><br />
<action name="Execute"><br />
<command>lxterminal</command><br />
</action><br />
</keybind><br />
<br />
==== Multimedia keys ====<br />
<br />
Where available, it is possible to set the appropriate {{ic|multimedia}} keys to perform their intended functions, such as to control the volume and/or the screen brightness. These will usually be integrated into the {{ic|function}} keys, and are identified by their appropriate symbols. See the [[Multimedia Keys]] article for further information.<br />
<br />
The volume and brightness multimedia codes are as follows (note that commands will still have to be assigned to them to actually function):<br />
<br />
* {{ic|XF86AudioRaiseVolume}}: Increase volume<br />
* {{ic|XF86AudioLowerVolume}}: Decrease volume<br />
* {{ic|XF86AudioMute}}: Mute / unmute volume<br />
* {{ic|XF86MonBrightnessUp}}: Increase screen brightess<br />
* {{ic|XF86MonBrightnessDown}}: Decrease screen brightness<br />
<br />
Examples of how these may be used in {{ic|~/.config/openbox/rc.xml}} have been provided below.<br />
<br />
==== Navigation keys ====<br />
<br />
These are the directional / arrow keys, usually used to move the cursor up, down, left, or right. The (self-explanatory) navigation codes are as follows:<br />
<br />
* {{ic|Up}}: Up<br />
* {{ic|Down}}: Down<br />
* {{ic|Left}}: Left<br />
* {{ic|Right}}: Right<br />
<br />
=== Volume Control ===<br />
<br />
What commands should be used for controlling the volume will depend on whether [[ALSA]], [[PulseAudio]], or [[OSS]] is used for sound.<br />
<br />
==== ALSA ====<br />
<br />
If [[ALSA]] is used for sound, the {{ic|amixer}} program can be used to adjust the volume, which is part of the {{Pkg|alsa-utils}} package. The following example - using the {{ic|multimedia}} keys intended to control the volume - will adjust the volume by +/- 5% (which may be changed, as desired):<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
==== Pulseaudio ====<br />
<br />
Where using [[PulseAudio]] with [[ALSA]] as a backend, the {{ic|amixer}} program commands will have to be modifed, as illustrated below in comparison to the ALSA example:<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
==== OSS ====<br />
<br />
{{Note|This option may be suitable for more experienced users.}}<br />
<br />
Where using [[OSS]], it is possible to create keybindings to raise or lower specific mixers. This allows, for example, the volume of a specific application (such as an audio player) to be changed without changing the overall system volume settings in turn. In this instance, the application must first have been [[OSS#Configuring_Applications_for_OSS|configured]] to use its own mixer. <br />
<br />
In the following example, [[MPD]] has been configured to use its own mixer - also named {{ic|mpd}} - to increase and decrease the volume by a single decibel at a time. The {{ic|--}} that appears after the {{ic|ossmix}} command has been added to prevent a negative value from being treated as an argument: <br />
<br />
<keybind key="[chosen keybind]"><br />
<action name="Execute"><br />
<command>ossmix -- mpd +1</command><br />
</action><br />
</keybind><br />
<keybind key="[chosen keybind]"><br />
<action name="Execute"><br />
<command>ossmix -- mpd -1</command><br />
</action><br />
</keybind><br />
<br />
=== Media player control ===<br />
<br />
The {{AUR|playerctl}} command-line utility can be used to bind multimedia keys to player actions. It should work with most media players.<br />
<br />
<keybind key="XF86AudioPlay"><br />
<action name="Execute"><br />
<command>playerctl play</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioPause"><br />
<action name="Execute"><br />
<command>playerctl pause</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioNext"><br />
<action name="Execute"><br />
<command>playerctl next</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioPrev"><br />
<action name="Execute"><br />
<command>playerctl previous</command><br />
</action><br />
</keybind><br />
<br />
=== Brightness control ===<br />
<br />
The {{ic|xbacklight}} program is used to control screen brightness, which is part of the [[Xorg]] X-Window system. In the example below, the {{ic|multimedia}} keys intended to control the screen brightness will adjust the settings by +/- 10%:<br />
<br />
<keybind key="XF86MonBrightnessUp"><br />
<action name="Execute"><br />
<command>xbacklight +10</command><br />
</action><br />
</keybind><br />
<keybind key="XF86MonBrightnessDown"><br />
<action name="Execute"><br />
<command>xbacklight -10</command><br />
</action><br />
</keybind><br />
<br />
=== Window snapping ===<br />
<br />
Many desktop environments and window managers support ''window snapping'' (e.g. Windows 7 Aero snap), whereby they will automatically snap into place when moved to the edge of the screen. This effect can also be simulated in Openbox through the use of keybinds on focused windows. <br />
<br />
As illustrated in the example below, percentages must be used to determine window sizes (see [http://openbox.org/wiki/Help:Actions openbox.org] for further information). In this instance, The {{ic|super}} key is used in conjunction with the {{ic|navigation}} keys:<br />
<br />
<keybind key="W-Left"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>west</direction></action><br />
</keybind><br />
<keybind key="W-Right"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>east</direction></action><br />
</keybind><br />
<br />
However, it should be noted that once a window has been 'snapped' to an edge, it will remain vertically maximised unless subsequently maximised and then restored. The solution is to implement additional keybinds - in this instance using the {{ic|down}} and {{ic|up}} keys - to do so. This will also make pulling 'snapped' windows from screen edges faster as well:<br />
<br />
<keybind key="W-Down"><br />
<action name="Unmaximize"/><br />
</keybind><br />
<keybind key="W-Up"><br />
<action name="Maximize"/><br />
</keybind><br />
<br />
This [http://ubuntuforums.org/showthread.php?t=1796793 Ubuntu forum thread] provides more information. Applications such as {{AUR|opensnap-git}} are also available from the AUR to automatically simulate window snapping behaviour without the use of keybinds.<br />
<br />
=== Desktop menu ===<br />
<br />
It is also possible to create a keybind to access the desktop menu. For example, the following code will bring up the menu by pressing {{ic|CTRL}} + {{ic|m}}:<br />
<br />
<keybind key="C-m"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
<br />
== Menus ==<br />
<br />
It is possible to employ three types of menu in Openbox: {{ic|static}}, {{ic|pipes}} (dynamic), and {{ic|generators}} (static or dynamic). They may also be used alone or in any combination.<br />
<br />
=== Static ===<br />
<br />
As the name would suggest, this default type of menu does not change in any way, and may be manually edited and/or (re)generated automatically through the use on an appropriate software package.<br />
<br />
Fast and efficient, while this type of menu can be used to select applications, it can also be useful to access specific functions and/or perform specific tasks (e.g. desktop configuration), leaving the access of applications to another process (e.g. the {{Pkg|synapse}} or {{Pkg|xfce4-appfinder}} applications).<br />
<br />
The {{ic|~/.config/openbox/menu.xml}} file will be the sole source of static desktop menu content.<br />
<br />
==== menumaker ====<br />
<br />
{{Warning|A root terminal '''must''' be installed in order to use MenuMaker, even though a standard user terminal may be used to run it. {{Pkg|xterm}} is a good choice.}}<br />
<br />
{{Pkg|menumaker}} automatically generates {{ic|xml}} menus for several window managers, including Openbox, [[Fluxbox]], [[IceWM]] and [[XFCE]]. It will search for all installed executable programs and consequently create a menu file for them. It is also possible to configure MenuMaker to exclude certain application types (e.g. relating to [[Gnome]] or [[KDE]]), if desired.<br />
<br />
Once installed and executed, it will automatically generate a new {{ic|~/.config/openbox/menu.xml}} file. To avoid overwriting an existing file, enter:<br />
<br />
$ mmaker -v OpenBox3<br />
<br />
Otherwise, to overwrite an existing file, add the {{ic|force}} argument ({{ic|f}}):<br />
<br />
$ mmaker -vf OpenBox3<br />
<br />
Once a new {{ic|~/.config/openbox/menu.xml}} file has been generated it may then be manually edited, or configured using a GUI menu editor, such as {{Pkg|obmenu}}.<br />
<br />
==== obmenu ====<br />
<br />
{{Warning|{{ic|obm-xdg}} - a pipe menu to generate a list of [[GTK+]] and [[Gnome]] applications - is also provided with obmenu. However, it has long-running bugs whereby it may produce an invalid output, or even not function at all. Consequently it has been omitted from discussion.}}<br />
<br />
{{Pkg|obmenu}} is a "user-friendly" GUI application to edit {{ic|~/.config/openbox/menu.xml}}, without the need to code in {{ic|xml}}.<br />
<br />
==== xdg-menu ====<br />
<br />
{{Pkg|archlinux-xdg-menu}} will automatically generate a menu based on {{ic|xdg}} files contained within the {{ic|/etc/xdg/}} directory for numerous Window Managers, including Openbox. Review the [[Xdg-menu#OpenBox]] article for further information.<br />
<br />
==== logout menu options ====<br />
<br />
{{Tip|The commands provided can also be attached to [[Openbox#Keybinds|keybinds]].}}<br />
<br />
The {{ic|~/.config/openbox/menu.xml}} file can be edited in order to provide a sub-menu with the same options as provided by [[Openbox#oblogout|oblogout]]. The sample script below will provide all of these options, with the exception of the ability to lock the screen:<br />
<br />
<menu id="exit-menu" label="Exit"><br />
<item label="Log Out"><br />
<action name="Execute"><br />
<command>openbox --exit</command><br />
</action><br />
</item><br />
<item label="Shutdown"><br />
<action name="Execute"><br />
<command>systemctl poweroff</command><br />
</action><br />
</item><br />
<item label="Restart"><br />
<action name="Execute"><br />
<command>systemctl reboot</command><br />
</action><br />
</item><br />
<item label="Suspend"><br />
<action name="Execute"><br />
<command>systemctl suspend</command><br />
</action><br />
</item><br />
<item label="Hibernate"><br />
<action name="Execute"><br />
<command>systemctl hibernate</command><br />
</action><br />
</item><br />
</menu><br />
<br />
Once the entries have been composed, add the following line to present the sub-menu where desired within the main desktop menu (usually as the last entry):<br />
<br />
<menu id="exit-menu"/><br />
<br />
=== Pipes ===<br />
<br />
{{Tip|It is entirely feasible for a static menu to contain one or more pipe sub-menus. The functionality of some pipe menus may also rely on the installation of relevant software packages.}}<br />
<br />
This type of menu is in essence a script that provides dynamic, refreshed lists on-the-fly as and when run. These lists may be used for multiple purposes, including to list applications, to provide information, and to provide control functions. Pre-configured pipe menus can be installed, although not from the [[official repositories]]. More experienced users can also modify and/or create their own custom scripts. Again, {{ic|~/.config/openbox/menu.xml}} may and commonly will contain several pipe menus.<br />
<br />
==== Examples ====<br />
<br />
* {{AUR|openbox-xdgmenu}}: fast xdg-menu converter to xml-pipe-menu<br />
* {{AUR|obfilebrowser}}: Application and file browser<br />
* {{AUR|obdevicemenu}}: Management of removable media with [[Udisks#Udisks|Udisks]]<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=1345031 wifi pipe menu]: Wireless networking using [[Netctl]]<br />
<br />
[http://openbox.org/download-pipemenus.php Openbox.org] also provides a further list of pipe menus.<br />
<br />
=== Generators ===<br />
<br />
This type of menu is akin to those provided by the taskbars of desktop environments such as [[XFCE]] or [[LXDE]]. Automatically updating on-the-fly, this type of menu can be powerful and very convenient. It may also be possible to add custom categories and menu entries; read the documentation for your intended dynamic menu to determine if and how this can be done.<br />
<br />
A menu generator will have to be executed from the {{ic|~/.config/openbox/menu.xml}} file.<br />
<br />
==== obmenu-generator ====<br />
<br />
{{Tip|icons can still be disabled in {{AUR|obmenu-generator}}, even where enabled in {{ic|~/.config/openbox/rc.xml}}.}}<br />
<br />
{{AUR|obmenu-generator}} is currently only available from the [[AUR]], although it is still highly recommended. With the ability to be used as a static or dynamic menu, it is highly configurable, powerful, and versatile. Menu categories and individual entries may also be easily hidden, customised, and/or added with ease. The [http://trizenx.blogspot.co.uk/2012/02/obmenu-generator.html official homepage] provides further information and screenshots.<br />
<br />
Below is an example of how obmenu-generator would be dynamically executed without icons in {{ic|~/.config/openbox/menu.xml}}:<br />
<br />
<?xml version="1.0" encoding="utf-8"?><br />
<openbox_menu><br />
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator"><br />
</menu><br />
</openbox_menu><br />
<br />
To automatically iconify entries, the {{ic|-i}} option would be added:<br />
<br />
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator -i"><br />
<br />
==== openbox-menu ====<br />
<br />
{{Tip|If this menu produces an error, it may be solved by enabling icons in {{ic|~/.config/openbox/rc.xml}}.}}<br />
<br />
{{AUR|openbox-menu}} uses the [[LXDE]] [http://sourceforge.net/projects/lxde/files/menu-cache/ menu-cache] to create dynamic menus. The [http://mimasgpc.free.fr/openbox-menu_en.html official homepage] provides further information and screenshots.<br />
<br />
==== obmenugen ==== <br />
<br />
{{AUR|Obmenugen}} is currently only available from the [[AUR]], and can be used to a generate static or dynamic application menu based on {{ic|.desktop}} files. The [http://obmenugen.sourceforge.net/ official homepage] provides further information.<br />
<br />
=== Menu icons ===<br />
<br />
To show icons next to menu entries, it will be necessary to ensure they are enabled in the {{ic|<menu>}} section of the {{ic|~/.config/openbox/rc.xml}} file:<br />
<br />
<applicationIcons>yes</applicationIcons><br />
<br />
Where using a static menu, it will then be necessary to edit the {{ic|~/.config/openbox/menu.xml}} file to provide both the {{ic|icon <nowiki>=</nowiki>}} command, along with the full path and icon name for each entry. An example of the syntax used to provide an icon for a category is:<br />
<br />
<menu id="apps-menu" label="[label name]" icon="[pathway to icon]/[icon name]"><br />
<br />
=== Desktop menu as a panel menu ===<br />
<br />
{{Tip|XDoTool can simulate any keybind for any action, and as such, it may therefore be used for many other purposes...}}<br />
<br />
{{Pkg|xdotool}} is a package that can issue commands to simulate key presses / keybinds, meaning that it is possible to use it to invoke keybind-related actions without having to actually press their assigned keys. As this includes the ability to invoke an assigned keybind for the Openbox desktop menu, it is therefore possible to use XDoTool to turn the Openbox desktop menu into a panel menu. Especially where the desktop menu is heavily customised and feature-rich, this may prove very useful to:<br />
<br />
* Replace an existing panel menu<br />
* Implement a panel menu where otherwise not provided or possible (e.g. for {{AUR|tint2-svn}})<br />
* Compensate where losing access to the desktop menu due to the use of an application like [[Openbox#xfdesktop|xfdesktop]] to [[Openbox#Desktop_Icons_and_Wallpapers|manage the desktop]].<br />
<br />
Once XDoTool has been installed - if not already present - it will be necessary to create a keybind to access the root menu in {{ic|~/.config/openbox/rc.xml}}, and again below the {{ic|<nowiki><</nowiki>!-- Keybindings for running aplications --<nowiki>></nowiki>}} heading. For example, the following code will bring up the menu by pressing {{ic|CTRL}} + {{ic|m}}:<br />
<br />
<keybind key="C-m"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
<br />
Openbox must then be [[Openbox#Openbox_Reconfiguration|re-configured]]. In this instance, XDoTool will be used to simulate the {{ic|CTRL}} + {{ic|m}} keypress to access the desktop menu with the following command (note the use of {{ic|+}} in place of {{ic|-}}):<br />
<br />
xdotool key control+m<br />
<br />
How this command may be used as a panel launcher / icon is largely dependent on the features of panel used. While some panels will allow the above command to be executed directly in the process of creating a new launcher, others may require the use of an executable script. As an example, a custom executable script called {{ic|obpanelmenu.sh}} will be created in the {{ic|~/.config}} folder:<br />
<br />
$ ''text editor'' ~/.config/obpanelmenu.sh<br />
<br />
Once the empty file has been opened, the appropriate XDoTool command must be added to the empty file (i.e. to simulate the {{ic|CTRL}} + {{ic|m}} keypress for this example):<br />
<br />
xdotool key control+m<br />
<br />
After the file has been saved and closed, it may then be made into an executable script with the following command:<br />
<br />
$ chmod +x ~/.config/obpanelmenu.sh<br />
<br />
Executing it will bring up the Openbox desktop menu. Consequently, where using a panel that supports drag-and-drop functionality to add new launchers, simply drag the executable script onto it before changing the icon to suit personal taste. For instructions on how to use this executable script with {{AUR|tint2-svn}} - a derivative of the popular {{Pkg|tint2}} panel that allows launchers to be added - see [[Tint2#Application_Launchers_in_tint2-svn_.28AUR.29|Tint2-Svn launchers]].<br />
<br />
== GTK+ desktop theming ==<br />
<br />
{{Tip|It is '''strongly advised''' to install the {{Pkg|obconf}} and {{Pkg|lxappearance-obconf}} GUI applications to configure visual settings and theming. The latter is particularly important as it is responsible for generating the {{ic|~/.gtkrc-2.0}} file (see the [[Openbox#GTK+ 2|GTK fix]] section).}}<br />
<br />
It is important to note that a substantial range of both '''Openbox-specific''' and generalised, '''Openbox-compatible''' [[GTK]] themes are available to change the look of window decorations and the desktop menu. ''Generalised'' themes are designed to be simultaneously compatible with a range of popular desktop environments and/or window managers, commonly including Openbox. For example, {{AUR|gtk-theme-numix-blue}} supports both Openbox and [[XFCE]].<br />
<br />
=== Configuration ===<br />
<br />
{{Pkg|obconf}} and/or {{Pkg|lxappearance-obconf}} should be used to select and configure available GTK themes. See [[Uniform Look for Qt and GTK Applications]] for information about theming Qt based applications like [[Virtualbox]] or [[Skype]].<br />
<br />
=== Installation: official and AUR ===<br />
<br />
A good selection of {{Pkg|openbox-themes}} are available from the official repositories.<br />
<br />
Both Openbox-specific and Openbox-compatible themes installed from the [[Official_repositories|official repositories]] and/or the [[AUR]] will be automatically installed to the {{ic|/usr/share/themes}} directory. Both will also be immediately available for selection.<br />
<br />
=== Installation: other sources ===<br />
<br />
[http://www.box-look.org/index.php?xcontentmode=7402 box-look.org] is an excellent and well-established source of themes. [http://www.deviantart.com/ deviantART.com] is another excellent resource. Many more can be found through the utilisation of a search engine.<br />
<br />
==== Zip and tar files ====<br />
<br />
Themes downloaded from other sources such as [http://box-look.org/ box-look.org] will usually be compressed in a {{ic|.tar.gz}} or {{ic|.zip}} format. Although [[tar]] will have been installed as part of the base arch installation to extract {{ic|.tar.gz}} files, it will be necessary to install a program such as {{Pkg|unzip}} to extract {{ic|.zip}} files in the terminal. user-friendly GUI archivers are also available; see [[List of applications#Compression_tools]] for further information.<br />
<br />
Extracted theme files should also be placed in the {{ic|/usr/share/themes}} directory. For example, assuming downloaded content is automatically stored in the {{ic|~/Downloads}} folder, to simultaneously extract and move a {{ic|.tar.gz}} theme file, the syntax of the command would be:<br />
<br />
# tar xvf ~/Downloads/<theme file name>.tar.gz -C /usr/share/themes/<br />
<br />
To use {{Pkg|unzip}} in the same scenario for a {{ic|.zip}} theme file, the syntax of the command would be:<br />
<br />
# unzip ~/Downloads/<theme file name>.zip -d /usr/share/themes/<br />
<br />
Alternatively, it is also possible to simply move / copy and paste the extracted files to the {{ic|/usr/share/themes}} directory using an installed file manager as '''root'''.<br />
<br />
=== Troubleshooting ===<br />
<br />
There are two particular problems that may be encountered on rare occasions, especially where downloading themes from unsupported websites. These have been addressed below.<br />
<br />
==== Theme cannot be used ====<br />
<br />
If for any reason the newly extracted theme cannot be selected, open the theme directory to first ensure that it is indeed compatible with Openbox by determining that an {{ic|openbox-3}} directory is present, and that within this directory a {{ic|themerc}} file is also present. An {{ic|.obt}} ('''O'''pen'''B'''ox '''T'''heme) file may also be present in some instances, which can then be manually loaded in {{Pkg|obconf}}.<br />
<br />
Where expected files and directories are present and correct, then on occasion it is possible that the theme author has not correctly set permission to access the file (e.g. permission may still be for the account of the author, rather than for '''root'''). To eliminate this possibility, ensure the folder and file permissions are for '''root''':<br />
<br />
# chown -R root /user/share/themes<br />
<br />
==== Theme looks broken ====<br />
<br />
Of course, the first line of enquiry would be to check that it is not just a badly made, broken theme! Otherwise, ensure that the [[Openbox#GTK+ 2|Openbox GTK fix]] has been implemented, and then re-start the session. Unfortunately some older themes can simply break if not maintained sufficiently to keep pace with the changes incurred by [[GTK]] updates. To avoid such occurrences, it is best to check that desired themes have recently been created or at least updated / patched.<br />
<br />
=== Edit or create new themes ===<br />
<br />
{{Tip|Where deciding to modify an existing theme (e.g. the colour scheme), it would be best to work on a copy of it, rather than the original. This will retain the original should anything go wrong, and ensure that your changes are not over-written through an update.}}<br />
<br />
The process of creating new or modifying existing themes is covered extensively at the official [http://openbox.org/wiki/Help:Themes openbox.org] website. A user-friendly GUI to do so - {{AUR|obtheme}} - is also available from the [[AUR]].<br />
<br />
== Compositing effects ==<br />
<br />
Openbox does not natively provide support for compositing, and it will therefore be necessary to install a compositor for this purpose. The use of compositing enables various desktop visual effects, including transparency, fading, and shadows. Although compositing is not a necessary component, it can help to provide a more pleasant-looking environment, and avoid common issues such as screen distortion when [[Openbox#Oblogout|oblogout]] is used, and visual glitches when terminal window transparency has been enabled. Three of the most common choices are:<br />
<br />
* [[Compton]]: Powerful and reliable, with extensive options<br />
* [[Xcompmgr]]: Older and simpler version of compton<br />
* [[Cairo Compmgr]]: Advanced compositing effects, plugin support, and a user-friendly GUI. Also more buggy and far heavier use of system resources.<br />
<br />
== Mouse cursor and application icon themes ==<br />
<br />
Any mouse cursor and/or application icon theme may be used with Openbox. Numerous themes are available from both the [[official repositories]] and the [[AUR]].<br />
<br />
=== xcursor themes (mouse) === <br />
<br />
{{Tip|Review the [[Xcursor]] article for an in-depth explanation.}}<br />
<br />
Standard xcursor theme packages available from the official repositories include {{Pkg|xcursor-themes}}, {{Pkg|xcursor-bluecurve}}, {{Pkg|xcursor-vanilla-dmz}}, and {{Pkg|xcursor-pinux}}. To search the official repositories for all available xcursor themes, enter the following command:<br />
<br />
$ pacman -Ss xcursor<br />
<br />
Installed x-cursor themes may then be set though using the {{Pkg|obconf}} and {{Pkg|lxappearance-obconf}} GUI applications. It may then be necessary to either log out and back in again to implement the change, or to [[Openbox#Openbox_Reconfiguration|reconfigure Openbox]].<br />
<br />
=== Application icon themes ===<br />
<br />
Standard xcursor theme packages available from the official repositories include the {{Pkg|gnome-icon-theme}} and {{Pkg|lxde-icon-theme}}. A nice icon theme currently available from the AUR is {{AUR|numix-icon-theme-git}}. To search the official repositories for all available icon themes, enter the following command:<br />
<br />
$ pacman -Ss icon-theme<br />
<br />
Again, installed icon themes may then be set though using the {{Pkg|obconf}} and {{Pkg|lxappearance-obconf}} GUI applications. It may then be necessary to either log out and back in again to implement the change, or to [[Openbox#Openbox_Reconfiguration|reconfigure Openbox]].<br />
<br />
== Desktop icons and wallpapers ==<br />
<br />
Openbox does not natively support the use of desktop icons or wallpapers. As a consequence, it will be necessary to install additional applications for this purpose, where desired.<br />
<br />
=== Desktop management using file managers ===<br />
<br />
Some file managers have the capacity to fully '''manage the desktop''', meaning that they may be used to provide wallpapers and enable the use of icons on the desktop. The [[LXDE]] desktop environment itself uses PCManFM for this purpose.<br />
<br />
* [[PCManFM]]: See the [[PCManFM#Desktop_management|PCManFM desktop management]] article.<br />
* [[SpaceFM]]: See the [[SpaceFM#Desktop_management|SpaceFM desktop management]] article.<br />
<br />
=== Wallpaper / background programs ===<br />
<br />
{{Tip|The wallpaper programs listed here will have many more options than shown in this brief overview, including the ability to use solid colours for backgrounds. Review their documentation and man pages for more information.}}<br />
<br />
There are numerous packages available to set desktop backgrounds in Openbox, each of which will need to be autostarted in the {{ic|~/.config/openbox/autostart}} file. A few of the most well known have been listed.<br />
<br />
==== nitrogen ====<br />
<br />
{{Tip|If nitrogen does not show in the desktop menu, then it can be manually added.}}<br />
<br />
[[nitrogen]] is a user-friendly choice, as it also provides a GUI window to browse and set installed images. To access the GUI, enter the following command in a terminal:<br />
<br />
$ nitrogen<br />
<br />
To use nitrogen as the background provider, add the following command to the {{ic|~/.config/openbox/autostart}} file so that it will restore the last set wallpaper:<br />
<br />
nitrogen --restore &<br />
<br />
==== feh ====<br />
<br />
[[Feh]] is a popular image viewer that may also be used to set wallpapers. In this instance, it will be necessary to add the full directory path and name of the image to be used as the wallpaper. To use Feh as the background provider, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
feh --bg-scale ''/path/to/image.file'' &<br />
<br />
==== hsetroot ====<br />
<br />
{{Pkg|hsetroot}} is a command-line tool specifically designed to set wallpapers. As with Feh, it will be necessary to add the full directory path and name of the image to be used as the wallpaper. To use HSetRoot as the background provider, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
hsetroot -fill ''/path/to/image.file'' &<br />
<br />
==== xsetroot ====<br />
<br />
{{ic|xsetroot}} is installed as part of the [[Xorg]] X-Windows system, and may be used to set simple background colours. For example, to use XSetRoot to set a black background, the following would be added to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
xsetroot -solid "#000000" &<br />
<br />
=== Icon programs ===<br />
<br />
While there are programs dedicated to enabling desktop icons alone, it would seem that they have greater drawbacks than the utilisation of file managers for the task. These programs are discussed briefly, below.<br />
<br />
==== idesk ====<br />
<br />
[[idesk]] is a simple program that can enable icons in addition to managing wallpaper. It will be necessary to create an {{ic|~/.idesktop}} directory, and desktop icons must also be manually created. To use idesk to provide icons, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
idesk &<br />
<br />
==== xfdesktop ====<br />
<br />
{{Pkg|xfdesktop}} is the desktop manager for [[XFCE]]. The [[Thunar]] file manager will also be downloaded as a dependency. Where this is used, the Openbox desktop menu will no longer be accessible by right-clicking the background. <br />
<br />
As such, it will consequently be necessary to access it by other means, such as by [[Openbox#Desktop_Menu|creating a keybind]], and/or by - where permitted - re-configuring an installed panel to use the [[Openbox#Desktop_menu_as_a_panel_menu|desktop menu as a panel menu]]. To use xfdesktop to provide icons, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
xfdesktop &<br />
<br />
=== conky reconfiguration ===<br />
<br />
Particularly where using a file manager to manage the desktop, it will be necessary to edit {{ic|~/.conkyrc}} to change the {{ic|own_window_type}} command in order for [[conky]] to continue to be displayed (where used). The revised command that should be used is:<br />
<br />
own_window_type normal<br />
<br />
== File managers ==<br />
<br />
Multiple [[List of applications#File managers|file managers]] may be used with Openbox, including [[PCManFM]], [[SpaceFM]], [[Thunar]], {{Pkg|xfe}}, and {{Pkg|qtfm}}. Thunar is the native file manager for [[Xfce]], and if installing be aware that some Xfce-related dependencies will also be installed, including {{Pkg|exo}} (set default applications) and '''xfce4-about''' (provide information about the Xfce deskop environment). The menu entries for these may consequently have to be hidden.<br />
<br />
A file manager alone will not provide the same features and functionality as provided by default in full desktop environments like [[Xfce]] and [[KDE]]. For example, it may not be initially possible to view or access other partitions or access removable media. See [[File manager functionality]] for further information.<br />
<br />
== oblogout ==<br />
<br />
See the [[Oblogout]] article for an overview on how to use this useful, graphical logout script.<br />
<br />
== Openbox for multihead users ==<br />
<br />
While Openbox provides better than average multihead support on its own, the {{AUR|openbox-multihead-git}} package from the [[AUR]] provides a development branch called '''Openbox Multihead''' that gives multihead users per-monitor desktops. This model is not commonly found in floating window managers, but exists mainly in tiling window managers. It is explained well on the [http://xmonad.org/tour.html#workspace Xmonad web site]. Also, please see [https://github.com/BurntSushi/openbox-multihead/blob/multihead/README.MULTIHEAD README.MULTIHEAD] for a more comprehensive description of the new features and configuration options found in Openbox Multihead.<br />
<br />
Openbox Multihead will function like normal Openbox when only a single head is available.<br />
<br />
A downside to using Openbox Multihead is that it breaks the EWMH assumption that one and only one desktop is visible at any time. Thus, existing pagers will not work well with it. To remedy this, {{AUR|pager-multihead-git}} can be found in the [[AUR]] and is compatible with Openbox Multihead. [http://imgur.com/a/cnZeq#y04nk Screenshots].<br />
<br />
Finally, a new version of [[PyTyle]] that will work with Openbox Multihead can also be found in the [[AUR]]: {{AUR|pytyle3-git}}.<br />
<br />
Both ''pytyle3'' and ''pager-multihead-git'' will work without Openbox Multihead if only one monitor is active.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Packages for beginners ===<br />
<br />
{{Tip|See the [[List of applications]] article for many more possibilities.}}<br />
<br />
The packages listed below have been listed to aid newer users:<br />
<br />
* Display Manager: [[LXDM]] or [[LightDM]]<br />
* Audio: [[ALSA]]<br />
* Volume: {{Pkg|volumeicon}} or {{AUR|pnmixer}} with {{Pkg|gnome-alsamixer}}<br />
* Network: [[Network manager]] with {{Pkg|network-manager-applet}}<br />
* Panel: [[Tint2]] or [[Tint2#Application_Launchers_in_tint2-svn_.28AUR.29|Tint2-svn]]<br />
* Background: [[Nitrogen]] or [[Feh]]<br />
* Menu: [[Openbox#obmenu-generator|OBMenu-Generator]]<br />
* Compositor: [[Compton]]<br />
* Desktp Notifications: {{Pkg|xfce4-notifyd}}<br />
* Logout script: [[Oblogout]]<br />
* File Manager: [[PCManFM]], [[SpaceFM]], or [[Thunar]]<br />
* Clipboard Manager: {{Pkg|parcellite}}<br />
* Configuration GUIs: {{Pkg|obconf}}, {{Pkg|lxappearance-obconf}}, {{Pkg|lxrandr}}, {{Pkg|lxinput}}, {{AUR|tintwizard}} or {{AUR|tintwizard-svn}}<br />
<br />
=== Switch desktops using the mouse ===<br />
<br />
It is possible to switch desktop by moving the mouse cursor to the edges of the screen. First install {{Pkg|xdotool}} and add the following two lines to your {{ic|~/.xinitrc}}:<br />
<br />
xdotool behave_screen_edge --delay 500 left set_desktop --relative -- -1 &<br />
xdotool behave_screen_edge --delay 500 right set_desktop --relative -- +1 &<br />
<br />
=== Set default applications / file associations ===<br />
<br />
See the [[Default applications]] article.<br />
<br />
=== Stop continous mouse wheel desktop switching ===<br />
<br />
By default Openbox switches from the last desktop back to the first desktop on mouse wheel scroll. Use {{ic|<wrap>no</wrap>}} in the {{ic|mousebind}} section to disable this behaviour.<br />
<br />
<context name="Desktop"><br />
<mousebind button="Up" action="Click"><br />
<action name="GoToDesktop"><br />
<to>previous</to><br />
<wrap>no</wrap><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name="GoToDesktop"><br />
<to>next</to><br />
<wrap>no</wrap><br />
</action><br />
</mousebind><br />
</context><br />
<br />
=== Terminal content copy and paste ===<br />
<br />
Within a terminal, either:<br />
<br />
* {{ic|Ctrl+Ins}} will copy and {{ic|Shift+Ins}} will paste. <br />
* {{ic|Ctrl+Shift+c}} will copy and '''mouse middle-click''' will paste.<br />
<br />
=== Ad-hoc window transparency ===<br />
<br />
{{Warning|This may not work where other actions are defined within the action group.}}<br />
The program {{Pkg|transset-df}} is available in the official repositories, and can enable window transparency on-the-fly.<br />
<br />
For example, using the following code in the {{ic|<mouse>}} section of the {{ic|~/.config/openbox/rc.xml}} file will enable control of application window transparency by hovering the mouse-pointer over the title bar and scrolling with the middle button:<br />
<br />
<context name="Titlebar"><br />
...<br />
<mousebind button="Up" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --inc </execute><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --dec </execute><br />
</action><br />
</mousebind><br />
...<br />
</context><br />
<br />
=== Using obxprop for faster configuration ===<br />
<br />
{{Pkg|openbox}} package provides a {{ic|obxprop}} binary that can parse relevant values for applications settings in {{ic|rc.xml}}. Officially {{ic|<nowiki>obxprop | grep "^_OB_APP"</nowiki>}} is recommended for this task. Doing so for multiple applications and its windows can be very inefficient however. The following script {{ic|obxprop2obrc}} makes it much easier to configure even a large number of applications.<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
##Script: obxprop-to-openbox-rc.sh<br />
##Recommended executable name: obxprop2obrc<br />
<br />
while [ $# -ne 0 ]; do<br />
case $1 in<br />
-f*)<br />
shift;<br />
FILE="$1";<br />
shift;<br />
;;<br />
-t*)<br />
shift;<br />
TIME="$1";<br />
shift;<br />
;;<br />
*)<br />
echo Usage: $0 [-f FILE_TEMPLATE] [-t WAIT_TO_KILL_TIME] <br />
exit 1;<br />
;;<br />
esac<br />
done<br />
<br />
if [ $TIME ]; then<br />
OBXPROPS=( $(obxprop | cat & (sleep $TIME && pkill -13 cat) | awk -F \" '/_OB_APP/{ print "\x22"$2"\x22" }' ) );<br />
else<br />
OBXPROPS=( $(obxprop | awk -F \" '/_OB_APP/{ print "\x22"$2"\x22" }' ) );<br />
fi<br />
OBPROPS=(TYPE TITLE GROUP_CLASS GROUP_NAME CLASS NAME ROLE);<br />
j=0;<br />
for i in $( seq 2 2 14 ); do<br />
OBPROP="$( echo ${OBXPROPS[@]} | awk -F \" '{ print $'$i'}' )";<br />
if [[ -z $OBPROP ]]; then <br />
declare ${OBPROPS[$j]}='"*"';<br />
else <br />
declare ${OBPROPS[$j]}="\"$OBPROP\"";<br />
fi<br />
j=$(($j+1));<br />
done;<br />
<br />
echo " <application type="$TYPE" title="$TITLE" class="$CLASS" name="$NAME" role="$ROLE">"<br />
if [ -f "$FILE" ]; then cat "$FILE" && exit; fi<br />
cat << EOF<br />
<desktop>1</desktop><br />
<desktop>all</desktop><br />
<decor>yes</decor><br />
<decor>no</decor><br />
<focus>yes</focus><br />
<focus>no</focus><br />
<fullscreen>yes</fullscreen><br />
<fullscreen>no</fullscreen><br />
<iconic>yes</iconic><br />
<iconic>no</iconic><br />
<maximized>yes</maximized><br />
<maximized>no</maximized><br />
<maximized>both</maximized><br />
<maximized>horizontal</maximized><br />
<maximized>vertical</maximized><br />
<monitor>0</monitor><br />
<monitor>1</monitor><br />
<position force="no"><br />
<position force="yes"><br />
<width>40%</width><br />
<height>30%</height><br />
<x>-1</x><br />
<y>-1</y><br />
<x>center</x><br />
<y>center</y><br />
</position><br />
<layer>above</layer><br />
<layer>normal</layer><br />
<layer>below</layer><br />
<shade>yes</shade><br />
<shade>no</shade><br />
<skip_pager>yes</skip_pager><br />
<skip_pager>no</skip_pager><br />
<skip_taskbar>yes</skip_taskbar><br />
<skip_taskbar>no</skip_taskbar><br />
</application><br />
EOF<br />
</nowiki>}}<br />
<br />
If no further options are used default configuration, that can be edited by deleting unnecessary lines, is printed out. This script can use templates with default values when using {{ic|-f}} switch:<br />
{{hc|<br />
$ obxprop2obrc -f templates-rc-inkscape-dialogs.sc > part-rc-applications-inkscape.xml<br />
$ cat part-rc-applications-inkscape.xml|<nowiki><br />
<application type="normal" title="Align and Distribute (Shift+Ctrl+A)" class="Inkscape" name="inkscape" role="*"><br />
<desktop>3</desktop><br />
<decor>yes</decor><br />
<maximized>no</maximized><br />
<position force="yes"><br />
<width>20%</width><br />
<height>30%</height><br />
<x>-1</x><br />
<y>-1</y><br />
</position><br />
<layer>normal</layer><br />
<shade>yes</shade><br />
</application><br />
</nowiki>}}<br />
<br />
It also has a time switch {{ic|-t}} which kills obxprop and thus can reduce time significantly in certain situations, although it may not work perfectly.<br />
<br />
=== Xprop values for applications ===<br />
<br />
{{Pkg|xorg-xprop}} is available in the official repositories, and can be used to relay property values for selected applications. Where frequently using per-application settings, the following [[Bash#Aliases|Bash Alias]] may be useful:<br />
dy:<br />
<br />
alias xp='xprop | grep "WM_WINDOW_ROLE\|WM_CLASS" && echo "WM_CLASS(STRING) = \"NAME\", \"CLASS\""'<br />
<br />
To use Xorg-XProp, run using the alias given {{ic|xp}}, and click on the active program desired to define with per-application settins. The results displayed will only be the information that Openbox itself requires, namely the {{ic|WM_WINDOW_ROLE}} and {{ic|WM_CLASS}} (name and class) values:<br />
<br />
WM_WINDOW_ROLE(STRING) = "roster"<br />
WM_CLASS(STRING) = "gajim.py", "Gajim.py"<br />
WM_CLASS(STRING) = "NAME", "CLASS"<br />
<br />
==== Firefox ====<br />
<br />
For whatever reason, Firefox and like-minded equivalents ignore application rules (e.g. ''<desktop>'') unless {{ic|class&#61;"Firefox*"}} is used. This applies irrespective of whatever values '''xprop''' may report for the program's {{ic|WM_CLASS}}.<br />
<br />
=== Switching between keyboard layouts ===<br />
<br />
See the article section [[Keyboard configuration in Xorg#Switching between keyboard layouts|switching between keyboard layouts]] for instructions.<br />
<br />
=== Set grid layout for virtual desktops ===<br />
<br />
Install {{AUR|obsetlayout}}. To set a 2x2 grid for example:<br />
<br />
obsetlayout 0 2 2 0<br />
<br />
Run it without arguments to know what the arguments mean.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Windows load behind the active window ===<br />
<br />
Some application windows (such as Firefox windows) may load behind the currently active window, causing you to need to switch to the window you just created to focus it. To fix this behavior add this to your {{ic|~/.config/openbox/rc.xml}} file, inbetween the {{ic|1=<openbox_config>}} and {{ic|1=</openbox_config>}} tags:<br />
<br />
{{bc|1=<br />
<applications><br />
<application class="*"><br />
<focus>yes</focus><br />
</application><br />
</applications><br />
}}<br />
<br />
== See also ==<br />
<br />
* [http://openbox.org/ Openbox Website] - Official website<br />
* [http://planetob.openmonkey.com/ Planet Openbox] - Openbox news portal<br />
* [http://www.box-look.org/ Box-Look.org] - A good resource for themes and related artwork<br />
* [https://bbs.archlinux.org/viewtopic.php?id=93126 Openbox Hacks and Configs Thread] @ Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=45692 Openbox Screenshots Thread] @ Arch Linux Forums<br />
* [http://urukrama.wordpress.com/openbox-guide/ An Openbox guide]</div>Mid-kidhttps://wiki.archlinux.org/index.php?title=List_of_applications/Internet&diff=271176List of applications/Internet2013-08-14T16:12:54Z<p>Mid-kid: </p>
<hr />
<div><noinclude><br />
[[Category:Internet Applications]]<br />
[[cs:List of Applications/Internet]]<br />
[[it:List of Applications/Internet]]<br />
[[ja:List of Applications/Internet]]<br />
[[zh-CN:List of Applications/Internet]]<br />
{{List of Applications navigation}}<br />
</noinclude><br />
<br />
== Internet ==<br />
<br />
{{Note|1=For possibly more up to date selection of applications, try checking the [https://aur.archlinux.org/packages.php?O=0&K=&do_Search=Go&detail=1&C=13&SeB=nd&SB=n&SO=a&PP=50 AUR 'network' category]}}<br />
<br />
=== BitTorrent Clients ===<br />
<br />
{{Wikipedia|Comparison of BitTorrent clients}}<br />
<br />
==== Console ====<br />
<br />
* {{App|[[aria2]]|Lightweight download utility that supports simultaneous adaptive downloading via HTTP(S), FTP, BitTorrent (DHT, PEX, MSE/PE) protocols and Metalink. It can run as a daemon controlled via a built-in JSON-RPC or XML-RPC interface.|http://aria2.sourceforge.net/|{{Pkg|aria2}}}}<br />
* {{App|[[Deluge]]|User-friendly BitTorrent client written in PyGTK that can run as a daemon.|http://deluge-torrent.org/|{{Pkg|deluge}}}}<br />
* {{App|[[Wikipedia:MLDonkey|MLDonkey]]|Multi-protocol P2P client that supports BitTorrent, HTTP, FTP, eDonkey and Direct Connect.|http://mldonkey.sourceforge.net/|{{AUR|mldonkey}}}}<br />
* {{App|[[rTorrent]]|Simple and lightweight ncurses BitTorrent client.|http://libtorrent.rakshasa.no/|{{Pkg|rtorrent}}}}<br />
* {{App|[[Transmission]]|Simple and easy-to-use BitTorrent client with a daemon version, GTK+, Qt GUI, web and CLI front-ends.|http://transmissionbt.com/|{{Pkg|transmission-cli}}}} {{Pkg|transmission-remote-cli}} {{AUR|transmission-remote-gtk}} (remote clients work with the daemon in the -cli package)<br />
<br />
==== Graphical ====<br />
<br />
* {{App|[[Wikipedia:KGet|KGet]]|Download manager for KDE that supports HTTP(S), FTP and BitTorrent. Part of {{Grp|kdenetwork}}.|http://www.kde.org/applications/internet/kget/|{{Pkg|kdenetwork-kget}}}}<br />
* {{App|[[Wikipedia:KTorrent|KTorrent]]|Feature-rich BitTorrent client for KDE|http://ktorrent.org/|{{Pkg|ktorrent}}}}<br />
* {{App|[[Wikipedia:qBittorrent|qBittorrent]]|Open source (GPLv2) BitTorrent client that strongly resembles µtorrent.|http://qbittorrent.sourceforge.net/|{{AUR|qbittorrent}}}}<br />
* {{App|QTorrent|BitTorrent client written in PyQt.|http://thegraveyard.org/qtorrent.php{{Linkrot|2012|09|20}}|{{Pkg|qtorrent}}}}<br />
* {{App|[[Transmission]]|Simple and easy-to-use BitTorrent client with daemon version, GTK+, Qt GUI, web and CLI front-ends.|http://transmissionbt.com/|{{Pkg|transmission-gtk}} {{Pkg|transmission-qt}}}}<br />
* {{App|[[Wikipedia:Tribler|Tribler]]|4th generation file sharing system bittorrent client.|http://www.tribler.org|{{AUR|tribler}}}}<br />
* {{App|[[Wikipedia:Vuze|Vuze]]|Feature-rich BitTorrent client written in Java (formerly Azureus).|https://www.vuze.com/|{{AUR|vuze}}}}<br />
<br />
=== eDonkey Clients ===<br />
<br />
eDonkey is still the second-largest p2p network (see [http://ipoque.com/en/resources/internet-studies Internet Study 2008/2009]).<br />
{{Wikipedia|Comparison of eDonkey software}}<br />
<br />
* {{App|[[aMule]]|Well-known eDonkey/Kad client with a daemon version and GTK+, web, and CLI front-ends.|http://www.amule.org/|{{Pkg|amule}}}}<br />
* {{App|KaMule|KDE graphical front-end for aMule.|http://kde-apps.org/content/show.php?content&#61;150270|{{AUR|kamule}}}}<br />
<br />
=== eMoney ===<br />
<br />
{{Stub}}<br />
<br />
==== Bitcoin ====<br />
<br />
{{Box||See the main article: [[Bitcoin]]|#E5E5FF|#FCFCFC}}<br />
<br />
* {{App|Armory|Bitcoin client with with features such as support for multiple wallets, importing keys and backups.|https://github.com/etotheipi/BitcoinArmory|{{AUR|armory-git}}}}<br />
* {{App|[[Bitcoin]]|Official tool to manage Bitcoins, a P2P currency.|http://bitcoin.org/|{{Pkg|bitcoin-daemon}} {{Pkg|bitcoin-qt}}}}<br />
* {{App|Electrum|An easy to use Bitcoin client.|http://electrum.org/|{{AUR|electrum}}}}<br />
<br />
=== Chat Clients ===<br />
<br />
{{Wikipedia|Comparison of instant messaging clients}}<br />
<br />
==== Multi-Protocol Clients ====<br />
<br />
{{Wikipedia|Comparison of instant messaging clients#Multiprotocol clients}}<br />
<br />
{{Box||All messengers, that support several networks by means of direct connections to them, belong to this section.|#E5E5FF|#FCFCFC}}<br />
<br />
Many clients listed here (including Pidgin and all it's forks) support multiple IM networks via [[Wikipedia:libpurple|libpurple]]. The number of networks supported by these clients is very large but they (like any multiprotocol clients) usually have very limited or no support for network-specific features.<br />
<br />
===== Console =====<br />
<br />
* {{App|BarnOwl|Ncurses-based chat client with support for the Zephyr, AIM, Jabber, IRC, and Twitter protocols.|http://barnowl.mit.edu/|{{AUR|barnowl}}}}<br />
* {{App|[[Bitlbee]]|IRC client that provides a gateway to popular chat networks (XMPP, MSN, Yahoo, AIM, ICQ and Twitter).|http://bitlbee.org/|{{Pkg|bitlbee}}}}<br />
* {{App|[[Wikipedia:Centericq|CenterIM]]|Fork of CenterICQ, a text mode menu- and window-driven IM interface.|http://centerim.org/|{{Pkg|centerim}}}}<br />
* {{App|[[Pidgin|Finch]]|Ncurses-based chat client that uses libpurple and supports all its protocols.|http://developer.pidgin.im/wiki/Using%20Finch|{{Pkg|finch}}}}<br />
* {{App|[[Wikipedia:naim (software)|naim]]|Ncurses chat client with support for AOL, ICQ, IRC and the Lily CMC.|http://naim.n.ml.org/|{{Pkg|naim}}}}<br />
* {{App|pork|Programmable, ncurses-based AIM and IRC client that mostly looks and feels like ircII.|http://dev.ojnk.net/|{{Pkg|pork}}}}<br />
<br />
===== Graphical =====<br />
<br />
* {{App|Carrier|Pidgin fork providing minor GUI enhancements (formerly FunPidgin).|http://funpidgin.sourceforge.net/|{{AUR|carrier}}}}<br />
* {{App|[[Wikipedia:Emesene|Emesene]]|PyGTK instant messenger for the Windows Live Messenger network, also compatible with Jabber, Facebook and Google Talk.|http://emesene.org/|{{Pkg|emesene}}}}<br />
* {{App|[[Wikipedia:Empathy (software)|Empathy]]|GNOME instant messaging client using the [[Wikipedia:Telepathy (software)|Telepathy]] framework.|http://live.gnome.org/Empathy|{{Pkg|empathy}}}}<br />
* {{App|Galaxium Messenger|Messenger application designed for the GNOME desktop.|https://code.google.com/p/galaxium/|{{AUR|galaxium}}}}<br />
* {{App|[[Wikipedia:Instantbird|Instantbird]]|Multi-protocol chat client using Mozilla's XUL and libpurple.|http://instantbird.com/|{{AUR|instantbird}}}}<br />
* {{App|[[Wikipedia:Kopete|Kopete]]|User-friendly IM supporting AIM, ICQ, Windows Live Messenger, Yahoo, Jabber, Gadu-Gadu, Novell GroupWise Messenger, and other IM networks. Part of {{Grp|kdenetwork}}.|http://kopete.kde.org/|{{Pkg|kdenetwork-kopete}}}}<br />
* {{App|[[Kde#KDE_Telepathy|KDE Telepathy]]|KDE instant messaging client using the [[Wikipedia:Telepathy (software)|Telepathy]] framework. Meant as a replacement for Kopete.|http://community.kde.org/Real-Time_Communication_and_Collaboration/|{{Pkg|kde-telepathy-meta}}}}<br />
* {{App|Licq|Instant messaging client for UNIX supporting multiple protocols (currently ICQ, MSN and Jabber).|http://www.licq.org|{{Pkg|licq}}}}<br />
* {{App|[[Pidgin]]|Multi-protocol instant messaging client.|http://pidgin.im/|{{Pkg|pidgin}}}}<br />
* {{App|Pidgin Light|Light Pidgin version without GStreamer, Tcl/Tk or XScreenSaver support.|http://pidgin.im/|{{AUR|pidgin-light}}}}<br />
* {{App|qutIM|Simple and user-friendly IM supporting ICQ, Jabber, Mail.Ru, IRC and VKontakte messaging.|http://qutim.org/|{{AUR|qutim-stable}}}}<br />
<br />
==== Jabber/XMPP Clients ====<br />
<br />
{{Wikipedia|Comparison of instant messaging clients#XMPP clients}}<br />
<br />
===== Console =====<br />
<br />
* {{App|Freetalk|Console-based Jabber client.|https://gnu.org/s/freetalk/|{{Pkg|freetalk}}}}<br />
* {{App|jabber.el|Minimal Jabber client for [[Emacs]].|http://emacs-jabber.sourceforge.net/|{{AUR|emacs-jabber}}}}<br />
* {{App|[[Wikipedia:MCabber|MCabber]]|Small Jabber console client, includes features: SSL, PGP, MUC, OTR, and UTF8.|http://mcabber.com/|{{Pkg|mcabber}}}}<br />
* {{App|Profanity|A console based Jabber client inspired by Irssi.|http://www.profanity.im/|{{AUR|profanity}} {{AUR|profanity-git}}}}<br />
<br />
===== Graphical =====<br />
<br />
* {{App|[[Wikipedia:Gajim|Gajim]]|Jabber client written in PyGTK.|https://gajim.org/|{{Pkg|gajim}}}}<br />
* {{App|Jabbim|Jabber client written in PyQt.|http://www.jabbim.com/|{{AUR|jabbim-svn}}}}<br />
* {{App|[[Wikipedia:Psi (instant messaging client)|Psi]]|Qt-based Jabber client.|http://psi-im.org/|{{Pkg|psi}}}}<br />
* {{App|Psi+|Enhanced version of the Psi Jabber client with many new [http://psi-plus.com/wiki/en:features#differences_between_psi_beta_version_and_the_official_psi_015-dev_version features].|https://code.google.com/p/psi-dev/|{{AUR|psi-plus}}}}<br />
* {{App|[[Wikipedia:Tkabber|Tkabber]]|Easy to hack feature-rich XMPP client by the author of the ejabberd XMPP server.|http://tkabber.jabber.ru/|{{Pkg|tkabber}}}}<br />
<br />
==== MSN clients ====<br />
<br />
{{Note|Consider that MSN protocol will be shut down soon}}<br />
* {{App|[[Wikipedia:AMSN|aMSN]]|MSN client written in Tcl/Tk with webcam and conferencing support.|http://amsn-project.net/|{{Pkg|amsn}}}}<br />
* {{App|[[Wikipedia:Emesene|Emesene]]|PyGTK MSN Messenger client.|http://blog.emesene.org/|{{Pkg|emesene}}}}<br />
* {{App|[[Wikipedia:Kmess|KMess]]|MSN Messenger client for Linux with support for custom emoticons, nudges, winks, file transfers and many others.|http://kmess.org/|{{Pkg|kmess}}}}<br />
<br />
==== IRC Clients ====<br />
<br />
{{Wikipedia|Comparison of Internet Relay Chat clients}}<br />
<br />
===== Console =====<br />
<br />
* {{App|[[Wikipedia:BitchX|BitchX]]|Console-based IRC client developed from the popular [[Wikipedia:ircII|ircII]].|http://www.bitchx.org/|{{AUR|bitchx-svn}}}}<br />
* {{App|ERC|Powerful, modular, and extensible IRC client for [[Emacs]].|http://savannah.gnu.org/projects/erc/|{{AUR|erc-git}}}}<br />
* {{App|[[Wikipedia:Ii (IRC client)|ii]]|Featherweight IRC client, literally {{ic|tail -f}} the conversation and {{ic|echo}} back your replies to a file.|http://tools.suckless.org/ii|{{AUR|ii}}}}<br />
* {{App|Ircfs|File system interface to IRC written in [http://limbo.cat-v.org Limbo].|http://www.ueber.net/code/r/ircfs|{{AUR?|ircfs}}}}<br />
* {{App|[[Irssi]]|Highly-configurable ncurses-based IRC client.|http://irssi.org/|{{Pkg|irssi}}}}<br />
* {{App|ScrollZ|Advanced IRC client based on [[Wikipedia:ircII|ircII]].|http://www.scrollz.com/|{{AUR|scrollz}}}}<br />
* {{App|sic|Extremely simple IRC client, similar to [[Wikipedia:Ii (IRC client)|ii]].|http://tools.suckless.org/sic|{{AUR|sic}}}}<br />
* {{App|[[Wikipedia:WeeChat|WeeChat]]|Modular, lightweight ncurses-based IRC client.|http://weechat.org/|{{Pkg|weechat}}}}<br />
<br />
===== Graphical =====<br />
<br />
* {{App|HexChat|Fork of XChat for Linux and Windows.|http://hexchat.github.io/|{{Pkg|hexchat}}}}<br />
* {{App|[[Wikipedia:Konversation|Konversation]]|Qt-based IRC client for the KDE desktop.|http://konversation.kde.org/|{{Pkg|konversation}}}}<br />
* {{App|[[Wikipedia:KVIrc|KVIrc]]|Qt-based IRC client featuring extensive themes support.|http://kvirc.net/|{{Pkg|kvirc}}}}<br />
* {{App|Loqui|GTK+ IRC client with only one dependency: [https://live.gnome.org/GNetLibrary GNet].|https://launchpad.net/loqui|{{AUR|loqui}}}}<br />
* {{App|LostIRC|Simple GTK+ IRC client with tab-autocompletion, multiple server support, logging and others.|http://lostirc.sourceforge.net|{{AUR|lostirc}}}}<br />
* {{App|pcw|Frontend for [http://tools.suckless.org/ii ii] that opens a new terminal for each channel.|https://bitbucket.org/emg/pcw|{{AUR|pcw-hg}}}}<br />
* {{App|[[Wikipedia:Quassel IRC|Quassel]]|Modern, cross-platform, distributed IRC client.|http://quassel-irc.org/|{{Pkg|quassel-core}} {{Pkg|quassel-client}}}}<br />
* {{App|[[Wikipedia:Smuxi|Smuxi]]|Cross-platform IRC client for the GNOME desktop inspired by [[Irssi]].|http://smuxi.org/|{{Pkg|smuxi}}}}<br />
* {{App|[[Wikipedia:XChat|XChat]]|GTK-based IRC client that works on both Linux and Windows.|http://xchat.org/|{{Pkg|xchat}}}}<br />
<br />
=== Softphone ===<br />
<br />
{{Wikipedia|Comparison of VoIP software}}<br />
{{Wikipedia|List of SIP software}}<br />
<br />
==== Clients ====<br />
<br />
* {{App|[[Wikipedia:Blink (software)|Blink]]|State of the art, easy to use SIP client.|http://www.icanblink.com/|{{AUR|blink-darcs}}}}<br />
* {{App|[[Wikipedia:Ekiga|Ekiga]]|VoIP and video conferencing application with full SIP and H.323 support (formerly known as GNOME Meeting).|http://www.ekiga.org/|{{Pkg|ekiga}}}}<br />
* {{App|[[Wikipedia:Empathy (software)|Empathy]]|GNOME instant messenger client using the Telepathy framework with SIP support (using the Sofia-SIP library).|https://live.gnome.org/Empathy|{{Pkg|empathy}}}}<br />
* {{App|iaxComm|Open source softphone for the Asterisk PBX (using the IAX protocol).|http://iaxclient.sourceforge.net/iaxcomm/|{{AUR?|iaxcomm}}}}<br />
* {{App|[[Wikipedia:Jitsi|Jitsi]]|Audio/video SIP VoIP phone and instant messenger written in Java (formerly SIP-Communicator).|https://jitsi.org/|{{AUR|jitsi}}}}<br />
* {{App|Kiax|Qt-based IAX/2 Softphone.|http://www.forschung-direkt.eu/projects/kiax2/|{{AUR|kiax}}}}<br />
* {{App|[[Wikipedia:KPhone|KPhone]]|Qt SIP User Agent with voice, video and text messaging support.|http://sourceforge.net/projects/kphone/|{{AUR?|kphone}}}}<br />
* {{App|[[Wikipedia:Linphone|Linphone]]|VoIP phone application that allows you to to communicate freely with people over the internet, with voice, video, and text instant messaging.|http://www.linphone.org/|{{Pkg|linphone}}}}<br />
* {{App|Minisip|SIP User Agent with focus on security (supports TLS, end-to-end security, SRTP, MIKEY (DH, PSK, PKE)).|http://www.minisip.org/|{{AUR?|minisip}}}}<br />
* {{App|[[Wikipedia:Mumble (software)|Mumble]]|Voice chat application similar to TeamSpeak.|http://mumble.sourceforge.net/|{{pkg|mumble}}}}<br />
* {{App|[[Wikipedia:Psi (instant messaging client)|Psi]]|Qt-based Jabber client which supports video conferencing (since version 0.13).|http://psi-im.org/|{{Pkg|psi}} {{AUR|psi-plus}}}}<br />
* {{App|[[Wikipedia:QuteCom|QuteCom]]|Softphone which allows you to make free PC to PC video and voice calls, and to integrate all your IM contacts in one place (formerly Wengo Phone).|http://trac.qutecom.org/|{{AUR|qutecom}}}}<br />
* {{App|[[Wikipedia:SFLphone|SFLPhone]]|Open-source SIP/IAX2 compatible softphone with PulseAudio support.|http://sflphone.org/|{{AUR|sflphone}}}}<br />
* {{App|[[Skype]]|Popular P2P application for high-quality voice communication.|http://www.skype.com/|{{Pkg|skype}}}}<br />
* {{App|[[TeamSpeak]]|Proprietary VoIP application with gamers as its target audience.|http://www.teamspeak.com/|{{Pkg|teamspeak3}}}}<br />
* {{App|[[Wikipedia:Twinkle (software)|Twinkle]]|Qt softphone for VoIP and IM communication using SIP.|http://www.twinklephone.com/|{{AUR|twinkle}}}}<br />
* {{App|[[Wikipedia:X-Lite|X-Lite]]|Proprietary freeware VoIP soft phone that uses SIP.|http://www.counterpath.net/x-lite|{{AUR|xlite_bin}}}}<br />
* {{App|[[Wikipedia:Zfone|Zfone]]|Softphone application for secure voice communication over the Internet (VoIP), using the ZRTP protocol.|http://zfoneproject.com/|{{AUR|zfone}}}}<br />
<br />
==== Utilities ====<br />
<br />
* {{App|Gladstone|Educational ITU-T G.729 compliant codec with a GStreamer plugin.|http://code.google.com/p/gladstone/|{{AUR|gladstone-drizztbsd-git}}}}<br />
* {{App|SIPp|Open source test tool and traffic generator for the SIP protocol.|http://sipp.sourceforge.net/|{{AUR|sipp}}}}<br />
* {{App|Sipsak|Small command-line tool for developers and administrators of SIP applications.|http://sipsak.org/|{{AUR|sipsak}}}}<br />
<br />
=== Pastebin clients ===<br />
<br />
{{wikipedia|Pastebin}}<br />
Pastebin services are often used to paste information into [[IRC_Channel|IRC channels]] to help with troubleshooting. There are services for both text (e.g. [http://sprunge.us/ sprunge.org], [http://pastie.org/ pastie.org], [http://codepad.org/ codepad.org]) and images (e.g. [http://imgur.com/ imgur.com], [http://picpaste.com/ picpaste.com]). Pastebin clients allow you to post directy from the cli without using a web browser.<br />
<br />
{{Tip|The sprunge pastebin can be accessed directly via curl: {{bc|<nowiki><command> | curl -F 'sprunge=<-' http://sprunge.us</nowiki>}}<br />
There is also a [https://github.com/robbyrussell/oh-my-zsh/wiki/Usage-of-the-%22sprunge%22-command sprunge plugin] for [https://github.com/robbyrussell/oh-my-zsh/wiki oh-my-zsh] (a configuration tool for the [[Zsh]] command shell).}}<br />
<br />
{{Warning|Do not use [http://pastebin.com/ pastebin.com]. It appears to be the most popular site but it is slow, full of adverts, formats the text badly (it will mess up your code) and many people can not even open the site due to aggressive spam filters.}}<br />
<br />
* {{App|Curlpaste|Utility to post text files to a number of pastebin sites using curl and Lua. Servers: [http://pastebin.ca/ pastebin.ca], [http://codepad.org/ codepad.org], [http://dpaste.com/ dpaste.com] and [http://fpaste.org/ fpaste.org].|https://github.com/Kiwi/curlpaste/|{{Pkg|curlpaste}}}}<br />
* {{App|Elmer|Pastebin client similar to wgetpaste and curlpaste, except written in Perl and usable with wget or curl. Servers: [http://codepad.org/ codepad.org], [http://rafb.me/ rafb.me], [http://sprunge.us/ sprunge.us], [http://ompldr.org/ ompldr.org].|https://github.com/sudokode/elmer|{{AUR|elmer}}}}<br />
* {{App|Fb-client|Client for the [http://paste.xinu.at/ paste.xinu.at] pastebin.|http://paste.xinu.at|{{Pkg|fb-client}}}}<br />
* {{App|Gist|Command-line interface for the [https://gist.github.com/ gist.github.com] pastebin service.|http://github.com/defunkt/gist|{{AUR|gist}}}}<br />
* {{App|Haste|Universal pastebin tool, written in Haskell. Servers: [http://hpaste.org/ hpaste.org], [http://paste2.org/ paste2.org], [http://pastebin.com/ pastebin.com] and others.|http://hackage.haskell.org/package/haste|{{AUR?|haste}}}}<br />
* {{App|Hg-paste|Pastebin extension for Mercurial which can send diffs to various pastebin websites for easy sharing. Servers: [http://dpaste.com/ dpaste.com] and [http://dpaste.org/ dpaste.org].|http://bitbucket.org/sjl/hg-paste|{{AUR|hg-paste}}}}<br />
* {{App|Ix|Client for the ix.io pastebin.|http://ix.io|{{Pkg|ix}}}}<br />
* {{App|Npaste-client|Client for the [http://npaste.de/ npaste.de] pastebin.|http://npaste.de|{{AUR|npaste-client}}}}<br />
* {{App|Pastebinit|Really small Python script that acts as a Pastebin client. Servers: [http://pastie.org/ pastie.org], [http://paste.kde.org/ paste.kde.org], [http://paste.debian.net/ paste.debian.net], [http://paste.ubuntu.com/ paste.ubuntu.com] and others (for a full list see {{ic|pastebinit -l}}).|http://launchpad.net/pastebinit|{{Pkg|pastebinit}}}}<br />
* {{App|Vim-gist|Vim script for [https://gist.github.com/ gist.github.com].| http://www.vim.org/scripts/script.php?script_id&#61;2423 |{{AUR|vim-gist}}}}<br />
* {{App|Vim-paster|Vim plugin to paste to any pastebin service using curl.|http://eugeneciurana.com/site.php?page&#61;tools|{{AUR|vim-paster}}}}<br />
* {{App|Wgetpaste|Bash script that automates pasting to a number of pastebin services. Servers: [http://pastebin.ca/ pastebin.ca], [http://codepad.org/ codepad.org], [http://dpaste.com/ dpaste.com] and [http://pastebin.osuosl.org/ pastebin.osuosl.org].|http://wgetpaste.zlin.dk/|{{Pkg|wgetpaste}}}}<br />
<br />
=== Email clients ===<br />
<br />
{{Wikipedia|Comparison of e-mail clients}}<br />
<br />
==== Console ====<br />
<br />
* {{App|[[Alpine]]|Fast, easy-to-use and Apache-licensed email client based on [[Wikipedia:Pine (email client)|Pine]].|https://washington.edu/alpine|{{AUR|alpine}}}}<br />
* {{App|[[Wikipedia:Gnus|Gnus]]|Email, NNTP and RSS client for Emacs.|http://gnus.org/|{{AUR|emacs-gnus-git}}}}<br />
* {{App|[[Wikipedia:mailx|Heirloom mailx]]|Full-featured command-line Mail User Agent derived from Berkeley Mail.|http://heirloom.sourceforge.net/mailx.html|{{Pkg|heirloom-mailx}}}}<br />
* {{App|mu/mu4e|Email indexer (mu) and client for emacs (mu4e). Xapian based for fast searches.|http://www.djcbsoftware.nl/code/mu/mu4e.html|{{AUR|mu}}}}<br />
* {{App|[[Mutt]]|Small but very powerful text-based mail client.|http://www.mutt.org/|{{Pkg|mutt}}}}<br />
* {{App|[[Sup]]|CLI mail client with very fast searching, tagging, threading and GMail like operation.|http://sup.rubyforge.org/|{{AUR|sup}}}}<br />
* {{App|[[Wikipedia:Wanderlust (software)|Wanderlust]]|Email client and news reader for Emacs.|http://www.gohome.org/wl/|{{Pkg|wanderlust}}}}<br />
<br />
==== Graphical ====<br />
<br />
* {{App|[[Balsa]]|Simple and light email client that is part of the Gnome project.|http://pawsa.fedorapeople.org/balsa/|{{Pkg|balsa}}}}<br />
* {{App|[[Wikipedia:Claws Mail|Claws Mail]]|Lightweight GTK-based email client and news reader.|http://claws-mail.org/|{{Pkg|claws-mail}}}}<br />
* {{App|[[Evolution]]|Mature and feature-rich e-mail client used in GNOME by default. Part of {{Grp|gnome-extra}}.|http://projects.gnome.org/evolution/|{{Pkg|evolution}}}}<br />
* {{App|Geary|Simple desktop mail client built in [[Wikipedia:Vala (programming language)|Vala]].|http://redmine.yorba.org/projects/geary/wiki|{{Pkg|geary}}}}<br />
* {{App|[[Wikipedia:Kmail|Kmail]]|Mature and feature-rich email client. Part of {{Grp|kdepim}}.|http://kde.org/applications/internet/kmail/|{{Pkg|kdepim-kmail}}}}<br />
* {{App|Manitou Mail|Database-driven email system.|http://www.manitou-mail.org/|{{AUR|manitou-mdx}} {{AUR|manitou-ui}}}}<br />
* {{App|[[Wikipedia:Sylpheed|Sylpheed]]|Lightweight and user-friendly GTK+ email client.|http://sylpheed.sraoss.jp/en/|{{Pkg|sylpheed}}}}<br />
* {{App|[[Thunderbird]]|Feature-rich email client from Mozilla written in GTK+.|http://www.mozilla.org/thunderbird/|{{Pkg|thunderbird}}}}<br />
* {{App|Trojitá|Qt IMAP email client.|http://trojita.flaska.net/|{{AUR|trojita}}}}<br />
<br />
=== Network Managers ===<br />
<br />
* {{App|[[Connman]]|Daemon for managing internet connections within embedded devices running the Linux operating system. The Connection Manager is designed to be slim and to use as few resources as possible, so it can be easily integrated.|https://connman.net/|{{Pkg|connman}}}}<br />
* {{App|[[netctl]]|Simple and robust tool to manage network connections via profiles. Works well with systemd.|https://projects.archlinux.org/netctl.git/|{{Pkg|netctl}}}}<br />
* {{App|[[NetworkManager]]|Manager that provides wired, wireless, mobile broadband and OpenVPN detection with configuration and automatic connection.|http://projects.gnome.org/NetworkManager/|{{Pkg|networkmanager}}}}<br />
* {{App|[[Wicd]]|Wireless and wired connection manager with few dependencies and GTK+, KDE and command-line interfaces.|http://wicd.sourceforge.net/|{{Pkg|wicd}}}}<br />
<br />
=== News Aggregators ===<br />
<br />
{{Wikipedia|Comparison of feed aggregators}}<br />
<br />
==== Console ====<br />
<br />
* {{App|[[Wikipedia:Canto (news aggregator)|Canto]]|Ncurses RSS aggregator.|http://codezen.org/canto/|{{AUR|canto}}}}<br />
* {{App|[[Wikipedia:Gnus|Gnus]]|Email, NNTP and RSS client for Emacs.|http://gnus.org/|{{AUR|emacs-gnus-git}}}}<br />
* {{App|Newsbeuter|Ncurses RSS aggregator with layout and keybinding similar to the [[Mutt]] email client.|http://newsbeuter.org|{{Pkg|newsbeuter}}}}<br />
* {{App|Rawdog|"RSS Aggregator Without Delusions Of Grandeur" that parses RSS/CDF/Atom feeds into a static HTML page of articles in chronological order.|http://offog.org/code/rawdog.html|{{AUR|rawdog}}}}<br />
* {{App|Snownews|Text mode RSS news reader.|http://kiza.kcore.de/software/snownews/|{{Pkg|snownews}}}}<br />
<br />
==== Graphical ====<br />
<br />
* {{App|[[Wikipedia:Kontact#News Feed Aggregator|Akregator]]|News aggregator for KDE, part of {{Grp|kdepim}}.|http://kde.org/applications/internet/akregator/|{{Pkg|kdepim-akregator}}}}<br />
* {{App|[[Wikipedia:BlogBridge|BlogBridge]]|Excellent Java-based aggregator, which gives users the option to synchronize their feeds across multiple computers.|http://blogbridge.com|{{AUR|blogbridge}}}}<br />
* {{App|[[Wikipedia:Liferea|Liferea]]|GTK+ news aggregator for online news feeds and weblogs.| http://liferea.sourceforge.net|{{Pkg|liferea}}}}<br />
* {{App|RSS Guard|Very tiny RSS and Atom news reader developed using Qt framework.|https://code.google.com/p/rss-guard/|{{AUR|rss-guard}}}}<br />
* {{App|[[Wikipedia:RSSOwl|RSSOwl]]|Powerful aggregator for RSS and Atom feeds, written in Java using Eclipse Rich Client Platform and SWT as a widget toolkit.|http://boreal.rssowl.org|{{AUR|rssowl}}}}<br />
* {{App|[[Thunderbird]]|Email client from Mozilla which also functions as a pretty nice news aggregator.|http://www.mozilla.org/thunderbird/|{{Pkg|thunderbird}}}}<br />
* {{App|Tickr (formerly News)|GTK-based RSS Reader that displays feeds as a smooth scrolling line on your Desktop, as known from TV stations.|http://newsrssticker.com/|{{AUR|tickr}}}}<br />
* {{App|Urssus|Cross platform GUI news aggregator.|https://code.google.com/p/urssus/|{{AUR|urssus}}}}<br />
* {{App|quite-rss|RSS/Atom feed reader written on Qt/С++.|http://code.google.com/p/quite-rss/|{{AUR|quiterss}}}}<br />
<br />
=== Web Browsers ===<br />
<br />
{{Wikipedia|Comparison of web browsers}}<br />
<br />
==== Console ====<br />
<br />
* {{App|[[Wikipedia:ELinks|ELinks]]|Advanced and well-established feature-rich text mode web browser (Links fork, barely supported since 2009).|http://elinks.or.cz/|{{Pkg|elinks}}}}<br />
* {{App|[[Wikipedia:Links (web browser)|Links]]|Text WWW browser, similar to Lynx, but with CSS-based rendering. It is much more advanced and includes detailed menus, similiar to GUI.|http://links.twibright.com/|{{Pkg|links}}}}<br />
* {{App|[[Wikipedia:Lynx (web browser)|Lynx]]|Text browser for the World Wide Web.|http://lynx.isc.org|{{Pkg|lynx}}}}<br />
* {{App|retawq|Interactive, multi-threaded network client (web browser) for text terminals.|http://retawq.sourceforge.net/|{{AUR|retawq}}}}<br />
* {{App|[[Wikipedia:W3m|w3m]]|Pager/text-based web browser. It has vim-like keybindings, and is able to display images. It has javascript support too.|http://w3m.sourceforge.net/|{{Pkg|w3m}}}}<br />
<br />
==== Graphical ====<br />
<br />
* {{App|[[Wikipedia:Abaco (web browser)|Abaco]]|Multi-page graphical web browser for the Plan 9 OS.|http://lab-fgb.com/abaco/{{linkrot|2013|05|19}}|{{AUR|abaco}}}}<br />
* {{App|[[Wikipedia:Arora (browser)|Arora]]|Cross-platform web browser built using QtWebKit. Development stopped in January 2012.|https://code.google.com/p/arora/|{{Pkg|arora}}}}<br />
* {{App|[[Chromium]]|Web browser developed by Google that uses the WebKit layout engine and application framework, the open source project behind Google Chrome.|http://www.chromium.org/|{{Pkg|chromium}}}}<br />
* {{App|[[Wikipedia:Conkeror|Conkeror]]|Highly programmable web browser, with Emacs-like keybindings, based on Mozilla's XULRunner.|http://conkeror.org/|{{AUR|conkeror-git}}}}<br />
* {{App|[[Wikipedia:Dillo|Dillo]]|Small, fast graphical web browser built on [[Wikipedia:Fltk|FLTK]].|http://dillo.org/|{{Pkg|dillo}}}}<br />
* {{App|[[dwb]]|Lightweight, highly customizable web browser based on the WebKit engine with vi-like shortcuts and tiling layouts.|http://portix.bitbucket.org/dwb/|{{Pkg|dwb}}}}<br />
* {{App|[[Epiphany]]|Browser which uses the WebKit rendering engine, part of {{Grp|gnome}}.|http://projects.gnome.org/epiphany/|{{Pkg|epiphany}}}}<br />
* {{App|[[Firefox]]|Extensible browser from Mozilla based on Gecko with fast rendering.|https://mozilla.com/firefox|{{Pkg|firefox}}}}<br />
* {{App|Hv3|Minimalist web browser based on [[Wikipedia:Tkhtml|Tkhtml3]].|http://tkhtml.tcl.tk/hv3.html|{{AUR|hv3}}}}<br />
* {{App|[[Jumanji]]|Highly customizable and functional web browser.|http://pwmt.org/projects/jumanji|{{AUR|jumanji}}}}<br />
* {{App|[[Wikipedia:Kazehakase|Kazehakase]]|Much lighter, but rather feature-lacking alternative to other browsers, based on GTK+ and Gecko.|http://kazehakase.sourceforge.jp/|{{AUR?|kazehakase}}}}<br />
* {{App|[[Wikipedia:Konqueror|Konqueror]]|Web browser based on Qt and KHTML, part of {{Grp|kdebase}}.|http://konqueror.org/|{{Pkg|kdebase-konqueror}}}}<br />
* {{App|[[Luakit]]|Highly configurable, micro-browser framework based on the WebKit engine and the GTK+ toolkit. It is very fast, extensible by Lua and licensed under the GNU GPLv3 license.|http://mason-larobina.github.com/luakit/|{{Pkg|luakit}}}}<br />
* {{App|[[Wikipedia:Midori (web browser)|Midori]]|Lightweight web browser based on GTK+ and WebKit.|http://twotoasts.de/index.php/midori/|{{Pkg|midori}}}}<br />
* {{App|[[Wikipedia:NetSurf|NetSurf]]|Featherweight browser written in C, notable for its lack of JavaScript support and fast rendering through its own custom rendering engine.|http://netsurf-browser.org|{{Pkg|netsurf}}}}<br />
* {{App|[[Opera]]|Highly customizable browser with focuses on an adherence to web rendering standards.|http://opera.com|{{Pkg|opera}}}}<br />
* {{App|[[Wikipedia:QupZilla|QupZilla]]|New and very fast open source browser based on WebKit core, written in Qt framework.| http://www.qupzilla.com |{{pkg|qupzilla}}}} <br />
* {{App|[[wikipedia:Rekonq|Rekonq]]|WebKit-based web browser for KDE.|http://rekonq.kde.org/|{{Pkg|rekonq}}}}<br />
* {{App|Sb|Very lightweight WebKit-based browser that uses keybindings to perform most things the URL bar would usually do.|https://github.com/mutantturkey/sb/|{{AUR|sb-git}}}} <br />
* {{App|Surf|Lightweight WebKit-based browser, which follows the [http://suckless.org/philosophy suckless ideology] (basically, the browser itself is a single C source file).|http://surf.suckless.org|{{Pkg|surf}}}}<br />
* {{App|[[Wikipedia:Uzbl|Uzbl]]|Group of web interface tools which adhere to the Unix philosophy.|http://uzbl.org/|{{Pkg|uzbl-browser}}}}<br />
* {{App|[[Vimprobable]]|Browser that behaves like the Vimperator plugin available for Mozilla Firefox. It is based on the WebKit engine and uses the GTK+ bindings.|http://sourceforge.net/apps/trac/vimprobable/|{{AUR|vimprobable-git}}}}<br />
* {{App|[[Wikipedia:Xombrero|Xombrero]]|Webkit minimalist web browser with sophisticated security features designed-in, BSD style.|https://opensource.conformal.com/wiki/xombrero|{{AUR|xombrero-git}}}}<br />
<br />
=== Microblogging Clients ===<br />
<br />
{{Wikipedia|List of Twitter services and applications}}<br />
<br />
* {{App|Choqok|Microblogging client for KDE that supports Twitter.com, Identi.ca and opendesktop.org services.|http://choqok.gnufolks.org/|{{Pkg|choqok}}}}<br />
* {{App|[[Wikipedia:Gwibber|Gwibber]]|GTK-based microblogging client with support for Twitter, Identi.ca, StatusNet, Facebook, FriendFeed, Digg, Flikr and Qaiku.|http://gwibber.com/|{{Pkg|gwibber}}}}<br />
* {{App|[[Wikipedia:Hotot (program)|Hotot]]|Lightweight and open source microblogging client with support for Twitter and Identi.ca and integration with various image sharing services and URL shorteners.|http://hotot.org|{{AUR|hotot}}}}<br />
* {{App|Pino|Simple and fast client for Twitter and Identi.ca. written in [[Wikipedia:Vala (programming language)|Vala]].|http://pino-app.appspot.com/|{{AUR|pino}}}}<br />
* {{App|Polly|Linux Twitter client designed for multiple columns of multiple accounts.|https://launchpad.net/polly/|{{AUR|polly}}}}<br />
* {{App|Qwit|Cross-platform client for Twitter using the Qt toolkit.|http://code.google.com/p/qwit/|{{AUR|qwit}}}}<br />
* {{App|ttytter|Easily scriptable twitter client written in Perl.|http://www.floodgap.com/software/ttytter/|{{Pkg|ttytter}}}}<br />
* {{App|Turpial|Multi-interface Twitter client written in Python.|http://turpial.org.ve/|{{AUR|turpial-git}}}}<br />
* {{App|tyrs|Simple client for for Twitter and Identi.ca supporting virtually all its features with nice console UI (unmaintained).|http://tyrs.nicosphere.net/|{{AUR|tyrs}}}}<br />
* {{App|turses|Twitter client for the console based off {{AUR|tyrs}} with mayor improvements.|http://turses.rtfd.org/|{{AUR|turses}}}}<br />
<br />
=== FTP ===<br />
<br />
==== FTP Clients ====<br />
<br />
{{Wikipedia|Comparison of FTP client software}}<br />
<br />
* {{App|CurlFtpFS|Filesystem for acessing FTP hosts based on FUSE and libcurl.|http://curlftpfs.sourceforge.net/|{{Pkg|curlftpfs}}}}<br />
* {{App|[[Wikipedia:FatRat|FatRat]]|Download manager with support for HTTP, FTP, SFTP, BitTorrent, RapidShare and more.|http://fatrat.dolezel.info/|{{Pkg|fatrat}}}}<br />
* {{App|[[Wikipedia:FileZilla|FileZilla]]|Fast and reliable FTP, FTPS and SFTP client.|http://filezilla-project.org/|{{Pkg|filezilla}}}}<br />
* {{App|fuseftp|FTP filesystem written in Perl, using [[Wikipedia:Filesystem in Userspace|FUSE]].|http://freshmeat.net/projects/fuseftp/|{{AUR|fuseftp}}}}<br />
* {{App|[[Wikipedia:gFTP|gFTP]]|Multithreaded FTP client for Linux.|http://gftp.seul.org/|{{Pkg|gftp}}}}<br />
* {{App|[[Wikipedia:Lftp|LFTP]]|Sophisticated command-line FTP client.|http://lftp.yar.ru/|{{Pkg|lftp}}}}<br />
* {{App|[[Wikipedia:tnftp|tnftp]]|FTP client with several advanced features for [[Wikipedia:NetBSD|NetBSD]].|http://freecode.com/projects/tnftp|{{Pkg|tnftp}}}}<br />
Some file managers like Dolphin, [[Nautilus]] and [[Thunar]] also provide FTP functionality.<br />
<br />
==== FTP Servers ====<br />
<br />
* {{App|[[Wikipedia:Pure-FTPd|Pure-FTPd]]|Free (BSD-licensed), secure, production-quality and standard-compliant FTP server.|http://www.pureftpd.org/project/pure-ftpd|{{AUR|pure-ftpd}}}}<br />
* {{App|[[Very Secure FTP Daemon|vsftpd]]|Lightweight, stable and secure FTP server for UNIX-like systems.|https://security.appspot.com/vsftpd.html|{{Pkg|vsftpd}}}}<br />
<br />
=== Others ===<br />
<br />
* {{App|[[Wikipedia:Sharelin|Sharelin]]|Gnutella2 only client with a web UI.|http://sourceforge.net/apps/mediawiki/sharelin|{{AUR|Sharelin}}}}</div>Mid-kidhttps://wiki.archlinux.org/index.php?title=Linux-pf&diff=270203Linux-pf2013-08-07T18:18:46Z<p>Mid-kid: wait sorry, my bad.</p>
<hr />
<div>[[Category:Kernel]]<br />
<br />
[http://pf.natalenko.name/ Linux-pf] is a kernel package based on the stock -ARCH kernel, patched with a row of significant patches:<br />
* [http://ck-hack.blogspot.com/ The latest Con Kolivas' -ck patchset, including BFS]<br />
* [[TuxOnIce]]<br />
* [http://algo.ing.unimo.it/people/paolo/disk_sched/ BFQ] (as default I/O scheduler)<br />
* [http://kerneldedup.org/projects/uksm/ UKSM]<br />
* [http://aufs.sourceforge.net/ AUFS3]<br />
<br />
== Installation ==<br />
<br />
The reference PKGBUILD can be found at the {{AUR|linux-pf}} and at the [https://bitbucket.org/nous/linux-pf bitbucket.org mercurial repository]. <br />
<br />
=== From the unofficial repository (recommended) ===<br />
<br />
Precompiled packages, generic and CPU-family optimized are uploaded at the [http://dl.dropbox.com/u/11734958/index.html pfkernel unofficial repository], usually within 6 hours of the AUR update for x86_64 and 12 hours for i686. Append the following to {{ic|/etc/pacman.conf}} to activate the pfkernel repo:<br />
:{{bc|<nowiki><br />
[pfkernel]<br />
# Generic and optimized binaries of the ARCH kernel patched with BFS, TuxOnIce, BFQ, IMQ, Aufs3<br />
# linux-pf, kernel26-pf, gdm-old, nvidia-pf, nvidia-96xx, xchat-greek, arora-git<br />
Server = http://dl.dropbox.com/u/11734958/$arch<br />
</nowiki>}}<br />
Running {{ic|$ pacman -Syyl pfkernel}} will update all repos and show the available packages from pfkernel. Afterwards, just install {{Pkg|linux-pf}} {{Pkg|linux-pf-headers}}, but additional configuration steps must be performed; see the [[#Installation|Installation]] section.<br />
<br />
=== Manual compilation ===<br />
<br />
There's a number of options a user is asked to choose from, should he/she select to compile from the PKGBUILD:<br />
{{bc|<nowiki><br />
==> Hit <Y> to use your running kernel's config<br />
(needs IKCONFIG and IKCONFIG_PROC)<br />
==> Hit <L> to run 'make localmodconfig'<br />
==> Hit <N> (or just <ENTER>) to build an all-inclusive kernel like stock -ARCH<br />
(warning: it can take a looong time)<br />
</nowiki>}}<br />
The <Y> option is for users who have already compiled and are running a custom kernel. The PKGBUILD reads the running kernel's configuration and uses it for the subsequent compilation.<br />
The <L> option tries some kind of autodetection of the user's hardware: it first tries to use the [[modprobed_db]] module database, then falls back to the linux kernel's '''''make localmodconfig''''' functionality. The last option is self-explanatory.<br />
<br />
{{bc|<nowiki><br />
==> Kernel configuration options before build:<br />
<M> make menuconfig (console menu)<br />
<N> make nconfig (newer alternative to menuconfig)<br />
<G> make gconfig (needs gtk)<br />
<X> make xconfig (needs qt)<br />
<O> make oldconfig<br />
<ENTER> to skip configuration and start compiling<br />
</nowiki>}}<br />
Choose one of these to use your favourite user interface for configuring the kernel. Note that the last option might still prompt with unresolved/new configuration options, if you have selected <Y> or <L> in the previous step.<br />
<br />
{{bc|<nowiki><br />
==> An non-generic CPU was selected for this kernel.<br />
==> Hit <G> : to create a generic package named linux-pf<br />
==> Hit <ENTER> : to create a package named after the selected CPU<br />
(e.g. linux-pf-core2 - recommended)<br />
==> This option affects ONLY the package name. Whether or not the<br />
==> kernel is optimized was determined at the previous config step.<br />
</nowiki>}}<br />
If you have selected a specific CPU optimization for your kernel in the previous step, the default action is to append the CPU to the package name. This way, a subsequent package update from the repository will pull the optimized package and not the generic one. This also will help better compatibility with 3rd party precompiled modules (e.g. nvidia-pf), which might break things if loaded on optimized linux-pf kernels.<br />
<br />
==== Install compiled package ====<br />
<br />
After the compilation finishes, an additional ''linux-pf-headers[-cpu]'' package will be created. Don't forget to install it too, if you plan on using additional modules like [[nvidia]] or [[virtualbox]].<br />
<br />
# pacman -U linux-pf-core2-3.3.2-1-$CPUTYPE.pkg.tar.xz linux-pf-headers-core2-3.3.2-1-$CPUTYPE.pkg.tar.xz<br />
<br />
During the kernel installation, [[mkinitcpio]] will be called by the install script to recreate the initramfs.<br />
{{Note|If you make any changes to {{ic|/etc/mkinitcpio.conf}} after the installation, you must run '''''mkinitcpio -p linux-pf''''' to have the initial ramdisk recreated.}}<br />
<br />
== Configuration ==<br />
<br />
Then, you need to add a boot entry in [[Boot Loader#Configuration files|boot loader configuration file]] which points to linux-pf (the following example is from one of the maintainer's boxes):<br />
{{bc|<nowiki><br />
title Linux-pf 3.2<br />
root (hd0,4)<br />
kernel (hd0,0)/vmlinuz-linux-pf root=/dev/disk/by-label/ROOT ro vga=0x318 lapic resume=/dev/disk/by-label/SWAP video=vesafb:ywrap,mtrr:3 fastboot quiet<br />
initrd (hd0,0)/initramfs-linux-pf.img<br />
</nowiki>}}<br />
<br />
If you intend to use TuxOnIce for hibernation, make sure you have added the necessary modules to the MODULES array of {{ic|/etc/mkinitcpio.conf}} and at least the ''resume'' hook to the HOOKS array:<br />
{{bc|<nowiki><br />
MODULES="... lzo tuxonice_compress tuxonice_swap tuxonice_userui ..."<br />
HOOKS="... block userui resume filesystems ..."<br />
</nowiki>}}<br />
In the example above, TuxOnIce is setup to use a swap partition as the suspended image allocator. The ''resume'' hook must be placed before ''filesystems''. Also, a progress indicator is requested with ''userui''. Please read the [[TuxOnIce]] wiki page for more detailed information.<br />
<br />
Last, you must choose whether you want to suspend using [[pm-utils]] or the [[Suspending_to_Disk_with_hibernate-script#Tuxonice_method|hibernate-script]]. Please, refer to the respective wiki pages for more details. [[TuxOnIce]] offers the option for a text mode or an even nicer [[fbsplash|framebuffer splash]] progress indicator.<br />
<br />
== Tips and tricks ==<br />
<br />
* If you notice disk-related performance problems or occational hickups, it might be an I/O scheduler issue. Try a different one than the linux-pf default (BFQ) by echoing to {{ic|/sys/block/sda/queue/scheduler}} ''cfq'', ''noop'' or ''deadline'': {{ic|# echo noop >| /sys/block/sda/queue/scheduler}}. Note, the aforementioned command only sets the I/O scheduler for the 1st hard drive and additional ''echoes'' will be needed if you have more. If the situation improves, then append "''elevator''='''''cfq'''''" (or '''''noop''''' or '''''deadline''''') to the linux-pf command line in {{ic|/boot/grub/menu.lst}}, to make the change permanent.<br />
* For people who build their own tailored kernels and compilation aborts with with an error about "missing include/config/dvb/*.h files", setting <M> at ''DVB for Linux'' at ''Device Drivers/Multimedia support'' and leaving everything else out, creates just the necessary dvb.h, which allows the compilation to continue.<br />
<br />
== Forum thread for linux-pf ==<br />
<br />
There's a [https://bbs.archlinux.org/viewtopic.php?id=103462 discussion thread] at the BBS for reporting errors, impressions, ideas and requests.<br />
<br />
== See also ==<br />
<br />
* [https://bitbucket.org/nous/linux-pf/ linux-pf mercurial repository]<br />
* [http://pf.natalenko.name/ Patchset homepage]<br />
* [http://pf.natalenko.name/forum Patchset community forum]<br />
* [http://freecode.com/projects/pf-kernel Patchset changelog]</div>Mid-kidhttps://wiki.archlinux.org/index.php?title=Linux-pf&diff=270201Linux-pf2013-08-07T18:17:47Z<p>Mid-kid: sata is deprecated and userui does not exist</p>
<hr />
<div>[[Category:Kernel]]<br />
<br />
[http://pf.natalenko.name/ Linux-pf] is a kernel package based on the stock -ARCH kernel, patched with a row of significant patches:<br />
* [http://ck-hack.blogspot.com/ The latest Con Kolivas' -ck patchset, including BFS]<br />
* [[TuxOnIce]]<br />
* [http://algo.ing.unimo.it/people/paolo/disk_sched/ BFQ] (as default I/O scheduler)<br />
* [http://kerneldedup.org/projects/uksm/ UKSM]<br />
* [http://aufs.sourceforge.net/ AUFS3]<br />
<br />
== Installation ==<br />
<br />
The reference PKGBUILD can be found at the {{AUR|linux-pf}} and at the [https://bitbucket.org/nous/linux-pf bitbucket.org mercurial repository]. <br />
<br />
=== From the unofficial repository (recommended) ===<br />
<br />
Precompiled packages, generic and CPU-family optimized are uploaded at the [http://dl.dropbox.com/u/11734958/index.html pfkernel unofficial repository], usually within 6 hours of the AUR update for x86_64 and 12 hours for i686. Append the following to {{ic|/etc/pacman.conf}} to activate the pfkernel repo:<br />
:{{bc|<nowiki><br />
[pfkernel]<br />
# Generic and optimized binaries of the ARCH kernel patched with BFS, TuxOnIce, BFQ, IMQ, Aufs3<br />
# linux-pf, kernel26-pf, gdm-old, nvidia-pf, nvidia-96xx, xchat-greek, arora-git<br />
Server = http://dl.dropbox.com/u/11734958/$arch<br />
</nowiki>}}<br />
Running {{ic|$ pacman -Syyl pfkernel}} will update all repos and show the available packages from pfkernel. Afterwards, just install {{Pkg|linux-pf}} {{Pkg|linux-pf-headers}}, but additional configuration steps must be performed; see the [[#Installation|Installation]] section.<br />
<br />
=== Manual compilation ===<br />
<br />
There's a number of options a user is asked to choose from, should he/she select to compile from the PKGBUILD:<br />
{{bc|<nowiki><br />
==> Hit <Y> to use your running kernel's config<br />
(needs IKCONFIG and IKCONFIG_PROC)<br />
==> Hit <L> to run 'make localmodconfig'<br />
==> Hit <N> (or just <ENTER>) to build an all-inclusive kernel like stock -ARCH<br />
(warning: it can take a looong time)<br />
</nowiki>}}<br />
The <Y> option is for users who have already compiled and are running a custom kernel. The PKGBUILD reads the running kernel's configuration and uses it for the subsequent compilation.<br />
The <L> option tries some kind of autodetection of the user's hardware: it first tries to use the [[modprobed_db]] module database, then falls back to the linux kernel's '''''make localmodconfig''''' functionality. The last option is self-explanatory.<br />
<br />
{{bc|<nowiki><br />
==> Kernel configuration options before build:<br />
<M> make menuconfig (console menu)<br />
<N> make nconfig (newer alternative to menuconfig)<br />
<G> make gconfig (needs gtk)<br />
<X> make xconfig (needs qt)<br />
<O> make oldconfig<br />
<ENTER> to skip configuration and start compiling<br />
</nowiki>}}<br />
Choose one of these to use your favourite user interface for configuring the kernel. Note that the last option might still prompt with unresolved/new configuration options, if you have selected <Y> or <L> in the previous step.<br />
<br />
{{bc|<nowiki><br />
==> An non-generic CPU was selected for this kernel.<br />
==> Hit <G> : to create a generic package named linux-pf<br />
==> Hit <ENTER> : to create a package named after the selected CPU<br />
(e.g. linux-pf-core2 - recommended)<br />
==> This option affects ONLY the package name. Whether or not the<br />
==> kernel is optimized was determined at the previous config step.<br />
</nowiki>}}<br />
If you have selected a specific CPU optimization for your kernel in the previous step, the default action is to append the CPU to the package name. This way, a subsequent package update from the repository will pull the optimized package and not the generic one. This also will help better compatibility with 3rd party precompiled modules (e.g. nvidia-pf), which might break things if loaded on optimized linux-pf kernels.<br />
<br />
==== Install compiled package ====<br />
<br />
After the compilation finishes, an additional ''linux-pf-headers[-cpu]'' package will be created. Don't forget to install it too, if you plan on using additional modules like [[nvidia]] or [[virtualbox]].<br />
<br />
# pacman -U linux-pf-core2-3.3.2-1-$CPUTYPE.pkg.tar.xz linux-pf-headers-core2-3.3.2-1-$CPUTYPE.pkg.tar.xz<br />
<br />
During the kernel installation, [[mkinitcpio]] will be called by the install script to recreate the initramfs.<br />
{{Note|If you make any changes to {{ic|/etc/mkinitcpio.conf}} after the installation, you must run '''''mkinitcpio -p linux-pf''''' to have the initial ramdisk recreated.}}<br />
<br />
== Configuration ==<br />
<br />
Then, you need to add a boot entry in [[Boot Loader#Configuration files|boot loader configuration file]] which points to linux-pf (the following example is from one of the maintainer's boxes):<br />
{{bc|<nowiki><br />
title Linux-pf 3.2<br />
root (hd0,4)<br />
kernel (hd0,0)/vmlinuz-linux-pf root=/dev/disk/by-label/ROOT ro vga=0x318 lapic resume=/dev/disk/by-label/SWAP video=vesafb:ywrap,mtrr:3 fastboot quiet<br />
initrd (hd0,0)/initramfs-linux-pf.img<br />
</nowiki>}}<br />
<br />
If you intend to use TuxOnIce for hibernation, make sure you have added the necessary modules to the MODULES array of {{ic|/etc/mkinitcpio.conf}} and at least the ''resume'' hook to the HOOKS array:<br />
{{bc|<nowiki><br />
MODULES="... lzo tuxonice_compress tuxonice_swap tuxonice_userui ..."<br />
HOOKS="... block resume filesystems ..."<br />
</nowiki>}}<br />
In the example above, TuxOnIce is setup to use a swap partition as the suspended image allocator. The ''resume'' hook must be placed before ''filesystems''. Also, a progress indicator is requested with ''userui''. Please read the [[TuxOnIce]] wiki page for more detailed information.<br />
<br />
Last, you must choose whether you want to suspend using [[pm-utils]] or the [[Suspending_to_Disk_with_hibernate-script#Tuxonice_method|hibernate-script]]. Please, refer to the respective wiki pages for more details. [[TuxOnIce]] offers the option for a text mode or an even nicer [[fbsplash|framebuffer splash]] progress indicator.<br />
<br />
== Tips and tricks ==<br />
<br />
* If you notice disk-related performance problems or occational hickups, it might be an I/O scheduler issue. Try a different one than the linux-pf default (BFQ) by echoing to {{ic|/sys/block/sda/queue/scheduler}} ''cfq'', ''noop'' or ''deadline'': {{ic|# echo noop >| /sys/block/sda/queue/scheduler}}. Note, the aforementioned command only sets the I/O scheduler for the 1st hard drive and additional ''echoes'' will be needed if you have more. If the situation improves, then append "''elevator''='''''cfq'''''" (or '''''noop''''' or '''''deadline''''') to the linux-pf command line in {{ic|/boot/grub/menu.lst}}, to make the change permanent.<br />
* For people who build their own tailored kernels and compilation aborts with with an error about "missing include/config/dvb/*.h files", setting <M> at ''DVB for Linux'' at ''Device Drivers/Multimedia support'' and leaving everything else out, creates just the necessary dvb.h, which allows the compilation to continue.<br />
<br />
== Forum thread for linux-pf ==<br />
<br />
There's a [https://bbs.archlinux.org/viewtopic.php?id=103462 discussion thread] at the BBS for reporting errors, impressions, ideas and requests.<br />
<br />
== See also ==<br />
<br />
* [https://bitbucket.org/nous/linux-pf/ linux-pf mercurial repository]<br />
* [http://pf.natalenko.name/ Patchset homepage]<br />
* [http://pf.natalenko.name/forum Patchset community forum]<br />
* [http://freecode.com/projects/pf-kernel Patchset changelog]</div>Mid-kidhttps://wiki.archlinux.org/index.php?title=Beginners%27_guide&diff=263623Beginners' guide2013-06-20T11:01:58Z<p>Mid-kid: Wait, there is a difference between UUID and PARTUUID? O.o</p>
<hr />
<div><noinclude><br />
[[Category:Getting and installing Arch]]<br />
[[Category:About Arch]]<br />
[[ar:Beginners' Guide/Installation]]<br />
[[da:Beginners' Guide/Installation]]<br />
[[es:Beginners' Guide/Installation]]<br />
[[hr:Beginners' Guide/Installation]]<br />
[[hu:Beginners' Guide/Installation]]<br />
[[it:Beginners' Guide/Installation]]<br />
[[ja:Beginners' Guide/Installation]]<br />
[[ko:Beginners' Guide/Installation]]<br />
[[nl:Beginners' Guide/Installatie]]<br />
[[pl:Beginners' Guide/Installation]]<br />
[[pt:Beginners' Guide/Installation]]<br />
[[ro:Ghidul începătorilor/Instalare]]<br />
[[ru:Beginners' Guide/Installation]]<br />
[[sr:Beginners' Guide/Installation]]<br />
[[zh-CN:Beginners' Guide/Installation]]<br />
[[zh-TW:Beginners' Guide/Installation]]<br />
{{Tip|This is part of a multi-page article for The Beginners' Guide. '''[[Beginners' Guide|Click here]]''' if you would rather read the guide in its entirety.}}<br />
</noinclude><br />
== Installation ==<br />
<br />
You are now presented with a shell prompt, automatically logged in as root.<br />
<br />
=== Change the language ===<br />
<br />
{{Tip|These are optional for the majority of users. Useful only if you plan on writing in your own language in any of the configuration files, if you use diacritical marks in the Wi-Fi password, or if you would like to receive system messages (e.g. possible errors) in your own language.}}<br />
<br />
By default, the keyboard layout is set to {{ic|us}}. If you have a non-[[Wikipedia:File:KB United States-NoAltGr.svg|US]] keyboard layout, run:<br />
<br />
# loadkeys ''layout''<br />
<br />
...where ''layout'' can be {{ic|fr}}, {{ic|uk}}, {{ic|dvorak}}, {{ic|be-latin1}}, etc. See [[KEYMAP#Keyboard layouts|here]] for a comprehensive list.<br />
<br />
The font should also be changed, because most languages use more glyphs than the 26 letter [[Wikipedia:English alphabet|English alphabet]]. Otherwise some foreign characters may show up as white squares or as other symbols. Note that the name is case-sensitive, so please type it ''exactly'' as you see it:<br />
<br />
# setfont Lat2-Terminus16<br />
<br />
By default, the language is set to English (US). If you would like to change the language for the install process ''(German, in this example)'', remove the {{ic|#}} in front of the [http://www.greendesktiny.com/support/knowledgebase_detail.php?ref=EUH-483 locale] you want from {{ic|/etc/locale.gen}}, along with English (US). Please choose the {{ic|UTF-8}} entry.<br />
<br />
Use {{Keypress|Ctrl+X}} to exit, and when prompted to save changes, press {{Keypress|Y}} and {{Keypress|Enter}} to use the same filename.<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8<br />
de_DE.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
# export LANG=de_DE.UTF-8<br />
<br />
Remember, {{Keypress|LAlt+LShift}} activates and deactivates the keymap.<br />
<br />
=== Establish an internet connection ===<br />
<br />
{{Warning|As of v197, udev no longer assigns network interface names according to the wlanX and ethX naming scheme. If you are coming from a different distribution or are reinstalling Arch and not aware of the new interface naming style, please do not assume that your wireless interface is named wlan0, or that your wired interface is named eth0. You can use the command {{ic|ip link}} to discover the names of your interfaces.}}<br />
<br />
The {{ic|dhcpcd}} network daemon starts automatically during boot and it will attempt to start a wired connection. Try to ping a server to see if a connection was established. For example, Google's DNS servers:<br />
<br />
{{hc|# ping -c 3 www.google.com|2=<br />
PING www.l.google.com (74.125.132.105) 56(84) bytes of data.<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=1 ttl=50 time=17.0 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=2 ttl=50 time=18.2 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=3 ttl=50 time=16.6 ms<br />
<br />
--- www.l.google.com ping statistics ---<br />
3 packets transmitted, 3 received, 0% packet loss, time 2003ms<br />
rtt min/avg/max/mdev = 16.660/17.320/18.254/0.678 ms}}<br />
<br />
If you get a {{ic|ping: unknown host}} error, first check if there is an issue with your cable or wireless signal strength. If not, you will need to set up the network manually, as explained below. Once a connection is established move on to [[#Prepare the storage drive|Prepare the storage drive]].<br />
<br />
==== Wired ====<br />
<br />
Follow this procedure if you need to set up a wired connection via a static IP address.<br />
<br />
First, disable the dhcpcd service which was started automatically at boot:<br />
<br />
# systemctl stop dhcpcd.service<br />
<br />
Identify the name of your Ethernet interface.<br />
<br />
{{hc|# ip link|<br />
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT<br />
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00<br />
2: enp2s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000<br />
link/ether 00:11:25:31:69:20 brd ff:ff:ff:ff:ff:ff<br />
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT qlen 1000<br />
link/ether 01:02:03:04:05:06 brd ff:ff:ff:ff:ff:ff}}<br />
<br />
In this example, the Ethernet interface is {{ic|enp2s0f0}}. If you are unsure, your Ethernet interface is likely to start with the letter "e", and unlikely to be "lo" or start with the letter "w". You can also use {{ic|iwconfig}} and see which interfaces are not wireless:<br />
<br />
{{hc|# iwconfig|2=<br />
enp2s0f0 no wireless extensions.<br />
wlp3s0 IEEE 802.11bgn ESSID:"NETGEAR97"<br />
Mode:Managed Frequency:2.427 GHz Access Point: 2C:B0:5D:9C:72:BF<br />
Bit Rate=65 Mb/s Tx-Power=16 dBm<br />
Retry long limit:7 RTS thr:off Fragment thr:off<br />
Power Management:on<br />
Link Quality=61/70 Signal level=-49 dBm<br />
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0<br />
Tx excessive retries:0 Invalid misc:430 Missed beacon:0<br />
lo no wireless extensions.}}<br />
<br />
In this example, neither {{ic|enp2s0f0}} nor the loopback device have wireless extensions, meaning {{ic|enp2s0f0}} is our Ethernet interface.<br />
<br />
You also need to know these settings:<br />
<br />
* Static IP address.<br />
* Subnet mask.<br />
* Gateway's IP address.<br />
* Name servers' (DNS) IP addresses.<br />
* Domain name (unless you are on a local LAN, in which case you can make it up).<br />
<br />
Activate the connected Ethernet interface (e.g. {{ic|enp2s0f0}}):<br />
<br />
# ip link set enp2s0f0 up<br />
<br />
Add the address:<br />
<br />
# ip addr add ''ip_address''/''subnetmask'' dev ''interface_name''<br />
<br />
For example:<br />
<br />
# ip addr add 192.168.1.2/24 dev enp2s0f0<br />
<br />
For more options, run {{ic|man ip}}.<br />
<br />
Add your gateway like this, substituting your own gateway's IP address:<br />
<br />
# ip route add default via ''ip_address''<br />
<br />
For example:<br />
<br />
# ip route add default via 192.168.1.1<br />
<br />
Edit {{ic|resolv.conf}}, substituting your name servers' IP addresses and your local domain name:<br />
<br />
{{hc|# nano /etc/resolv.conf|<br />
nameserver 61.23.173.5<br />
nameserver 61.95.849.8<br />
search example.com}}<br />
<br />
{{Note|Currently, you may include a maximum of three {{ic|nameserver}} lines.}}<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Network Configuration]] page.<br />
<br />
==== Wireless ====<br />
<br />
Follow this procedure if you need wireless connectivity (Wi-Fi) during the installation process.<br />
<br />
First, identify the name of your wireless interface.<br />
<br />
{{hc|# iw dev|2=<br />
phy#0<br />
Interface wlp3s0<br />
ifindex 3<br />
wdev 0x1<br />
addr 00:21:6a:5e:52:bc<br />
type managed<br />
}}<br />
<br />
In this example, {{ic|wlp3s0}} is the available wireless interface. If you are unsure, your wireless interface is likely to start with the letter "w", and unlikely to be "lo" or start with the letter "e". <br />
<br />
{{Note|If you do not see output similar to this, then your wireless driver has not been loaded. If this is the case, you must load the driver yourself. Please see [[Wireless Setup]] for more detailed information.}}<br />
<br />
Bring the interface up with:<br />
<br />
# ip link set wlp3s0 up<br />
<br />
A small percentage of wireless chipsets also require firmware, in addition to a corresponding driver. If you get output like {{ic|SIOCSIFFLAGS: No such file or directory}}, this means you will need to manually load the firmware. If unsure, invoke {{ic|dmesg}} to query the kernel log for a firmware request from the wireless chipset. For example, if you have an Intel chipset which requires and has requested firmware from the kernel at boot:<br />
<br />
{{hc|# dmesg <nowiki>|</nowiki> grep firmware|<br />
firmware: requesting iwlwifi-5000-1.ucode}}<br />
<br />
If there is no output, it may be concluded that the system's wireless chipset does not require firmware.<br />
<br />
{{Warning|Wireless chipset firmware packages (for cards which require them) are pre-installed under {{ic|/usr/lib/firmware}} in the live environment (on CD/USB stick) '''but must be explicitly installed to your actual system to provide wireless functionality after you reboot into it!''' Package installation is covered later in this guide. Ensure installation of both your wireless module and firmware before rebooting! See [[Wireless Setup]] if you are unsure about the requirement of corresponding firmware installation for your particular chipset.}}<br />
<br />
Next, use {{Pkg|netctl}}'s {{ic|wifi-menu}} to connect to a network:<br />
<br />
# wifi-menu wlp3s0<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Wireless Setup]] page.<br />
<br />
Alternatively, use {{ic|iw dev wlp3s0 scan <nowiki>|</nowiki> grep SSID}} to scan for available networks, then connect to a network with:<br />
<br />
# wpa_supplicant -B -i wlp3s0 -c <(wpa_passphrase "''ssid''" "''psk''")<br />
<br />
You need to replace ''ssid'' with the name of your network (e.g. "Linksys etc...") and ''psk'' with your wireless password, '''leaving the quotes around the network name and password.'''<br />
<br />
Finally, you have to give your interface an IP address. This can be set manually or using the dhcp:<br />
<br />
# dhcpd wlp3s0<br />
<br />
==== Analog modem, ISDN or PPoE DSL ====<br />
<br />
For xDSL, dial-up and ISDN connections, see [[Direct Modem Connection]].<br />
<br />
==== Behind a proxy server ====<br />
<br />
If you are behind a proxy server, you will need to export the {{ic|http_proxy}} and {{ic|ftp_proxy}} environment variables. See [[Proxy settings]] for more information.<br />
<br />
=== Prepare the storage drive ===<br />
<br />
{{Warning|Partitioning can destroy data. You are '''strongly''' cautioned and advised to backup any critical data before proceeding.}}<br />
<br />
Absolute beginners are encouraged to use a graphical partitioning tool. [http://gparted.sourceforge.net/download.php GParted] is a good example, and is [http://gparted.sourceforge.net/livecd.php provided as a "live" CD]. It is also included on live CDs of most Linux distributions such as [[Wikipedia:Ubuntu (operating system)|Ubuntu]] and [[Wikipedia:Linux Mint|Linux Mint]]. A drive should first be [[partitioning|partitioned]] and the partitions should be formatted with a [[File Systems|file system]] before rebooting.<br />
<br />
The recommendation for a system that will boot via UEFI rather than MBR legacy boot is to format the drive using a GPT partition table. This means that if the drive was previously already partitioned with an MBR (MSDOS) partition table it will now have a new partition table created which will destroy all other data on the drive. Once the new partition table has been created on a drive, only then can individual partitions be created with any chosen format type. When using Gparted, selecting the option to create a new partition table gives an "msdos" partition table by default. If you are intending to follow the advice to create a GPT partition table then you need to choose "Advanced" and then select "gpt" from the drop-down menu. This cannot be done if you have a pre-existing Windows installation on the drive which you wish not to destroy. It is therefore extremely important to not change the partition table to GPT if you intend on having a dual boot system. Leave the Windows install untouched and try to get the Linux install working with UEFI on a drive that contains an MBR (legacy) partition table. <br />
<br />
In addition, some newer computers come pre-installed with Windows 8 which will be using Secure Boot. Arch Linux currently does not support Secure Boot, but some Windows 8 installations have been seen not to boot if Secure Boot is turned off in the BIOS. In some cases it is necessary to turn off both Secure Boot as well as Fastboot in the BIOS options in order to allow Windows 8 to boot without Secure Boot. However there are potential security risks in turning off Secure Boot for booting up Windows 8. Therefore, it may be a better option to keep the Windows 8 install intact and have an independent hard drive for the Linux install - which can then be partitioned from scratch using a GPT partition table. Once that is done, creating several ext4/FAT32/swap partitions on the second drive may be a better way forward if the computer has two drives available. This is often not easy or possible on a small laptop. Currently, Secure Boot is still not in a fully stable state for reliable operation, even for Linux distributions that support it.<br />
<br />
See [[Swap]] for details if you wish to set up a swap partition or swap file. A swap file is easier to resize than a partition and can be created at any point after installation, but cannot be used with a Btrfs filesystem.<br />
<br />
If you have already done so, proceed to [[#Mount the partitions|Mount the partitions]].<br />
<br />
Otherwise, see the following example.<br />
<br />
==== Example ====<br />
<br />
The Arch Linux install media includes the following partitioning tools: {{ic|fdisk}}, {{ic|gdisk}}, {{ic|cfdisk}}, {{ic|cgdisk}}, {{ic|parted}}.<br />
<br />
{{Tip|Use the {{ic|lsblk}} command to list the hard disks attached to your system, along with the sizes of their existing partitions. This will help you to be confident you are partitioning the right disk.}}<br />
<br />
{{Box BLUE|Notes regarding [[UEFI]] boot:|<br />
* If you have a UEFI motherboard, you will need to create an extra [[Unified Extensible Firmware Interface#EFI_System_Partition|UEFI System Partition]].<br />
* It is recommended to always use GPT for UEFI boot, as some UEFI firmwares do not allow UEFI-MBR boot.}}<br />
<br />
{{Box BLUE|Notes regarding [[GPT]] partitioning:|<br />
* If you are not dual booting with Windows, then it is advisable to use GPT instead of MBR. Read [[GPT]] for a list of advantages.<br />
* If you have a BIOS motherboard (or plan on booting in BIOS compatibility mode) and you want to setup GRUB on a GPT-partitioned drive, you will need to create an extra [[GRUB#GUID Partition Table (GPT) specific instructions|BIOS Boot Partition]] of size 1007 KiB and {{ic|EF02}} type code. Syslinux does not need one.<br />
* Some BIOS systems may have issues with GPT. See http://mjg59.dreamwidth.org/8035.html and http://rodsbooks.com/gdisk/bios.html for more info and possible workarounds.}}<br />
<br />
{{Note|If you are installing to a USB flash key, see [[Installing Arch Linux on a USB key]].}}<br />
<br />
The example system will contain a 15 GB root partition, and a [[Partitioning#/home|home]] partition for the remaining space. Choose either [[MBR]] or [[GPT]]. Do not choose both!<br />
<br />
It should be emphasized that partitioning is a personal choice and that this example is only for illustrative purposes. See [[Partitioning]].<br />
<br />
{| class="wikitable"<br />
|-<br />
| rowspan="2" | '''MBR'''<br />
| rowspan="2"| {{ic|cfdisk&nbsp;/dev/sda}}<br />
| '''Root:'''<br />
<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – type in "15360" – {{Keypress|Enter}} for Beginning – {{Keypress|Enter}} for Bootable.<br />
|-<br />
|<br />
'''Home:'''<br />
<br />
* Press the down arrow to move to the free space area.<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – {{Keypress|Enter}} to use the rest of the drive (or you could type in the desired size).<br />
|-<br />
| rowspan="2" | '''GPT'''<br />
| rowspan="2"| {{ic|cgdisk&nbsp;/dev/sda}}<br />
| '''Root:'''<br />
<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for the first sector (2048) – type in "15G" – {{Keypress|Enter}} for the default hex code (8300) – {{Keypress|Enter}} for a blank partition name.<br />
|-<br />
| '''Home:'''<br />
<br />
* Press the down arrow a couple of times to move to the larger free space area.<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for the first sector – {{Keypress|Enter}} to use the rest of the drive (or you could type in the desired size; for example "30G") – {{Keypress|Enter}} for the default hex code (8300) – {{Keypress|Enter}} for a blank partition name.<br />
|}<br />
<br />
If you chose MBR, here is what it should look like:<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-----------------------------------------------------------------------<br />
sda1 Boot Primary Linux 15360<br />
sda2 Primary Linux 133000*<br />
<br />
If you chose GPT, here is what it should look like:<br />
<br />
Part. # Size Partition Type Partition Name<br />
----------------------------------------------------------------<br />
1007.0 KiB free space<br />
1 15.0 GiB Linux filesystem<br />
2 123.45 GiB Linux filesystem<br />
<br />
Double check and make sure that you are happy with the partition sizes as well as the partition table layout before continuing.<br />
<br />
If you would like to start over, you can simply select Quit (or press {{Keypress|Q}}) to exit without saving changes and then restart cfdisk (or cgdisk).<br />
<br />
If you are satisfied, choose Write (or press {{Keypress|Shift+W}}) to finalize and to write the partition table to the drive. Type "yes" and choose Quit (or press {{Keypress|Q}}) to exit without making any more changes.<br />
<br />
Simply partitioning is not enough; the partitions also need a [[File Systems|filesystem]]. To format the partitions with an ext4 filesystem:<br />
<br />
{{Warning|Double check and triple check that it is actually {{ic|/dev/sda1}} and {{ic|/dev/sda2}} that you want to format. You can use {{ic|lsblk}} to help with this.}}<br />
<br />
# mkfs.ext4 /dev/sda1<br />
# mkfs.ext4 /dev/sda2<br />
<br />
If you have made a partition dedicated to swap (code 82), do not forget to format and activate it with:<br />
<br />
# mkswap /dev/sda''X''<br />
# swapon /dev/sda''X''<br />
<br />
=== Mount the partitions ===<br />
<br />
Each partition is identified with a number suffix. For example, {{ic|sda1}} specifies the first partition of the first drive, while {{ic|sda}} designates the entire drive.<br />
<br />
To display the current partition layout:<br />
<br />
# lsblk /dev/sda<br />
<br />
{{Note|Do not mount more than one partition to the same directory. And pay attention, because the mounting order is important.}}<br />
<br />
First, mount the root partition on {{ic|/mnt}}. Following the example when using {{ic|cfdisk}} above (yours may be different), it would be:<br />
<br />
# mount /dev/sda1 /mnt<br />
<br />
Then mount the home partition and any other separate partition ({{ic|/boot}}, {{ic|/var}}, etc), if you have any:<br />
<br />
# mkdir /mnt/home<br />
# mount /dev/sda2 /mnt/home<br />
<br />
In case you have a UEFI motherboard, mount the UEFI partition:<br />
<br />
# mkdir -p /mnt/boot/efi<br />
# mount /dev/sda''X'' /mnt/boot/efi<br />
<br />
=== Select a mirror ===<br />
<br />
Before installing, you may want to edit the {{ic|mirrorlist}} file and place your preferred mirror first. A copy of this file will be installed on your new system by {{ic|pacstrap}} as well, so it is worth getting it right.<br />
<br />
{{hc|# nano /etc/pacman.d/mirrorlist|<br />
##<br />
## Arch Linux repository mirrorlist<br />
## Sorted by mirror score from mirror status page<br />
## Generated on 2012-MM-DD<br />
##<br />
<br />
<nowiki>Server = http://mirror.example.xyz/archlinux/$repo/os/$arch</nowiki><br />
...}}<br />
<br />
* {{Keypress|Alt+6}} to copy a {{ic|Server}} line.<br />
* {{Keypress|PageUp}} key to scroll up.<br />
* {{Keypress|Ctrl+U}} to paste it at the top of the list.<br />
* {{Keypress|Ctrl+X}} to exit, and when prompted to save changes, press {{Keypress|Y}} and {{Keypress|Enter}} to use the same filename.<br />
<br />
If you want, you can make it the ''only'' mirror available by getting rid of everything else (using {{Keypress|Ctrl+K}}), but it is usually a good idea to have a few more, in case the first one goes offline.<br />
<br />
{{Tip|<br />
* Use the [https://www.archlinux.org/mirrorlist/ Mirrorlist Generator] to get an updated list for your country. HTTP mirrors are faster than FTP, because of something called [[Wikipedia:Keepalive|keepalive]]. With FTP, pacman has to send out a signal each time it downloads a package, resulting in a brief pause. For other ways to generate a mirror list, see [[Mirrors#Sorting mirrors|Sorting mirrors]] and [[Reflector]].<br />
* [https://archlinux.org/mirrors/status/ Arch Linux MirrorStatus] reports various aspects about the mirrors such as network problems with mirrors, data collection problems, the last time mirrors have been synced, etc.}}<br />
<br />
{{Note|<br />
* Whenever in the future you change your list of mirrors, always remember to force pacman to refresh all package lists with {{ic|pacman -Syy}}. This is considered to be good practice and will avoid possible headaches. See [[Mirrors]] for more information.<br />
* If you are using an older installation medium, your mirrorlist might be outdated, which might lead to problems when updating Arch Linux (see {{Bug|22510}}). Therefore it is advised to obtain the latest mirror information as described above.<br />
* Some issues have been reported in the [https://bbs.archlinux.org/ Arch Linux forums] regarding network problems that prevent pacman from updating/synchronizing repositories (see [https://bbs.archlinux.org/viewtopic.php?id&#61;68944] and [https://bbs.archlinux.org/viewtopic.php?id&#61;65728]). When installing Arch Linux natively, these issues have been resolved by replacing the default pacman file downloader with an alternative (see [[Improve Pacman Performance]] for more details). When installing Arch Linux as a guest OS in [[VirtualBox]], this issue has also been addressed by using "Host interface" instead of "NAT" in the machine properties.}}<br />
<br />
=== Install the base system ===<br />
<br />
The base system is installed using the [https://github.com/falconindy/arch-install-scripts/blob/master/pacstrap.in pacstrap] script.<br />
<br />
The {{ic|-i}} switch can be omitted if you wish to install every package from the ''base'' group without prompting.<br />
<br />
# pacstrap -i /mnt base<br />
<br />
{{Note|If pacman fails to verify your packages, check the system time with {{ic|cal}}. If the system date is invalid (e.g. it shows the year 2010), signing keys will be considered expired (or invalid), signature checks on packages will fail and installation will be interrupted. Make sure to correct the system time, either by doing so manually or with the {{Pkg|ntp}} client, and retry running the pacstrap command. Refer to [[Time]] page for more information on correcting system time.}}<br />
<br />
{{Note|If pacman complains that {{ic|error: failed to commit transaction (invalid or corrupted package)}}, run the following command:<br />
# pacman-key --init && pacman-key --populate archlinux<br />
}}<br />
<br />
This will give you a basic Arch system. Other packages can be installed later using [[pacman]].<br />
<br />
=== Generate an fstab ===<br />
<br />
Generate an [[fstab]] file with the following command. UUIDs will be used because they have certain advantages (see [[fstab#Identifying filesystems]]). If you would prefer to use labels instead, replace the {{ic|-U}} option with {{ic|-L}}.<br />
<br />
# genfstab -U -p /mnt >> /mnt/etc/fstab<br />
# nano /mnt/etc/fstab<br />
<br />
{{Warning|The fstab file should always be checked after generating it. If you encounter errors running genfstab or later in the install process, do '''not''' run genfstab again; just edit the fstab file.}}<br />
<br />
A few considerations:<br />
<br />
* The last field determines the order that in which partitions are checked at start up : {{ic|1}} , {{ic|2}} or {{ic|0}} (see [[fstab#Field definitions]]).<br />
* Only the root ({{ic|/}}) partition needs {{ic|1}} for the last field. Everything else should have either {{ic|2}} or {{ic|0}}.<br />
* You will normally want your ''swap'' partition to have {{ic|0}} i.e. 'do not check'.<br />
<br />
=== Chroot and configure the base system ===<br />
<br />
Next, we [[chroot]] into our newly installed system:<br />
<br />
# arch-chroot /mnt<br />
<br />
{{Note|Use {{ic|arch-chroot /mnt /bin/bash}} to chroot into a bash shell.}}<br />
At this stage of the installation, you will configure the primary configuration files of your Arch Linux base system. These can either be created if they do not exist, or edited if you wish to change the defaults.<br />
<br />
Closely following and understanding these steps is of key importance to ensure a properly configured system.<br />
<br />
==== Locale ====<br />
<br />
Locales are used by '''glibc''' and other locale-aware programs or libraries for rendering text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards.<br />
<br />
There are two files that need editing: {{ic|locale.gen}} and {{ic|locale.conf}}.<br />
<br />
* The {{ic|locale.gen}} file is empty by default (everything is commented out) and you need to remove the {{ic|#}} in front of the line(s) you want. You may uncomment more lines than just English (US), as long as you choose their {{ic|UTF-8}} encoding:<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8<br />
de_DE.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
<br />
This will run on every '''glibc''' upgrade, generating all the locales specified in {{ic|/etc/locale.gen}}.<br />
<br />
* The {{ic|locale.conf}} file does not exist by default. Setting only {{ic|LANG}} should be enough. It will act as the default value for all other variables.<br />
<br />
# echo LANG=en_US.UTF-8 > /etc/locale.conf<br />
# export LANG=en_US.UTF-8<br />
<br />
{{Note|If you set some other language than English (US) at the beginning of the install, the above commands would be something like:<br />
# echo LANG<nowiki>=</nowiki>de_DE.UTF-8 > /etc/locale.conf<br />
# export LANG<nowiki>=</nowiki>de_DE.UTF-8<br />
}}<br />
<br />
To use other locales for other {{ic|LC_*}} variables, run {{ic|locale}} to see the available options and add them to {{ic|locale.conf}}. It is not recommended to set the {{ic|LC_ALL}} variable. An advanced example can be found [[Locale#Setting_system-wide_locale|here]].<br />
<br />
==== Console font and keymap ====<br />
<br />
If you set a keymap at [[#Change_the_language|the beginning]] of the install process, load it now, as well, because the environment has changed. For example:<br />
<br />
# loadkeys ''de-latin1''<br />
# setfont Lat2-Terminus16<br />
<br />
To make them available after reboot, edit {{ic|vconsole.conf}}:<br />
<br />
{{hc|# nano /etc/vconsole.conf|2=<br />
KEYMAP=de-latin1<br />
FONT=Lat2-Terminus16<br />
}}<br />
<br />
* {{ic|KEYMAP}} – Please note that this setting is only valid for your TTYs, not any graphical window managers or Xorg.<br />
<br />
* {{ic|FONT}} – Available alternate console fonts reside in {{ic|/usr/share/kbd/consolefonts/}}. The default (blank) is safe, but some foreign characters may show up as white squares or as other symbols. It is recommended that you change it to {{ic|Lat2-Terminus16}}, because according to {{ic|/usr/share/kbd/consolefonts/README.Lat2-Terminus16}}, it claims to support "about 110 language sets".<br />
<br />
* Possible option {{ic|FONT_MAP}} – Defines the console map to load at boot. Read {{ic|man setfont}}. Removing it or leaving it blank is safe.<br />
<br />
See [[Fonts#Console_fonts|Console fonts]] and {{ic|man vconsole.conf}} for more information.<br />
<br />
==== Time zone ====<br />
<br />
Available time zones and subzones can be found in the {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} directories.<br />
<br />
To view the available <Zone>, check the directory {{ic|/usr/share/zoneinfo/}}:<br />
<br />
# ls /usr/share/zoneinfo/<br />
<br />
Similarly, you can check the contents of directories belonging to a <SubZone>:<br />
<br />
# ls /usr/share/zoneinfo/Europe<br />
<br />
Create a symbolic link {{ic|/etc/localtime}} to your zone file {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} using this command:<br />
<br />
# ln -s /usr/share/zoneinfo/<Zone>/<SubZone> /etc/localtime<br />
<br />
'''Example:'''<br />
<br />
# ln -s /usr/share/zoneinfo/Europe/Minsk /etc/localtime<br />
<br />
==== Hardware clock ====<br />
<br />
Set the hardware clock mode uniformly between your operating systems. Otherwise, they may overwrite the hardware clock and cause time shifts.<br />
<br />
You can generate {{ic|/etc/adjtime}} automatically by using one of the following commands:<br />
<br />
* '''UTC''' (recommended)<br />
<br />
: {{Note|Using [[Wikipedia:Coordinated Universal Time|UTC]] for the hardware clock does not mean that software will display time in UTC.}}<br />
<br />
: {{bc|# hwclock --systohc --utc}}<br />
<br />
To synchronize your "UTC" time over the internet, see [[Network Time Protocol daemon|NTPd]].<br />
<br />
* '''localtime''' (discouraged; used by default in Windows)<br />
<br />
: {{Warning|Using ''localtime'' may lead to several known and unfixable bugs. However, there are no plans to drop support for ''localtime''.}}<br />
<br />
: {{bc|# hwclock --systohc --localtime}}<br />
<br />
If you have (or planning on having) a dual boot setup with Windows:<br />
<br />
* Recommended: Set both Arch Linux and Windows to use UTC. A quick [[Time#UTC in Windows|registry fix]] is needed. Also, be sure to prevent Windows from synchronizing the time on-line, because the hardware clock will default back to ''localtime''.<br />
<br />
* Not recommended: Set Arch Linux to ''localtime'' and disable any time-related services, like [[Network Time Protocol daemon|NTPd]] . This will let Windows take care of hardware clock corrections and you will need to remember to boot into Windows at least two times a year (in Spring and Autumn) when [[Wikipedia:Daylight saving time|DST]] kicks in. So please do not ask on the forums why the clock is one hour behind or ahead if you usually go for days or weeks without booting into Windows.<br />
<br />
==== Kernel modules ====<br />
<br />
{{Tip|This is just an example, you do not need to set it. All needed modules are automatically loaded by udev, so you will rarely need to add something here. Only add modules that you know are missing.}}<br />
<br />
For kernel modules to load during boot, place a {{ic|*.conf}} file in {{ic|/etc/modules-load.d/}}, with a name based on the program that uses them.<br />
<br />
{{hc|# nano /etc/modules-load.d/virtio-net.conf|<br />
# Load 'virtio-net.ko' at boot.<br />
<br />
virtio-net}}<br />
<br />
If there are more modules to load per {{ic|*.conf}}, the module names can be separated by newlines. A good example are the [[VirtualBox#Arch Linux guests|VirtualBox Guest Additions]].<br />
<br />
Empty lines and lines starting with {{ic|#}} or {{ic|;}} are ignored.<br />
<br />
==== Hostname ====<br />
<br />
Set the [[Wikipedia:hostname|hostname]] to your liking (e.g. ''arch''):<br />
<br />
# echo ''myhostname'' > /etc/hostname<br />
<br />
{{Note|There is no need to edit {{ic|/etc/hosts}}.}}<br />
<br />
=== Configure the network ===<br />
<br />
You need to configure the network again, but this time for your newly installed environment. The procedure and prerequisites are very similar to the one described [[#Establish an internet connection|above]], except we are going to make it persistent and automatically run at boot.<br />
<br />
{{Note|For more in-depth information on network configration, visit [[Network Configuration]] and [[Wireless Setup]].}}<br />
<br />
{{Note|If you would like to use the old interface naming scheme (ie. eth* and wlan*) you can accomplish this by creating an empty file at {{ic|/etc/udev/rules.d/80-net-name-slot.rules}} which will mask the file of the same name located under {{ic|/usr/lib/udev/rules.d}} (alternatively, instead of an empty file, using a symlink to {{ic|/dev/null}} is also an acceptable masking method).}}<br />
<br />
==== Wired ====<br />
<br />
===== Dynamic IP =====<br />
<br />
; Using dhcpcd<br />
<br />
If you only use a single fixed wired network connection, you do not need a network management service and can simply enable the {{ic|dhcpcd}} service. Here, {{ic|''interface_name''}} is your wired interface:<br />
<br />
# systemctl enable dhcpcd@''interface_name''.service<br />
<br />
; Using netctl<br />
<br />
Copy a sample profile from {{ic|/etc/netctl/examples}} to {{ic|/etc/netctl}}:<br />
<br />
# cd /etc/netctl<br />
# cp examples/ethernet-dhcp my-network<br />
<br />
Edit the profile as needed (modify {{ic|Interface}}):<br />
<br />
# nano my-network<br />
<br />
Enable the {{ic|my-network}} profile:<br />
<br />
# netctl enable my-network<br />
<br />
; Using netctl-ifplugd<br />
<br />
Alternatively, you can use {{ic|netctl-ifplugd}}, which gracefully handles dynamic connections to new networks:<br />
<br />
Install {{Pkg|ifplugd}}, which is required for {{ic|netctl-ifplugd}}:<br />
<br />
# pacman -S ifplugd<br />
<br />
Then enable for interface that you want:<br />
<br />
# systemctl enable netctl-ifplugd@<interface>.service<br />
<br />
{{Tip|[[Netctl]] also provides {{ic|netctl-auto}}, which can be used to handle wired profiles in conjunction with {{ic|netctl-ifplugd}}.}}<br />
<br />
===== Static IP =====<br />
<br />
; Using netctl<br />
<br />
Copy a sample profile from {{ic|/etc/netctl/examples}} to {{ic|/etc/netctl}}:<br />
<br />
# cd /etc/netctl<br />
# cp examples/ethernet-static my-network<br />
<br />
Edit the profile as needed (modify {{ic|Interface}}, {{ic|Address}}, {{ic|Gateway}} and {{ic|DNS}}):<br />
<br />
# nano my-network<br />
<br />
* Notice the {{ic|/24}} in {{ic|Address}} which is the [[wikipedia:Classless Inter-Domain Routing#CIDR notation|CIDR notation]] of a {{ic|255.255.255.0}} netmask<br />
<br />
Enable above created profile to start it at every boot:<br />
<br />
# netctl enable my-network<br />
<br />
==== Wireless ====<br />
<br />
{{Note|If your wireless adapter requires a firmware (as described in the above [[#Wireless|Establish an internet connection]] section and also [[Wireless Setup#Drivers and firmware|here]]), install the package containing your firmware. Most of the time, the {{Pkg|linux-firmware}} package will contain the needed firmware. Though for some devices, the required firmware might be in its own package. For example:<br />
{{bc|# pacman -S zd1211-firmware}}<br />
See [[Wireless Setup]] for more info.}}<br />
<br />
Install {{pkg|iw}}, {{pkg|wpa_supplicant}} and {{pkg|wpa_actiond}} which you will need to connect to a network:<br />
<br />
# pacman -S iw wpa_supplicant wpa_actiond<br />
<br />
===== Adding wireless networks =====<br />
; Using wifi-menu<br />
<br />
Install {{pkg|dialog}}, which is required for {{ic|wifi-menu}}:<br />
<br />
# pacman -S dialog<br />
<br />
After finishing the rest of this installation and rebooting, you can connect to the network with {{ic|wifi-menu ''interface_name''}} (where {{ic|''interface_name''}} is the interface of your wireless chipset).<br />
<br />
# wifi-menu ''interface_name''<br />
<br />
{{Warning|This must be done *after* your reboot when you are no longer chrooted. The process spawned by this command will conflict with the one you have running outside of the chroot. Alternatively, you could just configure a network profile manually using the following templates so that you do not have to worry about using {{ic|wifi-menu}} at all.}}<br />
<br />
; Using manual netctl profiles<br />
<br />
Copy a network profile from {{ic|/etc/netctl/examples}} to {{ic|/etc/netctl}}:<br />
<br />
# cd /etc/netctl<br />
# cp examples/wireless-wpa my-network<br />
<br />
Edit the profile as needed (modify {{ic|Interface}}, {{ic|ESSID}} and {{ic|Key}}):<br />
<br />
# nano my-network<br />
<br />
===== Connect automatically to known networks =====<br />
Enable the {{ic|netctl-auto}} service, which will connect to known networks and gracefully handle roaming and disconnects:<br />
<br />
# systemctl enable netctl-auto@''interface_name''.service<br />
<br />
{{Tip|[[Netctl]] also provides {{ic|netctl-ifplugd}}, which can be used to handle wired profiles in conjunction with {{ic|netctl-auto}}.}}<br />
<br />
==== Analog modem, ISDN or PPoE DSL ====<br />
<br />
For xDSL, dial-up and ISDN connections, see [[Direct Modem Connection]].<br />
<br />
=== Create an initial ramdisk environment ===<br />
<br />
{{Tip|Most users can skip this step and use the defaults provided in {{ic|mkinitcpio.conf}}. The initramfs image (from the {{ic|/boot}} folder) has already been generated based on this file when the {{Pkg|linux}} package (the Linux kernel) was installed earlier with {{ic|pacstrap}}.}}<br />
<br />
Here you need to set the right [[Mkinitcpio#HOOKS|hooks]] if the root is on a USB drive, if you use RAID, LVM, or if {{ic|/usr}} is on a separate partition.<br />
<br />
Edit {{ic|/etc/mkinitcpio.conf}} as needed and re-generate the initramfs image with:<br />
<br />
# mkinitcpio -p linux<br />
<br />
{{Note|Arch VPS installations on QEMU (e.g. when using {{ic|virt-manager}}) may need {{ic|virtio}} modules in {{ic|mkinitcpio.conf}} to be able to boot.<br />
<br />
{{hc|# nano /etc/mkinitcpio.conf|2=<br />
MODULES="virtio virtio_blk virtio_pci virtio_net"}}}}<br />
<br />
=== Set the root password ===<br />
<br />
Set the root password with:<br />
<br />
# passwd<br />
<br />
=== Install and configure a bootloader ===<br />
<br />
==== For BIOS motherboards ====<br />
<br />
For BIOS systems, two bootloaders are available: Syslinux and GRUB. Choose the bootloader as per your convenience.<br />
<br />
* Syslinux is (currently) limited to loading only files from the partition where it was installed. Its configuration file is considered to be easier to understand. An example configuration can be found [https://bbs.archlinux.org/viewtopic.php?pid=1109328#p1109328 here].<br />
<br />
* GRUB is more feature-rich and supports more complex scenarios. Its configuration file(s) is more similar to a scripting language, which may be difficult for beginners to manually write. It is recommended that they automatically generate one.<br />
<br />
{{Note|Some BIOS systems may have issues with GPT. See http://mjg59.dreamwidth.org/8035.html and http://rodsbooks.com/gdisk/bios.html for more info and possible workarounds.}}<br />
<br />
===== Syslinux =====<br />
<br />
{{Note|If you opted for a GUID partition table for your hard drive earlier, you need to install the {{Pkg|gptfdisk}} package now for this next step to work, assuming you haven't installed it already.}}<br />
<br />
Install the {{Pkg|syslinux}} package and then use the {{ic|syslinux-install_update}} script to automatically ''install'' the bootloader ({{ic|-i}}), mark the partition ''active'' by setting the boot flag ({{ic|-a}}), and install the ''MBR'' boot code ({{ic|-m}}):<br />
<br />
# pacman -S syslinux<br />
# syslinux-install_update -i -a -m<br />
<br />
Configure {{ic|syslinux.cfg}} to point to the right root partition. This step is vital. If it points to the wrong partition, Arch Linux will not boot. Change {{ic|/dev/sda3}} to reflect your root partition ''(if you partitioned your drive as in [[#Prepare the storage drive|the example]], your root partition is sda1)''. Do the same for the fallback entry.<br />
<br />
{{hc|# nano /boot/syslinux/syslinux.cfg|2=<br />
...<br />
LABEL arch<br />
...<br />
APPEND root=/dev/sda3 ro<br />
...}}<br />
<br />
For more information on configuring and using Syslinux, see [[Syslinux]].<br />
<br />
===== GRUB =====<br />
<br />
Install the {{Pkg|grub-bios}} package and then run {{ic|grub-install}} to install the bootloader:<br />
<br />
{{Note|Change {{ic|/dev/sda}} to reflect the drive you installed Arch on. Do not append a partition number (do not use {{ic|sda''X''}}).}}<br />
<br />
{{Note|For GPT-partitioned drives on BIOS motherboards, you also need a "BIOS Boot Partition". See [[GRUB#GUID Partition Table (GPT) specific instructions|GPT-specific instructions]] and [[GRUB#Install_to_GPT_BIOS_boot_partition|Install to GPT BIOS boot partition]] in the GRUB page.}}<br />
<br />
# pacman -S grub-bios<br />
# grub-install --recheck /dev/sda<br />
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
<br />
{{Note| If it is an installation on virtualbox as guest, while running grub-install command as in above, you might get an error like "/usr/sbin/grub-bios-setup: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible". Executing {{ic|parted -s /dev/sda set 1 bios_grub on}} and then retrying ''grub-install'' should solve the problem.}}<br />
<br />
While using a manually created {{ic|grub.cfg}} is absolutely fine, it is recommended that beginners automatically generate one:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} ({{ic|pacman -S os-prober}}) before running the next command.}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
==== For UEFI motherboards ====<br />
<br />
For UEFI boot, the drive needs to be GPT-partitioned and an "[[Unified Extensible Firmware Interface#EFI System Partition|UEFI System Partition]]" (512 MiB or larger, type {{ic|EF00}}, formatted with FAT32) must be present and mounted on {{ic|/boot/efi}}. If you have followed this guide from the beginning, you have already done all of these.<br />
<br />
While there are other [[UEFI Bootloaders|UEFI bootloaders]] available, using EFISTUB is recommended. Below are instructions for setting up EFISTUB and GRUB (of course you choose only one of them).<br />
<br />
{{Note|Syslinux does not yet support UEFI.}}<br />
<br />
===== EFISTUB =====<br />
<br />
The Linux kernel can act as its own bootloader using EFISTUB. This is the UEFI boot method recommended by developers and simpler compared to {{ic|grub-efi-x86_64}}. The steps below set up rEFInd to provide a menu for EFISTUB kernels, as well as for booting other UEFI bootloaders. Alternative EFISTUB boot managers can be found on the page [[UEFI Bootloaders#Booting EFISTUB]]. Both rEFInd and [[gummiboot]] can detect Windows UEFI bootloaders in case of dual-boot.<br />
<br />
1. Mount the UEFI System Partition on {{ic|/mnt/boot/efi}} and chroot back into {{ic|/mnt}}.<br />
<br />
2. [[UEFI Bootloaders#Setting up EFISTUB|Copy the kernel and initramfs files]] to {{ic|/mnt/boot/efi}}:<br />
<br />
# mkdir -p /boot/efi/EFI/arch/<br />
# cp /boot/vmlinu'''z'''-linux /boot/efi/EFI/arch/vmlinuz-arch'''.efi'''<br />
# cp /boot/initramfs-linux.img /boot/efi/EFI/arch/initramfs-arch.img<br />
# cp /boot/initramfs-linux-fallback.img /boot/efi/EFI/arch/initramfs-arch-fallback.img<br />
{{note| If you are going to use rEFInd and you want it to detect kernels in {{ic|/boot}} automatically, you can skip this step}}<br />
<br />
Every time the kernel and initramfs files are updated in {{ic|/boot}}, they need to be updated in {{ic|/boot/efi/EFI/arch}}. This can be automated [[UEFI Bootloaders#Systemd|using systemd]].<br />
<br />
3. For the rEFInd boot manager, install the {{Pkg|refind-efi}} and {{Pkg|efibootmgr}} packages:<br />
<br />
# pacman -S refind-efi<br />
{{note| efibootmgr gets installed as a dependency}}<br />
<br />
4. Install rEFInd to the UEFI System Partition (summarized from [[UEFI Bootloaders#Using rEFInd]]):<br />
<br />
# mkdir -p /boot/efi/EFI/refind<br />
# cp /usr/lib/refind/refind_x64.efi /boot/efi/EFI/refind/refind_x64.efi<br />
# cp /usr/lib/refind/config/refind.conf /boot/efi/EFI/refind/refind.conf<br />
# cp -r /usr/share/refind/icons /boot/efi/EFI/refind/icons<br />
# cp -r /usr/lib/refind/drivers_x64 /boot/efi/EFI/refind/drivers<br />
<br />
5. Create a {{ic|refind_linux.conf}} file with the kernel parameters to be used by rEFInd:<br />
<br />
{{note| If you don't want rEFInd to automatically detect the kernel, you have to place {{ic|refind_linux.conf}} where you copied the kernel and initramfs files.}}<br />
# cp /usr/lib/refind/config/refind_linux.conf /boot/refind_linux.conf<br />
# nano /boot/refind_linux.conf<br />
Edit the {{ic|PARTUUID}} value to match the PARTUUID of your root partition. You can find out what the PARTUUID is by using {{ic|$ ls -l /dev/disk/by-partuuid/}}. <br />
If you don't want to use the PARTUUID, you can set {{ic|root&#61;/dev/sdXY}}. This refers to the root partition, not the boot partition, if you created them separately. <br />
You also need to set the {{ic|rootfstype}}. If you use ext4 on the root partition, it looks like this: {{ic|rootfstype&#61;ext4}}<br />
<br />
6. Add rEFInd to UEFI boot menu using [[UEFI#efibootmgr|efibootmgr]]. Replace X and Y with the drive and partition of the UEFI System Partition. For example, in {{ic|/dev/sdc5}}, X is "c" and Y is "5".<br />
<br />
{{Warning|Using {{ic|efibootmgr}} on Apple Macs may brick the firmware and may need reflash of the motherboard ROM. For Macs, use {{AUR|mactel-boot}}, or "bless" from within OS X.}}<br />
<br />
# modprobe efivars<br />
# efibootmgr -c -d /dev/sdX -p Y -w -L "rEFInd" -l '\EFI\refind\refind_x64.efi'<br />
<br />
{{Note|On some systems, the above command will not work properly. It will execute without any visible error, but the UEFI boot menu will not have been correctly updated with a new entry. To determine whether the command executed properly, run {{ic|efibootmgr}} without any arguments and see if a new entry has appeared in the list displayed. If there is no new entry, then it will not be possible to enter rEFInd upon reboot, as the UEFI boot menu has been left unchanged. In this case, you will instead have to enter the UEFI shell and manually add an entry to the UEFI boot menu with the {{ic|bcfg}} command, as described [[Unified Extensible Firmware Interface#bcfg|here]].}}<br />
<br />
{{Note|On some ASUS motherboards, there is an EFI bug that always reports {{ic|MaxVariableSize&#61;0}}. Combined with a recent kernel that enforces checks on this value, this prevents {{ic|efibootmgr}} from setting new EFI variables. These motherboards do not support the UEFI Shell v2, so you cannot use the {{ic|bcfg}} method either. To work around this, add {{ic|efi_no_storage_paranoia}} to the kernel command line. You can do this by pressing "e" at the bootloader menu.}}<br />
<br />
===== GRUB =====<br />
<br />
Install the {{Pkg|grub-efi-x86_64}} and {{Pkg|efibootmgr}} packages and then run {{ic|grub-install}} to install the bootloader:<br />
<br />
{{Note|In case you have a system with 32-bit EFI, like pre-2008 Apple Macs, install {{ic|grub-efi-i386}} instead of {{ic|grub-efi-x86_64}}.}}<br />
<br />
# pacman -S grub-efi-x86_64 efibootmgr<br />
# grub-install --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
<br />
Next, while using a manually created {{ic|grub.cfg}} is absolutely fine, it is recommended that beginners automatically generate one:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} ({{ic|pacman -S os-prober}}) before running the next command.}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
{{Note|{{ic|grub-install}} should create a new entry in the UEFI boot menu. If it does not, you will instead have to enter the UEFI shell and manually add an entry to the UEFI boot menu with the {{ic|bcfg}} command, as described [[Unified Extensible Firmware Interface#bcfg|here]].}}<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
=== Unmount the partitions and reboot ===<br />
<br />
Exit from the chroot environment:<br />
<br />
# exit<br />
<br />
Since the partitions are mounted under {{ic|/mnt}}, we use the following command to unmount them:<br />
<br />
# umount /mnt/{boot,home,}<br />
<br />
Reboot the computer:<br />
<br />
# reboot<br />
<br />
{{Tip|If you face error "/sbin/init does not exist" on next boot, look for systemd binary path and pass it as kernel argument while booting up. For example, "init &#61; /usr/lib/systemd/systemd" }}<br />
{{Tip|Be sure to remove the installation media, otherwise you will boot back into it.}}<noinclude><br />
{{Beginners' Guide navigation}}</noinclude></div>Mid-kidhttps://wiki.archlinux.org/index.php?title=Unified_Extensible_Firmware_Interface&diff=263018Unified Extensible Firmware Interface2013-06-16T17:02:40Z<p>Mid-kid: Looks like somebody derp'd</p>
<hr />
<div>[[Category:Boot process]]<br />
[[es:Unified Extensible Firmware Interface]]<br />
[[it:Unified Extensible Firmware Interface]]<br />
[[ja:Unified Extensible Firmware Interface]]<br />
[[ru:Unified Extensible Firmware Interface]]<br />
[[zh-CN:Unified Extensible Firmware Interface]]<br />
{{Article summary start}}<br />
{{Article summary text|An overview of the Unified Extensible Firmware Interface.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Boot process overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|GUID Partition Table}}<br />
{{Article summary wiki|Master Boot Record}}<br />
{{Article summary wiki|Arch Boot Process}}<br />
{{Article summary end}}<br />
<br />
'''Unified Extensible Firmware Interface''' (or UEFI for short) is a new type of firmware that was initially designed by Intel (known as EFI then) mainly for its Itanium based systems. It introduces new ways of booting an OS that is distinct from the commonly used "MBR boot code" method followed for BIOS systems. It started as Intel's EFI in versions 1.x and then a group of companies called the UEFI Forum took over its development from which it was called Unified EFI starting with version 2.0 . As of 23 May 2012, UEFI Specification 2.3.1 is the most recent version.<br />
<br />
{{Note|Unless specified as EFI 1.x , EFI and UEFI terms are used interchangeably to denote UEFI 2.x firmware. Also unless stated explicitly, these instructions are general and some of them may not work or may be different in Macs. Apple's EFI implementation is neither a EFI 1.x version nor UEFI 2.x version but mixes up both. This kind of firmware does not fall under any one UEFI Specification version and therefore it is not a standard UEFI firmware.}}<br />
<br />
== Booting an OS using BIOS ==<br />
<br />
A BIOS or Basic Input-Output System is the very first program that is executed once the system is switched on. After all the hardware has been initialized and the POST operation has completed, the BIOS executes the first boot code in the first device in the device booting list. <br />
<br />
If the list starts with a CD/DVD drive, then the El-Torito entry in the CD/DVD is executed. This is how bootable CD/DVD works. If the list starts with a HDD, then BIOS executes the very first 440 bytes MBR boot code. The boot code then chainloads or bootstraps a much larger and complex bootloader which then loads the OS.<br />
<br />
Basically, the BIOS does not know how to read a partition table or filesystem. All it does is initialize the hardware, then load and run the 440-byte boot code.<br />
<br />
=== Multiboot on BIOS ===<br />
<br />
Since very little can be achieved by a program that fits into the 440-byte boot code area, multi-booting using BIOS requires a multi-boot capable bootloader (multi-boot refers to booting multiple operating systems, not to booting a kernel in the Multiboot format specified by the GRUB developers). So usually a common bootloader like [[GRUB]] or [[Syslinux]] or [[LILO]] would be loaded by the BIOS, and it would load an operating system by either chain-loading or directly loading the kernel.<br />
<br />
== Booting an OS using UEFI ==<br />
<br />
UEFI firmware does not support booting through the above mentioned method which is the only way supported by BIOS. UEFI has support for reading both the partition table as well as understanding filesystems. <br />
<br />
The commonly used UEFI firmwares support both MBR and GPT partition table. EFI in Apple-Intel Macs are known to also support Apple Partition Map besides MBR and GPT. Most UEFI firmwares have support for accessing FAT12 (floppy disks), FAT16 and FAT32 filesystems in HDDs and ISO9660 (and UDF) in CD/DVDs. EFI in Apple-Intel Macs can access HFS/HFS+ filesystems also apart from the mentioned ones.<br />
<br />
UEFI does not launch any boot code in the MBR whether it exists or not. Instead it uses a special partition in the partition table called ''EFI SYSTEM PARTITION'' in which files required to be launched by the firmware are stored. Each vendor can store its files under {{ic|<EFI SYSTEM PARTITION>/EFI/<VENDOR NAME>/}} folder and can use the firmware or its shell (UEFI shell) to launch the boot program. An EFI System Partition is usually formatted as FAT32.<br />
<br />
{{Note|On some UEFI systems the only possible way to launch UEFI application on boot (if it doesn't have custom entry in UEFI boot menu) is to put it in this fixed location: {{ic|<EFI SYSTEM PARTITION>/EFI/boot/bootx64.efi}} (for 64-bit x86 system)}}<br />
<br />
Under UEFI, every program whether it is an OS loader or a utility (e.g. a memory testing app or recovery tool), should be a UEFI Application corresponding to the EFI firmware architecture. The vast majority of UEFI firmwares, including recent Apple Macs, use x86_64 EFI firmware. The only known devices that use i386 EFI are older (pre 2008) Apple Macs.<br />
<br />
{{Note|Some older Intel Server boards are known to operate on Intel EFI 1.10 firmware, and require i386 EFI applications.}}<br />
<br />
An x86_64 EFI firmware does not include support for launching 32-bit EFI apps unlike x86_64 Linux and Windows versions which include such support. Therefore the bootloader must be compiled for that specific architecture.<br />
<br />
=== Multibooting on UEFI ===<br />
<br />
Since each OS or vendor can maintain its own files within the EFI SYSTEM PARTITION without affecting the other, multi-booting using UEFI is just a matter of launching a different UEFI application corresponding to the particular OS's bootloader. This removes the need for relying on chainloading mechanisms of one bootloader to load another to switch OSes.<br />
<br />
==== Multibooting Windows and Linux ====<br />
<br />
64-bit Windows Vista (SP1+), Windows 7 and Windows 8 versions support booting using UEFI firmware. These Windows versions support either UEFI-GPT booting or BIOS-MBR booting. 32-bit Windows versions only support BIOS-MBR booting. See http://support.microsoft.com/kb/2581408 for more info.<br />
<br />
This limitation does not exist in Linux Kernel but rather depends on the bootloader used. For the sake of Windows UEFI booting, the Linux bootloader used should also be installed in UEFI-GPT mode if booting from the same disk.<br />
<br />
[[Unified_Extensible_Firmware_Interface#Windows_7_won.27t_boot_in_UEFI_Mode]]<br />
<br />
== Boot Process under UEFI ==<br />
<br />
# System switched on - Power On Self Test, or POST process.<br />
# UEFI firmware is loaded.<br />
# Firmware reads its Boot Manager to determine which UEFI application to be launched and from where (ie. from which disk and partition).<br />
# Firmware launches the UEFI application from the FAT32 formatted UEFISYS partition as defined in the boot entry in the firmware's boot manager.<br />
# UEFI application may launch another application (in case of UEFI Shell or a boot manager like rEFInd) or the kernel and initramfs (in case of a bootloader like GRUB) depending on how the UEFI application was configured.<br />
<br />
== Detecting UEFI Firmware Arch ==<br />
<br />
If you have a non-Mac UEFI system, then you most likely have a x86_64 (aka 64-bit) UEFI 2.x firmware. A few known x86_64 UEFI 2.x firmwares are Phoenix SecureCore Tiano, AMI Aptio and Insyde H2O.<br />
<br />
Pre-2008 Macs mostly have i386-efi firmware while >=2008 Macs have mostly x86_64-efi. All Macs capable of running Mac OS X Snow Leopard 64-bit Kernel have x86_64 EFI 1.x firmware. <br />
<br />
To find out the arch of the efi firmware in a Mac, type the following into the terminal:<br />
ioreg -l -p IODeviceTree | grep firmware-abi<br />
If the command returns EFI32 then it is i386 EFI 1.x firmware. If it returns EFI64 then it is x86_64 EFI 1.x firmware. Macs do not have UEFI 2.x firmware as Apple's EFI implementation is not fully compliant with UEFI Specification.<br />
<br />
== UEFI Support in Linux Kernel ==<br />
<br />
=== Linux Kernel config options for UEFI ===<br />
<br />
The required Linux Kernel configuration options for UEFI systems are :<br />
<br />
CONFIG_RELOCATABLE=y<br />
CONFIG_EFI=y<br />
CONFIG_EFI_STUB=y<br />
CONFIG_FB_EFI=y<br />
CONFIG_FRAMEBUFFER_CONSOLE=y<br />
<br />
UEFI Runtime Variables Support (efivarfs filesystem - {{ic|/sys/firmware/efi/efivars}}). This option is important as this is required to manipulate UEFI Runtime Variables using tools like {{ic|/usr/bin/gummiboot}}. '''Efivarfs''' is recommended over '''efivars sysfs''' interface (described below). The below config option has been added in kernel 3.10 and above.<br />
<br />
CONFIG_EFIVAR_FS=y<br />
<br />
UEFI Runtime Variables Support ('''efivars sysfs''' interface - {{ic|/sys/firmware/efi/vars}}). This option is important as this is required to manipulate UEFI Runtime Variables using tools like {{ic|efibootmgr}}.<br />
<br />
CONFIG_EFI_VARS=m<br />
CONFIG_EFI_VARS_PSTORE=m<br />
CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y<br />
<br />
{{Note|For Linux to access UEFI Runtime Services, the UEFI Firmware processor architecture and the Linux kernel processor architecture must match. This is independent of the bootloader used.}}<br />
<br />
{{Note|If the UEFI Firmware arch and Linux Kernel arch are different, then the "'''noefi'''" kernel parameter must be used to avoid the kernel panic and boot successfully. The "noefi" option instructs the kernel not to access the UEFI Runtime Services.}}<br />
<br />
GUID Partition Table [[GPT]] config option - mandatory for UEFI support<br />
<br />
CONFIG_EFI_PARTITION=y<br />
<br />
{{Note|All of the above options are required to boot Linux via UEFI, and are enabled in Archlinux kernels in official repos.}}<br />
<br />
Retrieved from http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob_plain;f=Documentation/x86/x86_64/uefi.txt;hb=HEAD .<br />
<br />
== UEFI Variables Support ==<br />
<br />
UEFI defines variables through which an operating system can interact with the firmware. UEFI Boot Variables are used by the boot-loader and used by the OS only for early system start-up. UEFI Runtime Variables allow an OS to manage certain settings of the firmware like the UEFI Boot Manager or managing the keys for UEFI Secure Boot Protocol etc.<br />
<br />
{{Note|The below steps will not work if the system has been booted in BIOS mode and will not work if the UEFI processor architecture does not match the kernel one, i.e. x86_64 UEFI + x86 32-bit Kernel and vice-versa config will not work. This is true only for efivars kernel module and efibootmgr step. The other steps (ie. upto setting up <UEFISYS>/EFI/arch/refind/{refindx64.efi,refind.conf} ) can be done even in BIOS/Legacy boot mode.}}<br />
<br />
Access to UEFI Runtime services is provided by "efivars" kernel module which is enabled through the {{ic|<nowiki>CONFIG_EFI_VARS=y</nowiki>}} kernel config option. This module exposes the variables under the directory {{ic|/sys/firmware/efi/vars}} (for kernels >=3.8 through {{ic|/sys/firmware/efi/efivars}}). One way to check whether the system has booted in UEFI boot mode is to check for the existence of {{ic|/sys/firmware/efi/vars}} (and in kernels >=3.8 for {{ic|/sys/firmware/efi/efivars}})directory with contents similar to :<br />
<br />
Sample output (x86_64-UEFI 2.3.1 in x86_64 Kernel):<br />
<br />
# ls -1 /sys/firmware/efi/vars/<br />
Boot0000-8be4df61-93ca-11d2-aa0d-00e098032b8c/<br />
BootCurrent-8be4df61-93ca-11d2-aa0d-00e098032b8c/<br />
BootOptionSupport-8be4df61-93ca-11d2-aa0d-00e098032b8c/<br />
BootOrder-8be4df61-93ca-11d2-aa0d-00e098032b8c/<br />
ConIn-8be4df61-93ca-11d2-aa0d-00e098032b8c/<br />
ConInDev-8be4df61-93ca-11d2-aa0d-00e098032b8c/<br />
ConOut-8be4df61-93ca-11d2-aa0d-00e098032b8c/<br />
ConOutDev-8be4df61-93ca-11d2-aa0d-00e098032b8c/<br />
ErrOutDev-8be4df61-93ca-11d2-aa0d-00e098032b8c/<br />
Lang-8be4df61-93ca-11d2-aa0d-00e098032b8c/<br />
LangCodes-8be4df61-93ca-11d2-aa0d-00e098032b8c/<br />
MTC-eb704011-1402-11d3-8e77-00a0c969723b/<br />
MemoryTypeInformation-4c19049f-4137-4dd3-9c10-8b97a83ffdfa/<br />
PlatformLang-8be4df61-93ca-11d2-aa0d-00e098032b8c/<br />
PlatformLangCodes-8be4df61-93ca-11d2-aa0d-00e098032b8c/<br />
RTC-378d7b65-8da9-4773-b6e4-a47826a833e1/<br />
del_var<br />
new_var<br />
<br />
The UEFI Runtime Variables will not be exposed to the OS if you have used "noefi" kernel parameter in the boot-loader menu. This parameter instructs the kernel to completely ignore UEFI Runtime Services.<br />
<br />
=== Userspace Tools ===<br />
<br />
There are few tools that can access/modify the UEFI variables, namely<br />
<br />
# efibootmgr - Used to create/modify boot entries in the UEFI Boot Manager - {{Pkg|efibootmgr}} or {{AUR|efibootmgr-git}}<br />
# uefivars - simply dumps the variables - {{AUR|uefivars-git}} - uses efibootmgr library<br />
# Ubuntu's Firmware Test Suite - fwts - {{AUR|fwts-git}} - uefidump command - {{ic|fwts uefidump}} <br />
<br />
=== Non-Mac UEFI systems ===<br />
<br />
==== efibootmgr ====<br />
<br />
{{Warning|Using {{ic|efibootmgr}} in Apple Macs will brick the firmware and may need reflash of the motherboard ROM. There have been bug reports regarding this in Ubuntu/Launchpad bug tracker. Use bless command alone in case of Macs. Experimental "bless" utility for Linux by Fedora developers - {{AUR|mactel-boot}}.}}<br />
<br />
{{Note|{{ic|efibootmgr}} command will work only if you have booted the system in UEFI mode itself, since it '''requires access to UEFI Runtime Variables''' which are '''available only in UEFI boot mode''' (with "noefi" kernel parameter NOT being used). Otherwise the message {{ic|Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables}} is shown.}}<br />
<br />
{{Note| If you are unable to use {{ic|efibootmgr}}, some UEFI BIOSes allow users to directly manage uefi boot options from within the BIOS. For example, some ASUS BIOSes have a "Add New Boot Option" choice which enables you to select a local EFI system partition and manually enter the EFI stub location. (for example '\EFI\refind\refind_x64.efi')}}<br />
<br />
Initially the user may be required to manually launch the boot-loader from the firmware itself (using maybe the UEFI Shell) if the UEFI boot-loader was installed when the system is booted in BIOS mode. Then {{ic|efibootmgr}} should be run to make the UEFI boot-loader entry as the default entry in the UEFI Boot Manager.<br />
<br />
To use efibootmgr, first load the 'efivars' kernel module (if compiled as a external module):<br />
<br />
# modprobe efivars<br />
<br />
If you get '''no such device found''' error for this command, that means you have not booted in UEFI mode or due to some reason the kernel is unable to access UEFI Runtime Variables (noefi?).<br />
<br />
Verify whether there are files in ''/sys/firmware/efi/vars/'' (and ''/sys/firmware/efi/efivars/'' for kernel >=3.8) directory. This directory and its contents are created by "efivars" kernel module and it will exist only if you have booted in UEFI mode, without the "noefi" kernel parameter.<br />
<br />
If ''/sys/firmware/efi/vars/'' directory is empty or does not exist, then {{ic|efibootmgr}} command will not work. If you are unable to make the ISO/CD/DVD/USB boot in UEFI mode try [[#Create_UEFI_bootable_USB_from_ISO]].<br />
<br />
{{Note| The below commands use {{Pkg|refind-efi}} boot-loader as example.}}<br />
<br />
Assume the boot-loader file to be launched is {{ic|/boot/efi/EFI/refind/refind_x64.efi}}. {{ic|/boot/efi/EFI/refind/refind_x64.efi}} can be split up as {{ic|/boot/efi}} and {{ic|/EFI/refind/refind_x64.efi}}, wherein {{ic|/boot/efi}} is the mountpoint of the EFI System Partition, which is assumed to be {{ic|/dev/sdXY}} (here X and Y are just placeholders for the actual values - eg:- in {{ic|/dev/sda1}} , X=a Y=1).<br />
<br />
To determine the actual device path for the UEFI System Partition (should be in the form {{ic|/dev/sdXY}}), try :<br />
<br />
# findmnt /boot/efi<br />
TARGET SOURCE FSTYPE OPTIONS<br />
/boot/efi /dev/sdXY vfat rw,flush,tz=UTC<br />
<br />
Then create the boot entry using efibootmgr as follows :<br />
<br />
# efibootmgr -c -w -d /dev/sdX -p Y -l '\EFI\refind\refind_x64.efi' -L "rEFInd"<br />
<br />
In the above command {{ic|/boot/efi/EFI/refind/refind_x64.efi}} translates to {{ic|/boot/efi}} and {{ic|/EFI/refind/refind_x64.efi}} which in turn translate to drive {{ic|/dev/sdX}} -> partition {{ic|Y}} -> file {{ic|/EFI/refind/refind_x64.efi}}.<br />
<br />
UEFI uses backward slash as path separator (similar to Windows paths).<br />
<br />
The 'label' is the name of the menu entry shown in the UEFI boot menu. This name is user's choice and does not affect the booting of the system. More info can be obtained from [http://linux.dell.com/cgi-bin/cgit.cgi/efibootmgr.git/plain/README efibootmgr GIT README] .<br />
<br />
FAT32 filesystem is case-insensitive since it does not use UTF-8 encoding by default. In that case the firmware uses capital 'EFI' instead of small 'efi', therefore using {{ic|\EFI\gummiboot\gummibootx64.efi}} or {{ic|\efi\refind\refind_x64.efi}} does not matter (this will change if the filesystem encoding is UTF-8).<br />
<br />
== Linux Bootloaders for UEFI ==<br />
<br />
See [[UEFI Bootloaders]].<br />
<br />
== EFI System Partition ==<br />
<br />
{{Note|UEFI System Partition and EFI System Partition (ESP) are same, the terminologies are used interchangeably in some places.}}<br />
<br />
{{Note|The ESP should be accessible by the UEFI firmware, which cannot read LVM and software RAID systems.}}<br />
<br />
{{Note|Setting "boot" flag in parted in a MBR partition marks that partition as active, while the same "boot" flag in a GPT partition marks that partition as "UEFI System Partition".}}<br />
<br />
The EFI System Partition needs to be formatted with a FAT32 filesystem (non-FAT filesystems like ext2/3/4, reiserfs, NTFS, UDF etc. are not supported). Although ESPs with size >=100 MiB and formatted as FAT32 are allowed by Microsoft Windows and many Linux distros, Microsoft documentation specifies that the minimum partition/volume size for FAT32 is 512 MiB. Therefore an ESP should be at least 512 MiB size for maximum compatibility. If you are using Linux EFISTUB booting, then you need to make sure there is adequate space available for keeping the Kernel and Initramfs files in the ESP.<br />
<br />
It is recommended to use always GPT for UEFI boot as some UEFI firmwares do not allow UEFI-MBR boot.<br />
<br />
=== For GPT partitioned disks ===<br />
Two choices:<br />
* Using GNU Parted/GParted: Create a FAT32 partition. Set "boot" flag on for that partition.<br />
* Using GPT fdisk (aka gdisk): Create a partition with partition type {{ic|ef00}}. Then format that partition as FAT32 using {{ic|mkfs.vfat -F32 /dev/<THAT_PARTITION>}}<br />
<br />
=== For MBR partitioned disks ===<br />
Two choices:<br />
* Using GNU Parted/GParted: Create FAT32 partition. Change the type code of that partition to {{ic|0xEF}} using fdisk, cfdisk or sfdisk.<br />
* Using fdisk: Create a partition with partition type {{ic|0xEF}}. Then format that partition as FAT32 using {{ic|mkfs.vfat -F32 /dev/<THAT_PARTITION>}}<br />
<br />
== UEFI Shell ==<br />
<br />
The UEFI Shell is a shell/terminal for the firmware which allows launching uefi applications which include uefi bootloaders. Apart from that, the shell can also be used to obtain various other information about the system or the firmware like memory map (memmap), modifying boot manager variables (bcfg), running partitioning programs (diskpart), loading uefi drivers, editing text files (edit), hexedit etc. <br />
<br />
=== UEFI Shell download links === <br />
<br />
You can download a BSD licensed UEFI Shell from Intel's Tianocore UDK/EDK2 Sourceforge.net project.<br />
<br />
* [https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi x86_64 UEFI Shell 2.0 (Beta)] - [http://dl.dropbox.com/u/9710721/UEFI_Shell/shellx64_v2.efi Alternate download link] (compiled from SVN repo, try this link if the file downloaded from previous link does not work in your system)<br />
<br />
* [https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/EdkShellBinPkg/FullShell/X64/Shell_Full.efi x86_64 UEFI Shell 1.0 (Old)]<br />
* [https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/Ia32/Shell.efi i386 UEFI Shell 2.0 (Beta)]<br />
* [https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/EdkShellBinPkg/FullShell/Ia32/Shell_Full.efi i386 UEFI Shell 1.0 (Old)]<br />
<br />
Shell 2.0 works only in UEFI 2.3+ systems and is recommended over Shell 1.0 in those systems. Shell 1.0 should work in all UEFI systems irrespective of the spec. version the firmware follows. More info at [http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=ShellPkg ShellPkg] and [http://sourceforge.net/mailarchive/message.php?msg_id=28690732 this mail]<br />
<br />
=== Launching UEFI Shell ===<br />
<br />
Few Asus and other AMI Aptio x86_64 UEFI firmware based motherboards (from Sandy Bridge onwards) provide an option called {{ic|"Launch EFI Shell from filesystem device"}} . For those motherboards, download the x86_64 UEFI Shell and copy it to your UEFI SYSTEM PARTITION as {{ic|<UEFI_SYSTEM_PARTITION>/shellx64.efi}} (mostly {{ic|/boot/efi/shellx64.efi}}) .<br />
<br />
Systems with Phoenix SecureCore Tiano UEFI firmware are known to have embedded UEFI Shell which can be launched using either F6, F11 or F12 key.<br />
<br />
{{Note|If you are unable to launch UEFI Shell from the firmware directly using any of the above mentioned methods, create a FAT32 USB pen drive with Shell.efi copied as (USB)/efi/boot/bootx64.efi . This USB should come up in the firmware boot menu. Launching this option will launch the UEFI Shell for you.}}<br />
<br />
=== Important UEFI Shell Commands === <br />
<br />
UEFI Shell commands usually support {{ic|-b}} option which makes output pause after each page. {{ic|map}} lists recognized filesystems ({{ic|fs0}}, ...) and data storage devices ({{ic|blk0}}, ...). Run {{ic|help -b}} to list available commands.<br />
<br />
More info at http://software.intel.com/en-us/articles/efi-shells-and-scripting/<br />
<br />
==== bcfg ====<br />
<br />
BCFG command is used to modify the UEFI NVRAM entries, which allow the user to change the boot entries or driver options. This command is described in detail in page 83 (Section 5.3) of "UEFI Shell Specification 2.0" pdf document.<br />
<br />
{{Note| Users are recommended to try {{ic|bcfg}} only if {{ic|efibootmgr}} fails to create working boot entries in their system.}}<br />
<br />
{{Note| UEFI Shell v1 official binary does not support {{ic|bcfg}} command. You can download a [http://dl.dropbox.com/u/17629062/Shell2.zip modified UEFI Shell v2 binary] which may work in UEFI pre-2.3 firmwares.}}<br />
<br />
To dump a list of current boot entries -<br />
<br />
Shell> bcfg boot dump -v<br />
<br />
To add a boot menu entry for rEFInd (for example) as 4th (numbering starts from zero) option in the boot menu<br />
<br />
Shell> bcfg boot add 3 fs0:\EFI\refind\refind_x64.efi "rEFInd"<br />
<br />
where fs0: is the mapping corresponding to the UEFI System Partition and fs0:\EFI\refind\refind_x64.efi is the file to be launched.<br />
<br />
To remove the 4th boot option<br />
<br />
Shell> bcfg boot rm 3<br />
<br />
To move the boot option #3 to #0 (i.e. 1st or the default entry in the UEFI Boot menu)<br />
<br />
Shell> bcfg boot mv 3 0<br />
<br />
For bcfg help text<br />
<br />
Shell> help bcfg -v -b<br />
<br />
or<br />
<br />
Shell> bcfg -? -v -b<br />
<br />
==== edit ====<br />
<br />
EDIT command provides a basic text editor with an interface similar to nano text editor, but slightly less functional. It handles UTF-8 encoding and takes care or LF vs CRLF line endings.<br />
<br />
To edit, for example rEFInd's refind.conf in the UEFI System Partition (fs0: in the firmware)<br />
<br />
Shell> fs0:<br />
FS0:\> cd \EFI\arch\refind<br />
FS0:\EFI\arch\refind\> edit refind.conf<br />
<br />
Type {{ic|Ctrl-E}} for help.<br />
<br />
== Hardware Compatibility ==<br />
<br />
Main page [[HCL/Firmwares/UEFI]]<br />
<br />
== Create UEFI bootable USB from ISO ==<br />
<br />
{{Note|1=The instructions below are specifically for [[Archiso]]/official media; [[Archboot]] preparation is identical, with this [https://bbs.archlinux.org/viewtopic.php?pid=1190788#p1190788 refind.conf] instead of the one mentioned below (which is for Archiso) and without the filesystem label requirement.}}<br />
<br />
{{Note|The USB can use either MBR or GPT partition table (so it is fine to use an already partitioned USB). The filesystem should be either FAT32 (recommended), FAT16, or FAT12.}}<br />
<br />
* First create a partition table and at least one partition in the USB. Mount the ISO image from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
<br />
# mkdir -p /mnt/{usb,iso}<br />
# mount -o loop archlinux-2013.06.01-dual.iso /mnt/iso<br />
<br />
* Then create a FAT32 filesystem in the partition on the USB (unmount before if necessary) with LABEL as used in the Archiso configuration. Obtain the label from {{ic|/mnt/iso/loader/entries/archiso-x86_64.conf}}; this is used by the {{ic|archiso}} hook in initramfs to identify the udev path to the installation media. {{ic|mkfs.vfat}} is part of package {{Pkg|dosfstools}}.<br />
<br />
# mkfs.vfat -F32 /dev/sdXY -n ''label'' #E.g. ARCH_201306<br />
<br />
* Mount the newly created FAT32 USB partition, and copy the contents of the installation media to the USB media.<br />
<br />
# mount /dev/sdXY /mnt/usb<br />
# cp -a /mnt/iso/* /mnt/usb<br />
# sync<br />
# umount /mnt/{usb,iso}<br />
<br />
=== Fixing errors ===<br />
<br />
If you find the error: ''"No loader found. Configuration files in /loader/entries/*.conf are needed."'' First, try to convert filenames in /loader/entries/ to lower case. A possible fix is to use a different uefi bootloader to the included one, gummiboot.<br />
<br />
Download [https://www.archlinux.org/packages/extra/any/refind-efi/download/ refind-efi pkg] and extract the file {{ic|/usr/lib/refind/refind_x64.efi}} from within the package to {{ic|(USB)/EFI/boot/bootx64.efi}} (overwrite or rename any existing {{ic|(USB)/EFI/boot/bootx64.efi}} file).<br />
<br />
Then copy this text to {{ic|EFI/boot/refind.conf}}. Take care that the label in the Arch menu section ({{ic|ARCH_201304}} here) matches that of your usb's.<br />
<br />
{{hc|refind.conf|<nowiki><br />
timeout 5<br />
textonly<br />
<br />
showtools about,reboot,shutdown,exit<br />
# scan_driver_dirs EFI/tools/drivers_x64<br />
scanfor manual,internal,external,optical<br />
<br />
scan_delay 1<br />
dont_scan_dirs EFI/boot<br />
<br />
max_tags 0<br />
default_selection "Arch Linux Archiso x86_64 UEFI USB"<br />
<br />
menuentry "Arch Linux Archiso x86_64 UEFI USB" {<br />
loader /arch/boot/x86_64/vmlinuz<br />
initrd /arch/boot/x86_64/archiso.img<br />
ostype Linux<br />
graphics off<br />
options "archisobasedir=arch archisolabel=ARCH_201304 add_efi_memmap"<br />
}<br />
<br />
menuentry "UEFI x86_64 Shell v2" {<br />
loader /EFI/shellx64_v2.efi<br />
graphics off<br />
}<br />
<br />
menuentry "UEFI x86_64 Shell v1" {<br />
loader /EFI/shellx64_v1.efi<br />
graphics off<br />
}<br />
</nowiki>}}<br />
<br />
You should now be able to successfully boot, and you can choose which EFI you'd like to load.<br />
<br />
== Remove UEFI boot support from ISO ==<br />
<br />
{{Warning|In the event that UEFI+isohybrid El Torito/MBR really causes problems, it would be better to just UEFI boot using the USB stick instructions in the previous section}}<br />
<br />
Most of the 32-bit EFI Macs and some 64-bit EFI Macs refuse to boot from a UEFI(X64)+BIOS bootable CD/DVD. If one wishes to proceed with the installation using optical media, it might be necessary to remove UEFI support first.<br />
<br />
Mount the official installation media and obtain the {{ic|archisolabel}} as shown in the previous section.<br />
<br />
Rebuild the ISO using {{ic|xorriso}} from {{pkg|libisoburn}}:<br />
<br />
{{bc|1=<nowiki><br />
$ xorriso -as mkisofs -iso-level 3 \<br />
-full-iso9660-filenames\<br />
-volid "ARCH_201212" \<br />
-appid "Arch Linux CD" \<br />
-publisher "Arch Linux <https://www.archlinux.org>" \<br />
-preparer "prepared like a BAWSE" \<br />
-eltorito-boot isolinux/isolinux.bin \<br />
-eltorito-catalog isolinux/boot.cat \<br />
-no-emul-boot -boot-load-size 4 -boot-info-table \<br />
-isohybrid-mbr "/mnt/iso/isolinux/isohdpfx.bin" \<br />
-output "~/archiso.iso" "/mnt/iso/"</nowiki>}}<br />
<br />
Burn {{ic|~/archiso.iso}} to optical media and proceed with installation normally.<br />
<br />
== QEMU with OVMF ==<br />
<br />
OVMF [http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=OVMF] is a project to enable UEFI support for Virtual Machines. OVMF contains a sample UEFI firmware for QEMU and KVM.<br />
<br />
You can build OVMF from AUR [https://aur.archlinux.org/packages/ovmf-svn/] and use it like this:<br />
<br />
qemu-system-x86_64 -bios /usr/share/ovmf/bios.bin ...<br />
<br />
== Troubleshooting ==<br />
<br />
=== Windows 7 won't boot in UEFI Mode ===<br />
If you have installed Windows to a different harddisk with GPT partitioning and still have a MBR partitioned harddisk in your computer, then it is possible that the UEFI BIOS is starting it's CSM support (for booting MBR partitions) and therefor Windows won't boot. To solve this merge your MBR harddisk to GPT partitioning or disable the SATA port where the MBR harddisk is plugged in or unplug the SATA connector from this harddisk.<br />
<br />
<br />
Mainboards with this kind of problem:<br />
<br />
Gigabyte Z77X-UD3H rev. 1.1 (UEFI BIOS version F19e)<br />
<br />
- UEFI BIOS option for booting UEFI Only doesn't pretend the UEFI BIOS from starting CSM<br />
<br />
== See also ==<br />
<br />
* Wikipedia's page on [http://en.wikipedia.org/wiki/UEFI UEFI]<br />
* Wikipedia's page on [http://en.wikipedia.org/wiki/EFI_System_partition UEFI SYSTEM Partition]<br />
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob_plain;f=Documentation/x86/x86_64/uefi.txt;hb=HEAD Linux Kernel UEFI Documentation]<br />
* [http://www.uefi.org/home/ UEFI Forum] - contains the official [http://www.uefi.org/specs/ UEFI Specifications] - GUID Partition Table is part of UEFI Specification<br />
* [http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Welcome_to_TianoCore Intel's Tianocore Project] for Open-Source UEFI firmware which includes DuetPkg for direct BIOS based booting and OvmfPkg used in QEMU and Oracle VirtualBox<br />
* [http://www.intel.com/technology/efi/ Intel's page on EFI]<br />
* [http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/efi-boot-process.html FGA: The EFI boot process]<br />
* [http://www.microsoft.com/whdc/device/storage/GPT_FAQ.mspx Microsoft's Windows and GPT FAQ] - Contains info on Windows UEFI booting also<br />
* [https://gitorious.org/tianocore_uefi_duet_builds/pages/Windows_x64_BIOS_to_UEFI Convert Windows Vista SP1+ or 7 x86_64 boot from BIOS-MBR mode to UEFI-GPT mode without Reinstall]<br />
* [https://gitorious.org/tianocore_uefi_duet_builds/pages/Linux_Windows_BIOS_UEFI_boot_USB Create a Linux BIOS+UEFI and Windows x64 BIOS+UEFI bootable USB drive]<br />
* [http://rodsbooks.com/bios2uefi/ Rod Smith - A BIOS to UEFI Transformation]<br />
* [https://lkml.org/lkml/2011/6/8/322 UEFI Boot problems on some newer machines (LKML)]<br />
* [http://software.intel.com/en-us/articles/efi-shells-and-scripting/ EFI Shells and Scripting - Intel Documentation]<br />
* [http://software.intel.com/en-us/articles/uefi-shell/ UEFI Shell - Intel Documentation]<br />
* [http://www.hpuxtips.es/?q=node/293 UEFI Shell - bcfg command info]<br />
* [http://dl.dropbox.com/u/17629062/Shell2.zip UEFI Shell v2 binary with bcfg modified to work with UEFI pre-2.3 firmware - from Clover efiboot]<br />
* [http://linuxplumbers.ubicast.tv/videos/plumbing-uefi-into-linux/ LPC 2012 Plumbing UEFI into Linux]<br />
* [http://linuxplumbers.ubicast.tv/videos/uefi-tutorial-part-1/ LPC 2012 UEFI Tutorial : part 1]<br />
* [http://linuxplumbers.ubicast.tv/videos/uefi-tutorial-part-2/ LPC 2012 UEFI Tutorial : part 2]</div>Mid-kidhttps://wiki.archlinux.org/index.php?title=Beginners%27_guide&diff=262885Beginners' guide2013-06-15T15:42:09Z<p>Mid-kid: I recommend people to have rEFInd automatically detect new kernels. Undo this or fix it if needed.</p>
<hr />
<div><noinclude><br />
[[Category:Getting and installing Arch]]<br />
[[Category:About Arch]]<br />
[[ar:Beginners' Guide/Installation]]<br />
[[da:Beginners' Guide/Installation]]<br />
[[es:Beginners' Guide/Installation]]<br />
[[hr:Beginners' Guide/Installation]]<br />
[[hu:Beginners' Guide/Installation]]<br />
[[it:Beginners' Guide/Installation]]<br />
[[ja:Beginners' Guide/Installation]]<br />
[[ko:Beginners' Guide/Installation]]<br />
[[nl:Beginners' Guide/Installatie]]<br />
[[pl:Beginners' Guide/Installation]]<br />
[[pt:Beginners' Guide/Installation]]<br />
[[ro:Ghidul începătorilor/Instalare]]<br />
[[ru:Beginners' Guide/Installation]]<br />
[[sr:Beginners' Guide/Installation]]<br />
[[zh-CN:Beginners' Guide/Installation]]<br />
[[zh-TW:Beginners' Guide/Installation]]<br />
{{Tip|This is part of a multi-page article for The Beginners' Guide. '''[[Beginners' Guide|Click here]]''' if you would rather read the guide in its entirety.}}<br />
</noinclude><br />
== Installation ==<br />
<br />
You are now presented with a shell prompt, automatically logged in as root.<br />
<br />
=== Change the language ===<br />
<br />
{{Tip|These are optional for the majority of users. Useful only if you plan on writing in your own language in any of the configuration files, if you use diacritical marks in the Wi-Fi password, or if you would like to receive system messages (e.g. possible errors) in your own language.}}<br />
<br />
By default, the keyboard layout is set to {{ic|us}}. If you have a non-[[Wikipedia:File:KB United States-NoAltGr.svg|US]] keyboard layout, run:<br />
<br />
# loadkeys ''layout''<br />
<br />
...where ''layout'' can be {{ic|fr}}, {{ic|uk}}, {{ic|dvorak}}, {{ic|be-latin1}}, etc. See [[KEYMAP#Keyboard layouts|here]] for a comprehensive list.<br />
<br />
The font should also be changed, because most languages use more glyphs than the 26 letter [[Wikipedia:English alphabet|English alphabet]]. Otherwise some foreign characters may show up as white squares or as other symbols. Note that the name is case-sensitive, so please type it ''exactly'' as you see it:<br />
<br />
# setfont Lat2-Terminus16<br />
<br />
By default, the language is set to English (US). If you would like to change the language for the install process ''(German, in this example)'', remove the {{ic|#}} in front of the [http://www.greendesktiny.com/support/knowledgebase_detail.php?ref=EUH-483 locale] you want from {{ic|/etc/locale.gen}}, along with English (US). Please choose the {{ic|UTF-8}} entry.<br />
<br />
Use {{Keypress|Ctrl+X}} to exit, and when prompted to save changes, press {{Keypress|Y}} and {{Keypress|Enter}} to use the same filename.<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8<br />
de_DE.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
# export LANG=de_DE.UTF-8<br />
<br />
Remember, {{Keypress|LAlt+LShift}} activates and deactivates the keymap.<br />
<br />
=== Establish an internet connection ===<br />
<br />
{{Warning|As of v197, udev no longer assigns network interface names according to the wlanX and ethX naming scheme. If you are coming from a different distribution or are reinstalling Arch and not aware of the new interface naming style, please do not assume that your wireless interface is named wlan0, or that your wired interface is named eth0. You can use the command {{ic|ip link}} to discover the names of your interfaces.}}<br />
<br />
The {{ic|dhcpcd}} network daemon starts automatically during boot and it will attempt to start a wired connection. Try to ping a server to see if a connection was established. For example, Google's DNS servers:<br />
<br />
{{hc|# ping -c 3 www.google.com|2=<br />
PING www.l.google.com (74.125.132.105) 56(84) bytes of data.<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=1 ttl=50 time=17.0 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=2 ttl=50 time=18.2 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=3 ttl=50 time=16.6 ms<br />
<br />
--- www.l.google.com ping statistics ---<br />
3 packets transmitted, 3 received, 0% packet loss, time 2003ms<br />
rtt min/avg/max/mdev = 16.660/17.320/18.254/0.678 ms}}<br />
<br />
If you get a {{ic|ping: unknown host}} error, first check if there is an issue with your cable or wireless signal strength. If not, you will need to set up the network manually, as explained below. Once a connection is established move on to [[#Prepare the storage drive|Prepare the storage drive]].<br />
<br />
==== Wired ====<br />
<br />
Follow this procedure if you need to set up a wired connection via a static IP address.<br />
<br />
First, disable the dhcpcd service which was started automatically at boot:<br />
<br />
# systemctl stop dhcpcd.service<br />
<br />
Identify the name of your Ethernet interface.<br />
<br />
{{hc|# ip link|<br />
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT<br />
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00<br />
2: enp2s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000<br />
link/ether 00:11:25:31:69:20 brd ff:ff:ff:ff:ff:ff<br />
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT qlen 1000<br />
link/ether 01:02:03:04:05:06 brd ff:ff:ff:ff:ff:ff}}<br />
<br />
In this example, the Ethernet interface is {{ic|enp2s0f0}}. If you are unsure, your Ethernet interface is likely to start with the letter "e", and unlikely to be "lo" or start with the letter "w". You can also use {{ic|iwconfig}} and see which interfaces are not wireless:<br />
<br />
{{hc|# iwconfig|2=<br />
enp2s0f0 no wireless extensions.<br />
wlp3s0 IEEE 802.11bgn ESSID:"NETGEAR97"<br />
Mode:Managed Frequency:2.427 GHz Access Point: 2C:B0:5D:9C:72:BF<br />
Bit Rate=65 Mb/s Tx-Power=16 dBm<br />
Retry long limit:7 RTS thr:off Fragment thr:off<br />
Power Management:on<br />
Link Quality=61/70 Signal level=-49 dBm<br />
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0<br />
Tx excessive retries:0 Invalid misc:430 Missed beacon:0<br />
lo no wireless extensions.}}<br />
<br />
In this example, neither {{ic|enp2s0f0}} nor the loopback device have wireless extensions, meaning {{ic|enp2s0f0}} is our Ethernet interface.<br />
<br />
You also need to know these settings:<br />
<br />
* Static IP address.<br />
* Subnet mask.<br />
* Gateway's IP address.<br />
* Name servers' (DNS) IP addresses.<br />
* Domain name (unless you are on a local LAN, in which case you can make it up).<br />
<br />
Activate the connected Ethernet interface (e.g. {{ic|enp2s0f0}}):<br />
<br />
# ip link set enp2s0f0 up<br />
<br />
Add the address:<br />
<br />
# ip addr add ''ip_address''/''subnetmask'' dev ''interface_name''<br />
<br />
For example:<br />
<br />
# ip addr add 192.168.1.2/24 dev enp2s0f0<br />
<br />
For more options, run {{ic|man ip}}.<br />
<br />
Add your gateway like this, substituting your own gateway's IP address:<br />
<br />
# ip route add default via ''ip_address''<br />
<br />
For example:<br />
<br />
# ip route add default via 192.168.1.1<br />
<br />
Edit {{ic|resolv.conf}}, substituting your name servers' IP addresses and your local domain name:<br />
<br />
{{hc|# nano /etc/resolv.conf|<br />
nameserver 61.23.173.5<br />
nameserver 61.95.849.8<br />
search example.com}}<br />
<br />
{{Note|Currently, you may include a maximum of three {{ic|nameserver}} lines.}}<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Network Configuration]] page.<br />
<br />
==== Wireless ====<br />
<br />
Follow this procedure if you need wireless connectivity (Wi-Fi) during the installation process.<br />
<br />
First, identify the name of your wireless interface.<br />
<br />
{{hc|# iw dev|2=<br />
phy#0<br />
Interface wlp3s0<br />
ifindex 3<br />
wdev 0x1<br />
addr 00:21:6a:5e:52:bc<br />
type managed<br />
}}<br />
<br />
In this example, {{ic|wlp3s0}} is the available wireless interface. If you are unsure, your wireless interface is likely to start with the letter "w", and unlikely to be "lo" or start with the letter "e". <br />
<br />
{{Note|If you do not see output similar to this, then your wireless driver has not been loaded. If this is the case, you must load the driver yourself. Please see [[Wireless Setup]] for more detailed information.}}<br />
<br />
Bring the interface up with:<br />
<br />
# ip link set wlp3s0 up<br />
<br />
A small percentage of wireless chipsets also require firmware, in addition to a corresponding driver. If you get output like {{ic|SIOCSIFFLAGS: No such file or directory}}, this means you will need to manually load the firmware. If unsure, invoke {{ic|dmesg}} to query the kernel log for a firmware request from the wireless chipset. For example, if you have an Intel chipset which requires and has requested firmware from the kernel at boot:<br />
<br />
{{hc|# dmesg <nowiki>|</nowiki> grep firmware|<br />
firmware: requesting iwlwifi-5000-1.ucode}}<br />
<br />
If there is no output, it may be concluded that the system's wireless chipset does not require firmware.<br />
<br />
{{Warning|Wireless chipset firmware packages (for cards which require them) are pre-installed under {{ic|/usr/lib/firmware}} in the live environment (on CD/USB stick) '''but must be explicitly installed to your actual system to provide wireless functionality after you reboot into it!''' Package installation is covered later in this guide. Ensure installation of both your wireless module and firmware before rebooting! See [[Wireless Setup]] if you are unsure about the requirement of corresponding firmware installation for your particular chipset.}}<br />
<br />
Next, use {{Pkg|netctl}}'s {{ic|wifi-menu}} to connect to a network:<br />
<br />
# wifi-menu wlp3s0<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Wireless Setup]] page.<br />
<br />
Alternatively, use {{ic|iw dev wlp3s0 scan <nowiki>|</nowiki> grep SSID}} to scan for available networks, then connect to a network with:<br />
<br />
# wpa_supplicant -B -i wlp3s0 -c <(wpa_passphrase "''ssid''" "''psk''")<br />
<br />
You need to replace ''ssid'' with the name of your network (e.g. "Linksys etc...") and ''psk'' with your wireless password, '''leaving the quotes around the network name and password.'''<br />
<br />
Finally, you have to give your interface an IP address. This can be set manually or using the dhcp:<br />
<br />
# dhcpd wlp3s0<br />
<br />
==== Analog modem, ISDN or PPoE DSL ====<br />
<br />
For xDSL, dial-up and ISDN connections, see [[Direct Modem Connection]].<br />
<br />
==== Behind a proxy server ====<br />
<br />
If you are behind a proxy server, you will need to export the {{ic|http_proxy}} and {{ic|ftp_proxy}} environment variables. See [[Proxy settings]] for more information.<br />
<br />
=== Prepare the storage drive ===<br />
<br />
{{Warning|Partitioning can destroy data. You are '''strongly''' cautioned and advised to backup any critical data before proceeding.}}<br />
<br />
Absolute beginners are encouraged to use a graphical partitioning tool. [http://gparted.sourceforge.net/download.php GParted] is a good example, and is [http://gparted.sourceforge.net/livecd.php provided as a "live" CD]. It is also included on live CDs of most Linux distributions such as [[Wikipedia:Ubuntu (operating system)|Ubuntu]] and [[Wikipedia:Linux Mint|Linux Mint]]. A drive should first be [[partitioning|partitioned]] and the partitions should be formatted with a [[File Systems|file system]] before rebooting.<br />
<br />
The recommendation for a system that will boot via UEFI rather than MBR legacy boot is to format the drive using a GPT partition table. This means that if the drive was previously already partitioned with an MBR (MSDOS) partition table it will now have a new partition table created which will destroy all other data on the drive. Once the new partition table has been created on a drive, only then can individual partitions be created with any chosen format type. When using Gparted, selecting the option to create a new partition table gives an "msdos" partition table by default. If you are intending to follow the advice to create a GPT partition table then you need to choose "Advanced" and then select "gpt" from the drop-down menu. This cannot be done if you have a pre-existing Windows installation on the drive which you wish not to destroy. It is therefore extremely important to not change the partition table to GPT if you intend on having a dual boot system. Leave the Windows install untouched and try to get the Linux install working with UEFI on a drive that contains an MBR (legacy) partition table. <br />
<br />
In addition, some newer computers come pre-installed with Windows 8 which will be using Secure Boot. Arch Linux currently does not support Secure Boot, but some Windows 8 installations have been seen not to boot if Secure Boot is turned off in the BIOS. In some cases it is necessary to turn off both Secure Boot as well as Fastboot in the BIOS options in order to allow Windows 8 to boot without Secure Boot. However there are potential security risks in turning off Secure Boot for booting up Windows 8. Therefore, it may be a better option to keep the Windows 8 install intact and have an independent hard drive for the Linux install - which can then be partitioned from scratch using a GPT partition table. Once that is done, creating several ext4/FAT32/swap partitions on the second drive may be a better way forward if the computer has two drives available. This is often not easy or possible on a small laptop. Currently, Secure Boot is still not in a fully stable state for reliable operation, even for Linux distributions that support it.<br />
<br />
See [[Swap]] for details if you wish to set up a swap partition or swap file. A swap file is easier to resize than a partition and can be created at any point after installation, but cannot be used with a Btrfs filesystem.<br />
<br />
If you have already done so, proceed to [[#Mount the partitions|Mount the partitions]].<br />
<br />
Otherwise, see the following example.<br />
<br />
==== Example ====<br />
<br />
The Arch Linux install media includes the following partitioning tools: {{ic|fdisk}}, {{ic|gdisk}}, {{ic|cfdisk}}, {{ic|cgdisk}}, {{ic|parted}}.<br />
<br />
{{Tip|Use the {{ic|lsblk}} command to list the hard disks attached to your system, along with the sizes of their existing partitions. This will help you to be confident you are partitioning the right disk.}}<br />
<br />
{{Box BLUE|Notes regarding [[UEFI]] boot:|<br />
* If you have a UEFI motherboard, you will need to create an extra [[Unified Extensible Firmware Interface#EFI_System_Partition|UEFI System Partition]].<br />
* It is recommended to always use GPT for UEFI boot, as some UEFI firmwares do not allow UEFI-MBR boot.}}<br />
<br />
{{Box BLUE|Notes regarding [[GPT]] partitioning:|<br />
* If you are not dual booting with Windows, then it is advisable to use GPT instead of MBR. Read [[GPT]] for a list of advantages.<br />
* If you have a BIOS motherboard (or plan on booting in BIOS compatibility mode) and you want to setup GRUB on a GPT-partitioned drive, you will need to create an extra [[GRUB#GUID Partition Table (GPT) specific instructions|BIOS Boot Partition]] of size 1007 KiB and {{ic|EF02}} type code. Syslinux does not need one.<br />
* Some BIOS systems may have issues with GPT. See http://mjg59.dreamwidth.org/8035.html and http://rodsbooks.com/gdisk/bios.html for more info and possible workarounds.}}<br />
<br />
{{Note|If you are installing to a USB flash key, see [[Installing Arch Linux on a USB key]].}}<br />
<br />
The example system will contain a 15 GB root partition, and a [[Partitioning#/home|home]] partition for the remaining space. Choose either [[MBR]] or [[GPT]]. Do not choose both!<br />
<br />
It should be emphasized that partitioning is a personal choice and that this example is only for illustrative purposes. See [[Partitioning]].<br />
<br />
{| class="wikitable"<br />
|-<br />
| rowspan="2" | '''MBR'''<br />
| rowspan="2"| {{ic|cfdisk&nbsp;/dev/sda}}<br />
| '''Root:'''<br />
<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – type in "15360" – {{Keypress|Enter}} for Beginning – {{Keypress|Enter}} for Bootable.<br />
|-<br />
|<br />
'''Home:'''<br />
<br />
* Press the down arrow to move to the free space area.<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – {{Keypress|Enter}} to use the rest of the drive (or you could type in the desired size).<br />
|-<br />
| rowspan="2" | '''GPT'''<br />
| rowspan="2"| {{ic|cgdisk&nbsp;/dev/sda}}<br />
| '''Root:'''<br />
<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for the first sector (2048) – type in "15G" – {{Keypress|Enter}} for the default hex code (8300) – {{Keypress|Enter}} for a blank partition name.<br />
|-<br />
| '''Home:'''<br />
<br />
* Press the down arrow a couple of times to move to the larger free space area.<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for the first sector – {{Keypress|Enter}} to use the rest of the drive (or you could type in the desired size; for example "30G") – {{Keypress|Enter}} for the default hex code (8300) – {{Keypress|Enter}} for a blank partition name.<br />
|}<br />
<br />
If you chose MBR, here is what it should look like:<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-----------------------------------------------------------------------<br />
sda1 Boot Primary Linux 15360<br />
sda2 Primary Linux 133000*<br />
<br />
If you chose GPT, here is what it should look like:<br />
<br />
Part. # Size Partition Type Partition Name<br />
----------------------------------------------------------------<br />
1007.0 KiB free space<br />
1 15.0 GiB Linux filesystem<br />
2 123.45 GiB Linux filesystem<br />
<br />
Double check and make sure that you are happy with the partition sizes as well as the partition table layout before continuing.<br />
<br />
If you would like to start over, you can simply select Quit (or press {{Keypress|Q}}) to exit without saving changes and then restart cfdisk (or cgdisk).<br />
<br />
If you are satisfied, choose Write (or press {{Keypress|Shift+W}}) to finalize and to write the partition table to the drive. Type "yes" and choose Quit (or press {{Keypress|Q}}) to exit without making any more changes.<br />
<br />
Simply partitioning is not enough; the partitions also need a [[File Systems|filesystem]]. To format the partitions with an ext4 filesystem:<br />
<br />
{{Warning|Double check and triple check that it is actually {{ic|/dev/sda1}} and {{ic|/dev/sda2}} that you want to format. You can use {{ic|lsblk}} to help with this.}}<br />
<br />
# mkfs.ext4 /dev/sda1<br />
# mkfs.ext4 /dev/sda2<br />
<br />
If you have made a partition dedicated to swap (code 82), do not forget to format and activate it with:<br />
<br />
# mkswap /dev/sda''X''<br />
# swapon /dev/sda''X''<br />
<br />
=== Mount the partitions ===<br />
<br />
Each partition is identified with a number suffix. For example, {{ic|sda1}} specifies the first partition of the first drive, while {{ic|sda}} designates the entire drive.<br />
<br />
To display the current partition layout:<br />
<br />
# lsblk /dev/sda<br />
<br />
{{Note|Do not mount more than one partition to the same directory. And pay attention, because the mounting order is important.}}<br />
<br />
First, mount the root partition on {{ic|/mnt}}. Following the example when using {{ic|cfdisk}} above (yours may be different), it would be:<br />
<br />
# mount /dev/sda1 /mnt<br />
<br />
Then mount the home partition and any other separate partition ({{ic|/boot}}, {{ic|/var}}, etc), if you have any:<br />
<br />
# mkdir /mnt/home<br />
# mount /dev/sda2 /mnt/home<br />
<br />
In case you have a UEFI motherboard, mount the UEFI partition:<br />
<br />
# mkdir -p /mnt/boot/efi<br />
# mount /dev/sda''X'' /mnt/boot/efi<br />
<br />
=== Select a mirror ===<br />
<br />
Before installing, you may want to edit the {{ic|mirrorlist}} file and place your preferred mirror first. A copy of this file will be installed on your new system by {{ic|pacstrap}} as well, so it is worth getting it right.<br />
<br />
{{hc|# nano /etc/pacman.d/mirrorlist|<br />
##<br />
## Arch Linux repository mirrorlist<br />
## Sorted by mirror score from mirror status page<br />
## Generated on 2012-MM-DD<br />
##<br />
<br />
<nowiki>Server = http://mirror.example.xyz/archlinux/$repo/os/$arch</nowiki><br />
...}}<br />
<br />
* {{Keypress|Alt+6}} to copy a {{ic|Server}} line.<br />
* {{Keypress|PageUp}} key to scroll up.<br />
* {{Keypress|Ctrl+U}} to paste it at the top of the list.<br />
* {{Keypress|Ctrl+X}} to exit, and when prompted to save changes, press {{Keypress|Y}} and {{Keypress|Enter}} to use the same filename.<br />
<br />
If you want, you can make it the ''only'' mirror available by getting rid of everything else (using {{Keypress|Ctrl+K}}), but it is usually a good idea to have a few more, in case the first one goes offline.<br />
<br />
{{Tip|<br />
* Use the [https://www.archlinux.org/mirrorlist/ Mirrorlist Generator] to get an updated list for your country. HTTP mirrors are faster than FTP, because of something called [[Wikipedia:Keepalive|keepalive]]. With FTP, pacman has to send out a signal each time it downloads a package, resulting in a brief pause. For other ways to generate a mirror list, see [[Mirrors#Sorting mirrors|Sorting mirrors]] and [[Reflector]].<br />
* [https://archlinux.org/mirrors/status/ Arch Linux MirrorStatus] reports various aspects about the mirrors such as network problems with mirrors, data collection problems, the last time mirrors have been synced, etc.}}<br />
<br />
{{Note|<br />
* Whenever in the future you change your list of mirrors, always remember to force pacman to refresh all package lists with {{ic|pacman -Syy}}. This is considered to be good practice and will avoid possible headaches. See [[Mirrors]] for more information.<br />
* If you are using an older installation medium, your mirrorlist might be outdated, which might lead to problems when updating Arch Linux (see {{Bug|22510}}). Therefore it is advised to obtain the latest mirror information as described above.<br />
* Some issues have been reported in the [https://bbs.archlinux.org/ Arch Linux forums] regarding network problems that prevent pacman from updating/synchronizing repositories (see [https://bbs.archlinux.org/viewtopic.php?id&#61;68944] and [https://bbs.archlinux.org/viewtopic.php?id&#61;65728]). When installing Arch Linux natively, these issues have been resolved by replacing the default pacman file downloader with an alternative (see [[Improve Pacman Performance]] for more details). When installing Arch Linux as a guest OS in [[VirtualBox]], this issue has also been addressed by using "Host interface" instead of "NAT" in the machine properties.}}<br />
<br />
=== Install the base system ===<br />
<br />
The base system is installed using the [https://github.com/falconindy/arch-install-scripts/blob/master/pacstrap.in pacstrap] script.<br />
<br />
The {{ic|-i}} switch can be omitted if you wish to install every package from the ''base'' group without prompting.<br />
<br />
# pacstrap -i /mnt base<br />
<br />
{{Note|If pacman fails to verify your packages, check the system time with {{ic|cal}}. If the system date is invalid (e.g. it shows the year 2010), signing keys will be considered expired (or invalid), signature checks on packages will fail and installation will be interrupted. Make sure to correct the system time, either by doing so manually or with the {{Pkg|ntp}} client, and retry running the pacstrap command. Refer to [[Time]] page for more information on correcting system time.}}<br />
<br />
{{Note|If pacman complains that {{ic|error: failed to commit transaction (invalid or corrupted package)}}, run the following command:<br />
# pacman-key --init && pacman-key --populate archlinux<br />
}}<br />
<br />
This will give you a basic Arch system. Other packages can be installed later using [[pacman]].<br />
<br />
=== Generate an fstab ===<br />
<br />
Generate an [[fstab]] file with the following command. UUIDs will be used because they have certain advantages (see [[fstab#Identifying filesystems]]). If you would prefer to use labels instead, replace the {{ic|-U}} option with {{ic|-L}}.<br />
<br />
# genfstab -U -p /mnt >> /mnt/etc/fstab<br />
# nano /mnt/etc/fstab<br />
<br />
{{Warning|The fstab file should always be checked after generating it. If you encounter errors running genfstab or later in the install process, do '''not''' run genfstab again; just edit the fstab file.}}<br />
<br />
A few considerations:<br />
<br />
* Only the root ({{ic|/}}) partition needs {{ic|1}} for the last field. Everything else should have either {{ic|2}} or {{ic|0}} (see [[fstab#Field definitions]]).<br />
<br />
=== Chroot and configure the base system ===<br />
<br />
Next, we [[chroot]] into our newly installed system:<br />
<br />
# arch-chroot /mnt<br />
<br />
{{Note|Use {{ic|arch-chroot /mnt /bin/bash}} to chroot into a bash shell.}}<br />
At this stage of the installation, you will configure the primary configuration files of your Arch Linux base system. These can either be created if they do not exist, or edited if you wish to change the defaults.<br />
<br />
Closely following and understanding these steps is of key importance to ensure a properly configured system.<br />
<br />
==== Locale ====<br />
<br />
Locales are used by '''glibc''' and other locale-aware programs or libraries for rendering text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards.<br />
<br />
There are two files that need editing: {{ic|locale.gen}} and {{ic|locale.conf}}.<br />
<br />
* The {{ic|locale.gen}} file is empty by default (everything is commented out) and you need to remove the {{ic|#}} in front of the line(s) you want. You may uncomment more lines than just English (US), as long as you choose their {{ic|UTF-8}} encoding:<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8<br />
de_DE.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
<br />
This will run on every '''glibc''' upgrade, generating all the locales specified in {{ic|/etc/locale.gen}}.<br />
<br />
* The {{ic|locale.conf}} file does not exist by default. Setting only {{ic|LANG}} should be enough. It will act as the default value for all other variables.<br />
<br />
# echo LANG=en_US.UTF-8 > /etc/locale.conf<br />
# export LANG=en_US.UTF-8<br />
<br />
{{Note|If you set some other language than English (US) at the beginning of the install, the above commands would be something like:<br />
# echo LANG<nowiki>=</nowiki>de_DE.UTF-8 > /etc/locale.conf<br />
# export LANG<nowiki>=</nowiki>de_DE.UTF-8<br />
}}<br />
<br />
To use other locales for other {{ic|LC_*}} variables, run {{ic|locale}} to see the available options and add them to {{ic|locale.conf}}. It is not recommended to set the {{ic|LC_ALL}} variable. An advanced example can be found [[Locale#Setting_system-wide_locale|here]].<br />
<br />
==== Console font and keymap ====<br />
<br />
If you set a keymap at [[#Change_the_language|the beginning]] of the install process, load it now, as well, because the environment has changed. For example:<br />
<br />
# loadkeys ''de-latin1''<br />
# setfont Lat2-Terminus16<br />
<br />
To make them available after reboot, edit {{ic|vconsole.conf}}:<br />
<br />
{{hc|# nano /etc/vconsole.conf|2=<br />
KEYMAP=de-latin1<br />
FONT=Lat2-Terminus16<br />
}}<br />
<br />
* {{ic|KEYMAP}} – Please note that this setting is only valid for your TTYs, not any graphical window managers or Xorg.<br />
<br />
* {{ic|FONT}} – Available alternate console fonts reside in {{ic|/usr/share/kbd/consolefonts/}}. The default (blank) is safe, but some foreign characters may show up as white squares or as other symbols. It is recommended that you change it to {{ic|Lat2-Terminus16}}, because according to {{ic|/usr/share/kbd/consolefonts/README.Lat2-Terminus16}}, it claims to support "about 110 language sets".<br />
<br />
* Possible option {{ic|FONT_MAP}} – Defines the console map to load at boot. Read {{ic|man setfont}}. Removing it or leaving it blank is safe.<br />
<br />
See [[Fonts#Console_fonts|Console fonts]] and {{ic|man vconsole.conf}} for more information.<br />
<br />
==== Time zone ====<br />
<br />
Available time zones and subzones can be found in the {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} directories.<br />
<br />
To view the available <Zone>, check the directory {{ic|/usr/share/zoneinfo/}}:<br />
<br />
# ls /usr/share/zoneinfo/<br />
<br />
Similarly, you can check the contents of directories belonging to a <SubZone>:<br />
<br />
# ls /usr/share/zoneinfo/Europe<br />
<br />
Create a symbolic link {{ic|/etc/localtime}} to your zone file {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} using this command:<br />
<br />
# ln -s /usr/share/zoneinfo/<Zone>/<SubZone> /etc/localtime<br />
<br />
'''Example:'''<br />
<br />
# ln -s /usr/share/zoneinfo/Europe/Minsk /etc/localtime<br />
<br />
==== Hardware clock ====<br />
<br />
Set the hardware clock mode uniformly between your operating systems. Otherwise, they may overwrite the hardware clock and cause time shifts.<br />
<br />
You can generate {{ic|/etc/adjtime}} automatically by using one of the following commands:<br />
<br />
* '''UTC''' (recommended)<br />
<br />
: {{Note|Using [[Wikipedia:Coordinated Universal Time|UTC]] for the hardware clock does not mean that software will display time in UTC.}}<br />
<br />
: {{bc|# hwclock --systohc --utc}}<br />
<br />
To synchronize your "UTC" time over the internet, see [[Network Time Protocol daemon|NTPd]].<br />
<br />
* '''localtime''' (discouraged; used by default in Windows)<br />
<br />
: {{Warning|Using ''localtime'' may lead to several known and unfixable bugs. However, there are no plans to drop support for ''localtime''.}}<br />
<br />
: {{bc|# hwclock --systohc --localtime}}<br />
<br />
If you have (or planning on having) a dual boot setup with Windows:<br />
<br />
* Recommended: Set both Arch Linux and Windows to use UTC. A quick [[Time#UTC in Windows|registry fix]] is needed. Also, be sure to prevent Windows from synchronizing the time on-line, because the hardware clock will default back to ''localtime''.<br />
<br />
* Not recommended: Set Arch Linux to ''localtime'' and disable any time-related services, like [[Network Time Protocol daemon|NTPd]] . This will let Windows take care of hardware clock corrections and you will need to remember to boot into Windows at least two times a year (in Spring and Autumn) when [[Wikipedia:Daylight saving time|DST]] kicks in. So please do not ask on the forums why the clock is one hour behind or ahead if you usually go for days or weeks without booting into Windows.<br />
<br />
==== Kernel modules ====<br />
<br />
{{Tip|This is just an example, you do not need to set it. All needed modules are automatically loaded by udev, so you will rarely need to add something here. Only add modules that you know are missing.}}<br />
<br />
For kernel modules to load during boot, place a {{ic|*.conf}} file in {{ic|/etc/modules-load.d/}}, with a name based on the program that uses them.<br />
<br />
{{hc|# nano /etc/modules-load.d/virtio-net.conf|<br />
# Load 'virtio-net.ko' at boot.<br />
<br />
virtio-net}}<br />
<br />
If there are more modules to load per {{ic|*.conf}}, the module names can be separated by newlines. A good example are the [[VirtualBox#Arch Linux guests|VirtualBox Guest Additions]].<br />
<br />
Empty lines and lines starting with {{ic|#}} or {{ic|;}} are ignored.<br />
<br />
==== Hostname ====<br />
<br />
Set the [[Wikipedia:hostname|hostname]] to your liking (e.g. ''arch''):<br />
<br />
# echo ''myhostname'' > /etc/hostname<br />
<br />
{{Note|There is no need to edit {{ic|/etc/hosts}}.}}<br />
<br />
=== Configure the network ===<br />
<br />
You need to configure the network again, but this time for your newly installed environment. The procedure and prerequisites are very similar to the one described [[#Establish an internet connection|above]], except we are going to make it persistent and automatically run at boot.<br />
<br />
{{Note|For more in-depth information on network configration, visit [[Network Configuration]] and [[Wireless Setup]].}}<br />
<br />
{{Note|If you would like to use the old interface naming scheme (ie. eth* and wlan*) you can accomplish this by creating an empty file at {{ic|/etc/udev/rules.d/80-net-name-slot.rules}} which will mask the file of the same name located under {{ic|/usr/lib/udev/rules.d}} (alternatively, instead of an empty file, using a symlink to {{ic|/dev/null}} is also an acceptable masking method).}}<br />
<br />
==== Wired ====<br />
<br />
===== Dynamic IP =====<br />
<br />
; Using dhcpcd<br />
<br />
If you only use a single fixed wired network connection, you do not need a network management service and can simply enable the {{ic|dhcpcd}} service. Here, {{ic|''interface_name''}} is your wired interface:<br />
<br />
# systemctl enable dhcpcd@''interface_name''.service<br />
<br />
; Using netctl<br />
<br />
Copy a sample profile from {{ic|/etc/netctl/examples}} to {{ic|/etc/netctl}}:<br />
<br />
# cd /etc/netctl<br />
# cp examples/ethernet-dhcp my-network<br />
<br />
Edit the profile as needed (modify {{ic|Interface}}):<br />
<br />
# nano my-network<br />
<br />
Enable the {{ic|my-network}} profile:<br />
<br />
# netctl enable my-network<br />
<br />
; Using netctl-ifplugd<br />
<br />
Alternatively, you can use {{ic|netctl-ifplugd}}, which gracefully handles dynamic connections to new networks:<br />
<br />
Install {{Pkg|ifplugd}}, which is required for {{ic|netctl-ifplugd}}:<br />
<br />
# pacman -S ifplugd<br />
<br />
Then enable for interface that you want:<br />
<br />
# systemctl enable netctl-ifplugd@<interface>.service<br />
<br />
{{Tip|[[Netctl]] also provides {{ic|netctl-auto}}, which can be used to handle wired profiles in conjunction with {{ic|netctl-ifplugd}}.}}<br />
<br />
===== Static IP =====<br />
<br />
; Using netctl<br />
<br />
Copy a sample profile from {{ic|/etc/netctl/examples}} to {{ic|/etc/netctl}}:<br />
<br />
# cd /etc/netctl<br />
# cp examples/ethernet-static my-network<br />
<br />
Edit the profile as needed (modify {{ic|Interface}}, {{ic|Address}}, {{ic|Gateway}} and {{ic|DNS}}):<br />
<br />
# nano my-network<br />
<br />
* Notice the {{ic|/24}} in {{ic|Address}} which is the [[wikipedia:Classless Inter-Domain Routing#CIDR notation|CIDR notation]] of a {{ic|255.255.255.0}} netmask<br />
<br />
Enable above created profile to start it at every boot:<br />
<br />
# netctl enable my-network<br />
<br />
==== Wireless ====<br />
<br />
{{Note|If your wireless adapter requires a firmware (as described in the above [[#Wireless|Establish an internet connection]] section and also [[Wireless Setup#Drivers and firmware|here]]), install the package containing your firmware. Most of the time, the {{Pkg|linux-firmware}} package will contain the needed firmware. Though for some devices, the required firmware might be in its own package. For example:<br />
{{bc|# pacman -S zd1211-firmware}}<br />
See [[Wireless Setup]] for more info.}}<br />
<br />
Install {{pkg|iw}}, {{pkg|wpa_supplicant}} and {{pkg|wpa_actiond}} which you will need to connect to a network:<br />
<br />
# pacman -S iw wpa_supplicant wpa_actiond<br />
<br />
===== Adding wireless networks =====<br />
; Using wifi-menu<br />
<br />
Install {{pkg|dialog}}, which is required for {{ic|wifi-menu}}:<br />
<br />
# pacman -S dialog<br />
<br />
After finishing the rest of this installation and rebooting, you can connect to the network with {{ic|wifi-menu ''interface_name''}} (where {{ic|''interface_name''}} is the interface of your wireless chipset).<br />
<br />
# wifi-menu ''interface_name''<br />
<br />
{{Warning|This must be done *after* your reboot when you are no longer chrooted. The process spawned by this command will conflict with the one you have running outside of the chroot. Alternatively, you could just configure a network profile manually using the following templates so that you do not have to worry about using {{ic|wifi-menu}} at all.}}<br />
<br />
; Using manual netctl profiles<br />
<br />
Copy a network profile from {{ic|/etc/netctl/examples}} to {{ic|/etc/netctl}}:<br />
<br />
# cd /etc/netctl<br />
# cp examples/wireless-wpa my-network<br />
<br />
Edit the profile as needed (modify {{ic|Interface}}, {{ic|ESSID}} and {{ic|Key}}):<br />
<br />
# nano my-network<br />
<br />
===== Connect automaticly to known networks =====<br />
Enable the {{ic|netctl-auto}} service, which will connect to known networks and gracefully handle roaming and disconnects:<br />
<br />
# systemctl enable netctl-auto@''interface_name''.service<br />
<br />
{{Tip|[[Netctl]] also provides {{ic|netctl-ifplugd}}, which can be used to handle wired profiles in conjunction with {{ic|netctl-auto}}.}}<br />
<br />
==== Analog modem, ISDN or PPoE DSL ====<br />
<br />
For xDSL, dial-up and ISDN connections, see [[Direct Modem Connection]].<br />
<br />
=== Create an initial ramdisk environment ===<br />
<br />
{{Tip|Most users can skip this step and use the defaults provided in {{ic|mkinitcpio.conf}}. The initramfs image (from the {{ic|/boot}} folder) has already been generated based on this file when the {{Pkg|linux}} package (the Linux kernel) was installed earlier with {{ic|pacstrap}}.}}<br />
<br />
Here you need to set the right [[Mkinitcpio#HOOKS|hooks]] if the root is on a USB drive, if you use RAID, LVM, or if {{ic|/usr}} is on a separate partition.<br />
<br />
Edit {{ic|/etc/mkinitcpio.conf}} as needed and re-generate the initramfs image with:<br />
<br />
# mkinitcpio -p linux<br />
<br />
{{Note|Arch VPS installations on QEMU (e.g. when using {{ic|virt-manager}}) may need {{ic|virtio}} modules in {{ic|mkinitcpio.conf}} to be able to boot.<br />
<br />
{{hc|# nano /etc/mkinitcpio.conf|2=<br />
MODULES="virtio virtio_blk virtio_pci virtio_net"}}}}<br />
<br />
=== Set the root password ===<br />
<br />
Set the root password with:<br />
<br />
# passwd<br />
<br />
=== Install and configure a bootloader ===<br />
<br />
==== For BIOS motherboards ====<br />
<br />
For BIOS systems, two bootloaders are available: Syslinux and GRUB. Choose the bootloader as per your convenience.<br />
<br />
* Syslinux is (currently) limited to loading only files from the partition where it was installed. Its configuration file is considered to be easier to understand. An example configuration can be found [https://bbs.archlinux.org/viewtopic.php?pid=1109328#p1109328 here].<br />
<br />
* GRUB is more feature-rich and supports more complex scenarios. Its configuration file(s) is more similar to a scripting language, which may be difficult for beginners to manually write. It is recommended that they automatically generate one.<br />
<br />
{{Note|Some BIOS systems may have issues with GPT. See http://mjg59.dreamwidth.org/8035.html and http://rodsbooks.com/gdisk/bios.html for more info and possible workarounds.}}<br />
<br />
===== Syslinux =====<br />
<br />
Install the {{Pkg|syslinux}} package and then use the {{ic|syslinux-install_update}} script to automatically ''install'' the bootloader ({{ic|-i}}), mark the partition ''active'' by setting the boot flag ({{ic|-a}}), and install the ''MBR'' boot code ({{ic|-m}}):<br />
<br />
# pacman -S syslinux<br />
# syslinux-install_update -i -a -m<br />
<br />
Configure {{ic|syslinux.cfg}} to point to the right root partition. This step is vital. If it points to the wrong partition, Arch Linux will not boot. Change {{ic|/dev/sda3}} to reflect your root partition ''(if you partitioned your drive as in [[#Prepare the storage drive|the example]], your root partition is sda1)''. Do the same for the fallback entry.<br />
<br />
{{hc|# nano /boot/syslinux/syslinux.cfg|2=<br />
...<br />
LABEL arch<br />
...<br />
APPEND root=/dev/sda3 ro<br />
...}}<br />
<br />
For more information on configuring and using Syslinux, see [[Syslinux]].<br />
<br />
===== GRUB =====<br />
<br />
Install the {{Pkg|grub-bios}} package and then run {{ic|grub-install}} to install the bootloader:<br />
<br />
{{Note|Change {{ic|/dev/sda}} to reflect the drive you installed Arch on. Do not append a partition number (do not use {{ic|sda''X''}}).}}<br />
<br />
{{Note|For GPT-partitioned drives on BIOS motherboards, GRUB needs a "[[GRUB#GUID Partition Table (GPT) specific instructions|BIOS Boot Partition]]".}}<br />
<br />
# pacman -S grub-bios<br />
# grub-install --recheck /dev/sda<br />
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
<br />
{{Note| If it is an installation on virtualbox as guest, while running grub-install command as in above, you might get an error like "/usr/sbin/grub-bios-setup: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible". Executing {{ic|parted -s /dev/sda set 1 bios_grub on}} and then retrying ''grub-install'' should solve the problem.}}<br />
<br />
While using a manually created {{ic|grub.cfg}} is absolutely fine, it is recommended that beginners automatically generate one:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} ({{ic|pacman -S os-prober}}) before running the next command.}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
==== For UEFI motherboards ====<br />
<br />
For UEFI boot, the drive needs to be GPT-partitioned and an "[[Unified Extensible Firmware Interface#EFI System Partition|UEFI System Partition]]" (512 MiB or larger, type {{ic|EF00}}, formatted with FAT32) must be present and mounted on {{ic|/boot/efi}}. If you have followed this guide from the beginning, you have already done all of these.<br />
<br />
While there are other [[UEFI Bootloaders|UEFI bootloaders]] available, using EFISTUB is recommended. Below are instructions for setting up EFISTUB and GRUB (of course you choose only one of them).<br />
<br />
{{Note|Syslinux does not yet support UEFI.}}<br />
<br />
===== EFISTUB =====<br />
<br />
The Linux kernel can act as its own bootloader using EFISTUB. This is the UEFI boot method recommended by developers and simpler compared to {{ic|grub-efi-x86_64}}. The steps below set up rEFInd to provide a menu for EFISTUB kernels, as well as for booting other UEFI bootloaders. Alternative EFISTUB boot managers can be found on the page [[UEFI Bootloaders#Booting EFISTUB]]. Both rEFInd and [[gummiboot]] can detect Windows UEFI bootloaders in case of dual-boot.<br />
<br />
1. Mount the UEFI System Partition on {{ic|/mnt/boot/efi}} and chroot back into {{ic|/mnt}}.<br />
<br />
2. [[UEFI Bootloaders#Setting up EFISTUB|Copy the kernel and initramfs files]] to {{ic|/mnt/boot/efi}}:<br />
<br />
# mkdir -p /boot/efi/EFI/arch/<br />
# cp /boot/vmlinu'''z'''-linux /boot/efi/EFI/arch/vmlinuz-arch'''.efi'''<br />
# cp /boot/initramfs-linux.img /boot/efi/EFI/arch/initramfs-arch.img<br />
# cp /boot/initramfs-linux-fallback.img /boot/efi/EFI/arch/initramfs-arch-fallback.img<br />
{{note| If you are going to use rEFInd and you want it to detect kernels in {{ic|/boot}} automatically, you can skip this step}}<br />
<br />
Every time the kernel and initramfs files are updated in {{ic|/boot}}, they need to be updated in {{ic|/boot/efi/EFI/arch}}. This can be automated [[UEFI Bootloaders#Systemd|using systemd]].<br />
<br />
3. For the rEFInd boot manager, install the {{Pkg|refind-efi}} and {{Pkg|efibootmgr}} packages:<br />
<br />
# pacman -S refind-efi<br />
{{note| efibootmgr gets installed as a dependency}}<br />
<br />
4. Install rEFInd to the UEFI System Partition (summarized from [[UEFI Bootloaders#Using rEFInd]]):<br />
<br />
# mkdir -p /boot/efi/EFI/refind<br />
# cp /usr/lib/refind/refind_x64.efi /boot/efi/EFI/refind/refind_x64.efi<br />
# cp /usr/lib/refind/config/refind.conf /boot/efi/EFI/refind/refind.conf<br />
# cp -r /usr/share/refind/icons /boot/efi/EFI/refind/icons<br />
# cp -r /usr/lib/refind/drivers_x64 /boot/efi/EFI/refind/drivers<br />
<br />
5. Create a {{ic|refind_linux.conf}} file with the kernel parameters to be used by rEFInd:<br />
<br />
{{note| If you don't want rEFInd to automatically detect the kernel, you have to place {{ic|refind_linux.conf}} where you copied the kernel and initramfs files.}}<br />
# cp /usr/lib/refind/config/refind_linux.conf /boot/refind_linux.conf<br />
# nano /boot/refind_linux.conf<br />
Edit the {{ic|PARTUUID}} value to match the UUID of your root partition. You can find out what the UUID is by using {{ic|$ ls -l /dev/disk/by-partuuid/}}. <br />
If you don't want to use the UUID, you can set {{ic|root&#61;/dev/sdXY}}. This refers to the root partition, not the boot partition, if you created them separately. <br />
You also need to set the {{ic|rootfstype}}. If you use ext4 on the root partition, it looks like this: {{ic|rootfstype&#61;ext4}}<br />
<br />
6. Add rEFInd to UEFI boot menu using [[UEFI#efibootmgr|efibootmgr]]. Replace X and Y with the drive and partition of the UEFI System Partition. For example, in {{ic|/dev/sdc5}}, X is "c" and Y is "5".<br />
<br />
{{Warning|Using {{ic|efibootmgr}} on Apple Macs may brick the firmware and may need reflash of the motherboard ROM. For Macs, use {{AUR|mactel-boot}}, or "bless" from within OS X.}}<br />
<br />
# modprobe efivars<br />
# efibootmgr -c -d /dev/sdX -p Y -w -L "rEFInd" -l '\EFI\refind\refind_x64.efi'<br />
<br />
{{Note|On some systems, the above command will not work properly. It will execute without any visible error, but the UEFI boot menu will not have been correctly updated with a new entry. To determine whether the command executed properly, run {{ic|efibootmgr}} without any arguments and see if a new entry has appeared in the list displayed. If there is no new entry, then it will not be possible to enter rEFInd upon reboot, as the UEFI boot menu has been left unchanged. In this case, you will instead have to enter the UEFI shell and manually add an entry to the UEFI boot menu with the {{ic|bcfg}} command, as described [[Unified Extensible Firmware Interface#bcfg|here]].}}<br />
<br />
===== GRUB =====<br />
<br />
Install the {{Pkg|grub-efi-x86_64}} and {{Pkg|efibootmgr}} packages and then run {{ic|grub-install}} to install the bootloader:<br />
<br />
{{Note|In case you have a system with 32-bit EFI, like pre-2008 Apple Macs, install {{ic|grub-efi-i386}} instead of {{ic|grub-efi-x86_64}}.}}<br />
<br />
# pacman -S grub-efi-x86_64 efibootmgr<br />
# grub-install --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
<br />
Next, while using a manually created {{ic|grub.cfg}} is absolutely fine, it is recommended that beginners automatically generate one:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} ({{ic|pacman -S os-prober}}) before running the next command.}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
{{Note|{{ic|grub-install}} should create a new entry in the UEFI boot menu. If it does not, you will instead have to enter the UEFI shell and manually add an entry to the UEFI boot menu with the {{ic|bcfg}} command, as described [[Unified Extensible Firmware Interface#bcfg|here]].}}<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
=== Unmount the partitions and reboot ===<br />
<br />
Exit from the chroot environment:<br />
<br />
# exit<br />
<br />
Since the partitions are mounted under {{ic|/mnt}}, we use the following command to unmount them:<br />
<br />
# umount /mnt/{boot,home,}<br />
<br />
Reboot the computer:<br />
<br />
# reboot<br />
<br />
{{Tip|If you face error "/sbin/init does not exist" on next boot, look for systemd binary path and pass it as kernel argument while booting up. For example, "init &#61; /usr/lib/systemd/systemd" }}<br />
{{Tip|Be sure to remove the installation media, otherwise you will boot back into it.}}<noinclude><br />
{{Beginners' Guide navigation}}</noinclude></div>Mid-kidhttps://wiki.archlinux.org/index.php?title=UEFI_Bootloaders&diff=262882UEFI Bootloaders2013-06-15T15:02:58Z<p>Mid-kid: hehe, my bad :P</p>
<hr />
<div>[[Category:Boot loaders]]<br />
[[zh-CN:UEFI Bootloaders]]<br />
This page contains info about various [[UEFI]] Bootloaders capable of booting Linux kernel. It is recommended to read the [[UEFI]] and [[GPT]] pages before reading this page. The following [[Boot Loader|bootloaders]] are explained here:<br />
<br />
== Linux Kernel EFISTUB ==<br />
{{Warning|1=A bug has been noticed where booting EFISTUB can fail depending on kernel version and motherboard model. See [https://bbs.archlinux.org/viewtopic.php?id=156670&p=1] for more information.}}<br />
<br />
Linux (Kernel >= 3.3) supports {{ic|EFISTUB (EFI BOOT STUB)}} booting. It is enabled by default on Arch Linux kernels or can be activated by setting {{ic|CONFIG_EFI_STUB&#61;y}} in the Kernel configuration (see [https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob_plain;f=Documentation/x86/efi-stub.txt;hb=HEAD The EFI Boot Stub] for more information).<br />
<br />
A single EFISTUB kernel is not capable of launching other kernels, hence each EFISTUB Kernel + Initramfs pair requires a separate boot menu entry. It is recommended to use a UEFI Boot Manager to manage multiple kernels.<br />
<br />
=== Setting up EFISTUB ===<br />
<br />
#[https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#EFI_System_Partition Create a FAT32 UEFI System Partition]<br />
# Mount the UEFI System Partition at {{ic|/boot/efi}} with {{ic|# mount <UEFI Partition> /boot/efi}} if you're going to be using GRUB2, or at {{ic|/boot}} with {{ic|# mount <UEFI Partition> /boot}} if you're going to be using Gummiboot or rEFInd. Gummiboot cannot boot across partitions, and will never have such capability due to its nature, so it's paramount that you mount the UEFI System Partition at /boot for use with Gummiboot so that the kernel and initramfs lie on the same partition as the bootmanager. {{note| On some machines, when using rEFInd, it works fine when mounting the UEFI partition in {{ic|/boot/efi}}}}<br />
# Create {{ic|/boot/efi/EFI/arch/}} directory with {{ic|# mkdir /boot/efi/EFI/arch/}}<br />
# Copy the following files from source to destination<br />
{| border="1"<br />
!Boot File Source!!UEFI Destination<br />
|-<br />
| /boot/vmlinuz-linux || /boot/efi/EFI/arch/vmlinuz-arch.efi<br />
|-<br />
| /boot/initramfs-linux.img || /boot/efi/EFI/arch/initramfs-arch.img<br />
|-<br />
| /boot/initramfs-linux-fallback.img || /boot/efi/EFI/arch/initramfs-arch-fallback.img<br />
|}<br />
{{note| As of {{Pkg|refind-efi}} 0.2.7, you don't need to copy these files, since refind will automatically detect them}}<br />
<br />
=== Sync EFISTUB Kernel ===<br />
{{Warning|The EFISTUB Kernel must be updated each time the kernel is updated (follow step 4 in [https://wiki.archlinux.org/index.php/UEFI_Bootloaders#Setting_up_EFISTUB Setting up EFISTUB]. Failure to do so will result in failure to boot. Alternatively one can automatically update the EFISTUB kernel using one of the following methods:}}<br />
<br />
{{Note| As of [https://www.archlinux.org/packages/extra/any/refind-efi/ refind-efi 0.2.7], refind automatically detects kernels in {{ic|/boot}}. They do not have to be renamed to have a {{ic|.efi}} extension either. Hence, the following sync scripts aren't needed if using [https://wiki.archlinux.org/index.php/UEFI_Bootloaders#Using_rEFInd refind]. You do need to isntall an EFI driver to read the Linux filesystem on which the kernel is stored, though.}}<br />
<br />
==== Systemd ====<br />
[[Systemd]] features event triggered tasks. In this particular case, the ability to detect a change in path is used to sync the EFISTUB kernel and initramfs files when they are updated in {{ic|boot}}.<br />
<br />
<br />
{{Warning|Since mkinitcpio takes time to build the kernel stub and the initramfs. It is possible for the following systemd services to copy older kernel stubs and initramfs instead of the new ones. To reduce the chance of this error, it is better to bind the efistub copying service to check if the initramfs-linux-fallback.img was changed (since it is the last thing built by mkinitcpio).}}<br />
{{Tip|Save the following script as {{ic|/usr/lib/systemd/system/efistub-update.path}}}}<br />
{{bc|<nowiki><br />
[Unit]<br />
Description=Copy EFISTUB Kernel to UEFISYS Partition<br />
<br />
[Path]<br />
PathChanged=/boot/initramfs-linux-fallback.img<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{Tip|Save the following script as {{ic|/usr/lib/systemd/system/efistub-update.service}}}}<br />
{{bc|<nowiki><br />
[Unit]<br />
Description=Copy EFISTUB Kernel to UEFISYS Partition<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/bin/cp -f /boot/vmlinuz-linux /boot/efi/EFI/arch/vmlinuz-arch.efi<br />
ExecStart=/bin/cp -f /boot/initramfs-linux.img /boot/efi/EFI/arch/initramfs-arch.img<br />
ExecStart=/bin/cp -f /boot/initramfs-linux-fallback.img /boot/efi/EFI/arch/initramfs-arch-fallback.img<br />
</nowiki>}}<br />
<br />
{{Tip|Enable these services with<br />
{{bc|<nowiki><br />
# systemctl enable efistub-update.path<br />
</nowiki>}}}}<br />
<br />
==== Incron ====<br />
{{Pkg|incron}} can run a script to sync the EFISTUB Kernel after updates<br />
<br />
{{Tip|Save the following script as {{ic|/usr/local/bin/efistub-update.sh}}}}<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
/bin/cp -f /boot/vmlinuz-linux /boot/efi/EFI/arch/vmlinuz-arch.efi<br />
/bin/cp -f /boot/initramfs-linux.img /boot/efi/EFI/arch/initramfs-arch.img<br />
/bin/cp -f /boot/initramfs-linux-fallback.img /boot/efi/EFI/arch/initramfs-arch-fallback.img<br />
</nowiki>}}<br />
<br />
{{Tip|Save the following script as {{ic|/etc/incron.d/efistub-update.conf}}}}<br />
{{Note|The first parameter {{ic|/boot/initramfs-linux-fallback.img}} is the file to watch. The second parameter {{ic|IN_CLOSE_WRITE}} is the action to watch for. The third parameter {{ic|/usr/local/bin/efistub-update.sh}} is the script to execute.}}<br />
{{bc|<nowiki><br />
/boot/initramfs-linux-fallback.img IN_CLOSE_WRITE /usr/local/bin/efistub-update.sh<br />
</nowiki>}}<br />
<br />
{{Tip|In order to use this method, incron must be activated, if it is not run<br />
{{bc|<nowiki><br />
# systemctl enable incrond.service<br />
</nowiki>}}}}<br />
<br />
==== Mkinitcpio hook ====<br />
Mkinitcpio can generate a hook that does not need a system level daemon to function. It spawns a background process which waits for the generation of {{ic|vm-linuz}}, {{ic|initramfs-linux.img}}, and {{ic|initramfs-linux-fallback.img}}; then follows step 4 in [https://wiki.archlinux.org/index.php/UEFI_Bootloaders#Setting_up_EFISTUB Setting up EFISTUB]<br />
<br />
{{Tip|Save the following script as {{ic|/usr/lib/initcpio/install/efistub-update}}}}<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
<br />
build() {<br />
/root/watch.sh &<br />
}<br />
<br />
help() {<br />
cat <<HELPEOF<br />
This hook waits for mkinitcpio to finish and copies the finished ramdisk and kernel to the ESP<br />
HELPEOF<br />
}<br />
</nowiki>}}<br />
<br />
{{Tip|Save the following script as {{ic|/root/watch.sh}} and make it executable}}<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
<br />
while [[ -d "/proc/$PPID" ]]; do<br />
sleep 1<br />
done<br />
<br />
/bin/cp -f /boot/vmlinuz-linux /boot/efi/EFI/arch/vmlinuz-arch.efi<br />
/bin/cp -f /boot/initramfs-linux.img /boot/efi/EFI/arch/initramfs-arch.img<br />
/bin/cp -f /boot/initramfs-linux-fallback.img /boot/efi/EFI/arch/initramfs-arch-fallback.img<br />
<br />
echo "Synced kernel with ESP"<br />
</nowiki>}}<br />
<br />
{{Tip|Add {{ic|efistub-update}} to the list of hooks in {{ic|/etc/mkinitcpio.conf}}}}<br />
<br />
{{Note| As of [https://www.archlinux.org/packages/extra/any/refind-efi/ refind-efi 0.2.7], refind automatically detects kernels in {{ic|/boot}}. They do not have to be renamed to have a {{ic|.efi}} extension either. Hence, the following sync scripts aren't needed if using [https://wiki.archlinux.org/index.php/UEFI_Bootloaders#Using_rEFInd refind]. You do need to isntall an EFI driver to read the Linux filesystem on which the kernel is stored, though.}}<br />
<br />
=== Booting EFISTUB ===<br />
<br />
{{Warning|Linux Kernel EFISTUB booting uses {{ic|\}} instead of {{ic|/}} and should be relative to the UEFI System Partition's root. For example, if the initramfs is located in {{ic|/boot/efi/EFI/arch/initramfs-linux.img}}, the corresponding UEFI formatted line would be {{ic|\EFI\arch\initramfs-linux.img}}. Failure to convert the options will lead to a system hang without any error message from the firmware or kernel.<br />
{{Note| Support of initrd path name with {{ic|/}} in EFISTUB booting has been added in [https://patchwork.kernel.org/patch/1899361/ mainline 3.9-rc1] and [http://lwn.net/Articles/541002/ stable 3.8.2]. Leading {{ic|/}} can be ignored but the path still has to be full path. Example: {{ic|initrd&#61;EFI/arch/initramfs-linux.img}} }}<br />
}}<br />
<br />
<br />
<br />
One can boot the EFISTUB kernel using one of the following ways :<br />
<br />
==== Using rEFInd ====<br />
<br />
rEFInd is a fork of rEFIt Boot Manager (used in Intel Macs) by Rod Smith (author of GPT-fdisk). rEFInd fixes many issues in rEFIt with respect to non-Mac UEFI booting and also has support for booting EFISTUB kernels and contains some features specific to them.<br />
{{Tip|If you're new to EFISTUB and/or rEFInd, you need to read [http://www.rodsbooks.com/refind/linux.html The rEFInd Boot Manager: Methods of Booting Linux] before going any further. This section illustrates only one possible use-case which is not suitable for all configurations.}}<br />
# Install {{Pkg|refind-efi}} package with {{ic|# pacman -S refind-efi}}<br />
# Copy the following files from their source directory to their destination<br />
{{Note|1=<arch> is the bit architecture of the system. Run {{ic|$ uname -m}} to get the architecture. Replace <arch> with "ia32" for 32 bit systems, and <arch> with "x64" for 64 bit systems.}}<br />
{| border="1"<br />
!rEFInd File Source!!UEFI Destination<br />
|-<br />
| /usr/lib/refind/refind_<arch>.efi || /boot/efi/EFI/refind/refind_<arch>.efi<br />
|-<br />
| /usr/lib/refind/config/refind.conf || /boot/efi/EFI/refind/refind.conf<br />
|-<br />
| /usr/share/refind/icons || /boot/efi/EFI/refind/icons<br />
|-<br />
| /usr/lib/refind/drivers_<arch> || /boot/efi/EFI/refind/drivers<br />
|}<br />
<br />
{{Tip|Refind's configuration file is located in {{ic|/boot/efi/EFI/refind/refind.conf}}. The file is well commented.}}<br />
<br />
As of {{Pkg|refind-efi}} 0.2.7, refind can auto-detect kernels in {{ic|/boot}}, if there are UEFI drivers for the filesystem used by /boot partition (or / partition if no separate /boot is used) in the ESP, and are loaded by rEFInd. This is enabled in the default configuration in {{ic|refind.conf}} (you may need to include the PATH to the drivers folders in the ESP). Copy your {{ic|/usr/lib/refind/config/refind_linux.conf}} to {{ic|/boot/refind_linux.conf}}. You may pass kernel specific commands in this file. <br />
<br />
Edit the {{ic|refind_linux.conf}} configuration file to be similar to the template below. Replace the string after PARTUUID with your root's PARTUUID<br />
<br />
{{Note|1=Please notice the [https://bbs.archlinux.org/viewtopic.php?pid=1286972 difference] between the standard UUID and the PARTUUID shown by {{ic|$ ls -l /dev/disk/by-partuuid/}}}}<br />
{{hc|refind_linux.conf|<nowiki><br />
"Boot with defaults" "root=PARTUUID=3518bb68-d01e-45c9-b973-0b5d918aae96 ro rootfstype=ext4 add_efi_memmap systemd.unit=graphical.target"<br />
"Boot to Terminal" "root=PARTUUID=3518bb68-d01e-45c9-b973-0b5d918aae96 ro rootfstype=ext4 add_efi_memmap systemd.unit=multi-user.target"</nowiki>}}<br />
<br />
{{Tip|Each line of {{ic|refind_linux.conf}} is displayed as a submenu by rEFInd. Access the submenu with "+" or "insert" keys.}}<br />
<br />
{{Tip|In non-Mac systems, create an entry for rEFInd using [[UEFI#efibootmgr|efibootmgr]] where sdX is the UEFI disk, and Y is the UEFI partition number. Run :<br />
{{bc|<nowiki><br />
# modprobe efivars<br />
# efibootmgr -c -w -d /dev/sdX -p Y -l '\EFI\refind\refind_<arch>.efi' -L "rEFInd" <br />
</nowiki>}}}}<br />
<br />
===== Systemd Automation =====<br />
<br />
{{Tip|To automate the process of copying refind files and updating the nvram (if needed) use the following script}}<br />
<br />
{{Note|Save this script as {{ic|/usr/lib/systemd/scripts/refind_name_patchv2}}}}<br />
{{Tip|If you want to change the directory that refind is installed in the UEFISYS partition, just change the value of $refind_dir in the script}}<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
## COPYRIGHT 2013 : MARK E. LEE (BLUERIDER) : mlee24@binghamton.edu; mark@markelee.com<br />
<br />
## LOG<br />
## 1/17/2013 : Version 2 of refind_name_patch is released<br />
## : Supports long subdirectory location for refind<br />
## : Updates nvram when needed<br />
## : 10% speed boost<br />
<br />
function main () { ## main insertion function<br />
declare -r refind_dir="/boot/efi/EFI/refind"; ## set the refind directory<br />
declare -r arch=$(uname -m | awk -F'_' '{if ($1 == "x86"){print $2}}') && ## get bit architecture<br />
update-efi-dir; ## updates or creates the refind directory<br />
update-efi-nvram; ## updates nvram if needed<br />
}<br />
<br />
function update-efi-dir () { ## setup the refind directory<br />
if [ ! -d $refind_dir ]; then ## check if refind directory exists<br />
echo "Couldn't find $refind_dir";<br />
mkdir $refind_dir && ## make the refind directory if needed<br />
echo "Made $refind_dir";<br />
fi;<br />
if [ "$arch" ]; then ## check if anything was stored in $arch<br />
cp -r /usr/{share/refind/*,lib/refind/refind_x*$arch*.efi} $refind_dir/ && ## update bin and dirs<br />
echo "Updated binaries and directory files for refind at $refind_dir";<br />
else<br />
echo "Failed to detect an x86 architecture";<br />
exit;<br />
fi;<br />
}<br />
<br />
function update-efi-nvram () { ## update the nvram with efibootmgr<br />
declare -r ref_bin=${refind_dir/\/boot\/efi}/$(ls /usr/lib | grep $arch*.efi); ## get path of refind binary (without /boot/efi)<br />
declare -r ref_bin_escape=${ref_bin//\//\\\\}; ## insert escape characters into $ref_bin<br />
modprobe efivars && ## grab the efi variables for efibootmgr<br />
efibootmgr -v | grep $ref_bin_escape && ( ## check if boot entry is in nvram<br />
echo "Found boot entry, no need to update nvram";<br />
) || ( ## if boot entry is not in nvram; add it<br />
declare -r esp=$(mount -l | awk '/ESP/ {print $1}') && ## get ESP partition<br />
efibootmgr -c -w -d ${esp:0:8} -p ${esp:8} -L "rEFInd" -l $ref_bin_escape && ## update nvram<br />
echo "<br />
Updated nvram with entry rEFInd to boot $ref_bin<br />
Did not copy configuration files, please move refind.conf to $refind_dir/";<br />
)<br />
}<br />
<br />
main; ## run the main insertion function<br />
</nowiki>}}<br />
<br />
{{Note| As of [https://www.archlinux.org/packages/extra/any/refind-efi/ refind-efi 0.2.7], refind automatically detects kernels in {{ic|/boot}}. They do not have to be renamed to have a {{ic|.efi}} extension either. Hence, the following sync scripts aren't needed if using [https://wiki.archlinux.org/index.php/UEFI_Bootloaders#Using_rEFInd refind]. You do need to isntall an EFI driver to read the Linux filesystem on which the kernel is stored, though.}}<br />
<br />
{{Note|Save the following service file as {{ic|/usr/lib/systemd/system/refind_update.path}}}}<br />
{{bc|<nowiki><br />
[Unit]<br />
Description=Update rEFInd bootloader files<br />
<br />
[Path]<br />
PathChanged=/usr/lib/refind/refind_<arch>.efi<br />
Unit=refind_update.service<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{Note|Save the following service file as {{ic|/usr/lib/systemd/system/refind_update.service}}}}<br />
{{bc|<nowiki><br />
[Unit]<br />
Description=Update rEFInd directories, binaries, and nvram<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/bin/bash /usr/lib/systemd/scripts/refind_name_patchv2<br />
RemainAfterExit=no<br />
</nowiki>}}<br />
<br />
{{Tip|Enable the systemd path unit by running :<br />
{{bc|<nowiki><br />
# systemctl enable refind_update.path<br />
</nowiki>}}}}<br />
<br />
===== Apple Macs =====<br />
<br />
In case of Apple Macs, try {{AUR|mactel-boot}} for an experimental "bless" utility for Linux. If that does not work, use "bless" form within OSX to set rEFInd as default bootloader. Assuming UEFISYS partition is mounted at {{ic|/mnt/efi}} within OSX, do<br />
<br />
$ sudo bless --setBoot --folder /mnt/efi/EFI/refind --file /mnt/efi/EFI/refind/refind_x64.efi<br />
<br />
===== VirtualBox =====<br />
<br />
In case of VirtualBox, see [[VirtualBox#Using_Arch_under_Virtualbox_EFI_mode]].<br />
<br />
==== Using gummiboot ====<br />
<br />
[[Gummiboot]] is a UEFI Boot Manager which provides a nice menu for EFISTUB Kernels. It is available in [extra] as {{Pkg|gummiboot}}. See https://wiki.archlinux.org/index.php/Gummiboot for more info.<br />
<br />
==== Using UEFI Shell ====<br />
<br />
It is possible to launch EFISTUB kernel form UEFI Shell as if it is a normal UEFI application. In this case the kernel parameters are passed as normal parameters to the launched EFISTUB kernel file.<br />
<br />
> fs0:<br />
> cd \EFI\arch<br />
> vmlinuz-arch.efi root=PARTUUID=3518bb68-d01e-45c9-b973-0b5d918aae96 ro rootfstype=ext4 add_efi_memmap initrd=EFI/arch/initramfs-arch.img<br />
<br />
You can also write a simple {{ic|archlinux.nsh}} file with your boot parameters and put it in your UEFI System Partition, then run it with:<br />
<br />
fs0:<br />
archlinux<br />
<br />
Example Script:<br />
<br />
echo -on<br />
\EFI\arch\vmlinuz-arch.efi root=PARTUUID=3518bb68-d01e-45c9-b973-0b5d918aae96 rootfstype=ext4 add_efi_memmap initrd=EFI/arch/initramfs-arch.img<br />
<br />
This way you can specify UUID's without needing to remember the name or type out 20-30 characters.<br />
<br />
==== Using efibootmgr entry ====<br />
<br />
{{Warning|1=Some kernel and efibootmgr combinations do not work [https://bugs.archlinux.org/task/34641]. You will be able to delete but not create boot entries.}}<br />
<br />
{{Note|Some UEFI firmwares may not support embedding command line parameters to uefi applications in the boot entries.}}<br />
<br />
It is possible to directly embed the kernel parameters within the boot entry created by efibootmgr. This means that in your BIOS/UEFI you will be able to select Arch Linux directly in the default boot order, and on startup it will boot into Arch directly without any kind of boot selection GUI.<br />
<br />
# modprobe efivars<br />
# efibootmgr -c -w -d /dev/sdX -p Y -l '\EFI\arch\vmlinuz-arch.efi' -L "Arch Linux (EFISTUB)" -u $(cat /proc/cmdline)<br />
<br />
It is a good idea to run<br />
<br />
# efibootmgr -v<br />
<br />
to verify that the resulting entry is correct. You should also consider reordering the boot options ({{ic|efibootmgr -o}}) to place the Arch entry last, which could make the system easier to recover if it fails.<br />
<br />
More info about efibootmgr at [[UEFI#efibootmgr]]. Forum post https://bbs.archlinux.org/viewtopic.php?pid=1090040#p1090040 .<br />
<br />
== GRUB 2.x ==<br />
<br />
GRUB 2.x contains its own filesystem drivers and does not rely on the firmware to access the files. It can directly read files from {{ic|/boot}} and does not require the kernel and initramfs files to be in the UEFISYS partition. Detailed information at [[GRUB#UEFI_systems_2]]. For bzr development version try AUR package - {{AUR|grub-efi-x86_64-bzr}}.<br />
<br />
== SYSLINUX ==<br />
<br />
{{Note|Syslinux UEFI support is currently part of version 6.00-preXX or in firmware branch of upstream git repo. It is considered alpha quality by upstream. The below information is provided mainly to enable bug-testing. Please report all issues upstream.}}<br />
<br />
{{Note|Syslinux UEFI can boot only those kernels that support '''EFI Handover Protocol'''. Thus LTS kernels are not supported.}}<br />
<br />
Install {{AUR|syslinux-efi-git}} AUR package and copy {{ic|/usr/lib/syslinux/efi64/*}} to {{ic|$esp/EFI/syslinux/}} ({{ic|$esp}} is the mountpoint of UEFISYS partition) ({{ic|efi64}} is for x86_64 UEFI firmwares, replace with {{ic|efi32}} for i386 UEFI firmwares), and then create a boot entry using efibootmgr in the firmware boot manager.<br />
<br />
== ELILO ==<br />
<br />
ELILO is the UEFI version of LILO Boot Loader. It was originally created for Intel Itanium systems which supported only EFI (precursor to UEFI). It is the oldest UEFI bootloader for Linux. It is still in development but happens at a very slow pace. Upstream provided compiled binaries are available at http://sourceforge.net/projects/elilo/ . Elilo config file {{ic|elilo.conf}} is similar to [[LILO]]'s config file. AUR package - {{AUR|elilo-efi}}.<br />
<br />
== EFILINUX ==<br />
<br />
EFILINUX is a reference implementation of a UEFI Linux bootloader and precursor to Kenrel EFISTUB support. It is considered to be a alpha quality software (as on 16-MAY-2012). Upstream sources are at https://github.com/mfleming/efilinux . and the usage instructions are at http://thread.gmane.org/gmane.linux.kernel/1172645 and http://article.gmane.org/gmane.linux.kernel/1175060 . AUR packages - {{Pkg|efilinux-efi}} and {{AUR|efilinux-efi-x86_64-git}} (only for x86_64 UEFI).<br />
<br />
== Package Naming Guidelines ==<br />
<br />
UEFI bootloader package(s) should be suffixed with {{ic|-efi-x86_64}} or {{ic|-efi-i386}} to denote package built for 64-bit and 32-bit UEFI respectively. If a single package contains both 64-bit and 32-bit UEFI applications, then {{ic|-efi}} suffix should be used in the '''pkgname'''.<br />
<br />
== See also ==<br />
<br />
* [http://www.rodsbooks.com/efi-bootloaders/ Rod Smith - Managing EFI Boot Loaders for Linux]<br />
* [http://www.rodsbooks.com/refind/ Rod Smith - rEFInd, a fork or rEFIt]<br />
* [https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob_plain;f=Documentation/x86/efi-stub.txt;hb=HEAD Linux Kernel Documentation on EFISTUB]<br />
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=291f36325f9f252bd76ef5f603995f37e453fc60;hp=55839d515495e766605d7aaabd9c2758370a8d27 Linux Kernel EFISTUB Git Commit]<br />
* [http://www.rodsbooks.com/efi-bootloaders/efistub.html Rod Smith's page on EFISTUB]<br />
* [http://www.rodsbooks.com/refind/linux.html rEFInd Documentation for booting EFISTUB Kernels]</div>Mid-kidhttps://wiki.archlinux.org/index.php?title=UEFI_Bootloaders&diff=262881UEFI Bootloaders2013-06-15T14:59:04Z<p>Mid-kid: no need to copy files if using refind + fixed path confusion.</p>
<hr />
<div>[[Category:Boot loaders]]<br />
[[zh-CN:UEFI Bootloaders]]<br />
This page contains info about various [[UEFI]] Bootloaders capable of booting Linux kernel. It is recommended to read the [[UEFI]] and [[GPT]] pages before reading this page. The following [[Boot Loader|bootloaders]] are explained here:<br />
<br />
== Linux Kernel EFISTUB ==<br />
{{Warning|1=A bug has been noticed where booting EFISTUB can fail depending on kernel version and motherboard model. See [https://bbs.archlinux.org/viewtopic.php?id=156670&p=1] for more information.}}<br />
<br />
Linux (Kernel >= 3.3) supports {{ic|EFISTUB (EFI BOOT STUB)}} booting. It is enabled by default on Arch Linux kernels or can be activated by setting {{ic|CONFIG_EFI_STUB&#61;y}} in the Kernel configuration (see [https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob_plain;f=Documentation/x86/efi-stub.txt;hb=HEAD The EFI Boot Stub] for more information).<br />
<br />
A single EFISTUB kernel is not capable of launching other kernels, hence each EFISTUB Kernel + Initramfs pair requires a separate boot menu entry. It is recommended to use a UEFI Boot Manager to manage multiple kernels.<br />
<br />
=== Setting up EFISTUB ===<br />
<br />
#[https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#EFI_System_Partition Create a FAT32 UEFI System Partition]<br />
# Mount the UEFI System Partition at {{ic|/boot/efi}} with {{ic|# mount <UEFI Partition> /boot/efi}} if you're going to be using GRUB2, or at {{ic|/boot}} with {{ic|# mount <UEFI Partition> /boot}} if you're going to be using Gummiboot or rEFInd. Gummiboot cannot boot across partitions, and will never have such capability due to its nature, so it's paramount that you mount the UEFI System Partition at /boot for use with Gummiboot so that the kernel and initramfs lie on the same partition as the bootmanager.<br />
{{note| On some machines, when using rEFInd, it works fine when mounting the UEFI partition in {{ic|/boot/efi}}}}<br />
# Create {{ic|/boot/efi/EFI/arch/}} directory with {{ic|# mkdir /boot/efi/EFI/arch/}}<br />
# Copy the following files from source to destination<br />
{| border="1"<br />
!Boot File Source!!UEFI Destination<br />
|-<br />
| /boot/vmlinuz-linux || /boot/efi/EFI/arch/vmlinuz-arch.efi<br />
|-<br />
| /boot/initramfs-linux.img || /boot/efi/EFI/arch/initramfs-arch.img<br />
|-<br />
| /boot/initramfs-linux-fallback.img || /boot/efi/EFI/arch/initramfs-arch-fallback.img<br />
|}<br />
{{note| As of {{Pkg|refind-efi}} 0.2.7, you don't need to copy these files, since refind will automatically detect them}}<br />
<br />
=== Sync EFISTUB Kernel ===<br />
{{Warning|The EFISTUB Kernel must be updated each time the kernel is updated (follow step 4 in [https://wiki.archlinux.org/index.php/UEFI_Bootloaders#Setting_up_EFISTUB Setting up EFISTUB]. Failure to do so will result in failure to boot. Alternatively one can automatically update the EFISTUB kernel using one of the following methods:}}<br />
<br />
{{Note| As of [https://www.archlinux.org/packages/extra/any/refind-efi/ refind-efi 0.2.7], refind automatically detects kernels in {{ic|/boot}}. They do not have to be renamed to have a {{ic|.efi}} extension either. Hence, the following sync scripts aren't needed if using [https://wiki.archlinux.org/index.php/UEFI_Bootloaders#Using_rEFInd refind]. You do need to isntall an EFI driver to read the Linux filesystem on which the kernel is stored, though.}}<br />
<br />
==== Systemd ====<br />
[[Systemd]] features event triggered tasks. In this particular case, the ability to detect a change in path is used to sync the EFISTUB kernel and initramfs files when they are updated in {{ic|boot}}.<br />
<br />
<br />
{{Warning|Since mkinitcpio takes time to build the kernel stub and the initramfs. It is possible for the following systemd services to copy older kernel stubs and initramfs instead of the new ones. To reduce the chance of this error, it is better to bind the efistub copying service to check if the initramfs-linux-fallback.img was changed (since it is the last thing built by mkinitcpio).}}<br />
{{Tip|Save the following script as {{ic|/usr/lib/systemd/system/efistub-update.path}}}}<br />
{{bc|<nowiki><br />
[Unit]<br />
Description=Copy EFISTUB Kernel to UEFISYS Partition<br />
<br />
[Path]<br />
PathChanged=/boot/initramfs-linux-fallback.img<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{Tip|Save the following script as {{ic|/usr/lib/systemd/system/efistub-update.service}}}}<br />
{{bc|<nowiki><br />
[Unit]<br />
Description=Copy EFISTUB Kernel to UEFISYS Partition<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/bin/cp -f /boot/vmlinuz-linux /boot/efi/EFI/arch/vmlinuz-arch.efi<br />
ExecStart=/bin/cp -f /boot/initramfs-linux.img /boot/efi/EFI/arch/initramfs-arch.img<br />
ExecStart=/bin/cp -f /boot/initramfs-linux-fallback.img /boot/efi/EFI/arch/initramfs-arch-fallback.img<br />
</nowiki>}}<br />
<br />
{{Tip|Enable these services with<br />
{{bc|<nowiki><br />
# systemctl enable efistub-update.path<br />
</nowiki>}}}}<br />
<br />
==== Incron ====<br />
{{Pkg|incron}} can run a script to sync the EFISTUB Kernel after updates<br />
<br />
{{Tip|Save the following script as {{ic|/usr/local/bin/efistub-update.sh}}}}<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
/bin/cp -f /boot/vmlinuz-linux /boot/efi/EFI/arch/vmlinuz-arch.efi<br />
/bin/cp -f /boot/initramfs-linux.img /boot/efi/EFI/arch/initramfs-arch.img<br />
/bin/cp -f /boot/initramfs-linux-fallback.img /boot/efi/EFI/arch/initramfs-arch-fallback.img<br />
</nowiki>}}<br />
<br />
{{Tip|Save the following script as {{ic|/etc/incron.d/efistub-update.conf}}}}<br />
{{Note|The first parameter {{ic|/boot/initramfs-linux-fallback.img}} is the file to watch. The second parameter {{ic|IN_CLOSE_WRITE}} is the action to watch for. The third parameter {{ic|/usr/local/bin/efistub-update.sh}} is the script to execute.}}<br />
{{bc|<nowiki><br />
/boot/initramfs-linux-fallback.img IN_CLOSE_WRITE /usr/local/bin/efistub-update.sh<br />
</nowiki>}}<br />
<br />
{{Tip|In order to use this method, incron must be activated, if it is not run<br />
{{bc|<nowiki><br />
# systemctl enable incrond.service<br />
</nowiki>}}}}<br />
<br />
==== Mkinitcpio hook ====<br />
Mkinitcpio can generate a hook that does not need a system level daemon to function. It spawns a background process which waits for the generation of {{ic|vm-linuz}}, {{ic|initramfs-linux.img}}, and {{ic|initramfs-linux-fallback.img}}; then follows step 4 in [https://wiki.archlinux.org/index.php/UEFI_Bootloaders#Setting_up_EFISTUB Setting up EFISTUB]<br />
<br />
{{Tip|Save the following script as {{ic|/usr/lib/initcpio/install/efistub-update}}}}<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
<br />
build() {<br />
/root/watch.sh &<br />
}<br />
<br />
help() {<br />
cat <<HELPEOF<br />
This hook waits for mkinitcpio to finish and copies the finished ramdisk and kernel to the ESP<br />
HELPEOF<br />
}<br />
</nowiki>}}<br />
<br />
{{Tip|Save the following script as {{ic|/root/watch.sh}} and make it executable}}<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
<br />
while [[ -d "/proc/$PPID" ]]; do<br />
sleep 1<br />
done<br />
<br />
/bin/cp -f /boot/vmlinuz-linux /boot/efi/EFI/arch/vmlinuz-arch.efi<br />
/bin/cp -f /boot/initramfs-linux.img /boot/efi/EFI/arch/initramfs-arch.img<br />
/bin/cp -f /boot/initramfs-linux-fallback.img /boot/efi/EFI/arch/initramfs-arch-fallback.img<br />
<br />
echo "Synced kernel with ESP"<br />
</nowiki>}}<br />
<br />
{{Tip|Add {{ic|efistub-update}} to the list of hooks in {{ic|/etc/mkinitcpio.conf}}}}<br />
<br />
{{Note| As of [https://www.archlinux.org/packages/extra/any/refind-efi/ refind-efi 0.2.7], refind automatically detects kernels in {{ic|/boot}}. They do not have to be renamed to have a {{ic|.efi}} extension either. Hence, the following sync scripts aren't needed if using [https://wiki.archlinux.org/index.php/UEFI_Bootloaders#Using_rEFInd refind]. You do need to isntall an EFI driver to read the Linux filesystem on which the kernel is stored, though.}}<br />
<br />
=== Booting EFISTUB ===<br />
<br />
{{Warning|Linux Kernel EFISTUB booting uses {{ic|\}} instead of {{ic|/}} and should be relative to the UEFI System Partition's root. For example, if the initramfs is located in {{ic|/boot/efi/EFI/arch/initramfs-linux.img}}, the corresponding UEFI formatted line would be {{ic|\EFI\arch\initramfs-linux.img}}. Failure to convert the options will lead to a system hang without any error message from the firmware or kernel.<br />
{{Note| Support of initrd path name with {{ic|/}} in EFISTUB booting has been added in [https://patchwork.kernel.org/patch/1899361/ mainline 3.9-rc1] and [http://lwn.net/Articles/541002/ stable 3.8.2]. Leading {{ic|/}} can be ignored but the path still has to be full path. Example: {{ic|initrd&#61;EFI/arch/initramfs-linux.img}} }}<br />
}}<br />
<br />
<br />
<br />
One can boot the EFISTUB kernel using one of the following ways :<br />
<br />
==== Using rEFInd ====<br />
<br />
rEFInd is a fork of rEFIt Boot Manager (used in Intel Macs) by Rod Smith (author of GPT-fdisk). rEFInd fixes many issues in rEFIt with respect to non-Mac UEFI booting and also has support for booting EFISTUB kernels and contains some features specific to them.<br />
{{Tip|If you're new to EFISTUB and/or rEFInd, you need to read [http://www.rodsbooks.com/refind/linux.html The rEFInd Boot Manager: Methods of Booting Linux] before going any further. This section illustrates only one possible use-case which is not suitable for all configurations.}}<br />
# Install {{Pkg|refind-efi}} package with {{ic|# pacman -S refind-efi}}<br />
# Copy the following files from their source directory to their destination<br />
{{Note|1=<arch> is the bit architecture of the system. Run {{ic|$ uname -m}} to get the architecture. Replace <arch> with "ia32" for 32 bit systems, and <arch> with "x64" for 64 bit systems.}}<br />
{| border="1"<br />
!rEFInd File Source!!UEFI Destination<br />
|-<br />
| /usr/lib/refind/refind_<arch>.efi || /boot/efi/EFI/refind/refind_<arch>.efi<br />
|-<br />
| /usr/lib/refind/config/refind.conf || /boot/efi/EFI/refind/refind.conf<br />
|-<br />
| /usr/share/refind/icons || /boot/efi/EFI/refind/icons<br />
|-<br />
| /usr/lib/refind/drivers_<arch> || /boot/efi/EFI/refind/drivers<br />
|}<br />
<br />
{{Tip|Refind's configuration file is located in {{ic|/boot/efi/EFI/refind/refind.conf}}. The file is well commented.}}<br />
<br />
As of {{Pkg|refind-efi}} 0.2.7, refind can auto-detect kernels in {{ic|/boot}}, if there are UEFI drivers for the filesystem used by /boot partition (or / partition if no separate /boot is used) in the ESP, and are loaded by rEFInd. This is enabled in the default configuration in {{ic|refind.conf}} (you may need to include the PATH to the drivers folders in the ESP). Copy your {{ic|/usr/lib/refind/config/refind_linux.conf}} to {{ic|/boot/refind_linux.conf}}. You may pass kernel specific commands in this file. <br />
<br />
Edit the {{ic|refind_linux.conf}} configuration file to be similar to the template below. Replace the string after PARTUUID with your root's PARTUUID<br />
<br />
{{Note|1=Please notice the [https://bbs.archlinux.org/viewtopic.php?pid=1286972 difference] between the standard UUID and the PARTUUID shown by {{ic|$ ls -l /dev/disk/by-partuuid/}}}}<br />
{{hc|refind_linux.conf|<nowiki><br />
"Boot with defaults" "root=PARTUUID=3518bb68-d01e-45c9-b973-0b5d918aae96 ro rootfstype=ext4 add_efi_memmap systemd.unit=graphical.target"<br />
"Boot to Terminal" "root=PARTUUID=3518bb68-d01e-45c9-b973-0b5d918aae96 ro rootfstype=ext4 add_efi_memmap systemd.unit=multi-user.target"</nowiki>}}<br />
<br />
{{Tip|Each line of {{ic|refind_linux.conf}} is displayed as a submenu by rEFInd. Access the submenu with "+" or "insert" keys.}}<br />
<br />
{{Tip|In non-Mac systems, create an entry for rEFInd using [[UEFI#efibootmgr|efibootmgr]] where sdX is the UEFI disk, and Y is the UEFI partition number. Run :<br />
{{bc|<nowiki><br />
# modprobe efivars<br />
# efibootmgr -c -w -d /dev/sdX -p Y -l '\EFI\refind\refind_<arch>.efi' -L "rEFInd" <br />
</nowiki>}}}}<br />
<br />
===== Systemd Automation =====<br />
<br />
{{Tip|To automate the process of copying refind files and updating the nvram (if needed) use the following script}}<br />
<br />
{{Note|Save this script as {{ic|/usr/lib/systemd/scripts/refind_name_patchv2}}}}<br />
{{Tip|If you want to change the directory that refind is installed in the UEFISYS partition, just change the value of $refind_dir in the script}}<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
## COPYRIGHT 2013 : MARK E. LEE (BLUERIDER) : mlee24@binghamton.edu; mark@markelee.com<br />
<br />
## LOG<br />
## 1/17/2013 : Version 2 of refind_name_patch is released<br />
## : Supports long subdirectory location for refind<br />
## : Updates nvram when needed<br />
## : 10% speed boost<br />
<br />
function main () { ## main insertion function<br />
declare -r refind_dir="/boot/efi/EFI/refind"; ## set the refind directory<br />
declare -r arch=$(uname -m | awk -F'_' '{if ($1 == "x86"){print $2}}') && ## get bit architecture<br />
update-efi-dir; ## updates or creates the refind directory<br />
update-efi-nvram; ## updates nvram if needed<br />
}<br />
<br />
function update-efi-dir () { ## setup the refind directory<br />
if [ ! -d $refind_dir ]; then ## check if refind directory exists<br />
echo "Couldn't find $refind_dir";<br />
mkdir $refind_dir && ## make the refind directory if needed<br />
echo "Made $refind_dir";<br />
fi;<br />
if [ "$arch" ]; then ## check if anything was stored in $arch<br />
cp -r /usr/{share/refind/*,lib/refind/refind_x*$arch*.efi} $refind_dir/ && ## update bin and dirs<br />
echo "Updated binaries and directory files for refind at $refind_dir";<br />
else<br />
echo "Failed to detect an x86 architecture";<br />
exit;<br />
fi;<br />
}<br />
<br />
function update-efi-nvram () { ## update the nvram with efibootmgr<br />
declare -r ref_bin=${refind_dir/\/boot\/efi}/$(ls /usr/lib | grep $arch*.efi); ## get path of refind binary (without /boot/efi)<br />
declare -r ref_bin_escape=${ref_bin//\//\\\\}; ## insert escape characters into $ref_bin<br />
modprobe efivars && ## grab the efi variables for efibootmgr<br />
efibootmgr -v | grep $ref_bin_escape && ( ## check if boot entry is in nvram<br />
echo "Found boot entry, no need to update nvram";<br />
) || ( ## if boot entry is not in nvram; add it<br />
declare -r esp=$(mount -l | awk '/ESP/ {print $1}') && ## get ESP partition<br />
efibootmgr -c -w -d ${esp:0:8} -p ${esp:8} -L "rEFInd" -l $ref_bin_escape && ## update nvram<br />
echo "<br />
Updated nvram with entry rEFInd to boot $ref_bin<br />
Did not copy configuration files, please move refind.conf to $refind_dir/";<br />
)<br />
}<br />
<br />
main; ## run the main insertion function<br />
</nowiki>}}<br />
<br />
{{Note| As of [https://www.archlinux.org/packages/extra/any/refind-efi/ refind-efi 0.2.7], refind automatically detects kernels in {{ic|/boot}}. They do not have to be renamed to have a {{ic|.efi}} extension either. Hence, the following sync scripts aren't needed if using [https://wiki.archlinux.org/index.php/UEFI_Bootloaders#Using_rEFInd refind]. You do need to isntall an EFI driver to read the Linux filesystem on which the kernel is stored, though.}}<br />
<br />
{{Note|Save the following service file as {{ic|/usr/lib/systemd/system/refind_update.path}}}}<br />
{{bc|<nowiki><br />
[Unit]<br />
Description=Update rEFInd bootloader files<br />
<br />
[Path]<br />
PathChanged=/usr/lib/refind/refind_<arch>.efi<br />
Unit=refind_update.service<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{Note|Save the following service file as {{ic|/usr/lib/systemd/system/refind_update.service}}}}<br />
{{bc|<nowiki><br />
[Unit]<br />
Description=Update rEFInd directories, binaries, and nvram<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/bin/bash /usr/lib/systemd/scripts/refind_name_patchv2<br />
RemainAfterExit=no<br />
</nowiki>}}<br />
<br />
{{Tip|Enable the systemd path unit by running :<br />
{{bc|<nowiki><br />
# systemctl enable refind_update.path<br />
</nowiki>}}}}<br />
<br />
===== Apple Macs =====<br />
<br />
In case of Apple Macs, try {{AUR|mactel-boot}} for an experimental "bless" utility for Linux. If that does not work, use "bless" form within OSX to set rEFInd as default bootloader. Assuming UEFISYS partition is mounted at {{ic|/mnt/efi}} within OSX, do<br />
<br />
$ sudo bless --setBoot --folder /mnt/efi/EFI/refind --file /mnt/efi/EFI/refind/refind_x64.efi<br />
<br />
===== VirtualBox =====<br />
<br />
In case of VirtualBox, see [[VirtualBox#Using_Arch_under_Virtualbox_EFI_mode]].<br />
<br />
==== Using gummiboot ====<br />
<br />
[[Gummiboot]] is a UEFI Boot Manager which provides a nice menu for EFISTUB Kernels. It is available in [extra] as {{Pkg|gummiboot}}. See https://wiki.archlinux.org/index.php/Gummiboot for more info.<br />
<br />
==== Using UEFI Shell ====<br />
<br />
It is possible to launch EFISTUB kernel form UEFI Shell as if it is a normal UEFI application. In this case the kernel parameters are passed as normal parameters to the launched EFISTUB kernel file.<br />
<br />
> fs0:<br />
> cd \EFI\arch<br />
> vmlinuz-arch.efi root=PARTUUID=3518bb68-d01e-45c9-b973-0b5d918aae96 ro rootfstype=ext4 add_efi_memmap initrd=EFI/arch/initramfs-arch.img<br />
<br />
You can also write a simple {{ic|archlinux.nsh}} file with your boot parameters and put it in your UEFI System Partition, then run it with:<br />
<br />
fs0:<br />
archlinux<br />
<br />
Example Script:<br />
<br />
echo -on<br />
\EFI\arch\vmlinuz-arch.efi root=PARTUUID=3518bb68-d01e-45c9-b973-0b5d918aae96 rootfstype=ext4 add_efi_memmap initrd=EFI/arch/initramfs-arch.img<br />
<br />
This way you can specify UUID's without needing to remember the name or type out 20-30 characters.<br />
<br />
==== Using efibootmgr entry ====<br />
<br />
{{Warning|1=Some kernel and efibootmgr combinations do not work [https://bugs.archlinux.org/task/34641]. You will be able to delete but not create boot entries.}}<br />
<br />
{{Note|Some UEFI firmwares may not support embedding command line parameters to uefi applications in the boot entries.}}<br />
<br />
It is possible to directly embed the kernel parameters within the boot entry created by efibootmgr. This means that in your BIOS/UEFI you will be able to select Arch Linux directly in the default boot order, and on startup it will boot into Arch directly without any kind of boot selection GUI.<br />
<br />
# modprobe efivars<br />
# efibootmgr -c -w -d /dev/sdX -p Y -l '\EFI\arch\vmlinuz-arch.efi' -L "Arch Linux (EFISTUB)" -u $(cat /proc/cmdline)<br />
<br />
It is a good idea to run<br />
<br />
# efibootmgr -v<br />
<br />
to verify that the resulting entry is correct. You should also consider reordering the boot options ({{ic|efibootmgr -o}}) to place the Arch entry last, which could make the system easier to recover if it fails.<br />
<br />
More info about efibootmgr at [[UEFI#efibootmgr]]. Forum post https://bbs.archlinux.org/viewtopic.php?pid=1090040#p1090040 .<br />
<br />
== GRUB 2.x ==<br />
<br />
GRUB 2.x contains its own filesystem drivers and does not rely on the firmware to access the files. It can directly read files from {{ic|/boot}} and does not require the kernel and initramfs files to be in the UEFISYS partition. Detailed information at [[GRUB#UEFI_systems_2]]. For bzr development version try AUR package - {{AUR|grub-efi-x86_64-bzr}}.<br />
<br />
== SYSLINUX ==<br />
<br />
{{Note|Syslinux UEFI support is currently part of version 6.00-preXX or in firmware branch of upstream git repo. It is considered alpha quality by upstream. The below information is provided mainly to enable bug-testing. Please report all issues upstream.}}<br />
<br />
{{Note|Syslinux UEFI can boot only those kernels that support '''EFI Handover Protocol'''. Thus LTS kernels are not supported.}}<br />
<br />
Install {{AUR|syslinux-efi-git}} AUR package and copy {{ic|/usr/lib/syslinux/efi64/*}} to {{ic|$esp/EFI/syslinux/}} ({{ic|$esp}} is the mountpoint of UEFISYS partition) ({{ic|efi64}} is for x86_64 UEFI firmwares, replace with {{ic|efi32}} for i386 UEFI firmwares), and then create a boot entry using efibootmgr in the firmware boot manager.<br />
<br />
== ELILO ==<br />
<br />
ELILO is the UEFI version of LILO Boot Loader. It was originally created for Intel Itanium systems which supported only EFI (precursor to UEFI). It is the oldest UEFI bootloader for Linux. It is still in development but happens at a very slow pace. Upstream provided compiled binaries are available at http://sourceforge.net/projects/elilo/ . Elilo config file {{ic|elilo.conf}} is similar to [[LILO]]'s config file. AUR package - {{AUR|elilo-efi}}.<br />
<br />
== EFILINUX ==<br />
<br />
EFILINUX is a reference implementation of a UEFI Linux bootloader and precursor to Kenrel EFISTUB support. It is considered to be a alpha quality software (as on 16-MAY-2012). Upstream sources are at https://github.com/mfleming/efilinux . and the usage instructions are at http://thread.gmane.org/gmane.linux.kernel/1172645 and http://article.gmane.org/gmane.linux.kernel/1175060 . AUR packages - {{Pkg|efilinux-efi}} and {{AUR|efilinux-efi-x86_64-git}} (only for x86_64 UEFI).<br />
<br />
== Package Naming Guidelines ==<br />
<br />
UEFI bootloader package(s) should be suffixed with {{ic|-efi-x86_64}} or {{ic|-efi-i386}} to denote package built for 64-bit and 32-bit UEFI respectively. If a single package contains both 64-bit and 32-bit UEFI applications, then {{ic|-efi}} suffix should be used in the '''pkgname'''.<br />
<br />
== See also ==<br />
<br />
* [http://www.rodsbooks.com/efi-bootloaders/ Rod Smith - Managing EFI Boot Loaders for Linux]<br />
* [http://www.rodsbooks.com/refind/ Rod Smith - rEFInd, a fork or rEFIt]<br />
* [https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob_plain;f=Documentation/x86/efi-stub.txt;hb=HEAD Linux Kernel Documentation on EFISTUB]<br />
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=291f36325f9f252bd76ef5f603995f37e453fc60;hp=55839d515495e766605d7aaabd9c2758370a8d27 Linux Kernel EFISTUB Git Commit]<br />
* [http://www.rodsbooks.com/efi-bootloaders/efistub.html Rod Smith's page on EFISTUB]<br />
* [http://www.rodsbooks.com/refind/linux.html rEFInd Documentation for booting EFISTUB Kernels]</div>Mid-kidhttps://wiki.archlinux.org/index.php?title=Arch_is_the_best&diff=262679Arch is the best2013-06-13T18:07:20Z<p>Mid-kid: Added "Ook!"</p>
<hr />
<div>[[Category:About Arch]]<br />
== Purpose ==<br />
<br />
The '''Arch is the best''' project is a very sophisticated and exquisite, ego-boosting and mind-blowing (albeit perhaps a bit over-engineered) project which aims to prove Arch's superiority.<br />
<br />
== History ==<br />
<br />
The project was initiated in April 2008 by long time Arch community member [https://bbs.archlinux.org/profile.php?id=2529 lucke] as a simple shell script which provided irrefutable proof that "Arch is the best". Over the following weeks, this project gathered momentum and was ported to multiple different languages, both programming and verbal.<br />
<br />
== Install ==<br />
<br />
A sample PKGBUILD has been uploaded to AUR called {{aur|archbest-mod1}}.<br />
<br />
== The Code ==<br />
<br />
The "Arch is the best" project is ported to many programming languages.<br />
<br />
<br />
'''Ada''' - A systems critical programming language.<br />
with Ada.Text_IO;<br />
use Ada.Text_IO;<br />
procedure ArchIsTheBest is<br />
begin<br />
Put_Line("Arch is the best!");<br />
end HelloWorld;<br />
<br />
'''ATS''' - A functional programming language that uses dependent types to improve programs' reliability.<br />
implement main () = println! "Arch is the best!"<br />
<br />
'''Awk''' - A data-driven programming language designed for processing text-based data.<br />
BEGIN {<br />
print "Arch is the best!"<br />
}<br />
<br />
<br />
'''Befunge''' - Believed to be the first two-dimensional, ASCII-based, general-purpose (in the sense of "you could plausibly write Hunt the Wumpus in it") programming language.<br />
<v"Arch is the best!"0<br />
<,_@#:<br />
<br />
<br />
'''Bourne shell''' - The original program, should be compatible with any shell.<br />
#!/bin/sh<br />
echo "Arch is the best!"<br />
<br />
<br />
'''Bourne shell (Alternate)''' - Handy for piping the output to your favourite IRC/email/IM client. Should work with any shell.<br />
#!/bin/sh<br />
yes Arch is the best!<br />
<br />
<br />
'''Bourne shell (Dynamically updated)'''<br />
<pre style='overflow:auto'><br />
#!/bin/bash<br />
wget http://wiki.archlinux.org/index.php/Arch_is_the_best -qO-| sed -n ':b;n;s/id="Translations"//;Tb;:d;n;s/id="See_also"//;t;p;bd'|sed '/<i>.*<\/i>/d;s/<[^>]*>//g'|sed 'N;s/\n/: /;N;N;s/\n//g'<br />
</pre><br />
<br />
<br />
'''brainfuck''' - Doesn't the language name explain it?<br />
++>++++++>+++++<+[>[->+<]<->++++++++++<]>>.<[-]>[-<++>]<br />
<----------------.---------------.+++++.<+++[-<++++++++++>]<.<br />
>>+.++++++++++.<<.>>+.------------.---.<<.>>---.<br />
+++.++++++++++++++.+.<<+.[-]++++++++++.<br />
<br />
<br />
'''C''' - Note the three space indenting used in this project, much like that used by other superior beings.<br />
#include <stdio.h><br />
#include <stdlib.h><br />
int main(void) <br />
{<br />
puts("Arch is the best!");<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
<br />
'''C#''' - Intended to be a simple, modern, general-purpose, object-oriented programming language.<br />
using System;<br />
public class ArchIsTheBest<br />
{<br />
static public void Main ()<br />
{<br />
Console.WriteLine ("Arch is the best!");<br />
}<br />
}<br />
<br />
<br />
'''C++''' - Arch == Linux++<br />
#include <iostream><br />
#include <cstdlib><br />
int main ()<br />
{<br />
std::cout << "Arch is the best!" << std::endl;<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
<br />
'''CoffeeScript''' - A programming language that transcompiles to JavaScript.<br />
alert 'Arch is the best!'<br />
<br />
<br />
'''Clojure''' - A Lisp dialect that runs on the JVM.<br />
(def translations {"english" "Arch is the best!",<br />
"german" "Arch ist das Beste!",<br />
"australian" "Arch is fair dinkum, mate!",<br />
"h4x0r" "arhc 51 7he be57!",<br />
"spanish" "¡Arch es el mejor!"})<br />
<br />
(defn read-choice []<br />
(println "\nAvailable languages: ")<br />
(doall (map #(println (key %)) translations))<br />
(print "Enter language or Ctrl-c: ") (flush)<br />
(translations (read-line) :badinput))<br />
<br />
(defn arch-is-the-best []<br />
(loop [choice (read-choice)]<br />
(case choice<br />
:badinput (do (print "\nBad input!\n")<br />
(recur (read-choice)))<br />
(do (print "\n" choice "\n")<br />
(recur (read-choice))))))<br />
or<br />
(def translations {"english" "Arch is the best!",<br />
"german" "Arch ist das Beste!",<br />
"australian" "Arch is fair dinkum, mate!",<br />
"h4x0r" "arhc 51 7he be57!",<br />
"spanish" "¡Arch es el mejor!"<br />
"street" "Arch iz da shizzle ma nizzle"})<br />
(while 1<br />
(println "\nPick a language:\n" (map #(key %) translations) "\n language: ")<br />
(println (translations (read-line) "Not a valid language")))<br />
<br />
<br />
or<br />
(prn "Arch is the best!")<br />
<br />
'''Common Lisp''' - Tested on SBCL, feel free to add more of the translations.<br />
#!/usr/bin/sbcl --script<br />
(defparameter *best-list* '((English "Arch is the best!")<br />
(Chinese "Arch, 她出类拔萃!")<br />
(German "Arch ist das Beste!")<br />
(Greek "Το Arch είναι το καλύτερο!")))<br />
(defun aitb ()<br />
(format t "Available languages: ~{~{~@(~a~)~*~}~^, ~}.~%" *best-list*)<br />
(loop for input = (progn (format t "~&Input the desired language, (or 'quit'): ~%")<br />
(force-output)<br />
(read-line))<br />
if (string-equal input "quit")<br />
do (loop-finish)<br />
else<br />
do (let ((language-def<br />
(assoc input *best-list*<br />
:key (lambda (lang) (symbol-name lang))<br />
:test #'string-equal)))<br />
(if language-def<br />
(format t "~&~A~%" (second language-def))<br />
(format t "~&Invalid language.~%"))))<br />
(format t "~&May the Arch be with you!~%"))<br />
(aitb)<br />
<br />
<br />
'''Common Lisp (Alternate)''' - Should run on any implementation (Clisp, Allegro, SBCL...)<br />
(princ "Arch is the best!")<br />
<br />
<br />
'''Dart''' - Google's javascript killer<br />
main(){<br />
print('Arch is the best');<br />
}<br />
<br />
<br />
'''Erlang''' - A concurrent, garbage-collected programming language and runtime system.<br />
-module(arch).<br />
-export([is_the_best/0]).<br />
is_the_best() -> io:fwrite("Arch is the best!\n").<br />
<br />
Or using message passing between processes<br />
<br />
-module(arch).<br />
-export([ultimate_question/0,the_answer/0]).<br />
the_answer() -><br />
receive<br />
{Client,who_is_the_best} -><br />
Client ! {self(),"Arch is the best!"};<br />
{Client,_} -><br />
Client ! {self(),"Taco Taco Taco!"}<br />
end,<br />
the_answer().<br />
ultimate_question() -><br />
Pid = spawn(arch,the_answer,[]),<br />
Pid ! {self(),who_is_the_best},<br />
receive<br />
{Pid,Response} -> io:format("~s~n",[Response])<br />
end.<br />
<br />
<br />
<br />
<br />
'''Forth''' - Stack-based language.<br />
." Arch is the best" cr -- kiss way<br />
<br />
'''Fortran95'''<br />
program arch<br />
print *,"Arch is the best!"<br />
end program arch<br />
<br />
'''Genie''' - A new programming language, that allows for a more modern programming style while being able to effortlessly create and use GObjects natively. <br />
init<br />
print "Arch is the best"<br />
<br />
<br />
'''Gjs''' - A Javascript binding for GNOME. It's mainly based on Spidermonkey javascript engine and the GObject introspection framework.<br />
#!/usr/bin/env gjs<br />
print ('Arch is the best');<br />
<br />
<br />
'''Go''' - A language created by Google that's a love child between C, C++ and Python.<br />
package main<br />
<br />
import "fmt"<br />
<br />
func main() {<br />
fmt.Println("Arch is the best!")<br />
}<br />
<br />
<br />
'''Haskell''' - The language where IO is easy and unproblematic.<br />
main = putStrLn "Arch is the best!"<br />
<br />
<br />
'''HTML''' - A markup language used to create and define web pages and their content.<br />
<pre><br />
<!DOCTYPE html><br />
<html lang='en'><br />
<head><br />
<title>Arch is the best!</title><br />
</head><br />
<body><br />
<p>Arch is the best!</p><br />
</body><br />
</html><br />
</pre><br />
<br />
'''Io'''<br />
"Arch is the best!" println<br />
<br />
<br />
'''Java''' - An extremely portable language, this will run on pretty much anything, it might even run on your toaster!<br />
public class ArchIsTheBest {<br />
public static void main(String[] args) {<br />
System.out.println("Arch is the best!");<br />
}<br />
}<br />
<br />
<br />
'''JavaScript''' - Also known as ECMAScript, a prototype-based object-oriented scripting language. <br />
console.log('Arch is the best!');<br />
<br />
<br />
'''JavaScript (in a web browser)'''<br />
alert('Arch is the best!');<br />
<br />
<br />
'''LilyPond''' - A powerful music engraving program with an intuitive LaTeX-like input language.<br />
\version "2.12.3"<br />
\include "english.ly"<br />
\header { title = "Arch is the best!" }<br />
\score<br />
{<br />
<<<br />
\relative c' { c4 e g c \bar "||" }<br />
\addlyrics { Arch is the best! }<br />
>><br />
}<br />
<br />
<br />
'''LOLCODE''' - Why not?<br />
HAI<br />
CAN HAS STDIO?<br />
VISIBLE "ARCH IS TEH PWNZ LOL!"<br />
KTHXBYE<br />
<br />
<br />
'''Lua''' - A lightweight, extensible programming language.<br />
print "Arch is the best!"<br />
<br />
<br />
'''Nasm(x86_64) (or yasm)''' - The Netwide Assembler<br />
<br />
;nasm -f elf64 arch.asm<br />
;ld -o arch arch.o<br />
;./arch<br />
<br />
section .text<br />
global _start<br />
_start:<br />
mov edx,len<br />
mov ecx,msg<br />
mov ebx,1<br />
mov eax,4<br />
int 0x80<br />
xor ebx,ebx<br />
mov eax,1<br />
int 0x80<br />
msg: db "Arch is the best!",10<br />
len equ $-msg<br />
<br />
<br />
'''Nimrod''' - Portable lightweight programming language.<br />
echo "Arch is the best!"<br />
<br />
<br />
'''Objective-C''' - A reflective, object-oriented programming language that adds Smalltalk-style messaging to the C programming language.<br />
NSLog(@"Arch is the best!");<br />
<br />
<br />
'''OCaml''' - The main implementation of the Caml programming language.<br />
print_endline "Arch is the best!"<br />
<br />
'''Octave''' - High-level interpreted language, primarily intended for numerical computations.<br />
printf("Arch is the best!\n")<br />
<br />
'''Ook!''' - brainfuck, translated to Orangutan<br />
Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook! Ook? Ook. Ook? Ook! Ook? Ook! Ook! Ook. Ook? Ook. Ook. Ook? Ook. Ook? Ook! Ook? Ook. Ook! Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook? Ook! Ook. Ook? Ook. Ook? Ook! Ook. Ook? Ook. Ook! Ook? Ook! Ook! Ook? Ook! Ook. Ook? Ook! Ook? Ook! Ook! Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook! Ook! Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook? Ook! Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook! Ook. Ook! Ook? Ook! Ook! Ook? Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook.<br />
<br />
'''Perl''' - A high-level, general-purpose, interpreted, dynamic programming language.<br />
#!/usr/bin/perl<br />
print "Arch is the best!\n";<br />
<br />
<br />
'''PHP''' - A general-purpose scripting language.<br />
<?php<br />
echo "Arch is the best!\n";<br />
?> <br />
<br />
<br />
'''Pixilang''' - Make me pixels.<br />
print("Arch is the best!",0,0,#1897D1)<br />
frame<br />
<br />
<br />
'''Portable GNU assembler''' - as -o arch.o arch.s && ld -o arch -O0 arch.o<br />
<br />
.section .data<br />
archIsBest: <br />
.ascii "Arch is the best!\n"<br />
archIsBest_len:<br />
.long . - archIsBest<br />
.section .text<br />
.globl _start<br />
_start:<br />
xorl %ebx, %ebx<br />
movl $4, %eax <br />
xorl %ebx, %ebx<br />
incl %ebx <br />
leal archIsBest, %ecx<br />
movl archIsBest_len, %edx <br />
int $0x80 <br />
xorl %eax, %eax<br />
incl %eax<br />
xorl %ebx, %ebx <br />
int $0x80<br />
<br />
<br />
'''Processing''' - An open source programming language and IDE built for the electronic arts and visual design.<br />
println("Arch is the best!");<br />
<br />
<br />
'''Prolog''' - A general purpose logic programming language associated with artificial intelligence and computational linguistics.<br />
format('Arch is the best~n',[]).<br />
<br />
<br />
'''Python''' - A general-purpose high-level programming language.<br />
#!/usr/bin/env python3<br />
print('Arch is the best!')<br />
<br />
<br />
'''QBASIC''' - An interpreter for a variant of the BASIC programming language which is based on QuickBASIC.<br />
PRINT "Arch is the best!"<br />
<br />
<br />
'''R''' - A language for statistical computing (and much more!).<br />
archIsBest <- function() { cat("Arch is the best!\n") }<br />
archIsBest()<br />
<br />
<br />
'''Ruby''' - A dynamic, reflective, general purpose object-oriented programming language.<br />
#!/usr/bin/ruby -w<br />
puts 'Arch is the best!'<br />
<br />
<br />
'''Scala''' - A multi paradigm language that runs on the JVM<br />
object ArchIsBest extends App {<br />
println("Arch is the best!")<br />
} <br />
<br />
<br />
<br />
'''Scheme''' - A dialect of Lisp.<br />
(display "Arch is the best!\n")<br />
or in Casper-Ti-Vector style<br />
#!/usr/bin/guile -s<br />
!#<br />
(define 节 or)<br />
(define 哀 #t)<br />
(define (xi) (display "Arch is the best!\n"))<br />
(节 (xi) 哀 (wen) 顺 (le) 变 (jian) )<br />
<br />
<br />
'''Seed''' - A library and interpreter, dynamically bridging the WebKit JavaScriptCore engine, with the GNOME platform.<br />
#!/usr/bin/env seed<br />
print ('Arch is the best');<br />
<br />
<br />
'''Shoes''' - A Ruby version using Shoes for a GUI<br />
Shoes.app :width => 135, :height => 30 do <br />
para "Arch is the Best!"<br />
end<br />
<br />
<br />
'''SQL''' - Structured Query Language, the query language for relational databases<br />
SELECT 'Arch is the best!';<br />
SELECT 'Arch is the best!' from dual; -- for Oracle DB<br />
<br />
<br />
'''Standard ML''' - A general-purpose, modular, functional programming language with compile-time type checking and type inference.<br />
print "Arch is the best!\n"<br />
<br />
<br />
'''Tcl/Tk''' - A scripting language that is commonly used for rapid prototyping, scripted applications, GUIs and testing.<br />
#!/usr/bin/env tclsh<br />
puts "Arch is the best!"<br />
<br />
<br />
'''Vala''' - "Vala is a new programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C"<br />
void main(string[] args) {<br />
stdout.printf("\nArch is the best!\n\n");<br />
}<br />
<br />
<br />
''' Wiring (Arduino)''' - Built on Processing, the open source programming language developed at the Massachusetts Institute of Technology.<br />
void setup() <br />
{<br />
Serial.begin(9600); <br />
}<br />
void loop() <br />
{ <br />
Serial.print("Arch is the best!");<br />
}<br />
<br />
<br />
''' X11 ''' - X11 is an architecture independent system for display of graphical user interfaces.<br />
#include <stdio.h><br />
#include <stdlib.h><br />
#include <string.h><br />
<br />
#include <X11/Xlib.h><br />
<br />
int main()<br />
{<br />
Display *d;<br />
Window w;<br />
XEvent e;<br />
int s;<br />
<br />
if (!(d = XOpenDisplay(NULL))) {<br />
fprintf(stderr, "Couldn't open display, but Arch is the best!\n");<br />
exit(1);<br />
}<br />
<br />
s = DefaultScreen(d);<br />
w = XCreateSimpleWindow(d, RootWindow(d,s), 0, 0, 110, 20, 0, <br />
0, WhitePixel(d,s));<br />
XSelectInput(d, w, ExposureMask | KeyPressMask);<br />
XMapWindow(d,w);<br />
<br />
while (1) {<br />
XNextEvent(d, &e);<br />
if (e.type == Expose) {<br />
XDrawString(d, w, DefaultGC(d, s), 5, 15, "Arch is the best!", 17);<br />
}<br />
}<br />
<br />
XCloseDisplay(d);<br />
return 0;<br />
}<br />
<br />
==Translations==<br />
'''Arabic'''<br />
ارتش هو الأفضل<br />
<br />
'''Australian'''<br />
Arch is fair dinkum, mate!<br />
<br />
'''Bahasa Indonesia'''<br />
Arch terbaik!<br />
<br />
'''Basque'''<br />
Arch onena da!<br />
<br />
'''Belarusian'''<br />
Арч - самы лепшы!<br />
<br />
'''Bengali'''<br />
আর্চ সবচেয়ে ভালো!<br />
<br />
'''Binary ASCII'''<br />
0100000101110010011000110110100000100000011010010111001100100000011101000110100001100101001000000110001001100101011100110111010000100001<br />
<br />
'''British'''<br />
Arch is simply spiffing.<br />
<br />
'''Bulgarian'''<br />
Арч е най-добрият!<br />
<br />
'''Catalan'''<br />
Arch és el millor!<br />
<br />
'''Chinese (Simplified)'''<br />
Arch 最棒了!<br />
<br />
'''Ancient Chinese'''<br />
阿祺,盡善矣。<br />
<br />
'''Chinese (Taobao Style - 淘宝体)'''<br />
Arch,好评哦,亲!<br />
<br />
'''Czech'''<br />
Arch je nejlepší!<br />
<br />
'''Danish'''<br />
Arch er bedst!<br />
<br />
'''Desrever (Reversed)'''<br />
!tseb eht si hcrA<br />
<br />
'''Dutch'''<br />
Arch is de beste!<br />
<br />
'''Old English'''<br />
Arch biþ betst!<br />
<br />
'''Esperanto'''<br />
Arch plejbonas!<br />
<br />
'''Estonian'''<br />
Arch on parim!<br />
<br />
'''Finnish'''<br />
Arch on paras!<br />
<br />
'''Filipino'''<br />
Mabuhay ang Arch!<br />
<br />
'''French'''<br />
Arch est le meilleur!<br />
<br />
'''Galician'''<br />
Arch é o mellor!<br />
<br />
'''German'''<br />
Arch ist das Beste!<br />
<br />
'''Ancient Greek'''<br />
Ἆρχ ἄριστον!<br />
<br />
'''Greek'''<br />
Το Arch είναι το καλύτερο!<br />
<br />
'''h4x0r'''<br />
Arch 15 7h3 b357!<br />
<br />
'''Hantec'''<br />
Arch je nejbetélnější!<br />
<br />
'''Hebrew'''<br />
ארצ' זה הכי אחי!<br />
<br />
'''Hexadecimal ASCII'''<br />
4172636820697320746865206265737421<br />
<br />
'''Hindi'''<br />
आर्ख सब से अच्छा है ।<br />
<br />
'''Hungarian'''<br />
Az Arch a legjobb!<br />
<br />
'''Irish'''<br />
Arch é is fearr!<br />
<br />
'''Italian'''<br />
Arch è il migliore!<br />
<br />
'''Japanese'''<br />
Archが一番ですよ!<br />
<br />
'''Kazakh'''<br />
Арч - ең жақсы!<br />
<br />
'''Latin'''<br />
Arch optimus est!<br />
<br />
'''Latvian'''<br />
Arch ir labākais!<br />
<br />
'''Lithuanian'''<br />
Arch yra geriausias!<br />
<br />
'''Marathi'''<br />
आर्च सगळ्यात भारी आहे!<br />
<br />
'''Norwegian'''<br />
Arch er best!<br />
<br />
'''Persian'''<br />
طاق بزرگ است<br />
<br />
'''Pig Latin'''<br />
Archway isway ethay estbay!<br />
<br />
'''Polish'''<br />
Arch jest najlepszy!<br />
<br />
'''Portuguese'''<br />
Arch é o melhor!<br />
<br />
'''Québécois'''<br />
Arch est le plus meilleure du monde!<br />
<br />
'''Romanian'''<br />
Аrch e cel mai bun!<br />
<br />
'''Russian'''<br />
Арч — лучший!<br />
<br />
'''Serbian'''<br />
Arch je najbolji!<br />
<br />
'''Singaporean'''<br />
Arch the best lah!<br />
<br />
'''Slovenian'''<br />
Arch je najboljši!<br />
<br />
'''Spanish'''<br />
¡Arch es el mejor!<br />
<br />
'''Spanish (Argentina)'''<br />
- AKA ''"Casteshano"''<br />
Arch es una mazza!!<br />
<br />
'''Swedish'''<br />
Arch är bäst!<br />
<br />
'''Fikonspråket'''<br />
Firch Arkon fir äkon fist bäkon<br />
<br />
'''Turkish'''<br />
Arch en iyisidir!<br />
<br />
'''Tamil'''<br />
ஆர்ச்சே சிறந்தது!<br />
<br />
'''Telugu'''<br />
ఆర్చ్ ఉత్తమమైనది!<br />
<br />
'''Ukrainian'''<br />
Arch є найкращий!<br />
<br />
'''Vietnamese'''<br />
Arch là tốt nhất!<br />
<br />
'''Morse Code'''<br />
..- -... ..- -. - ..- .. ... - .... . -... . ... -<br />
<br />
'''Braille'''<br />
⠁⠗⠉⠓⠀⠊⠎⠀⠮⠀⠃⠑⠎⠞⠲<br />
<br />
'''Base64'''<br />
QXJjaCBpcyB0aGUgYmVzdCEK<br />
<br />
'''URL Encoded'''<br />
Arch%20is%20the%20best!<br />
<br />
'''ROT13'''<br />
Nepu vf gur orfg!<br />
<br />
'''Upside Down'''<br />
¡ʇsǝq ǝɥʇ s! ɥɔɹ∀<br />
<br />
'''Welsh (Cymraeg)'''<br />
<br />
Emphasis on being the best (one):<br />
Yr orau un yw Arch!<br />
Y gorau un yw Arch!<br />
Emphasis on Arch:<br />
Arch sydd yr orau un!<br />
Arch sydd y gorau un!<br />
<br />
== See also ==<br />
<br />
* [https://bbs.archlinux.org/viewtopic.php?id=47306 forum Thread]</div>Mid-kidhttps://wiki.archlinux.org/index.php?title=UEFI_Bootloaders&diff=260169UEFI Bootloaders2013-06-01T15:04:27Z<p>Mid-kid: Added a note and fixed 2 paths.</p>
<hr />
<div>[[Category:Boot loaders]]<br />
[[zh-CN:UEFI Bootloaders]]<br />
This page contains info about various [[UEFI]] Bootloaders capable of booting Linux kernel. It is recommended to read the [[UEFI]] and [[GPT]] pages before reading this page. The following [[Boot Loader|bootloaders]] are explained here:<br />
<br />
== Linux Kernel EFISTUB ==<br />
{{Warning|1=A bug has been noticed where booting EFISTUB can fail depending on kernel version and motherboard model. See [https://bbs.archlinux.org/viewtopic.php?id=156670&p=1] for more information.}}<br />
<br />
Linux (Kernel >= 3.3) supports {{ic|EFISTUB (EFI BOOT STUB)}} booting. It is enabled by by default on Arch Linux kernels or can be activated by setting {{ic|CONFIG_EFI_STUB&#61;y}} in the Kernel configuration (see [https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob_plain;f=Documentation/x86/efi-stub.txt;hb=HEAD The EFI Boot Stub] for more information).<br />
<br />
A single EFISTUB kernel is not capable of launching other kernels, hence each EFISTUB Kernel + Initramfs pair requires a separate boot menu entry. It is recommended to use a UEFI Boot Manager to manage multiple kernels.<br />
<br />
=== Setting up EFISTUB ===<br />
<br />
#[https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#EFI_System_Partition Create a FAT32 UEFI System Partition]<br />
# Mount the UEFI System Partition at {{ic|/boot/efi}} with {{ic|# mount <UEFI Partition> /boot/efi}} if you're going to be using GRUB2, or at {{ic|/boot}} with {{ic|# mount <UEFI Partition> /boot}} if you're going to be using Gummiboot or rEFInd. Gummiboot cannot boot across partitions, and will never have such capability due to its nature, so it's paramount that you mount the UEFI System Partition at /boot for use with Gummiboot so that the kernel and initramfs lie on the same partition as the bootmanager.<br />
{{note| On some machines, when using rEFInd, it works fine when mounting the UEFI partition in {{ic|/boot/efi}}}}<br />
# Create {{ic|/boot/efi/EFI/arch/}} directory with {{ic|# mkdir /boot/efi/EFI/arch/}}<br />
# Copy the following files from source to destination<br />
{| border="1"<br />
!Boot File Source!!UEFI Destination<br />
|-<br />
| /boot/vmlinuz-linux || /boot/efi/EFI/arch/vmlinuz-arch.efi<br />
|-<br />
| /boot/initramfs-linux.img || /boot/efi/EFI/arch/initramfs-arch.img<br />
|-<br />
| /boot/initramfs-linux-fallback.img || /boot/efi/EFI/arch/initramfs-arch-fallback.img<br />
|}<br />
<br />
=== Sync EFISTUB Kernel ===<br />
{{Warning|The EFISTUB Kernel must be updated each time the kernel is updated (follow step 4 in [https://wiki.archlinux.org/index.php/UEFI_Bootloaders#Setting_up_EFISTUB Setting up EFISTUB]. Failure to do so will result in failure to boot. Alternatively one can automatically update the EFISTUB kernel using one of the following methods:}}<br />
<br />
{{Note| As of [https://www.archlinux.org/packages/extra/any/refind-efi/ refind-efi 0.6.5], refind now automatically detects kernels in {{ic|/boot}}. They do not have to be renamed to have a {{ic|.efi}} extension either. Hence, the following sync scripts aren't needed if using [https://wiki.archlinux.org/index.php/UEFI_Bootloaders#Using_rEFInd refind].}}<br />
<br />
==== Systemd ====<br />
[[Systemd]] features event triggered tasks. In this particular case, the ability to detect a change in path is used to sync the EFISTUB kernel and initramfs files when they are updated in {{ic|boot}}.<br />
<br />
<br />
{{Warning|Since mkinitcpio takes time to build the kernel stub and the initramfs. It is possible for the following systemd services to copy older kernel stubs and initramfs instead of the new ones. To reduce the chance of this error, it is better to bind the efistub copying service to check if the initramfs-linux-fallback.img was changed (since it is the last thing built by mkinitcpio).}}<br />
{{Tip|Save the following script as {{ic|/usr/lib/systemd/system/efistub-update.path}}}}<br />
{{bc|<nowiki><br />
[Unit]<br />
Description=Copy EFISTUB Kernel to UEFISYS Partition<br />
<br />
[Path]<br />
PathChanged=/boot/initramfs-linux-fallback.img<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{Tip|Save the following script as {{ic|/usr/lib/systemd/system/efistub-update.service}}}}<br />
{{bc|<nowiki><br />
[Unit]<br />
Description=Copy EFISTUB Kernel to UEFISYS Partition<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/bin/cp -f /boot/vmlinuz-linux /boot/efi/EFI/arch/vmlinuz-arch.efi<br />
ExecStart=/bin/cp -f /boot/initramfs-linux.img /boot/efi/EFI/arch/initramfs-arch.img<br />
ExecStart=/bin/cp -f /boot/initramfs-linux-fallback.img /boot/efi/EFI/arch/initramfs-arch-fallback.img<br />
</nowiki>}}<br />
<br />
{{Tip|Enable these services with<br />
{{bc|<nowiki><br />
# systemctl enable efistub-update.path<br />
</nowiki>}}}}<br />
<br />
==== Incron ====<br />
{{Pkg|incron}} can run a script to sync the EFISTUB Kernel after updates<br />
<br />
{{Tip|Save the following script as {{ic|/usr/local/bin/efistub-update.sh}}}}<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
/bin/cp -f /boot/vmlinuz-linux /boot/efi/EFI/arch/vmlinuz-arch.efi<br />
/bin/cp -f /boot/initramfs-linux.img /boot/efi/EFI/arch/initramfs-arch.img<br />
/bin/cp -f /boot/initramfs-linux-fallback.img /boot/efi/EFI/arch/initramfs-arch-fallback.img<br />
</nowiki>}}<br />
<br />
{{Tip|Save the following script as {{ic|/etc/incron.d/efistub-update.conf}}}}<br />
{{Note|The first parameter {{ic|/boot/initramfs-linux-fallback.img}} is the file to watch. The second parameter {{ic|IN_CLOSE_WRITE}} is the action to watch for. The third parameter {{ic|/usr/local/bin/efistub-update.sh}} is the script to execute.}}<br />
{{bc|<nowiki><br />
/boot/initramfs-linux-fallback.img IN_CLOSE_WRITE /usr/local/bin/efistub-update.sh<br />
</nowiki>}}<br />
<br />
{{Tip|In order to use this method, incron must be activated, if it is not run<br />
{{bc|<nowiki><br />
# systemctl enable incrond.service<br />
</nowiki>}}}}<br />
<br />
==== Mkinitcpio hook ====<br />
Mkinitcpio can generate a hook that does not need a system level daemon to function. It spawns a background process which waits for the generation of {{ic|vm-linuz}}, {{ic|initramfs-linux.img}}, and {{ic|initramfs-linux-fallback.img}}; then follows step 4 in [https://wiki.archlinux.org/index.php/UEFI_Bootloaders#Setting_up_EFISTUB Setting up EFISTUB]<br />
<br />
{{Tip|Save the following script as {{ic|/usr/lib/initcpio/install/efistub-update}}}}<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
<br />
build() {<br />
/root/watch.sh &<br />
}<br />
<br />
help() {<br />
cat <<HELPEOF<br />
This hook waits for mkinitcpio to finish and copies the finished ramdisk and kernel to the ESP<br />
HELPEOF<br />
}<br />
</nowiki>}}<br />
<br />
{{Tip|Save the following script as {{ic|/root/watch.sh}} and make it executable}}<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
<br />
while [[ -d "/proc/$PPID" ]]; do<br />
sleep 1<br />
done<br />
<br />
/bin/cp -f /boot/vmlinuz-linux /boot/efi/EFI/arch/vmlinuz-arch.efi<br />
/bin/cp -f /boot/initramfs-linux.img /boot/efi/EFI/arch/initramfs-arch.img<br />
/bin/cp -f /boot/initramfs-linux-fallback.img /boot/efi/EFI/arch/initramfs-arch-fallback.img<br />
<br />
echo "Synced kernel with ESP"<br />
</nowiki>}}<br />
<br />
{{Tip|Add {{ic|efistub-update}} to the list of hooks in {{ic|/etc/mkinitcpio.conf}}}}<br />
<br />
{{Note| As of [https://www.archlinux.org/packages/extra/any/refind-efi/ refind-efi 0.6.5], refind now automatically detects kernels in {{ic|/boot}}. They do not have to be renamed to have a {{ic|.efi}} extension either, as long as you are using [https://wiki.archlinux.org/index.php/UEFI_Bootloaders#Using_rEFInd refind].}}<br />
<br />
=== Booting EFISTUB ===<br />
<br />
{{Warning|Linux Kernel EFISTUB booting uses {{ic|\}} instead of {{ic|/}} and should be relative to the UEFI System Partition's root. For example, if the initramfs is located in {{ic|/boot/efi/EFI/arch/initramfs-linux.img}}, the corresponding UEFI formatted line would be {{ic|\EFI\arch\initramfs-linux.img}}. Failure to convert the options will lead to a system hang without any error message from the firmware or kernel.<br />
{{Note| Support of initrd path name with {{ic|/}} in EFISTUB booting has been added in [https://patchwork.kernel.org/patch/1899361/ mainline 3.9-rc1] and [http://lwn.net/Articles/541002/ stable 3.8.2]. Leading {{ic|/}} can be ignored but the path still has to be full path. Example: {{ic|initrd&#61;EFI/arch/initramfs-linux.img}} }}<br />
}}<br />
<br />
<br />
<br />
One can boot the EFISTUB kernel using one of the following ways :<br />
<br />
==== Using rEFInd ====<br />
<br />
rEFInd is a fork of rEFIt Boot Manager (used in Intel Macs) by Rod Smith (author of GPT-fdisk). rEFInd fixes many issues in rEFIt with respect to non-Mac UEFI booting and also has support for booting EFISTUB kernels and contains some features specific to them.<br />
{{Tip|If you're new to EFISTUB and/or rEFInd, you need to read [http://www.rodsbooks.com/refind/linux.html The rEFInd Boot Manager: Methods of Booting Linux] before going any further. This section illustrates only one possible use-case which is not suitable for all configurations.}}<br />
# Install {{Pkg|refind-efi}} package with {{ic|# pacman -S refind-efi}}<br />
# Copy the following files from their source directory to their destination<br />
{{Note|1=<arch> is the bit architecture of the system. Run {{ic|$ uname -m}} to get the architecture. Replace <arch> with "ia32" for 32 bit systems, and <arch> with "x64" for 64 bit systems.}}<br />
{| border="1"<br />
!rEFInd File Source!!UEFI Destination<br />
|-<br />
| /usr/lib/refind/refind_<arch>.efi || /boot/efi/EFI/refind/refind_<arch>.efi<br />
|-<br />
| /usr/lib/refind/config/refind.conf || /boot/efi/EFI/refind/refind.conf<br />
|-<br />
| /usr/share/refind/icons || /boot/efi/EFI/refind/icons<br />
|-<br />
| /usr/lib/refind/drivers_<arch> || /boot/efi/EFI/tools/drivers<br />
|}<br />
<br />
{{Tip|Refind's configuration file is located in {{ic|/boot/efi/EFI/refind/refind.conf}}. The file is well commented.}}<br />
<br />
As of {{Pkg|refind-efi}} 0.6.5-1, refind can auto-detect kernels in {{ic|/boot}}, if there are UEFI drivers for the filesystem used by /boot partition (or / partition if no separate /boot is used) in the ESP, and are loaded by rEFInd. This is enabled in the default configuration in {{ic|refind.conf}} (you may need to include the PATH to the drivers folders in the ESP). Copy your {{ic|/usr/lib/refind/config/refind_linux.conf}} to {{ic|/boot/efi/EFI/arch/refind_linux.conf}}. You may pass kernel specific commands in this file. <br />
<br />
Edit the {{ic|refind_linux.conf}} configuration file to be similar to the template below. Replace the string after PARTUUID with your root's PARTUUID<br />
<br />
{{Note|Please notice the difference between the standard UUID and the PARTUUID shown by {{ic|$ ls -l /dev/disk/by-partuuid/}}}}<br />
{{hc|/boot/efi/EFI/arch/refind_linux.conf|<nowiki><br />
"Boot with defaults" "root=PARTUUID=3518bb68-d01e-45c9-b973-0b5d918aae96 ro rootfstype=ext4 add_efi_memmap systemd.unit=graphical.target"<br />
"Boot to Terminal" "root=PARTUUID=3518bb68-d01e-45c9-b973-0b5d918aae96 ro rootfstype=ext4 add_efi_memmap systemd.unit=multi-user.target"</nowiki>}}<br />
<br />
{{Tip|Each line of {{ic|refind_linux.conf}} is displayed as a submenu by rEFInd. Access the submenu with "+" or "insert" keys.}}<br />
<br />
{{Tip|In non-Mac systems, create an entry for rEFInd using [[UEFI#efibootmgr|efibootmgr]] where sdX is the UEFI disk, and Y is the UEFI partition number. Run :<br />
{{bc|<nowiki><br />
# modprobe efivars<br />
# efibootmgr -c -w -d /dev/sdX -p Y -l '\EFI\refind\refind_<arch>.efi' -L "rEFInd" <br />
</nowiki>}}}}<br />
<br />
===== Systemd Automation =====<br />
{{Note|If you are using refind 0.6.5-1 or later, you may skip this step, as refind will scan the /boot partition during launch for kernel files. There is no need to create a separate folder and copy the files over. }}<br />
<br />
{{Tip|To automate the process of copying refind files and updating the nvram (if needed) use the following script}}<br />
<br />
{{Note|Save this script as {{ic|/usr/lib/systemd/scripts/refind_name_patchv2}}}}<br />
{{Tip|If you want to change the directory that refind is installed in the UEFISYS partition, just change the value of $refind_dir in the script}}<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
## COPYRIGHT 2013 : MARK E. LEE (BLUERIDER) : mlee24@binghamton.edu; mark@markelee.com<br />
<br />
## LOG<br />
## 1/17/2013 : Version 2 of refind_name_patch is released<br />
## : Supports long subdirectory location for refind<br />
## : Updates nvram when needed<br />
## : 10% speed boost<br />
<br />
function main () { ## main insertion function<br />
declare -r refind_dir="/boot/efi/EFI/refind"; ## set the refind directory<br />
declare -r arch=$(uname -m | awk -F'_' '{if ($1 == "x86"){print $2}}') && ## get bit architecture<br />
update-efi-dir; ## updates or creates the refind directory<br />
update-efi-nvram; ## updates nvram if needed<br />
}<br />
<br />
function update-efi-dir () { ## setup the refind directory<br />
if [ ! -d $refind_dir ]; then ## check if refind directory exists<br />
echo "Couldn't find $refind_dir";<br />
mkdir $refind_dir && ## make the refind directory if needed<br />
echo "Made $refind_dir";<br />
fi;<br />
if [ "$arch" ]; then ## check if anything was stored in $arch<br />
cp -r /usr/{share/refind/*,lib/refind/refind_x*$arch*.efi} $refind_dir/ && ## update bin and dirs<br />
echo "Updated binaries and directory files for refind at $refind_dir";<br />
else<br />
echo "Failed to detect an x86 architecture";<br />
exit;<br />
fi;<br />
}<br />
<br />
function update-efi-nvram () { ## update the nvram with efibootmgr<br />
declare -r ref_bin=${refind_dir/\/boot\/efi}/$(ls /usr/lib | grep $arch*.efi); ## get path of refind binary (without /boot/efi)<br />
declare -r ref_bin_escape=${ref_bin//\//\\\\}; ## insert escape characters into $ref_bin<br />
modprobe efivars && ## grab the efi variables for efibootmgr<br />
efibootmgr -v | grep $ref_bin_escape && ( ## check if boot entry is in nvram<br />
echo "Found boot entry, no need to update nvram";<br />
) || ( ## if boot entry is not in nvram; add it<br />
declare -r esp=$(mount -l | awk '/ESP/ {print $1}') && ## get ESP partition<br />
efibootmgr -c -w -d ${esp:0:8} -p ${esp:8} -L "rEFInd" -l $ref_bin_escape && ## update nvram<br />
echo "<br />
Updated nvram with entry rEFInd to boot $ref_bin<br />
Did not copy configuration files, please move refind.conf to $refind_dir/";<br />
)<br />
}<br />
<br />
main; ## run the main insertion function<br />
</nowiki>}}<br />
<br />
{{Note|Save the following service file as {{ic|/usr/lib/systemd/system/refind_update.path}}}}<br />
{{bc|<nowiki><br />
[Unit]<br />
Description=Update rEFInd bootloader files<br />
<br />
[Path]<br />
PathChanged=/usr/lib/refind/refind_<arch>.efi<br />
Unit=refind_update.service<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{Note|Save the following service file as {{ic|/usr/lib/systemd/system/refind_update.service}}}}<br />
{{bc|<nowiki><br />
[Unit]<br />
Description=Update rEFInd directories, binaries, and nvram<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/bin/bash /usr/lib/systemd/scripts/refind_name_patchv2<br />
RemainAfterExit=no<br />
</nowiki>}}<br />
<br />
{{Tip|Enable the systemd path unit by running :<br />
{{bc|<nowiki><br />
# systemctl enable refind_update.path<br />
</nowiki>}}}}<br />
<br />
===== Apple Macs =====<br />
<br />
In case of Apple Macs, try {{AUR|mactel-boot}} for an experimental "bless" utility for Linux. If that does not work, use "bless" form within OSX to set rEFInd as default bootloader. Assuming UEFISYS partition is mounted at {{ic|/mnt/efi}} within OSX, do<br />
<br />
$ sudo bless --setBoot --folder /mnt/efi/EFI/refind --file /mnt/efi/EFI/refind/refind_x64.efi<br />
<br />
===== VirtualBox =====<br />
<br />
In case of VirtualBox, see [[VirtualBox#Using_Arch_under_Virtualbox_EFI_mode]].<br />
<br />
==== Using gummiboot ====<br />
<br />
[[Gummiboot]] is a UEFI Boot Manager which provides a nice menu for EFISTUB Kernels. It is available in [extra] as {{Pkg|gummiboot}}. See https://wiki.archlinux.org/index.php/Gummiboot for more info.<br />
<br />
==== Using UEFI Shell ====<br />
<br />
It is possible to launch EFISTUB kernel form UEFI Shell as if it is a normal UEFI application. In this case the kernel parameters are passed as normal parameters to the launched EFISTUB kernel file.<br />
<br />
> fs0:<br />
> cd \EFI\arch<br />
> vmlinuz-arch.efi root=PARTUUID=3518bb68-d01e-45c9-b973-0b5d918aae96 ro rootfstype=ext4 add_efi_memmap initrd=EFI/arch/initramfs-arch.img<br />
<br />
You can also write a simple {{ic|archlinux.nsh}} file with your boot parameters and put it in your UEFI System Partition, then run it with:<br />
<br />
fs0:<br />
archlinux<br />
<br />
Example Script:<br />
<br />
echo -on<br />
\EFI\arch\vmlinuz-arch.efi root=PARTUUID=3518bb68-d01e-45c9-b973-0b5d918aae96 rootfstype=ext4 add_efi_memmap initrd=EFI/arch/initramfs-arch.img<br />
<br />
This way you can specify UUID's without needing to remember the name or type out 20-30 characters.<br />
<br />
==== Using efibootmgr entry ====<br />
<br />
{{Warning|1=Some kernel and efibootmgr combinations do not work [https://bugs.archlinux.org/task/34641]. You will be able to delete but not create boot entries.}}<br />
<br />
{{Note|Some UEFI firmwares may not support embedding command line parameters to uefi applications in the boot entries.}}<br />
<br />
It is possible to directly embed the kernel parameters within the boot entry created by efibootmgr. This means that in your BIOS/UEFI you will be able to select Arch Linux directly in the default boot order, and on startup it will boot into Arch directly without any kind of boot selection GUI.<br />
<br />
# modprobe efivars<br />
# efibootmgr -c -w -d /dev/sdX -p Y -l '\EFI\arch\vmlinuz-arch.efi' -L "Arch Linux (EFISTUB)" -u $(cat /proc/cmdline)<br />
<br />
It is a good idea to run<br />
<br />
# efibootmgr -v<br />
<br />
to verify that the resulting entry is correct. You should also consider reordering the boot options ({{ic|efibootmgr -o}}) to place the Arch entry last, which could make the system easier to recover if it fails.<br />
<br />
More info about efibootmgr at [[UEFI#efibootmgr]]. Forum post https://bbs.archlinux.org/viewtopic.php?pid=1090040#p1090040 .<br />
<br />
== GRUB 2.x ==<br />
<br />
GRUB 2.x contains its own filesystem drivers and does not rely on the firmware to access the files. It can directly read files from {{ic|/boot}} and does not require the kernel and initramfs files to be in the UEFISYS partition. Detailed information at [[GRUB#UEFI_systems_2]]. For bzr development version try AUR package - {{AUR|grub-efi-x86_64-bzr}}.<br />
<br />
== SYSLINUX ==<br />
<br />
{{Note|Syslinux UEFI support is currently part of version 6.00-preXX or in firmware branch of upstream git repo. It is considered alpha quality by upstream. The below information is provided mainly to enable bug-testing. Please report all issues upstream.}}<br />
<br />
{{Note|Syslinux UEFI can boot only those kernels that support '''EFI Handover Protocol'''. Thus LTS kernels are not supported.}}<br />
<br />
Install {{AUR|syslinux-efi-git}} AUR package and copy {{ic|/usr/lib/syslinux/efi64/*}} to {{ic|$esp/EFI/syslinux/}} ({{ic|$esp}} is the mountpoint of UEFISYS partition) ({{ic|efi64}} is for x86_64 UEFI firmwares, replace with {{ic|efi32}} for i386 UEFI firmwares), and then create a boot entry using efibootmgr in the firmware boot manager.<br />
<br />
== ELILO ==<br />
<br />
ELILO is the UEFI version of LILO Boot Loader. It was originally created for Intel Itanium systems which supported only EFI (precursor to UEFI). It is the oldest UEFI bootloader for Linux. It is still in development but happens at a very slow pace. Upstream provided compiled binaries are available at http://sourceforge.net/projects/elilo/ . Elilo config file {{ic|elilo.conf}} is similar to [[LILO]]'s config file. AUR package - {{AUR|elilo-efi}}.<br />
<br />
== EFILINUX ==<br />
<br />
EFILINUX is a reference implementation of a UEFI Linux bootloader and precursor to Kenrel EFISTUB support. It is considered to be a alpha quality software (as on 16-MAY-2012). Upstream sources are at https://github.com/mfleming/efilinux . and the usage instructions are at http://thread.gmane.org/gmane.linux.kernel/1172645 and http://article.gmane.org/gmane.linux.kernel/1175060 . AUR packages - {{Pkg|efilinux-efi}} and {{AUR|efilinux-efi-x86_64-git}} (only for x86_64 UEFI).<br />
<br />
== Package Naming Guidelines ==<br />
<br />
UEFI bootloader package(s) should be suffixed with {{ic|-efi-x86_64}} or {{ic|-efi-i386}} to denote package built for 64-bit and 32-bit UEFI respectively. If a single package contains both 64-bit and 32-bit UEFI applications, then {{ic|-efi}} suffix should be used in the '''pkgname'''.<br />
<br />
== See also ==<br />
<br />
* [http://www.rodsbooks.com/efi-bootloaders/ Rod Smith - Managing EFI Boot Loaders for Linux]<br />
* [http://www.rodsbooks.com/refind/ Rod Smith - rEFInd, a fork or rEFIt]<br />
* [https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob_plain;f=Documentation/x86/efi-stub.txt;hb=HEAD Linux Kernel Documentation on EFISTUB]<br />
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=291f36325f9f252bd76ef5f603995f37e453fc60;hp=55839d515495e766605d7aaabd9c2758370a8d27 Linux Kernel EFISTUB Git Commit]<br />
* [http://www.rodsbooks.com/efi-bootloaders/efistub.html Rod Smith's page on EFISTUB]<br />
* [http://www.rodsbooks.com/refind/linux.html rEFInd Documentation for booting EFISTUB Kernels]</div>Mid-kid