https://wiki.archlinux.org/api.php?action=feedcontributions&user=Dooglus&feedformat=atomArchWiki - User contributions [en]2024-03-28T20:37:01ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Pkgtools&diff=170682Pkgtools2011-11-20T19:12:39Z<p>Dooglus: /* "Command not found" hook */ only works in login shells</p>
<hr />
<div>[[Category:Package development (English)]]<br />
{{stub}}<br />
<br />
==About==<br />
<br />
{{Package Official|Pkgtools}} is a package created by Daenyth that includes various useful package-related utilities. It is available in community, and the latest {{Package AUR|pkgtools-git}} release is available in AUR.<br />
<br />
===newpkg===<br />
<br />
A tool to simplify creating a new package.<br />
<br />
===pkgconflict===<br />
<br />
===pkgfile===<br />
{{Codeline|pkgfile}} is a tool that tells you which package owns a specific file. It also has some extra related features.<br />
<br />
===="Command not found" hook====<br />
pkgfile includes a "command not found" hook that will automatically search the official repositories if you enter a command that is not recognized. It can be enabled in {{Filename|/etc/pkgtools/pkgfile.conf}} or in {{Filename|~/.config/pkgtools/pkgfile.conf}}.<br />
<br />
That will enable the hook in login shells only. If you want it in all your shells, source /usr/share/pkgtools/pkgfile-hook.bash from your .bashrc.<br />
<br />
===spec2arch===<br />
<br />
Converts an rpm .spec file into a [[PKGBUILD]]<br />
<br />
===whoneeds===</div>Dooglushttps://wiki.archlinux.org/index.php?title=Music_Player_Daemon&diff=170454Music Player Daemon2011-11-18T07:20:24Z<p>Dooglus: /* Local Configuration (per user) */ typo</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:Daemons and system services (English)]]<br />
{{i18n|Music Player Daemon}}<br />
[[pl:Music Player Daemon]]<br />
[[fr:MPD]]<br />
<br />
'''MPD''' (music player daemon) is an audio player that has a server-client architecture. MPD runs in the background as a daemon, manages playlists and a music database, and uses very few resources. In order to interface with it, you need a separate client. More information can be found on their [http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki website].<br />
<br />
''Please'' have a look at the official page for setup and troubleshooting instructions, the main developer called this wiki page in its current state ''"full of symptom killers"'', hence the official pages should contain better instructions.<br />
<br />
== Installing ==<br />
<br />
Install with [[pacman]]:<br />
{{Cli|# pacman -S mpd}}<br />
<br />
== Setup ==<br />
<br />
MPD is able to run globally (settings apply to all users), locally (per user settings), and in multiple instances.<br />
<br />
=== Global Configuration (daemon) ===<br />
<br />
The way of setting up mpd depends on the way it is supposed to be used. It can be configured to run on a per-user basis or at system startup with a system-wide configuration. MPD's configuration is saved in {{Filename|mpd.conf}}.<br />
<br />
For a comfortable use, it is sensible to provide MPD access to the following files and directories:<br />
mpd.db # The music database<br />
mpd.pid # The file where mpd stores its process ID<br />
mpd.log # mpd logs here<br />
mpdstate # mpd's current state is noted here<br />
playlists # the folder where playlists are saved into<br />
<br />
In order for MPD to be able to play back audio, [[ALSA]] or [[PulseAudio]] needs to be setup and working. Do not forget to unmute the required channels.<br />
<br />
==== Starting MPD on system boot ====<br />
<br />
* As root, check if {{Filename|/etc/mpd.conf}} exists and delete the file if it does. This is safe.<br />
{{Cli|rm /etc/mpd.conf}}<br />
<br />
MPD comes with an example configuration file, available at {{Filename|/usr/share/mpd/mpd.conf.example}}. This file holds an abundance of information on MPD configuration, and holds default mixer values you can simply uncomment.<br />
<br />
* As root, copy this example file to {{Filename|/etc/mpd.conf}}.<br />
{{Cli|cp /usr/share/mpd/mpd.conf.example /etc/mpd.conf}}<br />
<br />
Since MPD is being set up to run as a daemon at boot, never put this file in the user's directory like some tutorials suggest, since it will not be read. Moreover, if you previously created a {{Filename|.mpdconf}} file in your home, remove it now (to set up MPD to run with user privileges alone, pleaser refer to the section [[Music_Player_Daemon#Starting_mpd_as_a_user | Starting mpd as a user]]). This is important to prevent conflicts.<br />
<br />
====Editing {{Filename|mpd.conf}}====<br />
<br />
The default Arch install keeps the setup in /var and uses "mpd" as default user.<br />
Edit {{Filename|/etc/mpd.conf}} to reflect as such:<br />
<br />
{{File|name=/etc/mpd.conf|content=<br />
music_directory "/home/user/music"<br />
playlist_directory "/var/lib/mpd/playlists"<br />
db_file "/var/lib/mpd/mpd.db"<br />
log_file "/var/log/mpd/mpd.log"<br />
pid_file "/var/run/mpd/mpd.pid"<br />
state_file "/var/lib/mpd/mpdstate"<br />
user "mpd"<br />
# Binding to address and port causing problems in mpd-0.14.2 best to leave<br />
# commented.<br />
# bind_to_address "127.0.0.1"<br />
# port "6600"<br />
}}<br />
<br />
* If your music collection is contained under multiple directories, you can make symbolic links under {{Filename|/var/lib/mpd}} then set 'music_directory' to the directory holding the symbolic links. Remember to set permissions accordingly on the directories being linked.<br />
<br />
* To change the volume of audio from mpd independent of other programs, uncomment or add the switch in mpd.conf:<br />
<br />
{{File|name=/etc/mpd.conf|content=<br />
mixer_type "software"<br />
}}<br />
<br />
* Users of [[PulseAudio]] will make the following modification:<br />
{{File|name=/etc/mpd.conf|content=<br />
audio_output {<br />
type "alsa" #<- Change this to "pulse"<br />
name "Sound Card"<br />
}<br />
}}<br />
<br />
==== Creating the required files ====<br />
<br />
Now, having finished configuring MPD, the files and directories for MPD to write in need to be created:<br />
<br />
* As root, create the directories and files you specified in {{Filename|/etc/mpd.conf}}:<br />
# mkdir -p /var/lib/mpd/playlists /var/run/mpd<br />
# touch /var/lib/mpd/{mpd.db,mpdstate} /var/run/mpd/mpd.pid<br />
<br />
* You then need to change the file's permissions so that the daemon can modify them.<br />
# chown -R mpd /var/lib/mpd /var/run/mpd<br />
<br />
==== Create database ====<br />
Creating the database is now accomplished via the update feature of the client, for example {{Codeline|mpc update}}. <br />
{{Box RED | Note: | Creating the MPD database as root using {{Codeline|# mpd --create-db}} is deprecated.}}<br />
<br />
==== Timeline of MPD startup ====<br />
<br />
To depict when MPD drops its superuser privileges and assumes those of the user set in the configuration, the timeline of a normal MPD startup is depicted here:<br />
<br />
# MPD is started on boot by {{Filename|/etc/rc.conf}}, by including it in the {{Codeline|DAEMONS}} array. (Or, this can be done manually each session by running {{Codeline|rc.d start mpd}} with root privileges).<br />
# Since MPD is now started as root, it first reads the {{Filename|/etc/mpd.conf}} file.<br />
# MPD reads the user variable in the {{Filename|/etc/mpd.conf}} file, and changes from root to this user.<br />
# MPD then reads the contents of the {{Filename|/etc/mpd.conf}} file and configures itself accordingly.<br />
<br />
Notice that MPD changes the running user from root to the one named in the {{Filename|/etc/mpd.conf}} file. This way, uses of {{Codeline|~}} in the configuration file point correctly to the home user's directory, and not root's directory. It may be worthwhile to change all uses of {{Codeline|~}} to {{Codeline|/home/username}} to avoid any confusion over this aspect of MPD's behavior.<br />
<br />
=== Local Configuration (per user) ===<br />
<br />
MPD does not need to be run globally as a daemon and can rather work per user. The usual method to configure MPD globally is because the listed files and folders in the default configuration file point to directories owned by root (the {{Filename|/var}} directory). Though a less used method (but perhaps more sensible) is to make MPD work with files and directories owned by a normal user. Running MPD as a normal user has the benefits of:<br />
<br />
* A single directory {{Filename|~/.mpd}} (or any other directory under {{Filename|/home/username}}) will contain all the MPD configuration files.<br />
* Easier to avoid unforeseen read/write permission errors.<br />
<br />
To run MPD as a normal user:<br />
<br />
{{Note|This approach will not work if you want multiple users to have access to MPD at the same time.}}<br />
<br />
* Create a directory for the required files and the playlists:<br />
<br />
{{Cli|mkdir -p ~/.mpd/playlists}}<br />
<br />
* Copy the contents of the default MPD configuration file in {{Filename|/usr/share/mpd/mpd.conf.example}} to your home directory:<br />
<br />
{{Cli|cp /usr/share/mpd/mpd.conf.example ~/.mpd/mpd.conf}}<br />
<br />
* Create all of the requisite files:<br />
<br />
{{Cli| touch ~/.mpd/{mpd.db,mpd.log,mpd.pid,mpdstate} }}<br />
<br />
* Edit {{Filename|~/.mpd/mpd.conf}} to specify these files:<br />
<br />
{{File|~/.mpd/mpd.conf|content=<br />
music_directory "/home/USER/Music" # Keep commented if your XDG directory already points to it<br />
playlist_directory "/home/USER/.mpd/playlists"<br />
db_file "/home/USER/.mpd/mpd.db"<br />
log_file "/home/USER/.mpd/mpd.log"<br />
pid_file "/home/USER/.mpd/mpd.pid"<br />
state_file "/home/USER/.mpd/mpdstate"<br />
}}<br />
<br />
* MPD can now be started by typing {{Codeline|mpd}} on the command line. To have MPD start with the X server add it to {{Filename|~/.xinitrc}} or create a {{Filename|.desktop}} if you are using a common desktop (save to {{Codeline|~/.config/autostart/mpd.desktop}}):<br />
<br />
{{File|mpd.desktop|content=<br />
[Desktop Entry]<br />
Encoding=UTF-8<br />
Version=0.9.4<br />
Type=Application<br />
Name=Music Player Daemon<br />
Comment=<br />
Exec=mpd<br />
StartupNotify=false<br />
Terminal=false<br />
Hidden=false<br />
}}<br />
<br />
==== Scripted Configuration ====<br />
<br />
Rasi has written a script that will create the proper directory structure, configuration files and prompt for the location of the user's Music directory; it can be downloaded [http://karif.server-speed.net/~carnager/mpdsetup.tar here].<br />
<br />
=== Multi-mpd setup ===<br />
<br />
'''Useful if you want to run for example an icecast server.'''<br />
If you want a second MPD daemon (e.g., with icecast output to share music over the network) to use the same music and playlist as the one above, simply copy the above configuration file and make a new file (e.g., {{Filename|/home/username/.mpd/config-icecast}}), and only change the log_file, error_file, pid_file, and state_file parameters (e.g., {{Filename|mpd-icecast.log}}, {{Filename|mpd-icecast.error}}, and so on); using the same directory paths for the music and playlist directories would ensure that this second mpd daemon would use the same music collection as your first one (e.g., creating and editing a playlist under the first daemon would affect the second daemon as well, so that you do not have to create the same playlists all over again for the second daemon). Then, call this second daemon the same way from your {{Filename|~/.xinitrc}} above. (Just be sure to have a different port number, so as to not conflict with your first mpd daemon).<br />
<br />
==Clients==<br />
To control mpd, you need a client program. Popular options are:<br />
<br />
===Console===<br />
* [http://sourceforge.net/projects/musicpd/files/mpc/ mpc] &ndash; CLI client, the most basic functionality available.<br />
{{Cli|# pacman -S mpc}}<br />
* [http://mpd.wikia.com/wiki/Client:Ncmpc ncmpc] &ndash; NCurses Client (this one is very useful for running in a console)<br />
{{Cli|# pacman -S ncmpc}}<br />
* [http://unkart.ovh.org/ncmpcpp/ ncmpcpp] &ndash; Clone of ncmpc with some new features written in C++ (tag editor, search engine)<br />
{{Cli|# pacman -S ncmpcpp}}<br />
* [http://pms.sourceforge.net/ pms] &ndash; Highly configurable and accessible ncurses client. Install [http://aur.archlinux.org/packages.php?ID=24378 pmus] from the [[AUR]].<br />
<br />
===Graphical===<br />
* [http://ario-player.sourceforge.net ario] &ndash; GTK+ Client with a library browser similar to that of Rhythmbox.<br />
{{Cli|# pacman -S ario}}<br />
* [http://gmpcwiki.sarine.nl/index.php?title=GMPC gmpc] &ndash; GNOME Client<br />
{{Cli|# pacman -S gmpc}}<br />
* [http://bitcheese.net/wiki/QMPDClient QMPDClient] &ndash; Client written with Qt 4.x.<br />
{{Cli|# pacman -S qmpdclient}}<br />
* [http://sonata.berlios.de/ sonata] &ndash; Python GTK+ Client<br />
{{Cli|# pacman -S sonata}}<br />
* [http://aur.archlinux.org/packages.php?ID=33380 dmpc] &ndash; Dmenu-based MPC client with a playlist manager and state-saving on playlist changes. Install [http://aur.archlinux.org/packages.php?ID=33380 dmpc] from the [[AUR]].<br />
<br />
<br />
See a long list of clients at the [http://mpd.wikia.com/wiki/Clients mpd wiki].<br />
<br />
==Tips and Tricks==<br />
===Last.fm scrobbling===<br />
To scrobble your songs to [http://www.last.fm Last.fm] when using MPD, there are several alternatives.<br />
<br />
====mpdscribble====<br />
mpdscribble is a daemon, available in the "community" repository (if you prefer, the "git" version is available in the [http://aur.archlinux.org/packages.php?ID=22274 AUR]). This is arguably the best alternative, because it's the semi-official MPD scrobbler and uses the new "idle" feature in MPD for more accurate scrobbling. Also, you do not need root access to configure it, because it doesn't need any changes to {{Codeline|/etc}} at all. Visit [http://mpd.wikia.com/wiki/Client:Mpdscribble the official website] for more information.<br />
<br />
After you have installed mpdscribble, do the following (not as root):<br />
<br />
{{Cli|$ mkdir ~/.mpdscribble}}<br />
* Create the file {{Filename|~/.mpdscribble/mpdscribble.conf}} and add the following:<br />
{{File|name=~/.mpdscribble/mpdscribble.conf|content=<br />
[mpdscribble] <br />
host = <your mpd host> # optional, defaults to $MPD_HOST or localhost<br />
port = <your mpd port> # optional, defaults to $MPD_PORT or 6600<br />
log = /home/<YOUR_USERNAME>/.mpdscribble/mpdscribble.log<br />
verbose = 2<br />
sleep = 1<br />
musicdir = <your music directory><br />
proxy = <your proxy> # optional, e. g. http://your.proxy:8080, defaults to none<br />
<br />
[last.fm]<br />
# last.fm section, comment if you do not use last.fm<br />
url = http://post.audioscrobbler.com/<br />
username = <your last.fm username><br />
password = <your last.fm password> <br />
journal = /home/<YOUR_USERNAME>/.mpdscribble/lastfm.journal<br />
<br />
[libre.fm]<br />
# libre.fm section, comment if you do not use libre.fm<br />
url = http://turtle.libre.fm/<br />
username = <your libre.fm username><br />
password = <your libre.fm password><br />
journal = /home/<YOUR_USERNAME>/.mpdscribble/librefm.journal<br />
}}<br />
Please note that passwords can also be written down as MD5:<br />
echo -n 'PASSWORD' | md5sum | cut -f 1 -d " "<br />
<br />
* Add {{Codeline|mpdscribble}} to the file in which you start {{Codeline|mpd}} as well (e.g. {{Filename|~/.xinitrc}}):<br />
<pre><br />
pidof mpdscribble >& /dev/null<br />
if [ $? -ne 0 ]; then<br />
mpdscribble &<br />
fi<br />
</pre><br />
<br />
====Sonata & Ario====<br />
Sonata has built-in support for scrobbling, although that requires the program to run the whole time. Additionally, Sonata doesn't cache the songs if they cannot be forwarded to Last.fm at the time of playing, meaning they will not be added to the statistics.<br />
<br />
====lastfmsubmitd====<br />
The daemon lastfmsubmitd is a daemon which may be installed from the "community" repository as well. To install it, first edit {{Filename|/etc/lastfmsubmitd.conf}} to reflect your requirements and add both {{Codeline|lastfmsubmitd}} and {{Codeline|lastmp}} to the {{Codeline|DAEMONS}} array in {{Filename|/etc/rc.conf}}.<br />
<br />
====Last.fm playback====<br />
=====Native Last.fm playback=====<br />
Since version 0.16 mpd has a very well working method to [http://mpd.wikia.com/wiki/Last.fm_Radio play back last.fm streams].<br />
{{File|name=/etc/mpd.conf|content=<br />
$ playlist_plugin {<br />
name "lastfm"<br />
user "my_username"<br />
password "my_password"<br />
}<br />
}}<br />
Then use e.g. mpc to load streams<br />
{{Cli|$ mpc load "lastfm://artist/Beatles"}}<br />
<br />
=====Last.fm playback with lastfmproxy=====<br />
lastfmproxy is a python script that streams a last.fm music stream to another media player. To setup, install [http://aur.archlinux.org/packages.php?ID=14214 lastfmproxy] from the [[AUR]] and then edit {{Filename|/usr/share/lastfmproxy/config.py}}. If you plan to only stream to MPD on the same host, just edit the login info.<br />
<br />
{{Note | Since it installs to a read only directory but it requires read/write access for features like saving previously listened to stations, it is useful to copy {{Filename|/usr/share/lastfmproxy}} to your home directory.}}<br />
<br />
Start lastfmproxy with {{Codeline|lastfmproxy}} and visit {{Codeline|http://localhost:1881/}} in your web browser. To add a last.fm station navigate to {{Codeline|http://localhost:1881/}} followed by the lastfm:// (e.g. {{Codeline|http://localhost:1881/lastfm://globaltags/punk}}). Navigate back to {{Codeline|http://localhost:1881/}} and download the m3u file by selecting the ''Start Listening'' link. Simply add it to your music library path.<br />
<br />
===Never play on start===<br />
This feature has recently been added to mpd git by Martin Kellerman, see commits {{Codeline|b57330cf75bcb339e3f268f1019c63e40d305145}} and {{Codeline|2fb40fe728ac07574808c40034fc0f3d2254d49d}}. As of September 2011, this feature has not yet arrived in a mpd version in the official repositories. If support for this feature is still required, have a look at the following proposals.<br />
<br />
====Installing mpd from the AUR====<br />
This is the best method currently available, but is only currently (as of April 2011) enabled in the git version. Install [https://aur.archlinux.org/packages.php?ID=19676 mpd-git] from the [[AUR]] and add {{Codeline|restore_paused "yes"}} to your {{Filename|mpd.conf}} file.<br />
<br />
If you have issues with connecting your client to [https://aur.archlinux.org/packages.php?ID=19676 mpd-git], see [[Music Player Daemon#Other issues when attempting to connect to mpd with a client]].<br />
<br />
====Method 1====<br />
If you do not want MPD to always play on your system start, but yet you want to preserve the other state information, add the following lines to your {{Filename|/etc/rc.d/mpd}} file:<br />
=====Method 1.1=====<br />
Simpler, working method (disables playing on startup of mpd daemon):<br />
start)<br />
...<br />
mpc -q pause #add this line only<br />
add_daemon mpd<br />
stat_done<br />
=====Method 1.2=====<br />
This method was described here before Method 1.1 and is much more complicated:<br />
'' ...''<br />
'' stat_busy "Starting Music Player Daemon"''<br />
<br />
# always start in paused state<br />
awk '/^state_file[ \t]+"[^"]+"$/ {<br />
match($0, "\".+\"")<br />
sfile = substr($0, RSTART + 1, RLENGTH - 2)<br />
} /^user[ \t]+"[^"]+"$/ {<br />
match($0, "\".+\"")<br />
user = substr($0, RSTART + 1, RLENGTH - 2)<br />
} END {<br />
if (sfile == "")<br />
exit;<br />
if (user != "")<br />
sub(/^~/, "/home/" user, sfile)<br />
system("sed -i \x27s|^\\(state:[ \\t]\\{1,\\}\\)play$|\\1pause|\x27 \x27" sfile "\x27")<br />
}' /etc/mpd.conf<br />
<br />
'' /usr/bin/mpd /etc/mpd.conf &> /dev/null''<br />
'' ...''<br />
<br />
This will change the player status to "paused", if it was stopped while playing. Next, you want this file to be preserved, so MPD updates won't erase this edit. Add (or edit) this line to your {{Filename|/etc/pacman.conf}}:<br />
NoUpgrade = etc/rc.d/mpd<br />
<br />
====Method 2====<br />
Another simpler method, would be to add mpd to your {{Filename|[[rc.conf]]}} daemons array and add {{Codeline|mpc stop}} or {{Codeline|mpc pause}} to {{Filename|/etc/rc.local.shutdown}} and to {{Filename|/etc/rc.local}}. (Remember you must have mpc installed to use this method).<br />
<br />
Adding only the order in {{Filename|/etc/rc.local}} cannot assure that mpd will play absolutely nothing, since there may be a delay before the stop command is executed. <br />
On the other hand, if you only add the order to {{Filename|/etc/rc.local.shutdown}}, that will assure that mpd won't play at all, as long as you properly shutdown your system.<br />
Even though they are redundant, adding it to {{Filename|/etc/rc.local}} would serve as a safety for those, presumably, rare occasions when you do not shutdown the system properly.<br />
<br />
====Method 3====<br />
The general idea is to ask mdp to pause music when the user logs out, so that mdp will stick to the "pause" state after a reboot. Sending such command can be achieved using [http://www.archlinux.org/packages/extra/x86_64/mpc/ mpc], the command line interface to MPD.<br />
<br />
GDM users can then add {{Codeline|/usr/bin/mpc pause}} to {{Filename|/etc/gdm/PostSession/Default}} (be sure to add it before {{Codeline|exit 0}}):<br />
<br />
Non-GDM users can use their own login manager's method to launch the line at logout.<br />
<br />
===MPD & ALSA===<br />
Sometimes, when using other audio outputs, e.g: some web pages containing Flash applets, MPD is rendered unable to play (until it is restarted). The error comes up in mpd's log:<br />
<br />
Error opening alsa device "hw:0,0": Device or resource busy<br />
<br />
Reasons for this may be:<br />
* The sound card does not support hardware mixing (uses '''dmix''' plugin)<br />
* An application does not work with ALSA's default settings<br />
<br />
For a detailed description, it is recommended to take a look at [http://mpd.wikia.com/wiki/Alsa this] link. <br />
<br />
This problem may be solved by adding the following lines to {{Filename|mpd.conf}}:<br />
{{File|mpd.conf|content=<br />
audio_output {<br />
type "alsa"<br />
name "Sound Card"<br />
options "dev=dmixer"<br />
device "plug:dmix"<br />
}}<br />
<br />
To make the changes have effect, restart mpd (e.g. {{Codeline|/etc/rc.d/mpd restart}}, if it is a global configuration).<br />
<br />
====High CPU usage with ALSA====<br />
When using MPD with ALSA, users may experience MPD taking up lots of CPU (around 20-30%). This is caused by most sound cards supporting 48kHz and most music being 44kHz, thus forcing MPD to resample it. This operation takes lots of CPU cycles and results into high usage.<br />
<br />
For most users the problem should be solved by telling MPD not to use resampling by adding {{Codeline|auto_resample "no"}} into audio_output-part of {{Filename|/etc/mpd.conf}}. This will degrade quality slightly, however.<br />
<br />
{{File|mpd.conf|content=<br />
audio_output {<br />
type "alsa"<br />
name "My ALSA Device"<br />
auto_resample "no"<br />
}<br />
}}<br />
<br />
Although it may not give as drastic a speedup, enabling mmap may still speed things up:<br />
{{File|mpd.conf|content=<br />
audio_output {<br />
type "alsa"<br />
name "My ALSA Device"<br />
use_mmap "yes"<br />
}<br />
}}<br />
<br />
Some users might also want to tell dmix to use 44kHz as well. More info about tuning performance of your MPD can be found on the [http://mpd.wikia.com/wiki/Tuning MPD wiki]<br />
<br />
====Example configuration: Output with 44.1 KHz at e. g. 16 bit depth, multiple programs at once====<br />
''Why these formats?'' Because they are standard CDA, because ALSA on its own allows more than one program "to sound" only with dmix — whose resampling algorithm is inferior — and because dmix by default resamples anything lower to 48 KHz (or whatever higher format is playing at the time). Also, some get clicking sounds if at least {{Filename|mpd.conf}} is not changed this way.<br />
<br />
''What's the downside?'' These settings cause ''everything'' (if necessary) to be resampled to this format, such as material from DVD or TV which usually is at 48 KHz. But there is no known way to have ALSA dynamically change the format, and particularly if you listen to far more CDs than anything else the occasional 48 → 44.1 isn't too great a loss.<br />
<br />
The following assumes that there are not already other settings which conflict resp. overwrite it. This applies especially to the current user's potential {{Filename|~/.asoundrc}} — which MPD as its own user ignores, therefore the following should go to {{Filename|/etc/asound.conf}}:<br />
<br />
{{File|name=/etc/asound.conf|content=<br />
defaults.pcm.dmix.rate 44100 # Force 44.1 KHz<br />
defaults.pcm.dmix.format S16_LE # Force 16 bits<br />
}}<br />
<br />
{{File|name=/etc/mpd.conf|content=<br />
audio_output {<br />
type "alsa" # Use the ALSA output plugin.<br />
name "HDA Intel" # Can be called anything or nothing tmk, but must be present.<br />
options "dev=dmixer"<br />
device "plug:dmix" # Both lines cause MPD to output to dmix.<br />
format "44100:16:2" # the actual format<br />
auto_resample "no" # This bypasses ALSA's own algorithms, which generally are inferior. See below how to choose a different one.<br />
use_mmap "yes" # Minor speed improvement, should work with all modern cards.<br />
}<br />
<br />
samplerate_converter "0" # MPD's best, most CPU intensive algorithm. See 'man mpd.conf' for others — for anything other than the poorest "internal", libsamplerate must be installed.<br />
}}<br />
<br />
{{Note|MPD gives the mp3 format a special treatment at decoding: It's always outputted as 24 bit. (The conversion as forced by the ''format'' line only comes after that.)}}<br />
<br />
If one wants to leave the bit depth decision to ALSA resp. MPD, comment out resp. omit the ''dmix.format'' line and change the one for mpd with ''format'' to "44100:*:2".<br />
<br />
{{Note|''Crossfading'' between files decoded at two different bit depths (say, one mp3 and one 16 bit flac) does not work unless conversion is active.}}<br />
<br />
===Control MPD with lirc===<br />
There are already some clients designed for communications between lircd and MPD, however, as far as the practical use, they aren't very useful since their functions are limited.<br />
<br />
It's recommended to use mpc with irexec. mpc is a command line player which only sends the command to MPD and exits immediately, which is perfect for irexec, the command runner included in lirc. What irexec does is that it runs a specified command once received a remote control button.<br />
<br />
First of all, please setup your remotes as referred to the '''[[Lirc]]''' article.<br />
<br />
Edit your favored lirc startup configuration file, default location is {{Filename|~/.lircrc}}.<br />
<br />
Fill the file with the following pattern:<br />
begin<br />
prog = irexec<br />
button = <button_name><br />
config = <command_to_run><br />
repeat = <0 or 1><br />
end<br />
<br />
An useful example:<br />
## irexec<br />
begin<br />
prog = irexec<br />
button = play_pause<br />
config = mpc toggle<br />
repeat = 0<br />
end<br />
<br />
begin<br />
prog = irexec<br />
button = stop<br />
config = mpc stop<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = previous<br />
config = mpc prev<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = next<br />
config = mpc next<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = volup<br />
config = mpc volume +2<br />
repeat = 1<br />
end<br />
begin<br />
prog = irexec<br />
button = voldown<br />
config = mpc volume -2<br />
repeat = 1<br />
end<br />
begin<br />
prog = irexec<br />
button = pbc<br />
config = mpc random<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = pdvd<br />
config = mpc update<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = right<br />
config = mpc seek +00:00:05<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = left<br />
config = mpc seek -00:00:05<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = up<br />
config = mpc seek +1%<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = down<br />
config = mpc seek -1%<br />
repeat = 0<br />
end<br />
<br />
There are more functions for mpc, run {{Codeline|man mpc}} for more info.<br />
<br />
===Control MPD with bluetooth phone===<br />
You can also control MPD (to a certain extent) using a bluetooth enabled phone. You need to do the following:<br />
<br />
* install [http://remuco.sourceforge.net/index.php/Remuco remuco] -- a wireless remote control for several Linux media players ([http://aur.archlinux.org/packages.php?ID=25072 aur])<br />
* transfer remuco client -- jar/jad files from {{Filename|/usr/share/remuco/client/}} to your phone and install it<br />
* run {{Codeline|remuco-mpd}} (as current user)<br />
* run remuco on your phone, define a new bluetooth remuco connection (pair first if you haven't done this previously) and explore its capabilities<br />
<br />
More information about remuco including troubleshooting to be found at its [http://remuco.sourceforge.net/index.php/Remuco homepage]<br />
<br />
===MPD & PulseAudio===<br />
Edit {{Filename|/etc/mpd.conf}}, and uncomment the audio_output section for the type "pulse". The server and sink lines of it should be commented unless you know what you're doing.<br />
<br />
Then, add the mpd user (and yours if you haven't done so already) to the necessary pulse groups. The pulse-access group should be sufficient but you may want to add pulse-rt as well. The group "pulse" doesn't appear to be necessary.<br />
# gpasswd -a mpd pulse-access<br />
# gpasswd -a mpd pulse-rt<br />
<br />
Lastly, you may or may not need to copy {{Filename|~/.pulse-cookie}} from your current (pulse working) user's dir to your mpd user's home directory. It is likely to be {{Filename|/var/lib/mpd}} if you followed the first part of this wiki. This would probably only allow your current user to listen in on MPD's pulse. You may consider running pulse system-wide if that's insufficient.<br />
<br />
===Cue Files===<br />
To make cue file support actually work, you have to work around a nasty libcue bug. Libcue copied some files directly from libcdio, making it conflict with it. Steps to do to get proper cue support:<br />
<br />
* remove libcdio temporary (pacman -Rdd libcdio)<br />
* install libcue (pacman -S libcue)<br />
* install mpd with abs or from aur.<br />
* reinstall libcdio (pacman -S libcdio)<br />
<br />
At the point of writing mpd does not parse tracknumbers from cue sheets. There is a patch available (http://musicpd.org/mantis/view.php?id=3230)<br />
Once this patch is merged into mpd, i will remove this line :)<br />
<br />
<br />
===HTTP Streaming===<br />
Since version 0.15 there is a built-in HTTP streaming daemon/server that comes with MPD. To activate this server simply set it as output device in mpd.conf:<br />
<br />
audio_output { <br />
type "httpd" <br />
name "My HTTP Stream" <br />
encoder "vorbis" # optional, vorbis or lame <br />
port "8000" <br />
# quality "5.0" # do not define if bitrate is defined <br />
bitrate "128" # do not define if quality is defined <br />
format "44100:16:1" <br />
}<br />
<br />
Then to listen to this stream simply open the URL of your mpd server (along with the specified port) in your favorite music player. Note: You may have to specify the file format of the stream using an appropriate file extension in the URL. For example, using Winamp 5.5, You would use http://192.168.1.2:8000/mpd.ogg rather than http://192.168.1.2:8000/.<br />
<br />
To use mpd to connect to the stream from another computer.<br />
<br />
mpc add http://192.168.1.2:8000<br />
<br />
==Troubleshooting==<br />
===Autodetection failed===<br />
During the start of MPD, it tries to autodetect your set-up and configure output and volume control accordingly. Though this mostly goes well, it will fail for some systems. It may help to tell MPD specifically what to use as output and mixer control. If you copied {{Filename|/etc/mpd.conf}} over from {{Filename|/etc/mpd.conf.example}} as mentioned above, you can simply uncomment:<br />
<br />
Example for alsa output type and alsa mixer:<br />
audio_output {<br />
type "alsa"<br />
name "My ALSA Device"<br />
device "hw:0,0" # optional<br />
format "44100:16:2" # optional<br />
mixer_type "hardware"<br />
mixer_device "default"<br />
mixer_control "PCM"<br />
}<br />
<br />
'''Note:''' in case of permission problems when using ESD with MPD run this as root:<br />
# chsh -s /bin/true mpd<br />
<br />
===Executable permissions===<br />
{{Warning|This is not good security practice and may be unnecessary.}}<br />
<br />
MPD needs to have +x permissions on '''ALL''' parent directories to your music collection (ie. if it's located outside of "mpd" home directory /var/lib/mpd). By default useradd sets permissions on home dir to 1700 drwx------. So if you're like me you will need to change permissions of /home/user. Example... my music collection is located /home/user/music. <br />
# chmod a+x /home/$USER<br />
# chmod -R a+X /home/$USER/music<br />
<br />
====Alternative solution====<br />
An alternative solution would be to use your group to share a selection of files, among them your music library. First remove all permissions for the group then add group permissions to read and execute home and music.<br />
# chmod -R g-rwx /home/$USER<br />
# chmod g+rx /home/$USER<br />
# chmod -R g+rX /home/$USER/music<br />
<br />
====Another alternative solution====<br />
Another alternative is to remount the music directory under a directory that mpd has access to. This does not entail the same security risks as modifying the permissions on one's home directory.<br />
# mkdir /var/lib/mpd/music<br />
# echo "/home/$USER/music /var/lib/mpd/music none bind" >> /etc/fstab<br />
# mount -a<br />
# /etc/rc.d/mpd restart<br />
And that should fix the problem. See also [https://bbs.archlinux.org/viewtopic.php?id=86449 the forum thread.]<br />
<br />
===Avoiding timeouts===<br />
To get rid of timeouts (i.e. when you paused music for long time) in gpmc and other clients uncomment and increase {{Codeline|connection_timeout}} option in {{Filename|mpd.conf}}.<br />
<br />
If files and/or titles are shown in wrong encoding, uncomment and change {{Codeline|filesystem_charset}} and {{Codeline|id3v1_encoding}} options.<br />
Note that you cannot set encoding for ID3 v2 tags. To workaround this you may use [http://mpd.wikia.com/wiki/GenericDecoder#Generic_Tagreader external tag readers].<br />
<br />
If you want to use another computer to control MPD over a network, the {{Codeline|bind_to_address}} option in {{Filename|mpd.conf}} will need to be set to either your IP address, or {{Codeline|any}} if your IP address changes frequently. <br />
<br />
'''Streaming'''<br><br />
With the latest version of MPD (0.15), built-in httpd streaming is now available.<br />
<br />
To activate this feature, you'll just need to add a new output of type httpd in {{Filename|mpd.conf}}:<br />
audio_output {<br />
type "httpd"<br />
name "What you want"<br />
encoder "lame" # vorbis or lame supported<br />
port "8000"<br />
bitrate "128"<br />
format "44100:16:2" # change 2 to 1 for mono<br />
}<br />
<br />
Restart the mpd daemon and, from another computer, simply load the stream as any other url. <br />
$ mplayer http://<server's IP>:8000<br />
<br />
{{Note | You must open the port on your router / firewall for the stream to be connectible to from another computer.}}<br />
<br />
Most players (i.e. vlc or xmms2) should also be able to load the stream via their "add url..." menu option.<br />
<br />
This is a nice clean way to replace your current icecast setup with something natively supported within MPD.<br />
<br />
===mpd hangs on first startup===<br />
This is a common error that's caused by corrupt mp3 tags.<br />
Here is an experimental way to solve this issue.<br />
Requirements:<br />
* kid3<br />
* easytag<br />
<br />
This method is very tedious, especially with a huge database. Just as a baseline it took 2.5h to fix a 16Gb DB.<br />
<br />
====Easy Tag====<br />
The purpose of easytag here is that easytag detects the error in the tags, but like MPD it hangs and dies. The trick here is that easy tags actually tells you what file is causing the problem on the status bar.<br />
Before starting easytag make sure to have a terminal close to be ready to kill easy tag to avoid a hang. Once you are ready, on the tree view select the directory where all your music is located. By default easytag starts to search all subdirectories for mp3 files. Once you notice that easytag stopped scanning for songs, make note of the culprit and kill easytag.<br />
<br />
====KID3====<br />
Here's where kid3 comes in handy. With kid3 go to the offending song and rewrite one of the tags. then save the file. This should force kid3 to rewrite the whole tag again fixing the problem with MPD and easy tag hanging.<br />
<br />
Repeat this procedure until your music library is done.<br />
<br />
===Cannot connect to mpd: host "localhost" not found: Temporary failure in name resolution===<br />
Cannot connect to MPD (with ncmpcpp), if you are disconnected from network. Solution is [[IPv6 - Disabling the Module|disable IPv6]] or add line to /etc/hosts<br />
::1 localhost.localdomain localhost<br />
<br />
===Other issues when attempting to connect to mpd with a client===<br />
Some have reported being unable to access mpd with various clients, for example seeing errors like these:<br />
$ ncmpcpp<br />
Cannot connect to mpd: Connection closed by the server<br />
$ sonata<br />
2011-02-13 18:33:05 Connection lost while reading MPD hello<br />
2011-02-13 18:33:05 Not connected<br />
2011-02-13 18:33:05 Not connected<br />
<br />
Please see posts on ncmpcpp on the Arch Forums [https://bbs.archlinux.org/viewtopic.php?id=109962 HERE] and [https://bbs.archlinux.org/viewtopic.php?id=113493 HERE]. Also see the Arch bug report on this issue [https://bugs.archlinux.org/task/22071 HERE]. <br />
<br />
====First fix====<br />
Check {{Filename|mpd.conf}} for a line like {{Codeline|mpd.error}} and remove it. The mpd error file is deprecated and has been removed.<br />
<br />
====Second fix====<br />
{{Note|I'm not so sure this is a good idea. There is a warning about changing the address to bind to in the default mpd.conf. If this does not help, you might want to comment out the changes.}}<br />
If that doesn't help, add the following to {{Filename|mpd.conf}}:<br />
<pre><br />
bind_to_address "127.0.0.1"<br />
port "6600"<br />
</pre><br />
<br />
Afterwards, instruct your client to connect via 127.0.0.1. For example, add the following to the ncmpcpp config file:<br />
<pre><br />
mpd_host "127.0.0.1"<br />
mpd_port "6600"<br />
</pre><br />
<br />
<br />
===Port 6600 already in use===<br />
MPD needs to bind to port 6600 and cannot start if it's already in use. The most common reason for this is that the user has started MPD once and then subsequently tried to start mpd again. In general, nothing should be done here.<br />
<br />
If port 6600 is tied up for some other reason, one can use the following command to find the offending process:<br />
# netstat -tulpan | grep 6600<br />
<br />
This will list IP:Port and the process name holding the connection (root privileges are required to see all processes).<br />
<br />
If you need to restart mpd for whatever reason, use:<br />
<pre><br />
$ mpd --kill<br />
$ mpd <br />
</pre><br />
A more brute-force approach:<br />
<pre><br />
$ killall mpd<br />
$ mpd <br />
</pre><br />
{{Note| If you typically run MPD as root, you will need to run the above commands as root.}}<br />
<br />
In the latest version of MPD, --create-db is completely deprecated. The database will be created automagically on first run and can subsequently be updated via your client (i.e. mpc update). You can now use inotify support to automatically update your music database. Add the following to {{File|name=mpd.conf|content=auto_update "yes"}} to enable it.<br />
<br />
===Binding to IPV6 before IPV4===<br />
If on startup, you see this message:<br />
listen: bind to '0.0.0.0:6600' failed: Address already in use (continuing anyway, because binding to '[::]:6600' succeeded)<br />
MPD is attempting to bind to the ipv6 interface before binding to ipv4. If you want to use your ipv4 interface, hardcode it in mpd.conf, like so:<br />
bind_to_address "127.0.0.1"<br />
Or, you could specify several binds, for example, to have MPD listen on localhost and the external IP of your network card:<br />
bind_to_address "127.0.0.1"<br />
bind_to_address "192.168.1.13"<br />
<br />
===Crackling sound with some audio files===<br />
This is usually a playback speed problem and can be fixed by uncommenting the audio_output_format line in:<br />
<br />
{{File|name=/etc/mpd.conf|content=<br />
audio_output_format "44100:16:2"}}<br />
<br />
This is usually a sane value for most mp3 files.<br />
<br />
===daemon: cannot setgid for user "mpd": Operation not permitted ===<br />
<br />
The error is stating that the user starting the process (you) does not have permissions to become another user (mpd) which the configuration has told that process to run as.<br />
<br />
To solve the issue, simply start mpd as root.<br />
{{Cli|$ su -c "rc.d start mpd"}}<br />
or<br />
{{Cli|# rc.d start mpd}}<br />
<br />
==External links==<br />
* [http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki Official Web Site and wiki]<br />
* [http://mpd.wikia.com/wiki/Clients Sorted List of MPD Clients]<br />
* [http://www.musicpd.org/forum/ MPD forum]</div>Dooglushttps://wiki.archlinux.org/index.php?title=ECryptfs&diff=170104ECryptfs2011-11-14T23:50:40Z<p>Dooglus: /* Introduction */ typo</p>
<hr />
<div>[[Category:Security (English)]]<br />
[[Category:File systems (English)]]<br />
{{i18n|System Encryption with eCryptfs}}<br />
[[fr:Encryption avec eCryptfs]]<br />
<br />
= Introduction =<br />
This article describes basic usage of [https://launchpad.net/ecryptfs eCryptfs]. It guides you through the process of creating a private and secure encrypted directory within your ''$HOME'' directory, where you can store all your sensitive files and private data. If you are wondering "''Why should I use encryption?''" then start with the first section of the [[System_Encryption_with_LUKS_for_dm-crypt|dm-crypt]] article, which answers some basic questions on theory and security.<br />
<br />
In implementation eCryptfs differs from dm-crypt, which provides a ''block device encryption layer'', while eCryptfs is an actual file-system &ndash; a [http://en.wikipedia.org/wiki/Cryptographic_filesystems stacked cryptographic file system] to be exact. For comparison of the two you can refer to [http://ecryptfs.sourceforge.net/ecryptfs-faq.html#compare this table ]. <br />
<br />
The summary is that it doesn't require special on-disk storage allocation effort, such as separate partitions, you can mount eCryptfs on top of any single directory to protect it. That includes e.g. your entire $HOME and network file systems (i.e. having encrypted NFS shares). All cryptographic metadata is stored in the headers of files, so encrypted data can be easily moved, stored for backup and recovered. There are other advantages, but there are also drawbacks, for instance eCryptfs is not suitable for encrypting complete partitions which also means you can't protect your swap space with it (instead you can combine it with dm-crypt).<br />
<br />
= Deficiencies = <br />
<br />
Before you make any big decisions like encrypting your $HOME you should know that eCyptfs does not handle sparse files well. For most intents and purposes that shouldn't concern us, however one very popular use case are torrents. Right now eCryptfs tries to encrypt the whole sparse file allocated space right away, which can lead to starving the system of resources in case of big files (remember torrents can easily be 10GB or bigger). You can track progress of this bug in this Launchpad report: https://bugs.launchpad.net/ubuntu/+source/ecryptfs-utils/+bug/431975<br />
<br />
Simple workaround, for now, is to create a '''.Public''' folder (as '''.Private''' folder is used for encrypted data later in the article) and use that for torrents, unencrypted and symlinked to a directory like ''~/Downloads/torrents''. For some people this of course defeats the whole purpose of encryption, for others who are protecting their data from theft it doesn't.<br />
<br />
== Login password ==<br />
If you are encrypting your whole home, with auto-mounting you should use a strong password and consider changing the hash algorithm for ''/etc/shadow''. From '''md5''' to stronger ones like '''sha512/bcrypt''', that helps to protect your password against rainbow-table attacks. See https://wiki.archlinux.org/index.php/SHA_password_hashes for more information.<br />
<br />
= Basics =<br />
eCryptfs is a part of Linux since version 2.6.19. But to work with it you will need the userspace tools provided by {{Package AUR|ecryptfs-utils}} (available in the AUR).<br />
<br />
Once you install those packages you can load the ecryptfs module and continue with the setup:<br />
# modprobe ecryptfs<br />
<br />
The ecryptfs-utils package is distributed with a few helper scripts which will help you with key management and similar tasks. Some were written to automate this whole process of setting up encrypted directories (''ecryptfs-setup-private'') or help you combine eCryptfs with dm-crypt to protect swap space (''ecryptfs-setup-swap''). Despite those scripts we will go trough the process manually so you get a better understanding of what is really being done.<br />
<br />
Before we say anything else it's advised that you check the eCryptfs documentation. It is distributed with a very good and complete set of manual pages.<br />
<br />
== Setup ==<br />
First create your private directories, in this example we will call them exactly that: Private<br />
$ su -<br />
# mkdir -m 700 /home/username/.Private<br />
# mkdir -m 500 /home/username/Private<br />
# chown username:username /home/username/{.Private,Private}<br />
<br />
Let's summarize<br />
* Actual encrypted data will be stored in ~/.Private directory (so-called ''lower'' directory)<br />
* While mounted, decrypted data will be available in ~/Private directory (so-called ''upper'' directory)<br />
** While not mounted nothing can be written to this directory<br />
** While mounted it has the same permissions as the lower directory<br />
<br />
<br />
eCryptfs can now be mounted on top of ~/Private.<br />
# mount -t ecryptfs /home/username/.Private /home/username/Private<br />
<br />
You will need to answer a few questions and provide a passphrase which should be used to mount this directory in the future. However you can also have different keys encrypting different data (more about this below). For convenience we will limit this guide to only one key and passphrase. Let's see an example:<br />
Key type: passphrase<br />
Passphrase: ThisIsAVeryWeakPassphrase<br />
Cipher: aes<br />
Key byte: 16<br />
Plaintext passtrough: no<br />
Filename encryption: no<br />
Add signature to cache: yes <br />
<br />
Let's summarize<br />
* The passphrase is your '''mount passphrase''' which will be salted, hashed and loaded into the kernel keyring.<br />
** In eCryptfs terms, this salted, hashed passphrase is your "file encryption key, encryption key", or '''fekek'''.<br />
* eCryptfs supports a few different ciphers (AES, blowfish, twofish...). You can read about them on Wikipedia.<br />
* Plaintext passtrough enables you to store and work with '''un-encrypted''' files stored in the lower directory.<br />
* Filename encryption is available since Linux 2.6.29<br />
** In eCryptfs terms the key used to protect filenames is known as "filename encryption key", or '''fnek'''.<br />
* The signature of the key(s) will be stored in {{Filename|/root/.ecryptfs/sig-cache.txt}}.<br />
<br />
<br />
Since our later goal is to be able to mount without root priviledges, we will now move the eCryptfs configuration directory to your own home and transfer the ownership to you:<br />
# mv /root/.ecryptfs /home/username<br />
# chown username:username /home/username/.ecryptfs<br />
<br />
Your setup is now complete and directory is mounted. You can place any file in the ~/Private directory and it will get encrypted. Before you do anything else you should inspect your '''{{Filename|/etc/mtab}}''' file, the ecryptfs entry in particular &ndash; we will discuss the importance of it a few lines below.<br />
<br />
Now copy a few files to your new private directory, and then un-mount it. If you inspect the files you will see that they are unreadable &ndash; encrypted. That was cool you say, but how do I get them back... and that brings us to:<br />
<br />
== Mounting ==<br />
When ever you need your files available you can repeat the above mount procedure, using the same passphrase and options if you want to access your previously encrypted files or using a different passphrase (and possibly options) if for some reason you want to have different keys protecting different data (imagine having a publicly shared directory where different data is encrypted by different users, and their keys).<br />
<br />
In any case going trough those questions every time could be a bit tedious. First solution is that you provide all the options to the mount command (this is where the '''mtab''' line comes in) except for your passphrase for which you will be prompted: <br />
<br />
$ sudo mount -t ecryptfs /home/username/.Private /home/username/Private -o ecryptfs_cipher=aes,ecryptfs_key_bytes=16,key=passphrase<br />
<br />
Second (and recommended) solution is to create an entry in the '''{{Filename|/etc/fstab}}''' file for this mount point: <br />
<br />
# eCryptfs mount points<br />
/home/username/.Private /home/username/Private ecryptfs rw,user,noauto,ecryptfs_sig=XY,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecrypfs_unlink_sigs 0 0<br />
<br />
NOTE: <br />
<br />
Let's summarize <br />
* You will notice that we defined the '''user''' option, it enables you to mount the directory as a user (if it does not works as a normal user, you may need to setuid mount.ecryptfs by running as root: ''chmod +s /sbin/mount.ecryptfs'')<br />
* Notice the '''ecryptfs_sig''' option, replace ''XY'' with your own key signature (as seen in the '''mtab''' line earlier and in {{Filename|sig-cache.txt}})<br />
* If you enabled filename encryption then pass an additional mount option: '''ecryptfs_fnek_sig'''=''XY'', where ''XY'' is the same signature you provide with the '''ecryptfs_sig''' option.<br />
* Last option '''ecrypfs_unlink_sigs''' ensures that your keyring is cleared every time the directory is un-mounted<br />
<br />
<br />
Since your key was deleted from the kernel keyring when you un-mounted, in order to mount you need to insert it into the keyring again. You can use the '''ecryptfs-add-passphrase''' utility or the '''ecryptfs-manager''' to do it:<br />
<br />
When the key is inserted you can mount the directory: <br />
$ ecryptfs-add-passphrase<br />
Passphrase: ThisIsAVeryWeakPassphrase<br />
<br />
$ mount -i /home/username/Private<br />
<br />
You will notice that we used the '''{{Codeline|-i}}''' option this time. It disables invoking the mount helper. Speaking of which, using {{Codeline|-i}} by default mounts with: '''nosuid, noexec''' and '''nodev'''. If you want to have at least executable files in your private directory you can add the '''exec''' option to the fstab line.<br />
<br />
This would be a good place to mention the '''keyctl''' utility from the (earlier installed) ''keyutils'' package. It can be used for any advanced key management tasks. Following examples show how to list your keyring contents and how to clear them:<br />
$ keyctl list @u<br />
$ keyctl clear @u<br />
<br />
== Usage ==<br />
Besides using your private directory as storage for sensitive files, and private data, you can also use it to protect application data. Take ''Firefox'' for an example, not only does it have an internal password manager but the browsing history and cache can also be sensitive. Protecting it is easy:<br />
$ mv ~/.mozilla ~/Private/mozilla<br />
$ ln -s ~/Private/mozilla ~/.mozilla<br />
<br />
== Removal ==<br />
If you want to move a file out of the private directory just move it to it's new destination while ~/Private is mounted. Also note that there are no special steps involved if you want to remove your private directory. Make sure it is un-mounted and delete ~/.Private, along with all the files.<br />
<br />
== Backup ==<br />
Setup explained here separates the directory with encrypted data from the mount point, so the encrypted data is available for backup at any time. With an overlay mount (i.e. ''~/Secret'' mounted over ''~/Secret'') the lower, encrypted, data is harder to get to. Today when cronjobs and other automation software do automatic backups the risk of leaking your sensitive data is higher.<br />
<br />
We explained earlier that all cryptographic metadata is stored in the headers of files. You can easily do backups, or incremental backups, of your '''~/.Private''' directory, treating it like any other directory.<br />
<br />
= Advanced =<br />
This wiki article covers only the basic setup of a private encrypted directory. There is however another article about eCryptfs on Arch Linux, which covers encryption of your entire $HOME and encrypting swap space without breaking hibernation (suspend to disk).<br />
<br />
That article includes many more steps (i.e. using PAM modules and automatic mounting) and the author was opposed to replicating it here, because there is just no single "right" way to do it. The author proposes some solutions and discusses the security implications, but they are his solutions and as such might not be the best nor are they endorsed by the eCryptfs project in any way.<br />
<br />
Article: [http://sysphere.org/~anrxc/j/articles/ecryptfs/index.html eCryptfs and $HOME] by Adrian C. (anrxc).<br />
<br />
Consider that ''Chromium OS'', as released by Google, is using eCryptfs to protect devices that are, and will be, powered by it. Some implementation details are available and they make excellent reading. You can read them [http://www.chromium.org/chromium-os/chromiumos-design-docs/protecting-cached-user-data here], they could help a lot as you're coming up with your own strategy.<br />
<br />
== PAM Mount ==<br />
<br />
{{Warning|As of March 28, 2011 I tested this several times, this does not work anymore - seems that ecryptfs/pam-mount had some changes. PAM fails to mount your $Home at Login. See new method below!}}<br />
<br />
The above "''eCryptfs and $HOME''" article uses a shell init file to mount the home directory. The same can be done using [http://aur.archlinux.org/packages.php?ID=1976 pam_mount] with the added benefit that home is un-mounted when all sessions are logged out. As eCryptfs needs the {{Codeline|-i}} switch, the ''lclmount'' setting will need to be changed. I use the following in {{Filename|/etc/security/pam_mount.conf.xml}}:<br />
<lclmount>mount -i %(VOLUME) "%(before=\"-o\" OPTIONS)"</lclmount><br />
<br />
Remember to also set the volume definition (preferably to {{Filename|~/.pam_mount.conf.xml}} and uncomment luserconf).<br />
<pam_mount><br />
<volume noroot="1" fstype="ecryptfs" path="/home/user/.Private" mountpoint="/home/user"/><br />
</pam_mount><br />
<br />
''noroot'' is needed (at least in my configuration) because the encryption key will be added to the user's keyring.<br />
<br />
<br />
To avoid wasting time needlessly unwrapping the passphrase you can create a script that will check ''pmvarrun'' to see the number of open sessions:<br />
#!/bin/sh<br />
#<br />
# /usr/local/bin/doecryptfs<br />
<br />
exit $(/usr/sbin/pmvarrun -u$PAM_USER -o0)<br />
<br />
With the following line added before the eCryptfs unwrap module in your PAM stack:<br />
auth [success=ignore default=1] pam_exec.so quiet /usr/local/bin/doecryptfs<br />
auth required pam_ecryptfs.so unwrap<br />
The article suggests adding these to {{Filename|/etc/pam.d/login}}, but the changes will need to be added to all other places you login, such as {{Filename|/etc/pam.d/kde}}.<br />
<br />
== PAM Mount [New Method] ==<br />
As descried here [https://bbs.archlinux.org/viewtopic.php?pid=727422#p727422] you have to do the following steps:<br />
<br />
1) For your understanding and preparation, read the guide mentioned above. [http://sysphere.org/~anrxc/j/articles/ecryptfs/index.html]<br />
<br />
2) Install keyutils, and ecryptfs-utils and pam_mount from AUR<br />
<br />
'''[Do the following steps as root!]'''<br />
<br />
3) Make a "ecryptfs" Group:<br />
groupadd ecryptfs<br />
4) Add the user to it:<br />
usermod -aG ecryptfs user<br />
5) Load the ecryptfs module<br />
modprobe ecryptfs<br />
5) Change your /etc/pam.d/login to look something like this (lines to add are bold):<br />
#%PAM-1.0<br />
auth required pam_securetty.so<br />
auth requisite pam_nologin.so<br />
auth required pam_unix.so nullok<br />
'''auth optional pam_ecryptfs.so unwrap'''<br />
auth required pam_tally.so onerr=succeed file=/var/log/faillog<br />
# use this to lockout accounts for 10 minutes after 3 failed attempts<br />
#auth required pam_tally.so deny=2 unlock_time=600 onerr=succeed file=/var/log/faillog<br />
account required pam_access.so<br />
account required pam_time.so<br />
account required pam_unix.so<br />
#password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3<br />
'''password optional pam_ecryptfs.so'''<br />
#password required pam_unix.so md5 shadow use_authtok<br />
session required pam_unix.so<br />
'''session optional pam_ecryptfs.so unwrap'''<br />
session required pam_env.so<br />
session required pam_motd.so<br />
session required pam_limits.so<br />
session optional pam_mail.so dir=/var/spool/mail standard<br />
session optional pam_lastlog.so<br />
<br />
6a) When using [[GDM]] < 3.2 to log in, edit /etc/pam.d/gdm like this:<br />
#%PAM-1.0<br />
auth requisite pam_nologin.so<br />
auth required pam_env.so<br />
auth required pam_unix.so<br />
'''auth optional pam_ecryptfs.so unwrap'''<br />
auth optional pam_gnome_keyring.so<br />
account required pam_unix.so<br />
session required pam_limits.so<br />
session required pam_unix.so<br />
'''session optional pam_ecryptfs.so unwrap'''<br />
session optional pam_gnome_keyring.so auto_start<br />
password required pam_unix.so<br />
'''password optional pam_ecryptfs.so'''<br />
<br />
6b) For [[GDM]] >= 3.2, make the following changes to /etc/pam.d/gdm-password (thanks to grawity for [https://bbs.archlinux.org/viewtopic.php?pid=998061#p998061 this]):<br />
#%PAM-1.0<br />
auth requisite pam_nologin.so<br />
auth required pam_env.so<br />
auth requisite pam_unix.so nullok<br />
'''auth optional pam_ecryptfs.so unwrap'''<br />
auth optional pam_gnome_keyring.so<br />
auth sufficient pam_succeed_if.so uid >= 1000 quiet<br />
auth required pam_deny.so<br />
account required pam_unix.so<br />
password required pam_unix.so<br />
'''password optional pam_ecryptfs.so'''<br />
session required pam_loginuid.so<br />
-session optional pam_systemd.so<br />
session optional pam_keyinit.so '''force''' revoke<br />
session required pam_limits.so<br />
session required pam_unix.so<br />
'''session optional pam_ecryptfs.so unwrap'''<br />
session optional pam_gnome_keyring.so auto_start<br />
<br />
7) To be able to automatically mount your encrypted home directory on login using SSH, edit /etc/pam.d/sshd:<br />
#%PAM-1.0<br />
#auth required pam_securetty.so #Disable remote root<br />
auth required pam_unix.so<br />
'''auth optional pam_ecryptfs.so unwrap'''<br />
auth required pam_env.so<br />
account required pam_nologin.so<br />
account required pam_unix.so<br />
account required pam_time.so<br />
password required pam_unix.so<br />
password optional pam_ecryptfs.so<br />
'''session optional pam_ecryptfs.so unwrap'''<br />
session required pam_unix_session.so<br />
session required pam_limits.so<br />
session optional pam_ck_connector.so nox11<br />
<br />
8) Execute (it can take some while, it automatically encrypts your home files)<br />
ecryptfs-migrate-home -u user<br />
and follow the on screen instructions (Delete backup afterwards (/home/user.XXXXX) / Record the passphrase generated by ecryptfs -> ecryptfs-unwrap-passphrase / ...)<br />
<br />
9) Log in and check if everything worked correctly.<br />
<br />
This is a working solution and ecryptfs is exactly used as in Ubuntu (10.04/10.10) - and is easy to set up. <br />
Besides this, it has the advantage of auto-unmount at log-out, anrxc's solution does not provide this.<br />
You can also encrypt swap with the tools provides by ecryptfs, just use ecryptfs-setup-swap.</div>Dooglushttps://wiki.archlinux.org/index.php?title=Talk:Migrating_between_architectures&diff=169378Talk:Migrating between architectures2011-11-10T01:40:48Z<p>Dooglus: error installing lib32-glibc while 32 bit glibc is still installed</p>
<hr />
<div>== Couldn't install lib32-glibc ==<br />
<br />
The article says "Alternatively, if migrating to 64 bits, now is the time to install the lib32-glibc fallback". But when I tried to install lib32-glibc I got errors about conflicting files. I didn't keep a record of the exact error message, but glibc and lib32-glibc both have these 2 files in them, so I guess that was the cause of the error:<br />
<br />
/lib/ld-linux.so.2<br />
/usr/include/gnu/stubs-32.h<br />
<br />
See http://www.archlinux.org/packages/core/i686/glibc/files/ and http://www.archlinux.org/packages/multilib/x86_64/lib32-glibc/files/ for the file lists - the article suggests installing lib32-glibc before upgrading glibc. --[[User:Dooglus|Dooglus]] 20:40, 9 November 2011 (EST)<br />
<br />
== Errors Upgrading pacman, etc. ==<br />
<br />
I followed the instructions for method two (installing from a running system) to upgrade from 32 bit to 64 bit. It went well until it came to reinstalling pacman and friends, then I saw a bunch of errors:<br />
<br />
[root@chris chris]# pacman -S pacman glibc libfetch libarchive openssl acl attr \<br />
xz-utils bzip2 zlib readline bash ncurses expat<br />
warning: pacman-3.5.4-4 is up to date -- reinstalling<br />
warning: glibc-2.14.1-1 is up to date -- reinstalling<br />
warning: libfetch-2.33-3 is up to date -- reinstalling<br />
warning: libarchive-2.8.5-2 is up to date -- reinstalling<br />
warning: openssl-1.0.0.e-1 is up to date -- reinstalling<br />
warning: acl-2.2.51-1 is up to date -- reinstalling<br />
warning: attr-2.4.46-1 is up to date -- reinstalling<br />
warning: xz-5.0.3-1 is up to date -- reinstalling<br />
warning: bzip2-1.0.6-3 is up to date -- reinstalling<br />
warning: zlib-1.2.5-4 is up to date -- reinstalling<br />
warning: readline-6.2.001-3 is up to date -- reinstalling<br />
warning: bash-4.2.010-2 is up to date -- reinstalling<br />
warning: ncurses-5.9-2 is up to date -- reinstalling<br />
warning: expat-2.0.1-7 is up to date -- reinstalling<br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
<br />
Targets (14): glibc-2.14.1-1 ncurses-5.9-2 readline-6.2.001-3 bash-4.2.010-2 \<br />
zlib-1.2.5-4 bzip2-1.0.6-3 xz-5.0.3-1 attr-2.4.46-1 acl-2.2.51-1 \<br />
openssl-1.0.0.e-1 expat-2.0.1-7 libarchive-2.8.5-2 libfetch-2.33-3 \<br />
pacman-3.5.4-4<br />
<br />
Total Download Size: 0.00 MB<br />
Total Installed Size: 67.17 MB<br />
<br />
Proceed with installation? [Y/n] y<br />
call to execv failed (No such file or directory)<br />
error: command failed to execute correctly<br />
call to execv failed (No such file or directory)<br />
error: command failed to execute correctly<br />
error: command failed to execute correctly<br />
warning: /etc/pacman.conf installed as /etc/pacman.conf.pacnew<br />
[root@chris chris]# <br />
<br />
I don't know if they are 'expected' errors, or if they're a problem. I carried on with the<br />
<br />
# pacman -S $(pacman -Qq)<br />
<br />
command, which also produced some errors. I won't paste the whole output, since it is rather large, but some of the more serious looking errors were:<br />
<br />
Proceed with installation? [Y/n] y<br />
/tmp/alpm_nhTnAm/.INSTALL: line 6: sbin/init: No such file or directory<br />
usr/sbin/locale-gen: line 16: /bin/rm: No such file or directory<br />
Generating locales...<br />
usr/sbin/locale-gen: line 33: /bin/sed: No such file or directory<br />
.UTF-8usr/sbin/locale-gen: line 35: /bin/sed: No such file or directory<br />
...usr/sbin/locale-gen: line 38: /bin/sed: No such file or directory<br />
error: command failed to execute correctly<br />
error: command failed to execute correctly<br />
error: command failed to execute correctly<br />
error: command failed to execute correctly<br />
error: command failed to execute correctly<br />
error: command failed to execute correctly<br />
error: command failed to execute correctly<br />
error: command failed to execute correctly<br />
/tmp/alpm_pnGmoW/.INSTALL: line 16: bin/grep: No such file or directory<br />
groupadd: group 'optical' already exists<br />
<br />
After that I ran both commands again, in the same order, and this time they both completed without errors, and my system appears to be fine as far as I can tell.<br />
<br />
I don't know if the errors produced the first time through needed fixing, or if my solution (re-running both commands) is a good solution, but maybe someone who knows could update the article accordingly, either saying not to worry about the errors, or saying what how to fix them. --[[User:Dooglus|Dooglus]] 20:18, 9 November 2011 (EST)</div>Dooglushttps://wiki.archlinux.org/index.php?title=Talk:Migrating_between_architectures&diff=169377Talk:Migrating between architectures2011-11-10T01:18:19Z<p>Dooglus: I got a bunch of errors when upgrading to 64bit using 'method 2'...</p>
<hr />
<div>I followed the instructions for method two (installing from a running system) to upgrade from 32 bit to 64 bit. It went well until it came to reinstalling pacman and friends, then I saw a bunch of errors:<br />
<br />
[root@chris chris]# pacman -S pacman glibc libfetch libarchive openssl acl attr \<br />
xz-utils bzip2 zlib readline bash ncurses expat<br />
warning: pacman-3.5.4-4 is up to date -- reinstalling<br />
warning: glibc-2.14.1-1 is up to date -- reinstalling<br />
warning: libfetch-2.33-3 is up to date -- reinstalling<br />
warning: libarchive-2.8.5-2 is up to date -- reinstalling<br />
warning: openssl-1.0.0.e-1 is up to date -- reinstalling<br />
warning: acl-2.2.51-1 is up to date -- reinstalling<br />
warning: attr-2.4.46-1 is up to date -- reinstalling<br />
warning: xz-5.0.3-1 is up to date -- reinstalling<br />
warning: bzip2-1.0.6-3 is up to date -- reinstalling<br />
warning: zlib-1.2.5-4 is up to date -- reinstalling<br />
warning: readline-6.2.001-3 is up to date -- reinstalling<br />
warning: bash-4.2.010-2 is up to date -- reinstalling<br />
warning: ncurses-5.9-2 is up to date -- reinstalling<br />
warning: expat-2.0.1-7 is up to date -- reinstalling<br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
<br />
Targets (14): glibc-2.14.1-1 ncurses-5.9-2 readline-6.2.001-3 bash-4.2.010-2 \<br />
zlib-1.2.5-4 bzip2-1.0.6-3 xz-5.0.3-1 attr-2.4.46-1 acl-2.2.51-1 \<br />
openssl-1.0.0.e-1 expat-2.0.1-7 libarchive-2.8.5-2 libfetch-2.33-3 \<br />
pacman-3.5.4-4<br />
<br />
Total Download Size: 0.00 MB<br />
Total Installed Size: 67.17 MB<br />
<br />
Proceed with installation? [Y/n] y<br />
call to execv failed (No such file or directory)<br />
error: command failed to execute correctly<br />
call to execv failed (No such file or directory)<br />
error: command failed to execute correctly<br />
error: command failed to execute correctly<br />
warning: /etc/pacman.conf installed as /etc/pacman.conf.pacnew<br />
[root@chris chris]# <br />
<br />
I don't know if they are 'expected' errors, or if they're a problem. I carried on with the<br />
<br />
# pacman -S $(pacman -Qq)<br />
<br />
command, which also produced some errors. I won't paste the whole output, since it is rather large, but some of the more serious looking errors were:<br />
<br />
Proceed with installation? [Y/n] y<br />
/tmp/alpm_nhTnAm/.INSTALL: line 6: sbin/init: No such file or directory<br />
usr/sbin/locale-gen: line 16: /bin/rm: No such file or directory<br />
Generating locales...<br />
usr/sbin/locale-gen: line 33: /bin/sed: No such file or directory<br />
.UTF-8usr/sbin/locale-gen: line 35: /bin/sed: No such file or directory<br />
...usr/sbin/locale-gen: line 38: /bin/sed: No such file or directory<br />
error: command failed to execute correctly<br />
error: command failed to execute correctly<br />
error: command failed to execute correctly<br />
error: command failed to execute correctly<br />
error: command failed to execute correctly<br />
error: command failed to execute correctly<br />
error: command failed to execute correctly<br />
error: command failed to execute correctly<br />
/tmp/alpm_pnGmoW/.INSTALL: line 16: bin/grep: No such file or directory<br />
groupadd: group 'optical' already exists<br />
<br />
After that I ran both commands again, in the same order, and this time they both completed without errors, and my system appears to be fine as far as I can tell.<br />
<br />
I don't know if the errors produced the first time through needed fixing, or if my solution (re-running both commands) is a good solution, but maybe someone who knows could update the article accordingly, either saying not to worry about the errors, or saying what how to fix them. --[[User:Dooglus|Dooglus]] 20:18, 9 November 2011 (EST)</div>Dooglushttps://wiki.archlinux.org/index.php?title=Migrating_between_architectures&diff=169366Migrating between architectures2011-11-09T21:40:14Z<p>Dooglus: /* Power supply */ "at least an hour" implies "or more"</p>
<hr />
<div>[[Category:Arch64 (English)]]<br />
[[Category:Getting and installing Arch (English)]]<br />
{{i18n|Migrating Between Architectures Without Reinstalling}}<br />
[[fr:Migration 64 bits]]<br />
This page documents two potential methods of migrating installed systems between i686 (32-bit) and x86_64 (64-bit) architectures, in either direction. The methods avoid reinstalling the entire system. One method uses a liveCD, the other modifies the system from within..<br />
<br />
{{Warning|Unless explicitly stated, all these methods are UNTESTED and may irreparably damage your system. Continue at your own risk.}}<br />
<br />
== General preparation ==<br />
<br />
=== Confirm 64-bit architecture ===<br />
<br />
If you are already running x86_64 but want to install i686 this is not relevant and you can skip this step.<br />
<br />
In order to run 64-bit software, you must have a 64-bit capable CPU. Most modern CPUs are capable of running 64-bit software. You may check your CPU with the following command:<br />
<br />
grep --color '\<lm\>' /proc/cpuinfo<br />
<br />
For CPUs that support x86_64, this will return the {{Codeline|lm}} flag (“long mode”) highlighted. Beware that ''lahf_lm'' is a different flag and does not indicate 64-bit capability itself.<br />
<br />
=== Disk space ===<br />
<br />
You should be prepared for {{Filename|/var/cache/pacman/pkg}} to grow approximately twice its current size during the migration. This is assumes only packages that are currently installed are in the cache, as if “pacman -Sc” (clean) was recently run. The disk space increase is due to duplication between the i686 and x86_64 versions of each package.<br />
<br />
If you have not enough disk, please use ''[[gparted]]'' to resize the relevant partition, or mount another partition to ''/var/cache/pacman''.<br />
<br />
Please do not remove packages of the old architecture from the cache until the system is fully operating in the new architecture. Removing the packages too early may leave you unable to fall back and revert changes.<br />
<br />
=== Power supply ===<br />
The migration may take a substantial amount of time, and it would be inconvenient to interrupt the process. You should plan on at least an hour, depending on the number and size of your installed packages and internet connection speed (although you can download everything before starting the critical part). Please make sure you are connected to a stable power source, preferably with some sort of failover or battery backup.<br />
<br />
=== Fallback packages ===<br />
<br />
If the migration fails halfway through, there are packages that can help sort out the situation, but they should be installed before the main packages are migrated. More details about using them under [[#Troubleshooting]] below.<br />
<br />
One package is {{Package Official|busybox}}, which can be used to revert changes. It is statically linked and does not depend on any libraries. The 32-bit (i686) version should be installed, using<br />
<br />
# pacman -S busybox<br />
<br />
Another package is {{Package Official|lib32-glibc}}, from the [[Multilib Project|Multilib]] x86_64 repository. It is probably only useful when migrating ''away'' from 32 bits; in any case you may safely skip this package. You can use the package to run 32 bit programs by explicitly calling {{Filename|/lib/ld-linux-x86-32.so.2}}. Install with:<br />
<br />
# pacman -S lib32-glibc<br />
<br />
== Method 1: Utilising the Arch LiveCD ==<br />
<br />
# Download, burn and boot the 64-bit Arch ISO LiveCD<br />
# Configure your network on the LiveCD, then pacman to use your new architecture repos<br />
# Mount your existing installation to {{Filename|/mnt}} directory. For example: {{Codeline|mount /dev/sda1 /mnt}}<br />
# Use the following script to update the local pacman database, get a list of all your installed packages and then reinstall them:<br />
<br />
#!/bin/bash<br />
<br />
MOUNTED_INSTALL='/mnt'<br />
TEMP_FILE='/tmp/packages.list'<br />
<br />
pacman --root $MOUNTED_INSTALL -Sy<br />
pacman --root $MOUNTED_INSTALL -Qqet > $TEMP_FILE<br />
<br />
for PKG in $(cat $TEMP_FILE) ; do<br />
pacman --root $MOUNTED_INSTALL -S $PKG --noconfirm<br />
done<br />
<br />
exit 0<br />
<br />
== Method 2: From a running system ==<br />
<br />
=== Package preparation ===<br />
<br />
==== Cache old packages ====<br />
<br />
{{Note|If you have any packages installed from the [[AUR]] or third-party repositories without new architecture availability, pacman will let you know it cannot find a suitable replacement. Make a list of these packages so you may re-install them after the update process and then remove them using {{Codeline|pacman -Rsn package_name}}.}}<br />
<br />
If you do not have all your installed packages in your cache, download them (for the old architecture) for fallback purposes.<br />
<br />
# pacman -Sw $(comm -23 <(pacman -Qq) <(pacman -Qmq))<br />
<br />
or use bacman from pacman-contrib package to generate them.<br />
<br />
If you are migrating away from 32 bits, now is the time to install 32-bit Busybox:<br />
<br />
# pacman -S busybox<br />
<br />
==== Change Pacman architecture ====<br />
<br />
Edit the ''/etc/pacman.conf'' file and change ''Architecture'' from {{Codeline|auto}} to the new value. These ''sed'' commands may be used:<br />
<br />
For x86_64:<br />
<br />
# sed -i -e s/'Architecture = auto'/'Architecture = x86_64'/g /etc/pacman.conf<br />
<br />
and for i686:<br />
<br />
# sed -i -e s/'Architecture = auto'/'Architecture = i686'/g /etc/pacman.conf<br />
<br />
Pacman’s package repository databases should be manually removed to force synchronisation with the new repositories:<br />
<br />
# rm -rf /var/lib/pacman/sync/* # remove existing repository cache<br />
# pacman -Sy # sync new architecture repositories<br />
<br />
==== Download new packages ====<br />
<br />
Download the new architecture versions of all our currently installed packages:<br />
<br />
# pacman -Sw $(pacman -Qq|sed '/^lib32-/ d') # download new package versions<br />
<br />
If there are some packages that cannot be downloaded, please remove them.<br />
<br />
If migrating to 32 bits, install the 32-bit Busybox fallback now that Pacman has been configured with the 32-bit architecture:<br />
<br />
# pacman -S busybox<br />
<br />
Alternatively, if migrating to 64 bits, now is the time to install the ''lib32-glibc'' fallback:<br />
<br />
# pacman -S lib32-glibc<br />
<br />
=== Package installation ===<br />
<br />
==== Install kernel (64-bit) ====<br />
<br />
Upgrading the kernel to 64 bits (x86_64) is safe and straightforward: 32 bit and 64 bit applications run equally well under a 64-bit kernel. For migration ''away'' from 64 bits, leave the 64-bit kernel installed and running for now and skip this step.<br />
<br />
To install the standard Arch Linux kernel, use the following command:<br />
<br />
# pacman -S linux<br />
<br />
Boot the new 64-bit kernel and verify it is running the x86_64 architecture:<br />
<br />
{{Command|name=uname -m|output=x86_64}}<br />
<br />
==== Console terminal ====<br />
<br />
This is the time to switch to a text-mode virtual console (e.g. Ctrl+Alt+F1) for the rest of the process. You should be fine using a pseudo-terminal like SSH but it is not advised. There will be several packages removed and replaced during the update process that may cause X11 desktops to become unstable leaving your system in an unbootable state.<br />
<br />
==== Install Pacman ====<br />
<br />
{{Warning|Once you start updating pacman and its dependencies it can not be interrupted. Pacman and all of its dependencies must be installed at the same time in a single command line.}}<br />
<br />
# pacman -S pacman glibc libfetch libarchive openssl acl attr xz-utils bzip2 zlib readline bash ncurses expat<br />
<br />
Immediately following this command only Busybox, Bash and Pacman will be executable until the other packages are migrated below. You must not reboot your system until the following commands have been completed. You have been warned.<br />
<br />
==== Install remaining packages ====<br />
<br />
Install all of the previously downloaded replacements for the new architecture. (Go get a drink and make a sandwich; this could take a while.)<br />
<br />
# pacman -S $(pacman -Qq)<br />
<br />
For migration away from 64 bits, you may want to skip installing a 32-bit kernel in the command above, since the old 64-bit kernel will still run 32-bit programs.<br />
<br />
After this step the migration in either direction should be complete and it should be safe to reboot the computer.<br />
<br />
== Cleanup ==<br />
<br />
You are now free to remove Busybox and ''lib32-glibc''.<br />
<br />
# pacman -Rcn busybox lib32-glibc<br />
<br />
==== Makepkg compiler flags ====<br />
<br />
During the upgrade the new version of {{Filename|/etc/makepkg.conf}} may be stored as {{Filename|/etc/makepkg.conf.pacnew}}. You will have to replace the old version or modify it, if you want to compile anything with [[makepkg]] in the future.<br />
<br />
# mv /etc/makepkg.conf /etc/makepkg.conf.backup && mv /etc/makepkg.conf.pacnew /etc/makepkg.conf<br />
<br />
It might also be a good idea to just get a list of "new" additions to {{Filename|/etc}}. You can get a list with the following command:<br />
<br />
# find /etc/ -type f -name \*.pac\*<br />
<br />
== Troubleshooting ==<br />
<br />
During the upgrade, when glibc is replaced by the new architecture version, old architecture versions of many programs will not run. If problems occur, you can solve them with {{Package Official|busybox}} and {{Package Official|lib32-glibc}}.<br />
<br />
=== Busybox ===<br />
<br />
In Arch, Busybox is statically linked; it can run without any libraries. There are many commands available to you. For example, to extract an i686 version of Pacman from a cached package:<br />
<br />
# busybox tar xf /var/cache/pacman/pkg/pacman-3.3.2-1-i686.pkg.tar.gz -C <some folder><br />
<br />
=== Lib32-glibc ===<br />
<br />
Example run 32 bit {{Filename|/bin/ls}}:<br />
<br />
# /lib/ld-linux-x86-32.so.2 /bin/ls<br />
<br />
==See also==<br />
*[[Migrate installation to new hardware]]</div>Dooglushttps://wiki.archlinux.org/index.php?title=Pkgtools&diff=169167Pkgtools2011-11-08T06:48:34Z<p>Dooglus: /* "Command not found" hook */ fix configuration filename path</p>
<hr />
<div>[[Category:Package development (English)]]<br />
{{stub}}<br />
<br />
==About==<br />
<br />
{{Package Official|Pkgtools}} is a package created by Daenyth that includes various useful package-related utilities. It is available in community, and the latest {{Package AUR|pkgtools-git}} release is available in AUR.<br />
<br />
===newpkg===<br />
<br />
A tool to simplify creating a new package.<br />
<br />
===pkgconflict===<br />
<br />
===pkgfile===<br />
{{Codeline|pkgfile}} is a tool that tells you which package owns a specific file. It also has some extra related features.<br />
<br />
===="Command not found" hook====<br />
pkgfile includes a "command not found" hook that will automatically search the official repositories if you enter a command that is not recognized. It can be enabled in {{Filename|/etc/pkgtools/pkgfile.conf}} or in {{Filename|~/.config/pkgtools/pkgfile.conf}}.<br />
<br />
===spec2arch===<br />
<br />
Converts an rpm .spec file into a [[PKGBUILD]]<br />
<br />
===whoneeds===</div>Dooglushttps://wiki.archlinux.org/index.php?title=Pacman&diff=168628Pacman2011-11-04T02:53:48Z<p>Dooglus: /* Repositories */ fix FAQ link</p>
<hr />
<div>[[Category:Package management (English)]]<br />
[[de:Pacman]]<br />
[[fr:Pacman]]<br />
[[ro:Pacman]]<br />
{{i18n|pacman}} {{Lowercase title}}<br />
<br />
{{Article summary start}}<br />
{{Article summary text|pacman is the Arch Linux [[Wikipedia:Package management system|package manager]]. Package managers are used to install, upgrade, and remove software. This article covers basic usage and troubleshooting tips.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Package management overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Downgrading Packages}}<br />
{{Article summary wiki|Improve Pacman Performance}}<br />
{{Article summary wiki|pacman GUI Frontends}}<br />
{{Article summary wiki|pacman Rosetta}}<br />
{{Article summary wiki|pacman Tips}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary link|libalpm(3) Manual Page|http://www.archlinux.org/pacman/libalpm.3.html}}<br />
{{Article summary link|pacman(8) Manual Page|http://www.archlinux.org/pacman/pacman.8.html}}<br />
{{Article summary link|pacman.conf(5) Manual Page|http://www.archlinux.org/pacman/pacman.conf.5.html}}<br />
{{Article summary link|repo-add(8) Manual Page|http://www.archlinux.org/pacman/repo-add.8.html}}<br />
{{Article summary end}}<br />
<br />
The '''[http://archlinux.org/pacman/ pacman]''' [[Wikipedia:Package management system|package manager]] is one of the main features of Arch Linux. It combines a simple binary package format with an easy-to-use build system (see [[makepkg]] and [[Arch Build System]]). The goal of pacman is to make it possible to easily manage packages, whether they are from the official Arch repositories or the user's own builds.<br />
<br />
pacman keeps the system up to date by synchronizing package lists with the master server. This server/client model also allows you to download/install packages with a simple command, complete with all required dependencies.<br />
<br />
pacman is written in the C programming language and uses the {{ic|.pkg.tar.xz}} package format.<br />
<br />
{{Tip|The official '''pacman''' package contains also other useful tools, such as [[makepkg]], pactree, vercomp and more. You can get the full list from {{ic|pacman -Ql pacman <nowiki>|</nowiki> grep bin}} }}<br />
<br />
== Configuration ==<br />
<br />
pacman configuration is located in {{ic|/etc/pacman.conf}}. This is the place where the user configures the program to work in the desired manner. In-depth information about the configuration file can be found in [http://www.archlinux.org/pacman/pacman.conf.5.html man pacman.conf].<br />
<br />
=== General options ===<br />
<br />
General options are in the {{ic|[options]}} section. Read the man page or look in the default {{ic|pacman.conf}} for information on what can be done here.<br />
<br />
==== Skip package from being upgraded ====<br />
<br />
To skip upgrading a specific package, specify it as such:<br />
<br />
IgnorePkg=linux<br />
<br />
For multiple packages use a space-separated list, or use additional IgnorePkg lines.<br />
<br />
==== Skip package group from being upgraded ====<br />
<br />
As with packages, skipping a whole package group is also possible:<br />
<br />
IgnoreGroup=gnome<br />
<br />
=== Repositories ===<br />
<br />
This section defines which repositories to use, as referred to in {{ic|pacman.conf}}. They can be stated here directly, or included from another file.<br />
<br />
All official repositories use the same {{ic|/etc/pacman.d/mirrorlist}} file which uses the {{ic|$repo}} variable, making it necessary to maintain only one list.<br />
<br />
The following is an example for the [[Official Repositories|official repositories]] that defers [[mirrors]] to the mirrorlist.<br />
<br />
<pre><br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include=/etc/pacman.d/mirrorlist<br />
<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include=/etc/pacman.d/mirrorlist<br />
<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include=/etc/pacman.d/mirrorlist<br />
</pre><br />
<br />
{{Note|Care should be taken when using the [testing] repository. It is in active development and updating may cause some packages to stop working. People who use the [testing] repository are encouraged to subscribe to the [http://mailman.archlinux.org/mailman/listinfo/arch-dev-public arch-dev-public mailing list] for current information.}}<br />
<br />
{{Warning|[[FAQ#Q) Does Arch use package signing?|Pacman currently uses unsigned packages]]; however, [[package signing]] is in development.}}<br />
<br />
== Usage ==<br />
<br />
To read other examples of what pacman can do, refer to [http://archlinux.org/pacman/pacman.8.html man pacman]. The examples below are just a small sample of operations that can be performed.<br />
<br />
===Installing packages===<br />
<br />
====Installing specific packages====<br />
To install a single package or list of packages (including dependencies), issue the following command:<br />
<br />
# pacman -S package_name1 package_name2 ...<br />
<br />
Sometimes there are multiple versions of a package in different repositories (e.g. [extra] and [testing]). Specify which one to install:<br />
<br />
# pacman -S extra/package_name<br />
# pacman -S testing/package_name<br />
<br />
====Installing package groups====<br />
Some packages belong to a group of packages that can all be installed simultaneously. For example, issuing the command<br />
<br />
# pacman -S gnome<br />
will install all the packages that belong to the "gnome" group. You can see what packages belong to the gnome group by running:<br />
<br />
# pacman -Sg gnome<br />
<br />
You can also visit http://www.archlinux.org/groups/ to see what package groups are available.<br />
<br />
{{Note|If a package in the list is already installed on the system, it will be reinstalled even if it is already up-to-date, unless you use the {{ic|--needed}} option.}}<br />
<br />
{{Warning|1=Do not refresh the package list when installing packages (i.e. {{ic|pacman -Sy package_name}}); this can lead to dependency issues.[http://bbs.archlinux.org/viewtopic.php?id=89328] [[#Upgrading packages|Upgrade]] explicitly first; before installing new packages.}}<br />
<br />
=== Removing packages ===<br />
<br />
To remove a single package, leaving all of its dependencies installed:<br />
<br />
# pacman -R package_name<br />
<br />
To remove a package and its dependencies which are not required by any other installed package:<br />
<br />
# pacman -Rs package_name<br />
<br />
To remove a package, its dependencies and all the packages that depend on the target package:<br />
<br />
{{Warning|This operation is recursive, and must be used with care since it can remove many potentially needed packages.}}<br />
<br />
# pacman -Rsc package_name<br />
<br />
pacman saves important configuration files when removing certain applications and names them with the extension: {{ic|.pacsave}}. To prevent the creation of these backup files use the {{ic|-n}} option:<br />
<br />
# pacman -Rn package_name<br />
<br />
{{Note|pacman will not remove configurations that the application itself creates (for example "dotfiles" in the home folder).}}<br />
<br />
===Upgrading packages===<br />
<br />
pacman can update all packages on the system with just one command. This could take quite a while depending on how up-to-date the system is. This command can synchronize the repository databases ''and'' update the system's packages:<br />
<br />
# pacman -Syu<br />
<br />
{{Warning|Instead of immediately updating as soon as updates are available, users must recognize that due to the nature of Arch's rolling release approach, an update may have unforeseen consequences. This means that it is not wise to update if, for example, one is about to deliver an important presentation. Rather, update during free time and be prepared to deal with any problems that may arise.}}<br />
<br />
pacman is a powerful package management tool, but it does not attempt to handle all corner cases. Read [[The Arch Way]] if this confuses you. Rather, users must be vigilant and take responsibility for maintaining their own system. '''When performing a system update, it is essential that users read all information output by pacman and use common sense.''' If a configuration file that you have modified needs to be upgraded for a new version of a package, pacman will prompt you to merge a [[Pacnew and Pacsave Files|pacnew]] file.<br />
<br />
{{Tip|Remember that pacman's output is logged in {{ic|/var/log/pacman.log}}.}}<br />
<br />
Before upgrading, it is advisable to visit the [http://archlinux.org/ Arch Linux home page] to check the latest news (or subscribe to the RSS feed): when updates require out-of-the-ordinary user intervention (more than what can be handled simply by following the instructions given by pacman), an appropriate news post will be made.<br />
<br />
If you encounter problems that cannot be solved by these instructions, make sure to search the forum. It is likely that others have encountered the same problem and have posted instructions for solving it.<br />
<br />
=== Querying package databases ===<br />
<br />
pacman queries the local package database with the {{ic|-Q}} flag; see:<br />
<br />
$ pacman -Q --help<br />
<br />
and queries the sync databases with the {{ic|-S}} flag; see:<br />
<br />
$ pacman -S --help<br />
<br />
pacman can search for packages in the database, searching both in packages' names and descriptions:<br />
<br />
$ pacman -Ss string1 string2 ...<br />
<br />
To search for already installed packages:<br />
<br />
$ pacman -Qs string1 string2 ...<br />
<br />
To display extensive information about a given package:<br />
<br />
$ pacman -Si package_name<br />
<br />
for locally installed packages:<br />
<br />
$ pacman -Qi package_name<br />
<br />
Passing two {{ic|-i}} flags will also display the list of backup files and their modification states:<br />
<br />
$ pacman -Qii package_name<br />
<br />
To retrieve a list of the files installed by a package:<br />
<br />
$ pacman -Ql package_name<br />
<br />
One can also query the database to know which package a file in the file system belongs to:<br />
<br />
$ pacman -Qo /path/to/a/file<br />
<br />
To list all packages no longer required as dependencies (orphans):<br />
<br />
$ pacman -Qdt<br />
<br />
=== Additional commands ===<br />
<br />
Upgrade the system and install a list of packages (one-liner):<br />
<br />
# pacman -Syu package_name1 package_name2 ...<br />
<br />
Download a package without installing it:<br />
<br />
# pacman -Sw package_name<br />
<br />
Install a 'local' package that is not from a repository:<br />
<br />
# pacman -U /path/to/package/package_name-version.pkg.tar.xz<br />
<br />
Install a 'remote' package (not from a repository):<br />
<br />
# pacman -U <nowiki>http://www.example.com/repo/example.pkg.tar.xz</nowiki><br />
<br />
Clean the package cache of packages that are not currently installed ({{ic|/var/cache/pacman/pkg}}):<br />
<br />
{{Warning|Only do this when you are sure that the current versions of installed packages are stable and you will not need to [[Downgrading Packages|downgrade]] as {{ic|pacman -Sc}} removes all the old versions of installed packages.}}<br />
<br />
# pacman -Sc<br />
<br />
Clean the entire package cache:<br />
<br />
{{Warning|This clears the entire package cache. Doing this is a very bad practice, as you will not be able to downgrade to the current set of packages in the case that you upgrade and it causes breakage.}}<br />
<br />
# pacman -Scc<br />
<br />
===Partial upgrades are unsupported===<br />
Arch Linux is a rolling release, and new [[Wikipedia:Library (computing)|library]] versions will be pushed to the repositories. The developers and trusted users will rebuild all the packages in the repositories that need to be rebuilt against the libraries. If you have locally installed packages (such as AUR packages), you will need to rebuild them yourself when their dependencies receive a [[Wikipedia:soname|soname]] bump.<br />
<br />
This means that partial upgrades are '''not supported'''. Do not use {{ic|pacman -Sy package}} or any equivalent such as {{ic|pacman -Sy}} and then {{ic|pacman -S package}}. Always upgrade before installing a package if you have refreshed the sync repositories. You should also be very careful when using {{ic|IgnorePkg}} and {{ic|IgnoreGroup}} for the same reason.<br />
<br />
If you do a partial upgrade and binaries are broken because they cannot find the libraries they are linked against, '''do not "fix" the problem simply by symlinking'''. Libraries receive [[Wikipedia:soname|soname]] bumps when they are '''not backwards compatible'''. A simple {{ic|pacman -Syu}} to a properly synced mirror will fix the issue as long as pacman is not broken.<br />
<br />
== Troubleshooting ==<br />
<br />
{{FAQ<br />
|question=An update to package XYZ broke my system!<br />
|answer=Arch Linux is a rolling-release cutting-edge distribution. Package updates are available as soon as they are deemed stable enough for general use. However, updates sometimes require user intervention: configuration files may need to be updated, optional dependencies may change, etc.<br />
<br />
The most important tip to remember is to not "blindly" update your system. Always read the list of packages to be updated. Note whether "critical" packages are going to be updated ({{ic|linux}}, {{ic|xorg-server}}, and so on). If so, it is usually a good idea to check for any news at https://www.archlinux.org/ and scan recent forum posts to see if people are experiencing problems as a result of an update.<br />
<br />
If a package update is expected/known to cause problems, packagers will ensure that pacman displays an appropriate message when the package is updated. If experiencing trouble after an update, double-check pacman's output by looking at the log ({{ic|/var/log/pacman.log}}). <br />
<br />
At this point, '''only after ensuring there is no information available through pacman, there is no relative news on http://archlinux.org, and there are no forum posts regarding the update''', you should consider seeking help on the forum, over [[IRC Channel|IRC]], or [[Downgrading Packages|downgrading the offending package]].<br />
<br />
Re-read the last paragraph.}}<br />
<br />
{{FAQ<br />
|question=I know an update to package ABC was released, but pacman says my system is up to date!<br />
|answer=pacman mirrors are not synced immediately. It may take over 24 hours before an update is available to you. <br />
<br />
The only options are be patient or use another mirror. [https://www.archlinux.de/?page=MirrorStatus MirrorStatus] can help you identify an up-to-date mirror.}}<br />
<br />
{{FAQ<br />
|question=I get an error when updating: "file exists in filesystem"!<br />
|answer=ASIDE: ''Taken from http://bbs.archlinux.org/viewtopic.php?id=56373 by Misfit138.''<br />
<br />
error: could not prepare transaction<br />
error: failed to commit transaction (conflicting files)<br />
package: /path/to/file exists in filesystem<br />
Errors occurred, no packages were upgraded.<br />
<br />
Why this is happening: pacman has detected a file conflict, and by design, will not overwrite files for you. This is a design feature, not a flaw. ({{ic|pacman -Qo}} may be invoked to query which package owns the file, if any.)<br />
<br />
The issue is usually trivial to solve. A safe way is to first check if another package owns the file ({{ic|pacman -Qo /path/to/file}}). If the file is owned by another package, [[Reporting Bug Guidelines|file a bug report]]. If the file is not owned by another package, rename the file which 'exists in filesystem' and re-issue the update command. If all goes well, the file may then be removed.}}<br />
<br />
{{FAQ<br />
|question=I get an error when installing a package: "not found in sync db"<br />
|answer=Firstly, ensure the package actually exists (and watch out for typos!) If certain the package exists, your package list may be out-of-date or your repositories may be incorrectly configured. Try running {{ic|pacman -Syy}} to force a refresh of all package lists.}}<br />
<br />
{{FAQ<br />
|question=pacman is repeatedly upgrading the same package!<br />
|answer=This is due to duplicate entries in {{ic|/var/lib/pacman/local/}}, such as two {{ic|linux}} instances. {{ic|pacman -Qi}} outputs the correct version, but {{ic|pacman -Qu}} recognizes the old version and therefore will attempt to upgrade.<br />
<br />
Solution: delete the offending entry in {{ic|/var/lib/pacman/local/}}.<br />
<br />
{{Note|pacman version 3.4 should display an error in case of duplicate entries, which should make this note obsolete.}}}}<br />
<br />
{{FAQ<br />
|question=pacman crashes during an upgrade!<br />
|answer=In the case that pacman crashes with a "database write" error whilst removing packages, and reinstalling or upgrading packages fails:<br />
#Boot using the Arch live CD<br />
#Mount your root filesystem<br />
#Update the pacman database via {{ic|pacman -Syy}}<br />
#Reinstall the broken package via {{ic|pacman -r /path/to/root -S package}}}}<br />
<br />
{{FAQ<br />
|question=I installed software using {{ic|make install}}; these files do not belong to any package!<br />
|answer=If receiving a "conflicting files" error, note that pacman will overwrite manually-installed software if supplied with the {{ic|-f}} switch ({{ic|pacman -Sf}}).<br />
<br />
See [[pacman Tips#Getting a list of files not owned by any package]] for a script that searches the filesystem for ''disowned'' files.}}<br />
<br />
{{FAQ<br />
|question=I need a package with a specific file. How do I know what provides it?<br />
|answer=Install [[pkgtools]] which contains {{ic|pkgfile}} that uses a separate database with all files and their associated packages.}}<br />
<br />
{{FAQ<br />
|question=pacman is completely broken! How do I reinstall it?<br />
|answer=In the case that pacman is broken beyond repair, manually download the necessary packages ({{Pkg|openssl}}, {{Pkg|libarchive}}, {{Pkg|libfetch}}, and {{Pkg|pacman}}) and extract them to root. The pacman binary will be restored along with its default configuration file. Afterwards, reinstall these packages with pacman to maintain package database integrity. Additional information and an example (outdated) script that automates the process is available in [https://bbs.archlinux.org/viewtopic.php?id=95007 this] forum post.}}<br />
<br />
==See also==<br />
*[[Pacman package signing]]<br />
*[[FAQ#Package_Management]]</div>Dooglushttps://wiki.archlinux.org/index.php?title=Talk:Touchpad_Synaptics&diff=168001Talk:Touchpad Synaptics2011-10-30T05:24:28Z<p>Dooglus: on-the-fly settings can be reset on suspend/resume in GNOME</p>
<hr />
<div>= Rewrite in progress =<br />
<br />
Starting today, I'll be rewriting the majority of the article to reflect proper installation / configuration with xorg 1.8 and up.<br />
<br />
This will mean all xorg.conf and hal policies will be removed from the article, they should no longer be required.<br />
--[[User:Stefanwilkens|stefanwilkens]] 17:10, 10 September 2010 (EDT)<br />
<br />
many references to, issues with and sollutions for older xorg versions, HAL situations and other outdated things have been removed. What is left should be applicable to the current situation. Next step is rewriting things to get a proper structure. --[[User:Stefanwilkens|stefanwilkens]] 17:46, 13 September 2010 (EDT)<br />
<br />
Things seem to be back in order, many thanks to those of you that stepped in over the last months --[[User:Stefanwilkens|stefanwilkens]] 16:45, 25 April 2011 (EDT)<br />
<br />
= hotplugging =<br />
Could someone with intimate knowledge of the new Xorg hotplugging system please provide some details for that particular section of the article? I have seen all sorts of info about the Hal policies on the forums, however I do not use them myself and cannot verify their correctness. --[[User:Thayer|Thayer]] Dec 2, 2008<br />
----<br />
I don't have much knowledge of the new Xorg hotplugging, but I do use it. I've added few of the policies that where used. --[[User:Duologic|Duologic]] Jan 24, 2009<br />
----<br />
I can't get this to work at all! I tried both the 11- and the suggested 99- location (Gentoo wiki suggests that as well) but it seems like it isn't even reading that file! Can I somehow tell if it ''is'' actually reading it? --[[User:Svenstaro|Svenstaro]] 18:07, 2 July 2009 (EDT)<br />
----<br />
Just an FYI, I'm in the process of doing a moderate rewrite of this article, hopefully simplifying and clarifying things. --[[User:Ronin-Sage|Ronin-Sage]] 03:10, 16 June 2009 (EDT)<br />
----<br />
I was having trouble getting my touchpad to work with evdev, until I installed the xf86-input-synaptics driver which is suggested at the beginning of the page. But if I understand it correctly, the xf86-input-synaptics driver takes over evdev, so none of the settings int he fdi would have any effect? --[[User:hensond|hensond]] 02:47, 04 Jan 2010 (EDT)<br />
----<br />
<br />
== Thank you very much for your valuable effort... ==<br />
<br />
I am a gentoo user who had the problem of not reading synaptics fdi policy file. I created an account in Arch linux just to thank you. It has helped very much...<br />
Disabling mouse plugin in gnome setting daemon worked perfectly.<br />
<br />
: Appreciate taking the time to comment, Ketetefid. Glad you got it working.<br />
: --[[User:Gen2ly|Gen2ly]] 14:24, 22 March 2010 (EDT)<br />
<br />
----<br />
I am just speaking up as one of those users that are having problems with the touchpad cursor inexplicably jumping around. Not only does it jump around, but it creates random left and right clicks when it jumps. This happens while I am actually using the touchpad and not while typing as lots of others have been reporting around various forums. Maddening. At first it seemed to "calm down" over time (ie. time since reboot) but now seems to be pretty much constant. If as you say there is currently no patch for this, it would be great to get a heads-up if and when the developers eventually get a handle on it. Thanks very much...<br />
: --[[User:lucky_waster|lucky_waster]] 11:33, 20 June 2010<br />
<br />
----<br />
I was using "synclient TapButton1=1" in a file which is run when I start GNOME to turn on tapping, but it was only working until the first time I suspended and resumed the system.<br />
<br />
Searching for "synaptics archlinux tapping suspend" didn't bring me here very quickly - the article doesn't mention suspend or resume at all. The solution was to turn on tapping in the GNOME touchpad settings, as described in this article. It might be worth mentioning the problem with suspend/resume if we override settings 'on the fly'.<br />
: --[[User:Dooglus|Dooglus]] 01:24, 30 October 2011 (EDT)</div>Dooglus