https://wiki.archlinux.org/api.php?action=feedcontributions&user=Slash&feedformat=atomArchWiki - User contributions [en]2024-03-29T12:05:22ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Pacman/Tips_and_tricks&diff=415757Pacman/Tips and tricks2016-01-16T20:46:59Z<p>Slash: Dynamic reverse proxy cache using nginx: Improve configuration to remove the limitation regarding host headers not being set properly</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Package management]]<br />
[[es:Pacman/Tips and tricks]]<br />
[[fr:Astuces Pacman]]<br />
[[it:Pacman/Tips and tricks]]<br />
[[ja:Pacman ヒント]]<br />
[[ru:Pacman/Tips and tricks]]<br />
[[tr:Pacman ipuçları]]<br />
[[zh-cn:Pacman/Tips and tricks]]<br />
{{Related articles start}}<br />
{{Related|pacman}}<br />
{{Related|Mirrors}}<br />
{{Related|Creating packages}}<br />
{{Related articles end}}<br />
See [[pacman]] for the main article.<br />
<br />
For general methods to improve the flexibility of the provided tips or pacman itself, see [[Core utilities]] and [[Bash]].<br />
<br />
== Cosmetic and convenience ==<br />
<br />
=== Operations and Bash syntax ===<br />
<br />
{{Merge|pacman#Installing specific packages|Although this is definitely a tip/trick, it fits to the main [[pacman]] page much better than here. It shows generic examples of how to do things, not specific commands needed to achieve something non-trivial/unrelated.}}<br />
<br />
In addition to pacman's standard set of features, there are ways to extend its usability through rudimentary [[Bash]] commands/syntax.<br />
<br />
To install a number of packages sharing similar patterns in their names -- not the entire group nor all matching packages; eg. {{Grp|plasma}}:<br />
<br />
# pacman -S plasma-{desktop,mediacenter,nm}<br />
<br />
Of course, that is not limited and can be expanded to however many levels needed:<br />
<br />
# pacman -S plasma-{workspace{,-wallpapers},pa}<br />
<br />
Sometimes, {{Ic|-s}}'s builtin ERE can cause a lot of unwanted results, so it has to be limited to match the package name only; not the description nor any other field:<br />
<br />
# pacman -Ss '^vim-'<br />
<br />
pacman has the {{ic|-q}} operand to hide the version column, so it is possible to query and reinstall packages with "compiz" as part of their name:<br />
<br />
# pacman -S $(pacman -Qq | grep compiz)<br />
<br />
=== Graphical front-ends ===<br />
<br />
* {{App|Discover|A collection of package management tools for KDE, using PackageKit.|https://projects.kde.org/projects/kde/workspace/discover|{{Pkg|discover}}}}<br />
* {{App|GNOME Software|Gnome Software App.|https://wiki.gnome.org/Apps/Software|{{pkg|gnome-software}}}}<br />
* {{App|pcurses|Package management in a curses frontend|https://github.com/schuay/pcurses|{{Pkg|pcurses}}}}<br />
* {{App|tkPacman|GUI front-end for pacman. Depends on Tcl/Tk and X11 but neither on GTK+, nor on QT. It only interacts with the package database via the CLI of 'pacman'. So, installing and removing packages with tkPacman or with pacman leads to exactly the same result.|http://sourceforge.net/projects/tkpacman|{{AUR|tkpacman}}}}<br />
<br />
=== Utilities ===<br />
<br />
* {{App|Lostfiles|Script for detecting orphaned files.|https://github.com/graysky2/lostfiles|{{AUR|lostfiles}}}}<br />
* {{App|[[Pacmatic]]|Pacman wrapper to check Arch News before upgrading, avoid partial upgrades, and warn about configuration file changes.|http://kmkeen.com/pacmatic|{{Pkg|pacmatic}}}}<br />
* {{App|[[pkgfile]]|Tool that finds what package owns a file.|http://github.com/falconindy/pkgfile|{{Pkg|pkgfile}}}}<br />
* {{App|[[pkgtools]]|Collection of scripts for Arch Linux packages.|https://github.com/Daenyth/pkgtools|{{AUR|pkgtools}}}}<br />
* {{App|srcpac|Simple tool that automates rebuilding packages from source.|https://projects.archlinux.org/srcpac.git|{{Pkg|srcpac}}}}<br />
<br />
== Maintenance ==<br />
<br />
See also [[System maintenance]].<br />
<br />
=== Listing packages ===<br />
<br />
You may want to get the list of installed packages with their version, which is useful when reporting bugs or discussing installed packages.<br />
<br />
* List all explicitly installed packages: {{ic| pacman -Qe }}.<br />
* List all foreign packages (typically manually downloaded and installed): {{ic| pacman -Qm }}.<br />
* List all native packages (installed from the sync database(s)): {{ic| pacman -Qn }}.<br />
* List packages by regex: {{ic|pacman -Qs ''regex''}}.<br />
* List packages by regex with custom output format: {{ic|expac -s "%-30n %v" ''regex''}} (needs {{Pkg|expac}}).<br />
<br />
==== With size ====<br />
<br />
To get a list of installed packages sorted by size, which may be useful when freeing space on your hard drive:<br />
<br />
* Install {{Pkg|expac}} and run {{ic|<nowiki>expac -H M '%m\t%n' | sort -h</nowiki>}}.<br />
* Run {{Pkg|pacgraph}} with the {{ic|-c}} option.<br />
<br />
To list the download size of several packages (leave {{ic|''packages''}} blank to list all packages):<br />
<br />
$ expac -S -H M '%k\t%n' ''packages''<br />
<br />
To list explicitly installed packages not in {{Grp|base}} nor {{Grp|base-devel}} with size and description:<br />
<br />
$ expac -H M "%011m\t%-20n\t%10d" $( comm -23 <(pacman -Qqen|sort) <(pacman -Qqg base base-devel|sort) ) | sort -n<br />
<br />
==== Latest installed packages ====<br />
<br />
Install {{Pkg|expac}} and run {{ic|<nowiki>expac --timefmt='%Y-%m-%d %T' '%l\t%n' | sort | tail -20</nowiki>}} or {{ic|<nowiki>expac --timefmt=%s '%l\t%n' | sort -n | tail -20</nowiki>}}<br />
<br />
==== All packages that nothing else depends on ====<br />
<br />
If you want to generate a list of all installed packages that nothing else depends on, you can use the following script. This is very helpful if you are trying to free hard drive space and have installed a lot of packages that you may not remember. You can browse through the output to find packages which you no longer need.<br />
<br />
{{Note|This script will show all packages that nothing else depends on, including those explicitly installed. To get a list of packages installed as dependencies but no longer required by any installed package, see [[#Orphans]].}} <br />
<br />
{{bc|<nowiki><br />
ignoregrp="base base-devel"<br />
ignorepkg=""<br />
<br />
comm -23 <(pacman -Qqt | sort) <(echo $ignorepkg | tr ' ' '\n' | cat <(pacman -Sqg $ignoregrp) - | sort -u)<br />
</nowiki>}}<br />
<br />
For list with descriptions for packages:<br />
<br />
{{bc|<nowiki><br />
expac -HM "%-20n\t%10d" $( comm -23 <(pacman -Qqt|sort) <(pacman -Qqg base base-devel|sort) )<br />
</nowiki>}}<br />
<br />
==== Installed packages that are not in a specified group or repository ====<br />
<br />
The following command will list any installed packages that are not in either {{Grp|base}} or {{Grp|base-devel}}, and as such were likely installed manually by the user:<br />
<br />
$ comm -23 <(pacman -Qeq | sort) <(pacman -Qgq base base-devel | sort)<br />
<br />
List all installed packages that are not in specified repository ({{ic|''repo_name''}} in example):<br />
<br />
$ comm -23 <(pacman -Qtq | sort) <(pacman -Slq ''repo_name'' | sort)<br />
<br />
List all installed packages that are in the {{ic|''repo_name''}} repository:<br />
<br />
$ comm -12 <(pacman -Qtq | sort) <(pacman -Slq ''repo_name'' | sort)<br />
<br />
=== Listing files owned by a package with size ===<br />
<br />
This one might come in handy if you have found that a specific package uses a huge amount of space and you want to find out which files make up the most of that.<br />
<br />
$ pacman -Qlq ''package'' | grep -v '/$' | xargs du -h | sort -h<br />
<br />
=== Identify files not owned by any package ===<br />
<br />
If your system has stray files not owned by any package (a common case if you do not [[Enhance system stability#Use the package manager to install software|use the package manager to install software]]), you may want to find such files in order to clean them up. The general process for doing so is:<br />
<br />
# Create a sorted list of the files you want to check ownership of: {{bc|<nowiki>$ find /etc /opt /usr | sort > all_files.txt</nowiki>}}<br />
# Create a sorted list of the files tracked by pacman (and remove the trailing slashes from directories): {{bc|<nowiki>$ pacman -Qlq | sed 's|/$||' | sort > owned_files.txt</nowiki>}}<br />
# Find lines in the first list that are not in the second: {{bc|$ comm -23 all_files.txt owned_files.txt}}<br />
<br />
This process is tricky in practice because many important files are not part of any package (e.g. files generated at runtime, custom configs) and so will be included in the final output, making it difficult to pick out the files that can be safely deleted.<br />
<br />
The {{AUR|lostfiles}} script performs similar steps, but also includes an extensive blacklist to remove common false positives from the output.<br />
<br />
=== Removing unused packages ===<br />
<br />
==== Orphans ====<br />
<br />
For ''recursively'' removing orphans and their configuration files:<br />
<br />
# pacman -Rns $(pacman -Qtdq)<br />
<br />
If no orphans were found, pacman errors with {{ic|error: no targets specified}}. This is expected as no arguments were passed to {{ic|pacman -Rns}}.<br />
<br />
{{Note|Since pacman version 4.2.0 only true orphans are listed. To make pacman also list packages which are only optionally required by another package, pass the {{ic|-t}}/{{ic|--unrequired}} flag twice:<br />
$ pacman -Qdttq<br />
Use this carefully, as it is not taken into account whether the package is an optional dependency and therefore bears the risk to remove packages which actually are not real orphans.}}<br />
<br />
==== Explicitly installed ====<br />
<br />
Because a lighter system is easier to maintain, occasionally looking through explicitly installed packages and ''manually'' selecting unused packages to be removed can be helpful.<br />
<br />
To list explicitly installed packages available in the official repositories:<br />
<br />
$ pacman -Qen<br />
<br />
To list explicitly installed packages not available in official repositories:<br />
<br />
$ pacman -Qem<br />
<br />
=== Removing everything but base group ===<br />
<br />
If it is ever necessary to remove all packages except the base group, try this one liner:<br />
<br />
# pacman -R $(comm -23 <(pacman -Qq|sort) <((for i in $(pacman -Qqg base); do pactree -ul $i; done)|sort -u|cut -d ' ' -f 1))<br />
<br />
The one-liner was originally devised in [https://bbs.archlinux.org/viewtopic.php?id=130176 this discussion], and later improved in this article.<br />
<br />
Notes:<br />
<br />
# {{ic|comm}} requires sorted input otherwise you get e.g. {{ic|comm: file 1 is not in sorted order}}.<br />
# {{ic|pactree}} prints the package name followed by what it provides. For example:<br />
<br />
{{hc|$ pactree -lu logrotate|<br />
logrotate<br />
popt<br />
glibc<br />
linux-api-headers<br />
tzdata<br />
dcron cron<br />
bash<br />
readline<br />
ncurses<br />
gzip}}<br />
<br />
The {{ic|dcron cron}} line seems to cause problems, that is why {{ic|cut -d ' ' -f 1}} is needed - to keep just the package name.<br />
<br />
=== Getting the dependencies list of several packages ===<br />
<br />
Dependencies are alphabetically sorted and doubles are removed.<br />
Note that you can use {{ic|pacman -Qi}} to improve response time a little. But<br />
you will not be able to query as many packages. Unfound packages are simply skipped<br />
(hence the {{ic|2>/dev/null}}).<br />
<br />
$ pacman -Si $@ 2>/dev/null | awk -F ": " -v filter="^Depends" \ '$0 ~ filter {gsub(/[>=<][^ ]*/,"",$2) ; gsub(/ +/,"\n",$2) ; print $2}' | sort -u<br />
<br />
Alternatively, you can use {{ic|expac}}: {{ic|expac -l '\n' %E -S $@ &#124; sort -u}}.<br />
<br />
=== Listing changed backup files ===<br />
<br />
If you want to backup your system configuration files you could copy all files in {{ic|/etc/}}, but usually you are only interested in the files that you have changed. Modified [[Pacnew_and_Pacsave_files#Package_backup_files|backup files]] can be viewed with the following command:<br />
<br />
# pacman -Qii | awk '/^MODIFIED/ {print $2}'<br />
<br />
Running this command with root permissions will ensure that files readable only by root (such as {{ic|/etc/sudoers}}) are included in the output.<br />
<br />
{{Tip|See [[#Listing all changed files from packages]] to list all changed files pacman knows, not only backup files.}}<br />
<br />
=== Back-up the pacman database ===<br />
<br />
The following command can be used to back up the local pacman database:<br />
<br />
$ tar -cjf pacman_database.tar.bz2 /var/lib/pacman/local<br />
<br />
Store the backup pacman database file on one or more offline media, such as a USB stick, external hard drive, or CD-R. See also [[Pacman tips#Backing up Local database with systemd]] for an alternative method.<br />
<br />
The database can be restored by moving the {{ic|pacman_database.tar.bz2}} file into the {{ic|/}} directory and executing the following command:<br />
<br />
# tar -xjvf pacman_database.tar.bz2<br />
<br />
{{Note|If the pacman database files are corrupted, and there is no backup file available, there exists some hope of rebuilding the pacman database. Consult [[Pacman tips#Restore pacman's local database]].}}<br />
<br />
==== Using systemd ====<br />
<br />
[[systemd]] can take snapshots of the pacman local database, each time it is modified.<br />
<br />
{{Tip|For a more configurable version, use: {{AUR|pakbak-git}}}}<br />
<br />
Use the following scripts, changing the value of {{ic|$pakbak}} for the backup location accordingly. The {{ic|pakbak.service}} can also automaticall be [[enable]]d on boot:<br />
<br />
{{hc|/usr/lib/systemd/scripts/pakbak_script|2=<br />
#!/bin/bash<br />
<br />
declare -r pakbak=''"/pakbak.tar.xz"''; ## set backup location<br />
tar -cJf "$pakbak" "/var/lib/pacman/local"; ## compress & store pacman local database in $pakbak<br />
}}<br />
<br />
{{hc|/usr/lib/systemd/system/pakbak.service|2=<br />
[Unit]<br />
Description=Back up pacman database<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/bin/bash /usr/lib/systemd/scripts/pakbak_script<br />
RemainAfterExit=no<br />
}}<br />
<br />
{{hc|/usr/lib/systemd/system/pakbak.path|2=<br />
[Unit]<br />
Description=Back up pacman database<br />
<br />
[Path]<br />
PathChanged=/var/lib/pacman/local<br />
Unit=pakbak.service<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
=== Check changelogs easily ===<br />
<br />
When maintainers update packages, commits are often commented in a useful fashion. Users can quickly check these from the command line by installing {{AUR|paclog}}. This utility lists recent commit messages for packages from the official repositories or the AUR, by using {{ic|paclog package}}.<br />
<br />
== Installation and recovery ==<br />
<br />
Alternative ways of getting and restoring packages.<br />
<br />
=== Installing packages from a CD/DVD or USB stick ===<br />
<br />
To download packages, or groups of packages:<br />
<br />
# cd ~/Packages<br />
# pacman -Syw base base-devel grub-bios xorg gimp --cachedir .<br />
# repo-add ./custom.db.tar.gz ./*<br />
<br />
Then you can burn the "Packages" folder to a CD/DVD or transfer it to a USB stick, external HDD, etc.<br />
<br />
To install:<br />
<br />
'''1.''' Mount the media:<br />
<br />
# mkdir /mnt/repo<br />
# mount /dev/sr0 /mnt/repo #For a CD/DVD.<br />
# mount /dev/sdxY /mnt/repo #For a USB stick.<br />
<br />
'''2.''' Edit {{ic|pacman.conf}} and add this repository ''before'' the other ones (e.g. extra, core, etc.). This is important. Do not just uncomment the one on the bottom. This way it ensures that the files from the CD/DVD/USB take precedence over those in the standard repositories:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
[custom]<br />
SigLevel = PackageRequired<br />
Server = file:///mnt/repo/Packages}}<br />
<br />
'''3.''' Finally, synchronize the pacman database to be able to use the new repository:<br />
<br />
# pacman -Syu<br />
<br />
=== Custom local repository ===<br />
<br />
Use the ''repo-add'' script included with Pacman to generate a database for a personal repository. Use {{ic|repo-add --help}} for more details on its usage. Simply store all of the built packages to be included in the repository in one directory, and execute the following command (where ''repo'' is the name of the custom repository):<br />
<br />
$ repo-add /path/to/repo.db.tar.gz /path/to/*.pkg.tar.xz<br />
<br />
{{Note|A package database is a tar file, optionally compressed. Valid extensions are “.db” or “.files” followed by an archive extension of “.tar”, “.tar.gz”, “.tar.bz2”, “.tar.xz”, or “.tar.Z”. The file does not need to exist, but all parent directories must exist.<br />
Furthermore when using {{ic|repo-add}} keep in mind that the database and the packages do not need to be in the same directory. But when using pacman with that database, they should be together.}}<br />
<br />
To add a new package to the database, or to replace the old version of an existing package in the database, run:<br />
<br />
$ repo-add /path/to/repo.db.tar.gz /path/to/packagetoadd-1.0-1-i686.pkg.tar.xz<br />
<br />
''repo-remove'' is used in the exact same manner as ''repo-add'', except that the packages listed on the command line are removed from the repository database.<br />
<br />
Once the local repository database has been created, add the repository to {{ic|pacman.conf}} for each system that is to use the repository. An example of a custom repository is in {{ic|pacman.conf}}. The repository's name is the database filename with the file extension omitted. In the case of the example above the repository's name would simply be ''repo''. Reference the repository's location using a {{ic|file://}} url, or via FTP using ftp://localhost/path/to/directory.<br />
<br />
If willing, add the custom repository to the [[Unofficial user repositories|list of unofficial user repositories]], so that the community can benefit from it.<br />
<br />
=== Network shared pacman cache ===<br />
<br />
If you happen to run several Arch boxes on your LAN, you can share packages so that you can greatly decrease your download times. Keep in mind you should not share between different architectures (i.e. i686 and x86_64) or you'll get into troubles.<br />
<br />
==== Read-only cache ====<br />
<br />
If you are looking for a quick and dirty solution, you can simply run a standalone webserver which other computers can use as a first mirror: {{ic|darkhttpd /var/cache/pacman/pkg}}. Just add this server at the top of your mirror list. Be aware that you might get a lot of 404 errors, due to cache misses, depending on what you do, but pacman will try the next (real) mirrors when that happens.<br />
<br />
==== Read-write cache ====<br />
<br />
{{Tip|See [[pacserve]] for an alternative (and probably simpler) solution than what follows.}}<br />
<br />
In order to share packages between multiple computers, simply share {{ic|/var/cache/pacman/}} using any network-based mount protocol. This section shows how to use shfs or sshfs to share a package cache plus the related library-directories between multiple computers on the same local network. Keep in mind that a network shared cache can be slow depending on the file-system choice, among other factors.<br />
<br />
First, install any network-supporting filesystem; for example [[sshfs]], [[shfs]], ftpfs, [[smbfs]] or [[nfs]].<br />
<br />
{{Tip|To use sshfs or shfs, consider reading [[Using SSH Keys]].}}<br />
<br />
Then, to share the actual packages, mount {{ic|/var/cache/pacman/pkg}} from the server to {{ic|/var/cache/pacman/pkg}} on every client machine.<br />
<br />
==== Dynamic reverse proxy cache using nginx ====<br />
<br />
[[nginx]] can be used to proxy requests to official upstream mirrors and cache the results to local disk. All subsequent requests for that file will be served directly from the local cache, minimizing the amount of internet traffic needed to update a large number of servers with minimal effort. <br />
<br />
{{Warning| This method has a limitation. You must use mirrors that use the same relative path to package files and you must configure your cache to use that same path. In this example, we are using mirrors that use the relative path {{ic|/archlinux/$repo/os/$arch}} and our cache's {{ic|Server}} setting in {{ic|mirrorlist}} is configured similarly.}}<br />
<br />
In this example, we will run the cache server on {{ic|<nowiki>http://cache.domain.local:8080/</nowiki>}} and storing the packages in {{ic|/srv/http/pacman-cache/}}. <br />
<br />
Create the directory for the cache and adjust the permissions so nginx can write files to it:<br />
<br />
# mkdir /srv/http/pacman-cache<br />
# chown http:http /srv/http/pacman-cache<br />
<br />
Next, configure nginx as our dynamic cache (read the comments for an explanation of the commands):<br />
<br />
{{hc|/etc/nginx/nginx.conf|<nowiki><br />
http<br />
{<br />
...<br />
<br />
# nginx may need to resolve domain names at run time<br />
resolver 8.8.8.8 8.8.4.4;<br />
<br />
# Pacman Cache<br />
server<br />
{<br />
listen 8080;<br />
server_name cache.domain.local;<br />
root /srv/http/pacman-cache;<br />
autoindex on;<br />
<br />
# Requests for package db and signature files should redirect upstream without caching<br />
location ~ \.(db|sig)$ {<br />
proxy_pass http://mirrors$request_uri;<br />
}<br />
<br />
# Requests for actual packages should be served directly from cache if available.<br />
# If not available, retrieve and save the package from an upstream mirror.<br />
location ~ \.tar\.xz$ {<br />
try_files $uri @pkg_mirror;<br />
}<br />
<br />
# Retrieve package from upstream mirrors and cache for future requests<br />
location @pkg_mirror {<br />
proxy_store on;<br />
proxy_redirect off;<br />
proxy_store_access user:rw group:rw all:r;<br />
proxy_next_upstream error timeout http_404;<br />
proxy_pass http://mirrors$request_uri;<br />
}<br />
}<br />
<br />
# Upstream Arch Linux Mirrors<br />
# - Configure as many backend mirrors as you want in the blocks below<br />
# - Servers are used in a round-robin fashion by nginx<br />
# - Add "backup" if you want to only use the mirror upon failure of the other mirrors<br />
# - Separate "server" configurations are required for each upstream mirror so we can set the "Host" header appropriately<br />
upstream mirrors {<br />
server localhost:8001;<br />
server localhost:8002 backup;<br />
server localhost:8003 backup;<br />
}<br />
<br />
# Arch Mirror 1 Proxy Configuration<br />
server<br />
{<br />
listen 8001;<br />
server_name localhost;<br />
<br />
location / {<br />
proxy_pass http://mirror.rit.edu$request_uri;<br />
proxy_set_header Host mirror.rit.edu;<br />
}<br />
}<br />
<br />
# Arch Mirror 2 Proxy Configuration<br />
server<br />
{<br />
listen 8002;<br />
server_name localhost;<br />
<br />
location / {<br />
proxy_pass http://mirrors.acm.wpi.edu$request_uri;<br />
proxy_set_header Host mirrors.acm.wpi.edu;<br />
}<br />
}<br />
<br />
# Arch Mirror 3 Proxy Configuration<br />
server<br />
{<br />
listen 8003;<br />
server_name localhost;<br />
<br />
location / {<br />
proxy_pass http://lug.mtu.edu$request_uri;<br />
proxy_set_header Host lug.mtu.edu;<br />
}<br />
}<br />
}<br />
</nowiki>}}<br />
<br />
Finally, update your other Arch Linux servers to use this new cache by adding the following line to the {{ic|mirrorlist}} file:<br />
<br />
{{hc|/etc/pacman.d/mirrorlist|<nowiki><br />
Server = http://cache.domain.local:8080/archlinux/$repo/os/$arch<br />
...<br />
</nowiki>}}<br />
<br />
{{Note| You will need to create a method to clear old packages, as this directory will continue to grow over time. {{ic|paccache}} (which is included with {{ic|pacman}}) can be used to automate this using retention criteria of your choosing. For example, {{ic|find /srv/http/pacman-cache/ -type d -exec paccache -v -r -k 2 -c {} \;}} will keep the last 2 versions of packages in your cache directory.}}<br />
<br />
==== Synchronize pacman package cache using BitTorrent Sync ====<br />
<br />
[[BitTorrent Sync]] is a new way of synchronizing folder via network (it works in LAN and over the internet). It is peer-to-peer so you do not need to set up a server: follow the link for more information.<br />
How to share a pacman cache using BitTorrent Sync:<br />
* First install the {{AUR|btsync}} package from the AUR on the machines you want to sync<br />
* Follow the installation instructions of the AUR package or on the [[BitTorrent Sync]] wiki page <br />
** set up BitTorrent Sync to work for the root account. This process requires read/write to the pacman package cache. <br />
** make sure to set a good password on btsync's web UI <br />
** start the systemd daemon for btsync.<br />
** in the btsync Web GUI add a new synchronized folder on the first machine and generate a new Secret. Point the folder to {{ic|/var/cache/pacman/pkg}}<br />
** Add the folder on all the other machines using the same Secret to share the cached packages between all systems. Or, to set the first system as a master and the others as slaves, use the Read Only Secret. Be sure to point it to {{ic|/var/cache/pacman/pkg}}<br />
<br />
Now the machines should connect and start synchronizing their cache. Pacman works as expected even during synchronization. The process of syncing is entirely automatic.<br />
<br />
==== Preventing unwanted cache purges ====<br />
<br />
By default, {{Ic|pacman -Sc}} removes package tarballs from the cache that correspond to packages that are not installed on the machine the command was issued on. Because pacman cannot predict what packages are installed on all machines that share the cache, it will end up deleting files that should not be.<br />
<br />
To clean up the cache so that only ''outdated'' tarballs are deleted, add this entry in the {{ic|[options]}} section of {{ic|/etc/pacman.conf}}:<br />
<br />
CleanMethod = KeepCurrent<br />
<br />
=== Recreate a package from the file system ===<br />
<br />
To recreate a package from the file system, use ''bacman'' (included with pacman). Files from the system are taken as they are, hence any modifications will be present in the assembled package. Distributing the recreated package is therefore discouraged; see [[ABS]] and [[Arch Rollback Machine]] for alternatives.<br />
<br />
{{Tip|''bacman'' honours the {{ic|PACKAGER}}, {{ic|PKGDEST}} and {{ic|PKGEXT}} options from {{ic|makepkg.conf}}. Custom options for the compression tools can be configured by exporting the relevant environment variable, for example {{ic|1=XZ_OPT="-T 0"}} will enable parallel compression for ''xz''.}}<br />
<br />
An alternative tool would be {{AUR|fakepkg}}. It supports parallelization through {{Pkg|parallel}} and can handle multiple input packages in one command, which ''bacman'' both does not support.<br />
<br />
=== Backing up and retrieving a list of installed packages ===<br />
<br />
{{Expansion|Optional dependencies that are not required by any other package ({{ic|comm -13 <(pacman -Qdtq) <(pacman -Qdttq)}}) are ignored by this procedure.}}<br />
<br />
{{Tip|1=You may want to use {{AUR|pacbackup}} or [https://bbs.archlinux.org/viewtopic.php?id=200067 bacpac] to automatise the below tasks.}}<br />
<br />
It is good practice to keep periodic backups of all pacman-installed packages. In the event of a system crash which is unrecoverable by other means, pacman can then easily reinstall the very same packages onto a new installation.<br />
<br />
* First, backup the current list of non-local packages: {{ic|$ pacman -Qqen > pkglist.txt}}<br />
<br />
* Store the {{ic|pkglist.txt}} on a USB key or other convenient medium or gist.github.com or Evernote, Dropbox, etc.<br />
<br />
* Copy the {{ic|pkglist.txt}} file to the new installation, and navigate to the directory containing it.<br />
<br />
* Issue the following command to install from the backup list: {{ic|# pacman -S $(< pkglist.txt)}}<br />
<br />
In the case you have a list which was not generated like mentioned above, there may be foreign packages in it (i.e. packages not belonging to any repos you have configured, or packages from the AUR).<br />
<br />
In such a case, you may still want to install all available packages from that list:<br />
<br />
# pacman -S --needed $(comm -12 <(pacman -Slq|sort) <(sort badpkdlist) )<br />
<br />
Explanation:<br />
<br />
* {{ic|pacman -Slq}} lists all available softwares, but the list is sorted by repository first, hence the {{ic|sort}} command.<br />
* Sorted files are required in order to make the {{ic|comm}} command work.<br />
* The {{ic|-12}} parameter display lines common to both entries.<br />
* The {{ic|--needed}} switch is used to skip already installed packages.<br />
<br />
Finally, you may want to remove all the packages on your system that are not mentioned in the list.<br />
<br />
{{Warning|Use this command wisely, and always check the result prompted by pacman.}}<br />
<br />
# pacman -Rsu $(comm -23 <(pacman -Qq|sort) <(sort pkglist))<br />
<br />
=== Listing all changed files from packages ===<br />
If you are suspecting file corruption (e.g. by software / hardware failure), but don't know for sure whether / which files really got corrupted, you might want to compare with the hash sums in the packages. This can be done with the following script.<br />
<br />
The script depends on the accuracy of pacman's database in {{ic|/var/lib/pacman/local/}} and the used programs such as ''bash'', ''grep'' and so on. For recovery of the database see [[#Restore pacman's local database]]. The {{ic|mtree}} files can also be [[#Viewing a single file inside a .pkg file|extracted as {{ic|.MTREE}} from the respective package files]].<br />
<br />
{{Note|<br />
* This should '''not''' be used as is when suspecting malicious changes! In this case security precautions such as using a live medium and an independent source for the hash sums are advised.<br />
* This could take a long time, depending on the hardware and installed packages.<br />
}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash -e<br />
<br />
# Select the hash algorithm. Currently available (see mtree files and mtree(5)):<br />
# md5, sha256<br />
algo="md5"<br />
<br />
for package in /var/lib/pacman/local/*; do<br />
[ "$package" = "/var/lib/pacman/local/ALPM_DB_VERSION" ] && continue<br />
<br />
# get files and hash sums<br />
zgrep " ${algo}digest=" "$package/mtree" | grep -Ev '^\./\.[A-Z]+' | \<br />
sed 's/^\([^ ]*\).*'"${algo}"'digest=\([a-f0-9]*\).*/\1 \2/' | \<br />
while read -r file hash<br />
do<br />
# expand "\nnn" (in mtree) / "\0nnn" (for echo) escapes of ASCII<br />
# characters (octal representation)<br />
for ascii in $(grep -Eo '\\[0-9]{1,3}' <<< "$file"); do<br />
file="$(sed "s/\\$ascii/$(echo -e "\0${ascii:1}")/" <<< "$file")"<br />
done<br />
<br />
# check file hash<br />
if [ "$("${algo}sum" /"$file" | awk '{ print $1; }')" != "$hash" ]; then<br />
echo "$(basename "$package")" /"$file"<br />
fi<br />
done<br />
done<br />
</nowiki>}}<br />
<br />
=== Reinstalling all packages ===<br />
To reinstall all native packages, use:<br />
<br />
# pacman -Qenq | pacman -S -<br />
<br />
Foreign (AUR) packages must be reinstalled separately; you can list them with {{ic|pacman -Qemq}}.<br />
<br />
Pacman preserves the installation reason by default.<br />
<br />
=== Restore pacman's local database ===<br />
<br />
Signs that pacman needs a local database restoration:<br />
<br />
* {{ic|pacman -Q}} gives absolutely no output, and {{Ic|pacman -Syu}} erroneously reports that the system is up to date.<br />
* When trying to install a package using {{ic|pacman -S package}}, and it outputs a list of already satisfied dependencies.<br />
* When {{ic|testdb}} (part of {{Pkg|pacman}}) reports database inconsistency.<br />
<br />
Most likely, pacman's database of installed software, {{ic|/var/lib/pacman/local}}, has been corrupted or deleted. While this is a serious problem, it can be restored by following the instructions below.<br />
<br />
Firstly, make sure pacman's log file is present:<br />
<br />
$ ls /var/log/pacman.log<br />
<br />
If it does not exist, it is ''not'' possible to continue with this method. You may be able to use [https://bbs.archlinux.org/viewtopic.php?pid=670876 Xyne's package detection script] to recreate the database. If not, then the likely solution is to re-install the entire system.<br />
<br />
==== Generating the package recovery list ====<br />
<br />
{{Warning|If for some reason your [[pacman]] cache or [[makepkg]] package destination contain packages for other architectures, remove them before continuation.}}<br />
<br />
Run the script (optionally passing additional directories with packages as parameters):<br />
<br />
$ paclog-pkglist /var/log/pacman.log | ./pacrecover >files.list 2>pkglist.orig<br />
<br />
This way two files will be created: {{Ic|files.list}} with package files, still present on machine and {{Ic|pkglist.orig}}, packages from which should be downloaded. Later operation may result in mismatch between files of older versions of package, still present on machine, and files, found in new version. Such mismatches will have to be fixed manually.<br />
<br />
Here is a way to automatically restrict second list to packages available in a repository:<br />
<br />
$ { cat pkglist.orig; pacman -Slq; } | sort | uniq -d > pkglist<br />
<br />
Check if some important ''base'' package are missing, and add them to the list:<br />
<br />
$ comm -23 <(pacman -Sgq base) pkglist.orig >> pkglist<br />
<br />
Proceed once the contents of both lists are satisfactory, since they will be used to restore pacman's installed package database; {{ic|/var/lib/pacman/local/}}.<br />
<br />
==== Performing the recovery ====<br />
<br />
Define bash alias for recovery purposes:<br />
<br />
# recovery-pacman() {<br />
pacman "$@" \<br />
--log /dev/null \<br />
--noscriptlet \<br />
--dbonly \<br />
--force \<br />
--nodeps \<br />
--needed \<br />
#<br />
}<br />
<br />
{{ic|--log /dev/null}} allows to avoid needless pollution of pacman log, {{Ic|--needed}} will save some time by skipping packages, already present in database, {{Ic|--nodeps}} will allow installation of cached packages, even if packages being installed depend on newer versions. Rest of options will allow '''pacman''' to operate without reading/writing filesystem.<br />
<br />
Populate the sync database:<br />
<br />
# pacman -Sy<br />
<br />
Start database generation by installing locally available package files from {{ic|files.list}}:<br />
<br />
# recovery-pacman -U $(< files.list)<br />
<br />
Install the rest from {{ic|pkglist}}:<br />
<br />
# recovery-pacman -S $(< pkglist)<br />
<br />
Update the local database so that packages that are not required by any other package are marked as explicitly installed and the other as dependences. You will need be extra careful in the future when removing packages, but with the original database lost is the best we can do.<br />
<br />
# pacman -D --asdeps $(pacman -Qq)<br />
# pacman -D --asexplicit $(pacman -Qtq)<br />
<br />
Optionally check all installed packages for corruption:<br />
<br />
# pacman -Qk<br />
<br />
Optionally [[#Identify files not owned by any package]].<br />
<br />
Update all packages:<br />
<br />
# pacman -Su<br />
<br />
=== Recovering a USB key from existing install ===<br />
<br />
If you have Arch installed on a USB key and manage to mess it up (e.g. removing it while it is still being written to), then it is possible to re-install all the packages and hopefully get it back up and working again (assuming USB key is mounted in /newarch)<br />
<br />
# pacman -S $(pacman -Qq --dbpath /newarch/var/lib/pacman) --root /newarch --dbpath /newarch/var/lib/pacman<br />
<br />
=== Extracting contents of a .pkg file ===<br />
<br />
The {{ic|.pkg}} files ending in {{ic|.xz}} are simply tar'ed archives that can be decompressed with:<br />
<br />
$ tar xvf package.tar.xz<br />
<br />
If you want to extract a couple of files out of a {{ic|.pkg}} file, this would be a way to do it.<br />
<br />
=== Viewing a single file inside a .pkg file ===<br />
<br />
For example, if you want to see the contents of {{ic|/etc/systemd/logind.conf}} supplied within the {{Pkg|systemd}} package:<br />
<br />
$ tar -xOf /var/cache/pacman/pkg/systemd-204-3-x86_64.pkg.tar.xz etc/systemd/logind.conf<br />
<br />
Or you can use {{pkg|vim}}, then browse the archive:<br />
<br />
$ vim /var/cache/pacman/pkg/systemd-204-3-x86_64.pkg.tar.xz<br />
<br />
=== Find applications that use libraries from older packages ===<br />
<br />
Even if you installed a package the existing long-running programs (like daemons and servers) still keep using code from old package libraries. And it is a bad idea to let these programs running if the old library contains a security bug.<br />
<br />
Here is a way how to find all the programs that use old packages code:<br />
<br />
# lsof +c 0 | grep -w DEL | awk '1 { print $1 ": " $NF }' | sort -u<br />
It will print running program name and old library that was removed or replaced with newer content.<br />
<br />
== Performance ==<br />
<br />
=== Database access speeds ===<br />
<br />
Pacman stores all package information in a collection of small files, one for each package. Improving database access speeds reduces the time taken in database-related tasks, e.g. searching packages and resolving package dependencies. The safest and easiest method is to run as root:<br />
<br />
# pacman-optimize<br />
<br />
This will attempt to put all the small files together in one (physical) location on the hard disk so that the hard disk head does not have to move so much when accessing all the data. This method is safe, but is not foolproof: it depends on your filesystem, disk usage and empty space fragmentation. Another, more aggressive, option would be to first remove uninstalled packages from cache and to remove unused repositories before database optimization:<br />
<br />
# pacman -Sc && pacman-optimize<br />
<br />
=== Download speeds ===<br />
<br />
{{Note|If your download speeds have been reduced to a crawl, ensure you are using one of the many [[mirrors]] and not ftp.archlinux.org, which is [https://www.archlinux.org/news/302/ throttled since March 2007].}}<br />
<br />
When downloading packages pacman uses the mirrors in the order they are in {{ic|/etc/pacman.d/mirrorlist}}. The mirror which is at the top of the list by default however may not be the fastest for you. To select a faster mirror, see [[Mirrors]].<br />
<br />
Pacman's speed in downloading packages can also be improved by using a different application to download packages, instead of Pacman's built-in file downloader.<br />
<br />
In all cases, make sure you have the latest Pacman before doing any modifications.<br />
<br />
# pacman -Syu<br />
<br />
==== Powerpill ====<br />
<br />
Powerpill is a full wrapper for Pacman that uses parallel and segmented downloads to speed up the download process. Normally Pacman will download one package at a time, waiting for it to complete before beginning the next download. Powerpill takes a different approach: it tries to download as many packages as possible at once.<br />
<br />
The [[Powerpill|Powerpill wiki page]] provides basic configuration and usage examples along with package and upstream links.<br />
<br />
==== wget ====<br />
<br />
This is also very handy if you need more powerful proxy settings than pacman's built-in capabilities. <br />
<br />
To use {{ic|wget}}, first [[install]] the {{Pkg|wget}} package then modify {{ic|/etc/pacman.conf}} by uncommenting the following line in the {{ic|[options]}} section:<br />
<br />
XferCommand = /usr/bin/wget -c -q --show-progress --passive-ftp -O %o %u<br />
<br />
Instead of uncommenting the {{ic|wget}} parameters in {{ic|/etc/pacman.conf}}, you can also modify the {{ic|wget}} configuration file directly (the system-wide file is {{ic|/etc/wgetrc}}, per user files are {{ic|$HOME/.wgetrc}}.<br />
<br />
==== aria2 ====<br />
<br />
[[aria2]] is a lightweight download utility with support for resumable and segmented HTTP/HTTPS and FTP downloads. aria2 allows for multiple and simultaneous HTTP/HTTPS and FTP connections to an Arch mirror, which should result in an increase in download speeds for both file and package retrieval.<br />
<br />
{{Note|Using aria2c in Pacman's XferCommand will '''not''' result in parallel downloads of multiple packages. Pacman invokes the XferCommand with a single package at a time and waits for it to complete before invoking the next. To download multiple packages in parallel, see the [[#Using_Powerpill|powerpill]] section above.}}<br />
<br />
Install {{Pkg|aria2}}, then edit {{ic|/etc/pacman.conf}} by adding the following line to the {{ic|[options]}} section:<br />
<br />
XferCommand = /usr/bin/aria2c --allow-overwrite=true --continue=true --file-allocation=none --log-level=error --max-tries=2 --max-connection-per-server=2 --max-file-not-found=5 --min-split-size=5M --no-conf --remote-time=true --summary-interval=60 --timeout=5 --dir=/ --out %o %u<br />
<br />
{{Tip|1=[https://bbs.archlinux.org/viewtopic.php?pid=1491879#p1491879 This alternative configuration for using pacman with aria2] tries to simplify configuration and adds more configuration options.}}<br />
<br />
See [http://aria2.sourceforge.net/manual/en/html/aria2c.html#options OPTIONS] in {{ic|man aria2c}} for used aria2c options.<br />
<br />
{{ic|-d, --dir}}<br />
:The directory to store the downloaded file(s) as specified by [[pacman]].<br />
<br />
{{ic|-o, --out}}<br />
:The output file name(s) of the downloaded file(s). <br />
<br />
{{ic|%o}}<br />
:Variable which represents the local filename(s) as specified by pacman.<br />
<br />
{{ic|%u}}<br />
:Variable which represents the download URL as specified by pacman.<br />
<br />
==== Other applications ====<br />
<br />
There are other downloading applications that you can use with Pacman. Here they are, and their associated XferCommand settings:<br />
<br />
* {{ic|snarf}}: {{ic|1=XferCommand = /usr/bin/snarf -N %u}}<br />
* {{ic|lftp}}: {{ic|1=XferCommand = /usr/bin/lftp -c pget %u}}<br />
* {{ic|axel}}: {{ic|1=XferCommand = /usr/bin/axel -n 2 -v -a -o %o %u}}</div>Slashhttps://wiki.archlinux.org/index.php?title=Pacman/Tips_and_tricks&diff=415753Pacman/Tips and tricks2016-01-16T18:24:55Z<p>Slash: /* Dynamic reverse proxy cache using nginx */</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Package management]]<br />
[[es:Pacman/Tips and tricks]]<br />
[[fr:Astuces Pacman]]<br />
[[it:Pacman/Tips and tricks]]<br />
[[ja:Pacman ヒント]]<br />
[[ru:Pacman/Tips and tricks]]<br />
[[tr:Pacman ipuçları]]<br />
[[zh-cn:Pacman/Tips and tricks]]<br />
{{Related articles start}}<br />
{{Related|pacman}}<br />
{{Related|Mirrors}}<br />
{{Related|Creating packages}}<br />
{{Related articles end}}<br />
See [[pacman]] for the main article.<br />
<br />
For general methods to improve the flexibility of the provided tips or pacman itself, see [[Core utilities]] and [[Bash]].<br />
<br />
== Cosmetic and convenience ==<br />
<br />
=== Operations and Bash syntax ===<br />
<br />
{{Merge|pacman#Installing specific packages|Although this is definitely a tip/trick, it fits to the main [[pacman]] page much better than here. It shows generic examples of how to do things, not specific commands needed to achieve something non-trivial/unrelated.}}<br />
<br />
In addition to pacman's standard set of features, there are ways to extend its usability through rudimentary [[Bash]] commands/syntax.<br />
<br />
To install a number of packages sharing similar patterns in their names -- not the entire group nor all matching packages; eg. {{Grp|plasma}}:<br />
<br />
# pacman -S plasma-{desktop,mediacenter,nm}<br />
<br />
Of course, that is not limited and can be expanded to however many levels needed:<br />
<br />
# pacman -S plasma-{workspace{,-wallpapers},pa}<br />
<br />
Sometimes, {{Ic|-s}}'s builtin ERE can cause a lot of unwanted results, so it has to be limited to match the package name only; not the description nor any other field:<br />
<br />
# pacman -Ss '^vim-'<br />
<br />
pacman has the {{ic|-q}} operand to hide the version column, so it is possible to query and reinstall packages with "compiz" as part of their name:<br />
<br />
# pacman -S $(pacman -Qq | grep compiz)<br />
<br />
=== Graphical front-ends ===<br />
<br />
* {{App|Discover|A collection of package management tools for KDE, using PackageKit.|https://projects.kde.org/projects/kde/workspace/discover|{{Pkg|discover}}}}<br />
* {{App|GNOME Software|Gnome Software App.|https://wiki.gnome.org/Apps/Software|{{pkg|gnome-software}}}}<br />
* {{App|pcurses|Package management in a curses frontend|https://github.com/schuay/pcurses|{{Pkg|pcurses}}}}<br />
* {{App|tkPacman|GUI front-end for pacman. Depends on Tcl/Tk and X11 but neither on GTK+, nor on QT. It only interacts with the package database via the CLI of 'pacman'. So, installing and removing packages with tkPacman or with pacman leads to exactly the same result.|http://sourceforge.net/projects/tkpacman|{{AUR|tkpacman}}}}<br />
<br />
=== Utilities ===<br />
<br />
* {{App|Lostfiles|Script for detecting orphaned files.|https://github.com/graysky2/lostfiles|{{AUR|lostfiles}}}}<br />
* {{App|[[Pacmatic]]|Pacman wrapper to check Arch News before upgrading, avoid partial upgrades, and warn about configuration file changes.|http://kmkeen.com/pacmatic|{{Pkg|pacmatic}}}}<br />
* {{App|[[pkgfile]]|Tool that finds what package owns a file.|http://github.com/falconindy/pkgfile|{{Pkg|pkgfile}}}}<br />
* {{App|[[pkgtools]]|Collection of scripts for Arch Linux packages.|https://github.com/Daenyth/pkgtools|{{AUR|pkgtools}}}}<br />
* {{App|srcpac|Simple tool that automates rebuilding packages from source.|https://projects.archlinux.org/srcpac.git|{{Pkg|srcpac}}}}<br />
<br />
== Maintenance ==<br />
<br />
See also [[System maintenance]].<br />
<br />
=== Listing packages ===<br />
<br />
You may want to get the list of installed packages with their version, which is useful when reporting bugs or discussing installed packages.<br />
<br />
* List all explicitly installed packages: {{ic| pacman -Qe }}.<br />
* List all foreign packages (typically manually downloaded and installed): {{ic| pacman -Qm }}.<br />
* List all native packages (installed from the sync database(s)): {{ic| pacman -Qn }}.<br />
* List packages by regex: {{ic|pacman -Qs ''regex''}}.<br />
* List packages by regex with custom output format: {{ic|expac -s "%-30n %v" ''regex''}} (needs {{Pkg|expac}}).<br />
<br />
==== With size ====<br />
<br />
To get a list of installed packages sorted by size, which may be useful when freeing space on your hard drive:<br />
<br />
* Install {{Pkg|expac}} and run {{ic|<nowiki>expac -H M '%m\t%n' | sort -h</nowiki>}}.<br />
* Run {{Pkg|pacgraph}} with the {{ic|-c}} option.<br />
<br />
To list the download size of several packages (leave {{ic|''packages''}} blank to list all packages):<br />
<br />
$ expac -S -H M '%k\t%n' ''packages''<br />
<br />
To list explicitly installed packages not in {{Grp|base}} nor {{Grp|base-devel}} with size and description:<br />
<br />
$ expac -H M "%011m\t%-20n\t%10d" $( comm -23 <(pacman -Qqen|sort) <(pacman -Qqg base base-devel|sort) ) | sort -n<br />
<br />
==== Latest installed packages ====<br />
<br />
Install {{Pkg|expac}} and run {{ic|<nowiki>expac --timefmt='%Y-%m-%d %T' '%l\t%n' | sort | tail -20</nowiki>}} or {{ic|<nowiki>expac --timefmt=%s '%l\t%n' | sort -n | tail -20</nowiki>}}<br />
<br />
==== All packages that nothing else depends on ====<br />
<br />
If you want to generate a list of all installed packages that nothing else depends on, you can use the following script. This is very helpful if you are trying to free hard drive space and have installed a lot of packages that you may not remember. You can browse through the output to find packages which you no longer need.<br />
<br />
{{Note|This script will show all packages that nothing else depends on, including those explicitly installed. To get a list of packages installed as dependencies but no longer required by any installed package, see [[#Orphans]].}} <br />
<br />
{{bc|<nowiki><br />
ignoregrp="base base-devel"<br />
ignorepkg=""<br />
<br />
comm -23 <(pacman -Qqt | sort) <(echo $ignorepkg | tr ' ' '\n' | cat <(pacman -Sqg $ignoregrp) - | sort -u)<br />
</nowiki>}}<br />
<br />
For list with descriptions for packages:<br />
<br />
{{bc|<nowiki><br />
expac -HM "%-20n\t%10d" $( comm -23 <(pacman -Qqt|sort) <(pacman -Qqg base base-devel|sort) )<br />
</nowiki>}}<br />
<br />
==== Installed packages that are not in a specified group or repository ====<br />
<br />
The following command will list any installed packages that are not in either {{Grp|base}} or {{Grp|base-devel}}, and as such were likely installed manually by the user:<br />
<br />
$ comm -23 <(pacman -Qeq | sort) <(pacman -Qgq base base-devel | sort)<br />
<br />
List all installed packages that are not in specified repository ({{ic|''repo_name''}} in example):<br />
<br />
$ comm -23 <(pacman -Qtq | sort) <(pacman -Slq ''repo_name'' | sort)<br />
<br />
List all installed packages that are in the {{ic|''repo_name''}} repository:<br />
<br />
$ comm -12 <(pacman -Qtq | sort) <(pacman -Slq ''repo_name'' | sort)<br />
<br />
=== Listing files owned by a package with size ===<br />
<br />
This one might come in handy if you have found that a specific package uses a huge amount of space and you want to find out which files make up the most of that.<br />
<br />
$ pacman -Qlq ''package'' | grep -v '/$' | xargs du -h | sort -h<br />
<br />
=== Identify files not owned by any package ===<br />
<br />
If your system has stray files not owned by any package (a common case if you do not [[Enhance system stability#Use the package manager to install software|use the package manager to install software]]), you may want to find such files in order to clean them up. The general process for doing so is:<br />
<br />
# Create a sorted list of the files you want to check ownership of: {{bc|<nowiki>$ find /etc /opt /usr | sort > all_files.txt</nowiki>}}<br />
# Create a sorted list of the files tracked by pacman (and remove the trailing slashes from directories): {{bc|<nowiki>$ pacman -Qlq | sed 's|/$||' | sort > owned_files.txt</nowiki>}}<br />
# Find lines in the first list that are not in the second: {{bc|$ comm -23 all_files.txt owned_files.txt}}<br />
<br />
This process is tricky in practice because many important files are not part of any package (e.g. files generated at runtime, custom configs) and so will be included in the final output, making it difficult to pick out the files that can be safely deleted.<br />
<br />
The {{AUR|lostfiles}} script performs similar steps, but also includes an extensive blacklist to remove common false positives from the output.<br />
<br />
=== Removing unused packages ===<br />
<br />
==== Orphans ====<br />
<br />
For ''recursively'' removing orphans and their configuration files:<br />
<br />
# pacman -Rns $(pacman -Qtdq)<br />
<br />
If no orphans were found, pacman errors with {{ic|error: no targets specified}}. This is expected as no arguments were passed to {{ic|pacman -Rns}}.<br />
<br />
{{Note|Since pacman version 4.2.0 only true orphans are listed. To make pacman also list packages which are only optionally required by another package, pass the {{ic|-t}}/{{ic|--unrequired}} flag twice:<br />
$ pacman -Qdttq<br />
Use this carefully, as it is not taken into account whether the package is an optional dependency and therefore bears the risk to remove packages which actually are not real orphans.}}<br />
<br />
==== Explicitly installed ====<br />
<br />
Because a lighter system is easier to maintain, occasionally looking through explicitly installed packages and ''manually'' selecting unused packages to be removed can be helpful.<br />
<br />
To list explicitly installed packages available in the official repositories:<br />
<br />
$ pacman -Qen<br />
<br />
To list explicitly installed packages not available in official repositories:<br />
<br />
$ pacman -Qem<br />
<br />
=== Removing everything but base group ===<br />
<br />
If it is ever necessary to remove all packages except the base group, try this one liner:<br />
<br />
# pacman -R $(comm -23 <(pacman -Qq|sort) <((for i in $(pacman -Qqg base); do pactree -ul $i; done)|sort -u|cut -d ' ' -f 1))<br />
<br />
The one-liner was originally devised in [https://bbs.archlinux.org/viewtopic.php?id=130176 this discussion], and later improved in this article.<br />
<br />
Notes:<br />
<br />
# {{ic|comm}} requires sorted input otherwise you get e.g. {{ic|comm: file 1 is not in sorted order}}.<br />
# {{ic|pactree}} prints the package name followed by what it provides. For example:<br />
<br />
{{hc|$ pactree -lu logrotate|<br />
logrotate<br />
popt<br />
glibc<br />
linux-api-headers<br />
tzdata<br />
dcron cron<br />
bash<br />
readline<br />
ncurses<br />
gzip}}<br />
<br />
The {{ic|dcron cron}} line seems to cause problems, that is why {{ic|cut -d ' ' -f 1}} is needed - to keep just the package name.<br />
<br />
=== Getting the dependencies list of several packages ===<br />
<br />
Dependencies are alphabetically sorted and doubles are removed.<br />
Note that you can use {{ic|pacman -Qi}} to improve response time a little. But<br />
you will not be able to query as many packages. Unfound packages are simply skipped<br />
(hence the {{ic|2>/dev/null}}).<br />
<br />
$ pacman -Si $@ 2>/dev/null | awk -F ": " -v filter="^Depends" \ '$0 ~ filter {gsub(/[>=<][^ ]*/,"",$2) ; gsub(/ +/,"\n",$2) ; print $2}' | sort -u<br />
<br />
Alternatively, you can use {{ic|expac}}: {{ic|expac -l '\n' %E -S $@ &#124; sort -u}}.<br />
<br />
=== Listing changed backup files ===<br />
<br />
If you want to backup your system configuration files you could copy all files in {{ic|/etc/}}, but usually you are only interested in the files that you have changed. Modified [[Pacnew_and_Pacsave_files#Package_backup_files|backup files]] can be viewed with the following command:<br />
<br />
# pacman -Qii | awk '/^MODIFIED/ {print $2}'<br />
<br />
Running this command with root permissions will ensure that files readable only by root (such as {{ic|/etc/sudoers}}) are included in the output.<br />
<br />
{{Tip|See [[#Listing all changed files from packages]] to list all changed files pacman knows, not only backup files.}}<br />
<br />
=== Back-up the pacman database ===<br />
<br />
The following command can be used to back up the local pacman database:<br />
<br />
$ tar -cjf pacman_database.tar.bz2 /var/lib/pacman/local<br />
<br />
Store the backup pacman database file on one or more offline media, such as a USB stick, external hard drive, or CD-R. See also [[Pacman tips#Backing up Local database with systemd]] for an alternative method.<br />
<br />
The database can be restored by moving the {{ic|pacman_database.tar.bz2}} file into the {{ic|/}} directory and executing the following command:<br />
<br />
# tar -xjvf pacman_database.tar.bz2<br />
<br />
{{Note|If the pacman database files are corrupted, and there is no backup file available, there exists some hope of rebuilding the pacman database. Consult [[Pacman tips#Restore pacman's local database]].}}<br />
<br />
==== Using systemd ====<br />
<br />
[[systemd]] can take snapshots of the pacman local database, each time it is modified.<br />
<br />
{{Tip|For a more configurable version, use: {{AUR|pakbak-git}}}}<br />
<br />
Use the following scripts, changing the value of {{ic|$pakbak}} for the backup location accordingly. The {{ic|pakbak.service}} can also automaticall be [[enable]]d on boot:<br />
<br />
{{hc|/usr/lib/systemd/scripts/pakbak_script|2=<br />
#!/bin/bash<br />
<br />
declare -r pakbak=''"/pakbak.tar.xz"''; ## set backup location<br />
tar -cJf "$pakbak" "/var/lib/pacman/local"; ## compress & store pacman local database in $pakbak<br />
}}<br />
<br />
{{hc|/usr/lib/systemd/system/pakbak.service|2=<br />
[Unit]<br />
Description=Back up pacman database<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/bin/bash /usr/lib/systemd/scripts/pakbak_script<br />
RemainAfterExit=no<br />
}}<br />
<br />
{{hc|/usr/lib/systemd/system/pakbak.path|2=<br />
[Unit]<br />
Description=Back up pacman database<br />
<br />
[Path]<br />
PathChanged=/var/lib/pacman/local<br />
Unit=pakbak.service<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
=== Check changelogs easily ===<br />
<br />
When maintainers update packages, commits are often commented in a useful fashion. Users can quickly check these from the command line by installing {{AUR|paclog}}. This utility lists recent commit messages for packages from the official repositories or the AUR, by using {{ic|paclog package}}.<br />
<br />
== Installation and recovery ==<br />
<br />
Alternative ways of getting and restoring packages.<br />
<br />
=== Installing packages from a CD/DVD or USB stick ===<br />
<br />
To download packages, or groups of packages:<br />
<br />
# cd ~/Packages<br />
# pacman -Syw base base-devel grub-bios xorg gimp --cachedir .<br />
# repo-add ./custom.db.tar.gz ./*<br />
<br />
Then you can burn the "Packages" folder to a CD/DVD or transfer it to a USB stick, external HDD, etc.<br />
<br />
To install:<br />
<br />
'''1.''' Mount the media:<br />
<br />
# mkdir /mnt/repo<br />
# mount /dev/sr0 /mnt/repo #For a CD/DVD.<br />
# mount /dev/sdxY /mnt/repo #For a USB stick.<br />
<br />
'''2.''' Edit {{ic|pacman.conf}} and add this repository ''before'' the other ones (e.g. extra, core, etc.). This is important. Do not just uncomment the one on the bottom. This way it ensures that the files from the CD/DVD/USB take precedence over those in the standard repositories:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
[custom]<br />
SigLevel = PackageRequired<br />
Server = file:///mnt/repo/Packages}}<br />
<br />
'''3.''' Finally, synchronize the pacman database to be able to use the new repository:<br />
<br />
# pacman -Syu<br />
<br />
=== Custom local repository ===<br />
<br />
Use the ''repo-add'' script included with Pacman to generate a database for a personal repository. Use {{ic|repo-add --help}} for more details on its usage. Simply store all of the built packages to be included in the repository in one directory, and execute the following command (where ''repo'' is the name of the custom repository):<br />
<br />
$ repo-add /path/to/repo.db.tar.gz /path/to/*.pkg.tar.xz<br />
<br />
{{Note|A package database is a tar file, optionally compressed. Valid extensions are “.db” or “.files” followed by an archive extension of “.tar”, “.tar.gz”, “.tar.bz2”, “.tar.xz”, or “.tar.Z”. The file does not need to exist, but all parent directories must exist.<br />
Furthermore when using {{ic|repo-add}} keep in mind that the database and the packages do not need to be in the same directory. But when using pacman with that database, they should be together.}}<br />
<br />
To add a new package to the database, or to replace the old version of an existing package in the database, run:<br />
<br />
$ repo-add /path/to/repo.db.tar.gz /path/to/packagetoadd-1.0-1-i686.pkg.tar.xz<br />
<br />
''repo-remove'' is used in the exact same manner as ''repo-add'', except that the packages listed on the command line are removed from the repository database.<br />
<br />
Once the local repository database has been created, add the repository to {{ic|pacman.conf}} for each system that is to use the repository. An example of a custom repository is in {{ic|pacman.conf}}. The repository's name is the database filename with the file extension omitted. In the case of the example above the repository's name would simply be ''repo''. Reference the repository's location using a {{ic|file://}} url, or via FTP using ftp://localhost/path/to/directory.<br />
<br />
If willing, add the custom repository to the [[Unofficial user repositories|list of unofficial user repositories]], so that the community can benefit from it.<br />
<br />
=== Network shared pacman cache ===<br />
<br />
If you happen to run several Arch boxes on your LAN, you can share packages so that you can greatly decrease your download times. Keep in mind you should not share between different architectures (i.e. i686 and x86_64) or you'll get into troubles.<br />
<br />
==== Read-only cache ====<br />
<br />
If you are looking for a quick and dirty solution, you can simply run a standalone webserver which other computers can use as a first mirror: {{ic|darkhttpd /var/cache/pacman/pkg}}. Just add this server at the top of your mirror list. Be aware that you might get a lot of 404 errors, due to cache misses, depending on what you do, but pacman will try the next (real) mirrors when that happens.<br />
<br />
==== Read-write cache ====<br />
<br />
{{Tip|See [[pacserve]] for an alternative (and probably simpler) solution than what follows.}}<br />
<br />
In order to share packages between multiple computers, simply share {{ic|/var/cache/pacman/}} using any network-based mount protocol. This section shows how to use shfs or sshfs to share a package cache plus the related library-directories between multiple computers on the same local network. Keep in mind that a network shared cache can be slow depending on the file-system choice, among other factors.<br />
<br />
First, install any network-supporting filesystem; for example [[sshfs]], [[shfs]], ftpfs, [[smbfs]] or [[nfs]].<br />
<br />
{{Tip|To use sshfs or shfs, consider reading [[Using SSH Keys]].}}<br />
<br />
Then, to share the actual packages, mount {{ic|/var/cache/pacman/pkg}} from the server to {{ic|/var/cache/pacman/pkg}} on every client machine.<br />
<br />
==== Dynamic reverse proxy cache using nginx ====<br />
<br />
[[nginx]] can be used to proxy requests to official upstream mirrors and cache the results to local disk. All subsequent requests for that file will be served directly from the local cache, minimizing the amount of internet traffic needed to update a large number of servers with minimal effort. <br />
<br />
{{Warning| This method has two limitations. The first one is that you must use mirrors that use the same relative path and you must configure your cache to use the same. In this example, we are using mirrors that use the relative path {{ic|/archlinux/$repo/os/$arch}} and our cache's {{ic|Server}} setting is configured similarly. The second limitation is that you can only use non virtual hosted mirrors. This is because the {{ic|Host}} header sent by nginx upstream block is {{ic|"mirrors"}}, so a virtually hosted mirror will not resolve with this virtual hostname. The example given above only works because mirror.rit.edu is uniquely mapped to it's ip address is resolves to: it is not a virtual host. Make sure you replace the other two servers when you use this example.}}<br />
In this example, we will run the cache server on {{ic|<nowiki>http://cache.domain.local:8080/</nowiki>}} and storing the packages in {{ic|/srv/http/pacman-cache/}}. <br />
<br />
Create the directory for the cache and adjust the permissions to nginx can write files to it:<br />
<br />
# mkdir /srv/http/pacman-cache<br />
# chown http:http /srv/http/pacman-cache<br />
<br />
Next, configure nginx as our dynamic cache:<br />
<br />
{{hc|/etc/nginx/nginx.conf|<nowiki><br />
http<br />
{<br />
...<br />
<br />
# Pacman Cache<br />
server<br />
{<br />
listen 8080;<br />
server_name cache.domain.local;<br />
root /srv/http/pacman-cache;<br />
autoindex on;<br />
<br />
# Requests for package db and signature files should redirect upstream<br />
# without caching<br />
location ~ \.(db|sig)$ {<br />
resolver 8.8.8.8 8.8.4.4;<br />
proxy_pass $scheme://mirrors$request_uri;<br />
}<br />
<br />
# Requests for actual packages should be served directly if available;<br />
# If not available, retrieve and save the package from an upstream<br />
# mirror.<br />
location ~ \.tar\.xz$ {<br />
try_files $uri @pkg_mirror;<br />
}<br />
<br />
# Retrieve package from upstream mirrors, cache for future requests<br />
location @pkg_mirror {<br />
resolver 8.8.8.8 8.8.4.4;<br />
proxy_store on;<br />
proxy_store_access user:rw group:rw all:r;<br />
proxy_next_upstream error timeout http_404;<br />
proxy_pass http://mirrors$request_uri;<br />
proxy_redirect off;<br />
}<br />
}<br />
<br />
# Upstream Arch Linux Mirrors - Change these to your preferred servers<br />
upstream mirrors {<br />
server mirror.rit.edu;<br />
server mirrors.acm.wpi.edu backup;<br />
server lug.mtu.edu backup;<br />
}<br />
}<br />
</nowiki>}}<br />
<br />
Finally, update your other Arch Linux servers to use this new cache by adding the following line to the {{ic|mirrorlist}} file:<br />
<br />
{{hc|/etc/pacman.d/mirrorlist|<nowiki><br />
Server = http://cache.domain.local:8080/archlinux/$repo/os/$arch<br />
...<br />
</nowiki>}}<br />
<br />
{{Note| You will need to create a method to clear old packages, as this directory will continue to grow over time. For example, {{ic|paccache}} (which is included with {{ic|pacman}}) can be used to automate this using retention criteria of your choosing. }}<br />
<br />
==== Synchronize pacman package cache using BitTorrent Sync ====<br />
<br />
[[BitTorrent Sync]] is a new way of synchronizing folder via network (it works in LAN and over the internet). It is peer-to-peer so you do not need to set up a server: follow the link for more information.<br />
How to share a pacman cache using BitTorrent Sync:<br />
* First install the {{AUR|btsync}} package from the AUR on the machines you want to sync<br />
* Follow the installation instructions of the AUR package or on the [[BitTorrent Sync]] wiki page <br />
** set up BitTorrent Sync to work for the root account. This process requires read/write to the pacman package cache. <br />
** make sure to set a good password on btsync's web UI <br />
** start the systemd daemon for btsync.<br />
** in the btsync Web GUI add a new synchronized folder on the first machine and generate a new Secret. Point the folder to {{ic|/var/cache/pacman/pkg}}<br />
** Add the folder on all the other machines using the same Secret to share the cached packages between all systems. Or, to set the first system as a master and the others as slaves, use the Read Only Secret. Be sure to point it to {{ic|/var/cache/pacman/pkg}}<br />
<br />
Now the machines should connect and start synchronizing their cache. Pacman works as expected even during synchronization. The process of syncing is entirely automatic.<br />
<br />
==== Preventing unwanted cache purges ====<br />
<br />
By default, {{Ic|pacman -Sc}} removes package tarballs from the cache that correspond to packages that are not installed on the machine the command was issued on. Because pacman cannot predict what packages are installed on all machines that share the cache, it will end up deleting files that should not be.<br />
<br />
To clean up the cache so that only ''outdated'' tarballs are deleted, add this entry in the {{ic|[options]}} section of {{ic|/etc/pacman.conf}}:<br />
<br />
CleanMethod = KeepCurrent<br />
<br />
=== Recreate a package from the file system ===<br />
<br />
To recreate a package from the file system, use ''bacman'' (included with pacman). Files from the system are taken as they are, hence any modifications will be present in the assembled package. Distributing the recreated package is therefore discouraged; see [[ABS]] and [[Arch Rollback Machine]] for alternatives.<br />
<br />
{{Tip|''bacman'' honours the {{ic|PACKAGER}}, {{ic|PKGDEST}} and {{ic|PKGEXT}} options from {{ic|makepkg.conf}}. Custom options for the compression tools can be configured by exporting the relevant environment variable, for example {{ic|1=XZ_OPT="-T 0"}} will enable parallel compression for ''xz''.}}<br />
<br />
An alternative tool would be {{AUR|fakepkg}}. It supports parallelization through {{Pkg|parallel}} and can handle multiple input packages in one command, which ''bacman'' both does not support.<br />
<br />
=== Backing up and retrieving a list of installed packages ===<br />
<br />
{{Expansion|Optional dependencies that are not required by any other package ({{ic|comm -13 <(pacman -Qdtq) <(pacman -Qdttq)}}) are ignored by this procedure.}}<br />
<br />
{{Tip|1=You may want to use {{AUR|pacbackup}} or [https://bbs.archlinux.org/viewtopic.php?id=200067 bacpac] to automatise the below tasks.}}<br />
<br />
It is good practice to keep periodic backups of all pacman-installed packages. In the event of a system crash which is unrecoverable by other means, pacman can then easily reinstall the very same packages onto a new installation.<br />
<br />
* First, backup the current list of non-local packages: {{ic|$ pacman -Qqen > pkglist.txt}}<br />
<br />
* Store the {{ic|pkglist.txt}} on a USB key or other convenient medium or gist.github.com or Evernote, Dropbox, etc.<br />
<br />
* Copy the {{ic|pkglist.txt}} file to the new installation, and navigate to the directory containing it.<br />
<br />
* Issue the following command to install from the backup list: {{ic|# pacman -S $(< pkglist.txt)}}<br />
<br />
In the case you have a list which was not generated like mentioned above, there may be foreign packages in it (i.e. packages not belonging to any repos you have configured, or packages from the AUR).<br />
<br />
In such a case, you may still want to install all available packages from that list:<br />
<br />
# pacman -S --needed $(comm -12 <(pacman -Slq|sort) <(sort badpkdlist) )<br />
<br />
Explanation:<br />
<br />
* {{ic|pacman -Slq}} lists all available softwares, but the list is sorted by repository first, hence the {{ic|sort}} command.<br />
* Sorted files are required in order to make the {{ic|comm}} command work.<br />
* The {{ic|-12}} parameter display lines common to both entries.<br />
* The {{ic|--needed}} switch is used to skip already installed packages.<br />
<br />
Finally, you may want to remove all the packages on your system that are not mentioned in the list.<br />
<br />
{{Warning|Use this command wisely, and always check the result prompted by pacman.}}<br />
<br />
# pacman -Rsu $(comm -23 <(pacman -Qq|sort) <(sort pkglist))<br />
<br />
=== Listing all changed files from packages ===<br />
If you are suspecting file corruption (e.g. by software / hardware failure), but don't know for sure whether / which files really got corrupted, you might want to compare with the hash sums in the packages. This can be done with the following script.<br />
<br />
The script depends on the accuracy of pacman's database in {{ic|/var/lib/pacman/local/}} and the used programs such as ''bash'', ''grep'' and so on. For recovery of the database see [[#Restore pacman's local database]]. The {{ic|mtree}} files can also be [[#Viewing a single file inside a .pkg file|extracted as {{ic|.MTREE}} from the respective package files]].<br />
<br />
{{Note|<br />
* This should '''not''' be used as is when suspecting malicious changes! In this case security precautions such as using a live medium and an independent source for the hash sums are advised.<br />
* This could take a long time, depending on the hardware and installed packages.<br />
}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash -e<br />
<br />
# Select the hash algorithm. Currently available (see mtree files and mtree(5)):<br />
# md5, sha256<br />
algo="md5"<br />
<br />
for package in /var/lib/pacman/local/*; do<br />
[ "$package" = "/var/lib/pacman/local/ALPM_DB_VERSION" ] && continue<br />
<br />
# get files and hash sums<br />
zgrep " ${algo}digest=" "$package/mtree" | grep -Ev '^\./\.[A-Z]+' | \<br />
sed 's/^\([^ ]*\).*'"${algo}"'digest=\([a-f0-9]*\).*/\1 \2/' | \<br />
while read -r file hash<br />
do<br />
# expand "\nnn" (in mtree) / "\0nnn" (for echo) escapes of ASCII<br />
# characters (octal representation)<br />
for ascii in $(grep -Eo '\\[0-9]{1,3}' <<< "$file"); do<br />
file="$(sed "s/\\$ascii/$(echo -e "\0${ascii:1}")/" <<< "$file")"<br />
done<br />
<br />
# check file hash<br />
if [ "$("${algo}sum" /"$file" | awk '{ print $1; }')" != "$hash" ]; then<br />
echo "$(basename "$package")" /"$file"<br />
fi<br />
done<br />
done<br />
</nowiki>}}<br />
<br />
=== Reinstalling all packages ===<br />
To reinstall all native packages, use:<br />
<br />
# pacman -Qenq | pacman -S -<br />
<br />
Foreign (AUR) packages must be reinstalled separately; you can list them with {{ic|pacman -Qemq}}.<br />
<br />
Pacman preserves the installation reason by default.<br />
<br />
=== Restore pacman's local database ===<br />
<br />
Signs that pacman needs a local database restoration:<br />
<br />
* {{ic|pacman -Q}} gives absolutely no output, and {{Ic|pacman -Syu}} erroneously reports that the system is up to date.<br />
* When trying to install a package using {{ic|pacman -S package}}, and it outputs a list of already satisfied dependencies.<br />
* When {{ic|testdb}} (part of {{Pkg|pacman}}) reports database inconsistency.<br />
<br />
Most likely, pacman's database of installed software, {{ic|/var/lib/pacman/local}}, has been corrupted or deleted. While this is a serious problem, it can be restored by following the instructions below.<br />
<br />
Firstly, make sure pacman's log file is present:<br />
<br />
$ ls /var/log/pacman.log<br />
<br />
If it does not exist, it is ''not'' possible to continue with this method. You may be able to use [https://bbs.archlinux.org/viewtopic.php?pid=670876 Xyne's package detection script] to recreate the database. If not, then the likely solution is to re-install the entire system.<br />
<br />
==== Generating the package recovery list ====<br />
<br />
{{Warning|If for some reason your [[pacman]] cache or [[makepkg]] package destination contain packages for other architectures, remove them before continuation.}}<br />
<br />
Run the script (optionally passing additional directories with packages as parameters):<br />
<br />
$ paclog-pkglist /var/log/pacman.log | ./pacrecover >files.list 2>pkglist.orig<br />
<br />
This way two files will be created: {{Ic|files.list}} with package files, still present on machine and {{Ic|pkglist.orig}}, packages from which should be downloaded. Later operation may result in mismatch between files of older versions of package, still present on machine, and files, found in new version. Such mismatches will have to be fixed manually.<br />
<br />
Here is a way to automatically restrict second list to packages available in a repository:<br />
<br />
$ { cat pkglist.orig; pacman -Slq; } | sort | uniq -d > pkglist<br />
<br />
Check if some important ''base'' package are missing, and add them to the list:<br />
<br />
$ comm -23 <(pacman -Sgq base) pkglist.orig >> pkglist<br />
<br />
Proceed once the contents of both lists are satisfactory, since they will be used to restore pacman's installed package database; {{ic|/var/lib/pacman/local/}}.<br />
<br />
==== Performing the recovery ====<br />
<br />
Define bash alias for recovery purposes:<br />
<br />
# recovery-pacman() {<br />
pacman "$@" \<br />
--log /dev/null \<br />
--noscriptlet \<br />
--dbonly \<br />
--force \<br />
--nodeps \<br />
--needed \<br />
#<br />
}<br />
<br />
{{ic|--log /dev/null}} allows to avoid needless pollution of pacman log, {{Ic|--needed}} will save some time by skipping packages, already present in database, {{Ic|--nodeps}} will allow installation of cached packages, even if packages being installed depend on newer versions. Rest of options will allow '''pacman''' to operate without reading/writing filesystem.<br />
<br />
Populate the sync database:<br />
<br />
# pacman -Sy<br />
<br />
Start database generation by installing locally available package files from {{ic|files.list}}:<br />
<br />
# recovery-pacman -U $(< files.list)<br />
<br />
Install the rest from {{ic|pkglist}}:<br />
<br />
# recovery-pacman -S $(< pkglist)<br />
<br />
Update the local database so that packages that are not required by any other package are marked as explicitly installed and the other as dependences. You will need be extra careful in the future when removing packages, but with the original database lost is the best we can do.<br />
<br />
# pacman -D --asdeps $(pacman -Qq)<br />
# pacman -D --asexplicit $(pacman -Qtq)<br />
<br />
Optionally check all installed packages for corruption:<br />
<br />
# pacman -Qk<br />
<br />
Optionally [[#Identify files not owned by any package]].<br />
<br />
Update all packages:<br />
<br />
# pacman -Su<br />
<br />
=== Recovering a USB key from existing install ===<br />
<br />
If you have Arch installed on a USB key and manage to mess it up (e.g. removing it while it is still being written to), then it is possible to re-install all the packages and hopefully get it back up and working again (assuming USB key is mounted in /newarch)<br />
<br />
# pacman -S $(pacman -Qq --dbpath /newarch/var/lib/pacman) --root /newarch --dbpath /newarch/var/lib/pacman<br />
<br />
=== Extracting contents of a .pkg file ===<br />
<br />
The {{ic|.pkg}} files ending in {{ic|.xz}} are simply tar'ed archives that can be decompressed with:<br />
<br />
$ tar xvf package.tar.xz<br />
<br />
If you want to extract a couple of files out of a {{ic|.pkg}} file, this would be a way to do it.<br />
<br />
=== Viewing a single file inside a .pkg file ===<br />
<br />
For example, if you want to see the contents of {{ic|/etc/systemd/logind.conf}} supplied within the {{Pkg|systemd}} package:<br />
<br />
$ tar -xOf /var/cache/pacman/pkg/systemd-204-3-x86_64.pkg.tar.xz etc/systemd/logind.conf<br />
<br />
Or you can use {{pkg|vim}}, then browse the archive:<br />
<br />
$ vim /var/cache/pacman/pkg/systemd-204-3-x86_64.pkg.tar.xz<br />
<br />
=== Find applications that use libraries from older packages ===<br />
<br />
Even if you installed a package the existing long-running programs (like daemons and servers) still keep using code from old package libraries. And it is a bad idea to let these programs running if the old library contains a security bug.<br />
<br />
Here is a way how to find all the programs that use old packages code:<br />
<br />
# lsof +c 0 | grep -w DEL | awk '1 { print $1 ": " $NF }' | sort -u<br />
It will print running program name and old library that was removed or replaced with newer content.<br />
<br />
== Performance ==<br />
<br />
=== Database access speeds ===<br />
<br />
Pacman stores all package information in a collection of small files, one for each package. Improving database access speeds reduces the time taken in database-related tasks, e.g. searching packages and resolving package dependencies. The safest and easiest method is to run as root:<br />
<br />
# pacman-optimize<br />
<br />
This will attempt to put all the small files together in one (physical) location on the hard disk so that the hard disk head does not have to move so much when accessing all the data. This method is safe, but is not foolproof: it depends on your filesystem, disk usage and empty space fragmentation. Another, more aggressive, option would be to first remove uninstalled packages from cache and to remove unused repositories before database optimization:<br />
<br />
# pacman -Sc && pacman-optimize<br />
<br />
=== Download speeds ===<br />
<br />
{{Note|If your download speeds have been reduced to a crawl, ensure you are using one of the many [[mirrors]] and not ftp.archlinux.org, which is [https://www.archlinux.org/news/302/ throttled since March 2007].}}<br />
<br />
When downloading packages pacman uses the mirrors in the order they are in {{ic|/etc/pacman.d/mirrorlist}}. The mirror which is at the top of the list by default however may not be the fastest for you. To select a faster mirror, see [[Mirrors]].<br />
<br />
Pacman's speed in downloading packages can also be improved by using a different application to download packages, instead of Pacman's built-in file downloader.<br />
<br />
In all cases, make sure you have the latest Pacman before doing any modifications.<br />
<br />
# pacman -Syu<br />
<br />
==== Powerpill ====<br />
<br />
Powerpill is a full wrapper for Pacman that uses parallel and segmented downloads to speed up the download process. Normally Pacman will download one package at a time, waiting for it to complete before beginning the next download. Powerpill takes a different approach: it tries to download as many packages as possible at once.<br />
<br />
The [[Powerpill|Powerpill wiki page]] provides basic configuration and usage examples along with package and upstream links.<br />
<br />
==== wget ====<br />
<br />
This is also very handy if you need more powerful proxy settings than pacman's built-in capabilities. <br />
<br />
To use {{ic|wget}}, first [[install]] the {{Pkg|wget}} package then modify {{ic|/etc/pacman.conf}} by uncommenting the following line in the {{ic|[options]}} section:<br />
<br />
XferCommand = /usr/bin/wget -c -q --show-progress --passive-ftp -O %o %u<br />
<br />
Instead of uncommenting the {{ic|wget}} parameters in {{ic|/etc/pacman.conf}}, you can also modify the {{ic|wget}} configuration file directly (the system-wide file is {{ic|/etc/wgetrc}}, per user files are {{ic|$HOME/.wgetrc}}.<br />
<br />
==== aria2 ====<br />
<br />
[[aria2]] is a lightweight download utility with support for resumable and segmented HTTP/HTTPS and FTP downloads. aria2 allows for multiple and simultaneous HTTP/HTTPS and FTP connections to an Arch mirror, which should result in an increase in download speeds for both file and package retrieval.<br />
<br />
{{Note|Using aria2c in Pacman's XferCommand will '''not''' result in parallel downloads of multiple packages. Pacman invokes the XferCommand with a single package at a time and waits for it to complete before invoking the next. To download multiple packages in parallel, see the [[#Using_Powerpill|powerpill]] section above.}}<br />
<br />
Install {{Pkg|aria2}}, then edit {{ic|/etc/pacman.conf}} by adding the following line to the {{ic|[options]}} section:<br />
<br />
XferCommand = /usr/bin/aria2c --allow-overwrite=true --continue=true --file-allocation=none --log-level=error --max-tries=2 --max-connection-per-server=2 --max-file-not-found=5 --min-split-size=5M --no-conf --remote-time=true --summary-interval=60 --timeout=5 --dir=/ --out %o %u<br />
<br />
{{Tip|1=[https://bbs.archlinux.org/viewtopic.php?pid=1491879#p1491879 This alternative configuration for using pacman with aria2] tries to simplify configuration and adds more configuration options.}}<br />
<br />
See [http://aria2.sourceforge.net/manual/en/html/aria2c.html#options OPTIONS] in {{ic|man aria2c}} for used aria2c options.<br />
<br />
{{ic|-d, --dir}}<br />
:The directory to store the downloaded file(s) as specified by [[pacman]].<br />
<br />
{{ic|-o, --out}}<br />
:The output file name(s) of the downloaded file(s). <br />
<br />
{{ic|%o}}<br />
:Variable which represents the local filename(s) as specified by pacman.<br />
<br />
{{ic|%u}}<br />
:Variable which represents the download URL as specified by pacman.<br />
<br />
==== Other applications ====<br />
<br />
There are other downloading applications that you can use with Pacman. Here they are, and their associated XferCommand settings:<br />
<br />
* {{ic|snarf}}: {{ic|1=XferCommand = /usr/bin/snarf -N %u}}<br />
* {{ic|lftp}}: {{ic|1=XferCommand = /usr/bin/lftp -c pget %u}}<br />
* {{ic|axel}}: {{ic|1=XferCommand = /usr/bin/axel -n 2 -v -a -o %o %u}}</div>Slashhttps://wiki.archlinux.org/index.php?title=Pacman/Tips_and_tricks&diff=409162Pacman/Tips and tricks2015-11-14T17:20:06Z<p>Slash: Dynamic reverse proxy cache using nginx</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Package management]]<br />
[[es:Pacman/Tips and tricks]]<br />
[[fr:Astuces Pacman]]<br />
[[it:Pacman/Tips and tricks]]<br />
[[ja:Pacman ヒント]]<br />
[[ru:Pacman/Tips and tricks]]<br />
[[tr:Pacman ipuçları]]<br />
[[zh-cn:Pacman/Tips and tricks]]<br />
{{Related articles start}}<br />
{{Related|pacman}}<br />
{{Related|Mirrors}}<br />
{{Related|Creating packages}}<br />
{{Related articles end}}<br />
See [[pacman]] for the main article.<br />
<br />
For general methods to improve the flexibility of the provided tips or pacman itself, see [[Core utilities]] and [[Bash]].<br />
<br />
== Cosmetic and convenience ==<br />
<br />
=== Color output ===<br />
<br />
Pacman has a color option. Uncomment the "Color" line in {{ic|/etc/pacman.conf}}.<br />
<br />
=== Operations and Bash syntax ===<br />
<br />
In addition to pacman's standard set of features, there are ways to extend its usability through rudimentary [[Bash]] commands/syntax.<br />
<br />
* To install a number of packages sharing similar patterns in their names -- not the entire group nor all matching packages; eg. {{Grp|plasma}}:<br />
<br />
# pacman -S plasma-{desktop,mediacenter,nm}<br />
<br />
* Of course, that is not limited and can be expanded to however many levels needed:<br />
<br />
# pacman -S plasma-{workspace{,-wallpapers},pa}<br />
<br />
* Sometimes, {{Ic|-s}}'s builtin ERE can cause a lot of unwanted results, so it has to be limited to match the package name only; not the description nor any other field:<br />
<br />
# pacman -Ss '^vim-'<br />
<br />
* pacman has the {{ic|-q}} operand to hide the version column, so it is possible to query and reinstall packages with "compiz" as part of their name:<br />
<br />
# pacman -S $(pacman -Qq | grep compiz)<br />
<br />
* Or install all packages available in a repository (infinality-bundle for example):<br />
<br />
# pacman -S $(pacman -Slq infinality-bundle)<br />
<br />
=== Graphical front-ends ===<br />
<br />
* {{App|Muon|A collection of package management tools for KDE, using PackageKit.|https://projects.kde.org/projects/kde/workspace/muon|{{Pkg|muon}}}}<br />
* {{App|GNOME Software|Gnome Software App.|https://wiki.gnome.org/Apps/Software|{{pkg|gnome-software}}}}<br />
* {{App|pcurses|Package management in a curses frontend|https://github.com/schuay/pcurses|{{Pkg|pcurses}}}}<br />
* {{App|tkPacman|GUI front-end for pacman. Depends on Tcl/Tk and X11 but neither on GTK+, nor on QT. It only interacts with the package database via the CLI of 'pacman'. So, installing and removing packages with tkPacman or with pacman leads to exactly the same result.|http://sourceforge.net/projects/tkpacman|{{AUR|tkpacman}}}}<br />
<br />
=== Utilities ===<br />
<br />
* {{App|Lostfiles|Script for detecting orphaned files.|https://github.com/graysky2/lostfiles|{{AUR|lostfiles}}}}<br />
* {{App|[[Pacmatic]]|Pacman wrapper to check Arch News before upgrading, avoid partial upgrades, and warn about configuration file changes.|http://kmkeen.com/pacmatic|{{Pkg|pacmatic}}}}<br />
* {{App|[[pkgfile]]|Tool that finds what package owns a file.|http://github.com/falconindy/pkgfile|{{Pkg|pkgfile}}}}<br />
* {{App|[[pkgtools]]|Collection of scripts for Arch Linux packages.|https://github.com/Daenyth/pkgtools|{{AUR|pkgtools}}}}<br />
* {{App|srcpac|Simple tool that automates rebuilding packages from source.|https://projects.archlinux.org/srcpac.git|{{Pkg|srcpac}}}}<br />
<br />
== Maintenance ==<br />
<br />
See also [[System maintenance]].<br />
<br />
=== Listing packages ===<br />
<br />
You may want to get the list of installed packages with their version, which is useful when reporting bugs or discussing installed packages.<br />
<br />
* List all explicitly installed packages: {{ic| pacman -Qe }}.<br />
* List all foreign packages (typically manually downloaded and installed): {{ic| pacman -Qm }}.<br />
* List all native packages (installed from the sync database(s)): {{ic| pacman -Qn }}.<br />
* List packages by regex: {{ic|pacman -Qs ''regex''}}.<br />
* List packages by regex with custom output format: {{ic|expac -s "%-30n %v" ''regex''}} (needs {{Pkg|expac}}).<br />
<br />
==== With size ====<br />
<br />
To get a list of installed packages sorted by size, which may be useful when freeing space on your hard drive:<br />
<br />
* Install {{Pkg|expac}} and run {{ic|<nowiki>expac -H M '%m\t%n' | sort -h</nowiki>}}.<br />
* Run {{Pkg|pacgraph}} with the {{ic|-c}} option.<br />
<br />
To list the download size of several packages (leave {{ic|''packages''}} blank to list all packages):<br />
<br />
$ expac -S -H M '%k\t%n' ''packages''<br />
<br />
To list explicitly installed packages not in {{Grp|base}} nor {{Grp|base-devel}} with size and description:<br />
<br />
$ expac -H M "%011m\t%-20n\t%10d" $( comm -23 <(pacman -Qqen|sort) <(pacman -Qqg base base-devel|sort) ) | sort -n<br />
<br />
==== Latest installed packages ====<br />
<br />
Install {{Pkg|expac}} and run {{ic|<nowiki>expac --timefmt='%Y-%m-%d %T' '%l\t%n' | sort | tail -20</nowiki>}} or {{ic|<nowiki>expac --timefmt=%s '%l\t%n' | sort -n | tail -20</nowiki>}}<br />
<br />
==== All packages that nothing else depends on ====<br />
<br />
If you want to generate a list of all installed packages that nothing else depends on, you can use the following script. This is very helpful if you are trying to free hard drive space and have installed a lot of packages that you may not remember. You can browse through the output to find packages which you no longer need.<br />
<br />
{{Note|This script will show all packages that nothing else depends on, including those explicitly installed. To get a list of packages installed as dependencies but no longer required by any installed package, see [[#Removing orphaned packages]].}} <br />
<br />
{{bc|<nowiki><br />
ignoregrp="base base-devel"<br />
ignorepkg=""<br />
<br />
comm -23 <(pacman -Qqt | sort) <(echo $ignorepkg | tr ' ' '\n' | cat <(pacman -Sqg $ignoregrp) - | sort -u)<br />
</nowiki>}}<br />
<br />
For list with descriptions for packages:<br />
<br />
{{bc|<nowiki><br />
expac -HM "%-20n\t%10d" $( comm -23 <(pacman -Qqt|sort) <(pacman -Qqg base base-devel|sort) )<br />
</nowiki>}}<br />
<br />
==== Installed packages that are not in a specified group or repository ====<br />
<br />
The following command will list any installed packages that are not in either {{Grp|base}} or {{Grp|base-devel}}, and as such were likely installed manually by the user:<br />
<br />
$ comm -23 <(pacman -Qeq | sort) <(pacman -Qgq base base-devel | sort)<br />
<br />
List all installed packages that are not in specified repository ({{ic|''repo_name''}} in example):<br />
<br />
$ comm -23 <(pacman -Qtq | sort) <(pacman -Slq ''repo_name'' | sort)<br />
<br />
List all installed packages that are in the {{ic|''repo_name''}} repository:<br />
<br />
$ comm -12 <(pacman -Qtq | sort) <(pacman -Slq ''repo_name'' | sort)<br />
<br />
=== Listing files owned by a package with size ===<br />
<br />
This one might come in handy if you have found that a specific package uses a huge amount of space and you want to find out which files make up the most of that.<br />
<br />
$ pacman -Qlq ''package'' | grep -v '/$' | xargs du -h | sort -h<br />
<br />
=== Identify files not owned by any package ===<br />
<br />
If your system has stray files not owned by any package (a common case if you do not [[Enhance system stability#Use the package manager to install software|use the package manager to install software]]), you may want to find such files in order to clean them up. The general process for doing so is:<br />
<br />
# Create a sorted list of the files you want to check ownership of: {{bc|<nowiki>$ find /etc /opt /usr | sort > all_files.txt</nowiki>}}<br />
# Create a sorted list of the files tracked by pacman (and remove the trailing slashes from directories): {{bc|<nowiki>$ pacman -Qlq | sed 's|/$||' | sort > owned_files.txt</nowiki>}}<br />
# Find lines in the first list that are not in the second: {{bc|$ comm -23 all_files.txt owned_files.txt}}<br />
<br />
This process is tricky in practice because many important files are not part of any package (e.g. files generated at runtime, custom configs) and so will be included in the final output, making it difficult to pick out the files that can be safely deleted.<br />
<br />
The {{AUR|lostfiles}} script performs similar steps, but also includes an extensive blacklist to remove common false positives from the output.<br />
<br />
=== Removing unused packages ===<br />
<br />
==== Orphans ====<br />
<br />
For ''recursively'' removing orphans and their configuration files:<br />
<br />
# pacman -Rns $(pacman -Qtdq)<br />
<br />
If no orphans were found, pacman errors with {{ic|error: no targets specified}}. This is expected as no arguments were passed to {{ic|pacman -Rns}}.<br />
<br />
{{Note|Since pacman version 4.2.0 only true orphans are listed. To make pacman also list packages which are only optionally required by another package, pass the {{ic|-t}}/{{ic|--unrequired}} flag twice:<br />
$ pacman -Qdttq<br />
Use this carefully, as it is not taken into account whether the package is an optional dependency and therefore bears the risk to remove packages which actually are not real orphans.}}<br />
<br />
==== Explicitly installed ====<br />
<br />
Because a lighter system is easier to maintain, occasionally looking through explicitly installed packages and ''manually'' selecting unused packages to be removed can be helpful.<br />
<br />
To list explicitly installed packages available in the official repositories:<br />
<br />
$ pacman -Qen<br />
<br />
To list explicitly installed packages not available in official repositories:<br />
<br />
$ pacman -Qem<br />
<br />
=== Removing everything but base group ===<br />
<br />
If it is ever necessary to remove all packages except the base group, try this one liner:<br />
<br />
# pacman -R $(comm -23 <(pacman -Qq|sort) <((for i in $(pacman -Qqg base); do pactree -ul $i; done)|sort -u|cut -d ' ' -f 1))<br />
<br />
The one-liner was originally devised in [https://bbs.archlinux.org/viewtopic.php?id=130176 this discussion], and later improved in this article.<br />
<br />
Notes:<br />
<br />
# {{ic|comm}} requires sorted input otherwise you get e.g. {{ic|comm: file 1 is not in sorted order}}.<br />
# {{ic|pactree}} prints the package name followed by what it provides. For example:<br />
<br />
{{hc|$ pactree -lu logrotate|<br />
logrotate<br />
popt<br />
glibc<br />
linux-api-headers<br />
tzdata<br />
dcron cron<br />
bash<br />
readline<br />
ncurses<br />
gzip}}<br />
<br />
The {{ic|dcron cron}} line seems to cause problems, that is why {{ic|cut -d ' ' -f 1}} is needed - to keep just the package name.<br />
<br />
=== Getting the dependencies list of several packages ===<br />
<br />
Dependencies are alphabetically sorted and doubles are removed.<br />
Note that you can use {{ic|pacman -Qi}} to improve response time a little. But<br />
you will not be able to query as many packages. Unfound packages are simply skipped<br />
(hence the {{ic|2>/dev/null}}).<br />
<br />
$ pacman -Si $@ 2>/dev/null | awk -F ": " -v filter="^Depends" \ '$0 ~ filter {gsub(/[>=<][^ ]*/,"",$2) ; gsub(/ +/,"\n",$2) ; print $2}' | sort -u<br />
<br />
Alternatively, you can use {{ic|expac}}: {{ic|expac -l '\n' %E -S $@ &#124; sort -u}}.<br />
<br />
=== Listing changed backup files ===<br />
<br />
If you want to backup your system configuration files you could copy all files in {{ic|/etc/}}, but usually you are only interested in the files that you have changed. Modified [[Pacnew_and_Pacsave_files#Package_backup_files|backup files]] can be viewed with the following command:<br />
<br />
# pacman -Qii | awk '/^MODIFIED/ {print $2}'<br />
<br />
Running this command with root permissions will ensure that files readable only by root (such as {{ic|/etc/sudoers}}) are included in the output.<br />
<br />
{{Tip|See [[#Listing all changed files from packages]] to list all changed files pacman knows, not only backup files.}}<br />
<br />
=== Back-up the pacman database ===<br />
<br />
The following command can be used to back up the local pacman database:<br />
<br />
$ tar -cjf pacman_database.tar.bz2 /var/lib/pacman/local<br />
<br />
Store the backup pacman database file on one or more offline media, such as a USB stick, external hard drive, or CD-R. See also [[Pacman tips#Backing up Local database with systemd]] for an alternative method.<br />
<br />
The database can be restored by moving the {{ic|pacman_database.tar.bz2}} file into the {{ic|/}} directory and executing the following command:<br />
<br />
# tar -xjvf pacman_database.tar.bz2<br />
<br />
{{Note|If the pacman database files are corrupted, and there is no backup file available, there exists some hope of rebuilding the pacman database. Consult [[Pacman tips#Restore pacman's local database]].}}<br />
<br />
==== Using systemd ====<br />
<br />
[[systemd]] can take snapshots of the pacman local database, each time it is modified.<br />
<br />
{{Tip|For a more configurable version, use: {{AUR|pakbak-git}}}}<br />
<br />
Use the following scripts, changing the value of {{ic|$pakbak}} for the backup location accordingly. The {{ic|pakbak.service}} can also automaticall be [[enable]]d on boot:<br />
<br />
{{hc|/usr/lib/systemd/scripts/pakbak_script|2=<br />
#!/bin/bash<br />
<br />
declare -r pakbak=''"/pakbak.tar.xz"''; ## set backup location<br />
tar -cJf "$pakbak" "/var/lib/pacman/local"; ## compress & store pacman local database in $pakbak<br />
}}<br />
<br />
{{hc|/usr/lib/systemd/system/pakbak.service|2=<br />
[Unit]<br />
Description=Back up pacman database<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/bin/bash /usr/lib/systemd/scripts/pakbak_script<br />
RemainAfterExit=no<br />
}}<br />
<br />
{{hc|/usr/lib/systemd/system/pakbak.path|2=<br />
[Unit]<br />
Description=Back up pacman database<br />
<br />
[Path]<br />
PathChanged=/var/lib/pacman/local<br />
Unit=pakbak.service<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
== Installation and recovery ==<br />
<br />
Alternative ways of getting and restoring packages.<br />
<br />
=== Installing packages from a CD/DVD or USB stick ===<br />
<br />
To download packages, or groups of packages:<br />
<br />
# cd ~/Packages<br />
# pacman -Syw base base-devel grub-bios xorg gimp --cachedir .<br />
# repo-add ./custom.db.tar.gz ./*<br />
<br />
Then you can burn the "Packages" folder to a CD/DVD or transfer it to a USB stick, external HDD, etc.<br />
<br />
To install:<br />
<br />
'''1.''' Mount the media:<br />
<br />
# mkdir /mnt/repo<br />
# mount /dev/sr0 /mnt/repo #For a CD/DVD.<br />
# mount /dev/sdxY /mnt/repo #For a USB stick.<br />
<br />
'''2.''' Edit {{ic|pacman.conf}} and add this repository ''before'' the other ones (e.g. extra, core, etc.). This is important. Do not just uncomment the one on the bottom. This way it ensures that the files from the CD/DVD/USB take precedence over those in the standard repositories:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
[custom]<br />
SigLevel = PackageRequired<br />
Server = file:///mnt/repo/Packages}}<br />
<br />
'''3.''' Finally, synchronize the pacman database to be able to use the new repository:<br />
<br />
# pacman -Syu<br />
<br />
=== Custom local repository ===<br />
<br />
Use the ''repo-add'' script included with Pacman to generate a database for a personal repository. Use {{ic|repo-add --help}} for more details on its usage. Simply store all of the built packages to be included in the repository in one directory, and execute the following command (where ''repo'' is the name of the custom repository):<br />
<br />
$ repo-add /path/to/repo.db.tar.gz /path/to/*.pkg.tar.xz<br />
<br />
{{Note|A package database is a tar file, optionally compressed. Valid extensions are “.db” or “.files” followed by an archive extension of “.tar”, “.tar.gz”, “.tar.bz2”, “.tar.xz”, or “.tar.Z”. The file does not need to exist, but all parent directories must exist.<br />
Furthermore when using {{ic|repo-add}} keep in mind that the database and the packages do not need to be in the same directory. But when using pacman with that database, they should be together.}}<br />
<br />
To add a new package to the database, or to replace the old version of an existing package in the database, run:<br />
<br />
$ repo-add /path/to/repo.db.tar.gz /path/to/packagetoadd-1.0-1-i686.pkg.tar.xz<br />
<br />
''repo-remove'' is used in the exact same manner as ''repo-add'', except that the packages listed on the command line are removed from the repository database.<br />
<br />
Once the local repository database has been created, add the repository to {{ic|pacman.conf}} for each system that is to use the repository. An example of a custom repository is in {{ic|pacman.conf}}. The repository's name is the database filename with the file extension omitted. In the case of the example above the repository's name would simply be ''repo''. Reference the repository's location using a {{ic|file://}} url, or via FTP using ftp://localhost/path/to/directory.<br />
<br />
If willing, add the custom repository to the [[Unofficial user repositories|list of unofficial user repositories]], so that the community can benefit from it.<br />
<br />
=== Network shared pacman cache ===<br />
<br />
If you happen to run several Arch boxes on your LAN, you can share packages so that you can greatly decrease your download times. Keep in mind you should not share between different architectures (i.e. i686 and x86_64) or you'll get into troubles.<br />
<br />
==== Read-only cache ====<br />
<br />
If you are looking for a quick and dirty solution, you can simply run a standalone webserver which other computers can use as a first mirror: {{ic|darkhttpd /var/cache/pacman/pkg}}. Just add this server at the top of your mirror list. Be aware that you might get a lot of 404 errors, due to cache misses, depending on what you do, but pacman will try the next (real) mirrors when that happens.<br />
<br />
==== Read-write cache ====<br />
<br />
{{Tip|See [[pacserve]] for an alternative (and probably simpler) solution than what follows.}}<br />
<br />
In order to share packages between multiple computers, simply share {{ic|/var/cache/pacman/}} using any network-based mount protocol. This section shows how to use shfs or sshfs to share a package cache plus the related library-directories between multiple computers on the same local network. Keep in mind that a network shared cache can be slow depending on the file-system choice, among other factors.<br />
<br />
First, install any network-supporting filesystem; for example [[sshfs]], [[shfs]], ftpfs, [[smbfs]] or [[nfs]].<br />
<br />
{{Tip|To use sshfs or shfs, consider reading [[Using SSH Keys]].}}<br />
<br />
Then, to share the actual packages, mount {{ic|/var/cache/pacman/pkg}} from the server to {{ic|/var/cache/pacman/pkg}} on every client machine.<br />
<br />
==== Dynamic reverse proxy cache using nginx ====<br />
<br />
[[nginx]] can be used to proxy requests to official upstream mirrors and cache the results to local disk. All subsequent requests for that file will be served directly from the local cache, minimizing the amount of internet traffic needed to update a large number of servers with minimal effort. <br />
<br />
In this example, we will run the cache server on {{ic|http://cache.domain.local:8080/}} and storing the packages in {{ic|/srv/http/pacman-cache/}}. <br />
<br />
Create the directory for the cache and adjust the permissions to nginx can write files to it:<br />
<br />
# mkdir /srv/http/pacman-cache<br />
# chown http:http /srv/http/pacman-cache<br />
<br />
Next, configure nginx as our dynamic cache:<br />
<br />
{{hc|/etc/nginx/nginx.conf|<nowiki><br />
http<br />
{<br />
...<br />
<br />
# Pacman Cache<br />
server<br />
{<br />
listen 8080;<br />
server_name cache.domain.local;<br />
root /srv/http/pacman-cache;<br />
autoindex on;<br />
<br />
# Requests for package db and signature files should redirect upstream<br />
# without caching<br />
location ~ \.(db|sig)$ {<br />
resolver 8.8.8.8 8.8.4.4;<br />
proxy_pass $scheme://mirrors$request_uri;<br />
}<br />
<br />
# Requests for actual packages should be served directly if available;<br />
# If not available, retrieve and save the package from an upstream<br />
# mirror.<br />
location ~ \.tar\.xz$ {<br />
try_files $uri @pkg_mirror;<br />
}<br />
<br />
# Retrieve package from upstream mirrors, cache for future requests<br />
location @pkg_mirror {<br />
resolver 8.8.8.8 8.8.4.4;<br />
proxy_store on;<br />
proxy_store_access user:rw group:rw all:r;<br />
proxy_next_upstream error timeout http_404;<br />
proxy_pass http://mirrors$request_uri;<br />
proxy_redirect off;<br />
}<br />
}<br />
<br />
# Upstream Arch Linux Mirrors - Change these to your preferred servers<br />
upstream mirrors {<br />
server mirror.rit.edu;<br />
server mirrors.acm.wpi.edu backup;<br />
server lug.mtu.edu backup;<br />
}<br />
}<br />
</nowiki>}}<br />
<br />
Finally, update your other Arch Linux servers to use this new cache by adding the following line to the {{ic|mirrorlist}} file:<br />
<br />
{{hc|/etc/pacman.d/mirrorlist|<nowiki><br />
Server = http://cache.domain.local:8080/archlinux/$repo/os/$arch<br />
...<br />
</nowiki>}}<br />
<br />
{{Warning| A limitation of this method is that you must use mirrors that use the same relative path and you must configure your cache to use the same. In this example, we are using mirrors that use the relative path {{ic|/archlinux/$repo/os/$arch}} and our cache's {{ic|Server}} setting is configured similarly.}}<br />
<br />
{{Note| You will need to create a method to clear old packages, as this directory will continue to grow over time.}}<br />
<br />
==== Synchronize pacman package cache using BitTorrent Sync ====<br />
<br />
[[BitTorrent Sync]] is a new way of synchronizing folder via network (it works in LAN and over the internet). It is peer-to-peer so you do not need to set up a server: follow the link for more information.<br />
How to share a pacman cache using BitTorrent Sync:<br />
* First install the {{AUR|btsync}} package from the AUR on the machines you want to sync<br />
* Follow the installation instructions of the AUR package or on the [[BitTorrent Sync]] wiki page <br />
** set up BitTorrent Sync to work for the root account. This process requires read/write to the pacman package cache. <br />
** make sure to set a good password on btsync's web UI <br />
** start the systemd daemon for btsync.<br />
** in the btsync Web GUI add a new synchronized folder on the first machine and generate a new Secret. Point the folder to {{ic|/var/cache/pacman/pkg}}<br />
** Add the folder on all the other machines using the same Secret to share the cached packages between all systems. Or, to set the first system as a master and the others as slaves, use the Read Only Secret. Be sure to point it to {{ic|/var/cache/pacman/pkg}}<br />
<br />
Now the machines should connect and start synchronizing their cache. Pacman works as expected even during synchronization. The process of syncing is entirely automatic.<br />
<br />
==== Preventing unwanted cache purges ====<br />
<br />
By default, {{Ic|pacman -Sc}} removes package tarballs from the cache that correspond to packages that are not installed on the machine the command was issued on. Because pacman cannot predict what packages are installed on all machines that share the cache, it will end up deleting files that should not be.<br />
<br />
To clean up the cache so that only ''outdated'' tarballs are deleted, add this entry in the {{ic|[options]}} section of {{ic|/etc/pacman.conf}}:<br />
<br />
CleanMethod = KeepCurrent<br />
<br />
=== Recreate a package from the file system ===<br />
<br />
To recreate a package from the file system, use ''bacman'' (included with pacman). Files from the system are taken as they are, hence any modifications will be present in the assembled package. Distributing the recreated package is therefore discouraged; see [[ABS]] and [[Arch Rollback Machine]] for alternatives.<br />
<br />
{{Tip|''bacman'' honours the {{ic|PACKAGER}}, {{ic|PKGDEST}} and {{ic|PKGEXT}} options from {{ic|makepkg.conf}}. Custom options for the compression tools can be configured by exporting the relevant environment variable, for example {{ic|1=XZ_OPT="-T 0"}} will enable parallel compression for ''xz''.}}<br />
<br />
An alternative tool would be {{AUR|fakepkg}}. It supports parallelization through {{Pkg|parallel}} and can handle multiple input packages in one command, which ''bacman'' both does not support.<br />
<br />
=== Backing up and retrieving a list of installed packages ===<br />
<br />
{{Tip|1=You may want to use {{AUR|pacbackup}} or [https://bbs.archlinux.org/viewtopic.php?id=200067 bacpac] to automatise the below tasks.}}<br />
<br />
It is good practice to keep periodic backups of all pacman-installed packages. In the event of a system crash which is unrecoverable by other means, pacman can then easily reinstall the very same packages onto a new installation.<br />
<br />
* First, backup the current list of non-local packages: {{ic|$ pacman -Qqen > pkglist.txt}}<br />
<br />
* Store the {{ic|pkglist.txt}} on a USB key or other convenient medium or gist.github.com or Evernote, Dropbox, etc.<br />
<br />
* Copy the {{ic|pkglist.txt}} file to the new installation, and navigate to the directory containing it.<br />
<br />
* Issue the following command to install from the backup list: {{ic|# pacman -S $(< pkglist.txt)}}<br />
<br />
In the case you have a list which was not generated like mentioned above, there may be foreign packages in it (i.e. packages not belonging to any repos you have configured, or packages from the AUR).<br />
<br />
In such a case, you may still want to install all available packages from that list:<br />
<br />
# pacman -S --needed $(comm -12 <(pacman -Slq|sort) <(sort badpkdlist) )<br />
<br />
Explanation:<br />
<br />
* {{ic|pacman -Slq}} lists all available softwares, but the list is sorted by repository first, hence the {{ic|sort}} command.<br />
* Sorted files are required in order to make the {{ic|comm}} command work.<br />
* The {{ic|-12}} parameter display lines common to both entries.<br />
* The {{ic|--needed}} switch is used to skip already installed packages.<br />
<br />
Finally, you may want to remove all the packages on your system that are not mentioned in the list.<br />
<br />
{{Warning|Use this command wisely, and always check the result prompted by pacman.}}<br />
<br />
# pacman -Rsu $(comm -23 <(pacman -Qq|sort) <(sort pkglist))<br />
<br />
=== Listing all changed files from packages ===<br />
If you are suspecting file corruption (e.g. by software / hardware failure), but don't know for sure whether / which files really got corrupted, you might want to compare with the hash sums in the packages. This can be done with the following script.<br />
<br />
The script depends on the accuracy of pacman's database in {{ic|/var/lib/pacman/local/}} and the used programs such as ''bash'', ''grep'' and so on. For recovery of the database see [[#Restore pacman's local database]]. The {{ic|mtree}} files can also be [[#Viewing a single file inside a .pkg file|extracted as {{ic|.MTREE}} from the respective package files]].<br />
<br />
{{Note|<br />
* This should '''not''' be used as is when suspecting malicious changes! In this case security precautions such as using a live medium and an independent source for the hash sums are advised.<br />
* This could take a long time, depending on the hardware and installed packages.<br />
}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash -e<br />
<br />
# Select the hash algorithm. Currently available (see mtree files and mtree(5)):<br />
# md5, sha256<br />
algo="md5"<br />
<br />
for package in /var/lib/pacman/local/*; do<br />
[ "$package" = "/var/lib/pacman/local/ALPM_DB_VERSION" ] && continue<br />
<br />
# get files and hash sums<br />
zgrep " ${algo}digest=" "$package/mtree" | grep -Ev '^\./\.[A-Z]+' | \<br />
sed 's/^\([^ ]*\).*'"${algo}"'digest=\([a-f0-9]*\).*/\1 \2/' | \<br />
while read -r file hash<br />
do<br />
# expand "\nnn" (in mtree) / "\0nnn" (for echo) escapes of ASCII<br />
# characters (octal representation)<br />
for ascii in $(grep -Eo '\\[0-9]{1,3}' <<< "$file"); do<br />
file="$(sed "s/\\$ascii/$(echo -e "\0${ascii:1}")/" <<< "$file")"<br />
done<br />
<br />
# check file hash<br />
if [ "$("${algo}sum" /"$file" | awk '{ print $1; }')" != "$hash" ]; then<br />
echo "$(basename "$package")" /"$file"<br />
fi<br />
done<br />
done<br />
</nowiki>}}<br />
<br />
=== Reinstalling all packages ===<br />
To reinstall all native packages, use:<br />
<br />
# pacman -Qenq | pacman -S -<br />
<br />
Foreign (AUR) packages must be reinstalled separately; you can list them with {{ic|pacman -Qemq}}.<br />
<br />
Pacman preserves the installation reason by default.<br />
<br />
=== Restore pacman's local database ===<br />
<br />
Signs that pacman needs a local database restoration:<br />
<br />
* {{ic|pacman -Q}} gives absolutely no output, and {{Ic|pacman -Syu}} erroneously reports that the system is up to date.<br />
* When trying to install a package using {{ic|pacman -S package}}, and it outputs a list of already satisfied dependencies.<br />
* When {{ic|testdb}} (part of {{Pkg|pacman}}) reports database inconsistency.<br />
<br />
Most likely, pacman's database of installed software, {{ic|/var/lib/pacman/local}}, has been corrupted or deleted. While this is a serious problem, it can be restored by following the instructions below.<br />
<br />
Firstly, make sure pacman's log file is present:<br />
<br />
$ ls /var/log/pacman.log<br />
<br />
If it does not exist, it is ''not'' possible to continue with this method. You may be able to use [https://bbs.archlinux.org/viewtopic.php?pid=670876 Xyne's package detection script] to recreate the database. If not, then the likely solution is to re-install the entire system.<br />
<br />
==== Generating the package recovery list ====<br />
<br />
{{Warning|If for some reason your [[pacman]] cache or [[makepkg]] package destination contain packages for other architectures, remove them before continuation.}}<br />
<br />
Run the script (optionally passing additional directories with packages as parameters):<br />
<br />
$ paclog-pkglist /var/log/pacman.log | ./pacrecover >files.list 2>pkglist.orig<br />
<br />
This way two files will be created: {{Ic|files.list}} with package files, still present on machine and {{Ic|pkglist.orig}}, packages from which should be downloaded. Later operation may result in mismatch between files of older versions of package, still present on machine, and files, found in new version. Such mismatches will have to be fixed manually.<br />
<br />
Here is a way to automatically restrict second list to packages available in a repository:<br />
<br />
$ { cat pkglist.orig; pacman -Slq; } | sort | uniq -d > pkglist<br />
<br />
Check if some important ''base'' package are missing, and add them to the list:<br />
<br />
$ comm -23 <(pacman -Sgq base) pkglist.orig >> pkglist<br />
<br />
Proceed once the contents of both lists are satisfactory, since they will be used to restore pacman's installed package database; {{ic|/var/lib/pacman/local/}}.<br />
<br />
==== Performing the recovery ====<br />
<br />
Define bash alias for recovery purposes:<br />
<br />
# recovery-pacman() {<br />
pacman "$@" \<br />
--log /dev/null \<br />
--noscriptlet \<br />
--dbonly \<br />
--force \<br />
--nodeps \<br />
--needed \<br />
#<br />
}<br />
<br />
{{ic|--log /dev/null}} allows to avoid needless pollution of pacman log, {{Ic|--needed}} will save some time by skipping packages, already present in database, {{Ic|--nodeps}} will allow installation of cached packages, even if packages being installed depend on newer versions. Rest of options will allow '''pacman''' to operate without reading/writing filesystem.<br />
<br />
Populate the sync database:<br />
<br />
# pacman -Sy<br />
<br />
Start database generation by installing locally available package files from {{ic|files.list}}:<br />
<br />
# recovery-pacman -U $(< files.list)<br />
<br />
Install the rest from {{ic|pkglist}}:<br />
<br />
# recovery-pacman -S $(< pkglist)<br />
<br />
Update the local database so that packages that are not required by any other package are marked as explicitly installed and the other as dependences. You will need be extra careful in the future when removing packages, but with the original database lost is the best we can do.<br />
<br />
# pacman -D --asdeps $(pacman -Qq)<br />
# pacman -D --asexplicit $(pacman -Qtq)<br />
<br />
Optionally check all installed packages for corruption:<br />
<br />
# pacman -Qk<br />
<br />
Optionally [[#Identify files not owned by any package]].<br />
<br />
Update all packages:<br />
<br />
# pacman -Su<br />
<br />
=== Recovering a USB key from existing install ===<br />
<br />
If you have Arch installed on a USB key and manage to mess it up (e.g. removing it while it is still being written to), then it is possible to re-install all the packages and hopefully get it back up and working again (assuming USB key is mounted in /newarch)<br />
<br />
# pacman -S $(pacman -Qq --dbpath /newarch/var/lib/pacman) --root /newarch --dbpath /newarch/var/lib/pacman<br />
<br />
=== Extracting contents of a .pkg file ===<br />
<br />
The {{ic|.pkg}} files ending in {{ic|.xz}} are simply tar'ed archives that can be decompressed with:<br />
<br />
$ tar xvf package.tar.xz<br />
<br />
If you want to extract a couple of files out of a {{ic|.pkg}} file, this would be a way to do it.<br />
<br />
=== Viewing a single file inside a .pkg file ===<br />
<br />
For example, if you want to see the contents of {{ic|/etc/systemd/logind.conf}} supplied within the {{Pkg|systemd}} package:<br />
<br />
$ tar -xOf /var/cache/pacman/pkg/systemd-204-3-x86_64.pkg.tar.xz etc/systemd/logind.conf<br />
<br />
Or you can use {{pkg|vim}}, then browse the archive:<br />
<br />
$ vim /var/cache/pacman/pkg/systemd-204-3-x86_64.pkg.tar.xz<br />
<br />
=== Find applications that use libraries from older packages ===<br />
<br />
Even if you installed a package the existing long-running programs (like daemons and servers) still keep using code from old package libraries. And it is a bad idea to let these programs running if the old library contains a security bug.<br />
<br />
Here is a way how to find all the programs that use old packages code:<br />
<br />
# lsof +c 0 | grep -w DEL | awk '1 { print $1 ": " $NF }' | sort -u<br />
It will print running program name and old library that was removed or replaced with newer content.<br />
<br />
== Performance ==<br />
<br />
=== Database access speeds ===<br />
<br />
Pacman stores all package information in a collection of small files, one for each package. Improving database access speeds reduces the time taken in database-related tasks, e.g. searching packages and resolving package dependencies. The safest and easiest method is to run as root:<br />
<br />
# pacman-optimize<br />
<br />
This will attempt to put all the small files together in one (physical) location on the hard disk so that the hard disk head does not have to move so much when accessing all the data. This method is safe, but is not foolproof: it depends on your filesystem, disk usage and empty space fragmentation. Another, more aggressive, option would be to first remove uninstalled packages from cache and to remove unused repositories before database optimization:<br />
<br />
# pacman -Sc && pacman-optimize<br />
<br />
=== Download speeds ===<br />
<br />
{{Note|If your download speeds have been reduced to a crawl, ensure you are using one of the many [[mirrors]] and not ftp.archlinux.org, which is [https://www.archlinux.org/news/302/ throttled since March 2007].}}<br />
<br />
When downloading packages pacman uses the mirrors in the order they are in {{ic|/etc/pacman.d/mirrorlist}}. The mirror which is at the top of the list by default however may not be the fastest for you. To select a faster mirror, see [[Mirrors]].<br />
<br />
Pacman's speed in downloading packages can also be improved by using a different application to download packages, instead of Pacman's built-in file downloader.<br />
<br />
In all cases, make sure you have the latest Pacman before doing any modifications.<br />
<br />
# pacman -Syu<br />
<br />
==== Powerpill ====<br />
<br />
Powerpill is a full wrapper for Pacman that uses parallel and segmented downloads to speed up the download process. Normally Pacman will download one package at a time, waiting for it to complete before beginning the next download. Powerpill takes a different approach: it tries to download as many packages as possible at once.<br />
<br />
The [[Powerpill|Powerpill wiki page]] provides basic configuration and usage examples along with package and upstream links.<br />
<br />
==== wget ====<br />
<br />
This is also very handy if you need more powerful proxy settings than pacman's built-in capabilities. <br />
<br />
To use {{ic|wget}}, first [[install]] the {{Pkg|wget}} package then modify {{ic|/etc/pacman.conf}} by uncommenting the following line in the {{ic|[options]}} section:<br />
<br />
XferCommand = /usr/bin/wget -c -q --show-progress --passive-ftp -O %o %u<br />
<br />
Instead of uncommenting the {{ic|wget}} parameters in {{ic|/etc/pacman.conf}}, you can also modify the {{ic|wget}} configuration file directly (the system-wide file is {{ic|/etc/wgetrc}}, per user files are {{ic|$HOME/.wgetrc}}.<br />
<br />
==== aria2 ====<br />
<br />
[[aria2]] is a lightweight download utility with support for resumable and segmented HTTP/HTTPS and FTP downloads. aria2 allows for multiple and simultaneous HTTP/HTTPS and FTP connections to an Arch mirror, which should result in an increase in download speeds for both file and package retrieval.<br />
<br />
{{Note|Using aria2c in Pacman's XferCommand will '''not''' result in parallel downloads of multiple packages. Pacman invokes the XferCommand with a single package at a time and waits for it to complete before invoking the next. To download multiple packages in parallel, see the [[#Using_Powerpill|powerpill]] section above.}}<br />
<br />
Install {{Pkg|aria2}}, then edit {{ic|/etc/pacman.conf}} by adding the following line to the {{ic|[options]}} section:<br />
<br />
XferCommand = /usr/bin/aria2c --allow-overwrite=true --continue=true --file-allocation=none --log-level=error --max-tries=2 --max-connection-per-server=2 --max-file-not-found=5 --min-split-size=5M --no-conf --remote-time=true --summary-interval=60 --timeout=5 --dir=/ --out %o %u<br />
<br />
{{Tip|1=[https://bbs.archlinux.org/viewtopic.php?pid=1491879#p1491879 This alternative configuration for using pacman with aria2] tries to simplify configuration and adds more configuration options.}}<br />
<br />
See [http://aria2.sourceforge.net/manual/en/html/aria2c.html#options OPTIONS] in {{ic|man aria2c}} for used aria2c options.<br />
<br />
{{ic|-d, --dir}}<br />
:The directory to store the downloaded file(s) as specified by [[pacman]].<br />
<br />
{{ic|-o, --out}}<br />
:The output file name(s) of the downloaded file(s). <br />
<br />
{{ic|%o}}<br />
:Variable which represents the local filename(s) as specified by pacman.<br />
<br />
{{ic|%u}}<br />
:Variable which represents the download URL as specified by pacman.<br />
<br />
==== Other applications ====<br />
<br />
There are other downloading applications that you can use with Pacman. Here they are, and their associated XferCommand settings:<br />
<br />
* {{ic|snarf}}: {{ic|1=XferCommand = /usr/bin/snarf -N %u}}<br />
* {{ic|lftp}}: {{ic|1=XferCommand = /usr/bin/lftp -c pget %u}}<br />
* {{ic|axel}}: {{ic|1=XferCommand = /usr/bin/axel -n 2 -v -a -o %o %u}}</div>Slashhttps://wiki.archlinux.org/index.php?title=VCS_package_guidelines&diff=49018VCS package guidelines2008-09-07T18:10:19Z<p>Slash: Changed git-pull to git pull</p>
<hr />
<div>[[Category:Package management (English)]]<br />
[[Category:Development (English)]]<br />
[[Category:Package development (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
:''This is actually very easy and doesn't require any special knowledge. However, the more you know about cvs and svn the easier it is. Many people introduce custom variables into the PKGBUILD that can overcomplicate things. These are not ''really'' necessary but do help to clarify the syntax of the cvs/svn/git commands, which can appear quite complex.''<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Arch CVS %26 SVN PKGBUILD guidelines}}<br />
{{i18n_entry|繁體中文|Arch CVS %26 SVN PKGBUILD 編寫指南}}<br />
{{i18n_entry|简体中文|Arch CVS %26 SVN %26 GIT PKGBUILD 编写指南}}<br />
{{i18n_links_end}}<br />
<br />
<br />
==A few tips==<br />
<br />
* Suffix <code>pkgname</code> with <code>-cvs</code> or <code>-svn</code> or <code>-git</code> where applicable - this prevents confusion with non-development versions e.g. fluxbox-svn or fvwm-cvs vs fluxbox and fvwm.<br />
* When makepkg is run it will check for newer revisions and then bump pkgver to the latest. If this is not what you want see the --holdver in [http://www.archlinux.org/pacman/makepkg.8.html man makepkg]<br />
* You must also be careful about pacman conflicts. For example fluxbox-svn will conflict with fluxbox. In this case you need to use the <tt>conflicts=</tt> field<br />
conflicts=('fluxbox')<br />
: You should also use the <tt>provides=</tt> field so that pkgs that require fluxbox to be installed recognize your fluxbox-svn pkg as fluxbox<br />
provides=('fluxbox')<br />
: You should AVOID using <tt>replaces=</tt> it generally causes unnecessary problems<br />
*When using/defining the cvsroot use anonymous<b>:</b>@ rather than anonymous@ to avoid having to press enter to give blank password ''OR'' anonymous<b>:password</b>@ - if a password is required.<br />
* cvs and svn PKGBUILDs may not require a source or md5sum array but these fields '''must''' be included in the PKGBUILD if you wish to submit it to the AUR, otherwise the pkg will be rejected. They may be left blank though.<br />
<pre>source=()<br />
md5sums=()</pre><br />
* It is rarely necessary to use the pkgrel field when building CVS/SVN/GIT pkgs - any changes to the pkg will often be on another day and so are usually accounted for by a change in pkgver (assuming pkgver is used to hold a date format)<br />
* don't forget to include cvs or subversion in <code>makedepends=</code> as necessary<br />
* to preserve the integrity of the checked out code it is usually possible to build in a separate build dir e.g. having checked out source code to src/$_cvsmod from $startdir you can use:<br />
<pre> mkdir src/$_cvsmod-build<br />
<br />
cd src/$_cvsmod-build<br />
../$_cvsmod/configure</pre><br />
''OR'' if that fails you can try:<br />
<pre> cp -r src/$_cvsmod src/$_cvsmod-build<br />
cd src/$_cvsmod-build</pre><br />
<br />
* With the introduction of the AUR it is most important to avoid using backtick execution to create pkg variables<br />
** For cvs pkgs you should avoid <code>pkgver=`date +%y%m%d`</code> - this also interferes with the functionality of the AUR. Instead it is still possible to use a date format for the $pkgver variable and to use the cvs -D option to check out code from that date (see below)<br />
** For svn you can use the revision number. An easy way to find the revision number is to use the following command:<br />
svn log $_svntrunk --limit 1 | sed -e '/^r/!d' -e 's/^r\([0-9]\+\) .*/\1/;q'<br />
That command grabs the most recent log entry from the svn repo and finds the revision number, which is prefixed with an r. This is from the fluxbox svn log, the revision number is in the top left, r4084<br />
<pre><br />
------------------------------------------------------------------------<br />
r4084 | mathias | 2005-07-20 19:29:01 +0100 (Wed, 20 Jul 2005) | 16 lines<br />
<br />
Changed some *Focus options, just to make some things a bit more clear.<br />
the "Sloppy" was always a bit .. imprecise.<br />
</pre><br />
<br />
==Example CVS PKGBUILD==<br />
<br />
Here is a PKGBUILD for bmp-cvs that utilizes some of the tips above<br />
<br />
<pre># Contributor: Lukas Sabota <punkrockguy318@comcast.net><br />
# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org<br />
arch=(i686 x86_64)<br />
pkgname=bmp-cvs<br />
pkgver=20050728<br />
pkgrel=1<br />
pkgdesc="A multimedia player that uses the WinAmp 2.x UI, GTK2, and is based on XMMS. This will checkout and package the latest CVS version."<br />
url="http://beepmp.sourceforge.net/"<br />
license=<br />
depends=('gtk2' 'libvorbis' 'alsa-lib' 'audiofile' 'libglade' 'id3lib' 'x-server')<br />
provides=('bmp')<br />
conflicts=('bmp')<br />
makedepends=('cvs')<br />
install=$pkgname.install<br />
<br />
_cvsroot=":pserver:anonymous:@cvs.sourceforge.net:/cvsroot/beepmp"<br />
_cvsmod="bmp"<br />
<br />
build() {<br />
cd $startdir/src<br />
msg "Connecting to $_cvsmod.sourceforge.net CVS server...."<br />
if [ -d $_cvsmod/CVS ]; then<br />
cd $_cvsmod<br />
cvs -z3 update -d<br />
else<br />
cvs -z3 -d $_cvsroot co -D $pkgver -f $_cvsmod<br />
cd $_cvsmod<br />
fi<br />
./autogen.sh<br />
<br />
msg "CVS checkout done or server timeout"<br />
msg "Starting make..."<br />
<br />
cp -r ../$_cvsmod ../$_cvsmod-build<br />
cd ../$_cvsmod-build<br />
<br />
./configure --prefix=/usr<br />
make || return 1<br />
make DESTDIR=$startdir/pkg install || return 1<br />
<br />
mkdir -p $startdir/pkg/usr/share/xmms/Skins<br />
mv $startdir/pkg/usr/share/bmp/Skins/* $startdir/pkg/usr/share/xmms/Skins<br />
rmdir $startdir/pkg/usr/share/bmp/Skins<br />
<br />
rm -r $startdir/src/$_cvsmod-build<br />
}<br />
# vim:syntax=sh<br />
</pre><br />
<br />
==Example SVN PKGBUILD==<br />
<br />
If you use the <tt>source</tt> command on the PKGBUILD first it will store the _svntrunk and _svnmod variables. So if you run :<br />
source PKGBUILD<br />
svn info $_svntrunk<br />
you can get the revision number(Or,Last Changed Rev) which can be used in pkgver<br />
<br />
<pre><br />
# Contributor: Lukas Sabota <punkrockguy318@comcast.net><br />
# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org<br />
arch=(i686 x86_64)<br />
pkgname=fluxbox-svn<br />
pkgver=4084<br />
pkgrel=1<br />
pkgdesc="the bleeding edge version of a lightweight yet \<br />
customizable windowmanager for X"<br />
url="http://www.fluxbox.org"<br />
license=('GPL')<br />
<br />
depends=('bash' 'x-server')<br />
makedepends=('subversion')<br />
conflicts=('blackbox' 'fluxbox' 'fluxbox-devel' 'fluxbox-cvs')<br />
provides=('fluxbox')<br />
<br />
source=()<br />
md5sums=()<br />
<br />
_svntrunk=svn://svn.berlios.de/fluxbox/trunk<br />
_svnmod=fluxbox<br />
<br />
build() {<br />
cd $startdir/src<br />
<br />
if [ -d $_svnmod/.svn ]; then<br />
(cd $_svnmod && svn up -r $pkgver)<br />
else<br />
svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod<br />
fi<br />
<br />
msg "SVN checkout done or server timeout"<br />
msg "Starting make..."<br />
<br />
cp -r $_svnmod $_svnmod-build<br />
cd $_svnmod-build<br />
<br />
./autogen.sh<br />
<br />
# fix for crap fb issue<br />
mkdir data<br />
cp ../$_svnmod/data/keys data/<br />
<br />
./configure --prefix=/usr --enable-xinerama --enable-imlib2 --enable-debug<br />
make || return 1<br />
make DESTDIR=$startdir/pkg/ install<br />
<br />
rm -rf $startdir/src/$_svnmod-build<br />
}<br />
# vim:syntax=sh</pre><br />
<br />
==Example GIT PKGBUILD==<br />
<br />
<pre><br />
arch=(i686 x86_64)<br />
pkgname=compiz-git<br />
pkgver=20060707<br />
pkgrel=1<br />
pkgdesc="Composite and window manager for Xgl"<br />
url="http://en.opensuse.org/Compiz"<br />
license=""<br />
depends=('xgl-cvs' 'mesa-xgl-cvs' 'cairo-devel' 'libxevie' \<br />
'startup-notification' 'libpng' 'libxdamage' \<br />
'libxrandr' 'libwnck-compiz' 'gnome-desktop' 'control-center' \<br />
'libsvg-cairo' 'libxcomposite')<br />
makedepends=('git')<br />
conflicts=()<br />
replaces=()<br />
backup=()<br />
install=compiz.install<br />
source=(compiz-intel-copy-pixel-issue-workaround-1.diff)<br />
md5sums=('10a157b86d528bca2be6731c5eaff7b3')<br />
<br />
_gitroot="git://anongit.freedesktop.org/git/xorg/app/compiz"<br />
_gitname="compiz"<br />
build() {<br />
export CFLAGS="$CFLAGS -I/opt/mesa-xgl-cvs/include"<br />
cd $startdir/src<br />
msg "Connecting to git.freedesktop.org GIT server...."<br />
<br />
if [ -d $startdir/src/$_gitname ] ; then<br />
cd $_gitname && git pull origin<br />
msg "The local files are updated."<br />
else<br />
git clone $_gitroot<br />
fi<br />
<br />
msg "GIT checkout done or server timeout"<br />
msg "Starting make..."<br />
<br />
cp -r $startdir/src/$_gitname $startdir/src/$_gitname-build<br />
cd $startdir/src/$_gitname-build<br />
patch -Np0 -i ${startdir}/src/compiz-intel-copy-pixel-issue-workaround-1.diff<br />
<br />
ACLOCAL="aclocal -I /opt/gnome/share/aclocal" ./autogen.sh --host=${CHOST} \<br />
--prefix=/usr \<br />
--infodir=/usr/share/info \<br />
--mandir=/usr/man \<br />
--sysconfdir=/opt/gnome/etc \<br />
--enable-gnome \<br />
--enable-libsvg-cairo \<br />
--enable-gconf-dump \<br />
--disable-kde || return 1<br />
make || return 1<br />
make DESTDIR=$startdir/pkg install<br />
<br />
find $startdir/pkg -type f -name '*.la' -exec rm {} \;<br />
} <br />
</pre><br />
As you see, I use "-git" suffix in the pkgname, and two variables, _gitroot and _gitname for identify the repositories and the name of the package.<br />
I need to introduce an if condition: <br />
<pre><br />
if [ -d $startdir/src/$_gitname ] ; then<br />
cd $_gitname && git pull origin<br />
msg "The local files are updated."<br />
else<br />
git clone $_gitroot<br />
fi<br />
</pre><br />
because we have two commands, one for updating source and one for getting it. I copy the source code in a "-build" directory ( the same thing that we do with -cvs and -svn program ).<br />
<br />
==Example darcs PKGBUILD==<br />
<pre><br />
pkgname=psi-darcs<br />
pkgver=20070404<br />
pkgrel=2<br />
pkgdesc="Psi - Jabber client (with SSL support) darcs version"<br />
makedepends=('darcs' 'qt4>=4.2')<br />
depends=('qt4>=4.2' 'openssl' 'libxss' 'cyrus-sasl' 'aspell') <br />
source=()<br />
conflicts=('psi')<br />
provides=('psi')<br />
url="http://psi-im.org/"<br />
md5sums=()<br />
<br />
_darcsmod="psi"<br />
_darcstrunk="http://dev.psi-im.org/darcs"<br />
<br />
build() {<br />
cd $startdir/src/<br />
# Erasing previous build<br />
msg "Checking for previous build"<br />
# get the sources<br />
if [[ -d $_darcsmod/_darcs ]]<br />
then<br />
msg "Retrieving missing patches"<br />
cd $_darcsmod<br />
darcs pull -a $_darcstrunk/$_darcsmod<br />
else<br />
msg "Retrieving complete sources"<br />
darcs get --partial --set-scripts-executable $_darcstrunk/$_darcsmod<br />
cd $_darcsmod<br />
fi<br />
<br />
. /etc/profile.d/qt4.sh<br />
export PATH=$QTDIR/bin:$PATH<br />
<br />
# building<br />
msg "Starting build"<br />
./configure --prefix=/usr --disable-xmms<br />
make || return 1<br />
make INSTALL_ROOT=$startdir/pkg install<br />
}<br />
</pre><br />
<br />
==rc-script PROTO==<br />
<pre><br />
#!/bin/bash<br />
<br />
daemon_name=DAEMON_NAME<br />
<br />
. /etc/rc.d/functions<br />
<br />
. /etc/conf.d/$daemon_name.conf<br />
<br />
. /etc/rc.conf<br />
<br />
get_pid() {<br />
pidof $daemon_name<br />
}<br />
<br />
case "$1" in<br />
start)<br />
stat_busy "Starting $daemon_name daemon"<br />
<br />
PID=`get_pid`<br />
if [ -z "$PID" ]; then<br />
[ -f /var/run/$daemon_name.pid ] && rm -f /var/run/$daemon_name.pid<br />
# RUN<br />
$daemon_name<br />
#<br />
if [ $? -gt 0 ]; then<br />
stat_fail<br />
exit 1<br />
else<br />
echo `get_pid` > /var/run/$daemon_name.pid<br />
add_daemon $daemon_name<br />
stat_done<br />
fi<br />
else<br />
stat_fail<br />
exit 1<br />
fi<br />
;;<br />
<br />
stop)<br />
stat_busy "Stopping $daemon_name daemon"<br />
PID=`get_pid`<br />
# KILL<br />
[ ! -z "$PID" ] && kill $PID &> /dev/null<br />
#<br />
if [ $? -gt 0 ]; then<br />
stat_fail<br />
exit 1<br />
else<br />
rm -f /var/run/$daemon_name.pid &> /dev/null<br />
rm_daemon $daemon_name<br />
stat_done<br />
fi<br />
;;<br />
<br />
restart)<br />
$0 stop<br />
sleep 3<br />
$0 start<br />
;;<br />
*)<br />
echo "usage: $0 {start|stop|restart}"<br />
esac<br />
exit 0<br />
</pre><br />
<br />
== Useful Links ==<br />
<br />
* [[The Arch package making HOW-TO - with guidelines]]<br />
* [http://aur.archlinux.org AUR]<br />
* [[ABS_-_The_Arch_Build_System | ABS - The Arch Build System]]<br />
* [[ABS PKGBUILD Explained]]<br />
* [[Makepkg]]</div>Slashhttps://wiki.archlinux.org/index.php?title=AUR_Cleanup_Day/2010&diff=40952AUR Cleanup Day/20102008-05-07T21:40:58Z<p>Slash: removed timestamp poops</p>
<hr />
<div>The AUR has a large number of obsolete packages which could use cleaning up. Examples of packages that may be cleaned up are:<br />
*packages that have been renamed or replaced<br />
*old and unmaintained developmental (cvs/svn/etc) packages<br />
<br />
Post suggestions of packages on this pages. Trusted Users will get together and go though the list in a couple of weeks and confirm which packages should be removed. '''Please DO NOT REMOVE suggestions from the wiki page but add a comment on why it should be kept instead.''' TUs will not delete any useful package.<br />
<br />
==Package List==<br />
* [http://aur.archlinux.org/packages.php?ID=2787 9base-devel] - Hasn't been update since 25/12/2005. I think its not needed.<br />
* [http://aur.archlinux.org/packages.php?ID=12840 abraca-hg] - Replaced by abraca-git<br />
* [http://aur.archlinux.org/packages.php?ID=7086 alienarena2007] - Replaced by alienarena<br />
* [http://aur.archlinux.org/packages.php?ID=573 amavisd-new] - old version, won't compile, maintainer don't answare for e-mails (I have made new package [http://aur.archlinux.org/packages.php?ID=14650 amavisdnew])<br />
* [http://aur.archlinux.org/packages.php?ID=3194 azrael] - dead project, does not compile<br />
* [http://aur.archlinux.org/packages.php?ID=1404 cdrtools-dvd] - Outdated, replaced by [http://aur.archlinux.org/packages.php?ID=323 cdrtools] or [http://www.archlinux.org/packages/search/?q=cdrkit cdrkit], maintainer's e-mail address is not valid<br />
* [http://aur.archlinux.org/packages.php?ID=1727 creapkg] - web site no longer exists<br />
* [http://aur.archlinux.org/packages.php?ID=1308 dx9wine] - contains a patch not needed anymore<br />
* [http://aur.archlinux.org/packages.php?ID=4493 eclipse-kde] - Dead<br />
* [http://aur.archlinux.org/packages.php?ID=13227 ethereal] - Renamed to wireshark, available in extra<br />
* [http://aur.archlinux.org/packages.php?ID=7259 firefox2-ca] - firefox2 is depreciated.<br />
* [http://aur.archlinux.org/packages.php?ID=10229 flumotion] - removed from community a year ago, orphan and 1 year out of date without any complain.<br />
* [http://aur.archlinux.org/packages.php?ID=1790 fusesmb] or [http://aur.archlinux.org/packages.php?ID=14475 fusesmb2] - duplicate (and both outdated, version 8.7 is available)<br />
* [http://aur.archlinux.org/packages.php?ID=13063 fftw2single] - part of fftw2 from [extra]<br />
* [http://aur.archlinux.org/packages.php?ID=12045 freeciv-beta-svn] - Outdated svn beta for version 2.1, stable 2.1 version already in Extra. Replaced by freeciv-svn<br />
* [http://aur.archlinux.org/packages.php?ID=6054 gaim-openq-2006] - Old plugin for gaim that has since been merged into pidgin source<br />
* [http://aur.archlinux.org/packages.php?ID=13589 gimp-freetype] - This plugin was developed for gimp 2.0 and is not needed according to the notes [http://ftp.gwdg.de/pub/misc/grafik/gimp/gimp/plug-ins/v2.0/freetype/ here.]<br />
* [http://aur.archlinux.org/packages.php?ID=6823 gimp-resynth] or [http://aur.archlinux.org/packages.php?ID=12273 gimp-plugin-resynthesizer] - duplicate (best to keep latter)<br />
* [http://aur.archlinux.org/packages.php?ID=3754 gnash-cvs] - Hasn't been update since 18/11/2006. gnash is in extra now too.<br />
** Does the project still use CVS? If so, then this package is useful. --[[User:Slash|Slash]] <br />
* gmpc*-svn - replaced by git<br />
* [http://aur.archlinux.org/packages.php?ID=6845 guifications-gaim2] - Outdated beta version, a current version is in community.<br />
* [http://aur.archlinux.org/packages.php?ID=3689 ii-hg] - outdated, probably discontinued as the project website isn't available anymore (moved maybe?)<br />
* [http://aur.archlinux.org/packages.php?ID=7488 ionice] - part of util-linux-ng<br />
* [http://aur.archlinux.org/packages.php?ID=7037 kanola] - probably dead project, didn't went past the 0.0.1 release since 2006<br />
* [http://aur.archlinux.org/packages.php?ID=8231 kdelibs-noarts] - out-of-date, modified official package<br />
* [http://aur.archlinux.org/packages.php?ID=12581 kdenlive 0.5_1-1] - out-of-date, doesn't compile<br />
** Latest stable version is 0.5, last updated in AUR on Sun, 09 Mar 2008 --[[User:Doc Angelo|Doc Angelo]]<br />
** It's not even out of date, nor duplicate of another package – 6xx<br />
* [http://aur.archlinux.org/packages.php?ID=6296 kernel26thinkpad] - obsolete, out of date since 2006<br />
* [http://aur.archlinux.org/packages.php?ID=10305 linux-uvc-isight] and [http://aur.archlinux.org/packages.php?ID=13687 linux-uvc-isight-svn] - Outdated, [http://aur.archlinux.org/packages.php?ID=6906 linux-uvc-svn] does the same thing<br />
* [http://aur.archlinux.org/packages.php?ID=3610 lmms-cvs] - Orphan, outdated, and project switched to svn.<br />
* [http://aur.archlinux.org/packages.php?ID=16295 nautilus-open-terminal-gianvito 0.9-1] - not needed anymore since original version update to 0.9<br />
* [http://aur.archlinux.org/packages.php?ID=5408 mlame] - just a small bash script, no project page, could be moved to the wiki maybe<br />
* [http://aur.archlinux.org/packages.php?ID=10526 moaceyahoo] - Dead project. Will post new one, someday.<br />
* [http://aur.archlinux.org/packages.php?ID=2700 mutt-cvs] - mutt switched to mercurial a while back; way outdated anyway.<br />
* [http://aur.archlinux.org/packages.php?ID=12051 netscape-navigator] - Not supported upstream anymore making it vulnerable to security issues.<br />
** Can be used for web development – 6xx<br />
* [http://aur.archlinux.org/packages.php?ID=15312 openssh-snapshot] - Not needed anymore<br />
* [http://aur.archlinux.org/packages.php?ID=12193 pidgin-xfire] - Broke; Replaced by [http://aur.archlinux.org/packages.php?ID=16776 pidgin-gfire].<br />
* [http://aur.archlinux.org/packages.php?ID=10514 rt61-cvs] - This driver is included in linus's tree and is therefore obsolete<br />
* [http://aur.archlinux.org/packages.php?ID=494 sonic-rainbow] - dead project, does not compile<br />
* [http://aur.archlinux.org/packages.php?ID=2612 stepmania-bin] - orphan, replaced by [http://aur.archlinux.org/packages.php?ID=5453 stepmania]<br />
* [http://aur.archlinux.org/packages.php?ID=15910 tar-fixed] - This bug is verified fixed in tar 1.20<br />
* [http://aur.archlinux.org/packages.php?ID=13622 wicd-svn] - Outdated, wicd on repository extra is newer.<br />
** Does the project still use SVN? If so, then this package is useful. --[[User:Slash|Slash]] <br />
* [http://aur.archlinux.org/packages.php?ID=8958 wildfire] - Replaced by openfire.<br />
* [http://aur.archlinux.org/packages.php?ID=647 ximian-openoffice] - Ximian port of OpenOffice 1.x. Users should use the more secure OpenOffice 2.x. Also Ximian openoffice is what is now known as ooo-build.<br />
<br />
==Remove from Filesystem==<br />
<br />
This is a list of files on the AUR filesystem that have been created when poorly formed packages were uploaded. This is a secondary consideration.<br />
<br />
<pre><br />
/packages/0verkill-0.16.tar.gz/<br />
/packages/2007.02.17-2/<br />
/packages/abakus-0.91-1/<br />
/packages/abakus-0.91.tar.gz/<br />
/packages/abakus-0.91/<br />
/packages/akgregator/<br />
/packages/akregator/<br />
/packages/akregator1.0.2/<br />
/packages/akregator_1.0.2/<br />
/packages/amsn-0.97ec1/<br />
/packages/amsn-0.97rc1/<br />
/packages/amsn-097rc1-1/<br />
/packages/amsn-097rc1/<br />
/packages/amsn-cvs/<br />
/packages/amsn-svn_update/<br />
/packages/amsn096/<br />
/packages/amsn096rc1/<br />
/packages/bashstyle-5.0<br />
/packages/bashstyle-5.0rc1.tar.gz/<br />
/packages/bashstyle-5.0rc1.tar.gz1/<br />
/packages/bashstyle-5.0rc1/<br />
/packages/bashstyle.tar.gz/<br />
/packages/bashstyle-ng/<br />
/packages/bashstyle1/<br />
/packages/braero-svn<br />
/packages/braser-cvs/<br />
/packages/brasero-cvs/<br />
/packages/brasero.svn/<br />
/packages/brlcad-cvs/<br />
/packages/ccd2iso-0.3/<br />
/packages/cdcollect-0.6.0/<br />
/packages/centerim-4.22.2/<br />
/packages/centerim/<br />
/packages/ploticus-test/<br />
/packages/test-louipc/<br />
/packages/test/<br />
/packages/test_pkg/<br />
/packages/yacas-1.1.17-2/<br />
/packages/yacas-1.2.2/<br />
/packages/yacas-1.17-2/<br />
/packages/yacas-new/<br />
/packages/yacasnew/<br />
/packages/zzztest/<br />
/packages/zzzztest/<br />
</pre></div>Slashhttps://wiki.archlinux.org/index.php?title=AUR_Cleanup_Day/2010&diff=40951AUR Cleanup Day/20102008-05-07T21:40:16Z<p>Slash: SVN/CVS PKGBUILD notes- If the project still uses the same repo, the PKGBUILD should be kept</p>
<hr />
<div>The AUR has a large number of obsolete packages which could use cleaning up. Examples of packages that may be cleaned up are:<br />
*packages that have been renamed or replaced<br />
*old and unmaintained developmental (cvs/svn/etc) packages<br />
<br />
Post suggestions of packages on this pages. Trusted Users will get together and go though the list in a couple of weeks and confirm which packages should be removed. '''Please DO NOT REMOVE suggestions from the wiki page but add a comment on why it should be kept instead.''' TUs will not delete any useful package.<br />
<br />
==Package List==<br />
* [http://aur.archlinux.org/packages.php?ID=2787 9base-devel] - Hasn't been update since 25/12/2005. I think its not needed.<br />
* [http://aur.archlinux.org/packages.php?ID=12840 abraca-hg] - Replaced by abraca-git<br />
* [http://aur.archlinux.org/packages.php?ID=7086 alienarena2007] - Replaced by alienarena<br />
* [http://aur.archlinux.org/packages.php?ID=573 amavisd-new] - old version, won't compile, maintainer don't answare for e-mails (I have made new package [http://aur.archlinux.org/packages.php?ID=14650 amavisdnew])<br />
* [http://aur.archlinux.org/packages.php?ID=3194 azrael] - dead project, does not compile<br />
* [http://aur.archlinux.org/packages.php?ID=1404 cdrtools-dvd] - Outdated, replaced by [http://aur.archlinux.org/packages.php?ID=323 cdrtools] or [http://www.archlinux.org/packages/search/?q=cdrkit cdrkit], maintainer's e-mail address is not valid<br />
* [http://aur.archlinux.org/packages.php?ID=1727 creapkg] - web site no longer exists<br />
* [http://aur.archlinux.org/packages.php?ID=1308 dx9wine] - contains a patch not needed anymore<br />
* [http://aur.archlinux.org/packages.php?ID=4493 eclipse-kde] - Dead<br />
* [http://aur.archlinux.org/packages.php?ID=13227 ethereal] - Renamed to wireshark, available in extra<br />
* [http://aur.archlinux.org/packages.php?ID=7259 firefox2-ca] - firefox2 is depreciated.<br />
* [http://aur.archlinux.org/packages.php?ID=10229 flumotion] - removed from community a year ago, orphan and 1 year out of date without any complain.<br />
* [http://aur.archlinux.org/packages.php?ID=1790 fusesmb] or [http://aur.archlinux.org/packages.php?ID=14475 fusesmb2] - duplicate (and both outdated, version 8.7 is available)<br />
* [http://aur.archlinux.org/packages.php?ID=13063 fftw2single] - part of fftw2 from [extra]<br />
* [http://aur.archlinux.org/packages.php?ID=12045 freeciv-beta-svn] - Outdated svn beta for version 2.1, stable 2.1 version already in Extra. Replaced by freeciv-svn<br />
* [http://aur.archlinux.org/packages.php?ID=6054 gaim-openq-2006] - Old plugin for gaim that has since been merged into pidgin source<br />
* [http://aur.archlinux.org/packages.php?ID=13589 gimp-freetype] - This plugin was developed for gimp 2.0 and is not needed according to the notes [http://ftp.gwdg.de/pub/misc/grafik/gimp/gimp/plug-ins/v2.0/freetype/ here.]<br />
* [http://aur.archlinux.org/packages.php?ID=6823 gimp-resynth] or [http://aur.archlinux.org/packages.php?ID=12273 gimp-plugin-resynthesizer] - duplicate (best to keep latter)<br />
* [http://aur.archlinux.org/packages.php?ID=3754 gnash-cvs] - Hasn't been update since 18/11/2006. gnash is in extra now too.<br />
** Does the project still use CVS? If so, then this package is useful. --[[User:Slash|Slash]] 17:40, 7 May 2008 (EDT)<br />
* gmpc*-svn - replaced by git<br />
* [http://aur.archlinux.org/packages.php?ID=6845 guifications-gaim2] - Outdated beta version, a current version is in community.<br />
* [http://aur.archlinux.org/packages.php?ID=3689 ii-hg] - outdated, probably discontinued as the project website isn't available anymore (moved maybe?)<br />
* [http://aur.archlinux.org/packages.php?ID=7488 ionice] - part of util-linux-ng<br />
* [http://aur.archlinux.org/packages.php?ID=7037 kanola] - probably dead project, didn't went past the 0.0.1 release since 2006<br />
* [http://aur.archlinux.org/packages.php?ID=8231 kdelibs-noarts] - out-of-date, modified official package<br />
* [http://aur.archlinux.org/packages.php?ID=12581 kdenlive 0.5_1-1] - out-of-date, doesn't compile<br />
** Latest stable version is 0.5, last updated in AUR on Sun, 09 Mar 2008 --[[User:Doc Angelo|Doc Angelo]]<br />
** It's not even out of date, nor duplicate of another package – 6xx<br />
* [http://aur.archlinux.org/packages.php?ID=6296 kernel26thinkpad] - obsolete, out of date since 2006<br />
* [http://aur.archlinux.org/packages.php?ID=10305 linux-uvc-isight] and [http://aur.archlinux.org/packages.php?ID=13687 linux-uvc-isight-svn] - Outdated, [http://aur.archlinux.org/packages.php?ID=6906 linux-uvc-svn] does the same thing<br />
* [http://aur.archlinux.org/packages.php?ID=3610 lmms-cvs] - Orphan, outdated, and project switched to svn.<br />
* [http://aur.archlinux.org/packages.php?ID=16295 nautilus-open-terminal-gianvito 0.9-1] - not needed anymore since original version update to 0.9<br />
* [http://aur.archlinux.org/packages.php?ID=5408 mlame] - just a small bash script, no project page, could be moved to the wiki maybe<br />
* [http://aur.archlinux.org/packages.php?ID=10526 moaceyahoo] - Dead project. Will post new one, someday.<br />
* [http://aur.archlinux.org/packages.php?ID=2700 mutt-cvs] - mutt switched to mercurial a while back; way outdated anyway.<br />
* [http://aur.archlinux.org/packages.php?ID=12051 netscape-navigator] - Not supported upstream anymore making it vulnerable to security issues.<br />
** Can be used for web development – 6xx<br />
* [http://aur.archlinux.org/packages.php?ID=15312 openssh-snapshot] - Not needed anymore<br />
* [http://aur.archlinux.org/packages.php?ID=12193 pidgin-xfire] - Broke; Replaced by [http://aur.archlinux.org/packages.php?ID=16776 pidgin-gfire].<br />
* [http://aur.archlinux.org/packages.php?ID=10514 rt61-cvs] - This driver is included in linus's tree and is therefore obsolete<br />
* [http://aur.archlinux.org/packages.php?ID=494 sonic-rainbow] - dead project, does not compile<br />
* [http://aur.archlinux.org/packages.php?ID=2612 stepmania-bin] - orphan, replaced by [http://aur.archlinux.org/packages.php?ID=5453 stepmania]<br />
* [http://aur.archlinux.org/packages.php?ID=15910 tar-fixed] - This bug is verified fixed in tar 1.20<br />
* [http://aur.archlinux.org/packages.php?ID=13622 wicd-svn] - Outdated, wicd on repository extra is newer.<br />
** Does the project still use SVN? If so, then this package is useful. --[[User:Slash|Slash]] 17:40, 7 May 2008 (EDT)<br />
* [http://aur.archlinux.org/packages.php?ID=8958 wildfire] - Replaced by openfire.<br />
* [http://aur.archlinux.org/packages.php?ID=647 ximian-openoffice] - Ximian port of OpenOffice 1.x. Users should use the more secure OpenOffice 2.x. Also Ximian openoffice is what is now known as ooo-build.<br />
<br />
==Remove from Filesystem==<br />
<br />
This is a list of files on the AUR filesystem that have been created when poorly formed packages were uploaded. This is a secondary consideration.<br />
<br />
<pre><br />
/packages/0verkill-0.16.tar.gz/<br />
/packages/2007.02.17-2/<br />
/packages/abakus-0.91-1/<br />
/packages/abakus-0.91.tar.gz/<br />
/packages/abakus-0.91/<br />
/packages/akgregator/<br />
/packages/akregator/<br />
/packages/akregator1.0.2/<br />
/packages/akregator_1.0.2/<br />
/packages/amsn-0.97ec1/<br />
/packages/amsn-0.97rc1/<br />
/packages/amsn-097rc1-1/<br />
/packages/amsn-097rc1/<br />
/packages/amsn-cvs/<br />
/packages/amsn-svn_update/<br />
/packages/amsn096/<br />
/packages/amsn096rc1/<br />
/packages/bashstyle-5.0<br />
/packages/bashstyle-5.0rc1.tar.gz/<br />
/packages/bashstyle-5.0rc1.tar.gz1/<br />
/packages/bashstyle-5.0rc1/<br />
/packages/bashstyle.tar.gz/<br />
/packages/bashstyle-ng/<br />
/packages/bashstyle1/<br />
/packages/braero-svn<br />
/packages/braser-cvs/<br />
/packages/brasero-cvs/<br />
/packages/brasero.svn/<br />
/packages/brlcad-cvs/<br />
/packages/ccd2iso-0.3/<br />
/packages/cdcollect-0.6.0/<br />
/packages/centerim-4.22.2/<br />
/packages/centerim/<br />
/packages/ploticus-test/<br />
/packages/test-louipc/<br />
/packages/test/<br />
/packages/test_pkg/<br />
/packages/yacas-1.1.17-2/<br />
/packages/yacas-1.2.2/<br />
/packages/yacas-1.17-2/<br />
/packages/yacas-new/<br />
/packages/yacasnew/<br />
/packages/zzztest/<br />
/packages/zzzztest/<br />
</pre></div>Slashhttps://wiki.archlinux.org/index.php?title=AUR_Cleanup_Day/2010&diff=40776AUR Cleanup Day/20102008-05-05T22:09:11Z<p>Slash: added firefox2-ca</p>
<hr />
<div>The AUR has a large number of obsolete packages which could use cleaning up. Examples of packages that may be cleaned up are:<br />
*packages that have been renamed or replaced<br />
*old and unmaintained developmental (cvs/svn/etc) packages<br />
<br />
Post suggestions of packages on this pages. Trusted Users will get together and go though the list in a couple of weeks and confirm which packages should be removed. '''Please DO NOT REMOVE suggestions from the wiki page but add a comment on why it should be kept instead.''' TUs will not delete any useful package.<br />
<br />
==Package List==<br />
* [http://aur.archlinux.org/packages.php?ID=12840 abraca-hg] - Replaced by abraca-git<br />
* [http://aur.archlinux.org/packages.php?ID=7086 alienarena2007] - Replaced by alienarena<br />
* [http://aur.archlinux.org/packages.php?ID=573 amavisd-new] - old version, won't compile, maintainer don't answare for e-mails (I have made new package [http://aur.archlinux.org/packages.php?ID=14650 amavisdnew])<br />
* [http://aur.archlinux.org/packages.php?ID=3194 azrael] - dead project, does not compile<br />
* [http://aur.archlinux.org/packages.php?ID=1790 fusesmb] or [http://aur.archlinux.org/packages.php?ID=14475 fusesmb2] - duplicate (and both outdated, version 8.7 is available)<br />
* [http://aur.archlinux.org/packages.php?ID=13063 fftw2single] - part of fftw2 from [extra]<br />
* [http://aur.archlinux.org/packages.php?ID=6823 gimp-resynth] or [http://aur.archlinux.org/packages.php?ID=12273 gimp-plugin-resynthesizer] - duplicate (best to keep latter)<br />
* [http://aur.archlinux.org/packages.php?ID=7488 ionice] - part of util-linux-ng<br />
* [http://aur.archlinux.org/packages.php?ID=8231 kdelibs-noarts] - out-of-date, modified official package<br />
* [http://aur.archlinux.org/packages.php?ID=12581 kdenlive 0.5_1-1] - out-of-date, doesn't compile<br />
* [http://aur.archlinux.org/packages.php?ID=6296 kernel26thinkpad] - obsolete, out of date since 2006<br />
* [http://aur.archlinux.org/packages.php?ID=2700 mutt-cvs] - mutt switched to mercurial a while back; way outdated anyway.<br />
* [http://aur.archlinux.org/packages.php?ID=15312 openssh-snapshot] - Not needed anymore<br />
* [http://aur.archlinux.org/packages.php?ID=494 sonic-rainbow] - dead project, does not compile<br />
* [http://aur.archlinux.org/packages.php?ID=2612 stepmania-bin] - orphan, replaced by [http://aur.archlinux.org/packages.php?ID=5453 stepmania]<br />
* [http://aur.archlinux.org/packages.php?ID=15910 tar-fixed] - This bug is verified fixed in tar 1.20<br />
* [http://aur.archlinux.org/packages.php?ID=1308 dx9wine] - contains a patch not needed anymore<br />
* [http://aur.archlinux.org/packages.php?ID=13589 gimp-freetype] - This plugin was developed for gimp 2.0 and is not needed according to the notes [http://ftp.gwdg.de/pub/misc/grafik/gimp/gimp/plug-ins/v2.0/freetype/ here.]<br />
* [http://aur.archlinux.org/packages.php?ID=2787 9base-devel] - Hasn't been update since 25/12/2005. I think its not needed.<br />
* [http://aur.archlinux.org/packages.php?ID=3754 gnash-cvs] - Hasn't been update since 18/11/2006. gnash is in extra now too.<br />
* [http://aur.archlinux.org/packages.php?ID=12051 netscape-navigator] - Not supported upstream anymore making it vulnerable to security issues.<br />
* [http://aur.archlinux.org/packages.php?ID=647 ximian-openoffice] - Ximian port of OpenOffice 1.x. Users should use the more secure OpenOffice 2.x. Also Ximian openoffice is what is now known as ooo-build.<br />
* [http://aur.archlinux.org/packages.php?ID=12193 pidgin-xfire] - Broke; Replaced by [http://aur.archlinux.org/packages.php?ID=16776 pidgin-gfire].<br />
* [http://aur.archlinux.org/packages.php?ID=7259 firefox2-ca] - firefox2 is depreciated. <br />
<br />
==Remove from Filesystem==<br />
<br />
This is a list of files on the AUR filesystem that have been created when poorly formed packages were uploaded. <br />
<br />
<pre><br />
/packages/0verkill-0.16.tar.gz/<br />
/packages/2007.02.17-2/<br />
/packages/abakus-0.91-1/<br />
/packages/abakus-0.91.tar.gz/<br />
/packages/abakus-0.91/<br />
/packages/akgregator/<br />
/packages/akregator/<br />
/packages/akregator1.0.2/<br />
/packages/akregator_1.0.2/<br />
/packages/amsn-0.97ec1/<br />
/packages/amsn-0.97rc1/<br />
/packages/amsn-097rc1-1/<br />
/packages/amsn-097rc1/<br />
/packages/amsn-cvs/<br />
/packages/amsn-svn_update/<br />
/packages/amsn096/<br />
/packages/amsn096rc1/<br />
/packages/bashstyle-5.0<br />
/packages/bashstyle-5.0rc1.tar.gz/<br />
/packages/bashstyle-5.0rc1.tar.gz1/<br />
/packages/bashstyle-5.0rc1/<br />
/packages/bashstyle.tar.gz/<br />
/packages/bashstyle-ng/<br />
/packages/bashstyle1/<br />
/packages/braero-svn<br />
/packages/braser-cvs/<br />
/packages/brasero-cvs/<br />
/packages/brasero.svn/<br />
/packages/brlcad-cvs/<br />
/packages/ccd2iso-0.3/<br />
/packages/cdcollect-0.6.0/<br />
/packages/centerim-4.22.2/<br />
/packages/centerim/<br />
/packages/ploticus-test/<br />
/packages/test-louipc/<br />
/packages/test/<br />
/packages/test_pkg/<br />
/packages/yacas-1.1.17-2/<br />
/packages/yacas-1.2.2/<br />
/packages/yacas-1.17-2/<br />
/packages/yacas-new/<br />
/packages/yacasnew/<br />
/packages/zzztest/<br />
/packages/zzzztest/<br />
</pre></div>Slashhttps://wiki.archlinux.org/index.php?title=AUR_Cleanup_Day/2010&diff=40775AUR Cleanup Day/20102008-05-05T22:03:54Z<p>Slash: Added pidgin-xfire</p>
<hr />
<div>The AUR has a large number of obsolete packages which could use cleaning up. Examples of packages that may be cleaned up are:<br />
*packages that have been renamed or replaced<br />
*old and unmaintained developmental (cvs/svn/etc) packages<br />
<br />
Post suggestions of packages on this pages. Trusted Users will get together and go though the list in a couple of weeks and confirm which packages should be removed. '''Please DO NOT REMOVE suggestions from the wiki page but add a comment on why it should be kept instead.''' TUs will not delete any useful package.<br />
<br />
==Package List==<br />
* [http://aur.archlinux.org/packages.php?ID=12840 abraca-hg] - Replaced by abraca-git<br />
* [http://aur.archlinux.org/packages.php?ID=7086 alienarena2007] - Replaced by alienarena<br />
* [http://aur.archlinux.org/packages.php?ID=573 amavisd-new] - old version, won't compile, maintainer don't answare for e-mails (I have made new package [http://aur.archlinux.org/packages.php?ID=14650 amavisdnew])<br />
* [http://aur.archlinux.org/packages.php?ID=3194 azrael] - dead project, does not compile<br />
* [http://aur.archlinux.org/packages.php?ID=1790 fusesmb] or [http://aur.archlinux.org/packages.php?ID=14475 fusesmb2] - duplicate (and both outdated, version 8.7 is available)<br />
* [http://aur.archlinux.org/packages.php?ID=13063 fftw2single] - part of fftw2 from [extra]<br />
* [http://aur.archlinux.org/packages.php?ID=6823 gimp-resynth] or [http://aur.archlinux.org/packages.php?ID=12273 gimp-plugin-resynthesizer] - duplicate (best to keep latter)<br />
* [http://aur.archlinux.org/packages.php?ID=7488 ionice] - part of util-linux-ng<br />
* [http://aur.archlinux.org/packages.php?ID=8231 kdelibs-noarts] - out-of-date, modified official package<br />
* [http://aur.archlinux.org/packages.php?ID=12581 kdenlive 0.5_1-1] - out-of-date, doesn't compile<br />
* [http://aur.archlinux.org/packages.php?ID=6296 kernel26thinkpad] - obsolete, out of date since 2006<br />
* [http://aur.archlinux.org/packages.php?ID=2700 mutt-cvs] - mutt switched to mercurial a while back; way outdated anyway.<br />
* [http://aur.archlinux.org/packages.php?ID=15312 openssh-snapshot] - Not needed anymore<br />
* [http://aur.archlinux.org/packages.php?ID=494 sonic-rainbow] - dead project, does not compile<br />
* [http://aur.archlinux.org/packages.php?ID=2612 stepmania-bin] - orphan, replaced by [http://aur.archlinux.org/packages.php?ID=5453 stepmania]<br />
* [http://aur.archlinux.org/packages.php?ID=15910 tar-fixed] - This bug is verified fixed in tar 1.20<br />
* [http://aur.archlinux.org/packages.php?ID=1308 dx9wine] - contains a patch not needed anymore<br />
* [http://aur.archlinux.org/packages.php?ID=13589 gimp-freetype] - This plugin was developed for gimp 2.0 and is not needed according to the notes [http://ftp.gwdg.de/pub/misc/grafik/gimp/gimp/plug-ins/v2.0/freetype/ here.]<br />
* [http://aur.archlinux.org/packages.php?ID=2787 9base-devel] - Hasn't been update since 25/12/2005. I think its not needed.<br />
* [http://aur.archlinux.org/packages.php?ID=3754 gnash-cvs] - Hasn't been update since 18/11/2006. gnash is in extra now too.<br />
* [http://aur.archlinux.org/packages.php?ID=12051 netscape-navigator] - Not supported upstream anymore making it vulnerable to security issues.<br />
* [http://aur.archlinux.org/packages.php?ID=647 ximian-openoffice] - Ximian port of OpenOffice 1.x. Users should use the more secure OpenOffice 2.x. Also Ximian openoffice is what is now known as ooo-build.<br />
* [http://aur.archlinux.org/packages.php?ID=12193 pidgin-xfire] - Broke; Replaced by [http://aur.archlinux.org/packages.php?ID=16776 pidgin-gfire].<br />
<br />
==Remove from Filesystem==<br />
<br />
This is a list of files on the AUR filesystem that have been created when poorly formed packages were uploaded. <br />
<br />
<pre><br />
/packages/0verkill-0.16.tar.gz/<br />
/packages/2007.02.17-2/<br />
/packages/abakus-0.91-1/<br />
/packages/abakus-0.91.tar.gz/<br />
/packages/abakus-0.91/<br />
/packages/akgregator/<br />
/packages/akregator/<br />
/packages/akregator1.0.2/<br />
/packages/akregator_1.0.2/<br />
/packages/amsn-0.97ec1/<br />
/packages/amsn-0.97rc1/<br />
/packages/amsn-097rc1-1/<br />
/packages/amsn-097rc1/<br />
/packages/amsn-cvs/<br />
/packages/amsn-svn_update/<br />
/packages/amsn096/<br />
/packages/amsn096rc1/<br />
/packages/bashstyle-5.0<br />
/packages/bashstyle-5.0rc1.tar.gz/<br />
/packages/bashstyle-5.0rc1.tar.gz1/<br />
/packages/bashstyle-5.0rc1/<br />
/packages/bashstyle.tar.gz/<br />
/packages/bashstyle-ng/<br />
/packages/bashstyle1/<br />
/packages/braero-svn<br />
/packages/braser-cvs/<br />
/packages/brasero-cvs/<br />
/packages/brasero.svn/<br />
/packages/brlcad-cvs/<br />
/packages/ccd2iso-0.3/<br />
/packages/cdcollect-0.6.0/<br />
/packages/centerim-4.22.2/<br />
/packages/centerim/<br />
/packages/ploticus-test/<br />
/packages/test-louipc/<br />
/packages/test/<br />
/packages/test_pkg/<br />
/packages/yacas-1.1.17-2/<br />
/packages/yacas-1.2.2/<br />
/packages/yacas-1.17-2/<br />
/packages/yacas-new/<br />
/packages/yacasnew/<br />
/packages/zzztest/<br />
/packages/zzzztest/<br />
</pre></div>Slashhttps://wiki.archlinux.org/index.php?title=Autofs&diff=15657Autofs2006-10-11T17:15:30Z<p>Slash: </p>
<hr />
<div>[[Category:Filesystem]]<br />
<br />
Based on information found in this topic: http://bbs.archlinux.org/viewtopic.php?t=7630 <br /><br />
and information found in this page: http://libranet.com/support/2.8/0381<br />
<br />
This document outlines the procedure needed to set up AutoFS, a package that provides support for automount. It provides the ability to have CDs, floppies, and other removeable media automatically mounted when they are inserted.<br />
<br />
* Install the autofs package:<br />
pacman -Sy autofs<br />
<br />
* Edit the file <code>/etc/autofs/auto.master</code>. Delete the existing contents and add the following line:<br />
/media /etc/autofs/auto.media<br />
And make additional line in the end of the file (press ENTER after last word). If there is no correct EOF line, the AUTOFS deamon won't work properly.<br />
<br />
If Autofs doesn't automatically unmount your devices (after you finish this wiki), replace last line by :<br />
/media /etc/autofs/auto.media --timeout 3<br />
<br />
* Create the /etc/autofs/auto.media file with the following contents:<br />
cdrom -fstype=iso9660,ro,nodev,nosuid :/dev/cdrom<br />
floppy -fstype=auto,async,nodev,nosuid,umask=000 :/dev/fl<br />
usbstick -fstype=auto,async,nodev,nosuid,umask=000 :/dev/sda1<br />
<br />
You may need to change the devices. You can also add additional similar devices.<br />
<br />
* Create the <code>/etc/default/autofs</code> file and add the following line to it:<br />
TIMEOUT=1<br />
<br />
* Open the <code>/etc/conf.d/autofs</code> file and edit the daemonoptions line:<br />
daemonoptions='-g'<br />
<br />
* Create the <code>/media</code> directory:<br />
mkdir /media<br />
<br />
* Start the autofs daemon using:<br />
/etc/rc.d/autofs start<br />
<br />
* Start this daemon on every bootup by adding <code>autofs</code> to the DAEMONS array in /etc/rc.conf<br />
<br />
Devices are now automatically mounted when they are accessed. Visit the /media/cdrom and /media/floppy directories to access them. They will remain mounted as long as you access them.<br />
<br />
If you browse to the /media directory in a file manager, you will now see directory entries for the cdrom and floppy. These entries will be present with no media in the drive. This means that in the file browser you can see what drives you may mount, but the directories will be empty at best if no media is present. Apparently not all file managers can handle the case where a directory does not exist.<br />
<br />
If you use multiple usb drives/sticks and want to easily tell them apart, you can use Autofs to set up the mount points and udev to create distinct names for your usb drives. [[Using udev to map multiple entries to a device]] has instructions on setting up udev rules.<br />
<br />
<br />
If autofs isn't working for you, make sure that the permissions of the autofs files are correct, otherwise autofs will not start. This may happen if you backed up your configuration files in a manner which did not preserve file modes. Here are what the modes should be on the configuration files:<br />
<br />
0644 - /etc/autofs/auto.master<br />
<br />
0644 - /etc/autofs/auto.media<br />
<br />
0644 - /etc/autofs/auto.misc<br />
<br />
0755 - /etc/autofs/auto.net<br />
<br />
0644 - /etc/conf.d/autofs</div>Slashhttps://wiki.archlinux.org/index.php?title=Autofs&diff=15656Autofs2006-10-11T17:14:31Z<p>Slash: configuration file modes</p>
<hr />
<div>[[Category:Filesystem]]<br />
<br />
Based on information found in this topic: http://bbs.archlinux.org/viewtopic.php?t=7630 <br /><br />
and information found in this page: http://libranet.com/support/2.8/0381<br />
<br />
This document outlines the procedure needed to set up AutoFS, a package that provides support for automount. It provides the ability to have CDs, floppies, and other removeable media automatically mounted when they are inserted.<br />
<br />
* Install the autofs package:<br />
pacman -Sy autofs<br />
<br />
* Edit the file <code>/etc/autofs/auto.master</code>. Delete the existing contents and add the following line:<br />
/media /etc/autofs/auto.media<br />
And make additional line in the end of the file (press ENTER after last word). If there is no correct EOF line, the AUTOFS deamon won't work properly.<br />
<br />
If Autofs doesn't automatically unmount your devices (after you finish this wiki), replace last line by :<br />
/media /etc/autofs/auto.media --timeout 3<br />
<br />
* Create the /etc/autofs/auto.media file with the following contents:<br />
cdrom -fstype=iso9660,ro,nodev,nosuid :/dev/cdrom<br />
floppy -fstype=auto,async,nodev,nosuid,umask=000 :/dev/fl<br />
usbstick -fstype=auto,async,nodev,nosuid,umask=000 :/dev/sda1<br />
<br />
You may need to change the devices. You can also add additional similar devices.<br />
<br />
* Create the <code>/etc/default/autofs</code> file and add the following line to it:<br />
TIMEOUT=1<br />
<br />
* Open the <code>/etc/conf.d/autofs</code> file and edit the daemonoptions line:<br />
daemonoptions='-g'<br />
<br />
* Create the <code>/media</code> directory:<br />
mkdir /media<br />
<br />
* Start the autofs daemon using:<br />
/etc/rc.d/autofs start<br />
<br />
* Start this daemon on every bootup by adding <code>autofs</code> to the DAEMONS array in /etc/rc.conf<br />
<br />
Devices are now automatically mounted when they are accessed. Visit the /media/cdrom and /media/floppy directories to access them. They will remain mounted as long as you access them.<br />
<br />
If you browse to the /media directory in a file manager, you will now see directory entries for the cdrom and floppy. These entries will be present with no media in the drive. This means that in the file browser you can see what drives you may mount, but the directories will be empty at best if no media is present. Apparently not all file managers can handle the case where a directory does not exist.<br />
<br />
If you use multiple usb drives/sticks and want to easily tell them apart, you can use Autofs to set up the mount points and udev to create distinct names for your usb drives. [[Using udev to map multiple entries to a device]] has instructions on setting up udev rules.<br />
<br />
<br />
* If autofs isn't working for you, make sure that the permissions of the autofs files are correct, otherwise autofs will not start. This may happen if you backed up your configuration files in a manner which did not preserve file modes. Here are what the modes should be on the configuration files:<br />
<br />
0644 - /etc/autofs/auto.master<br />
0644 - /etc/autofs/auto.media<br />
0644 - /etc/autofs/auto.misc<br />
0755 - /etc/autofs/auto.net<br />
0644 - /etc/conf.d/autofs</div>Slashhttps://wiki.archlinux.org/index.php?title=Steam&diff=14465Steam2006-07-31T09:41:52Z<p>Slash: Removed ActiveX Installation Stuff, Not Needed Anymore</p>
<hr />
<div>[[Category:Games]][[Category:Installation]]<br />
<br />
Steam is a content delivery system made by Valve Software. It is most known as the platform needed to play Half-Life 1 and Half-Life 2 based games (Counter-Strike, Day of Defeat, etc), but now offers many other games from other developers. For more information, please see [http://www.steampowered.com/ SteamPowered.com]<br />
<br />
<br />
This article will describe how install and run it on Arch Linux using [http://winehq.org/ WINE].<br />
<br />
<br />
== Preparation ==<br />
<br />
<br />
If you have an old ~/.wine/ directory, you may consider deleting it completely or backing it up. Old settings from previous installs may mess things up and Steam may not work correctly. If you do not have WINE installed yet, install it with pacman (you need the extra repository enabled in your /etc/pacman.conf file):<br />
<br />
pacman -Sy wine<br />
<br />
Now run the wine configuration program once to create an initial ~/.wine/ <br />
<br />
winecfg<br />
<br />
<br />
== Install Fonts ==<br />
<br />
<br />
Steam requires the Tahoma font. You will have to get this from a Windows install or somewhere online. <br />
<br />
mv tahoma.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
Steam uses the Marlett font for the minimize/close/etc buttons. It's not absolutely required, but it will make it look nicer. Again, get this font from a Windows install or somewhere online. <br />
<br />
mv marlett.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
<br />
== Download Steam and Install ==<br />
<br />
<br />
wget http://steampowered.com/download/SteamInstall.exe<br />
wine SteamInstall.exe<br />
<br />
After it goes through the install procedure, it will automatically update itself and appear to shutdown and restart itself numerous times. Just be patient. If it crashes when the update process is at 26%, rename the SteamTemp.exe file to Steam.exe and run "wine Steam.exe" to complete the update. Eventually it will ask you to create an account or login to an exisiting account. <br />
<br />
<br />
You cannot type text in the fields of the login box in Steam by default. In order to get keyboard focus, right-click on the text areas first, then type in your username and password. You may want to check "Remember my password" so you don't have to go through this hassle everytime Steam starts. <br />
<br />
<br />
=== Alternate Login Fix Method ===<br />
<br />
<br />
If right-clicking on the text areas does not give you focus and you are unable to type in your username and password, you will have to enable a virtual desktop. First, go on to the next step of the Wiki describing how to start Steam correctly. Then, run winecfg<br />
<br />
winecfg<br />
<br />
Go to the "Graphics" tab, check the "Emulate a virtual desktop" box, and enter a resolution of 1024x768 or higher. Press OK and close the program. <br />
<br />
Start Steam. It should start in a larger WINE window. Now you can enter your username and password. Remember to check "Remember my password". After you confirm you can login, close Steam. <br />
<br />
Open winecfg, disable the virtual desktop, and start Steam again. It should login now without prompting for a username and password<br />
<br />
<br />
<br />
After you login, it will update some more and finally bring up the Steam main menu and you should be able to operate Steam without problems.<br />
<br />
When Steam tries to load webpages within it's UI, WINE will prompt you to install the Gecko Engine to show these pages. Choose to install it. Without it, Steam will become unstable and crash. <br />
<br />
''If you had an old version of Mozilla ActiveX Installed'': You will notice that webpages are blank and will probably experience instability within Steam. You need to remove the old controls. Close Steam and run this command:<br />
<br />
wine regedit /D "HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{1339B54C-3453-11D2-93B9-000000000000}"<br />
<br />
<br />
<br />
== Starting Steam ==<br />
<br />
<br />
In order to start Steam again later, you need to first change to the Steam directory, and then run<br />
<br />
wine steam.exe<br />
<br />
Giving WINE a path to steam.exe '''will not work'''. '''Do not do this''':<br />
<br />
wine ~/.wine/drive_c/Program\ Files/Steam/steam.exe<br />
<br />
Alternatively, you may use this method:<br />
<br />
wine "C:\\Program Files\\Steam\\steam.exe" <br />
<br />
You should make a small startup script to start Steam, for example, ''steam.sh''<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
# WINE binary<br />
CDLOADER_WINE="wine"<br />
<br />
# Steam directory<br />
STEAMDIR="$HOME/.wine/drive_c/Program Files/Steam"<br />
<br />
cd "$STEAMDIR"<br />
<br />
$CDLOADER_WINE "steam.exe" -- "$@" <br />
</pre><br />
<br />
== Using a Pre-Existing Steam Install ==<br />
<br />
<br />
If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to ~/.wine/drive_c/Program Files/Steam/ . However, be sure to do '''all''' the previous steps in this Wiki. Confirm Steam launches and logs into your account, ''then'' do this:<br />
<br />
cd ~/.wine/drive_c/Program\ Files/ <br />
mv Steam/ Steam.backup/ (or you can just delete the directory)<br />
ln -s /mnt/windows_partition/Program\ Files/Steam/<br />
<br />
<br />
== Running Steam in a second X Server==<br />
<br />
<br />
Assuming you are using the script above to start Steam, make a new script, called x.steam.sh . You should run this when you want to start Steam in a new X server, and steam.sh if you want Steam to start in the current X server.<br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISPLAY=:1.0<br />
<br />
xinit $HOME/steam.sh $* -- :1<br />
</pre><br />
<br />
Now you can use CTRL+ALT+F7 to get to your first X server with your normal desktop, and CTRL+ALT+F8 to go back to your game. <br />
<br />
Because the second X server is ''only'' running the game and the first X server with all your programs is backgrounded, performance should increase. In addition, it is much more convenient to switch X servers while in game to access other resources, rather than having to exit the game completely or alt-tab out. Finally, it is useful for when Steam or WINE goes haywire and leaves a bunch of processes in memory after Steam crashes. Simply CTRL+ALT+BACKSPACE on the second X server to kill that X and all processes on that desktop will terminate as well. <br />
<br />
'''If you can't switch between X servers with the CTRL+ALT keys''': Make sure your keyboard is set correctly in your xorg.conf. There may be help in [http://bbs.archlinux.org/viewtopic.php?t=18115 this thread].<br />
<br />
'''If you get errors that look like "Xlib: connection to ":1.0" refused by server" when starting the second X''': You will need to adjust your X permissions. See section 9 of [http://www.linux-gamers.net/modules/wiwimod/index.php?page=HOWTO+extra+XServer this page] for help.<br />
<br />
'''If you lose the ability to use the keyboard while using Steam''': This is an odd bug that doesn't happen with other games. A solution is to use a WM in the second X as well. Thankfully, you don't need to run a large WM. Openbox and icewm have been confirmed to fix this bug (evilwm, pekwm, lwm ''don't'' work), but the icewm taskbar shows up on the bottom of the game. I would use openbox for now. <br />
<br />
pacman -S openbox<br />
<br />
Then add "openbox &" to the top of your steam.sh file. Note you can run other programs (ex. Teamspeak &) or set X settings (ex. xset, xmodmap) before the WINE call as well. <br />
<br />
<br />
== Known Issues ==<br />
<br />
<br />
Besides not being able to type in the login window, here are some other issues:<br />
<br />
* The Steam windows do not respect WM desktop workspaces. All Steam windows will appear on all workspaces. In addition, all Steam windows will always be on top of other windows. (confirmed on Openbox only)<br />
* The system tray icon may not be placed in your WM's system tray. Instead it will be in a floating window, named "WINE System Tray Adapter". It still works as expected, however. (confirmed on Openbox only)<br />
* Switching the Audio Driver in "winecfg" from OSS to ALSA causes games to hang. (confirmed only with Half-Life 1 based games)</div>Slashhttps://wiki.archlinux.org/index.php?title=Steam&diff=14263Steam2006-07-14T14:22:06Z<p>Slash: </p>
<hr />
<div>[[Category:Games]][[Category:Installation]]<br />
<br />
Steam is a content delivery system made by Valve Software. It is most known as the platform needed to play Half-Life 1 and Half-Life 2 based games (Counter-Strike, Day of Defeat, etc), but now offers many other games from other developers. For more information, please see [http://www.steampowered.com/ SteamPowered.com]<br />
<br />
<br />
This article will describe how install and run it on Arch Linux using [http://winehq.org/ WINE].<br />
<br />
<br />
== Preparation ==<br />
<br />
<br />
If you have an old ~/.wine/ directory, you may consider deleting it completely or backing it up. Old settings from previous installs may mess things up and Steam may not work correctly. If you do not have WINE installed yet, install it with pacman (you need the extra repository enabled in your /etc/pacman.conf file):<br />
<br />
pacman -Sy wine<br />
<br />
Now run the wine configuration program once to create an initial ~/.wine/ <br />
<br />
winecfg<br />
<br />
== Install Mozilla ActiveX Controls ==<br />
<br />
<br />
cd ~/.wine/drive_c/Program\ Files/<br />
wget http://downloads.transgaming.com/mozilla_control_downloads/mozcontrol.tgz<br />
tar zxvf mozcontrol.tgz<br />
cd mozcontrol/ <br />
regsvr32 mozctlx.dll <br />
<br />
<br />
== Install Fonts ==<br />
<br />
<br />
Steam requires the Tahoma font. You will have to get this from a Windows install or somewhere online. <br />
<br />
mv tahoma.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
Steam uses the Marlett font for the minimize/close/etc buttons. It's not absolutely required, but it will make it look nicer. Again, get this font from a Windows install or somewhere online. <br />
<br />
mv marlett.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
<br />
== Download Steam and Install ==<br />
<br />
<br />
wget http://steampowered.com/download/SteamInstall.exe<br />
wine SteamInstall.exe<br />
<br />
After it goes through the install procedure, it will automatically update itself and appear to shutdown and restart itself numerous times. Just be patient. Eventually it will ask you to create an account or login to an exisiting account. <br />
<br />
<br />
You cannot type text in the fields of the login box in Steam by default. In order to get keyboard focus, right-click on the text areas first, then type in your username and password. You may want to check "Remember my password" so you don't have to go through this hassle everytime Steam starts. <br />
<br />
<br />
=== Alternate Login Fix Method ===<br />
<br />
<br />
If right-clicking on the text areas does not give you focus and you are unable to type in your username and password, you will have to enable a virtual desktop. First, go on to the next step of the Wiki describing how to start Steam correctly. Then, run winecfg<br />
<br />
winecfg<br />
<br />
Go to the "Graphics" tab, check the "Emulate a virtual desktop" box, and enter a resolution of 1024x768 or higher. Press OK and close the program. <br />
<br />
Start Steam. It should start in a larger WINE window. Now you can enter your username and passowrd. Remember to check "Remember my password". After you confirm you can login, close Steam. <br />
<br />
Open winecfg, disable the virtual desktop, and start Steam again. It should login now without prompting for a username and password<br />
<br />
<br />
After you login, it will update some more and finally bring up the Steam main menu and you should be able to operate Steam without problems.<br />
<br />
== Starting Steam ==<br />
<br />
<br />
In order to start Steam again later, you need to first change to the Steam directory, and then run<br />
<br />
wine steam.exe<br />
<br />
Giving WINE a path to steam.exe '''will not work'''. '''Do not do this''':<br />
<br />
wine ~/.wine/drive_c/Program\ Files/Steam/steam.exe<br />
<br />
Alternatively, you may use this method:<br />
<br />
wine "C:\\Program Files\\Steam\\steam.exe" <br />
<br />
You should make a small startup script to start Steam, for example, ''steam.sh''<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
# WINE binary<br />
CDLOADER_WINE="wine"<br />
<br />
# Steam directory<br />
STEAMDIR="$HOME/.wine/drive_c/Program Files/Steam"<br />
<br />
cd "$STEAMDIR"<br />
<br />
$CDLOADER_WINE "steam.exe" -- "$@" <br />
</pre><br />
<br />
== Using a Pre-Existing Steam Install ==<br />
<br />
<br />
If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to ~/.wine/drive_c/Program Files/Steam/ . However, be sure to do '''all''' the previous steps in this Wiki. Confirm Steam launches and logs into your account, ''then'' do this:<br />
<br />
cd ~/.wine/drive_c/Program\ Files/ <br />
mv Steam/ Steam.backup/ (or you can just delete the directory)<br />
ln -s /mnt/windows_partition/Program\ Files/Steam/<br />
<br />
<br />
== Running Steam in a second X Server==<br />
<br />
<br />
Assuming you are using the script above to start Steam, make a new script, called x.steam.sh . You should run this when you want to start Steam in a new X server, and steam.sh if you want Steam to start in the current X server.<br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISPLAY=:1.0<br />
<br />
xinit $HOME/steam.sh $* -- :1<br />
</pre><br />
<br />
Now you can use CTRL+ALT+F7 to get to your first X server with your normal desktop, and CTRL+ALT+F8 to go back to your game. <br />
<br />
Because the second X server is ''only'' running the game and the first X server with all your programs is backgrounded, performance should increase. In addition, it is much more convenient to switch X servers while in game to access other resources, rather than having to exit the game completely or alt-tab out. Finally, it is useful for when Steam or WINE goes haywire and leaves a bunch of processes in memory after Steam crashes. Simply CTRL+ALT+BACKSPACE on the second X server to kill that X and all processes on that desktop will terminate as well. <br />
<br />
'''If you can't switch between X servers with the CTRL+ALT keys''': Make sure your keyboard is set correctly in your xorg.conf. There may be help in [http://bbs.archlinux.org/viewtopic.php?t=18115 this thread].<br />
<br />
'''If you get errors that look like "Xlib: connection to ":1.0" refused by server" when starting the second X''': You will need to adjust your X permissions. See section 9 of [http://www.linux-gamers.net/modules/wiwimod/index.php?page=HOWTO+extra+XServer this page] for help.<br />
<br />
'''If you lose the ability to use the keyboard while using Steam''': This is an odd bug that doesn't happen with other games. A solution is to use a WM in the second X as well. Thankfully, you don't need to run a large WM. Openbox and icewm have been confirmed to fix this bug (evilwm, pekwm, lwm ''don't'' work), but the icewm taskbar shows up on the bottom of the game. I would use openbox for now. <br />
<br />
pacman -S openbox<br />
<br />
Then add "openbox &" to the top of your steam.sh file. Note you can run other programs (ex. Teamspeak &) or set X settings (ex. xset, xmodmap) before the WINE call as well. <br />
<br />
<br />
== Known Issues ==<br />
<br />
<br />
Besides not being able to type in the login window, here are some other issues:<br />
<br />
* The Steam windows do not respect WM desktop workspaces. All Steam windows will appear on all workspaces. In addition, all Steam windows will always be on top of other windows. (confirmed on Openbox only)<br />
* The system tray icon may not be placed in your WM's system tray. Instead it will be in a floating window, named "WINE System Tray Adapter". It still works as expected, however. (confirmed on Openbox only)<br />
* Switching the Audio Driver in "winecfg" from OSS to ALSA causes games to hang. (confirmed only with Half-Life 1 based games)</div>Slashhttps://wiki.archlinux.org/index.php?title=Steam&diff=14251Steam2006-07-14T02:04:16Z<p>Slash: /* Running Steam in a second X Server */</p>
<hr />
<div>[[Category:Games]][[Category:Installation]]<br />
<br />
Steam is a content delivery system made by Valve Software. It is most known as the platform needed to play Half-Life 1 and Half-Life 2 based games (Counter-Strike, Day of Defeat, etc), but now offers many other games from other developers. For more information, please see [http://www.steampowered.com/ SteamPowered.com]<br />
<br />
<br />
This article will describe how install and run it on Arch Linux using [http://winehq.org/ WINE].<br />
<br />
<br />
== Preparation ==<br />
<br />
<br />
If you have an old ~/.wine/ directory, you may consider deleting it completely or backing it up. Old settings from previous installs may mess things up and Steam may not work correctly. If you do not have WINE installed yet, install it with pacman (you need the extra repository enabled in your /etc/pacman.conf file):<br />
<br />
pacman -Sy wine<br />
<br />
Now run the wine configuration program once to create an initial ~/.wine/ <br />
<br />
winecfg<br />
<br />
== Install Mozilla ActiveX Controls ==<br />
<br />
<br />
cd ~/.wine/drive_c/Program\ Files/<br />
wget http://downloads.transgaming.com/mozilla_control_downloads/mozcontrol.tgz<br />
tar zxvf mozcontrol.tgz<br />
cd mozcontrol/ <br />
regsvr32 mozctlx.dll <br />
<br />
<br />
== Install Fonts ==<br />
<br />
<br />
Steam requires the Tahoma font. You will have to get this from a Windows install or somewhere online. <br />
<br />
mv tahoma.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
Steam uses the Marlett font for the minimize/close/etc buttons. It's not absolutely required, but it will make it look nicer. Again, get this font from a Windows install or somewhere online. <br />
<br />
mv marlett.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
<br />
== Download Steam and Install ==<br />
<br />
<br />
wget http://steampowered.com/download/SteamInstall.exe<br />
wine SteamInstall.exe<br />
<br />
After it goes through the install procedure, it will automatically update itself and appear to shutdown and restart itself numerous times. Just be patient. Eventually it will ask you to create an account or login to an exisiting account. <br />
<br />
<br />
You cannot type text in the fields of the login box in Steam by default. In order to get keyboard focus, right-click on the text areas first, then type in your username and password. You may want to check "Remember my password" so you don't have to go through this hassle everytime Steam starts. <br />
<br />
<br />
=== Alternate Login Fix Method ===<br />
<br />
<br />
If right-clicking on the text areas does not give you focus and you are unable to type in your username and password, you will have to enable a virtual desktop. First, go on to the next step of the Wiki describing how to start Steam correctly. Then, run winecfg<br />
<br />
winecfg<br />
<br />
Go to the "Graphics" tab, check the "Emulate a virtual desktop" box, and enter a resolution of 1024x768 or higher. Press OK and close the program. <br />
<br />
Start Steam. It should start in a larger WINE window. Now you can enter your username and passowrd. Remember to check "Remember my password". After you confirm you can login, close Steam. <br />
<br />
Open winecfg, disable the virtual desktop, and start Steam again. It should login now without prompting for a username and password<br />
<br />
<br />
After you login, it will update some more and finally bring up the Steam main menu and you should be able to operate Steam without problems.<br />
<br />
== Starting Steam ==<br />
<br />
<br />
In order to start Steam again later, you need to first change to the Steam directory, and then run<br />
<br />
wine steam.exe<br />
<br />
Giving WINE a path to steam.exe '''will not work'''. '''Do not do this''':<br />
<br />
wine ~/.wine/drive_c/Program\ Files/Steam/steam.exe<br />
<br />
Alternatively, you may use this method:<br />
<br />
wine "C:\\Program Files\\Steam\\steam.exe" <br />
<br />
You should make a small startup script to start Steam, for example, ''steam.sh''<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
# WINE binary<br />
CDLOADER_WINE="wine"<br />
<br />
# Steam directory<br />
STEAMDIR="$HOME/.wine/drive_c/Program Files/Steam"<br />
<br />
cd "$STEAMDIR"<br />
<br />
$CDLOADER_WINE "steam.exe" -- "$@" <br />
</pre><br />
<br />
== Using a Pre-Existing Steam Install ==<br />
<br />
<br />
If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to ~/.wine/drive_c/Program Files/Steam/ . However, be sure to do '''all''' the previous steps in this Wiki. Confirm Steam launches and logs into your account, ''then'' do this:<br />
<br />
cd ~/.wine/drive_c/Program\ Files/ <br />
mv Steam/ Steam.backup/ (or you can just delete the directory)<br />
ln -s /mnt/windows_partition/Program\ Files/Steam/<br />
<br />
<br />
== Running Steam in a second X Server==<br />
<br />
<br />
Assuming you are using the script above to start Steam, make a new script, called x.steam.sh . You should run this when you want to start Steam in a new X server, and steam.sh if you want Steam to start in the current X server.<br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISPLAY=:1.0<br />
<br />
xinit $HOME/steam.sh $* -- :1<br />
</pre><br />
<br />
Now you can use CTRL+ALT+F7 to get to your first X server with your normal desktop, and CTRL+ALT+F8 to go back to your game. <br />
<br />
Because the second X server is ''only'' running the game and the first X server with all your programs is backgrounded, performance should increase. In addition, it is much more convenient to switch X servers while in game to access other resources, rather than having to exit the game completely or alt-tab out. Finally, it is useful for when Steam or WINE goes haywire and leaves a bunch of processes in memory after Steam crashes. Simply CTRL+ALT+BACKSPACE on the second X server to kill that X and all processes on that desktop will terminate as well. <br />
<br />
'''If you can't switch between X servers with the CTRL+ALT keys''': Make sure your keyboard is set correctly in your xorg.conf. There may be help in [http://bbs.archlinux.org/viewtopic.php?t=18115 this thread].<br />
<br />
'''If you get errors that look like "Xlib: connection to ":1.0" refused by server" when starting the second X''': You will need to adjust your X permissions. See section 9 of [http://www.linux-gamers.net/modules/wiwimod/index.php?page=HOWTO+extra+XServer this page] for help.<br />
<br />
== Known Issues ==<br />
<br />
<br />
Besides not being able to type in the login window, here are some other issues:<br />
<br />
* The Steam windows do not respect WM desktop workspaces. All Steam windows will appear on all workspaces. In addition, all Steam windows will always be on top of other windows. (confirmed on Openbox only)<br />
* The system tray icon may not be placed in your WM's system tray. Instead it will be in a floating window, named "WINE System Tray Adapter". It still works as expected, however. (confirmed on Openbox only)<br />
* Switching the Audio Driver in "winecfg" from OSS to ALSA causes games to hang. (confirmed only with Half-Life 1 based games)</div>Slashhttps://wiki.archlinux.org/index.php?title=Steam&diff=14250Steam2006-07-14T02:01:15Z<p>Slash: </p>
<hr />
<div>[[Category:Games]][[Category:Installation]]<br />
<br />
Steam is a content delivery system made by Valve Software. It is most known as the platform needed to play Half-Life 1 and Half-Life 2 based games (Counter-Strike, Day of Defeat, etc), but now offers many other games from other developers. For more information, please see [http://www.steampowered.com/ SteamPowered.com]<br />
<br />
<br />
This article will describe how install and run it on Arch Linux using [http://winehq.org/ WINE].<br />
<br />
<br />
== Preparation ==<br />
<br />
<br />
If you have an old ~/.wine/ directory, you may consider deleting it completely or backing it up. Old settings from previous installs may mess things up and Steam may not work correctly. If you do not have WINE installed yet, install it with pacman (you need the extra repository enabled in your /etc/pacman.conf file):<br />
<br />
pacman -Sy wine<br />
<br />
Now run the wine configuration program once to create an initial ~/.wine/ <br />
<br />
winecfg<br />
<br />
== Install Mozilla ActiveX Controls ==<br />
<br />
<br />
cd ~/.wine/drive_c/Program\ Files/<br />
wget http://downloads.transgaming.com/mozilla_control_downloads/mozcontrol.tgz<br />
tar zxvf mozcontrol.tgz<br />
cd mozcontrol/ <br />
regsvr32 mozctlx.dll <br />
<br />
<br />
== Install Fonts ==<br />
<br />
<br />
Steam requires the Tahoma font. You will have to get this from a Windows install or somewhere online. <br />
<br />
mv tahoma.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
Steam uses the Marlett font for the minimize/close/etc buttons. It's not absolutely required, but it will make it look nicer. Again, get this font from a Windows install or somewhere online. <br />
<br />
mv marlett.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
<br />
== Download Steam and Install ==<br />
<br />
<br />
wget http://steampowered.com/download/SteamInstall.exe<br />
wine SteamInstall.exe<br />
<br />
After it goes through the install procedure, it will automatically update itself and appear to shutdown and restart itself numerous times. Just be patient. Eventually it will ask you to create an account or login to an exisiting account. <br />
<br />
<br />
You cannot type text in the fields of the login box in Steam by default. In order to get keyboard focus, right-click on the text areas first, then type in your username and password. You may want to check "Remember my password" so you don't have to go through this hassle everytime Steam starts. <br />
<br />
<br />
=== Alternate Login Fix Method ===<br />
<br />
<br />
If right-clicking on the text areas does not give you focus and you are unable to type in your username and password, you will have to enable a virtual desktop. First, go on to the next step of the Wiki describing how to start Steam correctly. Then, run winecfg<br />
<br />
winecfg<br />
<br />
Go to the "Graphics" tab, check the "Emulate a virtual desktop" box, and enter a resolution of 1024x768 or higher. Press OK and close the program. <br />
<br />
Start Steam. It should start in a larger WINE window. Now you can enter your username and passowrd. Remember to check "Remember my password". After you confirm you can login, close Steam. <br />
<br />
Open winecfg, disable the virtual desktop, and start Steam again. It should login now without prompting for a username and password<br />
<br />
<br />
After you login, it will update some more and finally bring up the Steam main menu and you should be able to operate Steam without problems.<br />
<br />
== Starting Steam ==<br />
<br />
<br />
In order to start Steam again later, you need to first change to the Steam directory, and then run<br />
<br />
wine steam.exe<br />
<br />
Giving WINE a path to steam.exe '''will not work'''. '''Do not do this''':<br />
<br />
wine ~/.wine/drive_c/Program\ Files/Steam/steam.exe<br />
<br />
Alternatively, you may use this method:<br />
<br />
wine "C:\\Program Files\\Steam\\steam.exe" <br />
<br />
You should make a small startup script to start Steam, for example, ''steam.sh''<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
# WINE binary<br />
CDLOADER_WINE="wine"<br />
<br />
# Steam directory<br />
STEAMDIR="$HOME/.wine/drive_c/Program Files/Steam"<br />
<br />
cd "$STEAMDIR"<br />
<br />
$CDLOADER_WINE "steam.exe" -- "$@" <br />
</pre><br />
<br />
== Using a Pre-Existing Steam Install ==<br />
<br />
<br />
If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to ~/.wine/drive_c/Program Files/Steam/ . However, be sure to do '''all''' the previous steps in this Wiki. Confirm Steam launches and logs into your account, ''then'' do this:<br />
<br />
cd ~/.wine/drive_c/Program\ Files/ <br />
mv Steam/ Steam.backup/ (or you can just delete the directory)<br />
ln -s /mnt/windows_partition/Program\ Files/Steam/<br />
<br />
<br />
== Running Steam in a second X Server==<br />
<br />
<br />
Assuming you are using the script above to start Steam, make a new script, called x.steam.sh . You should run this when you want to start Steam in a new X server, and steam.sh if you want Steam to start in the current X server.<br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISPLAY=:1.0<br />
<br />
xinit $HOME/steam.sh $* -- :1<br />
</pre><br />
<br />
Now you can use CTRL+ALT+F7 to get to your first X server with your normal desktop, and CTRL+ALT+F8 to go back to your game. <br />
<br />
Because the second X server is ''only'' running the game and the first X server with all your programs is backgrounded, performance should increase. In addition, it is much more convenient to switch X servers while in game to access other resources, rather than having to exit the game completely or alt-tab out. Finally, it is useful for when Steam or WINE goes haywire and leaves a bunch of processes in memory after Steam crashes. Simply CTRL+ALT+BACKSPACE on the second X server to kill that X and all processes on that desktop will terminate as well. <br />
<br />
'''If you can't switch between X servers with the CTRL+ALT keys''': Make sure your keyboard is set correctly in your xorg.conf. There may be help in [http://bbs.archlinux.org/viewtopic.php?t=18115 this thread].<br />
<br />
== Known Issues ==<br />
<br />
<br />
Besides not being able to type in the login window, here are some other issues:<br />
<br />
* The Steam windows do not respect WM desktop workspaces. All Steam windows will appear on all workspaces. In addition, all Steam windows will always be on top of other windows. (confirmed on Openbox only)<br />
* The system tray icon may not be placed in your WM's system tray. Instead it will be in a floating window, named "WINE System Tray Adapter". It still works as expected, however. (confirmed on Openbox only)<br />
* Switching the Audio Driver in "winecfg" from OSS to ALSA causes games to hang. (confirmed only with Half-Life 1 based games)</div>Slashhttps://wiki.archlinux.org/index.php?title=Steam&diff=14249Steam2006-07-14T00:21:35Z<p>Slash: /* Running Steam in a second X Server */</p>
<hr />
<div>[[Category:Games]][[Category:Installation]]<br />
<br />
Steam is a content delivery system made by Valve Software. It is most known as the platform needed to play Half-Life 1 and Half-Life 2 based games (Counter-Strike, Day of Defeat, etc), but now offers many other games from other developers. For more information, please see [http://www.steampowered.com/ SteamPowered.com]<br />
<br />
<br />
This article will describe how install and run it on Arch Linux using [http://winehq.org/ WINE].<br />
<br />
<br />
== Preparation ==<br />
<br />
<br />
If you have an old ~/.wine/ directory, you may consider deleting it completely or backing it up. Old settings from previous installs may mess things up and Steam may not work correctly. If you do not have WINE installed yet, install it with pacman (you need the extra repository enabled in your /etc/pacman.conf file):<br />
<br />
pacman -Sy wine<br />
<br />
Now run the wine configuration program once to create an initial ~/.wine/ <br />
<br />
winecfg<br />
<br />
== Install Mozilla ActiveX Controls ==<br />
<br />
<br />
cd ~/.wine/drive_c/Program\ Files/<br />
wget http://downloads.transgaming.com/mozilla_control_downloads/mozcontrol.tgz<br />
tar zxvf mozcontrol.tgz<br />
cd mozcontrol/ <br />
regsvr32 mozctlx.dll <br />
<br />
<br />
== Install Fonts ==<br />
<br />
<br />
Steam requires the Tahoma font. You will have to get this from a Windows install or somewhere online. <br />
<br />
mv tahoma.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
Steam uses the Marlett font for the minimize/close/etc buttons. It's not absolutely required, but it will make it look nicer. Again, get this font from a Windows install or somewhere online. <br />
<br />
mv marlett.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
<br />
== Download Steam and Install ==<br />
<br />
<br />
wget http://steampowered.com/download/SteamInstall.exe<br />
wine SteamInstall.exe<br />
<br />
After it goes through the install procedure, it will automatically update itself and appear to shutdown and restart itself numerous times. Just be patient. Eventually it will ask you to create an account or login to an exisiting account. <br />
<br />
<br />
You cannot type text in the fields of the login box in Steam by default. In order to get keyboard focus, right-click on the text areas first, then type in your username and password. You may want to check "Remember my password" so you don't have to go through this hassle everytime Steam starts. <br />
<br />
<br />
=== Alternate Login Fix Method ===<br />
<br />
<br />
If right-clicking on the text areas does not give you focus and you are unable to type in your username and password, you will have to enable a virtual desktop. First, go on to the next step of the Wiki describing how to start Steam correctly. Then, run winecfg<br />
<br />
winecfg<br />
<br />
Go to the "Graphics" tab, check the "Emulate a virtual desktop" box, and enter a resolution of 1024x768 or higher. Press OK and close the program. <br />
<br />
Start Steam. It should start in a larger WINE window. Now you can enter your username and passowrd. Remember to check "Remember my password". After you confirm you can login, close Steam. <br />
<br />
Open winecfg, disable the virtual desktop, and start Steam again. It should login now without prompting for a username and password<br />
<br />
<br />
After you login, it will update some more and finally bring up the Steam main menu and you should be able to operate Steam without problems.<br />
<br />
== Starting Steam ==<br />
<br />
<br />
In order to start Steam again later, you need to first change to the Steam directory, and then run<br />
<br />
wine steam.exe<br />
<br />
Giving WINE a path to steam.exe '''will not work'''. '''Do not do this''':<br />
<br />
wine ~/.wine/drive_c/Program\ Files/Steam/steam.exe<br />
<br />
Alternatively, you may use this method:<br />
<br />
wine "C:\\Program Files\\Steam\\steam.exe" <br />
<br />
You should make a small startup script to start Steam, for example, ''steam.sh''<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
# WINE binary<br />
CDLOADER_WINE="wine"<br />
<br />
# Steam directory<br />
STEAMDIR="$HOME/.wine/drive_c/Program Files/Steam"<br />
<br />
cd "$STEAMDIR"<br />
<br />
$CDLOADER_WINE "steam.exe" -- "$@" <br />
</pre><br />
<br />
== Using a Pre-Existing Steam Install ==<br />
<br />
<br />
If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to ~/.wine/drive_c/Program Files/Steam/ . However, be sure to do '''all''' the previous steps in this Wiki. Confirm Steam launches and logs into your account, ''then'' do this:<br />
<br />
cd ~/.wine/drive_c/Program\ Files/ <br />
mv Steam/ Steam.backup/ (or you can just delete the directory)<br />
ln -s /mnt/windows_partition/Program\ Files/Steam/<br />
<br />
<br />
== Running Steam in a second X Server==<br />
<br />
<br />
Assuming you are using the script above to start Steam, make a new script, called x.steam.sh . You should run this when you want to start Steam in a new X server, and steam.sh if you want Steam to start in the current X server.<br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISPLAY=:1.0<br />
<br />
xinit $HOME/steam.sh $* -- :1<br />
</pre><br />
<br />
Now you can use CTRL+ALT+F7 to get to your first X server with your normal desktop, and CTRL+ALT+F8 to go back to your game. <br />
<br />
Because the second X server is ''only'' running the game and the first X server with all your programs is backgrounded, performance should increase. In addition, it is much more convenient to switch X servers while in game to access other resources, rather than having to exit the game completely or alt-tab out. Finally, it is useful for when Steam or WINE goes haywire and leaves a bunch of processes in memory after Steam crashes. Simply CTRL+ALT+BACKSPACE on the second X server to kill that X and all processes on that desktop will terminate as well. <br />
<br />
'''If you can't switch between X servers with the CTRL+ALT keys''': Make sure your keyboard is set correctly in your xorg.conf. For example, the Arch Linux hwd program often sets the "XkbModel" to "pc105" when it should be "pc104".<br />
<br />
== Known Issues ==<br />
<br />
<br />
Besides not being able to type in the login window, here are some other issues:<br />
<br />
* The Steam windows do not respect WM desktop workspaces. All Steam windows will appear on all workspaces. In addition, all Steam windows will always be on top of other windows. (confirmed on Openbox only)<br />
* The system tray icon may not be placed in your WM's system tray. Instead it will be in a floating window, named "WINE System Tray Adapter". It still works as expected, however. (confirmed on Openbox only)<br />
* Switching the Audio Driver in "winecfg" from OSS to ALSA causes games to hang. (confirmed only with Half-Life 1 based games)</div>Slashhttps://wiki.archlinux.org/index.php?title=Steam&diff=14248Steam2006-07-14T00:19:46Z<p>Slash: </p>
<hr />
<div>[[Category:Games]][[Category:Installation]]<br />
<br />
Steam is a content delivery system made by Valve Software. It is most known as the platform needed to play Half-Life 1 and Half-Life 2 based games (Counter-Strike, Day of Defeat, etc), but now offers many other games from other developers. For more information, please see [http://www.steampowered.com/ SteamPowered.com]<br />
<br />
<br />
This article will describe how install and run it on Arch Linux using [http://winehq.org/ WINE].<br />
<br />
<br />
== Preparation ==<br />
<br />
<br />
If you have an old ~/.wine/ directory, you may consider deleting it completely or backing it up. Old settings from previous installs may mess things up and Steam may not work correctly. If you do not have WINE installed yet, install it with pacman (you need the extra repository enabled in your /etc/pacman.conf file):<br />
<br />
pacman -Sy wine<br />
<br />
Now run the wine configuration program once to create an initial ~/.wine/ <br />
<br />
winecfg<br />
<br />
== Install Mozilla ActiveX Controls ==<br />
<br />
<br />
cd ~/.wine/drive_c/Program\ Files/<br />
wget http://downloads.transgaming.com/mozilla_control_downloads/mozcontrol.tgz<br />
tar zxvf mozcontrol.tgz<br />
cd mozcontrol/ <br />
regsvr32 mozctlx.dll <br />
<br />
<br />
== Install Fonts ==<br />
<br />
<br />
Steam requires the Tahoma font. You will have to get this from a Windows install or somewhere online. <br />
<br />
mv tahoma.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
Steam uses the Marlett font for the minimize/close/etc buttons. It's not absolutely required, but it will make it look nicer. Again, get this font from a Windows install or somewhere online. <br />
<br />
mv marlett.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
<br />
== Download Steam and Install ==<br />
<br />
<br />
wget http://steampowered.com/download/SteamInstall.exe<br />
wine SteamInstall.exe<br />
<br />
After it goes through the install procedure, it will automatically update itself and appear to shutdown and restart itself numerous times. Just be patient. Eventually it will ask you to create an account or login to an exisiting account. <br />
<br />
<br />
You cannot type text in the fields of the login box in Steam by default. In order to get keyboard focus, right-click on the text areas first, then type in your username and password. You may want to check "Remember my password" so you don't have to go through this hassle everytime Steam starts. <br />
<br />
<br />
=== Alternate Login Fix Method ===<br />
<br />
<br />
If right-clicking on the text areas does not give you focus and you are unable to type in your username and password, you will have to enable a virtual desktop. First, go on to the next step of the Wiki describing how to start Steam correctly. Then, run winecfg<br />
<br />
winecfg<br />
<br />
Go to the "Graphics" tab, check the "Emulate a virtual desktop" box, and enter a resolution of 1024x768 or higher. Press OK and close the program. <br />
<br />
Start Steam. It should start in a larger WINE window. Now you can enter your username and passowrd. Remember to check "Remember my password". After you confirm you can login, close Steam. <br />
<br />
Open winecfg, disable the virtual desktop, and start Steam again. It should login now without prompting for a username and password<br />
<br />
<br />
After you login, it will update some more and finally bring up the Steam main menu and you should be able to operate Steam without problems.<br />
<br />
== Starting Steam ==<br />
<br />
<br />
In order to start Steam again later, you need to first change to the Steam directory, and then run<br />
<br />
wine steam.exe<br />
<br />
Giving WINE a path to steam.exe '''will not work'''. '''Do not do this''':<br />
<br />
wine ~/.wine/drive_c/Program\ Files/Steam/steam.exe<br />
<br />
Alternatively, you may use this method:<br />
<br />
wine "C:\\Program Files\\Steam\\steam.exe" <br />
<br />
You should make a small startup script to start Steam, for example, ''steam.sh''<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
# WINE binary<br />
CDLOADER_WINE="wine"<br />
<br />
# Steam directory<br />
STEAMDIR="$HOME/.wine/drive_c/Program Files/Steam"<br />
<br />
cd "$STEAMDIR"<br />
<br />
$CDLOADER_WINE "steam.exe" -- "$@" <br />
</pre><br />
<br />
== Using a Pre-Existing Steam Install ==<br />
<br />
<br />
If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to ~/.wine/drive_c/Program Files/Steam/ . However, be sure to do '''all''' the previous steps in this Wiki. Confirm Steam launches and logs into your account, ''then'' do this:<br />
<br />
cd ~/.wine/drive_c/Program\ Files/ <br />
mv Steam/ Steam.backup/ (or you can just delete the directory)<br />
ln -s /mnt/windows_partition/Program\ Files/Steam/<br />
<br />
<br />
== Running Steam in a second X Server==<br />
<br />
<br />
Assuming you are using the script above to start Steam, make a new script, called x.steam.sh . You should run this when you want to start Steam in a new X server, and steam.sh if you want Steam to start in the current X server.<br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISPLAY=:1.0<br />
<br />
xinit $HOME/steam.sh $* -- :1<br />
</pre><br />
<br />
Now you can use CTRL+ALT+F7 to get to your first X server with your normal desktop, and CTRL+ALT+F8 to go back to your game. <br />
<br />
Because the second X server is ''only'' running the game and the first X server with all your programs is backgrounded, performance should increase. In addition, it is much more convenient to switch X servers while in game to access other resources, rather than having to exit the game completely or alt-tab out. Finally, it is useful for when Steam or WINE goes haywire and leaves a bunch of processes in memory after Steam crashes. Simply CTRL+ALT+BACKSPACE on the second X server to kill that X and all processes on that desktop will terminate as well. <br />
<br />
'''If you can't switch desktops with the CTRL+ALT keys''': Make sure your keyboard is set correctly in your xorg.conf. For example, the Arch Linux hwd program often sets the "XkbModel" to "pc105" when it should be "pc104". <br />
<br />
<br />
== Known Issues ==<br />
<br />
<br />
Besides not being able to type in the login window, here are some other issues:<br />
<br />
* The Steam windows do not respect WM desktop workspaces. All Steam windows will appear on all workspaces. In addition, all Steam windows will always be on top of other windows. (confirmed on Openbox only)<br />
* The system tray icon may not be placed in your WM's system tray. Instead it will be in a floating window, named "WINE System Tray Adapter". It still works as expected, however. (confirmed on Openbox only)<br />
* Switching the Audio Driver in "winecfg" from OSS to ALSA causes games to hang. (confirmed only with Half-Life 1 based games)</div>Slashhttps://wiki.archlinux.org/index.php?title=Steam&diff=14247Steam2006-07-13T22:19:53Z<p>Slash: /* Alternate Login Fix Method */</p>
<hr />
<div>[[Category:Games]][[Category:Installation]]<br />
<br />
Steam is a content delivery system made by Valve Software. It is most known as the platform needed to play Half-Life 1 and Half-Life 2 based games (Counter-Strike, Day of Defeat, etc), but now offers many other games from other developers. For more information, please see [http://www.steampowered.com/ SteamPowered.com]<br />
<br />
<br />
This article will describe how install and run it on Arch Linux using [http://winehq.org/ WINE].<br />
<br />
<br />
== Preparation ==<br />
<br />
<br />
If you have an old ~/.wine/ directory, you may consider deleting it completely or backing it up. Old settings from previous installs may mess things up and Steam may not work correctly. If you do not have WINE installed yet, install it with pacman (you need the extra repository enabled in your /etc/pacman.conf file):<br />
<br />
pacman -Sy wine<br />
<br />
Now run the wine configuration program once to create an initial ~/.wine/ <br />
<br />
winecfg<br />
<br />
== Install Mozilla ActiveX Controls ==<br />
<br />
<br />
cd ~/.wine/drive_c/Program\ Files/<br />
wget http://downloads.transgaming.com/mozilla_control_downloads/mozcontrol.tgz<br />
tar zxvf mozcontrol.tgz<br />
cd mozcontrol/ <br />
regsvr32 mozctlx.dll <br />
<br />
<br />
== Install Fonts ==<br />
<br />
<br />
Steam requires the Tahoma font. You will have to get this from a Windows install or somewhere online. <br />
<br />
mv tahoma.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
Steam uses the Marlett font for the minimize/close/etc buttons. It's not absolutely required, but it will make it look nicer. Again, get this font from a Windows install or somewhere online. <br />
<br />
mv marlett.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
<br />
== Download Steam and Install ==<br />
<br />
<br />
wget http://steampowered.com/download/SteamInstall.exe<br />
wine SteamInstall.exe<br />
<br />
After it goes through the install procedure, it will automatically update itself and appear to shutdown and restart itself numerous times. Just be patient. Eventually it will ask you to create an account or login to an exisiting account. <br />
<br />
<br />
You cannot type text in the fields of the login box in Steam by default. In order to get keyboard focus, right-click on the text areas first, then type in your username and password. You may want to check "Remember my password" so you don't have to go through this hassle everytime Steam starts. <br />
<br />
<br />
=== Alternate Login Fix Method ===<br />
<br />
<br />
If right-clicking on the text areas does not give you focus and you are unable to type in your username and password, you will have to enable a virtual desktop. First, go on to the next step of the Wiki describing how to start Steam correctly. Then, run winecfg<br />
<br />
winecfg<br />
<br />
Go to the "Graphics" tab, check the "Emulate a virtual desktop" box, and enter a resolution of 1024x768 or higher. Press OK and close the program. <br />
<br />
Start Steam. It should start in a larger WINE window. Now you can enter your username and passowrd. Remember to check "Remember my password". After you confirm you can login, close Steam. <br />
<br />
Open winecfg, disable the virtual desktop, and start Steam again. It should login now without prompting for a username and password<br />
<br />
<br />
After you login, it will update some more and finally bring up the Steam main menu and you should be able to operate Steam without problems.<br />
<br />
== Starting Steam ==<br />
<br />
<br />
In order to start Steam again later, you need to first change to the Steam directory, and then run<br />
<br />
wine steam.exe<br />
<br />
Giving WINE a path to steam.exe '''will not work'''. '''Do not do this''':<br />
<br />
wine ~/.wine/drive_c/Program\ Files/Steam/steam.exe<br />
<br />
Alternatively, you may use this method:<br />
<br />
wine "C:\\Program Files\\Steam\\steam.exe" <br />
<br />
You should make a small startup script to start Steam, for example, ''steam.sh''<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
# WINE binary<br />
CDLOADER_WINE="wine"<br />
<br />
# Steam directory<br />
STEAMDIR="$HOME/.wine/drive_c/Program Files/Steam"<br />
<br />
cd "$STEAMDIR"<br />
<br />
$CDLOADER_WINE "steam.exe" -- "$@" <br />
</pre><br />
<br />
== Using a Pre-Existing Steam Install ==<br />
<br />
<br />
If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to ~/.wine/drive_c/Program Files/Steam/ . However, be sure to do '''all''' the previous steps in this Wiki. Confirm Steam launches and logs into your account, ''then'' do this:<br />
<br />
cd ~/.wine/drive_c/Program\ Files/ <br />
mv Steam/ Steam.backup/ (or you can just delete the directory)<br />
ln -s /mnt/windows_partition/Program\ Files/Steam/<br />
<br />
<br />
== Known Issues ==<br />
<br />
<br />
Besides not being able to type in the login window, here are some other issues:<br />
<br />
* The Steam windows do not respect WM desktop workspaces. All Steam windows will appear on all workspaces. In addition, all Steam windows will always be on top of other windows. (confirmed on Openbox only)<br />
* The system tray icon may not be placed in your WM's system tray. Instead it will be in a floating window, named "WINE System Tray Adapter". It still works as expected, however. (confirmed on Openbox only)<br />
* Switching the Audio Driver in "winecfg" from OSS to ALSA causes games to hang. (confirmed only with Half-Life 1 based games)</div>Slashhttps://wiki.archlinux.org/index.php?title=Steam&diff=14246Steam2006-07-13T22:17:20Z<p>Slash: </p>
<hr />
<div>[[Category:Games]][[Category:Installation]]<br />
<br />
Steam is a content delivery system made by Valve Software. It is most known as the platform needed to play Half-Life 1 and Half-Life 2 based games (Counter-Strike, Day of Defeat, etc), but now offers many other games from other developers. For more information, please see [http://www.steampowered.com/ SteamPowered.com]<br />
<br />
<br />
This article will describe how install and run it on Arch Linux using [http://winehq.org/ WINE].<br />
<br />
<br />
== Preparation ==<br />
<br />
<br />
If you have an old ~/.wine/ directory, you may consider deleting it completely or backing it up. Old settings from previous installs may mess things up and Steam may not work correctly. If you do not have WINE installed yet, install it with pacman (you need the extra repository enabled in your /etc/pacman.conf file):<br />
<br />
pacman -Sy wine<br />
<br />
Now run the wine configuration program once to create an initial ~/.wine/ <br />
<br />
winecfg<br />
<br />
== Install Mozilla ActiveX Controls ==<br />
<br />
<br />
cd ~/.wine/drive_c/Program\ Files/<br />
wget http://downloads.transgaming.com/mozilla_control_downloads/mozcontrol.tgz<br />
tar zxvf mozcontrol.tgz<br />
cd mozcontrol/ <br />
regsvr32 mozctlx.dll <br />
<br />
<br />
== Install Fonts ==<br />
<br />
<br />
Steam requires the Tahoma font. You will have to get this from a Windows install or somewhere online. <br />
<br />
mv tahoma.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
Steam uses the Marlett font for the minimize/close/etc buttons. It's not absolutely required, but it will make it look nicer. Again, get this font from a Windows install or somewhere online. <br />
<br />
mv marlett.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
<br />
== Download Steam and Install ==<br />
<br />
<br />
wget http://steampowered.com/download/SteamInstall.exe<br />
wine SteamInstall.exe<br />
<br />
After it goes through the install procedure, it will automatically update itself and appear to shutdown and restart itself numerous times. Just be patient. Eventually it will ask you to create an account or login to an exisiting account. <br />
<br />
<br />
You cannot type text in the fields of the login box in Steam by default. In order to get keyboard focus, right-click on the text areas first, then type in your username and password. You may want to check "Remember my password" so you don't have to go through this hassle everytime Steam starts. <br />
<br />
<br />
=== Alternate Login Fix Method ===<br />
<br />
<br />
If right-clicking on the text areas does not give you focus and you are unable to type in your username and password, you will have to enable a virtual desktop. Start winecfg<br />
<br />
winecfg<br />
<br />
Go to the "Graphics" tab, check the "Emulate a virtual desktop" box, and enter a resolution of 1024x768 or higher. Press OK and close the program. Start Steam again. It should start in a larger WINE window. Now you can enter your username and passowrd. Remember to check "Remember my password". After you confirm you can login, close Steam. Open winecfg again, disable the virtual desktop, and start Steam again. It should login now without prompting for a username and password<br />
<br />
<br />
After you login, it will update some more and finally bring up the Steam main menu and you should be able to operate Steam without problems.<br />
<br />
<br />
== Starting Steam ==<br />
<br />
<br />
In order to start Steam again later, you need to first change to the Steam directory, and then run<br />
<br />
wine steam.exe<br />
<br />
Giving WINE a path to steam.exe '''will not work'''. '''Do not do this''':<br />
<br />
wine ~/.wine/drive_c/Program\ Files/Steam/steam.exe<br />
<br />
Alternatively, you may use this method:<br />
<br />
wine "C:\\Program Files\\Steam\\steam.exe" <br />
<br />
You should make a small startup script to start Steam, for example, ''steam.sh''<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
# WINE binary<br />
CDLOADER_WINE="wine"<br />
<br />
# Steam directory<br />
STEAMDIR="$HOME/.wine/drive_c/Program Files/Steam"<br />
<br />
cd "$STEAMDIR"<br />
<br />
$CDLOADER_WINE "steam.exe" -- "$@" <br />
</pre><br />
<br />
== Using a Pre-Existing Steam Install ==<br />
<br />
<br />
If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to ~/.wine/drive_c/Program Files/Steam/ . However, be sure to do '''all''' the previous steps in this Wiki. Confirm Steam launches and logs into your account, ''then'' do this:<br />
<br />
cd ~/.wine/drive_c/Program\ Files/ <br />
mv Steam/ Steam.backup/ (or you can just delete the directory)<br />
ln -s /mnt/windows_partition/Program\ Files/Steam/<br />
<br />
<br />
== Known Issues ==<br />
<br />
<br />
Besides not being able to type in the login window, here are some other issues:<br />
<br />
* The Steam windows do not respect WM desktop workspaces. All Steam windows will appear on all workspaces. In addition, all Steam windows will always be on top of other windows. (confirmed on Openbox only)<br />
* The system tray icon may not be placed in your WM's system tray. Instead it will be in a floating window, named "WINE System Tray Adapter". It still works as expected, however. (confirmed on Openbox only)<br />
* Switching the Audio Driver in "winecfg" from OSS to ALSA causes games to hang. (confirmed only with Half-Life 1 based games)</div>Slashhttps://wiki.archlinux.org/index.php?title=Steam&diff=14245Steam2006-07-13T22:10:28Z<p>Slash: /* Starting Steam */</p>
<hr />
<div>[[Category:Games]][[Category:Installation]]<br />
<br />
Steam is a content delivery system made by Valve Software. It is most known as the platform needed to play Half-Life 1 and Half-Life 2 based games (Counter-Strike, Day of Defeat, etc), but now offers many other games from other developers. For more information, please see [http://www.steampowered.com/ SteamPowered.com]<br />
<br />
<br />
This article will describe how install and run it on Arch Linux using [http://winehq.org/ WINE].<br />
<br />
<br />
== Preparation ==<br />
<br />
<br />
If you have an old ~/.wine/ directory, you may consider deleting it completely or backing it up. Old settings from previous installs may mess things up and Steam may not work correctly. If you do not have WINE installed yet, install it with pacman (you need the extra repository enabled in your /etc/pacman.conf file):<br />
<br />
pacman -Sy wine<br />
<br />
Now run the wine configuration program once to create an initial ~/.wine/ <br />
<br />
winecfg<br />
<br />
== Install Mozilla ActiveX Controls ==<br />
<br />
<br />
cd ~/.wine/drive_c/Program\ Files/<br />
wget http://downloads.transgaming.com/mozilla_control_downloads/mozcontrol.tgz<br />
tar zxvf mozcontrol.tgz<br />
cd mozcontrol/ <br />
regsvr32 mozctlx.dll <br />
<br />
<br />
== Install Fonts ==<br />
<br />
<br />
Steam requires the Tahoma font. You will have to get this from a Windows install or somewhere online. <br />
<br />
mv tahoma.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
Steam uses the Marlett font for the minimize/close/etc buttons. It's not absolutely required, but it will make it look nicer. Again, get this font from a Windows install or somewhere online. <br />
<br />
mv marlett.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
<br />
== Download Steam and Install ==<br />
<br />
<br />
wget http://steampowered.com/download/SteamInstall.exe<br />
wine SteamInstall.exe<br />
<br />
After it goes through the install procedure, it will automatically update itself and appear to shutdown and restart itself numerous times. Just be patient. Eventually it will ask you to create an account or login to an exisiting account. <br />
<br />
<br />
You cannot type text in the fields of the login box in Steam by default. In order to get keyboard focus, right-click on the text areas first, then type in your username and password. You may want to check "Remember my password" so you don't have to go through this hassle everytime Steam starts. <br />
<br />
<br />
After you login, it will update some more and finally bring up the Steam main menu and you should be able to operate Steam without problems.<br />
<br />
<br />
== Starting Steam ==<br />
<br />
<br />
In order to start Steam again later, you need to first change to the Steam directory, and then run<br />
<br />
wine steam.exe<br />
<br />
Giving WINE a path to steam.exe '''will not work'''. '''Do not do this''':<br />
<br />
wine ~/.wine/drive_c/Program\ Files/Steam/steam.exe<br />
<br />
Alternatively, you may use this method:<br />
<br />
wine "C:\\Program Files\\Steam\\steam.exe" <br />
<br />
You should make a small startup script to start Steam, for example, ''steam.sh''<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
# WINE binary<br />
CDLOADER_WINE="wine"<br />
<br />
# Steam directory<br />
STEAMDIR="$HOME/.wine/drive_c/Program Files/Steam"<br />
<br />
cd "$STEAMDIR"<br />
<br />
$CDLOADER_WINE "steam.exe" -- "$@" <br />
</pre><br />
<br />
== Using a Pre-Existing Steam Install ==<br />
<br />
<br />
If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to ~/.wine/drive_c/Program Files/Steam/ . However, be sure to do '''all''' the previous steps in this Wiki. Confirm Steam launches and logs into your account, ''then'' do this:<br />
<br />
cd ~/.wine/drive_c/Program\ Files/ <br />
mv Steam/ Steam.backup/ (or you can just delete the directory)<br />
ln -s /mnt/windows_partition/Program\ Files/Steam/<br />
<br />
<br />
== Known Issues ==<br />
<br />
<br />
Besides not being able to type in the login window, here are some other issues:<br />
<br />
* The Steam windows do not respect WM desktop workspaces. All Steam windows will appear on all workspaces. In addition, all Steam windows will always be on top of other windows. (confirmed on Openbox only)<br />
* The system tray icon may not be placed in your WM's system tray. Instead it will be in a floating window, named "WINE System Tray Adapter". It still works as expected, however. (confirmed on Openbox only)<br />
* Switching the Audio Driver in "winecfg" from OSS to ALSA causes games to hang. (confirmed only with Half-Life 1 based games)</div>Slashhttps://wiki.archlinux.org/index.php?title=Steam&diff=14244Steam2006-07-13T21:42:02Z<p>Slash: /* Known Issues */</p>
<hr />
<div>[[Category:Games]][[Category:Installation]]<br />
<br />
Steam is a content delivery system made by Valve Software. It is most known as the platform needed to play Half-Life 1 and Half-Life 2 based games (Counter-Strike, Day of Defeat, etc), but now offers many other games from other developers. For more information, please see [http://www.steampowered.com/ SteamPowered.com]<br />
<br />
<br />
This article will describe how install and run it on Arch Linux using [http://winehq.org/ WINE].<br />
<br />
<br />
== Preparation ==<br />
<br />
<br />
If you have an old ~/.wine/ directory, you may consider deleting it completely or backing it up. Old settings from previous installs may mess things up and Steam may not work correctly. If you do not have WINE installed yet, install it with pacman (you need the extra repository enabled in your /etc/pacman.conf file):<br />
<br />
pacman -Sy wine<br />
<br />
Now run the wine configuration program once to create an initial ~/.wine/ <br />
<br />
winecfg<br />
<br />
== Install Mozilla ActiveX Controls ==<br />
<br />
<br />
cd ~/.wine/drive_c/Program\ Files/<br />
wget http://downloads.transgaming.com/mozilla_control_downloads/mozcontrol.tgz<br />
tar zxvf mozcontrol.tgz<br />
cd mozcontrol/ <br />
regsvr32 mozctlx.dll <br />
<br />
<br />
== Install Fonts ==<br />
<br />
<br />
Steam requires the Tahoma font. You will have to get this from a Windows install or somewhere online. <br />
<br />
mv tahoma.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
Steam uses the Marlett font for the minimize/close/etc buttons. It's not absolutely required, but it will make it look nicer. Again, get this font from a Windows install or somewhere online. <br />
<br />
mv marlett.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
<br />
== Download Steam and Install ==<br />
<br />
<br />
wget http://steampowered.com/download/SteamInstall.exe<br />
wine SteamInstall.exe<br />
<br />
After it goes through the install procedure, it will automatically update itself and appear to shutdown and restart itself numerous times. Just be patient. Eventually it will ask you to create an account or login to an exisiting account. <br />
<br />
<br />
You cannot type text in the fields of the login box in Steam by default. In order to get keyboard focus, right-click on the text areas first, then type in your username and password. You may want to check "Remember my password" so you don't have to go through this hassle everytime Steam starts. <br />
<br />
<br />
After you login, it will update some more and finally bring up the Steam main menu and you should be able to operate Steam without problems.<br />
<br />
<br />
== Starting Steam ==<br />
<br />
<br />
In order to start Steam again later, you need to first change to the Steam directory, and then run<br />
<br />
wine steam.exe<br />
<br />
Giving WINE a path to steam.exe '''will not work'''. Do not do this:<br />
<br />
wine ~/.wine/drive_c/Program\ Files/Steam/steam.exe<br />
<br />
You should make a small startup script to start Steam, for example, ''steam.sh''<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
# WINE binary<br />
CDLOADER_WINE="wine"<br />
<br />
# Steam directory<br />
STEAMDIR="$HOME/.wine/drive_c/Program Files/Steam"<br />
<br />
cd "$STEAMDIR"<br />
<br />
$CDLOADER_WINE "steam.exe" -- "$@" <br />
</pre><br />
<br />
<br />
== Using a Pre-Existing Steam Install ==<br />
<br />
<br />
If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to ~/.wine/drive_c/Program Files/Steam/ . However, be sure to do '''all''' the previous steps in this Wiki. Confirm Steam launches and logs into your account, ''then'' do this:<br />
<br />
cd ~/.wine/drive_c/Program\ Files/ <br />
mv Steam/ Steam.backup/ (or you can just delete the directory)<br />
ln -s /mnt/windows_partition/Program\ Files/Steam/<br />
<br />
<br />
== Known Issues ==<br />
<br />
<br />
Besides not being able to type in the login window, here are some other issues:<br />
<br />
* The Steam windows do not respect WM desktop workspaces. All Steam windows will appear on all workspaces. In addition, all Steam windows will always be on top of other windows. (confirmed on Openbox only)<br />
* The system tray icon may not be placed in your WM's system tray. Instead it will be in a floating window, named "WINE System Tray Adapter". It still works as expected, however. (confirmed on Openbox only)<br />
* Switching the Audio Driver in "winecfg" from OSS to ALSA causes games to hang. (confirmed only with Half-Life 1 based games)</div>Slashhttps://wiki.archlinux.org/index.php?title=Steam&diff=14243Steam2006-07-13T21:41:23Z<p>Slash: /* Known Issues */</p>
<hr />
<div>[[Category:Games]][[Category:Installation]]<br />
<br />
Steam is a content delivery system made by Valve Software. It is most known as the platform needed to play Half-Life 1 and Half-Life 2 based games (Counter-Strike, Day of Defeat, etc), but now offers many other games from other developers. For more information, please see [http://www.steampowered.com/ SteamPowered.com]<br />
<br />
<br />
This article will describe how install and run it on Arch Linux using [http://winehq.org/ WINE].<br />
<br />
<br />
== Preparation ==<br />
<br />
<br />
If you have an old ~/.wine/ directory, you may consider deleting it completely or backing it up. Old settings from previous installs may mess things up and Steam may not work correctly. If you do not have WINE installed yet, install it with pacman (you need the extra repository enabled in your /etc/pacman.conf file):<br />
<br />
pacman -Sy wine<br />
<br />
Now run the wine configuration program once to create an initial ~/.wine/ <br />
<br />
winecfg<br />
<br />
== Install Mozilla ActiveX Controls ==<br />
<br />
<br />
cd ~/.wine/drive_c/Program\ Files/<br />
wget http://downloads.transgaming.com/mozilla_control_downloads/mozcontrol.tgz<br />
tar zxvf mozcontrol.tgz<br />
cd mozcontrol/ <br />
regsvr32 mozctlx.dll <br />
<br />
<br />
== Install Fonts ==<br />
<br />
<br />
Steam requires the Tahoma font. You will have to get this from a Windows install or somewhere online. <br />
<br />
mv tahoma.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
Steam uses the Marlett font for the minimize/close/etc buttons. It's not absolutely required, but it will make it look nicer. Again, get this font from a Windows install or somewhere online. <br />
<br />
mv marlett.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
<br />
== Download Steam and Install ==<br />
<br />
<br />
wget http://steampowered.com/download/SteamInstall.exe<br />
wine SteamInstall.exe<br />
<br />
After it goes through the install procedure, it will automatically update itself and appear to shutdown and restart itself numerous times. Just be patient. Eventually it will ask you to create an account or login to an exisiting account. <br />
<br />
<br />
You cannot type text in the fields of the login box in Steam by default. In order to get keyboard focus, right-click on the text areas first, then type in your username and password. You may want to check "Remember my password" so you don't have to go through this hassle everytime Steam starts. <br />
<br />
<br />
After you login, it will update some more and finally bring up the Steam main menu and you should be able to operate Steam without problems.<br />
<br />
<br />
== Starting Steam ==<br />
<br />
<br />
In order to start Steam again later, you need to first change to the Steam directory, and then run<br />
<br />
wine steam.exe<br />
<br />
Giving WINE a path to steam.exe '''will not work'''. Do not do this:<br />
<br />
wine ~/.wine/drive_c/Program\ Files/Steam/steam.exe<br />
<br />
You should make a small startup script to start Steam, for example, ''steam.sh''<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
# WINE binary<br />
CDLOADER_WINE="wine"<br />
<br />
# Steam directory<br />
STEAMDIR="$HOME/.wine/drive_c/Program Files/Steam"<br />
<br />
cd "$STEAMDIR"<br />
<br />
$CDLOADER_WINE "steam.exe" -- "$@" <br />
</pre><br />
<br />
<br />
== Using a Pre-Existing Steam Install ==<br />
<br />
<br />
If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to ~/.wine/drive_c/Program Files/Steam/ . However, be sure to do '''all''' the previous steps in this Wiki. Confirm Steam launches and logs into your account, ''then'' do this:<br />
<br />
cd ~/.wine/drive_c/Program\ Files/ <br />
mv Steam/ Steam.backup/ (or you can just delete the directory)<br />
ln -s /mnt/windows_partition/Program\ Files/Steam/<br />
<br />
<br />
== Known Issues ==<br />
<br />
<br />
Besides not being able to type in the login window, here are some other issues:<br />
<br />
* The Steam windows do not respect WM desktop workspaces. All Steam windows will appear on all workspaces. In addition, all Steam windows will always be on top of other windows. (confirmed on Openbox only)<br />
* The system tray icon may not be placed in your WM's system tray. Instead it will be in a floating window, named "WINE System Tray Adapter". It still works as expected, however. (confirmed on Openbox only)<br />
* When switching the Audio Driver in "winecfg" from OSS to ALSA causes games to hang. (confirmed only with Half-Life 1 based games)</div>Slashhttps://wiki.archlinux.org/index.php?title=Steam&diff=14242Steam2006-07-13T21:22:14Z<p>Slash: </p>
<hr />
<div>[[Category:Games]][[Category:Installation]]<br />
<br />
Steam is a content delivery system made by Valve Software. It is most known as the platform needed to play Half-Life 1 and Half-Life 2 based games (Counter-Strike, Day of Defeat, etc), but now offers many other games from other developers. For more information, please see [http://www.steampowered.com/ SteamPowered.com]<br />
<br />
<br />
This article will describe how install and run it on Arch Linux using [http://winehq.org/ WINE].<br />
<br />
<br />
== Preparation ==<br />
<br />
<br />
If you have an old ~/.wine/ directory, you may consider deleting it completely or backing it up. Old settings from previous installs may mess things up and Steam may not work correctly. If you do not have WINE installed yet, install it with pacman (you need the extra repository enabled in your /etc/pacman.conf file):<br />
<br />
pacman -Sy wine<br />
<br />
Now run the wine configuration program once to create an initial ~/.wine/ <br />
<br />
winecfg<br />
<br />
== Install Mozilla ActiveX Controls ==<br />
<br />
<br />
cd ~/.wine/drive_c/Program\ Files/<br />
wget http://downloads.transgaming.com/mozilla_control_downloads/mozcontrol.tgz<br />
tar zxvf mozcontrol.tgz<br />
cd mozcontrol/ <br />
regsvr32 mozctlx.dll <br />
<br />
<br />
== Install Fonts ==<br />
<br />
<br />
Steam requires the Tahoma font. You will have to get this from a Windows install or somewhere online. <br />
<br />
mv tahoma.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
Steam uses the Marlett font for the minimize/close/etc buttons. It's not absolutely required, but it will make it look nicer. Again, get this font from a Windows install or somewhere online. <br />
<br />
mv marlett.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
<br />
== Download Steam and Install ==<br />
<br />
<br />
wget http://steampowered.com/download/SteamInstall.exe<br />
wine SteamInstall.exe<br />
<br />
After it goes through the install procedure, it will automatically update itself and appear to shutdown and restart itself numerous times. Just be patient. Eventually it will ask you to create an account or login to an exisiting account. <br />
<br />
<br />
You cannot type text in the fields of the login box in Steam by default. In order to get keyboard focus, right-click on the text areas first, then type in your username and password. You may want to check "Remember my password" so you don't have to go through this hassle everytime Steam starts. <br />
<br />
<br />
After you login, it will update some more and finally bring up the Steam main menu and you should be able to operate Steam without problems.<br />
<br />
<br />
== Starting Steam ==<br />
<br />
<br />
In order to start Steam again later, you need to first change to the Steam directory, and then run<br />
<br />
wine steam.exe<br />
<br />
Giving WINE a path to steam.exe '''will not work'''. Do not do this:<br />
<br />
wine ~/.wine/drive_c/Program\ Files/Steam/steam.exe<br />
<br />
You should make a small startup script to start Steam, for example, ''steam.sh''<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
# WINE binary<br />
CDLOADER_WINE="wine"<br />
<br />
# Steam directory<br />
STEAMDIR="$HOME/.wine/drive_c/Program Files/Steam"<br />
<br />
cd "$STEAMDIR"<br />
<br />
$CDLOADER_WINE "steam.exe" -- "$@" <br />
</pre><br />
<br />
<br />
== Using a Pre-Existing Steam Install ==<br />
<br />
<br />
If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to ~/.wine/drive_c/Program Files/Steam/ . However, be sure to do '''all''' the previous steps in this Wiki. Confirm Steam launches and logs into your account, ''then'' do this:<br />
<br />
cd ~/.wine/drive_c/Program\ Files/ <br />
mv Steam/ Steam.backup/ (or you can just delete the directory)<br />
ln -s /mnt/windows_partition/Program\ Files/Steam/<br />
<br />
<br />
== Known Issues ==<br />
<br />
<br />
Besides not being able to type in the login window, here are some other issues:<br />
<br />
* The Steam windows do not respect WM desktop workspaces. All Steam windows will appear on all workspaces (confirmed on Openbox only)<br />
* The system tray icon may not be placed in your WM's system tray. Instead it will be in a floating window, named "WINE System Tray Adapter". It still works as expected, however. (confirmed on Openbox only)<br />
* When switching the Audio Driver in "winecfg" from OSS to ALSA causes games to hang. (confirmed only with Half-Life 1 based games)</div>Slashhttps://wiki.archlinux.org/index.php?title=Steam&diff=14236Steam2006-07-13T05:36:43Z<p>Slash: </p>
<hr />
<div>[[Category:Games]][[Category:Installation]]<br />
<br />
Steam is a content delivery system made by Valve Software. It is most known as the platform needed to play Half-Life 1 and Half-Life 2 based games (Counter-Strike, Day of Defeat, etc), but now offers many other games from other developers. For more information, please see [http://www.steampowered.com/ SteamPowered.com]<br />
<br />
<br />
This article will describe how install and run it on Arch Linux using [http://winehq.org/ WINE].<br />
<br />
<br />
== Preparation ==<br />
<br />
<br />
If you have an old ~/.wine/ directory, you may consider deleting it completely or backing it up. Old settings from previous installs may mess things up and Steam may not work correctly. If you do not have WINE installed yet, install it with pacman (you need the extra repository enabled in your /etc/pacman.conf file):<br />
<br />
pacman -Sy wine<br />
<br />
Now run the wine configuration program once to create an initial ~/.wine/ <br />
<br />
winecfg<br />
<br />
== Install Mozilla ActiveX Controls ==<br />
<br />
<br />
cd ~/.wine/drive_c/Program\ Files/<br />
wget http://downloads.transgaming.com/mozilla_control_downloads/mozcontrol.tgz<br />
tar zxvf mozcontrol.tgz<br />
cd mozcontrol/ <br />
regsvr32 mozctlx.dll <br />
<br />
<br />
== Install Fonts ==<br />
<br />
<br />
Steam requires the Tahoma font. You will have to get this from a Windows install or somewhere online. <br />
<br />
mv tahoma.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
Steam uses the Marlett font for the minimize/close/etc buttons. It's not absolutely required, but it will make it look nicer. Again, get this font from a Windows install or somewhere online. <br />
<br />
mv marlett.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
<br />
== Download Steam and Install ==<br />
<br />
<br />
wget http://steampowered.com/download/SteamInstall.exe<br />
wine SteamInstall.exe<br />
<br />
After it goes through the install procedure, it will automatically update itself and appear to shutdown and restart itself numerous times. Just be patient. Eventually it will ask you to create an account or login to an exisiting account. <br />
<br />
<br />
You cannot type text in the fields of the login box in Steam by default. In order to get keyboard focus, right-click on the text areas first, then type in your username and password. You may want to check "Remember my password" so you don't have to go through this hassle everytime Steam starts. <br />
<br />
<br />
After you login, it will update some more and finally bring up the Steam main menu and you should be able to operate Steam without problems.<br />
<br />
<br />
== Starting Steam ==<br />
<br />
<br />
In order to start Steam again later, you need to first change to the Steam directory, and then run<br />
<br />
wine steam.exe<br />
<br />
Giving WINE a path to steam.exe '''will not work'''. Do not do this:<br />
<br />
wine ~/.wine/drive_c/Program\ Files/Steam/steam.exe<br />
<br />
You should make a small startup script to start Steam, for example, ''steam.sh''<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
# WINE binary<br />
CDLOADER_WINE="wine"<br />
<br />
# Steam directory<br />
STEAMDIR="$HOME/.wine/drive_c/Program Files/Steam"<br />
<br />
cd "$STEAMDIR"<br />
<br />
$CDLOADER_WINE "steam.exe" -- "$@" &<br />
</pre><br />
<br />
<br />
== Using a Pre-Existing Steam Install ==<br />
<br />
<br />
If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to ~/.wine/drive_c/Program Files/Steam/ . However, be sure to do '''all''' the previous steps in this Wiki. Confirm Steam launches and logs into your account, ''then'' do this:<br />
<br />
cd ~/.wine/drive_c/Program\ Files/ <br />
mv Steam/ Steam.backup/ (or you can just delete the directory)<br />
ln -s /mnt/windows_partition/Program\ Files/Steam/<br />
<br />
<br />
== Known Issues ==<br />
<br />
<br />
Besides not being able to type in the login window, here are some other issues:<br />
<br />
* The Steam windows do not respect WM desktop workspaces. All Steam windows will appear on all workspaces (confirmed on Openbox only)<br />
* The system tray icon may not be placed in your WM's system tray. Instead it will be in a floating window, named "WINE System Tray Adapter". It still works as expected, however. (confirmed on Openbox only)<br />
* When switching the Audio Driver in "winecfg" from OSS to ALSA causes games to hang. (confirmed only with Half-Life 1 based games)</div>Slashhttps://wiki.archlinux.org/index.php?title=Steam&diff=14235Steam2006-07-13T05:28:52Z<p>Slash: /* Preparation */</p>
<hr />
<div>[[Category:Games]][[Category:Installation]]<br />
<br />
Steam is a content delivery system made by Valve Software. It is most known as the platform needed to play Half-Life 1 and Half-Life 2 based games (Counter-Strike, Day of Defeat, etc), but now offers many other games from other developers. For more information, please see [http://www.steampowered.com/ SteamPowered.com]<br />
<br />
<br />
This article will describe how install and run it on Arch Linux using [http://winehq.org/ WINE].<br />
<br />
<br />
== Preparation ==<br />
<br />
<br />
If you have an old ~/.wine/ directory, you may consider deleting it completely or backing it up. Old settings from previous installs may mess things up and Steam may not work correctly. If you do not have WINE installed yet, install it with pacman (you need the extra repository enabled in your /etc/pacman.conf file):<br />
<br />
pacman -Sy wine<br />
<br />
Now run the wine configuration program once to create an initial ~/.wine/ <br />
<br />
winecfg<br />
<br />
== Install Mozilla ActiveX Controls ==<br />
<br />
<br />
cd ~/.wine/drive_c/Program\ Files/<br />
wget http://downloads.transgaming.com/mozilla_control_downloads/mozcontrol.tgz<br />
tar zxvf mozcontrol.tgz<br />
cd mozcontrol/ <br />
regsvr32 mozctlx.dll <br />
<br />
<br />
== Install Fonts ==<br />
<br />
<br />
Steam requires the Tahoma font. You will have to get this from a Windows install or somewhere online. <br />
<br />
mv tahoma.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
Steam uses the Marlett font for the minimize/close/etc buttons. It's not absolutely required, but it will make it look nicer. Again, get this font from a Windows install or somewhere online. <br />
<br />
mv marlett.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
<br />
== Download Steam and Install ==<br />
<br />
<br />
wget http://steampowered.com/download/SteamInstall.exe<br />
wine SteamInstall.exe<br />
<br />
After it goes through the install procedure, it will automatically update itself and appear to shutdown and restart itself numerous times. Just be patient. Eventually it will ask you to create an account or login to an exisiting account. <br />
<br />
<br />
You cannot type text in the fields of the login box in Steam by default. In order to get keyboard focus, right-click on the text areas first, then type in your username and password. You may want to check "Remember my password" so you don't have to go through this hassle everytime Steam starts. <br />
<br />
<br />
After you login, it will update some more and finally bring up the Steam main menu and you should be able to operate Steam without problems.<br />
<br />
<br />
== Starting Steam ==<br />
<br />
<br />
In order to start Steam again later, you need to first change to the Steam directory, and then run<br />
<br />
wine steam.exe<br />
<br />
Giving WINE a path to steam.exe '''will not work'''. Do not do this:<br />
<br />
wine ~/.wine/drive_c/Program\ Files/Steam/steam.exe<br />
<br />
You should make a small startup script to start Steam, for example, ''steam.sh''<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
# WINE binary<br />
CDLOADER_WINE="wine"<br />
<br />
# Steam directory<br />
STEAMDIR="$HOME/.wine/drive_c/Program Files/Steam"<br />
<br />
cd "$STEAMDIR"<br />
<br />
$CDLOADER_WINE "steam.exe" -- "$@" &<br />
</pre><br />
<br />
<br />
== Using a Pre-Existing Steam Install ==<br />
<br />
<br />
If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to ~/.wine/drive_c/Program Files/Steam/ . However, be sure to do '''all''' the previous steps in this Wiki. Confirm Steam launches and logs into your account, ''then'' do this:<br />
<br />
cd ~/.wine/drive_c/Program\ Files/ <br />
mv Steam/ Steam.backup/ (or you can just delete the directory)<br />
ln -s /mnt/windows_partition/Program\ Files/Steam/<br />
<br />
<br />
== Known Issues ==<br />
<br />
<br />
Besides not being able to type in the login window, here are some other issues:<br />
<br />
* The Steam windows do not respect WM desktop workspaces. All Steam windows will appear on all workspaces (confirmed on Openbox only)<br />
* The system tray icon may not be placed in your WM's system tray. Instead it will be in a floating window, named "WINE System Tray Adapter". It still works as expected, however. (confirmed on Openbox only)<br />
* When trying to run HL1-based games, switching the Audio Driver in "winecfg" from OSS to ALSA causes the game to hang.</div>Slashhttps://wiki.archlinux.org/index.php?title=Steam&diff=14234Steam2006-07-13T05:27:13Z<p>Slash: </p>
<hr />
<div>[[Category:Games]][[Category:Installation]]<br />
<br />
Steam is a content delivery system made by Valve Software. It is most known as the platform needed to play Half-Life 1 and Half-Life 2 based games (Counter-Strike, Day of Defeat, etc), but now offers many other games from other developers. For more information, please see [http://www.steampowered.com/ SteamPowered.com]<br />
<br />
<br />
This article will describe how install and run it on Arch Linux using [http://winehq.org/ WINE].<br />
<br />
<br />
== Preparation ==<br />
<br />
<br />
If you have an old ~/.wine/ directory, you may consider deleting it completely or back it up. Old settings from previous installs may mess things up and things may not work correctly. If you do not have WINE installed yet, install it with pacman (you need the extra repository enabled in your /etc/pacman.conf file):<br />
<br />
pacman -Sy wine<br />
<br />
Now run the wine configuration program once to create an initial ~/.wine/ <br />
<br />
winecfg<br />
<br />
<br />
== Install Mozilla ActiveX Controls ==<br />
<br />
<br />
cd ~/.wine/drive_c/Program\ Files/<br />
wget http://downloads.transgaming.com/mozilla_control_downloads/mozcontrol.tgz<br />
tar zxvf mozcontrol.tgz<br />
cd mozcontrol/ <br />
regsvr32 mozctlx.dll <br />
<br />
<br />
== Install Fonts ==<br />
<br />
<br />
Steam requires the Tahoma font. You will have to get this from a Windows install or somewhere online. <br />
<br />
mv tahoma.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
Steam uses the Marlett font for the minimize/close/etc buttons. It's not absolutely required, but it will make it look nicer. Again, get this font from a Windows install or somewhere online. <br />
<br />
mv marlett.ttf ~/.wine/drive_c/windows/fonts/<br />
<br />
<br />
== Download Steam and Install ==<br />
<br />
<br />
wget http://steampowered.com/download/SteamInstall.exe<br />
wine SteamInstall.exe<br />
<br />
After it goes through the install procedure, it will automatically update itself and appear to shutdown and restart itself numerous times. Just be patient. Eventually it will ask you to create an account or login to an exisiting account. <br />
<br />
<br />
You cannot type text in the fields of the login box in Steam by default. In order to get keyboard focus, right-click on the text areas first, then type in your username and password. You may want to check "Remember my password" so you don't have to go through this hassle everytime Steam starts. <br />
<br />
<br />
After you login, it will update some more and finally bring up the Steam main menu and you should be able to operate Steam without problems.<br />
<br />
<br />
== Starting Steam ==<br />
<br />
<br />
In order to start Steam again later, you need to first change to the Steam directory, and then run<br />
<br />
wine steam.exe<br />
<br />
Giving WINE a path to steam.exe '''will not work'''. Do not do this:<br />
<br />
wine ~/.wine/drive_c/Program\ Files/Steam/steam.exe<br />
<br />
You should make a small startup script to start Steam, for example, ''steam.sh''<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
# WINE binary<br />
CDLOADER_WINE="wine"<br />
<br />
# Steam directory<br />
STEAMDIR="$HOME/.wine/drive_c/Program Files/Steam"<br />
<br />
cd "$STEAMDIR"<br />
<br />
$CDLOADER_WINE "steam.exe" -- "$@" &<br />
</pre><br />
<br />
<br />
== Using a Pre-Existing Steam Install ==<br />
<br />
<br />
If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to ~/.wine/drive_c/Program Files/Steam/ . However, be sure to do '''all''' the previous steps in this Wiki. Confirm Steam launches and logs into your account, ''then'' do this:<br />
<br />
cd ~/.wine/drive_c/Program\ Files/ <br />
mv Steam/ Steam.backup/ (or you can just delete the directory)<br />
ln -s /mnt/windows_partition/Program\ Files/Steam/<br />
<br />
<br />
== Known Issues ==<br />
<br />
<br />
Besides not being able to type in the login window, here are some other issues:<br />
<br />
* The Steam windows do not respect WM desktop workspaces. All Steam windows will appear on all workspaces (confirmed on Openbox only)<br />
* The system tray icon may not be placed in your WM's system tray. Instead it will be in a floating window, named "WINE System Tray Adapter". It still works as expected, however. (confirmed on Openbox only)<br />
* When trying to run HL1-based games, switching the Audio Driver in "winecfg" from OSS to ALSA causes the game to hang.</div>Slashhttps://wiki.archlinux.org/index.php?title=User:Slash&diff=12992User:Slash2006-05-13T03:50:02Z<p>Slash: </p>
<hr />
<div>Arch Linux user since March 2005. <br />
<br />
<br />
IRC : Slash / Slashbunny<br />
<br />
AUR: Slash<br />
<br />
Forums: Slash</div>Slashhttps://wiki.archlinux.org/index.php?title=User:Slash&diff=12991User:Slash2006-05-13T03:49:41Z<p>Slash: </p>
<hr />
<div>Arch Linux user since March 2005. <br />
<br />
##archlinux : Slash / Slashbunny<br />
AUR: Slash<br />
AL Forums: Slash</div>Slashhttps://wiki.archlinux.org/index.php?title=User:Slash&diff=12990User:Slash2006-05-13T03:49:28Z<p>Slash: </p>
<hr />
<div>Arch Linux user since March 2005. <br />
<br />
#archlinux : Slash / Slashbunny<br />
AUR: Slash<br />
AL Forums: Slash</div>Slashhttps://wiki.archlinux.org/index.php?title=Icecast&diff=6418Icecast2005-12-05T03:28:16Z<p>Slash: Added Category</p>
<hr />
<div>[[Category:Audio/Video]]<br />
MPD is a program for playing music via a deamon process instead of using a client. It also incorperates a music database for quick access, playlists, and a variety of frontend options.<br />
<br />
==Step 1: Set Up MPD and Install a Client==<br />
Use the [[MPD_-_Music_Player_Daemon|MPD Install Guide]] to install and configure MPD and a client. <br />
<br />
==Step 2: Setting up Icecast==<br />
*Install Icecast via Pacman<br />
# pacman -S icecast<br />
*Edit the configuration file.<br />
Open up /etc/icecast.xml in your text editor du jour.<br />
The main section you want to pay attention to is <authentication>. Inside the <authentication> block are all the passwords that icecast use. I STRONGLY RECOMEND you change them.<br> Icacest defaults to listening on port 8000, and you may also change that if you wish.<br />
*Start icecast<br />
You can start icecast by executing:<br />
# icecast -b -c /etc/icecast.xml<br />
*Test it.<br />
Make sure Icecast is running by opening up http://localhost:8000/ in your web browser. You should be greeted by an Icecast2 Status page. This indicates everything is running properly.<br />
<br />
==Step 3: Configure MPD to be an Icecast Source==<br />
Again, open /etc/mpd.conf.</div>Slashhttps://wiki.archlinux.org/index.php?title=MPD_-_Music_Player_Daemon&diff=6417MPD - Music Player Daemon2005-12-05T03:27:03Z<p>Slash: </p>
<hr />
<div>[[Category:Audio/Video]]<br />
MPD is a audio player that has a server-client archetecture. MPD runs in the background as a daemon, manages playlists and a music database, and uses very little resources. In order to interface with it, you need a separate client. More information can be found on their website, http://www.musicpd.org/<br />
<br />
= MPD Install Procedure =<br />
<br />
* Sync and install with pacman<br />
<br />
<pre><br />
pacman -Sy mpd<br />
</pre><br />
<br />
* Configure MPD<br />
<br />
<pre><br />
{your editor} /etc/mpd.conf.example<br />
</pre><br />
<br />
* Save the mpd.conf.example as mpd.conf<br />
<br />
*Create these two directories if they don't exist: ~/.mpd and ~/.mpd/playlists<br />
<br />
* Create the MPD database (this can take a while depending on the size of your collection): <br />
<br />
<pre><br />
/etc/rc.d/mpd create-db<br />
</pre><br />
<br />
* Start MPD<br />
<br />
<pre><br />
/etc/rc.d/mpd start<br />
</pre><br />
<br />
* Install a client - this will give you every client in pacman<br />
<br />
<pre><br />
pacman -Sy ncmpc mpc gmpc glurp<br />
</pre><br />
<br />
'''mpc''' - Command Line Client (you'll probably want this one no matter what)<br />
<br />
'''ncmpc''' - NCurses Client<br />
<br />
'''gmpc''' - Gnome Client<br />
<br />
'''glurp''' - GTK2 Client <br />
<br />
==Links==<br />
<br />
http://www.musicpd.org/<br />
<br />
http://mpd.wikicities.com/wiki/Main_Page</div>Slashhttps://wiki.archlinux.org/index.php?title=MPD_-_Music_Player_Daemon&diff=6416MPD - Music Player Daemon2005-12-05T03:26:07Z<p>Slash: </p>
<hr />
<div>[[Category:Audio/Video]]<br />
<br />
MPD is a audio player that has a server-client archetecture. MPD runs in the background as a daemon, manages playlists and a music database, and uses very little resources. In order to interface with it, you need a separate client. More information can be found on their website, http://www.musicpd.org/<br />
<br />
= MPD Install Procedure =<br />
<br />
* Sync and install with pacman<br />
<br />
<pre><br />
pacman -Sy mpd<br />
</pre><br />
<br />
* Configure MPD<br />
<br />
<pre><br />
{your editor} /etc/mpd.conf.example<br />
</pre><br />
<br />
* Save the mpd.conf.example as mpd.conf<br />
<br />
*Create these two directories if they don't exist: ~/.mpd and ~/.mpd/playlists<br />
<br />
* Create the MPD database (this can take a while depending on the size of your collection): <br />
<br />
<pre><br />
/etc/rc.d/mpd create-db<br />
</pre><br />
<br />
* Start MPD<br />
<br />
<pre><br />
/etc/rc.d/mpd start<br />
</pre><br />
<br />
* Install a client - this will give you every client in pacman<br />
<br />
<pre><br />
pacman -Sy ncmpc mpc gmpc glurp<br />
</pre><br />
<br />
'''mpc''' - Command Line Client (you'll probably want this one no matter what)<br />
<br />
'''ncmpc''' - NCurses Client<br />
<br />
'''gmpc''' - Gnome Client<br />
<br />
'''glurp''' - GTK2 Client <br />
<br />
==Links==<br />
<br />
http://www.musicpd.org/<br />
<br />
http://mpd.wikicities.com/wiki/Main_Page</div>Slashhttps://wiki.archlinux.org/index.php?title=Icecast&diff=6415Icecast2005-12-05T03:24:09Z<p>Slash: Removed MPD and Client Install Instructions and added a link to the main Install page, as it would be redundant. Why is Step3 not complete?!</p>
<hr />
<div>MPD is a program for playing music via a deamon process instead of using a client. It also incorperates a music database for quick access, playlists, and a variety of frontend options.<br />
<br />
==Step 1: Set Up MPD and Install a Client==<br />
Use the [[MPD_-_Music_Player_Daemon|MPD Install Guide]] to install and configure MPD and a client. <br />
<br />
==Step 2: Setting up Icecast==<br />
*Install Icecast via Pacman<br />
# pacman -S icecast<br />
*Edit the configuration file.<br />
Open up /etc/icecast.xml in your text editor du jour.<br />
The main section you want to pay attention to is <authentication>. Inside the <authentication> block are all the passwords that icecast use. I STRONGLY RECOMEND you change them.<br> Icacest defaults to listening on port 8000, and you may also change that if you wish.<br />
*Start icecast<br />
You can start icecast by executing:<br />
# icecast -b -c /etc/icecast.xml<br />
*Test it.<br />
Make sure Icecast is running by opening up http://localhost:8000/ in your web browser. You should be greeted by an Icecast2 Status page. This indicates everything is running properly.<br />
<br />
==Step 3: Configure MPD to be an Icecast Source==<br />
Again, open /etc/mpd.conf.</div>Slashhttps://wiki.archlinux.org/index.php?title=MPD_-_Music_Player_Daemon&diff=6414MPD - Music Player Daemon2005-12-05T03:20:25Z<p>Slash: </p>
<hr />
<div>[[Category:Audio/Video]]<br />
<br />
= MPD Install Procedure =<br />
<br />
* Sync and install with pacman<br />
<br />
<pre><br />
pacman -Sy mpd<br />
</pre><br />
<br />
* Configure MPD<br />
<br />
<pre><br />
{your editor} /etc/mpd.conf.example<br />
</pre><br />
<br />
* Save the mpd.conf.example as mpd.conf<br />
<br />
*Create these two directories if they don't exist: ~/.mpd and ~/.mpd/playlists<br />
<br />
* Create the MPD database (this can take a while depending on the size of your collection): <br />
<br />
<pre><br />
/etc/rc.d/mpd create-db<br />
</pre><br />
<br />
* Start MPD<br />
<br />
<pre><br />
/etc/rc.d/mpd start<br />
</pre><br />
<br />
* Install a client - this will give you every client in pacman<br />
<br />
<pre><br />
pacman -Sy ncmpc mpc gmpc glurp<br />
</pre><br />
<br />
'''mpc''' - Command Line Client (you'll probably want this one no matter what)<br />
<br />
'''ncmpc''' - NCurses Client<br />
<br />
'''gmpc''' - Gnome Client<br />
<br />
'''glurp''' - GTK2 Client <br />
<br />
==Links==<br />
<br />
http://www.musicpd.org/<br />
<br />
http://mpd.wikicities.com/wiki/Main_Page</div>Slashhttps://wiki.archlinux.org/index.php?title=MPD_-_Music_Player_Daemon&diff=6412MPD - Music Player Daemon2005-12-05T03:19:54Z<p>Slash: MPD and glurp moved to MPD - Music Player Daemon</p>
<hr />
<div>[[Category:Audio/Video]]<br />
= MPD Install Procedure =<br />
<br />
* Sync and install with pacman<br />
<br />
<pre><br />
pacman -Sy mpd<br />
</pre><br />
<br />
* Configure MPD<br />
<br />
<pre><br />
{your editor} /etc/mpd.conf.example<br />
</pre><br />
<br />
* Save the mpd.conf.example as mpd.conf<br />
<br />
*Create these two directories if they don't exist: ~/.mpd and ~/.mpd/playlists<br />
<br />
* Create the MPD database (this can take a while depending on the size of your collection): <br />
<br />
<pre><br />
/etc/rc.d/mpd create-db<br />
</pre><br />
<br />
* Start MPD<br />
<br />
<pre><br />
/etc/rc.d/mpd start<br />
</pre><br />
<br />
* Install a client - this will give you every client in pacman<br />
<br />
<pre><br />
pacman -Sy ncmpc mpc gmpc glurp<br />
</pre><br />
<br />
'''mpc''' - Command Line Client (you'll probably want this one no matter what)<br />
<br />
'''ncmpc''' - NCurses Client<br />
<br />
'''gmpc''' - Gnome Client<br />
<br />
'''glurp''' - GTK2 Client <br />
<br />
==Links==<br />
<br />
http://www.musicpd.org/<br />
<br />
http://mpd.wikicities.com/wiki/Main_Page</div>Slashhttps://wiki.archlinux.org/index.php?title=MPD_-_Music_Player_Daemon&diff=6410MPD - Music Player Daemon2005-12-05T03:18:50Z<p>Slash: </p>
<hr />
<div>[[Category:Audio/Video]]<br />
= MPD Install Procedure =<br />
<br />
* Sync and install with pacman<br />
<br />
<pre><br />
pacman -Sy mpd<br />
</pre><br />
<br />
* Configure MPD<br />
<br />
<pre><br />
{your editor} /etc/mpd.conf.example<br />
</pre><br />
<br />
* Save the mpd.conf.example as mpd.conf<br />
<br />
*Create these two directories if they don't exist: ~/.mpd and ~/.mpd/playlists<br />
<br />
* Create the MPD database (this can take a while depending on the size of your collection): <br />
<br />
<pre><br />
/etc/rc.d/mpd create-db<br />
</pre><br />
<br />
* Start MPD<br />
<br />
<pre><br />
/etc/rc.d/mpd start<br />
</pre><br />
<br />
* Install a client - this will give you every client in pacman<br />
<br />
<pre><br />
pacman -Sy ncmpc mpc gmpc glurp<br />
</pre><br />
<br />
'''mpc''' - Command Line Client (you'll probably want this one no matter what)<br />
<br />
'''ncmpc''' - NCurses Client<br />
<br />
'''gmpc''' - Gnome Client<br />
<br />
'''glurp''' - GTK2 Client <br />
<br />
==Links==<br />
<br />
http://www.musicpd.org/<br />
<br />
http://mpd.wikicities.com/wiki/Main_Page</div>Slashhttps://wiki.archlinux.org/index.php?title=MPD_-_Music_Player_Daemon&diff=6409MPD - Music Player Daemon2005-12-05T03:18:16Z<p>Slash: Poor Directions; specific client instructions irrelevent. Completely nuked it for the better instructions off of MPD's Wiki. Moving Page.</p>
<hr />
<div>[[Category:Audio/Video]]<br />
= MPD Install Procedure =<br />
<br />
* Sync and install with pacman<br />
<br />
<pre><br />
pacman -Sy mpd<br />
</pre><br />
<br />
* Configure MPD<br />
<br />
<pre><br />
{your editor} /etc/mpd.conf.example<br />
</pre><br />
<br />
* Save the mpd.conf.example as mpd.conf<br />
<br />
*Create these two directories if they don't exist: ~/.mpd and ~/.mpd/playlists<br />
<br />
* Create the MPD database (this can take a while depending on the size of your collection): <br />
<br />
<pre><br />
/etc/rc.d/mpd create-db<br />
</pre><br />
<br />
* Start MPD<br />
<br />
<pre><br />
/etc/rc.d/mpd start<br />
</pre><br />
<br />
* Install a client - this will give you every client in pacman<br />
<br />
<pre><br />
pacman -Sy ncmpc mpc gmpc glurp<br />
</pre><br />
<br />
'''mpc''' - Command Line Client (you'll probably want this one no matter what)<br />
'''ncmpc''' - NCurses Client<br />
'''gmpc''' - Gnome Client<br />
'''glurp''' - GTK2 Client <br />
<br />
==Links==<br />
<br />
http://www.musicpd.org/<br />
<br />
http://mpd.wikicities.com/wiki/Main_Page</div>Slashhttps://wiki.archlinux.org/index.php?title=Dvdbackup&diff=6407Dvdbackup2005-12-05T01:07:22Z<p>Slash: </p>
<hr />
<div>[[Category:CD/DVD]]<br />
==Introduction==<br />
Making a data DVD is simple. It only involves a single command in most cases. If you need to simply burn data onto a DVD, see the [[DVD_writing|DVD Writing Tutorial]]. However if you want a DVD that you can play in your DVD player, it gets a little more complex. You need to encode the source video, generate the layout of the disc (with menus, titles, chapters, etc), make the filesystem (generate an ISO), and finally burn the ISO. This tutorial will cover only the most basic way of making a video DVD- You place the DVD in your DVD player and a movie plays. You are encouraged to research each step further, as there are countless options and features you can add beyond this. <br />
<br />
<br />
==Encoding Source Video==<br />
If the video you want to burn to a DVD is already encoded to the proper format, then you can skip this step. You will need transcode and mjpegtools to encode the video to the proper format. Note that this only applies to AVI or MPEG files. If you are dealing with wmv, asf, mov, ogm, etc files, then you will need to use mencoder.<br />
<br />
<br />
If you are dealing with another type of file, install mencoder (part of the mplayer package):<br />
<pre><br />
pacman -Sy mplayer<br />
</pre><br />
<br />
For NTSC:<br />
<pre><br />
mencoder -o output_file.avi -ovc lavc -lavcopts vbitrate=5000:vhq -ffourcc DX50 -oac pcm -srate 48000 -ofps 29.97 your_movie.mov<br />
</pre> <br />
<br />
For PAL:<br />
<pre><br />
mencoder -o output_file.avi -ovc lavc -lavcopts vbitrate=5000:vhq -ffourcc DX50 -oac pcm -srate 48000 -ofps 25 your_movie.mov<br />
</pre><br />
<br />
<br />
Now you will have an AVI file that we can convert to DVD compatable video. Continue by installing the tools we will need:<br />
<br />
<pre><br />
pacman -Sy transcode mjpegtools<br />
</pre><br />
<br />
First we separate the audio and video from the source video and encode them to the proper formats using transcode:<br />
<br />
<pre><br />
transcode -i source_video.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 2 -o video -D0 -b224 -N 0x2000 -s2 -m video.ac3 -J modfps=clonetype=3 --export_fps 29.97 <br />
</pre><br />
<br />
'''-i''' is the source video you are working with. Change this to whatever the original file is called.<br />
<br />
'''-o''' is the ouput filename. I'll just call it "video" to make it simple. <br />
<br />
'''-m''' tells transcode to write the audio to a separate file, in this case ''video.ac3''<br />
<br />
'''-export_asr''' is the aspect ratio. '''2''' is 4:3 ratio, and '''3''' is for 16:9 ratio. Change this to whichever one you want. <br />
<br />
<br />
'''NOTE:''' The above command uses the NTSC compatable format. To encode to PAL format, you need to make a few changes:<br />
<br />
''--export_prof dvd-pal''<br />
<br />
''--export_fps 25''<br />
<br />
<br />
This process will probably take some time. An hour long video could take 1-3 hours to encode depending on the speed of your computer. When complete, you will be left with a video.m2v file and video.ac3 file. These are DVD-compliant video and audio files, respectively.<br />
<br />
The next step is to merge these 2 files into one DVD MPEG file using '''mplex''', part of the mjpegtools package. <br />
<br />
<pre><br />
mplex -f 8 -o video.mpg video.m2v video.ac3 <br />
</pre><br />
<br />
Now is a good time to test the video.mpg file in your video player of choice, such as ''mplayer'' or ''xine''. If everything appears ok, then you can continue to the next step. <br />
<br />
<br />
==Create DVD Structure==<br />
In order to generate the layout of the DVD from your video files, you will need to use dvdauthor:<br />
<br />
<pre><br />
pacman -Sy dvdauthor<br />
</pre><br />
<br />
You can specify a lot of options via command line, but it is much easier to simply create an XML file with the appropriate options. dvdauthor can do just about anything, but it could get fairly complex and beyond the scope of this tutorial. We just wnat to put a DVD in the drive and have it play our video. The XML file should look like this:<br />
<br />
<pre><br />
<dvdauthor><br />
<vmgm /><br />
<titleset><br />
<titles><br />
<pgc><br />
<vob file="video.mpg" /><br />
</pgc><br />
</titles><br />
</titleset><br />
</dvdauthor><br />
</pre><br />
<br />
You can name this file whatever you want. Let's just assume it is dvd.xml. Next, we will run dvdauthor to generate the structure of the DVD. <br />
<br />
<pre><br />
dvdauthor -o dvd -x dvd.xml<br />
</pre><br />
<br />
'''-o''' is the ouput directory. This can be whatever you please, but make sure the directory doesn't exist prior to running the command.<br />
<br />
'''-x ''' the XML file to load settings from. Change this to whatever you named your XML file.<br />
<br />
After dvdauthor completes doing it's thing, you will have a dvd/ directory in the current directory. These are the files you will want to burn to a DVD in the next step.<br />
<br />
Links with more information regarding the XML file for advanced usage:<br />
<br />
http://dvdauthor.sourceforge.net/doc/ex-title.html<br />
<br />
http://www.tappin.me.uk/Linux/dvd.html#author<br />
<br />
http://gecius.de/linux/dvd.html<br />
<br />
<br />
==Generate the ISO and Burn the DVD==<br />
This can actually be done in one step, but I will go over the 2-step process anyways, just in case you want to distribute an ISO to other people. For this step, we will need two packages; '''dvd+rw-tools''' and '''cdrtools'''<br />
<br />
<pre><br />
pacman -Sy dvd+rw-tools cdrtools<br />
</pre><br />
<br />
First, we make the filesystem using mkisofs, part of the cdrtools package:<br />
<br />
<pre><br />
mkisofs -dvd-video -udf -o dvd.iso dvd/<br />
</pre><br />
<br />
'''-o''' is the output file. Of course, this can be whatever you want.<br />
<br />
'''dvd/''' is the directory generated by dvdauthor. If you used a different directory, of course you will need to change this. <br />
<br />
Next, we use growisofs to burn the DVD:<br />
<br />
<pre><br />
growisofs -Z /dev/hdd=dvd.iso<br />
</pre><br />
<br />
That should be it! Make sure you change the device path to whatever your DVD burner is and specify the correct ISO filename you are using. <br />
<br />
This can actually be done in one step, like I mentioned before, like so:<br />
<br />
<pre><br />
growisofs -dvd-video -udf -Z /dev/hdd dvd/<br />
</pre><br />
<br />
This will skip the ISO step and burn the filesystem directly to the DVD. Change the device name and the directory to fit your needs.<br />
<br />
<br />
==More Information and Links==<br />
<br />
mplayer/mencoder: http://www.mplayerhq.hu/<br />
<br />
dvdauthor: http://dvdauthor.sourceforge.net/<br />
<br />
http://www.tappin.me.uk/Linux/dvd.html<br />
<br />
http://gecius.de/linux/dvd.html<br />
<br />
http://forums.gentoo.org/viewtopic.php?t=117709</div>Slash