https://wiki.archlinux.org/api.php?action=feedcontributions&user=MadCatMk2&feedformat=atomArchWiki - User contributions [en]2024-03-28T13:10:02ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Talk:Fail2ban&diff=219129Talk:Fail2ban2012-08-22T12:58:15Z<p>MadCatMk2: Created page with "=systemd instructions= Should the systemd instructions include running this command? # systemctl --system daemon-reload My system was still using the file in {{ic|/usr/lib/sy..."</p>
<hr />
<div>=systemd instructions=<br />
Should the systemd instructions include running this command?<br />
# systemctl --system daemon-reload<br />
My system was still using the file in {{ic|/usr/lib/systemd/system/}} after I added the modified one in {{ic|/etc/systemd/system/}}.</div>MadCatMk2https://wiki.archlinux.org/index.php?title=Rxvt-unicode&diff=171052Rxvt-unicode2011-11-24T23:02:27Z<p>MadCatMk2: Added native-transparency how-to</p>
<hr />
<div>[[Category:Terminal emulators (English)]]<br />
{{DISPLAYTITLE:rxvt-unicode}}<br />
[[fr:urxvt]]<br />
{{i18n|Rxvt-unicode}}<br />
<br />
[http://software.schmorp.de/pkg/rxvt-unicode.html rxvt-unicode] is a highly customizable [[Wikipedia:Terminal emulator|terminal emulator]] forked from [[Wikipedia:Rxvt|rxvt]]. Commonly known as {{Codeline|urxvt}}, rxvt-unicode can be [[daemon]]ized to run clients within a single [[Wikipedia:Process (computing)|process]] in order to minimize the use of system resources. Developed by Marc Lehmann, some of the more outstanding features of rxvt-unicode include international language support through [[Wikipedia:Unicode|Unicode]], the ability to display multiple font types and support for [[Wikipedia:Perl|Perl]] extensions.<br />
<br />
==Installation==<br />
<br />
{{Package Official|rxvt-unicode}} is available in the [[Official Repositories]] and includes 256 color support:<br />
<br />
# pacman -S rxvt-unicode<br />
<br />
{{Package AUR|rxvt-unicode-patched}} is available in the [[AUR]] and includes a fix for the font width bug and adds support for ignoring window size hints (lock the window size to n_columns * column_width, etc.) without dead space.<br />
<br />
==Configuration==<br />
See the [http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.1.pod rxvt-unicode reference page] for the complete list of available setting and values.<br />
<br />
===Creating ~/.Xresources===<br />
The look, feel, and function of rxvt-unicode is controlled by command-line arguments and/or [[Wikipedia:X resources|X resources]]. X resources can be set using {{Filename|~/.Xresources}} and xrdb ({{Package Official|xorg-xrdb}}), see the [[X_resources|wiki page]] for details.<br />
<br />
If {{Filename|~/.Xresources}} is not affecting rxvt-unicode, add the following to your {{Filename|~/.xinitrc}} file and restart your X session:<br />
xrdb -merge ~/.Xresources<br />
<br />
{{Note|Command-line arguments override and take precedence over the resource settings established in this file.}}<br />
<br />
===True transparency===<br />
<br />
To use true transparency, you need to be using a [[Window_Manager|window manager]] that supports compositing or a separate compositor.<br />
<br />
From the command-line:<br />
<br />
$ urxvt -depth 32 -bg rgba:3f00/3f00/3f00/dddd<br />
<br />
Using the configuration file:<br />
<br />
{{File|name=~/.Xresources|content=<br />
URxvt.depth: 32<br />
URxvt.background: rgba:1111/1111/1111/dddd<br />
}}<br />
<br />
===Native transparency===<br />
<br />
If there is no need for true transparency, or if compositing uses too many resources on your system, you can get transparency working in the following way:<br />
{{File|name=~/.Xresources|content=<br />
URxvt*transparent: true<br />
URxvt*shading: 10 # 0 to 99 darkens, 101 to 200 lightens<br />
}}<br />
{{Note|Avoid using shading if you have a URxvt*tintColor set. Use a different tintColor instead.}}<br />
<br />
===Scrollbar===<br />
The look of the scrollbar can be chosen through this entry in {{Filename|~/.Xresources}}:<br />
! scrollbar style - rxvt (default), plain (most compact), next, or xterm<br />
URxvt*scrollstyle:rxvt<br />
<br />
The scrollbar can also be completely deactivated like so:<br />
URxvt.scrollBar: off<br />
<br />
===Font Declaration Methods===<br />
URxvt.font: 9x15<br />
is the same as:<br />
URxvt.font: -misc-fixed-medium-r-normal--15-140-75-75-c-90-iso8859-1<br />
and:<br />
URxvt.font: 9x15bold<br />
is the same as:<br />
URxvt.font: -misc-fixed-bold-r-normal--15-140-75-75-c-90-iso8859-1<br />
<br />
The complete list of short names for X core fonts can be found in {{Filename|/usr/share/fonts/misc/fonts.alias}} (there's also some fonts.alias files in some of the other subdirectories of {{Filename|/usr/share/fonts/}}, but as they are packaged separately from the actual fonts, they may list fonts you do not actually have installed). It is worth noting that these short aliases select for ISO-8859-1 versions of the fonts rather than ISO-10646-1 (Unicode) versions, and 75 DPI rather than 100 DPI versions, so you're probably better off avoiding them and choosing fonts by their full long names instead.<br />
<br />
{{Note|The above paragraph is only for bitmap fonts. Xft fonts can be specified using the following format:}}<br />
URxvt.font: xft:monaco:size=10<br />
<br />
Or<br />
URxvt.font: xft:monaco:bold:size=10<br />
<br />
===Set icon===<br />
By default URxvt does not feature a taskbar icon. However, this can be easily changed by adding the following line to {{Filename|~/.Xresources}} and pointing to the desired icon:<br />
URxvt*iconFile: /usr/share/icons/Clarity/scalable/apps/terminal.svg<br />
<br />
==Perl extensions==<br />
===Clickable URLs===<br />
You can make URLs in the terminal clickable using the matcher extension. For example, to open links in [[Firefox]] add the following to {{Filename|.Xresources}}:<br />
URxvt.perl-ext-common: default,matcher<br />
URxvt.urlLauncher: /usr/bin/firefox<br />
URxvt.matcher.button: 1 <br />
<br />
===Yankable URLs (No Mouse)===<br />
In addition, you can select and open URLs in your web browser without using the mouse.<br />
<br />
Install the {{Package Official|urxvt-url-select}} package from the [[Official Repositories]] and adjust your {{Filename|.Xresources}} as necessary. An example is shown below:<br />
URxvt.perl-ext: default,url-select<br />
URxvt.keysym.M-u: perl:url-select:select_next<br />
URxvt.urlLauncher: firefox<br />
URxvt.underlineURLs: true<br />
<br />
{{Note|This extension replaces the Clickable URLs extension mentioned above, so {{Codeline|matcher}} can be removed from the {{Codeline|URxvt.perl-ext}} list.}}<br />
<br />
'''Key commands:'''<br />
<br />
{{Keypress|Alt}}+{{Keypress|U}} Enter selection mode. The last URL on your screen will be selected. You can repeat {{Keypress|Alt}}+{{Keypress|U}} to select the next upward URL.<br />
<br />
{{Keypress|K}} Select next upward URL<br />
<br />
{{Keypress|J}} Select next downward URL<br />
<br />
{{Keypress|Return}} Open selected URL in browser and quit selection mode<br />
<br />
{{Keypress|O}} Open selected URL in browser without quitting selection mode<br />
<br />
{{Keypress|Y}} Copy (yank) selected URL and quit selection mode<br />
<br />
{{Keypress|Esc}} Cancel URL selection mode<br />
<br />
===Tabs===<br />
To add tabs to urxvt, add the following to your {{Filename|~/.Xresources}}:<br />
URxvt.perl-ext-common: default,tabbed<br />
<br />
To control tabs use:<br />
<br />
{{Keypress|Shift}}+{{Keypress|↓}} new tab<br />
<br />
{{Keypress|Shift}}+{{Keypress|←}} go to left tab<br />
<br />
{{Keypress|Shift}}+{{Keypress|→}} go to right tab<br />
<br />
{{Keypress|Ctrl}}+{{Keypress|←}} move tab to the left<br />
<br />
{{Keypress|Ctrl}}+{{Keypress|→}} move tab to the right<br />
<br />
{{Keypress|Ctrl}}+{{Keypress|D}}: close tab <br />
<br />
You can change the colors of tabs with the following:<br />
URxvt.tabbed.tabbar-fg: 2<br />
URxvt.tabbed.tabbar-bg: 0<br />
URxvt.tabbed.tab-fg: 3<br />
URxvt.tabbed.tab-bg: 0<br />
<br />
For named tabs, see {{Package AUR|urxvt-tabbedex}}, ({{Keypress|Shift}}+{{Keypress|↑}}: names a tab).<br />
<br />
===Fullscreen===<br />
<br />
You can install the {{Package AUR|urxvt-fullscreen}} in the [[AUR]] and then set a key bind to put urxvt fullscreen.<br />
<br />
{{Filename|~/.Xdefaults}}:<br />
<pre><br />
urxvt*keysym.F11: perl:fullscreen:switch<br />
</pre><br />
<br />
==Colors==<br />
Colors must be specified using color indexes: 0 to 15 correspond with the colors from the rxvt manual "Colors and Graphics" Section.<br />
<pre>COLORS AND GRAPHICS<br />
<br />
If graphics support was enabled at compile-time, rxvt can be queried with ANSI escape sequences and can address individual pixels instead of text<br />
characters. Note the graphics support is still considered beta code.<br />
<br />
In addition to the default foreground and background colours, rxvt can display up to 16 colours (8 ANSI colours plus high-intensity bold/blink<br />
versions of the same). Here is a list of the colours with their rgb.txt names.<br />
<br />
color0 (black) = Black<br />
color1 (red) = Red3<br />
color2 (green) = Green3<br />
color3 (yellow) = Yellow3<br />
color4 (blue) = Blue3<br />
color5 (magenta) = Magenta3<br />
color6 (cyan) = Cyan3<br />
color7 (white) = AntiqueWhite<br />
color8 (bright black) = Grey25<br />
color9 (bright red) = Red<br />
color10 (bright green) = Green<br />
color11 (bright yellow) = Yellow<br />
color12 (bright blue) = Blue<br />
color13 (bright magenta)= Magenta<br />
color14 (bright cyan) = Cyan<br />
color15 (bright white) = White<br />
foreground = Black<br />
background = White<br />
<br />
It is also possible to specify the colour values of foreground, background, cursorColor, cursorColor2, colorBD, colorUL as a number 0-15, as a<br />
convenient shorthand to reference the colour name of color0-color15.<br />
<br />
Note that -rv ("reverseVideo: True") simulates reverse video by always swapping the foreground/background colours. This is in contrast to xterm(1)<br />
where the colours are only swapped if they have not otherwise been specified. For example,<br />
<br />
rxvt -fg Black -bg White -rv<br />
would yield White on Black, while on xterm(1) it would yield Black on White. <br />
</pre><br />
<br />
==Improving Performance==<br />
*Avoid the use of Xft fonts. If Xft fonts must be used, append {{Codeline|<nowiki>:antialias=false</nowiki>}} to the setting value.<sup>[http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.7.pod#Can_I_speed_up_Xft_rendering_somehow]</sup><br />
<br />
*Build rxvt-unicode with disabled support for unnecessary features, {{Codeline|--disable-xft}} and {{Codeline|--disable-unicode3}} in particular.<sup>[http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.7.pod#Rxvt_unicode_uses_gobs_of_memory_how]</sup><br />
<br />
*Limit the number of {{Codeline|saveLines}} (option {{Codeline|-sl}}) in the scrollback buffer to reduce memory usage.<sup>[http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.7.pod#Isn_t_rxvt_unicode_supposed_to_be_sm]</sup><br />
<br />
*Consider running {{Codeline|urxvtd}} as a daemon accepting connections from {{Codeline|urxvtc}} clients.<br />
<br />
==Cut and Paste==<br />
{{Note|With the use of a VDT multiplexer, urxvt (or any VDT emulator) {{Codeline|CLIPBOARD}} integration will not be effective, since it will not be possible to select all of the desired text in a straightforward fashion or at all, in some cases (e.g., when the active multiplexed terminal is changed to another one and then back to the original one, and one selects text beyond what is visible, which causes text from the other terminal to be displayed). Obviously this is due to the fact that the VDT emulator lacks the ability to distinguish between multiplexed terminals. Therefore, it would be effectively redundant for one who always uses a VDT multiplexer capable of maintaining a scrollback buffer and integrating with {{Codeline|CLIPBOARD}} (e.g., [[tmux]] with [[tmux#ICCCM Selection Integration|customized key bindings]]) to integrate {{Codeline|CLIPBOARD}} with urxvt.}}<br />
<br />
For users unfamiliar with [[Xorg]] data transfer methods, the exchange of information to and from rxvt-unicode can become a burden. Suffice to say that rxvt-unicode uses cut buffers which are typically loaded into the current {{Codeline|PRIMARY}} selection by default.<sup>[http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.1.pod#THE_SELECTION_SELECTING_AND_PASTING_]</sup> Users are urged to review [[Wikipedia:X Window selection]] for additional information.<br />
<br />
====Clipboard Management====<br />
* [http://parcellite.sourceforge.net/ Parcellite] is a GTK+ clipboard manager which can also run in the background as a daemon.<br />
<br />
* [http://www.nongnu.org/autocutsel/ autocutsel] provides command line and daemon interfaces to synchronize PRIMARY, {{Codeline|CLIPBOARD}} and cut buffer selections.<br />
<br />
* [http://glipper.sourceforge.net/ Glipper] is a [[GNOME]] panel applet with older versions available for use in environments other than GNOME.<br />
<br />
* [http://goodies.xfce.org/projects/panel-plugins/xfce4-clipman-plugin Clipman] (xfce-clipman-plugin) is a GUI clipboard manager plugin for the [[Xfce]] panel (xfpanel).<br />
<br />
* [http://sourceforge.net/projects/xclip/ xclip] is a lightweight, command-line based interface to the clipboard.<br />
<br />
====Automatic Script Management====<br />
Skottish[http://bbs.archlinux.org/viewtopic.php?pid=506845#p506845] created a Perl script to automatically copy any selection in rxvt-unicode to the X clipboard. Save the following as {{Filename|/usr/lib/urxvt/perl/clipboard}}:<br />
<pre><br />
#! /usr/bin/perl<br />
<br />
sub on_sel_grab {<br />
my $query=quotemeta $_[0]->selection;<br />
$query=~ s/\n/\\n/g;<br />
$query=~ s/\r/\\r/g;<br />
system( "echo -en " . $query . " | xsel -i -b -p" );<br />
}<br />
</pre><br />
<br />
Xyne has also created his own variation of Skottish's script named {{Package AUR|urxvt-clipboard}} which is available in the [[AUR]] that allows the user to paste the selection with {{Keypress|Ctrl}}+{{Keypress|V}} instead of only with a middle mouse click:<br />
<pre><br />
#! /usr/bin/perl<br />
<br />
sub on_sel_grab<br />
{<br />
my $query = $_[0]->selection;<br />
open (my $pipe,'|-','xsel -ib') or die;<br />
print $pipe $query;<br />
close $pipe;<br />
open (my $pipe,'|-','xsel -ip') or die;<br />
print $pipe $query;<br />
close $pipe;<br />
}<br />
</pre><br />
<br />
It also requires {{Package Official|xsel}} and needs to be enabled in the {{Codeline|*perl-ext-common}} or {{Codeline|*perl-ext}} field in {{Filename|~/.Xresources}}. For example:<br />
URxvt.perl-ext-common: default,clipboard<br />
<br />
The [[AUR]] package {{Package AUR|urxvt-perls-git}} is another option one can use. {{Package AUR|urxvt-perls-git}} includes the same functionality as {{Package AUR|urxvt-clipboard}}, in addition to the keyboard-select and url-select Perl extensions.<br />
<br />
==Improved Kuake-like Behavior in Openbox==<br />
This was originally posted on the forum by Xyne<sup>[http://bbs.archlinux.org/viewtopic.php?pid=550380]</sup>, and it relies on the {{Package Official|xdotool}} found in the [[Official Repositories|official repositories]].<br />
<br />
===Scriptlets===<br />
Save this scriptlet from the {{Codeline|urxvtc}} man page somewhere on your system as {{Filename|urxvtc}} (e.g., in {{Filename|~/.config/openbox}}):<br />
<pre><br />
#!/bin/sh<br />
urxvtc "$@"<br />
if [ $? -eq 2 ]; then<br />
urxvtd -q -o -f<br />
urxvtc "$@"<br />
fi<br />
</pre><br />
<br />
and save this one as {{Filename|urxvtq}}:<br />
<pre><br />
#!/bin/bash<br />
<br />
wid=$(xdotool search --classname urxvtq)<br />
if [ -z "$wid" ]; then<br />
/path/to/urxvtc -name urxvtq -geometry 80x28<br />
wid=$(xdotool search --classname urxvtq | head -1)<br />
xdotool windowfocus $wid<br />
xdotool key Control_L+l<br />
else<br />
if [ -z "$(xdotool search --onlyvisible --classname urxvtq 2>/dev/null)" ]; then<br />
xdotool windowmap $wid<br />
xdotool windowfocus $wid<br />
else<br />
xdotool windowunmap $wid<br />
fi<br />
fi<br />
</pre><br />
<br />
A previous version of {{Package Official|xdotool}} introduced a bug which disabled recognition of visible windows and thus led some users to use the following scriptlet in place of the previous one. This is no longer necessary as of {{Package Official|xdotool}} >= 1.20100416.2809, but it has been left here for future reference.<br />
<pre><br />
#!/bin/bash<br />
<br />
wid=$(xprop -name urxvtq | grep 'WM_COMMAND' | awk -F ',' '{print $3}' | awk -F '"' '{print $2}')<br />
if [ -z "$wid" ]; then<br />
/path/to/urxvtc -name urxvtq -geometry 200x28<br />
wid=$(xprop -name urxvtq | grep 'WM_COMMAND' | awk -F ',' '{print $3}' | awk -F '"' '{print $2}')<br />
xdotool windowfocus $wid<br />
xdotool key Control_L+l<br />
else<br />
if [ -z "$(xprop -id $wid | grep 'window state: Normal' 2>/dev/null)" ]; then<br />
xdotool windowmap $wid<br />
xdotool windowfocus $wid<br />
else<br />
xdotool windowunmap $wid<br />
fi<br />
fi<br />
</pre><br />
<br />
Make sure that you change {{Codeline|/path/to/urxvtc}} to the actual path to the {{Filename|urxvtc}} scriptlet that you saved above. We will be using {{Filename|urxvtc}} to launch both regular instances of {{Codeline|urxvt}} and the kuake-like instance.<br />
<br />
===urxvtq with tabbing===<br />
If you want to have tabs in your kuake-like {{Filename|urxvtc}} (here called {{Filename|urxvtq}}) just replace the third line in your {{Filename|urxvtq}}:<br />
wid=$(xdotool search --name urxvtq)<br />
with:<br />
wid=$(xdotool search --name urxvtq | grep -m 1 "" )<br />
<br />
To activate the tab support, you can either replace the fifth line of your {{Filename|urxvtq}}:<br />
/path/to/urxvtc -name urxvtq -geometry 80x28<br />
with:<br />
/path/to/urxvtc -name urxvtq -pe tabbed -geometry 80x28<br />
or replace this line of your {{Filename|~/.Xresources}} file:<br />
URxvt.perl-ext-common: default,matcher<br />
with<br />
URxvt.perl-ext-common: default,matcher,tabbed<br />
<br />
====Tab control====<br />
{{Keypress|Shift}}+{{Keypress|←}}: Switch to the tab left of the current one<br />
<br />
{{Keypress|Shift}}+{{Keypress|→}}: Switch to the tab right of the current one<br />
<br />
{{Keypress|Shift}}+{{Keypress|↓}}: Create a new tab<br />
<br />
You can also use your mouse to switch the tabs by clicking the wished one and create a new tab by clicking on ''[NEW].\\''<br />
<br />
To close a tab just enter {{Codeline|exit}} like you would to normally close a terminal.<br />
<br />
===Openbox configuration===<br />
Now add the following lines to the {{Codeline|<applications>}} section of {{Filename|~/.config/openbox/rc.xml}}:<br />
<pre><br />
<application name="urxvtq"><br />
<decor>no</decor><br />
<position force="yes"><br />
<x>center</x><br />
<y>0</y><br />
</position><br />
<desktop>all</desktop><br />
<layer>above</layer><br />
<skip_pager>yes</skip_pager><br />
<skip_taskbar>yes</skip_taskbar><br />
<maximized>Horizontal</maximized><br />
</application><br />
</pre><br />
<br />
and add these lines to the {{Codeline|<keyboard>}} section:<br />
<pre><br />
<keybind key="W-t"><br />
<action name="Execute"><br />
<command>/path/to/urxvtc</command><br />
</action><br />
</keybind><br />
<keybind key="W-grave"><br />
<action name="Execute"><br />
<execute>/path/to/urxvtq</execute><br />
</action><br />
</keybind><br />
</pre><br />
<br />
Here too you need to change the {{Codeline|/path/to/*}} lines to point to the scripts that you saved above. Save the file and then reconfigure Openbox. You should now be able to launch regular instances of urxvt with the Windows/Super key + {{Keypress|T}}, and toggle the kuake-like console with the Windows/Super key + {{Keypress|'''`'''}} (the grave key also known as the backtick).<br />
<br />
===Further configuration===<br />
The advantage of this configuration over the urxvt kuake Perl script is that Openbox provides more keybinding options such as modifier keys. The kuake script hijacks an entire physical key regardless of any modifier combination. Review the [http://icculus.org/openbox/index.php/Help:Bindings Openbox bindings documentation] for the full range or possibilities.<br />
<br />
The [http://icculus.org/openbox/index.php/Help:Applications Openbox per-app settings] can be used to further configure the behavior of the kuake-like console (e.g. screen position, layer, etc.). You may need to change the "geometry" parameter in the {{Filename|urxvtq}} scriptlet to adjust the height of the console.<br />
<br />
===Related scripts===<br />
*hbekel has posted a generalized version of the {{Filename|urxvtq}} [http://bbs.archlinux.org/viewtopic.php?pid=550380#p550380 here] which can be used to toggle any application using {{Package Official|xdotool}}.<br />
<br />
*http://www.jukie.net/~bart/blog/20070503013555 - A script for opening URLs with your keyboard instead of mouse with urxvt.<br />
<br />
==Troubleshooting==<br />
===Transparency not working after upgrade to V9.09===<br />
The rxvt-unicode devs removed compatibility code for a lot of non standard wallpaper setters with this update. Using a non compatible wallpaper setter will break transparency support. Recommended wallpaper setters:<br />
* [[feh]]<br />
* hsetroot<br />
* esetroot<br />
<br />
To make true transparency work, make sure to comment urxvt*tintColor and urxvt*inheritPixmap.<br />
<br />
===Remote Hosts===<br />
If you are logging into a remote host, you may encounter problems when running text-mode programs under rxvt-unicode. This can be fixed by copying {{Filename|<br />
/usr/share/terminfo/r/rxvt-unicode}} from your local machine to your host at {{Filename|~/.terminfo/r/rxvt-unicode}}.<br />
<br />
===Using rxvt-unicode as gmrun terminal===<br />
Unlike some other terminals, urxvt expects the arguments to {{Codeline|-e}} to be given separately, rather than grouped together with quotes. This causes trouble with gmrun, which assumes the opposite behavior. This can be worked around by putting an "eval" in front of gmrun's "Terminal" variable in {{Filename|.gmrunrc}}:<br />
<br />
Terminal = eval urxvt<br />
TermExec = ${Terminal} -e<br />
<br />
(gmrun uses {{Filename|/bin/sh}} to execute commands, so the "eval" is understood here.) The "eval" has the side-effect of "breaking up" the argument to {{Codeline|-e}} in the same way that {{Codeline|$@}} does in [[Bash]], making the command intelligible to urxvt.<br />
<br />
=== My numerical keypad acts weird and generates differing output? (e.g. in vim) ===<br />
<br />
Some Debian GNU/Linux users seem to have this problem, although no specific details were reported so far. It is possible that this is caused by the wrong TERM setting, although the details of whether and how this can happen are unknown, as TERM=rxvt should offer a compatible keymap. See the answer to the previous question, and please report if that helped.<br />
<br />
However, using the ''xmodmap'' program ({{Package Official|xorg-xmodmap}}), you can re-map your numpad keys back.<br />
<br />
1. Check the keycode that your numerical keypad (numpad) generates using ''xev'' program.<br />
:* Start ''xev'' program<br />
:* Press your numpad keys and looks for ''... keycode xxx ...'' in ''xev'' output. For example, numpad 1 in my keyboard is also "End" key, that have a ''''keycode 87''''.<br />
<br />
2. Create or modify your xmodmap file, usually {{Filename|~/.Xmodmap}}, with the content representing your keycode.<br />
<br />
:Example of xmodmap file with numpad keycode,<br />
<pre><br />
keycode 63 = KP_Multiply<br />
keycode 79 = Home KP_7<br />
keycode 80 = Up KP_8<br />
keycode 81 = Prior KP_9<br />
keycode 82 = KP_Subtract<br />
keycode 83 = Left KP_4<br />
keycode 84 = KP_5<br />
keycode 85 = Right KP_6<br />
keycode 86 = KP_Add<br />
keycode 87 = End KP_1<br />
keycode 88 = Down KP_2<br />
keycode 89 = Next KP_3<br />
keycode 90 = Insert KP_0<br />
keycode 91 = Delete KP_Decimal<br />
keycode 112 = Prior<br />
keycode 117 = Next<br />
</pre><br />
<br />
3. Load your xmodmap file at X session start-up.<br />
<br />
:For example, in {{Filename|~/.xinitrc}} file add,<br />
...<br />
xmodmap ~/.Xmodmap<br />
...<br />
<br />
==External resources==<br />
*[http://software.schmorp.de/pkg/rxvt-unicode.html rxvt-unicode] - Official site<br />
*[http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.7.pod rxvt-unicode FAQ] - Official FAQ<br />
*[http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.1.pod rxvt-unicode Reference] - Official manual page<br />
*[http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/src/urxvt.pm urxvtperl] - Official Perl extension reference<br />
*{{Codeline|man urxvt}}</div>MadCatMk2https://wiki.archlinux.org/index.php?title=Mutt&diff=169184Mutt2011-11-08T13:55:40Z<p>MadCatMk2: Note on colors.</p>
<hr />
<div>{{i18n|Mutt}}<br />
[[Category:Email Client (English)]]<br />
<br />
'''Mutt''' is a text-based mail client renowned for its powerful features. Though over a decade old, Mutt remains the mail client of choice for a great number of power-users. Unfortunately, a default Mutt install is plagued by complex keybindings along with a daunting amount of documentation. This guide will help the average user get Mutt up and running, and begin customizing it to their particular needs.<br />
<br />
==Overview==<br />
Mutt focuses primarily on being a Mail User Agent (MUA), and was originally written to view mail. Later implementations added for retrieval, sending, and filtering mail are simplistic compared to other mail applications and, as such, users may wish to use external applications to extend Mutt's capabilities. <br />
<br />
Nevertheless, the Arch Linux {{Package Official|mutt}} package is compiled with IMAP, POP3 and SMTP support, removing the necessity for external applications.<br />
<br />
This article covers using both native IMAP sending and retrieval, and a setup depending on [[OfflineIMAP]] or [[getmail]] (POP3) to retrieve mail, [[procmail]] to filter it in the case of POP3, and [[msmtp]] to send it.<br />
<br />
==Installing==<br />
Install Mutt:<br />
# pacman -S mutt<br />
<br />
Optionally install external helper applications for an IMAP setup:<br />
# pacman -S offlineimap msmtp<br />
<br />
Or if using POP3:<br />
# pacman -S getmail procmail<br />
<br />
===Notes===<br />
*If you just need the authentication methods LOGIN and PLAIN, these are satisfied with the dependency {{Package Official|libsasl}}.<br />
*If you want to (or have to) use CRAM-MD5, GSSAPI or DIGEST-MD5, install also the package {{Package Official|cyrus-sasl-plugins}}. <br />
*if you are using Gmail as your smtp server, you may need to install the package {{Package Official|cyrus-sasl}}.<br />
<br />
==Configuring==<br />
This section covers IMAP, [[#POP3]], [[#Maildir]] and [[#SMTP]] configuration.<br />
<br />
Note that Mutt will recognize two locations for its configuration file; {{filename|~/.muttrc}} and {{filename|~/.mutt/muttrc}}. Either location will work.<br />
<br />
===IMAP===<br />
''Native and external setups''<br />
<br />
====Using native IMAP support====<br />
The pacman version of Mutt is compiled with IMAP support. At the very least you need to have 4 lines in your muttrc file to be able to access your mail.<br />
<br />
=====imap_user=====<br />
set imap_user=USERNAME<br />
<br />
Continuing with the previous example, remember that Gmail requires your full email address (this is not standard):<br />
set imap_user=your.username@gmail.com<br />
<br />
=====imap_pass=====<br />
If unset, the password will be prompted for.<br />
set imap_pass=SECRET<br />
<br />
=====folder=====<br />
Instead of a local directory which contains all your mail (and directories), use your server (and the highest folder in the hierarchy, if needed).<br />
set folder=imap[s]://imap.server.domain[:port]/[folder/]<br />
<br />
You do not have to use a folder, but it might be convenient if you have all your other folders inside your INBOX, for example. Whatever you set here as your folder can be accessed later in Mutt with just an equal sign (=). Example:<br />
set folder=imaps://imap.gmail.com/<br />
<br />
=====spoolfile=====<br />
You can now use '=' or '+' as a substitution for the full {{codeline|folder}} path that was configured above. For example:<br />
set spoolfile=+INBOX<br />
<br />
=====mailboxes=====<br />
Any imap folders that should be checked regularly for new mail should be listed here:<br />
mailboxes =INBOX =family<br />
mailboxes imaps://imap.gmail.com/INBOX imaps://imap.gmail.com/family<br />
<br />
Alternatively, check for all subscribed IMAP folders (as if all were added with a {{codeline|mailboxes}} line):<br />
set imap_check_subscribed<br />
<br />
These two versions are equivalent, but the first is much more convenient. Also, newer Mutt versions are configured by default to include a macro bound to the 'y' key which will allow you to change to any of the folders listed under mailboxes.<br />
<br />
=====Summary=====<br />
Using these options, you will be able to start mutt, enter your IMAP password, and start reading your mail. Here is a muttrc snippet (for Gmail) with some other lines you might consider adding for better IMAP support.<br />
<pre><br />
set folder = imaps://imap.gmail.com/<br />
set imap_user = your.username@gmail.com<br />
set imap_pass = your-imap-password<br />
set spoolfile = +INBOX<br />
mailboxes = +INBOX<br />
<br />
# store message headers locally to speed things up<br />
set header_cache = ~/.mutt/hcache<br />
<br />
# specify where to save and/or look for postponed messages<br />
set postponed = +[Gmail]/Drafts<br />
<br />
# allow mutt to open new imap connection automatically<br />
unset imap_passive<br />
<br />
# keep imap connection alive by polling intermittently (time in seconds)<br />
set imap_keepalive = 300<br />
<br />
# how often to check for new mail (time in seconds)<br />
set mail_check = 120<br />
</pre><br />
<br />
====External IMAP support====<br />
While IMAP-functionality is built into Mutt, it does not download mail for offline-use. The [[OfflineIMAP]] article describes how to download your emails to a local folder which can then be processed by Mutt.<br />
<br />
Consider using applications such as [[spamassassin]] or [[imapfilter]] to sort mail.<br />
<br />
===POP3===<br />
''Retrieving and sorting mail with external applications''<br />
<br />
====Retrieving mail====<br />
Create the directory <code>~/.getmail/</code>. Open the file <code>~/.getmail/getmailrc</code> in your favorite text editor.<br />
<br />
Here is an example <code>getmailrc</code> used with a gmail account.<br />
<pre><br />
[retriever]<br />
type = SimplePOP3SSLRetriever<br />
server = pop.gmail.com<br />
username = username@gmail.com<br />
port = 995<br />
password = password<br />
<br />
[destination]<br />
type = Maildir<br />
path = ~/mail/<br />
</pre><br />
<br />
You can tweak this to your POP3 service's specification.<br />
<br />
As you can see <code>~/.getmail/getmailrc</code> contains sensitive information (namely, email account passwords in plain text). You will want to change access permissions to the directory so only the owner can see it:<br />
<br />
$ chmod 700 ~/.getmail<br />
<br />
For this guide we will be storing our mail in the <code>maildir</code> format. The two main mailbox formats are <code>mbox</code> and <code>maildir</code>. The main difference between the two is that <code>mbox</code> is one file, with all of your mails and their headers stored in it, whereas a <code>maildir</code> is a directory tree. Each mail is its own file, which will often speed things up.<br />
<br />
A <code>maildir</code> is just a folder with the folders <code>cur</code>, <code>new</code> and <code>tmp</code> in it.<br />
mkdir -p ~/mail/{cur,new,tmp}<br />
<br />
Now, run getmail. If it works fine, you can create a cronjob for getmail to run every n hours/minutes. Type <code>crontab -e</code> to edit cronjobs, and enter the following:<br />
*/30 * * * * /usr/bin/getmail<br />
That will run <code>getmail</code> every 30 minutes.<br />
<br />
=====More than one Email account with getmail=====<br />
By default, when you run <code>getmail</code> the program searches for the file getmailrc created as seen above. If you have more than one mail account you would like to get mail from, then you can create such a file for each email address, and then tell getmail to run using both of them. Obviously if you have two accounts and two files you cannot have both of them called getmailrc. What you do is give them two different names, using myself as an example: I call one personal, and one university. These two files contain content relevant to my personal mail, and my university work mail respectively. Then to get getmail to work on these two files, instead of searching for getmailrc(default), I use the --rcfile switch like so: <code>getmail --rcfile university --rcfile personal</code> This can work with more files if you have more email accounts, just make sure each file is in the .getmail directory and make sure to alter the cronjob to run the command with the --rcfile switches. E.g.<br />
'''*/30 * * * * /usr/bin/getmail --rcfile university --rcfile personal'''<br />
<br />
Obviously you can call your files whatever you want, providing you include them in the cronjob or shell command, and they are in the .getmail/ directory, getmail will fetch mail from those two accounts.<br />
<br />
====Sorting mail====<br />
[http://www.procmail.org/ Procmail] is an extremely powerful sorting tool. For the purposes of this wiki, we will do some primitive sorting to get started.<br />
<br />
You must edit your getmailrc to pass retrieved mail to procmail:<br />
<pre><br />
[destination]<br />
type = MDA_external<br />
path = /usr/bin/procmail<br />
</pre><br />
<br />
Now, open up <code>.procmailrc</code> in your favorite editor. The following will sort all mail from the happy-kangaroos mailing list, and all mail from your lovey-dovey friend in their own maildirs.<br />
<pre><br />
MAILDIR=$HOME/mail<br />
DEFAULT=$MAILDIR/inbox/<br />
LOGFILE=$MAILDIR/log<br />
<br />
:0:<br />
* ^To: happy-kangaroos@nicehost.com<br />
happy-kangaroos/<br />
<br />
:0:<br />
* ^From: loveydovey@iheartyou.net<br />
lovey-dovey/<br />
</pre><br />
After you have saved your <code>.procmailrc</code>, run getmail and see if procmail succeeds in sorting your mail into the appropriate directories.<br />
<br />
'''Note:''' One easy to make mistake with .procmailrc is the permission. procmail require it to have permission 644 and will not give meaningless error message if you do not.<br />
<br />
===Maildir===<br />
Maildir is a generic and standardized format. Almost every MUA is able to handle Maildirs and Mutt's support is excellent. There are just a few simple things that you need to do to get Mutt to use them. Open your muttrc with and add the following lines:<br />
<pre><br />
set mbox_type=Maildir<br />
set folder=$HOME/mail<br />
set spoolfile=+/<br />
set header_cache=~/.hcache<br />
</pre><br />
<br />
This is a minimal Configuration that enables you to access your Maildir and checks for new local Mails in INBOX. This configuration also caches the headers of the eMails to speed up directory-listings. It might not be enabled in your build (but it sure is in the Arch-Package) Note that this does not affect OfflineIMAP in any way. It always syncs the all directories on a Server. <code>spoolfile</code> tells Mutt which local directories to poll for new Mail. You might want to add more Spoolfiles (for example the Directories of Mailing-Lists) and maybe other things. But this is subject to the Mutt manual and beyond the scope of this document.<br />
<br />
===SMTP===<br />
Whether you use POP or IMAP to receive mail you will probably still send mail using SMTP.<br />
<br />
====Using native SMTP support====<br />
The pacman version of Mutt is also compiled with SMTP support. Just check the online manual [http://manual.cream.org/index.cgi/muttrc.5 muttrc], or <code>man muttrc</code> for more information.<br />
<br />
For example:<br />
<pre><br />
set my_pass='mysecretpass'<br />
set my_user=myname@gmail.com<br />
<br />
set smtp_url=smtps://$my_user:$my_pass@smtp.gmail.com<br />
set ssl_force_tls = yes<br />
</pre><br />
<br />
====External SMTP support====<br />
An external SMTP agenta such as [[msmtp]] or [[SSMTP]] can also be used. This section exclusively covers configuring Mutt for msmtp.<br />
<br />
Edit Mutt's configuration file or create it if unpresent:<br />
{{file|name=muttrc|content=<br />
set realname='Disgruntled Kangaroo'<br />
<br />
set sendmail="/usr/bin/msmtp"<br />
<br />
set edit_headers=yes<br />
set folder=~/mail<br />
set mbox=+mbox<br />
set spoolfile=+inbox<br />
set record=+sent<br />
set postponed=+drafts<br />
set mbox_type=Maildir<br />
<br />
mailboxes +inbox +lovey-dovey +happy-kangaroos<br />
}}<br />
<br />
Now, startup {{codeline|mutt}}:<br />
$ mutt<br />
<br />
You should see all the mail in {{filename|~/mail/inbox}}. Press {{keypress|m}} to compose mail; it will use the editor defined by your {{codeline|EDITOR}} environment variable. If this variable is not set, type:<br />
$ export EDITOR=editorbin<br />
<br />
For testing purposes, address the letter to yourself. After you have written the letter, save and exit the editor. You will return to Mutt, which will now show information about your e-mail. Press {{keypress|y}} to send it.<br />
<br />
==Customizing==<br />
Guides to get you started with using & customizing Mutt : <br />
* [http://mutt.blackfish.org.uk/ My first mutt] (maintained by Bruno Postle) <br />
* [http://www.therandymon.com/woodnotes/mutt/using-mutt.html The Woodnotes Guide to the Mutt Email Client] (maintained by Randall Wood)<br />
<br />
If you have any Mutt specific questions, feel free to ask in [[ArchChannel|the irc channel]].<br />
<br />
===Printing===<br />
You can install {{package AUR|muttprint}} from the [[AUR]] for a fancier printing quality.<br />
In your muttrc file, insert:<br />
set print_command="/usr/bin/muttprint %s -p {PrinterName}"<br />
<br />
===Signature block===<br />
Create a .signature in your home directory. Your signature will be appended at the end of your email.<br />
<br />
====Random signature====<br />
You can use fortune to add a random signature to mutt.<br />
<pre>$ pacman -S fortune-mod</pre><br />
<br />
Create a fortune file and then add the following line to your .muttrc:<br />
<pre>set signature="fortune pathtofortunefile"</pre><br />
<br />
===Viewing URLs & opening Firefox===<br />
Your should start by creating a .mutt directory in $HOME if not done yet. There, create a file named macros. Insert the following:<br />
macro pager \cb <pipe-entry>'urlview'<enter> 'Follow links with urlview'<br />
<br />
Then install urlview with:<br />
pacman -S urlview<br />
<br />
Create a .urlview in $HOME and insert the following:<br />
REGEXP (((http|https|ftp|gopher)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]<br />
COMMAND firefox %s <br />
<br />
When you read an email on the pager, hitting ctrl+b will list all the urls from the email. Navigate up or down with arrow keys and hit enter on the desired url. Firefox will start and go to the selected site.<br />
<br />
*Note - urlview has been moved to unsupported and is available in AUR here[http://aur.archlinux.org/packages.php?ID=16703]<br />
<br />
*Note - If you have some problems with urlview due to Mutt's url encoding you can try [http://www.memoryhole.net/~kyle/extract_url/ extract_url.pl]<br />
<br />
*Note - If you would like to see a short contextual preview of the content around each URL, try [http://aur.archlinux.org/packages.php?ID=44853 urlscan]. The macro in your muttrc is the same as for urlview (except for the 'urlscan' command). There is no additional configuration required other than ensuring $BROWSER is set.<br />
<br />
===Mutt and Vim===<br />
*To limit the width of text to 72 characters, edit your .[[vim]]rc file and add:<br />
au BufRead /tmp/mutt-* set tw=72<br />
<br />
*Another choice is to use Vim's mail filetype plugin to enable other mail-centric options besides 72 character width. Edit {{filename|~/.vim/filetype.vim}}, creating it if unpresent, and add:<br />
<pre> <br />
augroup filetypedetect<br />
" Mail<br />
autocmd BufRead,BufNewFile *mutt-* setfiletype mail<br />
augroup END<br />
</pre><br />
<br />
*To set a different tmp directory, e.g. ~/.tmp, add a line to your muttrc as follows:<br />
set tmpdir="~/.tmp"<br />
<br />
*To reformat a modified text see the Vim context help<br />
:h 10.7<br />
<br />
===Viewing HTML within a Vim/Mutt setup===<br />
It is possible to pass the html body to an external HTML program and then dump it, keeping email viewing uniform and unobtrusive. Two programs are described here: lynx and w3m.<br />
<br />
Install lynx or w3m:<br />
pacman -S lynx<br />
or<br />
pacman -S w3m<br />
<br />
If ''~/.mutt/mailcap'' does not exist you will need to create it and save the following to it.<br />
text/html; lynx -dump %s; nametemplate=%s.html; copiousoutput<br />
or, in case of w3m,<br />
text/html; w3m -I %{charset} -T text/html; copiousoutput;<br />
<br />
Edit muttrc and add the following,<br />
set mailcap_path = ~/.mutt/mailcap<br />
<br />
To automatically open HTML messages in lynx, add this additional line to the muttrc:<br />
auto_view text/html<br />
<br />
The beauty of this is, instead of seeing an html body as source or being opened by a separate program, in this case lynx, it gets parsed to Vim as html, any url links within the email can be displayed with Ctrl+b.<br />
<br />
===Mutt and GNU nano===<br />
[[nano]] is another nice console editor to use with Mutt. <br />
<br />
To limit the width of text to 72 characters, edit your .nanorc file and add:<br />
set fill 72<br />
<br />
Also, in muttrc file, you can specify the line to start editing so that you will skip the mail header:<br />
set editor="nano +7"<br />
<br />
===Colors===<br />
Append sample color definitions to your .muttrc file:<br />
$ cat /usr/share/doc/mutt/samples/colors.linux >> ~/.muttrc<br />
Then adjust to your liking.<br />
The actual color each of these settings will produce depends on the colors set in your ~/.Xresources file.<br />
<br />
==Tips & Tricks==<br />
<br />
===Use Mutt to send mail from command line===<br />
Man pages will show all available commands and how to use them, but here are a couple of examples. You could use Mutt to send alerts, logs or some other system information, triggered by login through .bash_profile, or as a regular cron job.<br />
<br />
Send a message:<br />
mutt -s "Subject" somejoeorjane@someserver.com < /var/log/somelog<br />
<br />
Send a message with attachment:<br />
mutt -s "Subject" somejoeorjane@someserver.com -a somefile < /tmp/sometext.txt<br />
<br />
===How to display another email while composing===<br />
A common complaint with Mutt is that when composing a new mail (or reply), you cannot open another mail (i.e. for checking with another correspondent) without closing the current mail (postponing). The following describes a solution:<br />
<br />
First, fire up Mutt as usual. Then, launch another terminal window. Now start a new Mutt with <br />
mutt -R<br />
This starts Mutt in read-only mode, and you can browse other emails at your convenience. It is strongly recommended to always launch a second Mutt in read-only mode, as conflicts will easily arise otherwise.<br />
<br />
Now, this solution calls for a bit of typing, so we would like to automate this. The following works with [[Awesome]], in other WM's or DE's similar solutions are probably available: just google how to add a key binding, and make the desired key execute <br />
$TERM -e mutt -R <br />
where $TERM is your terminal.<br />
<br />
As for Awesome: edit your rc.lua, and add the following on one of the first lines, after terminal = "yourTerminal" etc.<br />
mailview = terminal .. " -e mutt -R"<br />
This automatically uses your preferred terminal, ".." is concatenation in Lua. Note the space before -e.<br />
<br />
Then add the following inside --{{{ Key bindings<br />
awful.key({ modkey, }, "m", function() awful.util.spawn(mailview) end),<br />
<br />
Omit the final comma if this is the last line. You can, of course use another key than "m". Now, save&quit, and check your syntax with <br />
awesome -k<br />
If this is good, restart awesome and give it a try!<br />
<br />
Now, a usage example: Launch mutt as usual. Start a new mail, and then press "Mod4"+"m". This opens your mailbox in a new terminal, and you can browse around and read other emails. Now, a neat bonus: exit this read-only-Mutt with "q", and the terminal window it created disappears!<br />
<br />
== Additional resources ==<br />
* [http://www.mutt.org/ The official Mutt website]<br />
* [http://wiki.mutt.org/ The Mutt wiki]<br />
* [http://pbrisbin.com/posts/two_accounts_in_mutt/ Brisbin's great guide on how to setup different IMAP accounts with mutt + offlineimap + msmtp]<br />
* [http://pyropus.ca/software/getmail/configuration.html#running Documentation on Configuring Getmail with rcfiles]</div>MadCatMk2https://wiki.archlinux.org/index.php?title=Firefox/Tweaks&diff=166008Firefox/Tweaks2011-10-15T14:48:05Z<p>MadCatMk2: </p>
<hr />
<div>{{i18n|Firefox Tips and Tweaks}}<br />
[[Category:Web Browser (English)]]<br />
<br />
{{Article summary start}}<br />
{{Article summary text|Firefox configuration and modifications}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Browser Plugins}}: Acquiring and installing plugins such as [[Flash]]<br />
{{Article summary wiki|Firefox}}: Installing and troubleshooting the Firefox browser and plugins<br />
{{Article summary wiki|Speed-up Firefox using tmpfs}}: Caching the profile in RAM<br />
{{Article summary end}}<br />
<br />
== Performance ==<br />
<br />
Improving Firefox's performance is divided into parameters that can be inputted while running Firefox or otherwise modifying its configuration as intended by the developers, and advanced procedures that involve foreign programs or scripts.<br />
<br />
=== Tunables ===<br />
''Improvements stemming from native Firefox settings.''<br />
<br />
==== Network settings ====<br />
''References: [http://forums.mozillazine.org/viewtopic.php?t=53650 Mozillazine]''<br />
<br />
*All settings can be adjusted by browsing to ''about:config''.<br />
*Values for connections (HTTP, proxy, etc.) should be tweaked based on connection.<br />
<br />
These are the values for a 1.5Mb cable connection:<br />
<table border="1" cellpadding="2" cellspacing="0"><br />
<tr><br />
<th>Key</th><br />
<th>Value</th><br />
<th>Description</th><br />
</tr><br />
<tr><br />
<td>network.http.pipelining</td><br />
<td>true</td><br />
<td>enable pipelining for normal connections</td><br />
</tr><br />
<tr><br />
<td>network.http.proxy.pipelining</td><br />
<td>true</td><br />
<td>enable pipelining for proxy connections</td><br />
</tr><br />
<tr><br />
<td>network.http.pipelining.firstrequests</td><br />
<td>true</td><br />
<td>enable pipelining of first requests</td><br />
</tr> <br />
<tr><br />
<td>network.http.pipelining.maxrequests</td><br />
<td>8</td><br />
<td>maximum HTTP requests per pipeline</td><br />
</tr> <br />
<tr><br />
<td>content.notify.backoffcount</td><br />
<td>5</td><br />
<td>number of initial reflows during rendering</td><br />
</tr><br />
<tr><br />
<td>content.interrupt.parsing</td><br />
<td>true</td><br />
<td>enable interruption of parsing to return to the application's event loop</td><br />
</tr> <br />
<tr><br />
<td>content.max.tokenizing.time</td><br />
<td>2250000</td><br />
<td>time after which parsing is interrupted</td><br />
</tr> <br />
<tr><br />
<td>content.notify.interval</td><br />
<td>750000</td><br />
<td>time steps for the initial reflows (content.notify.backoffcount)</td><br />
</tr> <br />
<tr><br />
<td>content.notify.ontimer</td><br />
<td>true</td><br />
<td>enable timer based reflows</td><br />
</tr> <br />
<tr><br />
<td>content.switch.threshold</td><br />
<td>750000</td><br />
<td>keep same as content.notify.interval</td><br />
</tr> <br />
<tr><br />
<td>nglayout.initialpaint.delay</td><br />
<td>0</td><br />
<td>time before inital page reflow</td><br />
</tr><br />
<tr><br />
<td>network.http.max-connections</td><br />
<td>48</td><br />
<td>number of total HTTP connections</td><br />
</tr> <br />
<tr><br />
<td>network.http.max-connections-per-server</td><br />
<td>24</td><br />
<td>maximum number of any type of connections per server</td><br />
</tr> <br />
<tr><br />
<td>network.http.max-persistent-connections-per-proxy</td><br />
<td>16</td><br />
<td>maximum number of keep-alive type connections per proxy</td><br />
</tr><br />
<tr><br />
<td>network.http.max-persistent-connections-per-server</td><br />
<td>8</td><br />
<td>maximum number of keep-alive type connections per server</td><br />
</tr> <br />
<tr><br />
<td>browser.cache.memory.capacity</td><br />
<td>65536</td><br />
<td>size of memory to use as cache - set as big as you can for normal operation</td><br />
</tr><br />
<tr><br />
<td>network.dns.disableIPv6</td><br />
<td>true</td><br />
<td>disables IPv6 support - may not work for all networks, some report speed increase</td><br />
</tr> <br />
</table><br />
<br />
==== Turning off anti-phishing ====<br />
{{note|Deleting files from your profile folder is potentially dangerous, so it's recommended that you make a backup of the folder first.}}<br />
<br />
The anti-phishing features of Firefox may cause Firefox to become slow to start or exit, and might also affect the browsing speed since Firefox apparently contacts google for every http request. The problem is that Firefox maintains a sqlite database that might grow quite big, and reading and writing to this database begins to take some time when it grows bigger. If you feel that you do not need Firefox to tell you which sites may be suspect you can disable this feature:<br />
<br />
* Turn off the following options under the security tab in preferences: "Block reported attack sites" and "Block reported web forgeries".<br />
<br />
* Delete all files beginning with urlclassifier in your profile folder (~/.mozilla/firefox/********.default where ******** is some combination of letters and numbers. Default might be something else if you have created a non-default profile). Some of these files might be recreated by Firefox, but they won't grow any larger than their initial size:<br />
$ rm -i ~/.mozilla/firefox/*.default/urlclassifier*<br />
<br />
==== Improve rendering by disabling pango ====<br />
{{note|Exporting the setting may also fix font issues for the entire Mozilla suite.}}<br />
<br />
Add:<br />
export MOZ_DISABLE_PANGO=1<br />
to {{filename|~/.profile}} and relogin for the change to take place.<br />
<br />
=== Foreign modifications ===<br />
''Advanced Firefox alterations''<br />
<br />
==== Reduce load time by compressing the Firefox binary with upx ====<br />
Install the {{package Official|upx}} package:<br />
# pacman -S upx<br />
<br />
Make a backup of the firefox binary:<br />
# cp /usr/lib/firefox-5.0/firefox-bin /usr/lib/firefox-5.0/firefox-bin_backup<br />
<br />
Invoke {{filename|upx}}, applying a compression level of 9:<br />
# upx -9 /usr/lib/firefox-5.0/firefox-bin<br />
<br />
==== Defragment the profile's SQLite databases ====<br />
{{Warning| This procedure may damage the databases in such a way that sessions are not saved properly.}}<br />
<br />
===== Sample size differences comparison =====<br />
{| border="1"<br />
| SQLite DB || Size Before || Size After || % change<br />
|- <br />
|urlclassifier3.sqlite|| 37 M || 30 M || 19 %<br />
|-<br />
|places.sqlite || 16 M || 2.4 M || 85 %<br />
|-<br />
|}<br />
<br />
===== Profile defragmentation procedure =====<br />
Firefox 3.0, bookmarks, history, passwords are kept in SQLite databases. SQLite databases become fragmented over time and empty spaces appear all around. But, since there are no managing processes checking and optimizing the database, these factors eventually result in a performance hit. A good way to improve startup and some other bookmarks and history related tasks is to defragment and trim unused space from these databases.<br />
<br />
Run {{filename|sqlite3}} {{Codeline|vacuum}} and {{Codeline|reindex}} commands in the profile directory.<br />
<br />
Example:<br />
$ cd ~/.mozilla/firefox/*.default<br />
$ for i in urlclassifier3 places; do \<br />
sqlite3 $i.sqlite vacuum; \<br />
sqlite3 $i.sqlite reindex; \<br />
done<br />
<br />
To automate the process for all the databases in all the profiles directory, use the following:<br />
$ find ~/.mozilla -name \*.sqlite \<br />
-exec sqlite3 {} vacuum \; \<br />
-exec sqlite3 {} reindex \;<br />
<br />
==== Cache the entire profile into RAM via tmpfs ====<br />
If the system has memory to spare, {{Codeline|tmpfs}} can be used to [[Speed-up Firefox using tmpfs|cache the entire profile directory]], which might result in increased Firefox responsiveness.<br />
<br />
== Appearance ==<br />
=== Fonts ===<br />
''See also: [[Font Configuration]]''<br />
<br />
==== DPI ====<br />
Modifying the following value can help improve the way fonts looks in Firefox if the system's DPI is below 96. Firefox, by default, uses 96 and only uses the system's DPI if it is a higher value. To force the system's DPI regardless of its value, type about:config into the address bar and search for '''layout.css.dpi'''. Change it to '''0'''.<br />
<br />
==== Default font settings from MS Windows ====<br />
Below are the default font preferences when Firefox is installed in Microsoft Windows. Many web sites use the Microsoft fonts.<br />
<pre><br />
Proportional: Serif Size (pixels): 16<br />
Serif: Times New Roman<br />
Sans-serif: Arial<br />
Monospace: Courier New Size (pixels): 13<br />
</pre><br />
<br />
=== General UI CSS settings ===<br />
Firefox's UI can be modified by editing the files in {{filename|~/.mozilla/firefox/''RANDOMHASH''.''PROFILENAME''/chrome/}}; namely, {{filename|userChrome.css}} and {{filename|userContent.css}}.<br />
<br />
All of the following modifications take place in {{filename|userChrome.css}}.<br />
<br />
==== Change UI font ====<br />
The setting effectively overrides the global GTK2+ font preferences, and does not affect the body; only the UI itself:<br />
<pre><br />
* {<br />
font-family: "FONT_NAME";<br />
}<br />
</pre><br />
<br />
==== Hide button icons ====<br />
Enables text-only buttons:<br />
<pre><br />
.button-box .button-icon {<br />
display: none;<br />
}<br />
</pre><br />
<br />
==== Hiding various tab buttons ====<br />
These settings hide the arrows that appear to the horizontal edges of the tab bar, the button that toggles the "all tabs" drop-down list, and the plus sign button that creates a new tab.<br />
<pre><br />
/* Tab bar */<br />
<br />
.tabbrowser-strip *[class^="scrollbutton"] {<br />
/* Hide tab scroll buttons */<br />
display: none;<br />
}<br />
<br />
.tabbrowser-strip *[class^="tabs-alltabs"] {<br />
/* Hide tab drop-down list */<br />
display: none;<br />
}<br />
<br />
.tabbrowser-strip *[class^="tabs-newtab-button"] {<br />
/* Hide new-tab button */<br />
display: none;<br />
}<br />
</pre><br />
<br />
==== Horizontal tabs ====<br />
To place the tab bar horizontally stacked along the sides of the browser window:<br />
<pre><br />
/* Display the tabbar on the left */<br />
#content > tabbox {<br />
-moz-box-orient: horizontal;<br />
}<br />
<br />
.tabbrowser-strip {<br />
-moz-box-orient: vertical;<br />
/*<br />
* You can set this to -moz-scrollbars-vertical instead,<br />
* but then the scrollbar will *always* be visible. this way<br />
* there is never a scrollbar, so it behaves like the tab bar<br />
* normally does<br />
*/<br />
overflow: -moz-scrollbars-none;<br />
}<br />
<br />
.tabbrowser-tabs {<br />
-moz-box-orient: horizontal;<br />
min-width: 20ex; /* You may want to increase this value */<br />
-mox-box-pack: start;<br />
-moz-box-align: start;<br />
}<br />
<br />
.tabbrowser-tabs > hbox {<br />
-moz-box-orient: vertical;<br />
-moz-box-align: stretch;<br />
-moz-box-pack: start;<br />
}<br />
<br />
.tabbrowser-tabs > hbox > tab {<br />
-moz-box-align: start;<br />
-moz-box-orient: horizontal;<br />
}<br />
</pre><br />
<br />
=== Web content CSS settings ===<br />
In {{filename|userContent.css}} you can add custom css rules for web content. Examples: <br />
<pre><br />
/* import other css file */<br />
@import url("./imports/some_file.css");<br />
<br />
/* block ads */<br />
*[class*="advertisement"],<br />
*[class*="partners"],<br />
*[class*="sidebaner"],<br />
*[class*="banner"],<br />
*[class*="adview"],<br />
*[class*="promo"],<br />
*[class*="ad_"],<br />
*[name*="werbung"],<br />
*[name*="banner"],<br />
*[id*="banner"],<br />
*[id*="ad_"],<br />
iframe[src*="euroclick.com"],<br />
iframe[src*="/partners/"],<br />
iframe[src*="/adview"],<br />
img[src*="euroclick.com"],<br />
img[src*="/partners/"],<br />
img[src*="/adview"],<br />
embed[src*="Banner"],<br />
embed[src*="banner"],<br />
a:link[href*="euroclick.com"], <br />
a:link[href*="/partners/"],<br />
a:link[href*="/adview"]<br />
{ <br />
display: none !important<br />
}<br />
<br />
/* domain specific rule */<br />
@-moz-document domain(example.com){ <br />
div#header{background-image:none !important} <br />
}<br />
<br />
/* add '[pdf]' next to to pdf links */<br />
a[href$=".pdf"]:after {<br />
font-size: smaller;<br />
content: " [pdf]";<br />
}<br />
</pre><br />
<br />
== Miscellaneous ==<br />
<br />
=== Viewing PDF/PS inside Firefox===<br />
<br />
if you do not want for some reason install Adobe Acrobat Reader for exploiting the feature to see PDF inside Firefox, you can use other software, like Evince (default viewer in GNOME)<br />
<br />
for example if you want to use evince for opening a pdf/ps or any other document supported by evince, inside firefox, and not to open a new window, this is possible and you just follow this simple instructions:<br />
<br />
* install mozplugger (in this moment is in AUR) and evince (in extra)<br />
<br />
* delete ~/.mozilla/firefox/*.default/pluginreg.dat (as mentioned after mozplugger installation)<br />
<br />
* edit /etc/mozpluggerrc: find the line containing "pdf" word, after "GV()" edit evince line as below:<br />
<br />
#repeat noisy fill exits: evince "$file"<br />
repeat noisy swallow(evince) fill: evince "$file"<br />
<br />
{{Note|you must place comments at the very beginning of the line to avoid errors}}<br />
<br />
* finally close (if not yet) and reopen firefox (now you can see a new plugin called mozplugger)<br />
<br />
* try to open a pdf sample<br />
<br />
* old forum instruction deprecated "http://ubuntuforums.org/showthread.php?t=25685"<br />
<br />
{{ note | This method also works with other PDF viewers. Try replacing "evince" with the name of another program. }}<br />
<br />
=== Wheel mouse scroll speed ===<br />
<br />
To modify the default values (i.e. speed-up) of the wheel mouse scroll speed, type the following into Firefox's address bar:<br />
about:config<br />
Now enter the following into the 'filter' dialog: '''mousewheel.withnokey'''<br />
<br />
*Double-click the entry entitled, '''mousewheel.withnokey.sysnumlines''' and thereby setting its value to '''false'''<br />
*Double-click the entry entitled, '''mousewheel.withnokey.numlines''' and enter the desired number of lines per movement into the box (12, for example).<br />
<br />
Restart firefox for this setting to take effect.<br />
<br />
Alternatively you can install [http://smoothwheel.mozdev.org/ SmoothWheel add-on].<br />
<br />
=== Change the order of searchplugins list ===<br />
You can now (in Firefox 3) change the order in the GUI:<br />
* Open the dropdown list of search engines and click Manage Search Engines<br />
* Highlight the Engine you want to move and use Move Up or Move Down to move it.<br />
<br />
=== How to open a *.doc automatically with abiword or open office ===<br />
Click through the following menus:<br />
*Edit<br />
*Preferences<br />
*File types<br />
*Manage<br />
*Select the {{filename|doc}} extension<br />
*Select ''Open them with this application''<br />
*Select {{filename|/usr/bin/abiword}} or {{filename|/usr/bin/soffice}}<br />
<br />
There is also a plugin/addon called mime edit. This addon will let you edit the mime types for firefox.<br />
<br />
=== Secure DNS with DNSSEC validator ===<br />
You can enable [[DNSSEC]] support for safer browsing.<br />
<br />
== Resources ==<br />
* http://www.mozilla.org/support/firefox/tips</div>MadCatMk2https://wiki.archlinux.org/index.php?title=List_of_applications&diff=146858List of applications2011-06-21T11:30:14Z<p>MadCatMk2: /* BitTorrent Clients */</p>
<hr />
<div>[[Category:Other desktop user's resources (English)]] <br />
{{i18n|Common Applications}}<br />
{{Article summary start}}<br />
{{Article summary text|Provides a list of common software that may be useful in day-to-day computer use, categorized by task.}}<br />
<!--{{Article summary heading|Languages}}--><br />
<!--{{i18n_entry|English|Common Applications}}--><br />
{{Article summary heading|Related}}<br />
{{Article summary text|[[Lightweight Applications]]}}<br />
{{Article summary end}}<br />
<br />
==Backup programs==<br />
{{Box||See the article on this subject: [[Backup Programs]]|#E5E5FF|#FCFCFC}}<br />
*{{App|[[Wikipedia:DAR (Disk Archiver)|DAR]]|A full-featured command-line backup tool, short for Disk ARchive|http://dar.linux.free.fr/|{{Package Official|dar}}}}<br />
*{{App|[[Wikipedia:Duplicity (software)|Duplicity]]|A utility for encrypted, bandwidth-efficient backups using the rsync algorithm|http://www.nongnu.org/duplicity/|{{Package Official|duplicity}}}}<br />
*{{App|Packrat|A simple, modular backup system that uses dar to take full/incremental backups of files and can store them locally, on a remote system via SSH, or on Amazon S3|http://www.zeroflux.org/projects|{{Package AUR|packrat}}}}<br />
*{{App|[[Wikipedia:Rsync#Variations|rdiff-backup]]|A utility for local/remote mirroring and incremental backups|http://www.nongnu.org/rdiff-backup/|{{Package Official|rdiff-backup}}}}<br />
*{{App|rsnapshot|A remote filesystem snapshot utility|http://www.rsnapshot.org/|{{Package Official|rsnapshot}}}}<br />
*{{App|[[Rsync|rsync]]|A file transfer program to keep remote files in sync|http://rsync.samba.org/|{{Package Official|rsync}}}}<br />
*{{App|Safekeep|A client/server backup system which enhances the power of rdiff-backup|http://safekeep.sourceforge.net/|{{Package AUR|safekeep}}}}<br />
<br />
==Internet==<br />
===BitTorrent Clients===<br />
<!--Keep in sync with [[Lightweight Applications]] and use the App template.--><br />
{{Wikipedia|Comparison of BitTorrent clients}}<br />
*{{App|[[aria2]]|Command-line download manager that supports HTTP/HTTPS, FTP, BitTorrent and MetaLink protocols|http://aria2.sourceforge.net/|{{Package Official|aria2}}}}<br />
*{{App|[[Wikipedia:Deluge (software)|Deluge]]|User-friendly BitTorrent client written in Python and wrapped with PyGTK|http://deluge-torrent.org/|{{Package Official|deluge}}}}<br />
*{{App|[[Wikipedia:KTorrent|KTorrent]]|Feature-rich BitTorrent client developed using Qt|http://ktorrent.org/|{{Package Official|ktorrent}}}}<br />
*{{App|[[Wikipedia:MLDonkey|MLDonkey]]|Multi-protocol P2P client supporting BitTorrent|http://mldonkey.sourceforge.net/|{{Package Official|mldonkey}}}}<br />
*{{App|[[Wikipedia:QBittorrent|qBittorrent]]|The closest open source (GNU GPL v2 license) equivalent to µtorrent|http://qbittorrent.sourceforge.net/|{{Package Official|qbittorrent}}}}<br />
*{{App|[[Wikipedia:RTorrent|rTorrent]]|Simple and lightweight ncurses BitTorrent client|http://libtorrent.rakshasa.no/|{{Package Official|rtorrent}}}}<br />
*{{App|[[Wikipedia:Transmission (BitTorrent client)|Transmission]]|Simple and easy-to-use BitTorrent client with (GTK+) GUI, web and CLI front-ends|http://www.transmissionbt.com/|{{Package Official|transmission}}}}<br />
*{{App|[[Wikipedia:Vuze|Vuze]]|Feature-rich BitTorrent client written in Java (formerly Azureus)|http://www.vuze.com/|{{Package Official|vuze}}}}<br />
<br />
===Chat Clients===<br />
====IRC Clients====<br />
* {{App|[[Irssi]]|Highly-configurable ncurses-based IRC client|http://www.irssi.org/|{{Package Official|irssi}}}}<br />
* {{App|[[Wikipedia:Konversation|Konversation]]|Qt-based IRC client for the KDE4 desktop|http://konversation.kde.org/|{{Package Official|konversation}}}}<br />
* {{App|[[Wikipedia:KVIrc|KVIrc]]|Qt-based IRC client featuring extensive themes support|http://www.kvirc.net/|{{Package Official|kvirc}}}}<br />
* {{App|[[Wikipedia:WeeChat|WeeChat]]|Modular, lightweight ncurses-based IRC client|http://www.weechat.org/|{{Package Official|weechat}}}}<br />
* {{App|[[Wikipedia:XChat|XChat]]|GTK-based IRC client|http://xchat.org/|{{Package Official|xchat}}}}<br />
<br />
==== Jabber/XMPP Clients ====<br />
* {{App|Freetalk|A console based Jabber client|http://www.gnu.org/software/freetalk/|{{Package Official|freetalk}}}}<br />
* {{App|[[Wikipedia:Gajim|Gajim]]|Jabber client written in PyGTK|http://www.gajim.org/|{{Package Official|gajim}}}}<br />
* {{App|jabber.el|A minimal jabber client for emacs|http://emacs-jabber.sourceforge.net/|{{Package AUR|emacs-jabber}}}}<br />
* {{App|[[Wikipedia:MCabber|MCabber]]|A small Jabber console client, includes features: SSL, PGP, MUC, and UTF8|http://mcabber.com/|{{Package Official|mcabber}}}}<br />
* {{App|[[Wikipedia:Psi (instant messaging client)|Psi]]|A Qt based Jabber client|http://psi-im.org/|{{Package Official|psi}}}}<br />
* {{App|Psi+|Psi+ is an enhanced version of Psi Jabber client.|http://code.google.com/p/psi-dev/|{{Package AUR|psi-plus}}}}<br />
<br />
==== MSN Clients ====<br />
* {{App|[[Wikipedia:AMSN|aMSN]]|MSN client written in Tcl/Tk|http://www.amsn-project.net/|{{Package Official|amsn}}}}<br />
* {{App|[[Wikipedia:Emesene|Emesene]]|A pygtk MSN Messenger client|http://www.emesene.org/|{{Package Official|emesene}}}}<br />
* {{App|Galaxium Messenger|A multi-protocol instant messenger application designed for the GNOME desktop|http://code.google.com/p/galaxium/|{{Package AUR|galaxium}}}}<br />
* {{App|[[Wikipedia:Kmess|KMess]]|KMess is a MSN Messenger client for Linux|http://kmess.org/|{{Package Official|kmess}}}}<br />
* {{App|[[Wikipedia:Mercury Messenger|Mercury]]|Java Based MSN client|http://www.mercury.im/|{{Package Official|mercury}}}}<br />
<br />
==== Multi-Protocol Clients ====<br />
{{Wikipedia|Comparison of instant messaging clients}}<br />
<br />
* {{App|BarnOwl|A console chat client for the AIM, IRC, Jabber, and Zephyr protocols|http://barnowl.mit.edu/|{{Package AUR|barnowl}}}}<br />
* {{App|Carrier|Pidgin fork providing minor GUI enhancements (formerly funpidgin)|http://funpidgin.sourceforge.net/|{{Package AUR|carrier}}}}<br />
* {{App|[[Wikipedia:Centericq|CenterIM]]|Fork of CenterICQ - A text mode menu- and window-driven IM interface|http://www.centerim.org/index.php/Main_Page|{{Package Official|centerim}}}}<br />
* {{App|[[Wikipedia:Empathy (software)|Empathy]]|A GNOME instant messaging client using the Telepathy framework|http://live.gnome.org/Empathy|{{Package Official|empathy}}}}<br />
* {{App|Finch|A ncurses-based messaging client|http://pidgin.im/|{{Package Official|finch}}}}<br />
* {{App|[[Wikipedia:Kopete|Kopete]]|Instant Messenger|http://www.kde.org/|{{Package Official|kopete}}}}<br />
* {{App|[[Pidgin]]|Multi-protocol instant messaging client|http://pidgin.im/|{{Package Official|pidgin}}}}<br />
* {{App|[[Wikipedia:QutIM|qutIM]]|Multiplatform instant messenger|http://qutim.org/|{{Package AUR|qutim}}}}<br />
<br />
===Email clients===<br />
<!--Keep in sync with [[Lightweight Applications]] and use the App template.--><br />
{{Wikipedia|Comparison of e-mail clients}}<br />
====Console====<br />
*{{App|[[Alpine]]|The Apache-licensed PINE (a tool for reading, sending, and managing electronic messages)|http://www.washington.edu/alpine|{{Package Official|alpine}}}}<br />
*{{App|[[Wikipedia:Gnus|Gnus]]|mail, nntp, rss client for Emacs.|http://www.gnus.org/|[[package]]}}<br />
*{{App|[[Wikipedia:mailx|heirloom-mailx]]|A full-featured command-line MUA derived from Berkeley Mail.|http://heirloom.sourceforge.net/mailx.html|{{Package Official|heirloom-mailx}}}}<br />
*{{App|[[mutt]]|Small but very powerful text-based mail client.|http://www.mutt.org/|{{Package Official|mutt}}}}<br />
*{{App|[[Sup]]|A CLI mail client with very fast searching, tagging, threading and gmail like operation.|http://sup.rubyforge.org/|{{Package AUR|sup}}}}<br />
<br />
====X11====<br />
*{{App|[[Wikipedia:Claws Mail|Claws Mail]]|A GTK+ based e-mail client|http://www.claws-mail.org/|{{Package Official|claws-mail}}}}<br />
*{{App|[[Evolution]]|A mature and feature-rich e-mail client used in GNOME by default.|http://projects.gnome.org/evolution/|{{Package Official|evolution}}}}<br />
*{{App|[[Wikipedia:Gnus|Gnus]]|mail, nntp, rss client for Emacs.|http://www.gnus.org/|[[package]]}}<br />
*{{App|[[Wikipedia:Kmail|Kmail]]|A mature and feature-rich e-mail client part of the kde project.|http://kontact.kde.org/kmail/|{{Package Official|kmail}}}}<br />
*{{App|[[Wikipedia:Sylpheed|Sylpheed]]|Lightweight and user-friendly e-mail client (GTK)|http://sylpheed.sraoss.jp/en/|{{Package AUR|sylpheed}}}}<br />
*{{App|[[Thunderbird]]|Mozilla's GTK2-based client.|http://www.mozillamessaging.com/en-US/|{{Package Official|thunderbird}}}}<br />
<br />
===News Aggregators===<br />
* [[Akregator]] - KDE's news aggregator (in kdepim package)<br />
* [[Canto]] - A ncurses RSS aggregator http://codezen.org/canto/<br />
* [[Gnus]] - mail, nntp, rss client for Emacs.<br />
* [[Liferea]] - A GTK desktop news aggregator for online news feeds and weblogs http://liferea.sourceforge.net<br />
* [[Newsbeuter]] - A ncurses RSS aggregator with layout and keybinding similar to mutt. Does not use the traditional 3 panes setup.<br />
* [[Rawdog]] - An "RSS Aggregator Without Delusions Of Grandeur" that parses RSS/CDF/Atom feeds into a static HTML page of articles in date order http://offog.org/code/rawdog.html<br />
* [[Rssowl]] - A powerful java-based RSS reader http://boreal.rssowl.org<br />
* [[BlogBridge]] - Another excellent java-based aggregator http://www.blogbridge.com<br />
* [[Snownews]] - Text mode RSS newsreader.<br />
* [[Thunderbird]] - A mail client from Mozilla which also functions as a pretty nice news aggregator<br />
<br />
=== Web Browsers ===<br />
==== Graphical ====<br />
* [[Arora]] - Cross-platform open source web browser using the [http://webkit.org/ WebKit] rendering engine, built on top of Qt. http://www.arora-browser.org/<br />
* [[Chromium]] - The open-source project behind Google Chrome, a web browser developed by Google that uses the WebKit layout engine and application framework. http://code.google.com/chromium/<br />
* [[Dillo]] - A small, fast graphical web browser built on FLTK http://www.dillo.org/<br />
* [[Epiphany]] - The default GNOME browser, which uses the webkit rendering engine. http://projects.gnome.org/epiphany/<br />
* [[Firefox]] - [https://addons.mozilla.org/firefox/ Extensible] GTK2 browser based on Gecko with fast rendering. http://www.mozilla.com/firefox/<br />
* [[Kazehakase]] - A much lighter, but rather feature-lacking alternative to other browsers (GTK2 and Gecko). http://kazehakase.sourceforge.jp/<br />
* [[Konqueror]] - Qt- and KHTML-based browser. A part of the KDE desktop. http://www.konqueror.org/<br />
* [[Midori]] - Young but promising GTK2/WebKit browser, featherweight with very fast rendering http://www.twotoasts.de/index.php?/pages/midori_summary.html<br />
* [[Opera]] - Highly customizable browser with focuses on an adherence to web rendering standards http://www.opera.com/<br />
* [[uzbl]] - A lightweight webkit browser following the UNIX philosophy - to do one thing and do it well. http://www.uzbl.org/<br />
* [http://aur.archlinux.org/packages.php?ID=6524 Hv3] - A minimalist web browser based on tkhtml3 http://tkhtml.tcl.tk/hv3.html<br />
* [http://aur.archlinux.org/packages.php?O=0&K=vimprobable&do_Search=Go Vimprobable] - A webkit-based web browser which behaves like Vimperator, but without Firefox. http://www.vimprobable.org/<br />
* [http://aur.archlinux.org/packages.php?ID=38684 jumanji] - jumanji provides a minimalistic and space saving interface with vimperator-like keyboard-focused interaction http://pwmt.org/jumanji<br />
<br />
==== Text Based ====<br />
* [[Elinks]] - An advanced and well-established feature-rich text mode web browser. http://elinks.or.cz<br />
* [[links-g]] A text WWW browser, similar to Lynx, with framebuffer and X graphics enabled http://links.twibright.com/<br />
* [[Lynx]] A text browser for the World Wide Web http://lynx.isc.org<br />
* [[w3m]] A pager/text-based WWW browser http://w3m.sourceforge.net/<br />
<br />
=== Microblogging Clients ===<br />
* [[Hotot]] - Hotot, is a lightweight & open source Microblogging Client, coding using Python language and designed for Linux. http://hotot.org<br />
* [[Gwibber]] - Gwibber is an open source microblogging client for Linux. It brings the most popular social networking web services to your desktop and gives you the ability to control how you communicate. http://gwibber.com/<br />
* [[Pino]] - Pino is a simple and fast X11 client for Twitter and Identi.ca. It is compiled to native code, which assures small size and speed, and thanks to use of Vala language it can perfectly integrate into your Gnome or XFCE desktop. http://pino-app.appspot.com/<br />
<br />
== Document Indexers ==<br />
* [[pinot]] - Personal search and metasearch tool http://pinot.berlios.de/<br />
* [[recoll]] - Full text search tool based on Xapian backend http://www.lesbonscomptes.com/recoll/<br />
<br />
== Document Readers ==<br />
*[[ePDFView ]] - A free lightweight PDF document viewer using Poppler and GTK+ libraries. http://trac.emma-soft.com/epdfview/<br />
*[[Evince]] - Document viewer for multiple document formats. Supports pdf, postscript, djvu, tiff and dvi http://projects.gnome.org/evince/<br />
*[[Foxit Reader]] - A small, fast PDF viewer http://www.foxitsoftware.com/pdf/desklinux/<br />
*[[MuPDF]] - lightweight PDF viewer and toolkit written in portable C http://ccxvii.net/mupdf/<br />
*[[Okular]] - PDF viewer for KDE. http://okular.kde.org/<br />
*[[xpdf]] - A viewer for Portable Document Format (PDF) files http://www.foolabs.com/xpdf/<br />
*[[apvlv]] - apvlv is a PDF Viewer Under Linux and its behaviour like Vim. http://code.google.com/p/apvlv/<br />
<br />
== Multimedia ==<br />
=== Audio ===<br />
* [[Amarok]] - A mature Qt-based player known for its plethora of features<br />
* [http://ario-player.sourceforge.net/ Ario] - A GTK2 client for MPD (Music player daemon) inspired by Rhythmbox but much lighter and faster<br />
* [http://www.atunes.org/ aTunes] - An audio-player written in Java<br />
* [[Audacious]] - A Winamp clone like Beep and old XMMS versions<br />
* [http://banshee.fm/ Banshee] - yet another GTK2 iTunes clone, yet more feature-rich and more actively developed.<br />
* [http://www.clementine-player.org/ Clementine] - Amarok 1.4 ported to QT4<br />
* [http://cmus.sourceforge.net/ Cmus] is a very feature-rich ncurses-based music player.<br />
* [http://web.archive.org/web/20080221195932/http://mask.tf.hut.fi/~flu/cplay/ Cplay] is a curses front-end for various audio players.<br />
* [http://deadbeef.sourceforge.net/ DeaDBeeF] - Lightweight and powerful music player made with C and GTK2. [http://bbs.archlinux.org/viewtopic.php?id=96968]<br />
* [[Exaile]] - A GTK2 clone of Amarok<br />
* [[Goggles Music Manager]] - A lightweight music manager and player that automatically categorizes your music files.<br />
* [http://guayadeque.org/ Guayadeque] - A full featured media player that can easily manage large collections and uses the Gstreamer media framework.<br />
* [[Moc]] - A ncurses-based daemon/client style player, designed to be flexible and easy to use.<br />
* [[Music Player Daemon]] - Music player daemon, a lightweight and scalable choice for music management<br />
* [http://www.mpg123.org/ mpg123] - command line audio player.<br />
* [http://mpd.wikia.com/wiki/Client:Ncmpc ncmpc] - An ncurses-based front-end to mpd<br />
* [http://unkart.ovh.org/ncmpcpp/ ncmpcpp] - A clone of ncmpc with some new features written in C++<br />
* [http://www.luga.de/pytone/ PyTone] - An advanced music jukebox with a console interface<br />
* [http://code.google.com/p/quodlibet/ Quod Libet] - an audio player written with pygtk and gstreamer<br />
* [[Rhythmbox]] - A GTK2 clone of iTunes, used by default in GNOME<br />
* [http://sonata.berlios.de/ Sonata] - A pygtk-based client for mpd<br />
* [http://getnightingale.com/ Nightingale] - ([http://getsongbird.com/ Songbird] for linux) an open source clone of iTunes that uses Mozilla technologies as well as Gstreamer and is being developed by the team that made WinAMP<br />
* [http://legacy.xmms2.org/ XMMS] - A skinnable GTK+1 standalone media player similar to winamp<br />
<br />
==== Visualization ====<br />
* [http://projectm.sourceforge.net/ projectM]<br />
<br />
==== Editing ====<br />
* [http://audacity.sourceforge.net/ Audacity]<br />
* [http://kwave.sourceforge.net/ Kwave]<br />
<br />
=== Graphics and Image Manipulation ===<br />
* [[Blender]]<br />
* [[Dia]]<br />
* [[Gimp]]<br />
* [[imagemagick]]<br />
* [[graphicsmagick]]<br />
* [[Inkscape]]<br />
* [[Krita]]<br />
* [[mtpaint]]<br />
* [[Nathive]]<br />
* [[Shotwell]]<br />
* [[Xara]]<br />
* [[mypaint]]<br />
<br />
===Image Viewers===<br />
<!--Keep in sync with [[Lightweight Applications]] and use the App template.--><br />
{{Wikipedia|Comparison of image viewers}}<br />
*{{App|[[Feh]]|A fast, lightweight image viewer that uses imlib2|http://linuxbrit.co.uk/feh/|{{Package Official|feh}}}}<br />
*{{App|GpicView|A simple and fast image viewer for X. Made by the developers of [[LXDE]]|http://lxde.sourceforge.net/gpicview/|{{Package Official|gpicview}}}}<br />
*{{App|[[Wikipedia:GQview|GQview]]|An image browser that features single click access to view images and move around the directory tree|http://gqview.sourceforge.net/|{{Package Official|gqview}}}}<br />
*{{App|Geeqie|An image browser/viewer fork of GQview. Adds additional functionality such as support for RAW files|http://geeqie.sourceforge.net/|{{Package Official|geeqie}}}}<br />
*{{App|Mirage|PyGTK image viewer featuring support for crop and resize, custom actions and a thumbnail panel|http://mirageiv.berlios.de|{{Package Official|mirage}}}}<br />
*{{App|Ristretto|A fast and lightweight picture-viewer for the Xfce desktop environment|http://goodies.xfce.org/projects/applications/ristretto|{{Package Official|ristretto}}}}<br />
*{{App|QIV|A very small and fast gdk/Imlib image viewer|http://spiegl.de/qiv/|{{Package Official|qiv}}}}<br />
*{{App|Viewnior|Minimalistic GTK2 viewer featuring support for flip, rotate, animations and configurable mouse actions|http://xsisqox.github.com/Viewnior/about.html|{{Package Official|viewnior}}}}<br />
*{{App|Xloadimage|The classic X image viewer|http://web.archive.org/web/19981207030422/http://world.std.com/~jimf/xloadimage.html|{{Package Official|xloadimage}}}}<br />
*{{App|SXIV|Simple X Image Viewer; works well with tiling window managers, uses imlib2|http://github.com/muennich/sxiv|{{Package AUR|sxiv}}}}<br />
<!-- Broken links, need to be turned into App Templates.<br />
* [[Background Setter]]<br />
* [[eog]]<br />
* [[GQview]]<br />
* [[gThumb]]<br />
* [[Quick Image Viewer]]<br />
* [[XnView]]<br />
* [[xv]]<br />
* [[Picasa]]<br />
--><br />
<br />
=== Phone ===<br />
* [[moto4lin]]<br />
<br />
=== Video Players===<br />
* [[mplayer]]<br />
* [[Parole]] A modern media player based on the GStreamer framework http://goodies.xfce.org/projects/applications/parole/<br />
* [[SMPlayer]] is a complete frontend for [[MPlayer]].<br />
* [[VLC]] - A simple multi-platform media player, streamer, and encoder, that handles huge numbers of media formats.<br />
* [[Whaaw! Media Player]] is a lightweight Gstreamer-based audio/video player that can serve as a good alternative to Totem for those who don't like all those GNOME dependencies. http://home.gna.org/whaawmp/<br />
* [[Dragon player]] is a simple video player for KDE 4 developed by Ian Monroe. http://www.dragonplayer.net/<br />
<br />
=== Video Editors ===<br />
* http://www.pitivi.org/ {{Package AUR|pitivi}}<br />
* http://lives.sourceforge.net/ {{Package AUR|lives}}<br />
* http://www.openmovieeditor.org/ {{Package Official|openmovieeditor}}<br />
* [http://www.openshotvideo.com/ openshotvideo]<br />
* http://www.avidemux.org/ {{Package Official|avidemux}}<br />
* http://kdenlive.org/ {{Package Official|kdenlive}}<br />
* [http://www.kinodv.org/ kinodv]<br />
* http://cinelerra.org/ {{Package Official|cinelerra-cv}}<br />
<br />
== Note Taking Organizers ==<br />
* [http://aur.archlinux.org/packages.php?ID=19388 glista] with notes support [http://prematureoptimization.org/glista/downloads.php Home page]<br />
* [[hnb]] - A program to organize many kinds of data in one place [http://hnb.sourceforge.net/ Home page] [http://aur.archlinux.org/packages.php?ID=16630 Package]<br />
* [[NoteCase]] - A portable hierarchical note manager, coded in C++ using the GTK+ toolkit [http://notecase.sourceforge.net Home page]<br />
* [[Task]] - A command-line TODO list manager [http://www.beckingham.net/task.html Home page]<br />
* [[tomboy]] - Desktop note-taking application for Linux and Unix [http://www.gnome.org/projects/tomboy/ Home page]<br />
* [[zim]] - A WYSIWYG text editor that aims at bringing the concept of a wiki to the desktop [http://zim-wiki.org/ Home page]<br />
* [[Gnote]] - Gnote is an experimental port of Tomboy to C++ [http://live.gnome.org/Gnote Home page]<br />
* [[Cherrytree]] - A hierarchical note taking application [http://www.giuspen.com/cherrytree/ Home page]<br />
<br />
==Office suites==<br />
* [[Koffice]] - KOffice is a free, integrated office suite for KDE, the K Desktop Environment. http://www.koffice.org/<br />
* [[OpenOffice.org]] - An office suite http://www.OpenOffice.org/<br />
* [http://www.libreoffice.org LibreOffice] - A fork of OpenOffice.org, which integrates various patches<br />
<br />
==Word processors==<br />
*[[Abiword]] - A lightweight fast word processor http://www.abisource.com/<br />
*[[OpenOffice.org Writer]] - A full-featured word processor included in the OpenOffice.org suite<br />
*[http://www.archlinux.org/packages/community/i686/ted/ Ted] - An easy GTK-based rich text processor (with footnote support) http://www.nllgg.nl/Ted/<br />
<br />
== Spreadsheets ==<br />
* [[gnumeric]] - A GNOME Spreadsheet Program http://www.gnome.org/projects/gnumeric<br />
* [[OpenOffice.org Calc]] - A full-featured spreadsheet included in OpenOffice.org suite<br />
<br />
== Security ==<br />
* [[arpwatch]] - arpwatch and arpsnmp network monitoring tools ftp://ftp.ee.lbl.gov/<br />
* [[DenyHosts]] - a script to help thwart ssh server attacks http://denyhosts.sourceforge.net/<br />
* [[fail2ban]] - bans IP that makes too many password failures http://www.fail2ban.org/<br />
* [[Sshguard]] - Same as DenyHosts and fail2ban, only lighter, simpler and written in plain C http://www.sshguard.net/<br />
* [[etherape]] - A graphical network monitor for various OSI layers and protocols http://etherape.sourceforge.net/<br />
* [[iptraf]] - An IP network monitor http://iptraf.seul.org/<br />
* [[logwatch]] - Logwatch is a customizable log analysis system http://www.logwatch.org/<br />
* [[nessus]] - Vulnerability scanner http://www.nessus.org<br />
* [[nmap]] - A command line network exploration tool and security/port scanner http://nmap.org<br />
* [[ntop]] - A network traffic probe based on libcap http://ntop.org<br />
* [[portbunny]] - Extremly fast CLI portscanner http://www.recurity-labs.com/portbunny/index.shtml<br />
* [[snort]] - A lightweight network intrusion detection system http://www.snort.org<br />
* [[swatch]] - The active log file monitoring tool http://swatch.sourceforge.net/<br />
* [[tcpdump]] - A tool for network monitoring and data acquisition http://www.tcpdump.org<br />
* [[wireshark]] - A free network protocol analyzer for Unix/Linux and Windows http://www.wireshark.org/<br />
<br />
== Time Management ==<br />
* [[Calcurse]] - An ncurses calendar and task manager [http://culot.org/calcurse/ Home page]<br />
* [[Orage]] - A GTK+ calendar and task manager often seen integrated with Xfce [http://www.xfce.org/projects/orage/ Home page]<br />
* [[Osmo]] - A GTK+ personal organizer, which includes calendar, tasks manager and address book modules. [http://clayo.org/osmo/ Home page]<br />
* [http://aur.archlinux.org/packages.php?ID=21675 Rachota] - A portable time tracker for personal projects [http://rachota.sourceforge.net/en/ Home page]<br />
* [[Remind]] - A sophisticated calendar and alarm program [http://www.roaringpenguin.com/penguin/open_source_remind.php Home page]<br />
* [[Sunbird]] - The standalone Mozilla calendar application [http://www.mozilla.org/projects/calendar/sunbird/ Home page]<br />
* [[taskcoach]] - A simple open source todo manager to manage personal tasks and todo lists [http://taskcoach.sourceforge.net/ Home page] [http://aur.archlinux.org/packages.php?ID=6005 Package]<br />
* [[When]] - A simple command line personal calendar program [http://www.lightandmatter.com/when/when.html Home page]<br />
* [[Wyrd]] - A text-based front-end to Remind. [http://pessimization.com/software/wyrd/ Home page]<br />
<br />
==Translation and Localisation==<br />
* [[Lokalize]] - the standard [[KDE]] tool for software translation. Available in Extra. [http://userbase.kde.org/Lokalize Home page]<br />
* [[virtaal]] - an editor for translation of both software and other text, based on Translate Toolkit. [http://aur.archlinux.org/packages.php?ID=21709 Available in AUR]. [http://translate.sourceforge.net/wiki/virtaal/index Home page]<br />
** Supported formats: Gettext (.po and .mo), XLIFF (.xlf), TMX, TBX, WordFast TM (.txt), Qt Linguist (.ts), Qt Phrase Book (.qph), OmegaT glossary (.tab and .utf8), ...<br />
** Shows suggestions from [[Apertium]], Google Translate, Microsoft Translator, [[Moses]], http://open-tran.eu, Translation Memories or TM servers<br />
* [[poedit]] - a simple Gettext/po-file translation tool. Available in Community. [http://www.poedit.net/ Home page]<br />
* [[OmegaT]] - "the translation memory tool", a general translators tool which contains a lot of translation memory features<br />
** Supported formats: html, MS Office 2007 XML, OpenDocument format, XLIFF/Okapi, MediaWiki, plain text, TMX, ...<br />
** Shows suggestions from Google Translate<br />
* [[pology]] - a set of Python tools for dealing with Gettext/po-files. See the [http://techbase.kde.org/Localization/Tools/Pology#About home page] for simple installation instructions.<br />
** May be used to translate po-files with [[Apertium]], see http://wiki.apertium.org/wiki/Translating_gettext for instructions. <br />
* [[Apertium]] - a free and open source rule-based machine translation platform. All released language data is [http://aur.archlinux.org/packages.php?K=apertium available in AUR]. [http://apertium.org/ Home page]<br />
** Supported formats: html, MS Office 2007 XML, OpenDocument format, TMX, some MediaWiki support, ... (use [[Pology]] or [[Virtaal]] for po-files)<br />
** See [http://wiki.apertium.org/wiki/Main_Page the wiki] for supported languages<br />
* [[Moses]] - a statistical machine translation tool (language data not included). [http://www.statmt.org/moses/ Home page]<br />
<br />
== Utilities ==<br />
===Arch Package Management===<br />
<!--shouldn't duplicate info from [[AUR Helpers]]--><br />
* {{App|Aurnotify|A tool set to notify the status of your favorite packages from AUR.|To use the aurnotify desklet visit: http://adesklets.sourceforge.net/desklets.html|{{Package AUR|aurnotify}}}}<br />
* {{App|[http://wiki.archlinux.org/index.php/Pacman_Tips#Color_output Pacman-color]|Command-line frontend for libalpm aka pacman with color patch.|http://www.archlinux.org/pacman/|{{Package AUR|pacman-color}}}}<br />
* {{App|Pacman-contrib|Utilities for use with the pacman package manager.|http://www.archlinux.org/pacman/|{{Package Official|pacman-contrib}}}}<br />
* {{App|Pkgtools|A collection of scripts for Arch Linux packages.|Which includes '''pkgfile'''; find what package owns a file. [[http://bbs.archlinux.org/viewtopic.php?pid=384196 Forum topic]]|{{Package Official|pkgtools}}}}<br />
<!--{{Warning|''Powerpill'' development has been officially discontinued: its latest version does not work with ''pacman>&#61;3.5''. See [https://bbs.archlinux.org/viewtopic.php?id&#61;115660].}}<br />
* [[Powerpill]] A wrapper for pacman that speeds up package retrieval by using aria2c for concurrent/segmented downloads. http://xyne.archlinux.ca/old_projects/powerpill--><br />
* {{App|[[TuPac]]|A cached pacman implementation that boosts some pacman operations: faster searches, AND searches, aur support, colored output, system sanity check, frontend friendly and more...|http://sourceforge.net/projects/tupac|{{Package AUR|tupac}}}} <br />
* {{App|[[Yaourt]]|A Pacman frontend with more features and AUR support.|http://www.archlinux.fr/yaourt-en/|{{Package AUR|yaourt}}}}<br />
<br />
Also see [[AUR Helpers]].<br />
<br />
=== Disk Usage Display Programs===<br />
* {{App|[[ncdu]]|A simple ncurses disk usage analyzer.|http://dev.yorhel.nl/ncdu|{{Package Official|ncdu}}}}<br />
* {{App|[[gt5]]|A diff-capable 'du-browser'.|http://gt5.sourceforge.net|{{Package AUR|gt5}}}}<br />
* {{App|[[Baobab]]|Baobab is a C/gtk+ application to analyse disk usage in any Gnome environment.|http://www.marzocca.net/linux/baobab|{{Package AUR|Baobab}}}}<br />
* {{App|[[Filelight]]|Filelight creates an interactive map of concentric, segmented rings that help visualise disk usage on your computer.|http://www.methylblue.com/filelight|{{Package Official|Filelight}}}}<br />
* {{App|[[gdmap]]|Draw map of rectangles where size of rectangle relate to size of file or dir.|http://gdmap.sourceforge.net/|{{Package Official|gdmap}}}}<br />
<br />
=== CD/DVD Burning Tools===<br />
* [[bashburn]] - A lightweight terminal based menu frontend for CD/DVD burning tools.<br />
* [[brasero]] - An application to burn CDs/DVDs for the Gnome Desktop.<br />
* [[gnomebaker]] - A GTK based CD/DVD burning application.<br />
* [[graveman]] - A GTK based CD/DVD burning application.<br />
* [[k3b]] - A feature-rich and easy to handle CD burning application for KDE.<br />
* [[nerolinux]] - A commercial CD/DVD burning tool (requires a valid key).<br />
* [[xcdroast]] - A lightweight CD/DVD burning tool.<br />
* [[xfburn]] - Xfburn is a simple CD/DVD burning tool based on libburnia libraries (xfce).<br />
<br />
===Clipboard Managers===<br />
* [[Parcellite]] - a lightweight yet feature-rich clipboard manager [http://parcellite.sourceforge.net/ Home page]<br />
* [[ClipIt]] - a fork of Parcellite with additional features and bugfixes [http://sourceforge.net/projects/gtkclipit/ Home page]<br />
* [[Glipper]] - Glipper is a clipboardmanager for GNOME with more features and plugin support [http://glipper.sourceforge.net/ Home page]<br />
* [[Anamnesis]] - stores all clipboard history (!) and offers an interface to do a full-text search. Both command line and GUI modes available [http://anamnesis.sourceforge.net/ Home page] | [http://aur.archlinux.org/packages.php?ID=41542 AUR package]<br />
<br />
=== Compression Tools ===<br />
* [[File Roller]] The default archive manager for GNOME.<br />
* [[p7zip]] - A command line port of 7-Zip for POSIX systems, including Linux. http://p7zip.sourceforge.net/ http://www.7-zip.org/<br />
* [[pbzip2]] - A threaded version of the bzip2 utility, can automatically scale up to as many cores as it finds in the system.<br />
* [[Squeeze]] - A featherweight front-end for command line archiving tools. Passworded archives are currently unsupported. http://squeeze.xfce.org/<br />
* [[XArchive]] - A GTK+ front-end for command line archiving tools.<br />
* [[Xarchiver]] - A lightweight, desktop independent front-end for command line archiving tools built with GTK2. http://xarchiver.sourceforge.net/<br />
* [[Ark]] - Archiving Tool for KDE4.<br />
<br />
===eMoney===<br />
* {{App|[[Bitcoin]]|A tool to manage bitcoins, a p2p currency.|Official website : http://bitcoin.org/|{{Package AUR|bitcoin}}}}<br />
<br />
=== File Managers ===<br />
* [[Dolphin]] - Default file manager for KDE 4 - http://dolphin.kde.org/<br />
* [[emelFM2]] - File manager that implements a three-pane design - http://emelfm2.net<br />
* [[Konqueror]] - Default file manager for KDE 2 and KDE 3 - http://www.konqueror.org/<br />
* [[Krusader]] - Advanced twin panel (commander style) file manager for KDE - http://www.krusader.org/<br />
* [[Midnight Commander]] - Terminal filemanager/shell that emulates Norton Commander - http://www.midnight-commander.org/<br />
* [[Nautilus]] - Extensible, heavyweight file manager used by default in GNOME with support for custom scripts - http://projects.gnome.org/nautilus/<br />
* [[PCManFM | PCMan File Manager]] - Part of the standard [[LXDE]] DE, a small and efficient graphical file manager - http://pcmanfm.sourceforge.net/<br />
* [[qtfm]] - A small, lightweight filemanager for Linux desktops based on pure Qt - http://www.qtfm.org/<br />
* [[Ranger]] - Ncurses based file manager with vi-like keybindings - https://github.com/hut/ranger<br />
* [[ROX-Filer]] - Small and fast file manager which can optionally manage desktop backgrounds and panels - http://roscidus.com/desktop/ROX-Filer<br />
* [[Thunar]] - [http://goodies.xfce.org/projects/thunar-plugins/start Extensible], medium weight file manager used by default in Xfce with support for plugins - http://thunar.xfce.org/<br />
* [[tuxcmd]] - Windowed file manager with 2 panels side by side similar to popular Total Commander or Midnight Commander file managers - http://tuxcmd.sourceforge.net/description.php<br />
* [[Vifm]] - Ncurses based file manager with vi-like keybindings - http://vifm.sourceforge.net/<br />
* [[Xfe]] - Small and very fast Commander like file manager - http://roland65.free.fr/xfe/<br />
* [[Sunflower]] - Small and highly customizable twin-panel file manager for Linux with support for plugins. - http://code.google.com/p/sunflower-fm/<br />
<br />
=== Merge tools ===<br />
* [[diffuse]]: http://diffuse.sourceforge.net/<br />
* ediff: part of [[Emacs|emacs]]<br />
* [[kdiff]]: http://kdiff3.sourceforge.net/<br />
* [[kompare]]: http://kde.org/applications/development/kompare<br />
* [[meld]]: http://meld.sourceforge.net<br />
* [[Vim#Merging_Files_.28Vimdiff.29|vimdiff]]<br />
<br />
=== Taskbars ===<br />
* {{App|[[Cairo-Dock]]|A highly customizable dock/laucher.|http://www.glx-dock.org/|{{Package AUR|cairo-dock}}}}<br />
* {{App|[[Avant Window Navigator]]|A lightweight dock which sits at the bottom of the screen.|http://wiki.awn-project.org/|{{Package Official|avant-window-navigator}}}}<br />
* {{App|[[fbpanel]]|Lightweight, NETWM compliant desktop panel.|http://fbpanel.sourceforge.net/|{{Package AUR|fbpanel}}}}<br />
* {{App|[[LXPanel]]|Lightweight X11 desktop panel and part of the LXDE DE.|http://lxde.org/|{{Package AUR|lxpanel}}}}<br />
* {{App|[[PyPanel]]|Lightweight panel/taskbar written in Python and C.|http://pypanel.sourceforge.net/|{{Package AUR|pypanel}}}}<br />
* {{App|[[Tint]]|Simple panel/taskbar developed specifically for Openbox.|http://code.google.com/p/tint2/|{{Package AUR|tint2}}}}<br />
* {{App|[[BMPanel]]|Lightweight, NETWM compliant desktop panel.|http://nsf.110mb.com/bmpanel/|{{Package AUR|bmpanel}}}}<br />
* {{App|[[Xfce4panel]]|Default [[Xfce]] panel|http://www.xfce.org/projects/xfce4-panel/|{{Package Official|xfce4-panel}}}}<br />
* {{App|[[Docker]]|A docking application which acts as a system tray.|http://icculus.org/openbox/2/docker/|{{Package Official|docker}}}}<br />
* {{App|[[Stalonetray]]|A stand-alone system tray.|http://stalonetray.sourceforge.net/|{{Package Official|stalonetray}}}}<br />
* {{App|[[Trayer]]|Swallows GTK 1.2/2.x application docklets, and KDE docklets.|https://gna.org/projects/fvwm-crystal/|{{Package Official|trayer}}}}<br />
<br />
==Window managers and desktop environments==<br />
*[[Desktop Environment#List of desktop environments|List of desktop environments]]<br />
*[[Window Manager#List of window managers|List of window managers]]<br />
<br />
=== System Monitoring ===<br />
*[[adesklet-systemmonitor]] - Modular stackable system monitors for adesklets http://adesklets.sourceforge.net/desklets.html<br />
*[[conky]] - advanced, highly configurable system monitor for X based on torsmo http://conky.sourceforge.net/<br />
*[[gkrellm]] - Simple, flexible system monitor package for GTK2; many plug-ins are available on AUR. http://members.dslextreme.com/users/billw/gkrellm/gkrellm.html<br />
<br />
=== Terminals ===<br />
<!--duplicates [[Terminal Emulator]]--><br />
* [[aterm]] - An xterm replacement with transparency support http://aterm.sourceforge.net/ <br />
* [[gnome-Terminal]] - GNOME default (standalone) terminal with support for Unicode and pseudo-transparency<br />
* [[konsole]] - KDE's default terminal<br />
* [[lxterminal]] - VTE-based terminal emulator and c part of the LXDE DE. http://lxde.org/<br />
* [[lilyterm]] — Lightweight and plain terminal emulator<br />
* [[mrxvt]] - Tabbed X terminal emulator based on rxvt code http://materm.sourceforge.net/index.html<br />
* [[roxterm]] - Tabbed, VTE-based terminal emulator http://roxterm.sourceforge.net/<br />
* [[rxvt-unicode]] (or urxvt) - A small, fast and customizable terminal which uses ~/.Xdefaults http://software.schmorp.de/pkg/rxvt-unicode.html<br />
* [[sakura]] - terminal emulator based on GTK and VTE. http://www.pleyades.net/david/sakura.php<br />
* [[terminal]] - Xfce default terminal with support for a colorized prompt and a tabbed interface http://www.xfce.org/projects/terminal/<br />
* [[terminator]] - A terminal emulator supporting multiple resizable terminal panes<br />
* [[tilda]] - A terminal based on terminals from shooter games. https://aur.archlinux.org/packages.php?ID=13103<br />
* [[xterm]] - The default of defaults, requires only X<br />
* [[yakuake]] - A drop-down terminal emulator based on KDE Konsole technology http://extragear.kde.org/apps/yakuake/<br />
* [[guake]] - A a drop-down terminal for Gnome Desktop Environment. https://aur.archlinux.org/packages.php?ID=15547<br />
<br />
===Text Editors===<br />
<!--Keep in sync with [[Lightweight Applications]] and use the App template.--><br />
{{Wikipedia|Comparison of text editors}}<br />
====Console====<br />
*{{App|[[Emacs|GNU Emacs]]|The somewhat intimidating but famously extensible text editor with hundreds of tricks and add-ons|http://www.gnu.org/software/emacs/|{{Package Official|emacs}}}}<br />
<!-- joe --><br />
*{{App|[[nano]]|A console text editor based on pico with on-screen key binding help|http://www.nano-editor.org/|{{Package Official|nano}}}}<br />
*{{App|[[Vim]]|Vi IMproved|http://www.vim.org/|{{Package Official|vim}}}}<br />
<br />
====X11====<br />
*{{App|[[Wikipedia:Acme (text editor)|Acme]]|A minimalist and flexible programming environment by Rob Pike|http://acme.cat-v.org|[[package]]}}<br />
*{{App|[[Beaver]]|An Early AdVanced EditoR|http://www.nongnu.org/beaver/|{{Package Official|beaver}}}}<br />
*{{App|[[Wikipedia:Geany|Geany]]|A text editor using the GTK+ 2 toolkit with basic features of an integrated development environment|http://www.geany.org|{{Package Official|geany}}}}<br />
*{{App|[[Wikipedia:Bluefish (text editor)|Bluefish]]|GTK editor/IDE with an MDI interface, syntax highlighting and support for Python plugins|http://bluefish.openoffice.nl/|{{Package Official|bluefish}}}}<br />
*{{App|Cssed|GTK2 based Cascading Style Sheets (CSS) editor|http://cssed.sourceforge.net/|[[package]]}}<br />
*{{App|Edile|A PyGTK code/scripting editor implemented in one file|http://edile.googlecode.com|{{Package AUR|edile}}}}<br />
*{{App|[[Emacs|GNU Emacs]]|The somewhat intimidating but famously extensible text editor with hundreds of tricks and add-ons|http://www.gnu.org/software/emacs/|{{Package Official|emacs}}}}<br />
*{{App|[[Gedit]]|Part of the GNOME desktop, but has minimal dependencies: a GTK2 editor with syntax highlighting, automatic indentation, matching brackets, etc., and a number of add-ons to increase functionality|[[project]]|[[package]]}}<br />
*{{App|[[gVim]]|Vi IMproved|http://www.vim.org/|{{Package Official|gvim}}}}<br />
*{{App|[[Kate]]|The KDE Advanced Text Editor. A full-featured programmer's editor, with MDI and a filesystem browser|[[project]]|[[package]]}}<br />
*{{App|[[KWrite]]|(part of the KDE desktop) A lightweight text editor with syntax highlighting.|[[project]]|[[package]]}}<br />
*{{App|[[Leafpad]]|A notepad clone for GTK+ 2.x that emphasizes simplicity|http://tarot.freeshell.org/leafpad/|{{Package Official|leafpad}}}}<br />
*{{App|[[medit]]|medit is a programming and around-programming text editor|http://mooedit.sourceforge.net/|{{Package Official|medit}}}}<br />
*{{App|[[Mousepad]]|A simple text editor for Xfce based on Leafpad|http://foo-projects.org/~benny/xfce/apps.html|{{Package Official|mousepad}}}}<br />
*{{App|[[Wikipedia:PyRoom|PyRoom]]|A great distractionless PyGTK text editor, a clone of the infamous WriteRoom|http://pyroom.org/|{{Package Official|pyroom}}}}<br />
*{{App|[[Wikipedia:Sam (text editor)|Sam]]|A graphical text editor by Rob Pike (still used by Ken Thompson and others)|http://sam.cat-v.org|}}<br />
*{{App|[[Scite]]|A generally useful editor with facilities for building and running programs|http://www.scintilla.org/SciTE.html|[[package]]}}<br />
*{{App|[[Tea]]|a QT based feature rich text editor|[[project]]|{{Package Official|tea}}}}<br />
<br />
=== OCR tools ===<br />
There are several steps to the whole OCR process, the actual OCR engine is only part of this:<br />
# scanning<br />
# document layout analysis<br />
# optical character recognition<br />
# post-processing (formatting, PDF creation)<br />
<br />
==== OCR Engines ====<br />
* [[CuneiForm]] is a command line OCR system originally developed and open sourced by Cognitive technologies. Supported languages: eng, ger, fra, rus, swe, spa, ita, ruseng, ukr, srp, hrv, pol, dan, por, dut, cze, rum, hun, bul, slo, lav, lit, est, tur. Available from [[pacman]]/community. https://launchpad.net/cuneiform-linux <br />
<br />
* [[Tesseract]] is "probably one of the most accurate open source OCR engines available". Available from [[pacman]]/community. http://code.google.com/p/tesseract-ocr/<br />
<br />
* [[GOCR]]/JOCR (http://jocr.sourceforge.net/) is an OCR engine which also supports barcode recognition. Available from [[pacman]]/extra as "gocr". http://www.gnu.org/software/ocrad/<br />
* [[Ocrad]] is an OCR (Optical Character Recognition) program based on a feature extraction method. Available from [[pacman]]/extra. http://www.gnu.org/software/ocrad/<br />
<br />
==== Layout analysers and user interfaces ====<br />
* [[OCRopus]] is an OCR ''platform'', modules exist for document layout analysis, OCR engines (it can use Tesseract or its own engine), natural language modelling, etc. Available from [[AUR]]. http://code.google.com/p/ocropus/<br />
* [[gscan2pdf]] scans, runs Tesseract and creates a PDF all in one go<br />
* [[Kooka]] is a scanner GUI for KDE which supports the OCR engines [[GOCR]], [[Ocrad]] or [[KADMOS]]. Used to be part of kdegraphics4, but dropped out due to lack of development. http://kooka.kde.org/<br />
* [[OCRFeeder]] is a Python GUI for Gnome which performs document analysis and rendition, and can use either [[CuneiForm]], [[GOCR]], [[Ocrad]] or [[Tesseract]] as OCR engines. It can import from PDF or image files, and export to HTML or OpenDocument. Available from [[AUR]]. http://live.gnome.org/OCRFeeder<br />
* [[YAGF]] is a graphical interface for the [[CuneiForm]] text recognition program on the Linux platform. Available from community repository. http://symmetrica.net/cuneiform-linux/yagf-en.html<br />
<br />
==Games==<br />
*[[Games]]<br />
*[[Netbook Games]]<br />
<br />
==See also==<br />
*[http://bbs.archlinux.org/viewtopic.php?id=88515 Arch Linux Forums / LnF Awards 2010] - The best Light & Fast apps of 2010.<br />
*http://linuxappfinder.com/<br />
*http://www.linuxlinks.com/<br />
*http://en.wikipedia.org/wiki/List_of_open_source_software_packages<br />
*http://linuxappfinder.com/alternatives - Windows and OS X Software Alternatives<br />
*http://alternativeto.net/ - find alternatives to popular programs<br />
*http://www.linuxalt.com/ - Linux equivalents of Windows software<br />
*http://lin-app.com/ - on-line information service of various commercial applications and games for Linux</div>MadCatMk2https://wiki.archlinux.org/index.php?title=OpenSSH&diff=146751OpenSSH2011-06-19T21:57:53Z<p>MadCatMk2: /* Links & References */</p>
<hr />
<div>[[Category:Daemons and system services (English)]]<br />
{{i18n|SSH}}<br />
[[pl:SSH]]<br />
[[fr:ssh]]<br />
<br />
Secure Shell or SSH is a network protocol that allows data to be exchanged over a secure channel between two computers. Encryption provides confidentiality and integrity of data. SSH uses public-key cryptography to authenticate the remote computer and allow the remote computer to authenticate the user, if necessary.<br />
<br />
SSH is typically used to log into a remote machine and execute commands, but it also supports tunneling, forwarding arbitrary TCP ports and X11 connections; file transfer can be accomplished using the associated SFTP or SCP protocols.<br />
<br />
An SSH server, by default, listens on the standard TCP port 22. An SSH client program is typically used for establishing connections to an ''sshd'' daemon accepting remote connections. Both are commonly present on most modern operating systems, including Mac OS X, GNU/Linux, Solaris and OpenVMS. Proprietary, freeware and open source versions of various levels of complexity and completeness exist.<br />
<br />
(Source: [[Wikipedia:Secure Shell]])<br />
<br />
= OpenSSH =<br />
<br />
OpenSSH (OpenBSD Secure Shell) is a set of computer programs providing encrypted communication sessions over a computer network using the ssh protocol. It was created as an open source alternative to the proprietary Secure Shell software suite offered by SSH Communications Security. OpenSSH is developed as part of the OpenBSD project, which is led by Theo de Raadt.<br />
<br />
OpenSSH is occasionally confused with the similarly-named OpenSSL; however, the projects have different purposes and are developed by different teams, the similar name is drawn only from similar goals.<br />
<br />
== Installing OpenSSH ==<br />
# pacman -S openssh<br />
<br />
== Configuring SSH ==<br />
===Client===<br />
The SSH client configuration file can be found and edited in {{Filename|/etc/ssh/ssh_config}}.<br />
<br />
An example configuration: <br />
<br />
{{File|name=/etc/ssh/ssh_config|content=<br />
# $OpenBSD: ssh_config,v 1.26 2010/01/11 01:39:46 dtucker Exp $<br />
<br />
# This is the ssh client system-wide configuration file. See<br />
# ssh_config(5) for more information. This file provides defaults for<br />
# users, and the values can be changed in per-user configuration files<br />
# or on the command line.<br />
<br />
# Configuration data is parsed as follows:<br />
# 1. command line options<br />
# 2. user-specific file<br />
# 3. system-wide file<br />
# Any configuration value is only changed the first time it is set.<br />
# Thus, host-specific definitions should be at the beginning of the<br />
# configuration file, and defaults at the end.<br />
<br />
# Site-wide defaults for some commonly used options. For a comprehensive<br />
# list of available options, their meanings and defaults, please see the<br />
# ssh_config(5) man page.<br />
<br />
# Host *<br />
# ForwardAgent no<br />
# ForwardX11 no<br />
# RhostsRSAAuthentication no<br />
# RSAAuthentication yes<br />
# PasswordAuthentication yes<br />
# HostbasedAuthentication no<br />
# GSSAPIAuthentication no<br />
# GSSAPIDelegateCredentials no<br />
# BatchMode no<br />
# CheckHostIP yes<br />
# AddressFamily any<br />
# ConnectTimeout 0<br />
# StrictHostKeyChecking ask<br />
# IdentityFile ~/.ssh/identity<br />
# IdentityFile ~/.ssh/id_rsa<br />
# IdentityFile ~/.ssh/id_dsa<br />
# Port 22<br />
# Protocol 2,1<br />
# Cipher 3des<br />
# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc<br />
# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160<br />
# EscapeChar ~<br />
# Tunnel no<br />
# TunnelDevice any:any<br />
# PermitLocalCommand no<br />
# VisualHostKey no<br />
# ProxyCommand ssh -q -W %h:%p gateway.example.com<br />
}}<br />
<br />
It is recommended to change the Protocol line into this:<br />
Protocol 2<br />
<br />
That means that only Protocol 2 will be used, since Protocol 1 is considered somewhat insecure.<br />
<br />
===Daemon===<br />
The SSH daemon configuration file can be found and edited in {{Filename|/etc/ssh/ssh'''d'''_config}}.<br />
<br />
An example configuration: <br />
<br />
{{File|name=/etc/ssh/sshd_config|content=<br />
# $OpenBSD: sshd_config,v 1.82 2010/09/06 17:10:19 naddy Exp $<br />
<br />
# This is the sshd server system-wide configuration file. See<br />
# sshd_config(5) for more information.<br />
<br />
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin<br />
<br />
# The strategy used for options in the default sshd_config shipped with<br />
# OpenSSH is to specify options with their default value where<br />
# possible, but leave them commented. Uncommented options change a<br />
# default value.<br />
<br />
#Port 22<br />
#AddressFamily any<br />
#ListenAddress 0.0.0.0<br />
#ListenAddress ::<br />
<br />
# The default requires explicit activation of protocol 1<br />
#Protocol 2<br />
<br />
# HostKey for protocol version 1<br />
#HostKey /etc/ssh/ssh_host_key<br />
# HostKeys for protocol version 2<br />
#HostKey /etc/ssh/ssh_host_rsa_key<br />
#HostKey /etc/ssh/ssh_host_dsa_key<br />
#HostKey /etc/ssh/ssh_host_ecdsa_key<br />
<br />
# Lifetime and size of ephemeral version 1 server key<br />
#KeyRegenerationInterval 1h<br />
#ServerKeyBits 1024<br />
<br />
# Logging<br />
# obsoletes QuietMode and FascistLogging<br />
#SyslogFacility AUTH<br />
#LogLevel INFO<br />
<br />
# Authentication:<br />
<br />
#LoginGraceTime 2m<br />
#PermitRootLogin yes<br />
#StrictModes yes<br />
#MaxAuthTries 6<br />
#MaxSessions 10<br />
<br />
#RSAAuthentication yes<br />
#PubkeyAuthentication yes<br />
#AuthorizedKeysFile .ssh/authorized_keys<br />
<br />
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts<br />
#RhostsRSAAuthentication no<br />
# similar for protocol version 2<br />
#HostbasedAuthentication no<br />
# Change to yes if you don't trust ~/.ssh/known_hosts for<br />
# RhostsRSAAuthentication and HostbasedAuthentication<br />
#IgnoreUserKnownHosts no<br />
# Don't read the user's ~/.rhosts and ~/.shosts files<br />
#IgnoreRhosts yes<br />
<br />
# To disable tunneled clear text passwords, change to no here!<br />
#PasswordAuthentication yes<br />
#PermitEmptyPasswords no<br />
<br />
# Change to no to disable s/key passwords<br />
ChallengeResponseAuthentication no<br />
<br />
# Kerberos options<br />
#KerberosAuthentication no<br />
#KerberosOrLocalPasswd yes<br />
#KerberosTicketCleanup yes<br />
#KerberosGetAFSToken no<br />
<br />
# GSSAPI options<br />
#GSSAPIAuthentication no<br />
#GSSAPICleanupCredentials yes<br />
<br />
# Set this to 'yes' to enable PAM authentication, account processing, <br />
# and session processing. If this is enabled, PAM authentication will <br />
# be allowed through the ChallengeResponseAuthentication and<br />
# PasswordAuthentication. Depending on your PAM configuration,<br />
# PAM authentication via ChallengeResponseAuthentication may bypass<br />
# the setting of "PermitRootLogin without-password".<br />
# If you just want the PAM account and session checks to run without<br />
# PAM authentication, then enable this but set PasswordAuthentication<br />
# and ChallengeResponseAuthentication to 'no'.<br />
UsePAM yes<br />
<br />
#AllowAgentForwarding yes<br />
#AllowTcpForwarding yes<br />
#GatewayPorts no<br />
#X11Forwarding no<br />
#X11DisplayOffset 10<br />
#X11UseLocalhost yes<br />
#PrintMotd yes<br />
#PrintLastLog yes<br />
#TCPKeepAlive yes<br />
#UseLogin no<br />
#UsePrivilegeSeparation yes<br />
#PermitUserEnvironment no<br />
#Compression delayed<br />
#ClientAliveInterval 0<br />
#ClientAliveCountMax 3<br />
#UseDNS yes<br />
#PidFile /var/run/sshd.pid<br />
#MaxStartups 10<br />
#PermitTunnel no<br />
#ChrootDirectory none<br />
<br />
# no default banner path<br />
#Banner none<br />
<br />
# override default of no subsystems<br />
Subsystem sftp /usr/lib/ssh/sftp-server<br />
<br />
# Example of overriding settings on a per-user basis<br />
#Match User anoncvs<br />
# X11Forwarding no<br />
# AllowTcpForwarding no<br />
# ForceCommand cvs server<br />
}}<br />
<br />
<br />
To allow access only for some users add this line:<br />
AllowUsers user1 user2<br />
<br />
To disable root login over SSH, add the following:<br />
PermitRootLogin no<br />
<br />
You could also uncomment the BANNER option and edit {{Filename|/etc/issue}} for a nice welcome message.<br />
<br />
{{Tip| You may want to change the default port from 22 to any higher port (see [http://en.wikipedia.org/wiki/Security_through_obscurity security through obscurity]).}} <br />
<br />
Even though the port ssh is running on could be detected by using a port-scanner like nmap, changing it will reduce the number of log entries caused by automated authentication attempts.<br />
<br />
{{Tip| Disabling password logins entirely may also increase security, since each user with access to the server will need to create ssh keys. (see [http://wiki.archlinux.org/index.php/Using_SSH_Keys Using SSH Keys]).}}<br />
<br />
{{File|name=/etc/ssh/sshd_config|content=<br />
PasswordAuthentication no<br />
ChallengeResponseAuthentication no}}<br />
<br />
===Allowing others in===<br />
{{Box Note | You have to adjust this file to remotely connect to your machine since the file is empty by default}}<br />
<br />
To let other people ssh to your machine you need to adjust {{Filename|/etc/hosts.allow}}, add the following:<br />
<br />
<pre><br />
# let everyone connect to you<br />
sshd: ALL<br />
<br />
# OR you can restrict it to a certain ip<br />
sshd: 192.168.0.1<br />
<br />
# OR restrict for a specific IP mask<br />
sshd: 10.0.0.0/255.255.255.0<br />
<br />
# OR restrict for an IP match<br />
sshd: 192.168.1.<br />
</pre><br />
<br />
Now you should check your {{Filename|/etc/hosts.deny}} for the following line and make sure it looks like this:<br />
ALL: ALL<br />
<br />
That's it. You can SSH out and others should be able to SSH in :).<br />
<br />
To start using the new configuration, restart the daemon (as root):<br />
# rc.d restart sshd<br />
<br />
== Managing SSHD Daemon ==<br />
Just add sshd to the "DAEMONS" section of your {{Filename|/etc/[[rc.conf]]}}:<br />
DAEMONS=(... ... '''sshd''' ... ...)<br />
<br />
To start/restart/stop the daemon, use the following:<br />
# rc.d {start|stop|restart} sshd<br />
<br />
==Connecting to the server==<br />
To connect to a server, run:<br />
$ ssh -p port user@server-address<br />
<br />
= Tips and Tricks =<br />
<br />
== Encrypted Socks Tunnel ==<br />
This is highly useful for laptop users connected to various unsafe wireless connections. The only thing you need is an SSH server running at a somewhat secure location, like your home or at work. It might be useful to use a dynamic DNS service like [http://www.dyndns.org/ DynDNS] so you don't have to remember your IP-address.<br />
<br />
=== Step 1: Start the Connection ===<br />
You only have to execute this single command in your favorite terminal to start the connection:<br />
$ ssh -ND 4711 user@host<br />
where {{Codeline|"user"}} is your username at the SSH server running at the {{Codeline|"host"}}. It will ask for your password, and then you're connected! The {{Codeline|"N"}} flag disables the interactive prompt, and the {{Codeline|"D"}} flag specifies the local port on which to listen on (you can choose any port number if you want).<br />
<br />
One way to make this easier is to put an alias line in your {{Filename|~/.bashrc}} file as following:<br />
alias sshtunnel="ssh -ND 4711 -v user@host"<br />
It's nice to add the verbose {{Codeline|"-v"}} flag, because then you can verify that it's actually connected from that output. Now you just have to execute the {{Codeline|"sshtunnel"}} command :)<br />
<br />
=== Step 2: Configure your Browser (or other programs) ===<br />
<br />
The above step is completely useless if you don't configure your web browser (or other programs) to use this newly created socks tunnel. Since the current version of SSH supports both SOCKS4 and SOCKS5, you can use either of them.<br />
<br />
* For Firefox: ''Edit &rarr; Preferences &rarr; Advanced &rarr; Network &rarr; Connection &rarr; Setting'':<br />
: Check the ''"Manual proxy configuration"'' radio button, and enter "localhost" in the ''"SOCKS host"'' text field, and then enter your port number in the next text field (I used 4711 above).<br />
<br />
Firefox does not automatically make DNS requests through the socks tunnel. This potential privacy concern can be mitigated by the following steps:<br />
<br />
# Type about:config into the Firefox location bar.<br />
# Search for network.proxy.socks_remote_dns<br />
# Set the value to true.<br />
# Restart the browser.<br />
<br />
* For Chromium: You can set the SOCKS settings as enviroment variables or as command line options. I recommend to add one of the following functions to your {{Filename|.bashrc}}:<br />
function secure_chromium {<br />
port=4711<br />
export SOCKS_SERVER=localhost:$port<br />
export SOCKS_VERSION=5<br />
chromium &<br />
exit<br />
}<br />
OR<br />
function secure_chromium {<br />
port=4711<br />
chromium --proxy-server="socks://localhost:$port" &<br />
exit<br />
}<br />
<br />
Now open a terminal and just do:<br />
$ secure_chromium<br />
<br />
Enjoy your secure tunnel!<br />
<br />
== X11 Forwarding ==<br />
<br />
To run graphical programs through a SSH connection you can enable X11 forwarding. An option needs to be set in the configuration files on the server and client (here "client" means your (desktop) machine your X11 Server runs on, and you will run X applications on the "server").<br />
<br />
Install xorg-xauth on the server:<br />
# pacman -S xorg-xauth<br />
<br />
* Enable the '''AllowTcpForwarding''' option in {{Filename|sshd_config}} on the '''server'''.<br />
* Enable the '''X11Forwarding''' option in {{Filename|sshd_config}} on the '''server'''.<br />
* Set the '''X11DisplayOffset''' option in {{Filename|sshd_config}} on the '''server''' to 10.<br />
* Enable the '''X11UseLocalhost''' option in {{Filename|sshd_config}} on the '''server'''.<br />
Also:<br />
* Enable the '''ForwardX11''' option in {{Filename|ssh_config}} on the '''client'''.<br />
<br />
Enable the '''ForwardX11Trusted''' can help when gui drawing badly.<br />
<br />
To use the forwarding, log on to your server through ssh:<br />
$ ssh -X -p port user@server-address<br />
If you receive errors trying to run graphical applications try trusted forwarding instead:<br />
$ ssh -Y -p port user@server-address<br />
You can now start any X program on the remote server, the output will be forwarded to your local session:<br />
$ xclock<br />
<br />
If you get "Cannot open display" errors try the following command as the non root user:<br />
$ xhost +<br />
<br />
the above command will allow anybody to forward X11 applications. To restrict forwarding to a particular host type:<br />
$ xhost +hostname<br />
<br />
where hostname is the name of the particular host you want to forward to. Type "man xhost" for more details.<br />
<br />
Be careful with some applications as they check for a running instance on the local machine. Firefox is an example. Either close running Firefox or use the following start parameter to start a remote instance on the local machine<br />
$ firefox -no-remote<br />
<br />
== Speed up SSH ==<br />
You can make all sessions to the same host use a single connection, which will greatly speed up subsequent logins, by adding these lines under the proper host in {{Filename|/etc/ssh/ssh_config}}:<br />
ControlMaster auto<br />
ControlPath ~/.ssh/socket-%r@%h:%p<br />
<br />
Changing the ciphers used by SSH to less cpu-demanding ones can improve speed. In this aspect, the best choices are arcfour and blowfish-cbc. '''Please do not do this unless you know what you are doing; arcfour has a number of known weaknesses'''. To use them, run SSH with the {{Codeline|"c"}} flag, like this:<br />
$ ssh -c arcfour,blowfish-cbc user@server-address<br />
To use them permanently, add this line under the proper host in {{Filename|/etc/ssh/ssh_config}}:<br />
Ciphers arcfour,blowfish-cbc<br />
Another option to improve speed is to enable compression with the {{Codeline|"C"}} flag. A permanent solution is to add this line under the proper host in {{Filename|/etc/ssh/ssh_config}}:<br />
Compression yes<br />
Login time can be shorten by using the {{Codeline|"4"}} flag, which bypasses IPv6 lookup. This can be made permanent by adding this line under the proper host in {{Filename|/etc/ssh/ssh_config}}:<br />
AddressFamily inet<br />
Another way of making these changes permanent is to create an alias in {{Filename|~/.bashrc}}:<br />
alias ssh='ssh -C4c arcfour,blowfish-cbc'<br />
<br />
=== Trouble Shooting ===<br />
<br />
Make sure your DISPLAY string is resolveable on the remote end:<br />
<br />
$ ssh -X user@server-address<br />
server $ echo $DISPLAY<br />
localhost:10.0<br />
server $ telnet localhost 6010<br />
localhost/6010: lookup failure: Temporary failure in name resolution <br />
<br />
can be fixed by adding localhost to {{Filename|/etc/hosts}}.<br />
<br />
== Mounting a Remote Filesystem with SSHFS ==<br />
<br />
Install sshfs<br />
# pacman -S sshfs<br />
<br />
Load the Fuse module<br />
# modprobe fuse<br />
Add fuse to the ''modules'' array in {{Filename|/etc/rc.conf}} to load it on each system boot.<br />
<br />
Mount the remote folder using sshfs<br />
# mkdir ~/remote_folder<br />
# sshfs USER@remote_server:/tmp ~/remote_folder<br />
<br />
The command above will cause the folder /tmp on the remote server to be mounted as ~/remote_folder on the local machine. Copying any file to this folder will result in transparent copying over the network using SFTP. Same concerns direct file editing, creating or removing.<br />
<br />
When we’re done working with the remote filesystem, we can unmount the remote folder by issuing:<br />
# fusermount -u ~/remote_folder<br />
<br />
If we work on this folder on a daily basis, it is wise to add it to the {{Filename|/etc/fstab}} table. This way is can be automatically mounted upon system boot or mounted manually (if {{Codeline|noauto}} option is chosen) without the need to specify the remote location each time. Here is a sample entry in the table:<br />
sshfs#USER@remote_server:/tmp /full/path/to/directory fuse defaults,auto,allow_other 0 0<br />
<br />
== Keep Alive ==<br />
<br />
Your ssh session will automatically log out if it is idle. To keep the connection active (alive) add this to {{Filename|~/.ssh/config}} or to {{Filename|/etc/ssh/ssh_config}} on the client.<br />
<br />
ServerAliveInterval 120<br />
<br />
This will send a "keep alive" signal to the server every 120 seconds.<br />
<br />
Conversely, to keep incoming connections alive, you can set<br />
<br />
ClientAliveInterval 120<br />
<br />
(or some other number greater than 0) in {{Filename|/etc/ssh/sshd_config}} on the server.<br />
<br />
== Save connection data in .ssh/config ==<br />
<br />
Whenever you want to connect to a server, you usually have to type at least its address and your username. To save that typing work for servers you regularly connect to, you can use the {{Filename|$HOME/.ssh/config}} file as shown in the following example:<br />
<br />
{{File|name=$HOME/.ssh/config|content=<br />
<br />
Host myserver<br />
HostName 123.123.123.123<br />
Port 12345<br />
User bob<br />
Host other_server<br />
HostName test.something.org<br />
User alice<br />
CheckHostIP no<br />
Cipher blowfish<br />
}}<br />
<br />
Now you can simply connect to the server by using the name you specified:<br />
<br />
$ ssh myserver<br />
<br />
To see a complete list of the possible options, check out ssh_config's manpage on your system or the [http://www.openbsd.org/cgi-bin/man.cgi?query=ssh_config ssh_config documentation] on the official website.<br />
<br />
= Troubleshooting =<br />
<br />
== Connection Refused Problem ==<br />
<br />
=== Is SSH running and listening? ===<br />
<br />
# netstat -tnlp | grep ssh<br />
<br />
If the above command doesn't display anything, then SSH is NOT running. Check <code>/var/log/messages</code> for errors etc.<br />
<br />
=== Are there firewall rules blocking the connection? ===<br />
<br />
Flush your iptables rules to make sure they are not interfering:<br />
<br />
# rc.d stop iptables<br />
<br />
or:<br />
<br />
# iptables -P INPUT ACCEPT<br />
# iptables -P OUTPUT ACCEPT<br />
# iptables -F INPUT<br />
# iptables -F OUTPUT<br />
<br />
=== Have you allowed SSH in hosts.allow? ===<br />
<br />
Double check you have done [[#Allowing_others_in|this section]] correctly.<br />
<br />
=== Is the traffic even getting to your computer? ===<br />
<br />
Start a traffic dump on the computer you're having problems with:<br />
<br />
# tcpdump -lnn -i any port ssh and tcp-syn<br />
<br />
This should show some basic information, then wait for any matching traffic to happen before displaying it. Try your connection now. If you don't see any output when you attempt to connect, then something outside of your computer is blocking the traffic (eg, hardware firewall, NAT router etc)<br />
<br />
=== Read from socket failed: Connection reset by peer ===<br />
<br />
Recent versions of openssh sometimes fail with the above error message, due to a bug involving elliptic curve cryptography. In that case, edit the file<br />
<br />
~/.ssh/config<br />
<br />
or create it, if it doesn't already exist. Add the line<br />
<br />
HostKeyAlgorithms ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss<br />
<br />
= See Also =<br />
*[[Using SSH Keys]]<br />
*[[Pam_abl]]<br />
*[[DenyHosts]]<br />
*[[Sshfs]]<br />
<br />
= Links & References =<br />
*[http://www.soloport.com/iptables.html A Cure for the Common SSH Login Attack]<br />
*<s>[http://webssh.cz.cc Using your browser as SSH client]</s> Offline 06/20/11.<br />
*[http://www.la-samhna.de/library/brutessh.html Defending against brute force ssh attacks]</div>MadCatMk2https://wiki.archlinux.org/index.php?title=Activating_numlock_on_bootup&diff=146488Activating numlock on bootup2011-06-17T10:38:38Z<p>MadCatMk2: /* TTY (Teletype) Consoles 1-6 */</p>
<hr />
<div>[[Category:Boot process (English)]]<br />
[[Category:Desktop environments (English)]]<br />
[[Category:Other desktop user's resources (English)]]<br />
{{i18n|Activating Numlock on Bootup}}<br />
<br />
== TTY (Teletype) Consoles 1-6 ==<br />
<br />
To activate the numlock during normal bootup in TTY consoles 1-6 (tty1 -> tty6), add the following line to <code>/etc/rc.local</code>:<br />
for tty in /dev/tty?; do /usr/bin/setleds -D +num < "$tty"; done<br />
<br />
note: Virtual Consoles vc/1 -> vc/6 were superseded by tty1 -> tty6 on the 2009-08-02.<br />
<br />
If strange things start to happen (the NumLock LED is on, but the num pad still works as arrow keypad), there seems to be a conflict between <code>setleds</code> and Xserver.<br />
Limit the <code>for</code> command only to the consoles you have set on /etc/inittab. For example, for the first 6 consoles (default) : <code>for tty in /dev/tty{1..6}; do</code> ...<br />
<br />
== X.org ==<br />
If you use startx to start your X session, simply install the numlockx package and add it to your <code>~/.xinitrc</code> file.<br />
<br />
Install <code>numlockx</code>:<br />
# pacman -S numlockx<br />
<br />
Add it to <code>~/.xinitrc</code> before <code>exec</code>:<br />
#!/bin/sh<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
<br />
numlockx &<br />
<br />
exec your_window_manager<br />
<br />
=== KDM ===<br />
If you use KDM as a login manager, add :<br />
numlockx on<br />
to your <code>/usr/share/config/kdm/Xsetup</code>, or to <code>/opt/kde/share/config/kdm/Xsetup</code> if you're using KDM3.<br />
<br />
Note that this file lives outside of Pacman's protected area, so it might be overwritten on update without warning or creating a <code>.pacnew</code> file. If it bothers you, add the following line to your <code>/etc/pacman.conf</code> file (omit the leading slash in the path):<br />
<br />
NoUpgrade = usr/share/config/kdm/Xsetup<br />
<br />
=== KDE4 Users ===<br />
<br />
Go to System Settings, under the Hardware/Input Devices/Keyboard item you will find an option to select the behavior of numlock.<br />
<br />
<br />
====Alternate Method====<br />
You may alternatively add a script to your ~/.kde4/Autostart directory:<br />
$ nano ~/.kde4/Autostart/numlockx<br />
Add the following: <br />
#!/bin/sh<br />
numlockx on<br />
And make it executable:<br />
$ chmod +x ~/.kde4/Autostart/numlockx<br />
<br />
===GDM===<br />
First make sure that you have numlockx (from extra) installed. Then, GDM users may add the following code to /etc/gdm/Init/Default:<br />
if [ -x /usr/bin/numlockx ]; then<br />
/usr/bin/numlockx on<br />
fi<br />
<br />
===SLiM===<br />
In the file /etc/slim.conf find the line:<br />
#numlock on<br />
and remove the "#"</div>MadCatMk2https://wiki.archlinux.org/index.php?title=Music_Player_Daemon&diff=144490Music Player Daemon2011-06-09T08:49:08Z<p>MadCatMk2: /* mpdscribble */</p>
<hr />
<div>[[fr:MPD]]<br />
[[Category:Audio/Video (English)]]<br />
[[Category:Daemons and system services (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|Music Player Daemon}}<br />
[[pl:Music Player Daemon]]<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://www.musicpd.org/ website].<br />
<br />
''Please'' have a look at the official page for setup and troubleshooting instructions, the main developer called our wiki page in its current state ''"full of symptom killers"'', hence the official pages should contain better instructions.<br />
<br />
==Installing mpd==<br />
Install with [[pacman]]:<br />
# pacman -S mpd<br />
<br />
==Daemon Setup: Starting at Boot==<br />
General information about MPD configuration may be found at http://mpd.wikia.com/wiki/Configuration.<br />
<br />
===Sound setup===<br />
To make audio output actually work ensure that you have setup audio card and mixer correctly. See [[ALSA]], and [[PulseAudio]] if you are using Gnome 3. Do not forget to unmute the required channels in alsamixer, raise the volume and save changes with alsactl store. Run mpd with {{Filename|/usr/bin/mpd --stdout --no-daemon --verbose}} if that still doesn't work.<br />
<br />
Make sure your card can do hardware mixing (most of them can, including onboard audio). Or else this could cause problems with multiple sound playback. For example, this can prevent Mplayer from playing back sound while the mpd daemon is running, returning an audio error message stating the device is busy.<br />
<br />
===Timeline of MPD's behavior on a typical working setup when started as a daemon===<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|/etc/rc.d/mpd start}} 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 />
===A clean configuration file===<br />
* As root, check if {{Filename|/etc/mpd.conf}} exists and delete the file if it does. This is safe.<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 />
# cp /usr/share/mpd/mpd.conf.example /etc/mpd.conf<br />
({{Filename|/usr/share/mpd/mpd.conf.example}} is good for userspace setup)<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#Alternative_Setup:_Starting_as_a_User]]). This is important to prevent conflicts. The presence of the configuration file in {{Filename|/etc}}, like is the case here, is what will enable MPD to run as a daemon at boot. Otherwise, a script would be needed to run MPD ''after'' the user has logged (like kdm or {{Filename|~/.fluxbox/startup}}) or it would require a manual move each time. For a single music collection, the method used here is simply better, even while the collection is shared to multiple users. Also, don't be afraid about root privileges: even while MPD runs as a daemon, it never completely runs as root since it automatically drops its root privileges after execution.<br />
<br />
===Edit {{Filename|mpd.conf}}===<br />
<br />
The default arch install keeps the setup in /var and uses "mpd" as default user, instead of cluttering up ~/.<br />
Edit {{Filename|/etc/mpd.conf}} to reflect as such.<br />
<br />
{{File|name=/etc/mpd.conf|content=<br />
music_directory "/home/user/music" # Your music dir.<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 /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 />
* Lastly, if you are running pulseaudio under Gnome 3, the default setting of "alsa" for the audio output will not work. Make the modification from:<br />
{{File|name=/etc/mpd.conf|content=<br />
audio_output {<br />
type "alsa"<br />
name "Sound Card"<br />
}<br />
}}<br />
<br />
to<br />
<br />
{{File|name=/etc/mpd.conf|content=<br />
audio_output {<br />
type "pulseaudio"<br />
name "Sound Card"<br />
}<br />
}}<br />
<br />
<br />
===Create files===<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} && touch /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 />
<br />
Creating the database is now accomplished via the update feature of the client, for example 'mpc update'. The previous method, creating the MPD database as root (# mpd --create-db), is deprecated.<br />
<br />
==Alternative Setup: Starting as a User==<br />
MPD need not be started with root permissions. The only reason why MPD needs to be started as root (by being called from {{Filename|/etc/rc.conf}}) is because the default files and folders in the default configuration file points to directories owned by root (the /var directory). A less common, but perhaps more sensible, approach is to make MPD work with files and directories owned by a normal user. Running MPD as a normal user has several advantages: <br />
# You can easily have a single directory ~/.mpd (or any other directory under /home/username) for all MPD configuration files<br />
# No read/write permission errors<br />
# More flexible calls to MPD by using {{Filename|~/.xinitrc}} instead of including 'mpd' in the {{Filename|/etc/rc.conf}} DAEMONS array.<br />
<br />
The following steps shows how to run MPD as a normal user. '''Note''': this approach will not work if you want multiple users to have access to MPD.<br />
<br />
* Copy the contents of the default MPD configuration file in {{Filename|/usr/share/mpd/mpd.conf.example}} to your home directory. A good place would be {{Filename|"/home/user/.mpd/mpd.conf"}}.<br />
* Follow the 'old setup instructions' from above, ignoring the first part about copying the config to {{Filename|/etc/mpd.conf}} and do not set a user variable. <br />
* Create all of the requisite files in {{filename|"/home/user/.mpd/"}}:<br />
"~/.mpd/playlists/"<br />
"~/.mpd/db"<br />
"~/.mpd/mpd.db"<br />
"~/.mpd/mpd.log"<br />
"~/.mpd/mpd.error"<br />
"~/.mpd/mpd.pid"<br />
"~/.mpd/mpdstate"<br />
<br />
* Let MPD start on bootup by calling it from your {{Filename|~/.xinitrc}} as follows:<br />
# this starts mpd as normal user<br />
mpd ~/.mpd/mpd.conf<br />
{{Note| that you don't have to put a "&" at the end of the line here, since MPD will automatically daemonize itself.}}<br />
<br />
Lastly, delete the entry 'mpd' from your DAEMONS array in {{Filename|/etc/rc.conf}}, as you are not running it as root anymore.<br />
<br />
===Quick setup===<br />
<br />
The fastest way to do set up the structure is to do this:<br />
<br />
$ mkdir -p ~/.mpd/playlists && touch ~/.mpd/database && cp /usr/share/doc/mpd/mpdconf.example ~/.mpd/mpd.conf<br />
<br />
Then edit mpd.conf to your liking, in a manner similar to [[Music_Player_Daemon#Edit_mpd.conf]]. Beware that you must uncomment the db_file entry if you do edit mpd.conf.<br />
<br />
Then, to run it:<br />
<br />
$ mpd ~/.mpd/mpd.conf<br />
<br />
===Multi-mpd setup===<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 don't 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 />
Install a client program for MPD. Popular options are:<br />
<br />
===Console===<br />
* '''mpc''' &ndash; Command Line Client (you'll probably want this one no matter what)<br />
# pacman -S mpc<br />
* [http://hem.bredband.net/kaw/ncmpc/ ncmpc] &ndash; NCurses Client (this one is very handy for running in a console)<br />
# pacman -S ncmpc<br />
* [http://unkart.ovh.org/ncmpcpp/ ncmpcpp] &ndash; Clone of ncmpc with some new features written in C++<br />
# pacman -S ncmpcpp<br />
* [http://pms.sourceforge.net/ pms] &ndash; NCurses Client (highly configurable and accessible)<br />
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 Rhythmbox like library browser<br />
# pacman -S ario<br />
* [http://gmpcwiki.sarine.nl/index.php?title=GMPC gmpc] &ndash; GNOME Client<br />
# pacman -S gmpc<br />
* [http://bitcheese.net/wiki/QMPDClient QMPDClient] &ndash; Client written with Qt 4.x.<br />
# pacman -S qmpdclient<br />
* [http://sonata.berlios.de/ sonata] &ndash; Python GTK+ Client<br />
# 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<br />
Install [http://aur.archlinux.org/packages.php?ID=33380 dmpc] from the [[AUR]].<br />
<br />
See a long list of clients at the [http://mpd.wikia.com/wiki/Clients mpd wiki].<br />
<br />
==Extra stuff==<br />
===Last.fm scrobbling===<br />
To scrobble your songs to [http://www.last.fm Last.fm] using MPD there are several alternatives.<br />
<br />
====mpdscribble====<br />
mpdscribble is another 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 don't need root access to configure it, because it doesn't need any changes to <tt>/etc</tt> 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 />
* {{Codeline|$ mkdir ~/.mpdscribble}}<br />
* Create the file {{Filename|~/.mpdscribble/mpdscribble.conf}} and add the following:<br />
<pre><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 don't use last.fm<br />
url = http://post.audioscrobbler.com/<br />
username = <your last.fm username><br />
password = <your last.fm password> # md5sum also possible: echo -n 'PASSWORD' | md5sum | cut -f 1 -d " "<br />
journal = /home/<YOUR_USERNAME>/.mpdscribble/lastfm.journal<br />
<br />
[libre.fm]<br />
# libre.fm section, comment if you don't use libre.fm<br />
url = http://turtle.libre.fm/<br />
username = <your libre.fm username><br />
password = <your libre.fm password> # md5sum also possible: echo -n 'PASSWORD' | md5sum | cut -f 1 -d " "<br />
journal = /home/<YOUR_USERNAME>/.mpdscribble/librefm.journal<br />
</pre><br />
* Add {{Codeline|mpdscribble}} to your {{Filename|~/.xinitrc}}:<br />
pidof mpdscribble >& /dev/null<br />
if [ $? -ne 0 ]; then<br />
mpdscribble &<br />
fi<br />
<br />
====Sonata & Ario====<br />
The easiest way, if you don't care about having to have a program window open all the time, is using Sonata or Ario which are graphical frontends to MPD. They have built-in support for Last.fm scrobbling in their preferences. A downside of this is that Sonata doesn't cache your songs if for some reason you don't happen to have an Internet connection at the time of playing.<br />
<br />
====lastfmsubmitd====<br />
lastfmsubmitd is a daemon which is available in the "community" repository. To install it, first edit {{Filename|/etc/lastfmsubmitd.conf}} and add both {{Codeline|lastfmsubmitd}} and {{Codeline|lastmp}} to the {{Codeline|DAEMONS}} array in {{Filename|/etc/rc.conf}}.<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 would be wise to copy {{Filename|/usr/share/lastfmproxy}} to your home directory.}}<br />
<br />
Start lastfmproxy with {{Codeline|lastfmproxy}} and visit http://localhost:1881/ in your web browser. To add a last.fm station navigate to http://localhost:1881/ followed by the lastfm:// url. Example: http://localhost:1881/lastfm://globaltags/punk . Navigate back to 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 />
<br />
This feature has recently been added to mpd git by Martin Kellerman, see commits b57330cf75bcb339e3f268f1019c63e40d305145 and 2fb40fe728ac07574808c40034fc0f3d2254d49d.<br />
<br />
====[https://aur.archlinux.org/packages.php?ID=19676 mpd-git] Method====<br />
This is the best method currently available, but is only currently (April 2011) enabled in the git version. Install [https://aur.archlinux.org/packages.php?ID=19676 mpd-git] from the [[AUR]], then 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 don't 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 />
'' ...''<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 />
<br />
Another simpler method, would be to add mpd to your {{Filename|[[rc.conf]]}} deamons 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 />
<br />
The general idea between this method is to ask mdp to pause music when user logs out so that during next restart, mdp will stick to that "pause" state. Sending such command can be achieve using [http://www.archlinux.org/packages/extra/x86_64/mpc/ mpc], the command line interface to MPD:<br />
pacman -S mpc<br />
<br />
GDM users can then add the next line to /etc/gdm/PostSession/Default (be sure to add it before "exit 0"):<br />
/usr/bin/mpc pause<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 you use other audio output, e.g: some web pages containing Flash applets, MPD cannot reproduce anything anymore (until you restart). The error looks something like: (if you search the file {{Filename|/var/log/mpd/mpd.error}})<br />
<br />
Error opening alsa device "hw:0,0": Device or resource busy<br />
<br />
And here is the solution (dmix saving our life again). Apply these lines in your {{Filename|/etc/mpd.conf}}:<br />
<br />
<pre><br />
audio_output {<br />
type "alsa"<br />
name "Sound Card"<br />
options "dev=dmixer"<br />
device "plug:dmix"<br />
}<br />
</pre><br />
<br />
And then restart with {{Codeline|/etc/rc.d/mpd restart}}.<br />
<br />
Searching on Internet I found the reason for why that happens in Gentoo's wiki:<br />
* The sound card does not support hardware mixing (uses '''dmix''' plugin)<br />
* An application does not work with ALSA with it'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. There you can find an example asound.conf which worked for me right out of the box.<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 />
Example from {{Filename|mpd.conf}}:<br />
<br />
audio_output {<br />
type "alsa"<br />
name "My ALSA Device"<br />
auto_resample "no"<br />
}<br />
<br />
Although it may not give as drastic a speedup, enabling mmap may speed things up:<br />
<br />
audio_output {<br />
type "alsa"<br />
name "My ALSA Device"<br />
use_mmap "yes"<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 from: [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 />
<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 />
<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 />
<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 />
==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. Remember to add mpd to the {{Filename|/etc/hosts.allow}} file to enable external access.<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 deamon 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 />
Your first resort should be adding the following to /etc/hosts.allow.<br />
<br />
{{File|name=/etc/hosts.allow|content=mod: ALL}}<br />
<br />
====Second 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 />
====Third 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 />
<br />
====Forth fix====<br />
{{Note|This fix only applies to users of manually compiled mpd or the AUR package mpd-git}}<br />
The final possible solution is simply compiling mpd without libwrap support. Install mpd-git as usual, but edit the PKGBUILD and search for <br />
<pre><br />
--with-zeroconf=no <br />
</pre><br />
<br />
and replace it with <br />
<pre><br />
--with-zeroconf=no \<br />
--disable-libwrap<br />
</pre><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 />
su -c "/etc/rc.d/mpd start"<br />
or<br />
sudo /etc/rc.d/mpd start<br />
<br />
==External links==<br />
* [http://www.musicpd.org/ Official Web Site]<br />
* [http://mpd.wikia.com/wiki/Main_Page Official Wiki]<br />
* [http://mpd.wikia.com/wiki/Clients Sorted List of MPD Clients]<br />
* [http://www.musicpd.org/forum/ MPD forum]</div>MadCatMk2https://wiki.archlinux.org/index.php?title=PCManFM&diff=144488PCManFM2011-06-09T08:40:15Z<p>MadCatMk2: /* No "Previous/Next Folder" functionality with mouse buttons */</p>
<hr />
<div>[[Category: Utilities (English)]]<br />
[[Category: File systems (English)]]<br />
[[Category: File managers (English)]]<br />
{{i18n|PCManFM}}<br />
[[pl:PCManFM]]<br />
[[fr:PCManFM]]<br />
<br />
'''PCManFM''' is "an extremly fast, lightweight, yet feature-rich file manager with tabbed browsing". Source: [http://pcmanfm.sourceforge.net/ PCManFM on sourceforge]. PCManFM is the default file manager of the [[LXDE]] (Lightweight X11 Desktop Environment).<br />
<br />
==Installation==<br />
Run the following command to install:<br />
# pacman -S pcmanfm<br />
<br />
You will also require gamin (a replacement for fam, which required a daemon) to pick up events such as file and directories changes:<br />
<br />
# pacman -S gamin<br />
<br />
<br />
==Volume handling==<br />
PCManFM is able to mount and unmount devices, both manually and automatically. This feature is offered as an alternative to CLI tools such as [[pmount]]. There are various 'up-to-date' versions of PCManFM (see below), and different volume handling strategies can be chosen.<br />
<br />
===Mounting with udisks===<br />
The current release of PCManFM is able to handle volumes through udisks. If you want to use this feature, make sure the D-Bus daemon is installed and running. See the [[D-Bus]] page for details. Note that you will most likely need to start dbus-launch from your .xinitrc or the autostart script of your window manager. Instructions how to do so can be found on the [[D-Bus]] page or the page for your window manager.<br />
<br />
===Mounting with gvfs===<br />
If you prefer to use the Gnome Virtual FileSystem, the procedure is the same as before but requires additional packages:<br />
<br />
* [[gvfs]] (and dependencies);<br />
* (optional) gvfs-smb, gvfs-obexftp, gvfs-afc, etc. in order to support additional features.<br />
<br />
Note : You must have a /media folder.<br />
<br />
===Mounting as normal user===<br />
To be able to mount devices like removeable USB harddisks, flashdrives or DVDs as a normal user, the PolicyKit toolkit needs to be configured accordingly. The configuration files can be found in the subdirectories of {{Filename|/etc/polkit-1}}. The rest of this section will show you how to configure PolicyKit to allow users belonging to the "storage" group to mount and umount temporary devices.<br />
{{ Note | Many users experience trouble mounting with lightweight windows manager and [[SLiM]], adding '''''ck-launch-session dbus-launch''''' after exec in login_cmd option usually help}}<br />
{{Note | Currently PolicyKit is configured to allow (un)mounting for users in group ''storage'' by default. Therefore this step is not necessary}}<br />
First off, start a terminal and make yourself root:<br />
su<br />
Then switch to the right directory:<br />
cd /etc/polkit-1/localauthority/50-local.d<br />
Fire up your favourite text editor and create a file:<br />
nano 55-myconf.pkla<br />
Note that you can name the file anything you want, as long as the name ends with .pkla. Type in or copy/paste the following lines:<br />
[Storage Permissions]<br />
Identity=unix-group:storage<br />
Action=org.freedesktop.udisks.filesystem-mount;org.freedesktop.udisks.drive-eject;org.freedesktop.udisks.drive-detach;org.freedesktop.udisks.luks-unlock;org.freedesktop.udisks.inhibit-polling;org.freedesktop.udisks.drive-set-spindown<br />
ResultAny=yes<br />
ResultActive=yes<br />
ResultInactive=no<br />
Do not forget to save the file. PolicyKit will notice the changes in the file and update its behaviour without any action from you. Last thing to do is making every user that should have the ability to mount drives a member of the storage group:<br />
usermod -a -G storage USERNAME<br />
Get back to your existence as a humble user and enjoy your ability to mount your USB Drives:<br />
exit<br />
<br />
If you want to grant other permissions instead of granting them to members of the storage group, or simply want to know what you were just doing, check out the manpage:<br />
man pklocalauthority<br />
<br />
==Tips & troubleshooting==<br />
===No "Applications"===<br />
# pacman -S gnome-menus<br />
<br />
===Trashcan not working?===<br />
# pacman -S gvfs consolekit<br />
Make sure that you also add "ck-lauch-session dbus-launch"(in this order) to .xinitrc. gvfs requires many gnome dependencies.<br />
<br />
===Not able to mount USB or other devices?===<br />
# pacman -S consolekit<br />
Make sure that you also add "ck-launch-session dbus-launch"(in this order) to .xinitrc.<br />
<br />
===No icons?===<br />
If you are using a window manager over a desktop environment and notice you have no icons for folders and files, install an icon theme:<br />
# pacman -S tango-icon-theme<br />
<br />
Then edit {{Filename|~/.gtkrc-2.0}} '''or''' {{Filename|/etc/gtk-2.0/gtkrc}} and add the following line:<br />
gtk-icon-theme-name = "Tango"<br />
<br />
===NTFS Read/Write Support===<br />
Install ntfs-3g:<br />
# pacman -S ntfs-3g<br />
<br />
===gnome-open opens "Find" dialog instead of the directory===<br />
Remove or rename the file {{Filename|/usr/share/applications/pcmanfm-find.desktop}}. If you're running pcmanfm-mod from AUR, remove or rename the file {{Filename|/usr/share/applications/pcmanfm-mod-find.desktop}}.<br />
<br />
===No "Previous/Next Folder" functionality with mouse buttons===<br />
A method to fix this is with [[Xbindkeys]]:<br />
<br />
Install xbindkeys:<br />
# pacman -S xbindkeys<br />
Edit ~/.xbindkeysrc to contain the following:<br />
# Sample .xbindkeysrc for a G9x mouse.<br />
"/usr/bin/xvkbd -text '\[Alt_L]\[Left]'"<br />
b:8<br />
"/usr/bin/xvkbd -text '\[Alt_L]\[Right]'"<br />
b:9<br />
Actual button codes can be obtained with xev[http://www.archlinux.org/packages/extra/i686/xorg-xev/].<br />
<br />
Add<br />
xbindkeys &<br />
to your ~/.xinitrc to execute xbindkeys on log-in.<br />
<br />
==Available Versions==<br />
There are several versions of PCManFM currently available:<br />
<br />
===PCManFM2===<br />
This is the package in Arch's extra repository as "pcmanfm". The current git test version of it is available in the AUR as [http://aur.archlinux.org/packages.php?ID=33601 pcmanfm-git]. More information is available on the [http://forum.lxde.org/viewforum.php?f=22 LXDE Forum].<br />
<br />
===PCManFM 0.5.2===<br />
The legacy PCManFM (version 0.5.2, which is currently "pcmanfm-gtk220" in the AUR repository) is frozen and is no longer being maintained by the original author. This version uses HAL for mounting. More information is available on the [http://pcmanfm.sourceforge.net/intro.html project page].<br />
<br />
===PCManFM-Mod===<br />
PCManFM-Mod adds user-definable commands, other features, and bugfixes to the legacy version of the PCManFM file manager v0.5.2. This version builds and installs as "pcmanfm-mod" and will run independently of other versions of PCManFM you have installed on your system. This legacy version is still desired by some due to more stability than the newer 0.9.x rewrite in progress, less Gnome dependencies, and the use of HAL rather than gnome-vfs. PCManFM-Mod is available in the [http://aur.archlinux.org/packages.php?ID=34819 AUR as pcmanfm-mod] and as [http://aur.archlinux.org/packages.php?ID=39547 pcmanfm-mod-prov] (latter provides pcmanfm). More information is available at [http://igurublog.wordpress.com/downloads/mod-pcmanfm/ IgnorantGuru's Blog].</div>MadCatMk2https://wiki.archlinux.org/index.php?title=PCManFM&diff=144487PCManFM2011-06-09T08:39:47Z<p>MadCatMk2: /* Tips & troubleshooting */</p>
<hr />
<div>[[Category: Utilities (English)]]<br />
[[Category: File systems (English)]]<br />
[[Category: File managers (English)]]<br />
{{i18n|PCManFM}}<br />
[[pl:PCManFM]]<br />
[[fr:PCManFM]]<br />
<br />
'''PCManFM''' is "an extremly fast, lightweight, yet feature-rich file manager with tabbed browsing". Source: [http://pcmanfm.sourceforge.net/ PCManFM on sourceforge]. PCManFM is the default file manager of the [[LXDE]] (Lightweight X11 Desktop Environment).<br />
<br />
==Installation==<br />
Run the following command to install:<br />
# pacman -S pcmanfm<br />
<br />
You will also require gamin (a replacement for fam, which required a daemon) to pick up events such as file and directories changes:<br />
<br />
# pacman -S gamin<br />
<br />
<br />
==Volume handling==<br />
PCManFM is able to mount and unmount devices, both manually and automatically. This feature is offered as an alternative to CLI tools such as [[pmount]]. There are various 'up-to-date' versions of PCManFM (see below), and different volume handling strategies can be chosen.<br />
<br />
===Mounting with udisks===<br />
The current release of PCManFM is able to handle volumes through udisks. If you want to use this feature, make sure the D-Bus daemon is installed and running. See the [[D-Bus]] page for details. Note that you will most likely need to start dbus-launch from your .xinitrc or the autostart script of your window manager. Instructions how to do so can be found on the [[D-Bus]] page or the page for your window manager.<br />
<br />
===Mounting with gvfs===<br />
If you prefer to use the Gnome Virtual FileSystem, the procedure is the same as before but requires additional packages:<br />
<br />
* [[gvfs]] (and dependencies);<br />
* (optional) gvfs-smb, gvfs-obexftp, gvfs-afc, etc. in order to support additional features.<br />
<br />
Note : You must have a /media folder.<br />
<br />
===Mounting as normal user===<br />
To be able to mount devices like removeable USB harddisks, flashdrives or DVDs as a normal user, the PolicyKit toolkit needs to be configured accordingly. The configuration files can be found in the subdirectories of {{Filename|/etc/polkit-1}}. The rest of this section will show you how to configure PolicyKit to allow users belonging to the "storage" group to mount and umount temporary devices.<br />
{{ Note | Many users experience trouble mounting with lightweight windows manager and [[SLiM]], adding '''''ck-launch-session dbus-launch''''' after exec in login_cmd option usually help}}<br />
{{Note | Currently PolicyKit is configured to allow (un)mounting for users in group ''storage'' by default. Therefore this step is not necessary}}<br />
First off, start a terminal and make yourself root:<br />
su<br />
Then switch to the right directory:<br />
cd /etc/polkit-1/localauthority/50-local.d<br />
Fire up your favourite text editor and create a file:<br />
nano 55-myconf.pkla<br />
Note that you can name the file anything you want, as long as the name ends with .pkla. Type in or copy/paste the following lines:<br />
[Storage Permissions]<br />
Identity=unix-group:storage<br />
Action=org.freedesktop.udisks.filesystem-mount;org.freedesktop.udisks.drive-eject;org.freedesktop.udisks.drive-detach;org.freedesktop.udisks.luks-unlock;org.freedesktop.udisks.inhibit-polling;org.freedesktop.udisks.drive-set-spindown<br />
ResultAny=yes<br />
ResultActive=yes<br />
ResultInactive=no<br />
Do not forget to save the file. PolicyKit will notice the changes in the file and update its behaviour without any action from you. Last thing to do is making every user that should have the ability to mount drives a member of the storage group:<br />
usermod -a -G storage USERNAME<br />
Get back to your existence as a humble user and enjoy your ability to mount your USB Drives:<br />
exit<br />
<br />
If you want to grant other permissions instead of granting them to members of the storage group, or simply want to know what you were just doing, check out the manpage:<br />
man pklocalauthority<br />
<br />
==Tips & troubleshooting==<br />
===No "Applications"===<br />
# pacman -S gnome-menus<br />
<br />
===Trashcan not working?===<br />
# pacman -S gvfs consolekit<br />
Make sure that you also add "ck-lauch-session dbus-launch"(in this order) to .xinitrc. gvfs requires many gnome dependencies.<br />
<br />
===Not able to mount USB or other devices?===<br />
# pacman -S consolekit<br />
Make sure that you also add "ck-launch-session dbus-launch"(in this order) to .xinitrc.<br />
<br />
===No icons?===<br />
If you are using a window manager over a desktop environment and notice you have no icons for folders and files, install an icon theme:<br />
# pacman -S tango-icon-theme<br />
<br />
Then edit {{Filename|~/.gtkrc-2.0}} '''or''' {{Filename|/etc/gtk-2.0/gtkrc}} and add the following line:<br />
gtk-icon-theme-name = "Tango"<br />
<br />
===NTFS Read/Write Support===<br />
Install ntfs-3g:<br />
# pacman -S ntfs-3g<br />
<br />
===gnome-open opens "Find" dialog instead of the directory===<br />
Remove or rename the file {{Filename|/usr/share/applications/pcmanfm-find.desktop}}. If you're running pcmanfm-mod from AUR, remove or rename the file {{Filename|/usr/share/applications/pcmanfm-mod-find.desktop}}.<br />
<br />
===No "Previous/Next Folder" functionality with mouse buttons===<br />
A method to fix this is with [[Xbindkeys]]:<br />
<br />
Install xbindkeys:<br />
# pacman -S xbindkeys<br />
Edit ~/.xbindkeysrc to contain the following:<br />
# Sample .xbindkeysrc for a G9x mouse.<br />
"/usr/bin/xvkbd -text '\[Alt_L]\[Left]'"<br />
b:8<br />
"/usr/bin/xvkbd -text '\[Alt_L]\[Right]'"<br />
b:9<br />
Actual button codes can be obtained with 'xev'[http://www.archlinux.org/packages/extra/i686/xorg-xev/].<br />
<br />
Add<br />
xbindkeys &<br />
to your ~/.xinitrc to execute xbindkeys on log-in.<br />
<br />
==Available Versions==<br />
There are several versions of PCManFM currently available:<br />
<br />
===PCManFM2===<br />
This is the package in Arch's extra repository as "pcmanfm". The current git test version of it is available in the AUR as [http://aur.archlinux.org/packages.php?ID=33601 pcmanfm-git]. More information is available on the [http://forum.lxde.org/viewforum.php?f=22 LXDE Forum].<br />
<br />
===PCManFM 0.5.2===<br />
The legacy PCManFM (version 0.5.2, which is currently "pcmanfm-gtk220" in the AUR repository) is frozen and is no longer being maintained by the original author. This version uses HAL for mounting. More information is available on the [http://pcmanfm.sourceforge.net/intro.html project page].<br />
<br />
===PCManFM-Mod===<br />
PCManFM-Mod adds user-definable commands, other features, and bugfixes to the legacy version of the PCManFM file manager v0.5.2. This version builds and installs as "pcmanfm-mod" and will run independently of other versions of PCManFM you have installed on your system. This legacy version is still desired by some due to more stability than the newer 0.9.x rewrite in progress, less Gnome dependencies, and the use of HAL rather than gnome-vfs. PCManFM-Mod is available in the [http://aur.archlinux.org/packages.php?ID=34819 AUR as pcmanfm-mod] and as [http://aur.archlinux.org/packages.php?ID=39547 pcmanfm-mod-prov] (latter provides pcmanfm). More information is available at [http://igurublog.wordpress.com/downloads/mod-pcmanfm/ IgnorantGuru's Blog].</div>MadCatMk2https://wiki.archlinux.org/index.php?title=Deluge&diff=144395Deluge2011-06-08T09:09:13Z<p>MadCatMk2: /* Automatically Connect To Daemon */</p>
<hr />
<div>{{i18n|Deluge}}<br />
[[Category:HOWTOs (English)]]<br />
[[Category:Internet Applications (English)]]<br />
<br />
[[de:Deluge Installation]]<br />
<br />
This article will show you how to set up Deluge also for daemon-based torrenting.<br />
<br />
==Base Install==<br />
Deluge is available in the official repositories:<br />
# pacman -S deluge<br />
<br />
==Graphical Clients==<br />
===Web ui===<br />
The Web-ui runs on the server and the clients only need a Web-Browser.<br />
You need to install '''python-mako''' on the server:<br />
# pacman -S python-mako<br />
<br />
===Gtk ui===<br />
The Gtk ui needs to have '''pygtk''' and '''librsvg''' installed on the clients:<br />
# pacman -S pygtk librsvg<br />
<br />
==Configuration==<br />
If You want to run Deluge as user just run:<br />
# deluge -u [gtk|web|console]<br />
<br />
===daemon===<br />
The default user for deluged, the Deluge daemon, is "deluge". You can change this in {{filename|/etc/conf.d/deluged}}. Of course, the user needs to exist. In the case of the default "deluge" user, no manual user creation is necessary as the package script has done that for you.<br />
<br />
The rest of this guide will assume you use the default "deluge" user. This user's default home dir and therefore its configuration location is in ''/srv/deluge''. This should be fine under most circumstances. Note that this is NOT the default download location, it only holds its configuration and ssl certificates. You will be able to change all other options later on once you get a client working.<br />
<br />
Next, start the daemon to generate its default configuration in its homedir:<br />
# /etc/rc.d/deluged start<br />
<br />
And add it to Your {{filename|/etc/rc.conf}}, so it gets convieniently autostarted:<br />
DAEMONS=( ... network '''deluged''' ... )<br />
<br />
===Gtk ui===<br />
Stop the Deluge daemon:<br />
# /etc/rc.d/deluged stop<br />
<br />
If You want to connect remotely via the Gtk ui, there should be something like this in {{filename|/srv/deluge/.config/deluge/core.conf}}:<br />
"allow_remote": true,<br />
<br />
Now add yourself to the authentification file:<br />
# echo "yourusername:yourpassword:10" >> /srv/deluge/.config/deluge/auth<br />
<br />
'''10''', the authentification level is not used at this time. Read [http://dev.deluge-torrent.org/wiki/UserGuide/Authentication more] about that.<br />
<br />
Start the Deluge daemon again.<br />
<br />
Now start the Gtk ui. If You prefer, You can edit the preferences in {{filename|~/.config/deluge/gtkui.conf}}, but there's also a nice configuration tool in the ui.<br />
<br />
Look for '''classic mode''' and disable it. Have You seen an icon just pop up? Hit it! If not go to Edit -> Connection Manager and add Your daemon.<br />
<br />
===Web ui===<br />
First, start the web ui daemon:<br />
# /etc/rc.d/deluge-web start<br />
<br />
and login in on ''http://deluge-machine:8112''. Where 'deluge-machine' is name of your deluge server or its private or public IP address. When asked for a password, enter "deluge" as it's the default password.<br />
<br />
The preferences in the web ui should be rather self explanatory and the first obvious thing to do is to change your password.<br />
<br />
As usual, you should add the daemons to your {{filename|/etc/rc.conf}}:<br />
DAEMONS=( ... network deluged '''deluge-web''' ... )<br />
<br />
Just make sure your network connection is up at the time you start either of those Deluge daemons.<br />
<br />
{{Note|In the current version of Deluge (1.3.1) the WebUI will not work in Google Chrome unless system time is configured properly. The WebUI will load, but upon entry of the password prompt, it will return as if nothing had been entered. This is Chrome thinking the session has expired. The quick and easy way of solving this issue is to install the [[Network Time Protocol daemon|ntp]] package and add ''ntpd'' to your DAEMONS in {{filename|/etc/rc.conf}}.}}<br />
<br />
==Automatically Connect To Daemon==<br />
If you want to avoid clicking "connect" everytime you start the deluge web-ui, edit the web.conf file in your configuration directory (usually /srv/deluge/.config/deluge). <br />
It should have a line like this towards the bottom:<br />
'''<br />
"default_daemon": "" <br />
<br />
Change it to:<br />
'''<br />
"default_daemon": "127.0.0.1:58846" <br />
<br />
This assumes that your deluge port is the default 58846. (default)<br />
<br />
<br />
====SSL====<br />
In case you want SSL for the web ui, you need to generate a new cert/key set. To do this, first stop the web ui:<br />
<br />
# /etc/rc.d/deluge-web stop<br />
<br />
then go to ''/srv/deluge/.config/deluge/ssl/'' and issue:<br />
<br />
# openssl req -new -x509 -nodes -out deluge.cert.pem -keyout deluge.key.pem<br />
<br />
Next you need to edit {{filename|/srv/deluge/.config/deluge/web.conf}} and change the '''pkey''' and '''cert''' configuration directives to use your new self-signed certificates and also enable SSL:<br />
...<br />
"pkey": "ssl/deluge.key.pem",<br />
...<br />
"cert": "ssl/deluge.cert.pem",<br />
...<br />
"https": true,<br />
<br />
Afterwards just start the web ui again and you should be good to go:<br />
<br />
# /etc/rc.d/deluge-web start<br />
<br />
==Resources==<br />
[http://deluge-torrent.org/ Deluge Homepage]</div>MadCatMk2https://wiki.archlinux.org/index.php?title=Music_Player_Daemon&diff=143293Music Player Daemon2011-05-31T12:29:36Z<p>MadCatMk2: /* Alternative Setup: Starting as a User */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:Daemons and system services (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|Music Player Daemon}}<br />
[[pl:Music Player Daemon]]<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://www.musicpd.org/ website].<br />
<br />
''Please'' have a look at the official page for setup and troubleshooting instructions, the main developer called our wiki page in its current state ''"full of symptom killers"'', hence the official pages should contain better instructions.<br />
<br />
==Installing mpd==<br />
Install with [[pacman]]:<br />
# pacman -S mpd<br />
<br />
==Daemon Setup: Starting at Boot==<br />
General information about MPD configuration may be found at http://mpd.wikia.com/wiki/Configuration.<br />
<br />
===Sound setup===<br />
To make audio output actually work ensure that you have setup audio card and mixer correctly. See [[ALSA]], and [[PulseAudio]] if you are using Gnome 3. Do not forget to unmute the required channels in alsamixer, raise the volume and save changes with alsactl store. Run mpd with {{Filename|/usr/bin/mpd --stdout --no-daemon --verbose}} if that still doesn't work.<br />
<br />
Make sure your card can do hardware mixing (most of them can, including onboard audio). Or else this could cause problems with multiple sound playback. For example, this can prevent Mplayer from playing back sound while the mpd daemon is running, returning an audio error message stating the device is busy.<br />
<br />
===Timeline of MPD's behavior on a typical working setup when started as a daemon===<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|/etc/rc.d/mpd start}} 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 />
===A clean configuration file===<br />
* As root, check if {{Filename|/etc/mpd.conf}} exists and delete the file if it does. This is safe.<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 />
# cp /usr/share/mpd/mpd.conf.example /etc/mpd.conf<br />
({{Filename|/usr/share/mpd/mpd.conf.example}} is good for userspace setup)<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#Alternative_Setup:_Starting_as_a_User]]). This is important to prevent conflicts. The presence of the configuration file in {{Filename|/etc}}, like is the case here, is what will enable MPD to run as a daemon at boot. Otherwise, a script would be needed to run MPD ''after'' the user has logged (like kdm or {{Filename|~/.fluxbox/startup}}) or it would require a manual move each time. For a single music collection, the method used here is simply better, even while the collection is shared to multiple users. Also, don't be afraid about root privileges: even while MPD runs as a daemon, it never completely runs as root since it automatically drops its root privileges after execution.<br />
<br />
===Edit {{Filename|mpd.conf}}===<br />
<br />
The default arch install keeps the setup in /var and uses "mpd" as default user, instead of cluttering up ~/.<br />
Edit {{Filename|/etc/mpd.conf}} to reflect as such.<br />
<br />
{{File|name=/etc/mpd.conf|content=<br />
music_directory "/home/user/music" # Your music dir.<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 /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 />
* Lastly, if you are running pulseaudio under Gnome 3, the default setting of "alsa" for the audio output will not work. Make the modification from:<br />
{{File|name=/etc/mpd.conf|content=<br />
audio_output {<br />
type "alsa"<br />
name "Sound Card"<br />
}<br />
}}<br />
<br />
to<br />
<br />
{{File|name=/etc/mpd.conf|content=<br />
audio_output {<br />
type "pulseaudio"<br />
name "Sound Card"<br />
}<br />
}}<br />
<br />
<br />
===Create files===<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} && touch /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 />
<br />
Creating the database is now accomplished via the update feature of the client, for example 'mpc update'. The previous method, creating the MPD database as root (# mpd --create-db), is deprecated.<br />
<br />
==Alternative Setup: Starting as a User==<br />
MPD need not be started with root permissions. The only reason why MPD needs to be started as root (by being called from {{Filename|/etc/rc.conf}}) is because the default files and folders in the default configuration file points to directories owned by root (the /var directory). A less common, but perhaps more sensible, approach is to make MPD work with files and directories owned by a normal user. Running MPD as a normal user has several advantages: <br />
# You can easily have a single directory ~/.mpd (or any other directory under /home/username) for all MPD configuration files<br />
# No read/write permission errors<br />
# More flexible calls to MPD by using {{Filename|~/.xinitrc}} instead of including 'mpd' in the {{Filename|/etc/rc.conf}} DAEMONS array.<br />
<br />
The following steps shows how to run MPD as a normal user. '''Note''': this approach will not work if you want multiple users to have access to MPD.<br />
<br />
* Copy the contents of the default MPD configuration file in {{Filename|/usr/share/mpd/mpd.conf.example}} to your home directory. A good place would be {{Filename|"/home/user/.mpd/mpd.conf"}}.<br />
* Follow the 'old setup instructions' from above, ignoring the first part about copying the config to {{Filename|/etc/mpd.conf}} and do not set a user variable. <br />
* Create all of the requisite files in {{filename|"/home/user/.mpd/"}}:<br />
"~/.mpd/playlists/"<br />
"~/.mpd/db"<br />
"~/.mpd/mpd.db"<br />
"~/.mpd/mpd.log"<br />
"~/.mpd/mpd.error"<br />
"~/.mpd/mpd.pid"<br />
"~/.mpd/mpdstate"<br />
<br />
* Let MPD start on bootup by calling it from your {{Filename|~/.xinitrc}} as follows:<br />
# this starts mpd as normal user<br />
mpd ~/.mpd/mpd.conf<br />
{{Note| that you don't have to put a "&" at the end of the line here, since MPD will automatically daemonize itself.}}<br />
<br />
Lastly, delete the entry 'mpd' from your DAEMONS array in {{Filename|/etc/rc.conf}}, as you are not running it as root anymore.<br />
<br />
===Quick setup===<br />
<br />
The fastest way to do set up the structure is to do this:<br />
<br />
$ mkdir -p ~/.mpd/playlists && touch ~/.mpd/database && cp /usr/share/doc/mpd/mpdconf.example ~/.mpd/mpd.conf<br />
<br />
Then edit mpd.conf to your liking, in a manner similar to [[Music_Player_Daemon#Edit_mpd.conf]]. Beware that you must uncomment the db_file entry if you do edit mpd.conf.<br />
<br />
Then, to run it:<br />
<br />
$ mpd ~/.mpd/mpd.conf<br />
<br />
===Multi-mpd setup===<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 don't 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 />
Install a client program for MPD. Popular options are:<br />
<br />
===Console===<br />
* '''mpc''' &ndash; Command Line Client (you'll probably want this one no matter what)<br />
# pacman -S mpc<br />
* [http://hem.bredband.net/kaw/ncmpc/ ncmpc] &ndash; NCurses Client (this one is very handy for running in a console)<br />
# pacman -S ncmpc<br />
* [http://unkart.ovh.org/ncmpcpp/ ncmpcpp] &ndash; Clone of ncmpc with some new features written in C++<br />
# pacman -S ncmpcpp<br />
* [http://pms.sourceforge.net/ pms] &ndash; NCurses Client (highly configurable and accessible)<br />
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 Rhythmbox like library browser<br />
# pacman -S ario<br />
* [http://gmpcwiki.sarine.nl/index.php?title=GMPC gmpc] &ndash; GNOME Client<br />
# pacman -S gmpc<br />
* [http://bitcheese.net/wiki/QMPDClient QMPDClient] &ndash; Client written with Qt 4.x.<br />
# pacman -S qmpdclient<br />
* [http://sonata.berlios.de/ sonata] &ndash; Python GTK+ Client<br />
# 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<br />
Install [http://aur.archlinux.org/packages.php?ID=33380 dmpc] from the [[AUR]].<br />
<br />
See a long list of clients at the [http://mpd.wikia.com/wiki/Clients mpd wiki].<br />
<br />
==Extra stuff==<br />
===Last.fm scrobbling===<br />
To scrobble your songs to [http://www.last.fm Last.fm] using MPD there are several alternatives.<br />
<br />
====mpdscribble====<br />
mpdscribble is another 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 don't need root access to configure it, because it doesn't need any changes to <tt>/etc</tt> 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 />
* {{Codeline|$ mkdir ~/.mpdscribble}}<br />
* Create the file {{Filename|~/.mpdscribble/mpdscribble.conf}} and add the following:<br />
<pre><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 don't use last.fm<br />
url = http://post.audioscrobbler.com/<br />
username = <your last.fm username><br />
password = <your last.fm password> # md5sum also possible: echo -n PASSWORD | md5sum | cut -f 1 -d " "<br />
journal = /home/<YOUR_USERNAME>/.mpdscribble/lastfm.journal<br />
<br />
[libre.fm]<br />
# libre.fm section, comment if you don't use libre.fm<br />
url = http://turtle.libre.fm/<br />
username = <your libre.fm username><br />
password = <your libre.fm password> # md5sum also possible: echo -n PASSWORD | md5sum | cut -f 1 -d " "<br />
journal = /home/<YOUR_USERNAME>/.mpdscribble/librefm.journal<br />
</pre><br />
* Add {{Codeline|mpdscribble}} to your {{Filename|~/.xinitrc}}:<br />
pidof mpdscribble >& /dev/null<br />
if [ $? -ne 0 ]; then<br />
mpdscribble &<br />
fi<br />
<br />
====Sonata & Ario====<br />
The easiest way, if you don't care about having to have a program window open all the time, is using Sonata or Ario which are graphical frontends to MPD. They have built-in support for Last.fm scrobbling in their preferences. A downside of this is that Sonata doesn't cache your songs if for some reason you don't happen to have an Internet connection at the time of playing.<br />
<br />
====lastfmsubmitd====<br />
lastfmsubmitd is a daemon which is available in the "community" repository. To install it, first edit {{Filename|/etc/lastfmsubmitd.conf}} and add both {{Codeline|lastfmsubmitd}} and {{Codeline|lastmp}} to the {{Codeline|DAEMONS}} array in {{Filename|/etc/rc.conf}}.<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 would be wise to copy {{Filename|/usr/share/lastfmproxy}} to your home directory.}}<br />
<br />
Start lastfmproxy with {{Codeline|lastfmproxy}} and visit http://localhost:1881/ in your web browser. To add a last.fm station navigate to http://localhost:1881/ followed by the lastfm:// url. Example: http://localhost:1881/lastfm://globaltags/punk . Navigate back to 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 />
<br />
This feature has recently been added to mpd git by Martin Kellerman, see commits b57330cf75bcb339e3f268f1019c63e40d305145 and 2fb40fe728ac07574808c40034fc0f3d2254d49d.<br />
<br />
====[https://aur.archlinux.org/packages.php?ID=19676 mpd-git] Method====<br />
This is the best method currently available, but is only currently (April 2011) enabled in the git version. Install [https://aur.archlinux.org/packages.php?ID=19676 mpd-git] from the [[AUR]], then 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 don't 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 />
'' ...''<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 />
<br />
Another simpler method, would be to add mpd to your {{Filename|[[rc.conf]]}} deamons 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 />
<br />
The general idea between this method is to ask mdp to pause music when user logs out so that during next restart, mdp will stick to that "pause" state. Sending such command can be achieve using [http://www.archlinux.org/packages/extra/x86_64/mpc/ mpc], the command line interface to MPD:<br />
pacman -S mpc<br />
<br />
GDM users can then add the next line to /etc/gdm/PostSession/Default (be sure to add it before "exit 0"):<br />
/usr/bin/mpc pause<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 you use other audio output, e.g: some web pages containing Flash applets, MPD cannot reproduce anything anymore (until you restart). The error looks something like: (if you search the file {{Filename|/var/log/mpd/mpd.error}})<br />
<br />
Error opening alsa device "hw:0,0": Device or resource busy<br />
<br />
And here is the solution (dmix saving our life again). Apply these lines in your {{Filename|/etc/mpd.conf}}:<br />
<br />
<pre><br />
audio_output {<br />
type "alsa"<br />
name "Sound Card"<br />
options "dev=dmixer"<br />
device "plug:dmix"<br />
}<br />
</pre><br />
<br />
And then restart with {{Codeline|/etc/rc.d/mpd restart}}.<br />
<br />
Searching on Internet I found the reason for why that happens in Gentoo's wiki:<br />
* The sound card does not support hardware mixing (uses '''dmix''' plugin)<br />
* An application does not work with ALSA with it'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. There you can find an example asound.conf which worked for me right out of the box.<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 />
Example from {{Filename|mpd.conf}}:<br />
<br />
audio_output {<br />
type "alsa"<br />
name "My ALSA Device"<br />
auto_resample "no"<br />
}<br />
<br />
Although it may not give as drastic a speedup, enabling mmap may speed things up:<br />
<br />
audio_output {<br />
type "alsa"<br />
name "My ALSA Device"<br />
use_mmap "yes"<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 from: [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 />
<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 />
<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 />
<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 />
==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. Remember to add mpd to the {{Filename|/etc/hosts.allow}} file to enable external access.<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 deamon 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 />
Your first resort should be adding the following to /etc/hosts.allow.<br />
<br />
{{File|name=/etc/hosts.allow|content=mod: ALL}}<br />
<br />
====Second 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 />
====Third 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 />
<br />
====Forth fix====<br />
{{Note|This fix only applies to users of manually compiled mpd or the AUR package mpd-git}}<br />
The final possible solution is simply compiling mpd without libwrap support. Install mpd-git as usual, but edit the PKGBUILD and search for <br />
<pre><br />
--with-zeroconf=no <br />
</pre><br />
<br />
and replace it with <br />
<pre><br />
--with-zeroconf=no \<br />
--disable-libwrap<br />
</pre><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 />
su -c "/etc/rc.d/mpd start"<br />
or<br />
sudo /etc/rc.d/mpd start<br />
<br />
==External links==<br />
* [http://www.musicpd.org/ Official Web Site]<br />
* [http://mpd.wikia.com/wiki/Main_Page Official Wiki]<br />
* [http://mpd.wikia.com/wiki/Clients Sorted List of MPD Clients]<br />
* [http://www.musicpd.org/forum/ MPD forum]</div>MadCatMk2https://wiki.archlinux.org/index.php?title=Rsync&diff=142497Rsync2011-05-23T10:22:08Z<p>MadCatMk2: typo</p>
<hr />
<div>[[Category:Utilities (English)]]<br />
[[Category:System recovery (English)]]<br />
[[Category:HOWTOs (English)]]<br />
[http://samba.anu.edu.au/rsync/ rsync] is an open source utility that provides fast incremental file transfer.<br />
<br />
==Installation==<br />
Install the {{package Official|rsync}} package using [[pacman]]:<br />
# pacman -S rsync<br />
<br />
==Usage==<br />
For more examples, search the [http://bbs.archlinux.org/viewforum.php?id=27 Community Contributions] and [http://bbs.archlinux.org/viewforum.php?id=33 General Programming] forums.<br />
<br />
===As a cp alternative===<br />
rsync can be used as an advanced cp alternative, especially for copying larger files:<br />
$ rsync -P src dest<br />
<br />
The {{Codeline|-P}} option is the same as {{Codeline|--partial --progress}}, which keeps partially transferred files and shows a progress bar during transfer.<br />
<br />
You may want to use the {{Codeline|-r --recursive}} option to recurse into directories, or the {{Codeline|-R}} option for using relative path names (recreating entire folder hierarchy on the destination folder).<br />
<br />
===As a backup utility===<br />
The rsync protocol can easily be used for backups, only transferring files that have changed since the last backup. This section describes a very simple scheduled backup script using rsync, typically used for copying to removable media. For a more thorough example, see [[Full System Backup with rsync]].<br />
<br />
====Automated backup====<br />
For the sake of this example, the script is created in the {{Filename|/etc/cron.daily}} directory, and will be run on a daily basis if a cron [[daemon]] is installed and properly configured. Configuring and using [[cron]] is outside the scope of this article.<br />
<br />
First, create a script containing the appropriate command options:<br />
{{File|name=/etc/cron.daily/backup|content=<br />
#!/bin/bash<br />
rsync -a --delete /folder/to/backup /location/to/backup &> /dev/null}}<br />
<br />
; {{Codeline|-a}} : indicates that files should be archived, meaning that all of their attributes are preserved<br />
; {{Codeline|--delete}} : means files deleted on the source are to be deleted on the backup aswell<br />
<br />
Here, {{Filename|/folder/to/backup}} should to be changed to what needs to be backed-up ({{Filename|/home}}, for example) and {{Filename|/location/to/backup}} is where the backup should be saved ({{Filename|/media/disk}}, for instance).<br />
<br />
Finally, the script must be executable:<br />
# chmod +x /etc/cron.daily/rsync.backup<br />
<br />
====Automated backup with SSH====<br />
If backing-up to a remote host using [[SSH]], use this script instead:<br />
{{File|name=/etc/cron.daily/backup|content=<br />
#!/bin/bash<br />
rsync -a --delete -e ssh /folder/to/backup remoteuser@remotehost:/location/to/backup &> /dev/null}}<br />
<br />
; {{Codeline|-e ssh}} : tells rsync to use SSH<br />
; {{Codeline|remoteuser}} : is the user on the host {{Codeline|remotehost}}<br />
; {{Codeline|-a}} : groups all these options {{Codeline|-rlptgoD}} (recursive, links, perms, times, group, owner, devices)<br />
<br />
<br />
====Automated backup with NetworkManager====<br />
This script starts a backup when you plugin your wire.<br />
<br />
First, create a script containing the appropriate command options:<br />
{{File|name=/etc/NetworkManager/dispatcher.d/backup|content=<br />
#!/bin/bash<br />
<br />
if [ x"$2" = "xup" ] ; then<br />
rsync --force --ignore-errors -a --delete --bwlimit=2000 --files-from=files.rsync /folder/to/backup /location/to/backup<br />
fi}}<br />
<br />
; {{Codeline|-a}} : group all this options {{Codeline|-rlptgoD}} recursive, links, perms, times, group, owner, devices<br />
; {{Codeline|--files-from}} : read the relative path of ''/folder/to/backup'' from this file<br />
; {{Codeline|--bwlimit}} : limit I/O bandwidth; KBytes per second<br />
<br />
====Differential backup on a week====<br />
This is a useful option of rsync, creating a full backup and a differential backup for each day of a week.<br />
<br />
First, create a script containing the appropriate command options:<br />
{{File|name=/etc/cron.daily/backup|content=<br />
#!/bin/bash<br />
<br />
DAY=$(date +%A)<br />
<br />
if [ -e /location/to/backup/incr/$DAY ] ; then<br />
rm -fr /location/to/backup/incr/$DAY<br />
fi<br />
<br />
rsync -a --delete --inplace --backup --backup-dir=/location/to/backup/incr/$DAY /folder/to/backup/ /location/to/backup/full/ &> /dev/null}}<br />
<br />
; {{Codeline|--inplace}} : implies {{Codeline|--partial}} update destination files in-place<br />
<br />
====Snapshot backup====<br />
The same idea can be used to maintain a tree of snapshots of your files. In other words, a directory with date-ordered copies of the files. The copies are made using hardlinks, which means that only files that did change will occupy space. Generally speaking, this is the idea behind Apple's TimeMachine.<br />
<br />
This script implements a simple version of it:<br />
<br />
{{File|name=/usr/local/bin/rsnapshot.sh|content=<nowiki><br />
#!/bin/bash<br />
<br />
## my own rsync-based snapshot-style backup procedure<br />
## (cc) marcio rps AT gmail.com<br />
<br />
# config vars<br />
<br />
SRC="/home/username/files/" #dont forget trailing slash!<br />
SNAP="/snapshots/username"<br />
OPTS="-rltgoi --delay-updates --delete --chmod=a-w"<br />
MINCHANGES=20<br />
<br />
# run this process with real low priority<br />
<br />
ionice -c 3 -p $$<br />
renice +12 -p $$<br />
<br />
# sync<br />
<br />
rsync $OPTS $SRC $SNAP/latest >> $SNAP/rsync.log<br />
<br />
# check if enough has changed and if so<br />
# make a hardlinked copy named as the date<br />
<br />
COUNT=$( wc -l $SNAP/rsync.log|cut -d" " -f1 )<br />
if [ $COUNT -gt $MINCHANGES ] ; then<br />
DATETAG=$(date +%Y-%m-%d)<br />
if [ ! -e $SNAP/$DATETAG ] ; then<br />
cp -al $SNAP/latest $SNAP/$DATETAG<br />
mv $SNAP/rsync.log $SNAP/$DATETAG<br />
fi<br />
fi<br />
</nowiki>}}<br />
<br />
To make things really, really simple this script can be run out of /etc/rc.local (this is how i run it myself).</div>MadCatMk2https://wiki.archlinux.org/index.php?title=VirtualBox&diff=142020VirtualBox2011-05-19T13:56:34Z<p>MadCatMk2: </p>
<hr />
<div>[[Category:Emulators (English)]]<br />
[[Category:HOWTOs (English)]]<br />
[[fr:VirtualBox]]<br />
{{i18n|VirtualBox}}<br />
<br />
This article is about VirtualBox running in Arch, you may also be interested in [[Arch Linux VirtualBox Guest|Arch Linux as a VirtualBox Guest]].<br />
<br />
[http://www.virtualbox.org VirtualBox] is a virtual pc emulator like [[vmware]]. It has many of the features vmware has, as well as some of its own. It is in constant development and new features are implemented all the time. e.g. version 2.2 introduced OpenGL 3D acceleration support for Linux and Solaris guests. It has a nice GUI interface (Qt and/or SDL) or command line tools for managing virtual machines. Headless operation is also supported. Running iTunes under VirtualBox is the only way (currently) to sync iPod Touch/iPhone firmware 3.0+.<br />
<br />
==Installing==<br />
;{{package Official|virtualbox}}<br />
:This is the basic GPL licensed VirtualBox suite, which can be found in the community repository.<br />
<br />
;{{package AUR|virtualbox-ext-oracle}}<br />
:This PUEL licensed extension pack is free for personal use. You can download it from the [[AUR]]. It features an RPD server, USB 2.0 support and PXE boot for Intel cards.<br />
<br />
Install the basic package:<br />
# pacman -S virtualbox<br />
Optionally install {{package Official|qt}} in order to use the GUI:<br />
# pacman -S qt<br />
<br />
==Running VirtualBox==<br />
Now, add the desired username to the ''vboxusers'' group:<br />
# gpasswd -a USERNAME vboxusers<br />
<br />
Build the required modules:<br />
# rc.d setup vboxdrv<br />
<br />
Lastly, edit {{Filename|/etc/[[rc.conf]]}} and add ''vboxdrv'' to the MODULES array in order to load the VirtualBox drivers at startup:<br />
MODULES=(... ''vboxdrv'')<br />
<br />
To load the module manually:<br />
# modprobe vboxdrv<br />
<br />
To start Virtualbox:<br />
$ virtualbox<br />
<br />
===Solving the impossible /etc/rc.d/vboxdrv setup===<br />
<br />
In some case when VirtualBox is freshly installed you can't compile the module and some error message appears, like :<br />
<br />
<pre><br />
# rc.d setup vboxdrv<br />
:: Unloading VirtualBox kernel modules [DONE]<br />
:: Recompiling VirtualBox kernel modules [BUSY]<br />
Look at /var/log/vbox-install.log to find out what went wrong<br />
Look at /var/log/vbox-install.log to find out what went wrong<br />
Look at /var/log/vbox-install.log to find out what went wrong<br />
[DONE]<br />
:: Reloading VirtualBox kernel modules}</pre><br />
<br />
with the evocated log file saying :<br />
<pre>Makefile:169: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.<br />
cp: cannot stat `/tmp/vboxdrv-Module.symvers': No such file or directory<br />
Makefile:94: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.<br />
cp: cannot stat `/tmp/vboxdrv-Module.symvers': No such file or directory<br />
Makefile:90: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.</pre><br />
<br />
A solution is to install headers of your kernel :<br />
<br />
pacman -S kernel26-headers<br />
or, if you have got a lts version :<br />
pacman -S kernel26-lts-headers<br />
<br />
Then it could be useful to reboot your computer (but maybe not necessary, try) and following previous steps, your virtual machine should run.<br />
<br />
==Configuring==<br />
===Networking===<br />
VirtualBox guests may be networked through various methods; among them, there's [[#NAT]] and [[#Bridged]] networking. Using the [[#NAT]] method is the simplest and the default for new virtual machines.<br />
<br />
The [http://www.virtualbox.org/manual/UserManual.html VirtualBox manual] covers host-only and internal network options. These have been omitted due to them being, for the most part, OS agnostic.<br />
<br />
====NAT====<br />
From VirtualBox:<br />
* access the VM's ''Settings'' menu;<br />
* click on ''Network'' from the list to the left; finally,<br />
* in the ''Attached to'' drop-down list, select ''NAT''.<br />
<br />
VirtualBox's bundled DHCP server enables the guest system to be configured with DHCP. The NAT IP address on the first card is 10.0.2.0, 10.0.3.0 on the second and so on.<br />
<br />
====Bridged====<br />
Bridged networking may be setup through various methods; among them, there's the native way, which requires minimal setup at the expense of having less control. For other methods, see [[Advanced VirtualBox Networking]]. Since newer versions, VirtualBox can bridge between a guest and a wireless host interface without the help of third party utilities.<br />
<br />
Before continuing, load the required module:<br />
# modprobe vboxnetflt<br />
<br />
From VirtualBox:<br />
* access the VM's ''Settings'' menu;<br />
* click on ''Network'' from the list to the left;<br />
* in the ''Attached to'' drop-down list, select ''Bridged Adapter''; finally,<br />
* in the ''Name'' drop-down list, select the name of the host interface that's connected to the network that the guest OS should be part of.<br />
<br />
Start the virtual machine and configure its network as usual; e.g., DHCP or static.<br />
<br />
===Guest additions===<br />
The Guest Additions make the shared folders feature available, improve video card acceleration support, and enable bi-directional clipboard between the guest and host. Mouse integration is another feature, taking away the need of releasing the mouse after using it in the guest.<br />
<br />
====Arch Linux guests====<br />
<br />
Refer to [[Arch Linux VirtualBox Guest]]<br />
<br />
====Windows guests====<br />
After installing Windows (XP etc.) on your virtual machine, simply select ''Devices &rarr; Install Guest Additions...''<br />
<br />
This will mount the iso image and windows should then automatically launch the guest additions installer. Follow the instructions to the end.<br />
<br />
===Keyboard and mouse between the host and the guest===<br />
*To capture the keyboard and mouse, click the mouse inside the virtual machine display.<br />
*To uncapture, press right {{keypress|Ctrl}}.<br />
<br />
To get seamless mouse integration between host and guest, install the [[#Guest Additions]] inside the guest.<br />
<br />
When generating the guests' {{Filename|xorg.conf}} with {{Codeline|X -configure}}, the InputDevice section may feature the {{Codeline|mouse}} driver. After installing the Guest Additions, replace {{Codeline|mouse}} with {{Codeline|vboxmouse}} and then restart X or reboot the guest.<br />
<br />
Alternatively, add the following to the guest's {{Filename|xorg.conf}}:<br />
<pre><br />
Section "InputDevice"<br />
Identifier "Mouse0"<br />
Driver "vboxmouse"<br />
Option "Protocol" "auto"<br />
Option "Device" "/dev/input/mice"<br />
Option "ZAxisMapping" "4 5 6 7"<br />
EndSection<br />
<br />
Section "ServerLayout"<br />
Identifier "X.org Configured"<br />
Screen 0 "Screen0" 0 0<br />
InputDevice "Mouse0" "CorePointer"<br />
InputDevice "Keyboard0" "CoreKeyboard"<br />
EndSection<br />
</pre><br />
<br />
===Using full resolution of the host system in the guest===<br />
Set the resolution of your guest in the grub boot script {{Filename|/boot/grub/menu.lst}}, i.e. add the correct vga code to the kernel command line. For a resolution of 1280x1024, this would e.g. look like<br />
# kernel /vmlinuz26 root=/dev/disk/by-uuid/7bdc5dee-8fb0-4260-bc43-60ac6e4e4a54 ro vga=795<br />
<br />
Add the resolution to {{Filename|/etc/X11/xorg.conf}}, e.g.<br />
<pre><br />
Section "Screen"<br />
...<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Modes "1280x1024" "1024x768"<br />
EndSubSection<br />
...<br />
EndSection<br />
</pre><br />
If you experience problems with your resolution dropping back to second lower resolution in the 'Modes' setting, simply omit the second resolution. Example <br />
Modes "1280x1024"<br />
<br />
===Sharing folders between the host and the guest===<br />
In the settings of the virtual machine go to shared folders tab and add the folders you want to share.<br />
<br />
*NOTE: You need to install Guest Additions in order to use this feature.<br />
In a Linux host, ''Devices &rarr; Install Guest Additions''<br />
Yes (when asked to download the CD image)<br />
Mount (when asked to register and mount)<br />
<br />
In a Linux host, create one or more folders for sharing files, then set the shared folders via the virtualbox menu (guest window).<br />
<br />
In a Windows guest, starting with VirtualBox 1.5.0, shared folders are browseable and are therefore visible in Windows Explorer. Open Windows Explorer and look for it under ''My Networking Places &rarr; Entire Network &rarr; VirtualBox Shared Folders''.<br />
<br />
Launch the windows explorer (run explorer command) to browse the network places -> expand with the (+) sign : entire network &rarr; VirtualBox shared folders &rarr; '''\\Vboxsvr''' &rarr; then you can now expand all your configured shared folders here, and set up shortcuts for linux folders in the guest filesystem. You can alternatively use the "Add network place wizard", and browse to "VBoxsvr".<br />
<br />
Alternatively, on the Windows command line, you can also use the following:<br />
net use x: \\VBOXSVR\sharename<br />
<br />
While {{Codeline|VBOXSVR}} is a fixed name, replace {{Codeline|x:}} with the drive letter that you want to use for the share, and sharename with the share name specified with VBoxManage.<br />
<br />
In a Windows guest, to improve loading and saving files (e.g. MS Office) by VirtualBox Shared Folders edit ''c:\windows\system32\drivers\etc\hosts'' as below:<br />
127.0.0.1 localhost vboxsvr<br />
<br />
In a Linux guest, use the following command:<br />
# mount -t vboxsf [-o OPTIONS] sharename mountpoint<br />
(Notes: sharename is optional or same as selected in the VirtualBox-Dialog , mountpoint of the shared directory in the hosts filesystem)<br />
:Automatically mounting a shared folder is possible through the linux-guest /etc/fstab file. You may also specify the uid=#,gid=# (where # is replaced by the actual numerical uid and gid) to mount the share with normal user permissions instead of root permissions. (this can be helpful to mount parts of your host ~/home for use in your linux-guest. To do this add an entry in the following format to the linux-guest /etc/fstab:<br />
<br />
sharename mountpoint vboxsf uid=#,gid=# 0 0<br />
<br />
Replace {{Codeline|sharename}} with the share name specified with VBoxManage, and mountpoint with the path where you want the share to be mounted (e.g. /mnt/share). The usual mount rules apply, that is, create this directory first if it does not exist yet. Note that if you have told VirtualBox to "automatically mount" the shared folder, this step may not be necessary and your folder will be found somewhere under /media.<br />
<br />
Beyond the standard options supplied by the mount command, the following are available:<br />
iocharset=CHARSET<br />
to set the character set used for I/O operations (utf8 by default) and<br />
convertcp=CHARSET<br />
to specify the character set used for the shared folder name (utf8 by default).<br />
<br />
===Getting audio to work in the guest machine===<br />
In the machine settings, go to the audio tab and select the correct driver according to your sound system (ALSA, OSS or PulseAudio).<br />
<br />
===Setting up the RAM and video memory for the guest===<br />
You can change the default values by going to ''Settings &rarr; General''.<br />
<br />
===Setting up CD-ROM for the guest===<br />
You can change the default values by going to ''Settings &rarr; CD/DVD-ROM''.<br />
<br />
Check mount CD/DVD drive and select one of the following options.<br />
<br />
===Enabling D3D acceleration in Windows guests===<br />
Recent versions of Virtualbox have support for accelerating OpenGL inside guests. This can be enabled with a simple checkbox in the machine's settings, right below where video ram is set, and installing the Virtualbox guest additions. However, most Windows games use Direct3D (part of DirectX), not OpenGL, and are thus not helped by this method. However, it is possible to gain accelerated Direct3D in your Windows guests by borrowing the d3d libraries from Wine, which translate d3d calls into OpenGL, which is then accelerated. <br />
<br />
After enabling OpenGL acceleration as described above, go to http://www.nongnu.org/wined3d/ in your Windows guest and grab the "Latest version (Installer):". Reboot the guest into safe mode (press F8 before the Windows screen appears but after the Virtualbox screen disappears), and install wined3d, accepting the defaults during the install. (You may check the box for DirectX 10 support if you like, dont touch anything else.) Reboot back to normal mode and you should have accelerated Direct3D. <br />
<br />
{{Note | This hack may or may not work for some games depending on what hardware checks they make and what parts of D3D they use.}}<br />
{{Note | This has only been tried on Windows XP and Windows 7 RC guests AFAIK, and does not work on the Windows 7 guest. If you have experience with this on a different windows version, please add that data here.}}<br />
<br />
==Virtualized OS setup==<br />
Virtualbox needs to be setup to virtualize another operating system.<br />
<br />
===Test a liveCD/DVD===<br />
Click the 'New' button to create a new virtual environment. Name it appropriately and select Operating System type and version. Select base memory size (note: most operating systems will need at least 512MB to function properly). Create a new hard disk image (a hard disk image is a file that will contain the operating system's filesystem and files).<br />
<br />
When the new image has been created, click 'Settings', then CD/DVD-ROM, check 'Mount CD/DVD Drive' then select an ISO image.<br />
<br />
==Maintenance==<br />
<br />
===Rebuild the vboxdrv module===<br />
Note that any time your kernel version changes (due to an upgrade, recompile, etc.) you must also rebuild the VirtualBox kernel modules.<br />
<br />
Ensure that ''kernel26-headers'' is still installed, and run the following command:<br />
# rc.d setup vboxdrv<br />
<br />
This will build the VirtualBox kernel modules for the ''currently running kernel''; if you have just upgraded your kernel package, reboot before trying to rebuild your kernel modules.<br />
<br />
After rebuilding the module, do not forget to load it with<br />
# modprobe vboxdrv<br />
<br />
''vboxdrv'' and ''vboxnetflt'' should be in the MODULES=() section of your /etc/rc.conf<br />
<br />
If you are using an old virtualbox_bin package built from AUR, run:<br />
# vbox_build_module<br />
<br />
If you need to rebuild the Virtual Box Additions in a guest installation of Arch Linux, use this command:<br />
# rc.d setup rc.vboxadd<br />
<br />
===Compact a disk image===<br />
See [http://my.opera.com/locksley90/blog/2008/06/01/how-to-compact-a-virtualbox-virtual-disk-image-vdi How to compact a VirtualBox virtual disk image (VDI)]<br />
<br />
===Increase the size of a virtual hard drive for a Windows guest===<br />
WARNING: ONLY TESTED WITH XP GUEST!<br />
<br />
If you find that you are running out of space due to the small hard drive size you selected when created your VM, you can take the following steps:<br />
<br />
Create a new vdi in ~/.VirtualBox/HardDisks by running:<br />
# cd ~/.VirtualBox/HardDisks<br />
# VBoxManage createhd -filename new.vdi --size 10000 --remember<br />
<br />
where size is in mb, in this example 10000MB ~= 10GB, and new.vdi is name of new hard drive to be created.<br />
<br />
Next the old vdi needs to be cloned to the new vdi, this may take some time so wait while it occurs:<br />
# VBoxManage clonehd old.vdi new.vdi --existing<br />
<br />
Detach old harddrive and attach new hard drive, replace VMName with whatever you called your VM:<br />
# VBoxManage modifyvm VMName --hda none<br />
# VBoxManage modifyvm VMName --hda new.vdi<br />
<br />
Boot the VM, run Partition Wizard 5 to resize the partition on the fly, and reboot.<br />
<br />
Remove old vdi from VirtualBox and delete<br />
# VBoxManage closemedium disk old.vdi<br />
# rm old.vdi<br />
<br />
===Windows Xp and Nokia phones===<br />
To get working Windows XP and Nokia phones with Pc Suite mode, Virtualbox needs two simple steps:<br />
<br />
'''1.''' Add a rule to udev with {{Filename|/etc/udev/rules.d/40-permissions.rules}}:<br />
LABEL="usb_serial_start"<br />
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", \<br />
GROUP="usbfs", MODE="0660", GROUP="dialout"<br />
LABEL="usb_serial_end"<br />
<br />
'''2.''' Create the group usbfs and add its user to it<br />
$ sudo groupadd usbfs<br />
$ sudo usermod -a -G usbfs $USER<br />
<br />
After a logout, connect a Nokia phone with PC Suite mode and start Windows XP to test new rule.<br />
<br />
==Migrating from another VM==<br />
The <code>qemu-img</code> program can be used to convert images from one format to another, or add compression or encryption to an image. <br />
# pacman -S qemu<br />
<br />
===Converting from QEMU images===<br />
To convert a QEMU image for use with VirtualBox, first convert it to ''raw'' format, then use VirtualBox's conversion utility to convert and compact it in its native format.<br />
$ qemu-img convert -O raw test.qcow2 test.raw<br />
$ VBoxManage modifyvdi /full/path/to/test.vdi compact<br />
or <br />
$ qemu-img convert -O raw test.qcow2 test.raw<br />
(of course you must have installed qemu package for that)<br />
$ VBoxManage convertfromraw /full/path/to/test.raw /full/path/to/test.vdi<br />
$ VBoxManage modifyvdi /full/path/to/test.vdi compact<br />
<br />
===Converting from VMware images ===<br />
Do <br />
$ VBoxManage clonehd source.vmdk target.vdi --format VDI<br />
<br />
This may not be needed anymore with recent virtualbox versions (to be confirmed)<br />
<br />
==Tips and tricks==<br />
<br />
===Getting Web-cams and other USB devices to detect===<br />
Make sure you filter any devices that are not a keyboard or a mouse so they don't start up at boot and this insures that Windows will detect the device at start-up.<br />
<br />
===Sending a CTRL+ALT+F1 to the Guest===<br />
If your guest O/S is a Linux distro, and you want to open a new tty text shell or exit X via typing {{Keypress|Ctrl}}+{{Keypress|Alt}}+{{Keypress|F1}}, you can easily send this command to the guest O/S simply by hitting your 'Host Key' (usually the {{Keypress|Ctrl}} in the Right side of your keyboard) + {{Keypress|F1}} or {{Keypress|F2}}, etc.<br />
<br />
===Starting VMs at system boot on headless servers===<br />
Add this line to /etc/rc.local<br />
exec /bin/su -c 'VBoxManage startvm --type headless <''UUID|NAME''>' ''PREFERED_USER'' >/dev/null 2>&1<br />
Where <UUID|NAME> is the guest identifier, and PREFERRED_USER is the user profile that contains the VM definitions and .vdi files.<br />
<br />
Since exec replaces the currently running process, you will not be able to start a second VM, or execute any other commands, after the exec. Try the following if this is a problem:<br />
su -c 'VBoxHeadless -s <''UUID|NAME''> &' -s /bin/sh ''PREFERED_USER'' >/dev/null 2>&1<br />
Using fully qualified path to su and VBoxHeadless is recommend. Add additional lines like above to start additional VMs. Commands following these in rc.local will be executed. Based on some rooting around in the VBox documentation, I get the impression this will be a little more robust than 'VBoxManage ... --type headless' in future VBox releases.<br />
<br />
To determine the available VMs for a user:<br />
su -c 'VBoxManage list vms' PREFERED_USER<br />
<br />
To save the state of a running VM:<br />
su -c 'VBoxManage controlvm <UUID|NAME> savestate' PREFERED_USER<br />
rc.local.shutdown would be a good spot for this.<br />
<br />
=== Guest managament daemon ===<br />
Below is a [[daemon]] for automating guest administration. Guests will be initialized on start, and state-saved on stop, or you will just get a "./vbox_service: line 31: out[${m[1]}]: bad array subscript" message when you run it.<br />
<br />
The configuration file:<br />
{{File|name=/etc/conf.d/vbox_service|content=<nowiki><br />
# Guests to manage:<br />
#VB_GUESTS=('OpenBSD' 'Slackware' 'Windows XP')<br />
#<br />
# Disable a guest by prepending a bang:<br />
#VB_GUESTS=('OpenBSD' 'Slackware' !'Windows XP')<br />
#<br />
# Default value matches none:<br />
VB_GUESTS=()<br />
<br />
# User to run Virtual Box as:<br />
VB_USER='vbox'<br />
</nowiki>}}<br />
<br />
The script:<br />
{{File|name=/etc/rc.d/vbox_service|content=<nowiki><br />
#!/bin/bash<br />
<br />
. /etc/rc.conf<br />
. /etc/rc.d/functions<br />
<br />
unset VB_GUESTS<br />
unset VB_USER<br />
[[ -r /etc/conf.d/vbox_service ]] && . /etc/conf.d/vbox_service<br />
[[ ${VB_GUESTS[@]} ]] || VB_GUESTS=()<br />
[[ ${VB_USER[@]} ]] || VB_USER='vbox'<br />
<br />
<br />
match() {<br />
[[ $REPLY =~ $1 ]] && m=("${BASH_REMATCH[@]}")<br />
}<br />
<br />
<br />
vm_raw() {<br />
local argv=''<br />
printf -v argv ' %q ' "$@"<br />
su -c "/usr/bin/VBoxManage $argv" -s /bin/sh "$VB_USER"<br />
}<br />
<br />
vm_ls() {<br />
local -A out=''<br />
local -i ret=1<br />
<br />
local m=()<br />
while read -r; do<br />
match '^"(.+)" \{(.+)\}$'<br />
out[${m[1]}]=${m[2]}<br />
done < <(vm_raw list vms)<br />
<br />
local i=''<br />
for i in "${VB_GUESTS[@]##!*}"; do<br />
if [[ ${out[$i]} ]]; then<br />
printf ' %q ' "${out[$i]}"<br />
ret=0<br />
fi<br />
done<br />
<br />
return $ret<br />
}<br />
<br />
vm_envinit() {<br />
local m=()<br />
while read -r; do<br />
match '^(.+)="?([^"]+)'<br />
env[$1:${m[1]}]=${m[2]}<br />
done < <(vm_raw showvminfo --machinereadable "$1")<br />
}<br />
<br />
<br />
start() {<br />
if [[ ${env[$1:VMState]} != 'running' ]]; then<br />
vm_raw startvm --type headless "$1"<br />
fi<br />
}<br />
<br />
stop() {<br />
if [[ ${env[$1:VMState]} == 'running' ]]; then<br />
vm_raw controlvm "$1" savestate<br />
fi<br />
}<br />
<br />
restart() {<br />
stop "$1"<br />
sleep 3<br />
start "$1"<br />
}<br />
<br />
usage() {<br />
printf '%s\n' "usage: $0 <start|stop|restart> [name|uuid]..." >&2<br />
}<br />
<br />
<br />
if [[ ! $1 =~ ^(start|stop|restart)$ ]]; then<br />
usage<br />
exit 2<br />
fi<br />
cmd=$1<br />
shift<br />
(($#)) || eval set -- "$(vm_ls)"<br />
<br />
stat_busy "${cmd^}ing VMs:"<br />
trap 'stat_die' ERR<br />
set -Ee<br />
<br />
declare -A env=''<br />
<br />
for i; do<br />
[[ $i ]]<br />
vm_envinit "$i"<br />
stat_append "${env[$i:name]}, "<br />
$cmd "${env[$i:UUID]}" &>/dev/null<br />
done<br />
<br />
stat_done<br />
</nowiki>}}<br />
<br />
===Accessing server on VM from host===<br />
To access apache on a VM from the Host machine ONLY, simply execute the following lines on the Host:<br />
$ VBoxManage setextradata GuestName "VBoxInternal/Devices/pcnet/0/LUN#0/Config/Apache/HostPort" 8888<br />
$ VBoxManage setextradata GuestName "VBoxInternal/Devices/pcnet/0/LUN#0/Config/Apache/GuestPort" 80<br />
$ VBoxManage setextradata GuestName "VBoxInternal/Devices/pcnet/0/LUN#0/Config/Apache/Protocol" TCP<br />
Where 8888 is the port the host should listen on and 80 is the port the VM will send Apache's signal on. <br />
To use a port lower than 1024 on the host machine changes need to be made to the firewall on the host machine. This can also be set up to work with SSH, etc.. by changing "Apache" to whatever service and using different ports. <br />
<br />
Note: "pcnet" refers to the network card of the VM. If you use an Intel card in your VM settings change "pcnet" to "e1000"<br />
<br />
*from [http://mydebian.blogdns.org/?p=111 ]<br />
<br />
It might also be necessary to allow connections from the outside to the server in your VM. E.g. if the guest OS is Arch, you may want to add the line <br />
httpd: ALL<br />
to your /etc/hosts.allow file.<br />
<br />
===DAEMON Tools===<br />
While VirtualBox can mount ISO images without a problem, there are some image formats which cannot reliably be converted to ISO. For instance, ccd2iso ignores .ccd and .sub files, which can give disk images with broken files. cdemu, fuseiso, and MagicISO will do the same. In this case there is no choice but to use Daemon Tools inside VirtualBox.<br />
<br />
Recent Daemon Tools versions won't install, so use this old one: [http://www.disc-tools.com/download/daemon347+hashcalc]<br />
<br />
===Using VirtualBox on a USB key===<br />
When using VirtualBox on a USB key, for example to start an installed machine with an ISO image, you will manually have to create VDMKs from the existing drives. However, once the new VMDKs are saved and you move on to another machine, you may experience problems launching an appropriate machine again. To get rid of this issue, you can use the following script to launch VirtualBox. This script will clean up and unregister old VMDK files and it will create new, proper VMDKs for you:<br />
<pre><br />
#!/bin/bash<br />
<br />
# Erase old VMDK entries<br />
rm ~/.VirtualBox/*.vmdk<br />
<br />
# Clean up VBox-Registry<br />
sed -i '/sd/d' ~/.VirtualBox/VirtualBox.xml<br />
<br />
# Remove old harddisks from existing machines<br />
find ~/.VirtualBox/Machines -name \*.xml | while read file; do<br />
line=`grep -e "type\=\"HardDisk\"" -n $file | cut -d ':' -f 1`<br />
if [ -n "$line" ]; then<br />
sed -i ${line}d $file<br />
sed -i ${line}d $file<br />
sed -i ${line}d $file<br />
fi<br />
sed -i "/rg/d" $file<br />
done<br />
<br />
# Delete prev-files created by VirtualBox<br />
find ~/.VirtualBox/Machines -name \*-prev -exec rm '{}' \;<br />
<br />
# Recreate VMDKs<br />
ls -l /dev/disk/by-uuid | cut -d ' ' -f 9,11 | while read ln; do<br />
if [ -n "$ln" ]; then<br />
uuid=`echo "$ln" | cut -d ' ' -f 1`<br />
device=`echo "$ln" | cut -d ' ' -f 2 | cut -d '/' -f 3 | cut -b 1-3`<br />
<br />
# determine whether drive is mounted already<br />
checkstr1=`mount | grep $uuid`<br />
checkstr2=`mount | grep $device`<br />
checkstr3=`ls ~/.VirtualBox/*.vmdk | grep $device`<br />
if [[ -z "$checkstr1" && -z "$checkstr2" && -z "$checkstr3" ]]; then<br />
VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/$device.vmdk -rawdisk /dev/$device -register<br />
fi<br />
fi<br />
done<br />
<br />
# Start VirtualBox<br />
VirtualBox<br />
</pre><br />
Note that your user has to be added to the "disk" group to create VMDKs out of existing drives.<br />
<br />
===phpVirtualBox===<br />
An open source, AJAX implementation of the VirtualBox user interface written in PHP. As a modern web interface, it allows you to access and control remote VirtualBox instances. Much of its verbage and some of its code is based on the (inactive) vboxweb project. It allows the administrator to remotely, graphically, administer their virtual machines without having to log in to their headless VirtualBox servers.<br />
<br />
This requires the PUEL edition for VirtualBox.<br />
<br />
An installation guide is available here:<br />
http://code.google.com/p/phpvirtualbox/wiki/Installation<br />
<br />
Arch Linux users should uncomment these 2 extensions in ''/etc/php/php.ini''<br />
extension=json.so<br />
extension=soap.so<br />
<br />
See also [[PhpVirtualBox]]<br />
<br />
==External links==<br />
* [http://www.virtualbox.org/manual/UserManual.html VirtualBox User Manual]</div>MadCatMk2https://wiki.archlinux.org/index.php?title=CPU_frequency_scaling&diff=133077CPU frequency scaling2011-03-07T10:33:02Z<p>MadCatMk2: /* Changing the {{Codeline|ondemand}} governor's threshold */</p>
<hr />
<div>[[Category:Power management (English)]]<br />
[[Category:CPU (English)]]<br />
[[Category:Daemons and system services (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|cpufrequtils}}<br />
[[de:Cpufrequtils]]<br />
{{Moveto|cpufrequtils}}<br />
{{Article summary start}} {{DISPLAYTITLE:cpufrequtils}}<br />
{{Article summary text|An overview of the popular userspace tools for the kernel [http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufreq.html CPUfreq] subsystem.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Laptop Mode Tools|Laptop_Mode_Tools}}<br />
{{Article summary wiki|pm-utils}}<br />
{{Article summary wiki|powernowd}}<br />
{{Article summary end}}<br />
<br />
cpufreq refers to the kernel infrastructure that implements CPU frequency scaling, a technology used primarily by notebooks that enables the operating system to scale the CPU speed up or down, depending on the current system load.<br />
<br />
In order to use scaling, the needed modules have to be loaded and then a governor has to be set. cpufrequtils, acpid and laptop-mode-tools each offer different ways of managing cpufreq. You can also use the simple CPU frequency applets included with some desktop environments instead.<br />
<br />
==cpufrequtils==<br />
{{Package Official|cpufrequtils}} is a set of userspace utilities designed to assist with ''CPU frequency scaling''. The package isn't required to use scaling, but is highly recommended because it provides useful command-line utilities and a daemon script to set the governor at boot.<br />
<br />
{{Package Official|powertop}} provides similar information to the cpufreq-info utility in this package, but not at the same level of detail.<br />
<br />
The {{Package Official|cpufrequtils}} package is available in the [extra] repository:<br />
# pacman -S cpufrequtils<br />
<br />
==Configuration==<br />
Configuring CPU scaling is a 3-part process:<br />
# Load appropriate CPU frequency driver<br />
# Load desired scaling governor(s)<br />
# Select a method to manage switching the governor: manually (via /sys or cpufreq-set), the cpufrequtils [[#Daemon]], laptop-mode-tools, acpid or using an applet/desktop environment. Different methods can be combined if desired.<br />
# Optionally, the scaling governor can be tuned with cpufrequtils and/or the /sys interface.<br />
<br />
=== CPU frequency driver ===<br />
In order for frequency scaling to work properly, the operating system must first know the limits of the CPU(s). To accomplish this, a kernel module is loaded that can read and manage the specifications of the CPU(s).<br />
<br />
Most modern notebooks and desktops can simply use the '''<tt>acpi-cpufreq</tt>''' driver. However, other options include the <tt>p4-clockmod</tt>, <tt>powernow-k8</tt>, and <tt>speedstep-centrino</tt> drivers. To see a full list of available drivers, run the following:<br />
<br />
$ ls /lib/modules/2.6.??-ARCH/kernel/drivers/cpufreq<br />
<br />
{{Tip|For an AMD "K10" CPU like Phenom X4, use the <tt>powernow-k8</tt> driver.}}<br />
<br />
To load the CPU frequency driver manually:<br />
<br />
==== Intel ====<br />
# modprobe acpi-cpufreq<br />
<br />
For older Intel CPUs, the command above may return with: <br />
FATAL: Error inserting acpi_cpufreq ([...]/acpi-cpufreq.ko): No such device<br />
<br />
In this case, replace the kernel module <tt>acpi-cpufreq</tt> with <tt>speedstep-centrino</tt>, <tt>p4-clockmod</tt> or <tt>speedstep-ich</tt>.<br />
<br />
{{Tip|Notice that the speedstep-centrino module is deprecated, and the p4-clockmod supports only performance and powersave governors (due to long transition latency of the module itself)}}<br />
<br />
There is a kernel with the speedstep-centrino module patched on the AUR, it is the '''<tt>kernel26-pentium-m</tt>''' package which is located here: http://aur.archlinux.org/packages.php?ID=33104<br />
<br />
==== AMD ====<br />
# modprobe powernow-k8<br />
<br />
===Loading at boot===<br />
To load the driver automatically at startup, add the appropriate driver to the MODULES array within {{Filename|/etc/rc.conf}}. For example:<br />
MODULES=( '''acpi-cpufreq''' vboxdrv fuse fglrx iwl3945 ... )<br />
<br />
Once the appropriate cpufreq driver is loaded, detailed information about the CPU(s) can be displayed by running: <br />
$ cpufreq-info<br />
<br />
The output should appear similar to the following:<br />
<br />
{{Command<br />
|name=cpufreq-info<br />
|output=<nowiki><br />
analyzing CPU 0:<br />
driver: acpi-cpufreq<br />
CPUs which need to switch frequency at the same time: 0 1<br />
hardware limits: 1000 MHz - 2.00 GHz<br />
available frequency steps: 2.00 GHz, 1.67 GHz, 1.33 GHz, 1000 MHz<br />
available cpufreq governors: ondemand, performance<br />
current policy: frequency should be within 1000 MHz and 2.00 GHz.<br />
The governor "performance" may decide which speed to use<br />
within this range.<br />
current CPU frequency is 2.00 GHz.<br />
analyzing CPU 1:<br />
driver: acpi-cpufreq<br />
CPUs which need to switch frequency at the same time: 0 1<br />
hardware limits: 1000 MHz - 2.00 GHz<br />
available frequency steps: 2.00 GHz, 1.67 GHz, 1.33 GHz, 1000 MHz<br />
available cpufreq governors: ondemand, performance<br />
current policy: frequency should be within 1000 MHz and 2.00 GHz.<br />
The governor "performance" may decide which speed to use<br />
within this range.<br />
current CPU frequency is 2.00 GHz.<br />
</nowiki>}}<br />
<br />
To simply see which governors are available:<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
<br />
Monitoring the CPU speed in real-time can be achieved by running:<br />
watch grep \"cpu MHz\" /proc/cpuinfo<br />
<br />
=== Privilege Granting Under Gnome ===<br />
<br />
Gnome has a nice applet to change the governor on the fly. To use it without the need to enter the root password, simply create {{Filename|/var/lib/polkit-1/localauthority/50-local.d/org.gnome.cpufreqselector.pkla}} and populate it with the following:<br />
<br />
<pre>[org.gnome.cpufreqselector]<br />
Identity=unix-user:USER<br />
Action=org.gnome.cpufreqselector<br />
ResultAny=no<br />
ResultInactive=no<br />
ResultActive=yes</pre><br />
<br />
Where the word USER is replaced with the username of interest.<br />
<br />
The {{Package AUR|desktop-privileges}} package in the [[AUR]] contains a similar .pkla file for authorizing all users of the power group to change the governor.<br />
<br />
===Laptop Mode Tools===<br />
If you are already using or plan to use [[Laptop Mode Tools]] for other power saving solutions, you may want to let it manage also CPU frequency scaling. <br />
In that case you just have to insert the <tt>acpi-cpufreq</tt> module to the MODULES array in {{Filename|/etc/rc.conf}}:<br />
MODULES=('''acpi-cpufreq''')<br />
<br />
And then go through the {{Filename|/etc/laptop-mode/conf.d/cpufreq.conf}} to define governors, frequencies and policies. <br />
<br />
If you use <tt>laptop-mode-tools</tt> to manage <tt>cpufrequtils</tt>, then you won't need to load other modules and daemons or to set up scaling governors and interaction with ACPI events. Please refer to [[Laptop Mode Tools]] to know how to install and configure <tt>laptop-mode-tools</tt>.<br />
<br />
=== Scaling governors ===<br />
<br />
Governors can be thought of as pre-configured power schemes for the CPU. These governors must be loaded as kernel modules in order to be seen by such programs as ''kpowersave'' and ''gnome-power-manager''. One may load as many governors as desired (only one will be active at any given time).<br />
<br />
Available governors:<br />
<br />
;{{Codeline|cpufreq_performance}} ''(default)'': The performance governor is built into the kernel and runs the CPU(s) at maximum clock speed<br />
;{{Codeline|cpufreq_ondemand}} ''(recommended)'': Dynamically increases/decreases the CPU(s) clock speed based on system load<br />
;{{Codeline|cpufreq_conservative}}: Similar to {{Codeline|ondemand}}, but more conservative (clock speed changes are more graceful)<br />
;{{Codeline|cpufreq_powersave}}: Runs the CPU at minimum speed<br />
;{{Codeline|cpufreq_userspace}}: Manually configured clock speeds by user<br />
<br />
Load the desired governor(s) with {{Codeline|modprobe}}. For example:<br />
# modprobe cpufreq_ondemand<br />
# modprobe cpufreq_userspace<br />
<br />
Or, add the desired governor(s) to the MODULES array in {{Filename|/etc/rc.conf}} and reboot.<br />
MODULES=(acpi-cpufreq '''cpufreq_ondemand''' '''cpufreq_powersave''')<br />
<br />
Manually set the governor by running the {{Codeline|cpufreq-set}} command (as root). However, this setting will not be saved after a reboot/shutdown. For example:<br />
# cpufreq-set -g ondemand<br />
<br />
Note that the previous command only sets the governor for the first processor. If you have a multicore or multiprocessor system, use the -c flag to set the governor for a specific core. For example, to set the governor for the fourth core (core numbers start from zero):<br />
# cpufreq-set -c 3 -g ondemand<br />
<br />
Run {{Codeline|cpufreq-set --help}} or {{Codeline|man cpufreq-set}} for more information.<br />
<br />
For those who would like a GUI for setting governors or frequency there is [[trayfreq]], a GTK+ application that sits in the system tray.<br />
<br />
==== Changing the {{Codeline|ondemand}} governor's threshold ====<br />
<!-- ln from [[Browser Plugins#Flash Performance]] --><br />
To change when the {{Codeline|ondemand}} governor switches to a higher multiplier, one can manipulate {{Filename|/sys/devices/system/cpu/cpufreq/ondemand/up_threshold}}. Determine the current setting by issuing the following command as root:<br />
# cat /sys/devices/system/cpu/cpufreq/ondemand/up_threshold<br />
<br />
The value returned should be <tt>95</tt>, the default setting as of kernel version 2.6.37. This means that the {{Codeline|ondemand}} governor currently increases the clock rate if a core reaches 95% utilization. The can be changed, for example:<br />
<br />
echo "15" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold<br />
<br />
{{Note|The minimum value one can enter must be above the one in down_threshold; entering a value under that results in the error, "bash: echo: write error: Invalid argument"}}<br />
{{Note|Appending the echo line to the {{Filename|/etc/rc.local}} will allow it to "survive" a reboot.}}<br />
{{Note|For an unknown reason putting the echo in {{Filename|/etc/rc.local}} was not working for me. Something was probably resetting it afterwards. I had to find a workaround :<br />
# (sleep 30 && sh -c "echo -n 75 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold")& <br />
Adjust to your cpu number and values.}}<br />
<br />
==== Interaction with ACPI events ====<br />
<br />
Users may configure scaling governors to switch automatically based on different ACPI events such as connecting the AC adapter or closing a laptop lid. Events are defined in {{Filename|/etc/acpi/handler.sh}}. If the {{Package Official|acpid}} package is installed, the file should already exist and be executable. For example, to change the scaling governor from {{Codeline|performance}} to {{Codeline|conservative}} when the AC adapter is disconnected and change it back if reconnected:<br />
<br />
{{File<br />
|name=/etc/acpi/handler.sh<br />
|content=<nowiki><br />
[...]<br />
<br />
ac_adapter)<br />
case "$2" in<br />
AC*)<br />
case "$4" in<br />
00000000)<br />
echo "conservative" >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor <br />
echo -n $minspeed >$setspeed<br />
#/etc/laptop-mode/laptop-mode start<br />
;;<br />
00000001)<br />
echo "performance" >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor<br />
echo -n $maxspeed >$setspeed<br />
#/etc/laptop-mode/laptop-mode stop<br />
;;<br />
esac<br />
;;<br />
*) logger "ACPI action undefined: $2" ;;<br />
esac<br />
;;<br />
<br />
[...]<br />
</nowiki>}}<br />
<br />
=== Daemon ===<br />
<br />
<tt>cpufrequtils</tt> also includes a daemon which allows users to set the desired scaling governor and min/max clock speeds for all processor cores at boot-time, without the need for additional tools such as ''kpowersave''.<br />
<br />
Before starting the daemon, edit {{Filename|/etc/conf.d/cpufreq}} as root, selecting the desired governor and setting the min/max speed for your CPU(s), for example:<br />
<br />
{{File<br />
|name=/etc/conf.d/cpufreq<br />
|content=<nowiki><br />
#configuration for cpufreq control<br />
<br />
# valid governors:<br />
# ondemand, performance, powersave,<br />
# conservative, userspace<br />
governor="ondemand"<br />
<br />
# valid suffixes: Hz, kHz (default), MHz, GHz, THz<br />
min_freq="1GHz"<br />
max_freq="2GHz"<br />
</nowiki>}}<br />
<br />
{{Note|The exact min/max values of the CPU(s) can be determined by running {{Codeline|cpufreq-info}} after loading the CPU driver (e.g. {{Codeline|modprobe acpi-cpufreq}}). However, these values are ''optional''. Users may omit them entirely by deleting or commenting out the min/max_freq lines; scaling will work automatically.}}<br />
<br />
With the appropriate configuration, start the daemon with the following command:<br />
# /etc/rc.d/cpufreq start<br />
<br />
To start the daemon automatically at startup, add {{Codeline|cpufreq}} to the DAEMONS array in {{Filename|/etc/rc.conf}}, for example:<br />
DAEMONS=(syslog-ng networkmanager @alsa @crond @cups '''@cpufreq''')<br />
<br />
== Troubleshooting ==<br />
<br />
* Some applications, like [[ntop]], do not respond well to automatic frequency scaling. In the case of ntop it can result in segmentation faults and lots of lost information as even the {{Codeline|ondemand}} governor cannot change the frequency quickly enough when a lot of packages suddenly arrive at the monitored network interface that cannot be handled by the current processor speed.<br />
<br />
* Some CPUs may suffer from poor performance with the default settings of the {{Codeline|ondemand}} governor (e.g. flash videos not playing smoothly or stuttering window animations). Instead of completely disabling frequency scaling to resolve these issues, the aggressiveness of frequency scaling can be increased by lowering the ''up_threshold'' sysctl variable for each CPU. See [[#Changing the ondemand governor's threshold]].<br />
<br />
* Sometimes the deamon may not throttle to the maximum frequence but one step below. This can be solved by setting max_freq value slightly higher than the real maximum. For example, if frequence range of the CPU is from 2.00GHz to 3.00GHz, setting max_freq to 3.01GHz can be a good idea.<br />
<br />
* Some cpu/bios configurations may have difficulties to scale to the maximum frequencies or scale to highter frequencies at all. Sadly there is only a workaround right now. Add "processor.ignore_ppc=1" to your kernel boot line and/or edit the value in /sys/module/processor/parameters/ignore_ppc from 0 to 1.</div>MadCatMk2https://wiki.archlinux.org/index.php?title=Daemons&diff=107823Daemons2010-06-03T10:11:48Z<p>MadCatMk2: /* List of Daemons */</p>
<hr />
<div>[[Category:Boot process (English)]]<br />
[[Category:Daemons and system services (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|Daemon}}<br />
<br />
A '''daemon''' is a program that runs in the background, waiting for events to occur and offering services. A good example is a webserver that waits for a request to deliver a page or a ssh server waiting for someone trying to log in. While these are full featured applications, there are daemons whose work is not that visible. A daemon which writes messages into a log file (e.g. syslog, metalog), a daemon which lowers your CPU frequency if the system has nothing to do.<br />
<br />
==Starting on Boot==<br />
A default install of Arch Linux will leave you with very few services (or daemons) enabled during boot. You can add or remove services by editing the daemon array line in your [[rc.conf]] file. It will initially look something like this:<br />
DAEMONS=(syslog-ng network netfs crond)<br />
<br />
They will start in the order you have them listed. You can disable one and keep it in the array by prefixing it with an exclamation mark (!). You can also have them start in the background by adding an at (@) symbol in front of it.<br />
<br />
==Manual Starting and Stopping==<br />
You can see what service start up scripts you have by looking in your /etc/rc.d/ directory. You can also manually start, stop, and restart them by issuing<br />
/etc/rc.d/''daemonname'' {start|stop|restart}<br />
<br />
They may also have other commands, check with the documentation.<br />
<br />
==Essentials==<br />
You do not have to add any more services, if you do not feel the need. However, the typical desktop users may add [[CUPS]], [[HAL]], and [[ALSA]], if they wish. As you install new services, you will have to manually add them to the daemon array in rc.conf.<br />
<br />
{{Note|Some services will start other services. For example, HAL will automatically start [[D-Bus]] and [[Acpid]]. Keep in mind, as it has been mentioned elsewhere, that HAL would sometimes fail to automatically start D-Bus, without the user's awareness. It is considered good practice to add D-Bus explicitly before HAL and not to "background" it. This will let the user know during bootup if it fails to start, before other services dependent on D-Bus break.|}}<br />
<br />
==Starting Daemons in Background==<br />
This is helpful for starting a service and letting the next service start before the previous one has finished. Which services to start background depends on your needs. Do not background anything you need immediately. Here is an example:<br />
DAEMONS=(syslog-ng gensplash network netfs dbus hal @avahi-daemon @samba @crond @alsa @openntpd @cups @mpd)<br />
<br />
Starting ''openntpd'' in the background could lead to synchronization errors between the actual time and the time stored on your computer. If you recognize an increasing time difference between your desktop clock and the actual time, try to start the ''openntpd'' daemon normally and not in the background.<br />
<br />
==ArchLinux Daemon Manager GUI==<br />
You can install [http://img130.imageshack.us/img130/4200/aldmgui03.png ArchLinux Daemon Manager] from [http://aur.archlinux.org/packages.php?ID=29606 AUR] and you will be able to easily change settings in /etc/rc.conf using GTK aplication aldm-gui or commandline application aldm.<br />
<br />
==List of Daemons==<br />
(Here is a list of daemons, although it might not be complete. Please feel free to add any missing daemons here, in alphabetical order.)<br />
{| border="1"<br />
|<b>Daemon</b>||<b>Description</b><br />
|-<br />
|alsa||Enables sound with the Advanced Linux Sound Architecture.<br />
|-<br />
|avahi-daemon||<br />
|-<br />
|avahi-mdns||<br />
|-<br />
|crond||Daemon to schedule and time events.<br />
|-<br />
|cups||Common UNIX Printing System daemon.<br />
|-<br />
|dbus||Message bus system for software communication.<br />
|-<br />
|fam||File Alteration Daemon.<br />
|-<br />
|gensplash||<br />
|-<br />
|hal||Hardware Abstraction Layer.<br />
|-<br />
|mpd||Music Player Daemon.<br />
|-<br />
|mysqld||Daemon to connect to MySQL databases.<br />
|-<br />
|netfs||Creates network file system.<br />
|-<br />
|network||<br />
|-<br />
|networkmanager||<br />
|-<br />
|openmtpd||<br />
|-<br />
|pure-ftpd|| FTP Server.<br />
|-<br />
|rsyslogd||The latest version of a system logger.<br />
|-<br />
|samba||File and print services for Microsoft Windows clients.<br />
|-<br />
|sensors||Hardware (temperature, fans etc) monitoring.<br />
|-<br />
|sshd||Open SSH (secure shell) daemon.<br />
|-<br />
|stbd ||This daemon was previously necessary for gnome-system-tools. However, as of gnome-tools 2.28, it is no longer needed.<br />
|-<br />
|syslogd||This was the older and basic system logger.<br />
|-<br />
|syslog-ng||System logger next generation.<br />
|-<br />
|}</div>MadCatMk2https://wiki.archlinux.org/index.php?title=Daemons&diff=107650Daemons2010-05-31T11:43:28Z<p>MadCatMk2: /* List of Daemons */</p>
<hr />
<div>[[Category:Boot process (English)]]<br />
[[Category:Daemons and system services (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|Daemon}}<br />
<br />
A '''daemon''' is a program that runs in the background, waiting for events to occur and offering services. A good example is a webserver that waits for a request to deliver a page or a ssh server waiting for someone trying to log in. While these are full featured applications, there are daemons whose work is not that visible. A daemon which writes messages into a log file (e.g. syslog, metalog), a daemon which lowers your CPU frequency if the system has nothing to do.<br />
<br />
==Starting on Boot==<br />
A default install of Arch Linux will leave you with very few services (or daemons) enabled during boot. You can add or remove services by editing the daemon array line in your [[rc.conf]] file. It will initially look something like this:<br />
DAEMONS=(syslog-ng network netfs crond)<br />
<br />
They will start in the order you have them listed. You can disable one and keep it in the array by prefixing it with an exclamation mark (!). You can also have them start in the background by adding an at (@) symbol in front of it.<br />
<br />
==Manual Starting and Stopping==<br />
You can see what service start up scripts you have by looking in your /etc/rc.d/ directory. You can also manually start, stop, and restart them by issuing<br />
/etc/rc.d/''daemonname'' {start|stop|restart}<br />
<br />
They may also have other commands, check with the documentation.<br />
<br />
==Essentials==<br />
You do not have to add any more services, if you do not feel the need. However, the typical desktop users may add [[CUPS]], [[HAL]], and [[ALSA]], if they wish. As you install new services, you will have to manually add them to the daemon array in rc.conf.<br />
<br />
{{Note|Some services will start other services. For example, HAL will automatically start [[D-Bus]] and [[Acpid]]. Keep in mind, as it has been mentioned elsewhere, that HAL would sometimes fail to automatically start D-Bus, without the user's awareness. It is considered good practice to add D-Bus explicitly before HAL and not to "background" it. This will let the user know during bootup if it fails to start, before other services dependent on D-Bus break.|}}<br />
<br />
==Starting Daemons in Background==<br />
This is helpful for starting a service and letting the next service start before the previous one has finished. Which services to start background depends on your needs. Do not background anything you need immediately. Here is an example:<br />
DAEMONS=(syslog-ng gensplash network netfs dbus hal @avahi-daemon @samba @crond @alsa @openntpd @cups @mpd)<br />
<br />
Starting ''openntpd'' in the background could lead to synchronization errors between the actual time and the time stored on your computer. If you recognize an increasing time difference between your desktop clock and the actual time, try to start the ''openntpd'' daemon normally and not in the background.<br />
<br />
==ArchLinux Daemon Manager GUI==<br />
You can install [http://img130.imageshack.us/img130/4200/aldmgui03.png ArchLinux Daemon Manager] from [http://aur.archlinux.org/packages.php?ID=29606 AUR] and you will be able to easily change settings in /etc/rc.conf using GTK aplication aldm-gui or commandline application aldm.<br />
<br />
==List of Daemons==<br />
(Here is a list of daemons, although it might not be complete. Please feel free to add any missing daemons here, in alphabetical order.)<br />
{| border="1"<br />
|<b>Daemon</b>||<b>Description</b><br />
|-<br />
|alsa||Enables sound with the Advanced Linux Sound Architecture.<br />
|-<br />
|avahi-daemon||<br />
|-<br />
|avahi-mdns||<br />
|-<br />
|crond||Daemon to schedule and time events.<br />
|-<br />
|cups||Common UNIX Printing System daemon.<br />
|-<br />
|dbus||Message bus system for software communication.<br />
|-<br />
|fam||File Alteration Daemon.<br />
|-<br />
|gensplash||<br />
|-<br />
|hal||Hardware Abstraction Layer.<br />
|-<br />
|mpd||Music Player Daemon.<br />
|-<br />
|mysqld||Daemon to connect to MySQL databases.<br />
|-<br />
|netfs||Creates network file system.<br />
|-<br />
|network||<br />
|-<br />
|networkmanager||<br />
|-<br />
|openmtpd||<br />
|-<br />
|rsyslogd||The latest version of a system logger.<br />
|-<br />
|samba||File and print services for Microsoft Windows clients.<br />
|-<br />
|stbd ||This daemon was previously necessary for gnome-system-tools. However, as of gnome-tools 2.28, it is no longer needed.<br />
|-<br />
|syslogd||This was the older and basic system logger.<br />
|-<br />
|syslog-ng||System logger next generation.<br />
|-<br />
|}</div>MadCatMk2https://wiki.archlinux.org/index.php?title=Daemons&diff=107648Daemons2010-05-31T08:43:02Z<p>MadCatMk2: /* List of Daemons */</p>
<hr />
<div>[[Category:Boot process (English)]]<br />
[[Category:Daemons and system services (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|Daemon}}<br />
<br />
A '''daemon''' is a program that runs in the background, waiting for events to occur and offering services. A good example is a webserver that waits for a request to deliver a page or a ssh server waiting for someone trying to log in. While these are full featured applications, there are daemons whose work is not that visible. A daemon which writes messages into a log file (e.g. syslog, metalog), a daemon which lowers your CPU frequency if the system has nothing to do.<br />
<br />
==Starting on Boot==<br />
A default install of Arch Linux will leave you with very few services (or daemons) enabled during boot. You can add or remove services by editing the daemon array line in your [[rc.conf]] file. It will initially look something like this:<br />
DAEMONS=(syslog-ng network netfs crond)<br />
<br />
They will start in the order you have them listed. You can disable one and keep it in the array by prefixing it with an exclamation mark (!). You can also have them start in the background by adding an at (@) symbol in front of it.<br />
<br />
==Manual Starting and Stopping==<br />
You can see what service start up scripts you have by looking in your /etc/rc.d/ directory. You can also manually start, stop, and restart them by issuing<br />
/etc/rc.d/''daemonname'' {start|stop|restart}<br />
<br />
They may also have other commands, check with the documentation.<br />
<br />
==Essentials==<br />
You do not have to add any more services, if you do not feel the need. However, the typical desktop users may add [[CUPS]], [[HAL]], and [[ALSA]], if they wish. As you install new services, you will have to manually add them to the daemon array in rc.conf.<br />
<br />
{{Note|Some services will start other services. For example, HAL will automatically start [[D-Bus]] and [[Acpid]]. Keep in mind, as it has been mentioned elsewhere, that HAL would sometimes fail to automatically start D-Bus, without the user's awareness. It is considered good practice to add D-Bus explicitly before HAL and not to "background" it. This will let the user know during bootup if it fails to start, before other services dependent on D-Bus break.|}}<br />
<br />
==Starting Daemons in Background==<br />
This is helpful for starting a service and letting the next service start before the previous one has finished. Which services to start background depends on your needs. Do not background anything you need immediately. Here is an example:<br />
DAEMONS=(syslog-ng gensplash network netfs dbus hal @avahi-daemon @samba @crond @alsa @openntpd @cups @mpd)<br />
<br />
Starting ''openntpd'' in the background could lead to synchronization errors between the actual time and the time stored on your computer. If you recognize an increasing time difference between your desktop clock and the actual time, try to start the ''openntpd'' daemon normally and not in the background.<br />
<br />
==ArchLinux Daemon Manager GUI==<br />
You can install [http://img130.imageshack.us/img130/4200/aldmgui03.png ArchLinux Daemon Manager] from [http://aur.archlinux.org/packages.php?ID=29606 AUR] and you will be able to easily change settings in /etc/rc.conf using GTK aplication aldm-gui or commandline application aldm.<br />
<br />
==List of Daemons==<br />
(Here is a list of daemons, although it might not be complete. Please feel free to add any missing daemons here, in alphabetical order.)<br />
{| border="1"<br />
|<b>Daemon</b>||<b>Description</b><br />
|-<br />
|alsa||Enables sound with the Advanced Linux Sound Architecture.<br />
|-<br />
|avahi-daemon||<br />
|-<br />
|avahi-mdns||<br />
|-<br />
|crond||Daemon to schedule and time events.<br />
|-<br />
|cups||Common UNIX Printing System daemon.<br />
|-<br />
|dbus||Message bus system for software communication.<br />
|-<br />
|gensplash||<br />
|-<br />
|hal||Hardware Abstraction Layer.<br />
|-<br />
|mpd||Music Player Daemon.<br />
|-<br />
|mysqld||Daemon to connect to MySQL databases.<br />
|-<br />
|netfs||Creates network file system.<br />
|-<br />
|network||<br />
|-<br />
|networkmanager||<br />
|-<br />
|openmtpd||<br />
|-<br />
|rsyslogd||The latest version of a system logger.<br />
|-<br />
|samba||File and print services for Microsoft Windows clients.<br />
|-<br />
|stbd ||This daemon was previously necessary for gnome-system-tools. However, as of gnome-tools 2.28, it is no longer needed.<br />
|-<br />
|syslogd||This was the older and basic system logger.<br />
|-<br />
|syslog-ng||System logger next generation.<br />
|-<br />
|}</div>MadCatMk2