https://wiki.archlinux.org/api.php?action=feedcontributions&user=JoshuaBranson&feedformat=atomArchWiki - User contributions [en]2024-03-28T20:37:18ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Font_configuration&diff=523117Font configuration2018-05-25T18:00:31Z<p>JoshuaBranson: /* Applications without fontconfig support */ I removed Emacs. Modern Emacs does support fontconfig.</p>
<hr />
<div>[[Category:Fonts]]<br />
[[it:Font configuration]]<br />
[[ja:フォント設定]]<br />
[[ru:Font configuration]]<br />
[[sr:Font configuration]]<br />
[[zh-hans:Font configuration]]<br />
{{Related articles start}}<br />
{{Related|Fonts}}<br />
{{Related|Font configuration/Examples}}<br />
{{Related|Java Runtime Environment Fonts}}<br />
{{Related|Metric-compatible fonts}}<br />
{{Related|MS Fonts}}<br />
{{Related|X Logical Font Description}}<br />
{{Related articles end}}<br />
<br />
[http://www.freedesktop.org/wiki/Software/fontconfig/ Fontconfig] is a library designed to provide a list of available [[fonts]] to applications, and also for configuration for how fonts get rendered: see [[Wikipedia:Fontconfig]]. The FreeType library {{Pkg|freetype2}} renders the fonts, based on this configuration.<br />
<br />
Though Fontconfig is the standard in modern Linux, some applications rely on the original method of font selection and display, the [[X Logical Font Description]].<br />
<br />
The font rendering packages on Arch Linux includes support for ''freetype2'' with the bytecode interpreter (BCI) enabled. For better font rendering, especially with an LCD monitor, see [[#Fontconfig configuration]] and [[Font configuration/Examples]].<br />
<br />
== Font paths ==<br />
<br />
For fonts to be known to applications, they must be cataloged for easy and quick access.<br />
<br />
The font paths initially known to Fontconfig are: {{ic|/usr/share/fonts/}}, {{ic|~/.local/share/fonts}} (and {{ic|~/.fonts/}}, now deprecated). Fontconfig will scan these directories recursively. For ease of organization and installation, it is recommended to use these font paths when [[adding fonts]].<br />
<br />
To see a list of known Fontconfig fonts:<br />
<br />
$ fc-list : file<br />
<br />
See {{man|1|fc-list}} for more output formats.<br />
<br />
Check for Xorg's known font paths by reviewing its log:<br />
<br />
$ grep /fonts ~/.local/share/xorg/Xorg.0.log<br />
<br />
{{Tip|<br />
* You can also check the list of [[Xorg]]'s known font paths using the command {{ic|xset q}}.<br />
* Use {{ic|/var/log/Xorg.0.log}} if Xorg is run with root privileges.<br />
}}<br />
<br />
Keep in mind that Xorg does not search recursively through the {{ic|/usr/share/fonts/}} directory like Fontconfig does. To add a path, the full path must be used:<br />
<br />
Section "Files"<br />
FontPath "/usr/share/fonts/local/"<br />
EndSection<br />
<br />
If you want font paths to be set on a per-user basis, you can add and remove font paths from the default by adding the following line(s) to {{ic|~/.xinitrc}}:<br />
<br />
xset +fp /usr/share/fonts/local/ # Prepend a custom font path to Xorg's list of known font paths<br />
xset -fp /usr/share/fonts/sucky_fonts/ # Remove the specified font path from Xorg's list of known font paths<br />
<br />
To see a list of known Xorg fonts use {{ic|xlsfonts}}, from the {{Pkg|xorg-xlsfonts}} package.<br />
<br />
== Fontconfig configuration ==<br />
<br />
Fontconfig is documented in the [http://www.freedesktop.org/software/fontconfig/fontconfig-user.html fonts-conf] man page.<br />
<br />
Configuration can be done per-user through {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}}, and globally with {{ic|/etc/fonts/local.conf}}. The settings in the per-user configuration have precedence over the global configuration. Both these files use the same syntax.<br />
{{Note|Configuration files and directories: {{ic|~/.fonts.conf/}}, {{ic|~/.fonts.conf.d/}} and {{ic|~/.fontconfig/*.cache-*}} are deprecated since {{Pkg|fontconfig}} 2.10.1 ([http://cgit.freedesktop.org/fontconfig/commit/?id&#61;8c255fb185d5651b57380b0a9443001e8051b29d upstream commit]) and will not be read by default in the future versions of the package. New paths are {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}}, {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/NN-name.conf}} and {{ic|$XDG_CACHE_HOME/fontconfig/*.cache-*}} respectively. If using the second location, make sure the naming is valid (where {{ic|NN}} is a two digit number like {{ic|00}}, {{ic|10}}, or {{ic|99}}).}}<br />
<br />
Fontconfig gathers all its configurations in a central file ({{ic|/etc/fonts/fonts.conf}}). This file is replaced during fontconfig updates and should not be edited. Fontconfig-aware applications source this file to know available fonts and how they get rendered. This file is a conglomeration of rules from the global configuration ({{ic|/etc/fonts/local.conf}}), the configured presets in {{ic|/etc/fonts/conf.d/}}, and the user configuration file ({{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}}). {{ic|fc-cache}} can be used to rebuild fontconfig's configuration, although changes will only be visible in newly launched applications.<br />
<br />
{{Note|For some desktop environments (such as [[GNOME]] and [[KDE]]) using the ''Font Control Panel'' will automatically create or overwrite the user font configuration file. For these desktop environments, it is best to match your already defined font configurations to get the expected behavior. Also ensure that the desktop [[locale]] settings or ''Regional Settings'' are supported by the configured fonts, if not the font configuration could be overidden.}}<br />
<br />
Fontconfig configuration files use [[Wikipedia:XML|XML]] format and need these headers:<br />
<br />
{{bc|<nowiki><br />
<?xml version="1.0"?><br />
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"><br />
<fontconfig><br />
<br />
<!-- settings go here --><br />
<br />
</fontconfig><br />
</nowiki>}}<br />
<br />
The configuration examples in this article omit these tags.<br />
<br />
=== Presets ===<br />
<br />
There are presets installed in the directory {{ic|/etc/fonts/conf.avail}}. They can be enabled by creating [[Wikipedia:Symbolic link|symbolic link]]s to them, both per-user and globally, as described in {{ic|/etc/fonts/conf.d/README}}. These presets will override matching settings in their respective configuration files.<br />
<br />
For example, to enable sub-pixel RGB rendering globally:<br />
<br />
# cd /etc/fonts/conf.d<br />
# ln -s ../conf.avail/10-sub-pixel-rgb.conf<br />
<br />
To do the same but instead for a per-user configuration:<br />
<br />
$ mkdir $XDG_CONFIG_HOME/fontconfig/conf.d<br />
$ ln -s /etc/fonts/conf.avail/10-sub-pixel-rgb.conf $XDG_CONFIG_HOME/fontconfig/conf.d<br />
<br />
=== Anti-aliasing ===<br />
<br />
[[Wikipedia:Font rasterization|Font rasterization]] converts vector font data to bitmap data so that it can be displayed. The result can appear jagged due to [[Wikipedia:Aliasing|aliasing]]. The technique known as [[Wikipedia:Anti-aliasing|anti-aliasing]] can be used to increase the apparent resolution of font edges. Anti-aliasing is '''enabled''' by default. To disable it:<br />
<br />
{{bc|<nowiki><br />
<match target="font"><br />
<edit name="antialias" mode="assign"><br />
<bool>false</bool><br />
</edit><br />
</match><br />
</nowiki>}}<br />
<br />
{{Note|Some applications, like [[GNOME]] may [[#Troubleshooting|override default anti-aliasing settings]].}}<br />
<br />
=== Hinting ===<br />
<br />
[[Wikipedia:Font hinting|Font hinting]] (also known as instructing) is the use of mathematical instructions to adjust the display of an outline font so that it lines up with a rasterized grid (i.e. the pixel grid of the display). Its intended effect is to make fonts appear more crisp so that they are more readable. Fonts will line up correctly without hinting when displays have around 300 [[Wikipedia:Dots per inch|DPI]].<br />
<br />
==== Byte-Code Interpreter (BCI) ====<br />
<br />
Using BCI hinting, instructions in TrueType fonts are rendered according to FreeTypes's interpreter. BCI hinting works well with fonts with good hinting instructions. Hinting is '''enabled''' by default. To disable it:<br />
<br />
{{bc|<nowiki><br />
<match target="font"><br />
<edit name="hinting" mode="assign"><br />
<bool>false</bool><br />
</edit><br />
</match><br />
</nowiki>}}<br />
<br />
{{Note|1=You can switch BCI implementations by editing {{ic|/etc/profile.d/freetype2.sh}} which includes a brief documentation. Possible values are {{ic|1=truetype:interpreter-version=35}} (classic mode, emulates Windows 98; 2.6 default), {{ic|1=truetype:interpreter-version=38}} ("Infinality" subpixel mode), {{ic|1=truetype:interpreter-version=40}} (minimal subpixel mode; 2.7 default). Subpixel rendering should use a subpixel BCI. For details, see [https://www.freetype.org/freetype2/docs/subpixel-hinting.html].}}<br />
<br />
==== Autohinter ====<br />
<br />
The autohinter attempts to do automatic hinting and disregards any existing hinting information. Originally it was the default because TrueType2 fonts were patent-protected but now that these patents have expired there is very little reason to use it. It does work better with fonts that have broken or no hinting information but it will be strongly sub-optimal for fonts with good hinting information. Generally common fonts are of the later kind so autohinter will not be useful. Autohinter is '''disabled''' by default. To enable it:<br />
<br />
{{bc|<nowiki><br />
<match target="font"><br />
<edit name="autohint" mode="assign"><br />
<bool>true</bool><br />
</edit><br />
</match><br />
</nowiki>}}<br />
<br />
==== Hintstyle ====<br />
<br />
Hintstyle is the amount of font reshaping done to line up to the grid. Hinting values are: {{ic|hintnone}}, {{ic|hintslight}}, {{ic|hintmedium}}, and {{ic|hintfull}}. {{ic|hintslight}} will make the font more fuzzy to line up to the grid but will be better in retaining font shape (see [https://www.freetype.org/freetype2/docs/text-rendering-general.html]), while {{ic|hintfull}} will be a crisp font that aligns well to the pixel grid but will lose a greater amount of font shape. {{ic|hintslight}} implicitly uses the autohinter in a vertical-only mode in favor of font-native information for non-CFF (''.otf'') fonts.<br />
<br />
'''{{ic|hintslight}}''' is the default setting. To change it:<br />
<br />
{{bc|<nowiki><br />
<match target="font"><br />
<edit name="hintstyle" mode="assign"><br />
<const>hintnone</const><br />
</edit><br />
</match><br />
</nowiki>}}<br />
<br />
{{Note|Some applications, like [[GNOME]] may [[#Troubleshooting|override default hinting settings.]]}}<br />
<br />
=== Pixel alignment ===<br />
<br />
Most monitors manufactured today use the Red, Green, Blue (RGB) specification. Fontconfig will need to know your monitor type to be able to display your fonts correctly. Monitors are either: '''RGB''' (most common), '''BGR''', '''V-RGB''' (vertical), or '''V-BGR'''. A monitor test can be found [http://www.lagom.nl/lcd-test/subpixel.php here].<br />
<br />
{{bc|<nowiki><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>rgb</const><br />
</edit><br />
</match><br />
</nowiki>}}<br />
<br />
{{Note|Without subpixel rendering (see below), freetype will only care about the alignment (vertical or horizontal) of the subpixels. There is no difference between '''RGB''' and '''BGR''', for example.}}<br />
<br />
=== Subpixel rendering ===<br />
<br />
[[wikipedia:Subpixel_rendering|Subpixel rendering]] is a technique to improve sharpness of font rendering by effectively tripling the horizontal (or vertical) resolution through the use of subpixels. On Windows machines, this technique is called "ClearType". Subpixel rendering is covered by Microsoft patents and '''disabled''' by default on Arch Linux. To enable it, you have to re-compile {{pkg|freetype2}} and define the {{ic|FT_CONFIG_OPTION_SUBPIXEL_RENDERING}} macro, or use e.g. the AUR package {{AUR|freetype2-cleartype}}.<br />
<br />
To enable subpixel rendering, make sure that correct pixel alignment (see above) is configured.<br />
<br />
==== LCD filter ====<br />
<br />
When using subpixel rendering, you should enable the LCD filter, which is designed to reduce colour fringing. This is described under [http://www.freetype.org/freetype2/docs/reference/ft2-lcd_filtering.html LCD filtering] in the FreeType 2 API reference. Different options are described under [http://www.freetype.org/freetype2/docs/reference/ft2-lcd_filtering.html#FT_LcdFilter FT_LcdFilter], and are illustrated by this [http://www.spasche.net/files/lcdfiltering/ LCD filter test] page.<br />
<br />
The {{ic|lcddefault}} filter will work for most users. Other filters are available that can be used in special situations: {{ic|lcdlight}}; a lighter filter ideal for fonts that look too bold or fuzzy, {{ic|lcdlegacy}}, the original Cairo filter; and {{ic|lcdnone}} to disable it entirely.<br />
<br />
{{bc|<nowiki><br />
<match target="font"><br />
<edit name="lcdfilter" mode="assign"><br />
<const>lcddefault</const><br />
</edit><br />
</match><br />
</nowiki>}}<br />
<br />
==== Advanced LCD filter specification ====<br />
<br />
{{Out of date|Instructions use obsolete abs command to retrieve PKGBUILD.}}<br />
<br />
If the available built-in LCD filters are not satisfactory, it is possible to tweak the font rendering very specifically by building a custom freetype2 package and modifying the hardcoded filters. The [[Arch Build System]] can be used to build and install packages from source.<br />
<br />
First, refresh the freetype2 PKGBUILD as root:<br />
<br />
# abs extra/freetype2<br />
<br />
This example uses {{ic|/var/abs/build}} as the build directory, substitute it according to your personal ABS setup. Download and extract the freetype2 package as a regular user:<br />
<br />
$ cd /var/abs/build<br />
$ cp -r ../extra/freetype2 .<br />
$ cd freetype2<br />
$ makepkg -o<br />
<br />
Enable subpixel rendering by editing the file {{ic|src/freetype-VERSION/include/freetype/config/ftoption.h}} and uncommenting the {{ic|FT_CONFIG_OPTION_SUBPIXEL_RENDERING}} macro.<br />
<br />
Then, edit the file {{ic|src/freetype-VERSION/src/base/ftlcdfil.c}} and look up the definition of the constant {{ic|default_filter[5]}}:<br />
<br />
static const FT_Byte default_filter[5] =<br />
{ 0x10, 0x40, 0x70, 0x40, 0x10 };<br />
<br />
This constant defines a low-pass filter applied to the rendered glyph. Modify it as needed. (reference: [https://lists.nongnu.org/archive/html/freetype/2006-09/msg00069.html freetype list discussion]) Save the file, build and install the custom package:<br />
<br />
$ makepkg -e<br />
# pacman -Rd freetype2<br />
# pacman -U freetype2-VERSION-ARCH.pkg.tar.xz<br />
<br />
Reboot or restart X. The lcddefault filter should now render fonts differently.<br />
<br />
=== Disable auto-hinter for bold fonts ===<br />
<br />
The auto-hinter uses sophisticated methods for font rendering, but often makes bold fonts too wide. Fortunately, a solution can be turning off the autohinter for bold fonts while leaving it on for the rest:<br />
<br />
...<br />
<match target="font"><br />
<test name="weight" compare="more"><br />
<const>medium</const><br />
</test><br />
<edit name="autohint" mode="assign"><br />
<bool>false</bool><br />
</edit><br />
</match><br />
...<br />
<br />
=== Replace or set default fonts ===<br />
<br />
The most reliable way to do this is to add an XML fragment similar to the one below. ''Using the "binding" attribute will give you better results'', for example, in Firefox where you may not want to change properties of font being replaced. This will cause Ubuntu to be used in place of Georgia:<br />
<br />
{{bc|<nowiki><br />
...<br />
<match target="pattern"><br />
<test qual="any" name="family"><string>georgia</string></test><br />
<edit name="family" mode="assign" binding="same"><string>Ubuntu</string></edit><br />
</match><br />
...<br />
</nowiki>}}<br />
<br />
An alternate approach is to set the "preferred" font, but ''this only works if the original font is not on the system'', in which case the one specified will be substituted:<br />
<br />
{{bc|<nowiki><br />
...<br />
<!-- Replace Helvetica with Bitstream Vera Sans Mono --><br />
<!-- Note, an alias for Helvetica should already exist in default conf files --><br />
<alias><br />
<family>Helvetica</family><br />
<prefer><family>Bitstream Vera Sans Mono</family></prefer><br />
<default><family>fixed</family></default><br />
</alias><br />
...<br />
</nowiki>}}<br />
<br />
=== Whitelisting and blacklisting fonts ===<br />
<br />
The element {{ic|<selectfont>}} is used in conjunction with the {{ic|<acceptfont>}} and {{ic|<rejectfont>}} elements to selectively whitelist or blacklist fonts from the resolve list and match requests. The simplest and most typical use case it to reject one font that is needed to be installed, however is getting matched for a generic font query that is causing problems within application user interfaces.<br />
<br />
First obtain the Family name as listed in the font itself:<br />
<br />
{{hc|1=$ fc-scan .fonts/lklug.ttf --format='%{family}\n'|2=<br />
LKLUG<br />
}}<br />
<br />
Then use that Family name in a {{ic|<rejectfont>}} stanza:<br />
<br />
{{bc|<nowiki><br />
<selectfont><br />
<rejectfont><br />
<pattern><br />
<patelt name="family" ><br />
<string>LKLUG</string><br />
</patelt><br />
</pattern><br />
</rejectfont><br />
</selectfont><br />
</nowiki>}}<br />
<br />
Typically when both elements are combined, {{ic|<rejectfont>}} is first used on a more general matching glob to reject a large group (such as a whole directory), then {{ic|<acceptfont>}} is used after it to whitelist individual fonts out of the larger blacklisted group.<br />
<br />
{{bc|<nowiki><br />
<selectfont><br />
<rejectfont><br />
<glob>/usr/share/fonts/OTF/*</glob><br />
</rejectfont><br />
<acceptfont><br />
<pattern><br />
<patelt name="family" ><br />
<string>Monaco</string><br />
</patelt><br />
</pattern><br />
</acceptfont><br />
</selectfont><br />
</nowiki>}}<br />
<br />
=== Disable bitmap fonts ===<br />
<br />
Bitmap fonts are sometimes used as fallbacks for missing fonts, which may cause text to be rendered pixelated or too large. Use the {{ic|70-no-bitmaps.conf}} [[#Presets|preset]] to disable this behavior. <br />
<br />
To disable embedded bitmap for all fonts:<br />
<br />
{{hc|~/.config/fontconfig/conf.d/20-no-embedded.conf|<nowiki><br />
<?xml version="1.0"?><br />
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"><br />
<fontconfig><br />
<match target="font"><br />
<edit name="embeddedbitmap" mode="assign"><br />
<bool>false</bool><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
To disable embedded bitmap fonts for a specific font:<br />
<br />
<match target="font"><br />
<test qual="any" name="family"><br />
<string>Monaco</string><br />
</test><br />
<edit name="embeddedbitmap"><br />
<bool>false</bool><br />
</edit><br />
</match><br />
<br />
=== Disable scaling of bitmap fonts ===<br />
<br />
To disable scaling of bitmap fonts (which often makes them blurry), remove {{ic|/etc/fonts/conf.d/10-scale-bitmap-fonts.conf}}.<br />
<br />
=== Create bold and italic styles for incomplete fonts ===<br />
<br />
FreeType has the ability to automatically create ''italic'' and '''bold''' styles for fonts that do not have them, but only if explicitly required by the application. Given programs rarely send these requests, this section covers manually forcing generation of missing styles.<br />
<br />
Start by editing {{ic|/usr/share/fonts/fonts.cache-1}} as explained below. Store a copy of the modifications on another file, because a font update with {{ic|fc-cache}} will overwrite {{ic|/usr/share/fonts/fonts.cache-1}}.<br />
<br />
Assuming the Dupree font is installed:<br />
<br />
"dupree.ttf" 0 "Dupree:style=Regular:slant=0:weight=80:width=100:foundry=unknown:index=0:outline=True:''etc...''<br />
<br />
Duplicate the line, change {{ic|1=style=Regular}} to {{ic|1=style=Bold}} or any other style. Also change {{ic|1=slant=0}} to {{ic|1=slant=100}} for italic, {{ic|1=weight=80}} to {{ic|1=weight=200}} for bold, or combine them for '''''bold italic''''':<br />
<br />
"dupree.ttf" 0 "Dupree:style=Bold Italic:slant=100:weight=200:width=100:foundry=unknown:index=0:outline=True:''etc...''<br />
<br />
Now add necessary modifications to {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}}:<br />
<br />
{{bc|<nowiki><br />
...<br />
<match target="font"><br />
<test name="family" qual="any"><br />
<string>Dupree</string><br />
&lt;!-- other fonts here .... --&gt;<br />
</test><br />
<test name="weight" compare="more_eq"><int>140</int></test><br />
<edit name="embolden" mode="assign"><bool>true</bool></edit><br />
</match><br />
<br />
<match target="font"><br />
<test name="family" qual="any"><br />
<string>Dupree</string><br />
&lt;!-- other fonts here .... --&gt;<br />
</test><br />
<test name="slant" compare="more_eq"><int>80</int></test><br />
<edit name="matrix" mode="assign"><br />
<times><br />
<name>matrix</name><br />
<matrix><br />
<double>1</double><double>0.2</double><br />
<double>0</double><double>1</double><br />
</matrix><br />
</times><br />
</edit><br />
</match><br />
...<br />
</nowiki>}}<br />
<br />
{{Tip| Use the value {{ic|embolden}} for existing bold fonts in order to make them even bolder.}}<br />
<br />
=== Change rule overriding ===<br />
<br />
{{Accuracy|{{ic|/etc/fonts/conf.d/50-user.conf}} will be created again when {{Pkg|fontconfig}} is updated}}<br />
<br />
Fontconfig processes files in {{ic|/etc/fonts/conf.d}} in numerical order. This enables rules or files to override one another, but often confuses users about what file gets parsed last.<br />
<br />
To guarantee that personal settings take precedence over any other rules, change their ordering:<br />
<br />
# cd /etc/fonts/conf.d<br />
# mv 50-user.conf 99-user.conf<br />
<br />
This change seems however to be unnecessary for the most of the cases, because a user is given enough control by default to set up own font preferences, hinting and antialiasing properties, alias new fonts to generic font families, etc.<br />
<br />
=== Query the current settings ===<br />
<br />
To find out what settings are in effect, use {{ic|fc-match --verbose}}. eg.<br />
<br />
{{hc|$ fc-match --verbose Sans|<br />
family: "DejaVu Sans"(s)<br />
hintstyle: 3(i)(s)<br />
hinting: True(s)<br />
...<br />
}}<br />
<br />
Look up the meaning of the numbers at http://www.freedesktop.org/software/fontconfig/fontconfig-user.html. Eg. 'hintstyle: 3' means 'hintfull'<br />
<br />
== Applications without fontconfig support ==<br />
<br />
Some applications like [[URxvt]] will ignore fontconfig settings. You can work around this by using {{ic|~/.Xresources}}, but it is as flexible as fontconfig. Example (see [[#Fontconfig configuration]] for explanations of the options):<br />
<br />
{{hc|~/.Xresources|<nowiki><br />
Xft.autohint: 0<br />
Xft.lcdfilter: lcddefault<br />
Xft.hintstyle: hintslight<br />
Xft.hinting: 1<br />
Xft.antialias: 1<br />
Xft.rgba: rgb<br />
</nowiki>}}<br />
<br />
Make sure the settings are loaded properly when X starts with {{ic|xrdb -q}} (see [[Xresources]] for more information).<br />
<br />
== Troubleshooting ==<br />
<br />
=== Distorted fonts ===<br />
<br />
{{Note|96 DPI is not a standard. You should use your monitor's actual DPI to get proper font rendering, especially when using subpixel rendering.}}<br />
<br />
If fonts are still unexpectedly large or small, poorly proportioned or simply rendering poorly, fontconfig may be using the incorrect DPI.<br />
<br />
Fontconfig should be able to detect DPI parameters as discovered by the Xorg server. You can check the automatically discovered DPI with {{ic|xdpyinfo}} (provided by the {{pkg|xorg-xdpyinfo}} package):<br />
<br />
{{hc|$ xdpyinfo {{!}} grep dots|<br />
resolution: 102x102 dots per inch<br />
}}<br />
<br />
If the DPI is detected incorrectly (usually due to an incorrect monitor [[Wikipedia:Extended Display Identification Data|EDID]]), you can specify it manually in the Xorg configuration, see [[Xorg#Display size and DPI]]. This is the recommended solution, but it may not work with buggy drivers.<br />
<br />
Fontconfig will default to the Xft.dpi variable if it is set. Xft.dpi is usually set by desktop environments (usually to Xorg's DPI setting) or manually in {{ic|~/.Xdefaults}} or {{ic|~/.Xresources}}. Use xrdb to query for the value:<br />
<br />
{{hc|$ xrdb -query {{!}} grep dpi|<br />
Xft.dpi: 102<br />
}}<br />
<br />
Those still having problems can fall back to manually setting the DPI used by fontconfig:<br />
<br />
...<br />
<!-- Setup for DPI=96 --><br />
<match target="pattern"><br />
<edit name="dpi" mode="assign"><double>102</double></edit><br />
</match><br />
...<br />
<br />
=== Calibri, Cambria, Monaco, etc. not rendering properly ===<br />
<br />
Some scalable fonts have embedded bitmap versions which are rendered instead, mainly at smaller sizes. Using [[Metric-compatible fonts]] as replacements can improve the rendering in these cases. <br />
<br />
You can also force using scalable fonts at all sizes by [[#Disable bitmap fonts|disabling embedded bitmap]], sacrificing some rendering quality.<br />
<br />
=== Applications overriding hinting ===<br />
<br />
Some applications or desktop environments may override default fontconfig hinting and anti-aliasing settings. This may happen with [[GNOME]] 3, for example while you are using Qt applications like {{pkg|vlc}} or {{pkg|smplayer}}. Use the specific configuration program for the application in such cases. For GNOME, try {{Pkg|gnome-tweaks}}.<br />
<br />
=== Applications not picking up hinting from DE's settings ===<br />
<br />
For instance, under GNOME it sometimes happens that Firefox applies full hinting even when it's set to "none" in GNOME's settings, which results in sharp and widened fonts. In this case you would have to add hinting settings to your {{ic|fonts.conf}} file:<br />
<br />
<?xml version='1.0'?><br />
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> <br />
<fontconfig><br />
<match target="font"><br />
<edit mode="assign" name="hinting"><br />
<bool>false</bool><br />
</edit><br />
</match><br />
</fontconfig><br />
<br />
In this example, hinting is set to "grayscale".<br />
<br />
=== Incorrect hinting in GTK applications on non-Gnome systems ===<br />
<br />
{{Accuracy|Mentions GTK relies on fontconfig, then claims that "some" fonts get the hinting "wrong", and ends up refering to Xft (but see e.g [http://doc.opensuse.org/documentation/html/openSUSE_113/opensuse-reference/cha.fontconfig.html#sec.fontconfig.xft]). IOW, unsupported claims and unclear relations}}<br />
<br />
[[GNOME]] uses the XSETTINGS system to configure font rendering. Outside of GNOME, GTK applications rely on fontconfig, but some fonts get the hinting wrong causing them to look too bold or too light. <br />
<br />
A simple solution is using {{AUR|xsettingsd-git}} to provide the configuration, for example:<br />
<br />
{{hc|~/.xsettingsd|<br />
Xft/Hinting 1<br />
Xft/RGBA "rgb"<br />
Xft/HintStyle "hintslight"<br />
Xft/Antialias 1<br />
}}<br />
<br />
Alternatively you could just write the font configuration as {{ic|Xft.*}} directives in {{ic|~/.Xresources}} without using a settings daemon.<br />
<br />
=== Helvetica font problem in generated PDFs ===<br />
<br />
If the following command<br />
<br />
fc-match helvetica<br />
<br />
produces<br />
<br />
helvR12-ISO8859-1.pcf.gz: "Helvetica" "Regular"<br />
<br />
then the bitmap font provided by {{Pkg|xorg-fonts-75dpi}} is likely to be embedded into PDFs generated by "Print to File" or "Export" in various applications. The bitmap font was probably installed as a consequence of installing the whole {{Grp|xorg}} group (which is usually NOT recommended). To solve the pixelized font problem, you can uninstall the package. Install {{Pkg|gsfonts}} (Type 1) or {{Pkg|tex-gyre-fonts}} (OpenType) for corresponding free subsitute of Helvetica (and other PostScript/PDF base fonts).<br />
<br />
You may also experience similar problem when you open a PDF which requires Helvetica but does not have it embedded for viewing.<br />
<br />
=== FreeType Breaking Bitmap Fonts ===<br />
<br />
Some users are reporting problems ({{Bug|52502}}) with bitmap fonts having changed names after upgrading {{Pkg|freetype2}} to version 2.7.1, creating havok in terminal emulators and several other programs such as {{AUR|dwm}} or {{Pkg|dmenu}} by falling back to another (different) font. This was caused by the changes to the PCF font family format, which is described in their ''release notes'' [https://sourceforge.net/projects/freetype/files/freetype2/2.7.1/]. Users transitioning from the old format might want to create a ''font alias'' to remedy the problems, like the solution which is described in [https://forum.manjaro.org/t/terminus-font-name-fix-after-freetype2-update-to-2-7-1-1/15530], given here too:<br />
<br />
Assume we want to create an alias for {{Pkg|terminus-font}}, which was renamed from {{ic|Terminus}} to {{ic|xos4 Terminus}} in the previously described {{Pkg|freetype2}} update:<br />
* Create a configuration file in {{ic|/etc/fonts/conf.avail/}} for the ''font alias'':<br />
{{hc|/etc/fonts/conf.avail/33-TerminusPCFFont.conf|<nowiki><br />
<?xml version="1.0"?><br />
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"><br />
<fontconfig><br />
<alias><br />
<family>Terminus</family><br />
<prefer><family>xos4 Terminus</family></prefer><br />
<default><family>fixed</family></default><br />
</alias><br />
</fontconfig><br />
</nowiki>}}<br />
* Create a symbolic link towards it in the {{ic|/etc/fonts/conf.d}} directory. In our example we would link as follows: {{ic|ln -s /etc/fonts/conf.avail/33-TerminusPCFFont.conf /etc/fonts/conf.d}} to make the change permanent.<br />
Everything should now work as it did before the update, the ''font alias'' should not be in effect, but make sure to either reload {{ic|.Xresources}} or restart the display server first so the affected programs can use the alias.<br />
<br />
== See also ==<br />
<br />
* [http://www.freedesktop.org/software/fontconfig/fontconfig-user.html Fontconfig Users' Guide]<br />
* [http://www.x.org/X11R6.8.2/doc/fonts.html Fonts in X11R6.8.2] - Official Xorg font information<br />
* [http://freetype.sourceforge.net/freetype2/ FreeType 2 overview]<br />
* [https://forums.gentoo.org/viewtopic-t-723341.html Gentoo font-rendering thread]<br />
* [http://www.freetype.org/freetype2/docs/text-rendering-general.html On slight hinting]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Isync&diff=473249Isync2017-04-07T21:34:27Z<p>JoshuaBranson: /* Configuring */ changed wording again.</p>
<hr />
<div>{{DISPLAYTITLE:isync}}<br />
[[Category:Email clients]]<br />
[[ja:Isync]]<br />
isync is a command line application which synchronizes mailboxes; currently Maildir and IMAP4 mailboxes are supported. New messages, message deletions and flag changes can be propagated both ways.<br />
<br />
Synchronization is based on unique message identifiers (UIDs), so no identification conflicts can occur (as opposed to some other mail synchronizers).<br />
Synchronization state is kept in one local text file per mailbox pair; multiple replicas of a mailbox can be maintained.<br />
{{note|isync is the name of the project, mbsync is the name of the executable}}<br />
<br />
==Features==<br />
<br />
*Fine-grained selection of synchronization operations to perform<br />
*Synchronizes single mailboxes or entire mailbox collections<br />
*Partial mirrors possible: keep only the latest messages locally<br />
*Trash functionality: backup messages before removing them<br />
*IMAP features:<br />
**Security: supports TLS/SSL via imaps: (port 993) and STARTTLS; CRAM-MD5 for authentication<br />
**Supports NAMESPACE for simplified configuration<br />
**Pipelining for maximum speed (currently only partially implemented)<br />
<br />
==Installing==<br />
Install {{Pkg|isync}} from the [[official repositories]] or {{AUR|isync-git}} can be installed from the [[AUR]].<br />
<br />
==Configuring==<br />
<br />
<br />
{{Note| Google appears to block isync from downloading emails by default. You need to change your account's security preferences. Toggle "Allow less secure apps" to "on" on [https://myaccount.google.com/security Google's Security Page] Also not that isync does is not an insecure app. }}<br />
<br />
<br />
First create and customize the main configuration file using this example ~/.mbsyncrc:<br />
{{hc|~/.mbsyncrc|2=<br />
<nowiki><br />
IMAPAccount gmail<br />
# Address to connect to<br />
Host imap.gmail.com<br />
User username@gmail.com<br />
Pass ***************<br />
# To store the password in an encrypted file use PassCmd instead of Pass<br />
# PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.mailpass.gpg"<br />
#<br />
# Use SSL<br />
SSLType IMAPS<br />
# The following line should work. If get certificate errors, uncomment the two following lines and read the "Troubleshooting" section.<br />
CertificateFile /etc/ssl/certs/ca-certificates.crt<br />
#CertificateFile ~/.cert/imap.gmail.com.pem<br />
#CertificateFile ~/.cert/Equifax_Secure_CA.pem<br />
<br />
IMAPStore gmail-remote<br />
Account gmail<br />
<br />
MaildirStore gmail-local<br />
# The trailing "/" is important<br />
Path ~/.mail/gmail/<br />
Inbox ~/.mail/gmail/Inbox<br />
<br />
Channel gmail<br />
Master :gmail-remote:<br />
Slave :gmail-local:<br />
# Exclude everything under the internal [Gmail] folder, except the interesting folders<br />
Patterns * ![Gmail]* "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail"<br />
# Or include everything<br />
#Patterns *<br />
# Automatically create missing mailboxes, both locally and on the server<br />
Create Both<br />
# Save the synchronization state files in the relevant directory<br />
SyncState *<br />
</nowiki><br />
}}<br />
<br />
To get rid of the [Gmail]-Stuff (or [Google Mail] as in my case) in each mailbox name, it's possible to use separate Channels for each directory, and later merge them to a group:<br />
{{hc|~/.mbsyncrc|2=<br />
<nowiki><br />
Channel sync-googlemail-default<br />
Master :googlemail-remote:<br />
Slave :googlemail-local:<br />
# Select some mailboxes to sync<br />
Patterns "INBOX" "arch"<br />
<br />
Channel sync-googlemail-sent<br />
Master :googlemail-remote:"[Google Mail]/Gesendet"<br />
Slave :googlemail-local:sent<br />
<br />
Channel sync-googlemail-trash<br />
Master :googlemail-remote:"[Google Mail]/Papierkorb"<br />
Slave :googlemail-local:trash<br />
<br />
# Get all the channels together into a group.<br />
Group googlemail<br />
Channel sync-googlemail-default<br />
Channel sync-googlemail-sent<br />
Channel sync-googlemail-trash<br />
</nowiki><br />
}}<br />
As you can see, name-translations are possible this way, as well. Now calling<br />
mbsync googlemail<br />
will sync all the folders.<br />
<br />
==Usage==<br />
First make any folders that were specified as Maildirs.<br />
$ mkdir -p ~/.mail/gmail<br />
Then to retrieve the mail for a specific channel run:<br />
$ mbsync gmail<br />
or to retrive the mail for all channels:<br />
$ mbsync -a<br />
<br />
==Automatic synchronization==<br />
If you want to automatically synchronize your mailboxes, isync can be started automatically with a [[systemd]] unit. The following service file can start the '''mbsync''' command :<br />
<br />
{{hc|/etc/systemd/system/mbsync@.service|2=<br />
<nowiki><br />
[Unit]<br />
Description=Mailbox synchronization service for user %I<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/mbsync -Va<br />
User=%i<br />
StandardOutput=syslog<br />
StandardError=syslog<br />
</nowiki><br />
}}<br />
<br />
{{Note|It's possible this service could trigger without an internet connection. A solution is to add the following into the Unit section:<br />
{{ic|<nowiki>After=network.target network-online.target dbus.socket</nowiki>}}}}<br />
<br />
<br />
The following timer configures '''mbsync''' to be started every 2 hours :<br />
<br />
{{hc|/etc/systemd/system/mbsync@.timer|2=<br />
<nowiki><br />
[Unit]<br />
Description=Mailbox synchronization timer<br />
<br />
[Timer]<br />
OnCalendar=*-*-* 00/2:00:00<br />
Persistent=true<br />
Unit=mbsync@%i.service<br />
<br />
[Install]<br />
WantedBy=timers.target<br />
</nowiki><br />
}}<br />
<br />
Once those two files are created, [[reload]] systemd, then [[enable]] and [[start]] {{ic|mbsync@''user''.timer}}, replacing {{ic|''user''}} with your username..<br />
<br />
===Integration with notmuch===<br />
<br />
If you want to run [[notmuch]] after automatically synchronizing your mails, it is preferable to modify the above {{ic|mbsync@.service}} by adding a post-start hook, like below:<br />
<br />
{{hc|/etc/systemd/system/mbsync@.service|2=<br />
<nowiki><br />
[Unit]<br />
Description=Mailbox synchronization service for user %I<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/mbsync -Va<br />
ExecStartPost=/usr/bin/notmuch new<br />
User=%i<br />
StandardOutput=syslog<br />
StandardError=syslog<br />
</nowiki><br />
}}<br />
<br />
This modification assumes that you have already setup notmuch for your user. If the ExecStart command does not execute successfully, the ExecStartPost command will not execute, so be aware of this!<br />
<br />
==Troubleshooting==<br />
If you get certificate related errors like<br />
{{bc|<br />
<nowiki><br />
SSL error connecting pop.mail.com (193.222.111.111:143): error:00000012:lib(0):func(0):reason(18) <br />
</nowiki><br />
}}<br />
<br />
you may need to retrieve the server's certificates manually in order for mbsync to correctly verify it.<br />
<br />
=== Step #1: Get the certificates ===<br />
<br />
{{Accuracy|This may not always be needed, e.g. for gmail {{ic|CertificateFile /etc/ssl/certs/ca-certificates.crt}} in the config file may be suffcient|section=Step #1: Get the certificates}}<br />
<br />
{{bc|<br />
<nowiki><br />
$ mkdir ~/.cert<br />
$ openssl s_client -connect some.imap.server:port -showcerts 2>&1 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sed -ne '1,/-END CERTIFICATE-/p' > ~/.cert/some.imap.server.pem<br />
</nowiki><br />
}}<br />
<br />
This will create a certificate file called {{ic|~/.cert/some.imap.server.pem}} (e.g. {{ic|~/.cert/imap.gmail.com.pem}}). Alternatively one can download [https://gist.githubusercontent.com/petRUShka/af96ae25ce8280729b9ea049b929f31d/raw/a79471ce8aee3f6d04049039adf870a53a524f7f/get_certs.sh get_certs.sh] and run it:<br />
<br />
{{bc|<br />
<nowiki><br />
$ mkdir ~/.cert<br />
$ wget https://gist.githubusercontent.com/petRUShka/af96ae25ce8280729b9ea049b929f31d/raw/a79471ce8aee3f6d04049039adf870a53a524f7f/get_certs.sh<br />
$ sh get_certs.sh some.imap.server port ~/.cert/<br />
</nowiki><br />
}}<br />
<br />
<br />
If you wish to do this manually, you may enter:<br />
<br />
{{bc|<br />
<nowiki><br />
$ openssl s_client -connect some.imap.server:port -showcerts<br />
</nowiki><br />
}}<br />
<br />
and it will display output something like:<br />
<br />
{{bc|<br />
<nowiki><br />
CONNECTED(00000003)<br />
depth=1 C = US, O = Google Inc, CN = Google Internet Authority<br />
verify error:num=20:unable to get local issuer certificate<br />
verify return:0<br />
---<br />
Certificate chain<br />
0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=imap.gmail.com<br />
i:/C=US/O=Google Inc/CN=Google Internet Authority<br />
-----BEGIN CERTIFICATE-----<br />
MIIDgDCCAumgAwIBAgIKO3MmiwAAAABopTANBgkqhkiG9w0BAQUFADBGMQswCQYD<br />
VQQGEwJVUzETMBEGA1UEChMKR29vZ2xlIEluYzEiMCAGA1UEAxMZR29vZ2xlIElu<br />
dGVybmV0IEF1dGhvcml0eTAeFw0xMjA5MTIxMTU1NDlaFw0xMzA2MDcxOTQzMjda<br />
MGgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1N<br />
b3VudGFpbiBWaWV3MRMwEQYDVQQKEwpHb29nbGUgSW5jMRcwFQYDVQQDEw5pbWFw<br />
LmdtYWlsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA2OmU9DjI+DFQ<br />
ThqIN4vL6EqZbzH0ejLKcc+zhxsq9BU5hXohSJ1sS5FUU2vReDKk8fd+ZR3cWtpf<br />
CTYAUSvdnz1ZFjESSzyUBmGRqByhoc0yqdfb61NosA4CDaO+z7DtAgKyecqnAJad<br />
TPYYf9aLk/UgJuc6GseitjzFYonXi6ECAwEAAaOCAVEwggFNMB0GA1UdJQQWMBQG<br />
CCsGAQUFBwMBBggrBgEFBQcDAjAdBgNVHQ4EFgQUFuLyTg2NcsyaEESytZbLbQan<br />
YIowHwYDVR0jBBgwFoAUv8Aw6/VDET5nup6R+/xq2uNrEiQwWwYDVR0fBFQwUjBQ<br />
oE6gTIZKaHR0cDovL3d3dy5nc3RhdGljLmNvbS9Hb29nbGVJbnRlcm5ldEF1dGhv<br />
cml0eS9Hb29nbGVJbnRlcm5ldEF1dGhvcml0eS5jcmwwZgYIKwYBBQUHAQEEWjBY<br />
MFYGCCsGAQUFBzAChkpodHRwOi8vd3d3LmdzdGF0aWMuY29tL0dvb2dsZUludGVy<br />
bmV0QXV0aG9yaXR5L0dvb2dsZUludGVybmV0QXV0aG9yaXR5LmNydDAMBgNVHRMB<br />
Af8EAjAAMBkGA1UdEQQSMBCCDmltYXAuZ21haWwuY29tMA0GCSqGSIb3DQEBBQUA<br />
A4GBAC1LV7tM6pcyVJLcwdPml4DomtowsjTrqvy5ZFa3SMKANK0iZBgFu74O0THX<br />
8SxP/vn4eAs0yRQxcT1ZuoishLGQl5NoimLaQ4BGQnzFQHDJendfaVKDl21GenJp<br />
is72sIrAeprsVU8PbNsllUamWsIjKr3DH5xQdH54hDtzQojY<br />
-----END CERTIFICATE-----<br />
1 s:/C=US/O=Google Inc/CN=Google Internet Authority<br />
i:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority<br />
-----BEGIN CERTIFICATE-----<br />
MIICsDCCAhmgAwIBAgIDC2dxMA0GCSqGSIb3DQEBBQUAME4xCzAJBgNVBAYTAlVT<br />
MRAwDgYDVQQKEwdFcXVpZmF4MS0wKwYDVQQLEyRFcXVpZmF4IFNlY3VyZSBDZXJ0<br />
aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDkwNjA4MjA0MzI3WhcNMTMwNjA3MTk0MzI3<br />
WjBGMQswCQYDVQQGEwJVUzETMBEGA1UEChMKR29vZ2xlIEluYzEiMCAGA1UEAxMZ<br />
R29vZ2xlIEludGVybmV0IEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAw<br />
gYkCgYEAye23pIucV+eEPkB9hPSP0XFjU5nneXQUr0SZMyCSjXvlKAy6rWxJfoNf<br />
NFlOCnowzdDXxFdF7dWq1nMmzq0yE7jXDx07393cCDaob1FEm8rWIFJztyaHNWrb<br />
qeXUWaUr/GcZOfqTGBhs3t0lig4zFEfC7wFQeeT9adGnwKziV28CAwEAAaOBozCB<br />
oDAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFL/AMOv1QxE+Z7qekfv8atrjaxIk<br />
MB8GA1UdIwQYMBaAFEjmaPkr0rKV10fYIyAQTzOYkJ/UMBIGA1UdEwEB/wQIMAYB<br />
Af8CAQAwOgYDVR0fBDMwMTAvoC2gK4YpaHR0cDovL2NybC5nZW90cnVzdC5jb20v<br />
Y3Jscy9zZWN1cmVjYS5jcmwwDQYJKoZIhvcNAQEFBQADgYEAuIojxkiWsRF8YHde<br />
BZqrocb6ghwYB8TrgbCoZutJqOkM0ymt9e8kTP3kS8p/XmOrmSfLnzYhLLkQYGfN<br />
0rTw8Ktx5YtaiScRhKqOv5nwnQkhClIZmloJ0pC3+gz4fniisIWvXEyZ2VxVKfml<br />
UUIuOss4jHg7y/j7lYe8vJD5UDI=<br />
-----END CERTIFICATE-----<br />
---<br />
Server certificate<br />
subject=/C=US/ST=California/L=Mountain View/O=Google Inc/CN=imap.gmail.com<br />
issuer=/C=US/O=Google Inc/CN=Google Internet Authority<br />
---<br />
No client certificate CA names sent<br />
---<br />
SSL handshake has read 2108 bytes and written 350 bytes<br />
---<br />
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-RC4-SHA<br />
Server public key is 1024 bit<br />
Secure Renegotiation IS supported<br />
Compression: NONE<br />
Expansion: NONE<br />
SSL-Session:<br />
Protocol : TLSv1.1<br />
Cipher : ECDHE-RSA-RC4-SHA<br />
Session-ID: 77136647F42633D82DEDFBB9EB62AB516547A3697D83BD1884726034613C1C09<br />
Session-ID-ctx: <br />
Master-Key: 635957FBA0762B10694560488905F73BDD2DB674C41970542ED079446F27234E2CA51CF26938B8CA56DF5BBC71E429A7<br />
Key-Arg : None<br />
PSK identity: None<br />
PSK identity hint: None<br />
SRP username: None<br />
TLS session ticket lifetime hint: 100800 (seconds)<br />
TLS session ticket:<br />
0000 - d6 5b a0 a7 10 0e 64 04-72 93 7c 9f 94 fa 07 57 .[....d.r.|....W<br />
0010 - f1 8b 9d 24 8b 9d 1b f3-a8 b1 4d 2c a9 00 e1 82 ...$......M,....<br />
0020 - 00 83 1e 3f e5 f2 b2 2c-d2 a8 87 83 16 02 0d 1e ...?...,........<br />
0030 - bf b6 c1 d6 75 21 04 e6-63 6b ab 5b ed 94 7a 30 ....u!..ck.[..z0<br />
0040 - 1a d0 aa 44 c2 04 9b 10-06 28 b5 7b a0 43 a6 0d ...D.....(.{.C..<br />
0050 - 3b 4a 85 1f 2e 07 0a e1-32 9b bd 5d 65 41 4c e2 ;J......2..]eAL.<br />
0060 - 7c d7 43 ec c4 18 77 53-b5 d4 84 b4 c9 bd 51 d6 |.C...wS......Q.<br />
0070 - 2d 4f 2e 10 a6 ed 38 c5-8e 9d f8 8b 8a 63 3f 7b -O....8......c?{<br />
0080 - ee e6 b8 bf 7a f8 b8 e8-47 92 84 f1 9b 0c 63 30 ....z...G.....c0<br />
0090 - 76 d8 e1 44 v..D<br />
<br />
Start Time: 1352632558<br />
Timeout : 300 (sec)<br />
Verify return code: 20 (unable to get local issuer certificate)<br />
---<br />
* OK Gimap ready for requests from 108.78.162.240 o67if11168976yhc.67<br />
</nowiki><br />
}}<br />
<br />
Simply copy the first block that begins with {{ic|-----BEGIN CERTIFICATE-----}} and ends with {{ic|-----END CERTIFICATE-----}}, paste into a file, and save with a .pem extension (this is necessary for the next step). Older instructions state that, with Gmail, both certificate blocks must be saved but on testing this was found to be unnecessary.<br />
<br />
Now, copy the root issuer certificate to your local certificate folder. In this example (Gmail), the root issuer is Equifax Secure Certificate Authority. This certificate is included in the {{pkg|ca-certificates}} package.<br />
<br />
{{bc|<br />
<nowiki><br />
cp /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt ~/.cert/Equifax_Secure_CA.pem<br />
</nowiki><br />
}}<br />
<br />
===Step #2: Setup mbsync ===<br />
<br />
Configure mbsync to use that certificate:<br />
<br />
{{hc|~/.mbsyncrc|2=<br />
<nowiki><br />
IMAPAccount gmail<br />
Host imap.gmail.com<br />
# ...<br />
CertificateFile ~/.cert/imap.gmail.com.pem<br />
<br />
</nowiki><br />
}}<br />
<br />
=== Exchange 2003 ===<br />
<br />
When connecting to an MS Exchange 2003 server, there could be problems when using pipelining (i.e. executing multiple imap commands concurrently). Such an issue could look as follows:<br />
{{bc|sample output of `mbsync -V exchange'<br />
<nowiki><br />
>>> 9 SELECT "arch"^M<br />
* 250 EXISTS<br />
* 0 RECENT<br />
* FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)<br />
* OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags<br />
* OK [UNSEEN 241] Is the first unseen message<br />
* OK [UIDVALIDITY 4352] UIDVALIDITY value<br />
9 OK [READ-WRITE] SELECT completed.<br />
>>> 10 UID FETCH 1:1000000000 (UID FLAGS)^M<br />
* 1 FETCH (UID 1 FLAGS (\Seen \Answered))<br />
* 2 FETCH (UID 2 FLAGS (\Seen \Answered))<br />
...<br />
* 249 FETCH (UID 696 FLAGS ())<br />
* 250 FETCH (UID 697 FLAGS (\Seen))<br />
10 OK FETCH completed.<br />
>>> 11 APPEND "arch" (\Seen) {4878+}^M<br />
(1 in progress) >>> 12 UID FETCH 697 (BODY.PEEK[])^M<br />
(2 in progress) >>> 13 UID STORE 696 +FLAGS.SILENT (\Deleted)^M<br />
12 BAD Command is not valid in this state.<br />
</nowiki><br />
}}<br />
So command 9 is to select a new folder, command 10 checks the mail and commands 11, 12 and 13 run in parallel, writing/getting/flagging a mail. In this case, the Exchange server would terminate the connection after the BAD return value and go on to the next channel. (And if all went well in this channel, mbsync would return with 0.) After setting<br />
PipelineDepth 1<br />
in the IMAPStore config part of the Exchange, this problem did not occur any more.<br />
<br />
==External Links==<br />
*[http://isync.sourceforge.net/ Home page]<br />
*[http://sourceforge.net/projects/isync/ Sourceforge page]<br />
*[http://kevin.deldycke.com/2012/08/gmail-backup-mbsync/ backing up gmail with mbsync]<br />
*[http://www.cyberciti.biz/faq/test-ssl-certificates-diagnosis-ssl-certificate/ How To Verify SSL Certificate From A Shell Prompt]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Isync&diff=473248Isync2017-04-07T21:33:31Z<p>JoshuaBranson: /* Configuring */ Changed the wording a little.</p>
<hr />
<div>{{DISPLAYTITLE:isync}}<br />
[[Category:Email clients]]<br />
[[ja:Isync]]<br />
isync is a command line application which synchronizes mailboxes; currently Maildir and IMAP4 mailboxes are supported. New messages, message deletions and flag changes can be propagated both ways.<br />
<br />
Synchronization is based on unique message identifiers (UIDs), so no identification conflicts can occur (as opposed to some other mail synchronizers).<br />
Synchronization state is kept in one local text file per mailbox pair; multiple replicas of a mailbox can be maintained.<br />
{{note|isync is the name of the project, mbsync is the name of the executable}}<br />
<br />
==Features==<br />
<br />
*Fine-grained selection of synchronization operations to perform<br />
*Synchronizes single mailboxes or entire mailbox collections<br />
*Partial mirrors possible: keep only the latest messages locally<br />
*Trash functionality: backup messages before removing them<br />
*IMAP features:<br />
**Security: supports TLS/SSL via imaps: (port 993) and STARTTLS; CRAM-MD5 for authentication<br />
**Supports NAMESPACE for simplified configuration<br />
**Pipelining for maximum speed (currently only partially implemented)<br />
<br />
==Installing==<br />
Install {{Pkg|isync}} from the [[official repositories]] or {{AUR|isync-git}} can be installed from the [[AUR]].<br />
<br />
==Configuring==<br />
<br />
<br />
{{Note| Google appears to block isync from downloading emails by default. You need to change your account's security preferences. Toggle "Allow less secure apps" to "on" [https://myaccount.google.com/security Google's Security Page] Also not that isync does is not an insecure app. }}<br />
<br />
<br />
First create and customize the main configuration file using this example ~/.mbsyncrc:<br />
{{hc|~/.mbsyncrc|2=<br />
<nowiki><br />
IMAPAccount gmail<br />
# Address to connect to<br />
Host imap.gmail.com<br />
User username@gmail.com<br />
Pass ***************<br />
# To store the password in an encrypted file use PassCmd instead of Pass<br />
# PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.mailpass.gpg"<br />
#<br />
# Use SSL<br />
SSLType IMAPS<br />
# The following line should work. If get certificate errors, uncomment the two following lines and read the "Troubleshooting" section.<br />
CertificateFile /etc/ssl/certs/ca-certificates.crt<br />
#CertificateFile ~/.cert/imap.gmail.com.pem<br />
#CertificateFile ~/.cert/Equifax_Secure_CA.pem<br />
<br />
IMAPStore gmail-remote<br />
Account gmail<br />
<br />
MaildirStore gmail-local<br />
# The trailing "/" is important<br />
Path ~/.mail/gmail/<br />
Inbox ~/.mail/gmail/Inbox<br />
<br />
Channel gmail<br />
Master :gmail-remote:<br />
Slave :gmail-local:<br />
# Exclude everything under the internal [Gmail] folder, except the interesting folders<br />
Patterns * ![Gmail]* "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail"<br />
# Or include everything<br />
#Patterns *<br />
# Automatically create missing mailboxes, both locally and on the server<br />
Create Both<br />
# Save the synchronization state files in the relevant directory<br />
SyncState *<br />
</nowiki><br />
}}<br />
<br />
To get rid of the [Gmail]-Stuff (or [Google Mail] as in my case) in each mailbox name, it's possible to use separate Channels for each directory, and later merge them to a group:<br />
{{hc|~/.mbsyncrc|2=<br />
<nowiki><br />
Channel sync-googlemail-default<br />
Master :googlemail-remote:<br />
Slave :googlemail-local:<br />
# Select some mailboxes to sync<br />
Patterns "INBOX" "arch"<br />
<br />
Channel sync-googlemail-sent<br />
Master :googlemail-remote:"[Google Mail]/Gesendet"<br />
Slave :googlemail-local:sent<br />
<br />
Channel sync-googlemail-trash<br />
Master :googlemail-remote:"[Google Mail]/Papierkorb"<br />
Slave :googlemail-local:trash<br />
<br />
# Get all the channels together into a group.<br />
Group googlemail<br />
Channel sync-googlemail-default<br />
Channel sync-googlemail-sent<br />
Channel sync-googlemail-trash<br />
</nowiki><br />
}}<br />
As you can see, name-translations are possible this way, as well. Now calling<br />
mbsync googlemail<br />
will sync all the folders.<br />
<br />
==Usage==<br />
First make any folders that were specified as Maildirs.<br />
$ mkdir -p ~/.mail/gmail<br />
Then to retrieve the mail for a specific channel run:<br />
$ mbsync gmail<br />
or to retrive the mail for all channels:<br />
$ mbsync -a<br />
<br />
==Automatic synchronization==<br />
If you want to automatically synchronize your mailboxes, isync can be started automatically with a [[systemd]] unit. The following service file can start the '''mbsync''' command :<br />
<br />
{{hc|/etc/systemd/system/mbsync@.service|2=<br />
<nowiki><br />
[Unit]<br />
Description=Mailbox synchronization service for user %I<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/mbsync -Va<br />
User=%i<br />
StandardOutput=syslog<br />
StandardError=syslog<br />
</nowiki><br />
}}<br />
<br />
{{Note|It's possible this service could trigger without an internet connection. A solution is to add the following into the Unit section:<br />
{{ic|<nowiki>After=network.target network-online.target dbus.socket</nowiki>}}}}<br />
<br />
<br />
The following timer configures '''mbsync''' to be started every 2 hours :<br />
<br />
{{hc|/etc/systemd/system/mbsync@.timer|2=<br />
<nowiki><br />
[Unit]<br />
Description=Mailbox synchronization timer<br />
<br />
[Timer]<br />
OnCalendar=*-*-* 00/2:00:00<br />
Persistent=true<br />
Unit=mbsync@%i.service<br />
<br />
[Install]<br />
WantedBy=timers.target<br />
</nowiki><br />
}}<br />
<br />
Once those two files are created, [[reload]] systemd, then [[enable]] and [[start]] {{ic|mbsync@''user''.timer}}, replacing {{ic|''user''}} with your username..<br />
<br />
===Integration with notmuch===<br />
<br />
If you want to run [[notmuch]] after automatically synchronizing your mails, it is preferable to modify the above {{ic|mbsync@.service}} by adding a post-start hook, like below:<br />
<br />
{{hc|/etc/systemd/system/mbsync@.service|2=<br />
<nowiki><br />
[Unit]<br />
Description=Mailbox synchronization service for user %I<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/mbsync -Va<br />
ExecStartPost=/usr/bin/notmuch new<br />
User=%i<br />
StandardOutput=syslog<br />
StandardError=syslog<br />
</nowiki><br />
}}<br />
<br />
This modification assumes that you have already setup notmuch for your user. If the ExecStart command does not execute successfully, the ExecStartPost command will not execute, so be aware of this!<br />
<br />
==Troubleshooting==<br />
If you get certificate related errors like<br />
{{bc|<br />
<nowiki><br />
SSL error connecting pop.mail.com (193.222.111.111:143): error:00000012:lib(0):func(0):reason(18) <br />
</nowiki><br />
}}<br />
<br />
you may need to retrieve the server's certificates manually in order for mbsync to correctly verify it.<br />
<br />
=== Step #1: Get the certificates ===<br />
<br />
{{Accuracy|This may not always be needed, e.g. for gmail {{ic|CertificateFile /etc/ssl/certs/ca-certificates.crt}} in the config file may be suffcient|section=Step #1: Get the certificates}}<br />
<br />
{{bc|<br />
<nowiki><br />
$ mkdir ~/.cert<br />
$ openssl s_client -connect some.imap.server:port -showcerts 2>&1 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sed -ne '1,/-END CERTIFICATE-/p' > ~/.cert/some.imap.server.pem<br />
</nowiki><br />
}}<br />
<br />
This will create a certificate file called {{ic|~/.cert/some.imap.server.pem}} (e.g. {{ic|~/.cert/imap.gmail.com.pem}}). Alternatively one can download [https://gist.githubusercontent.com/petRUShka/af96ae25ce8280729b9ea049b929f31d/raw/a79471ce8aee3f6d04049039adf870a53a524f7f/get_certs.sh get_certs.sh] and run it:<br />
<br />
{{bc|<br />
<nowiki><br />
$ mkdir ~/.cert<br />
$ wget https://gist.githubusercontent.com/petRUShka/af96ae25ce8280729b9ea049b929f31d/raw/a79471ce8aee3f6d04049039adf870a53a524f7f/get_certs.sh<br />
$ sh get_certs.sh some.imap.server port ~/.cert/<br />
</nowiki><br />
}}<br />
<br />
<br />
If you wish to do this manually, you may enter:<br />
<br />
{{bc|<br />
<nowiki><br />
$ openssl s_client -connect some.imap.server:port -showcerts<br />
</nowiki><br />
}}<br />
<br />
and it will display output something like:<br />
<br />
{{bc|<br />
<nowiki><br />
CONNECTED(00000003)<br />
depth=1 C = US, O = Google Inc, CN = Google Internet Authority<br />
verify error:num=20:unable to get local issuer certificate<br />
verify return:0<br />
---<br />
Certificate chain<br />
0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=imap.gmail.com<br />
i:/C=US/O=Google Inc/CN=Google Internet Authority<br />
-----BEGIN CERTIFICATE-----<br />
MIIDgDCCAumgAwIBAgIKO3MmiwAAAABopTANBgkqhkiG9w0BAQUFADBGMQswCQYD<br />
VQQGEwJVUzETMBEGA1UEChMKR29vZ2xlIEluYzEiMCAGA1UEAxMZR29vZ2xlIElu<br />
dGVybmV0IEF1dGhvcml0eTAeFw0xMjA5MTIxMTU1NDlaFw0xMzA2MDcxOTQzMjda<br />
MGgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1N<br />
b3VudGFpbiBWaWV3MRMwEQYDVQQKEwpHb29nbGUgSW5jMRcwFQYDVQQDEw5pbWFw<br />
LmdtYWlsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA2OmU9DjI+DFQ<br />
ThqIN4vL6EqZbzH0ejLKcc+zhxsq9BU5hXohSJ1sS5FUU2vReDKk8fd+ZR3cWtpf<br />
CTYAUSvdnz1ZFjESSzyUBmGRqByhoc0yqdfb61NosA4CDaO+z7DtAgKyecqnAJad<br />
TPYYf9aLk/UgJuc6GseitjzFYonXi6ECAwEAAaOCAVEwggFNMB0GA1UdJQQWMBQG<br />
CCsGAQUFBwMBBggrBgEFBQcDAjAdBgNVHQ4EFgQUFuLyTg2NcsyaEESytZbLbQan<br />
YIowHwYDVR0jBBgwFoAUv8Aw6/VDET5nup6R+/xq2uNrEiQwWwYDVR0fBFQwUjBQ<br />
oE6gTIZKaHR0cDovL3d3dy5nc3RhdGljLmNvbS9Hb29nbGVJbnRlcm5ldEF1dGhv<br />
cml0eS9Hb29nbGVJbnRlcm5ldEF1dGhvcml0eS5jcmwwZgYIKwYBBQUHAQEEWjBY<br />
MFYGCCsGAQUFBzAChkpodHRwOi8vd3d3LmdzdGF0aWMuY29tL0dvb2dsZUludGVy<br />
bmV0QXV0aG9yaXR5L0dvb2dsZUludGVybmV0QXV0aG9yaXR5LmNydDAMBgNVHRMB<br />
Af8EAjAAMBkGA1UdEQQSMBCCDmltYXAuZ21haWwuY29tMA0GCSqGSIb3DQEBBQUA<br />
A4GBAC1LV7tM6pcyVJLcwdPml4DomtowsjTrqvy5ZFa3SMKANK0iZBgFu74O0THX<br />
8SxP/vn4eAs0yRQxcT1ZuoishLGQl5NoimLaQ4BGQnzFQHDJendfaVKDl21GenJp<br />
is72sIrAeprsVU8PbNsllUamWsIjKr3DH5xQdH54hDtzQojY<br />
-----END CERTIFICATE-----<br />
1 s:/C=US/O=Google Inc/CN=Google Internet Authority<br />
i:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority<br />
-----BEGIN CERTIFICATE-----<br />
MIICsDCCAhmgAwIBAgIDC2dxMA0GCSqGSIb3DQEBBQUAME4xCzAJBgNVBAYTAlVT<br />
MRAwDgYDVQQKEwdFcXVpZmF4MS0wKwYDVQQLEyRFcXVpZmF4IFNlY3VyZSBDZXJ0<br />
aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDkwNjA4MjA0MzI3WhcNMTMwNjA3MTk0MzI3<br />
WjBGMQswCQYDVQQGEwJVUzETMBEGA1UEChMKR29vZ2xlIEluYzEiMCAGA1UEAxMZ<br />
R29vZ2xlIEludGVybmV0IEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAw<br />
gYkCgYEAye23pIucV+eEPkB9hPSP0XFjU5nneXQUr0SZMyCSjXvlKAy6rWxJfoNf<br />
NFlOCnowzdDXxFdF7dWq1nMmzq0yE7jXDx07393cCDaob1FEm8rWIFJztyaHNWrb<br />
qeXUWaUr/GcZOfqTGBhs3t0lig4zFEfC7wFQeeT9adGnwKziV28CAwEAAaOBozCB<br />
oDAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFL/AMOv1QxE+Z7qekfv8atrjaxIk<br />
MB8GA1UdIwQYMBaAFEjmaPkr0rKV10fYIyAQTzOYkJ/UMBIGA1UdEwEB/wQIMAYB<br />
Af8CAQAwOgYDVR0fBDMwMTAvoC2gK4YpaHR0cDovL2NybC5nZW90cnVzdC5jb20v<br />
Y3Jscy9zZWN1cmVjYS5jcmwwDQYJKoZIhvcNAQEFBQADgYEAuIojxkiWsRF8YHde<br />
BZqrocb6ghwYB8TrgbCoZutJqOkM0ymt9e8kTP3kS8p/XmOrmSfLnzYhLLkQYGfN<br />
0rTw8Ktx5YtaiScRhKqOv5nwnQkhClIZmloJ0pC3+gz4fniisIWvXEyZ2VxVKfml<br />
UUIuOss4jHg7y/j7lYe8vJD5UDI=<br />
-----END CERTIFICATE-----<br />
---<br />
Server certificate<br />
subject=/C=US/ST=California/L=Mountain View/O=Google Inc/CN=imap.gmail.com<br />
issuer=/C=US/O=Google Inc/CN=Google Internet Authority<br />
---<br />
No client certificate CA names sent<br />
---<br />
SSL handshake has read 2108 bytes and written 350 bytes<br />
---<br />
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-RC4-SHA<br />
Server public key is 1024 bit<br />
Secure Renegotiation IS supported<br />
Compression: NONE<br />
Expansion: NONE<br />
SSL-Session:<br />
Protocol : TLSv1.1<br />
Cipher : ECDHE-RSA-RC4-SHA<br />
Session-ID: 77136647F42633D82DEDFBB9EB62AB516547A3697D83BD1884726034613C1C09<br />
Session-ID-ctx: <br />
Master-Key: 635957FBA0762B10694560488905F73BDD2DB674C41970542ED079446F27234E2CA51CF26938B8CA56DF5BBC71E429A7<br />
Key-Arg : None<br />
PSK identity: None<br />
PSK identity hint: None<br />
SRP username: None<br />
TLS session ticket lifetime hint: 100800 (seconds)<br />
TLS session ticket:<br />
0000 - d6 5b a0 a7 10 0e 64 04-72 93 7c 9f 94 fa 07 57 .[....d.r.|....W<br />
0010 - f1 8b 9d 24 8b 9d 1b f3-a8 b1 4d 2c a9 00 e1 82 ...$......M,....<br />
0020 - 00 83 1e 3f e5 f2 b2 2c-d2 a8 87 83 16 02 0d 1e ...?...,........<br />
0030 - bf b6 c1 d6 75 21 04 e6-63 6b ab 5b ed 94 7a 30 ....u!..ck.[..z0<br />
0040 - 1a d0 aa 44 c2 04 9b 10-06 28 b5 7b a0 43 a6 0d ...D.....(.{.C..<br />
0050 - 3b 4a 85 1f 2e 07 0a e1-32 9b bd 5d 65 41 4c e2 ;J......2..]eAL.<br />
0060 - 7c d7 43 ec c4 18 77 53-b5 d4 84 b4 c9 bd 51 d6 |.C...wS......Q.<br />
0070 - 2d 4f 2e 10 a6 ed 38 c5-8e 9d f8 8b 8a 63 3f 7b -O....8......c?{<br />
0080 - ee e6 b8 bf 7a f8 b8 e8-47 92 84 f1 9b 0c 63 30 ....z...G.....c0<br />
0090 - 76 d8 e1 44 v..D<br />
<br />
Start Time: 1352632558<br />
Timeout : 300 (sec)<br />
Verify return code: 20 (unable to get local issuer certificate)<br />
---<br />
* OK Gimap ready for requests from 108.78.162.240 o67if11168976yhc.67<br />
</nowiki><br />
}}<br />
<br />
Simply copy the first block that begins with {{ic|-----BEGIN CERTIFICATE-----}} and ends with {{ic|-----END CERTIFICATE-----}}, paste into a file, and save with a .pem extension (this is necessary for the next step). Older instructions state that, with Gmail, both certificate blocks must be saved but on testing this was found to be unnecessary.<br />
<br />
Now, copy the root issuer certificate to your local certificate folder. In this example (Gmail), the root issuer is Equifax Secure Certificate Authority. This certificate is included in the {{pkg|ca-certificates}} package.<br />
<br />
{{bc|<br />
<nowiki><br />
cp /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt ~/.cert/Equifax_Secure_CA.pem<br />
</nowiki><br />
}}<br />
<br />
===Step #2: Setup mbsync ===<br />
<br />
Configure mbsync to use that certificate:<br />
<br />
{{hc|~/.mbsyncrc|2=<br />
<nowiki><br />
IMAPAccount gmail<br />
Host imap.gmail.com<br />
# ...<br />
CertificateFile ~/.cert/imap.gmail.com.pem<br />
<br />
</nowiki><br />
}}<br />
<br />
=== Exchange 2003 ===<br />
<br />
When connecting to an MS Exchange 2003 server, there could be problems when using pipelining (i.e. executing multiple imap commands concurrently). Such an issue could look as follows:<br />
{{bc|sample output of `mbsync -V exchange'<br />
<nowiki><br />
>>> 9 SELECT "arch"^M<br />
* 250 EXISTS<br />
* 0 RECENT<br />
* FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)<br />
* OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags<br />
* OK [UNSEEN 241] Is the first unseen message<br />
* OK [UIDVALIDITY 4352] UIDVALIDITY value<br />
9 OK [READ-WRITE] SELECT completed.<br />
>>> 10 UID FETCH 1:1000000000 (UID FLAGS)^M<br />
* 1 FETCH (UID 1 FLAGS (\Seen \Answered))<br />
* 2 FETCH (UID 2 FLAGS (\Seen \Answered))<br />
...<br />
* 249 FETCH (UID 696 FLAGS ())<br />
* 250 FETCH (UID 697 FLAGS (\Seen))<br />
10 OK FETCH completed.<br />
>>> 11 APPEND "arch" (\Seen) {4878+}^M<br />
(1 in progress) >>> 12 UID FETCH 697 (BODY.PEEK[])^M<br />
(2 in progress) >>> 13 UID STORE 696 +FLAGS.SILENT (\Deleted)^M<br />
12 BAD Command is not valid in this state.<br />
</nowiki><br />
}}<br />
So command 9 is to select a new folder, command 10 checks the mail and commands 11, 12 and 13 run in parallel, writing/getting/flagging a mail. In this case, the Exchange server would terminate the connection after the BAD return value and go on to the next channel. (And if all went well in this channel, mbsync would return with 0.) After setting<br />
PipelineDepth 1<br />
in the IMAPStore config part of the Exchange, this problem did not occur any more.<br />
<br />
==External Links==<br />
*[http://isync.sourceforge.net/ Home page]<br />
*[http://sourceforge.net/projects/isync/ Sourceforge page]<br />
*[http://kevin.deldycke.com/2012/08/gmail-backup-mbsync/ backing up gmail with mbsync]<br />
*[http://www.cyberciti.biz/faq/test-ssl-certificates-diagnosis-ssl-certificate/ How To Verify SSL Certificate From A Shell Prompt]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Isync&diff=473247Isync2017-04-07T21:32:48Z<p>JoshuaBranson: /* Configuring */ I added a disclaimer that Google might block isync from downloading mail. One has to tweak google settings to allow this.</p>
<hr />
<div>{{DISPLAYTITLE:isync}}<br />
[[Category:Email clients]]<br />
[[ja:Isync]]<br />
isync is a command line application which synchronizes mailboxes; currently Maildir and IMAP4 mailboxes are supported. New messages, message deletions and flag changes can be propagated both ways.<br />
<br />
Synchronization is based on unique message identifiers (UIDs), so no identification conflicts can occur (as opposed to some other mail synchronizers).<br />
Synchronization state is kept in one local text file per mailbox pair; multiple replicas of a mailbox can be maintained.<br />
{{note|isync is the name of the project, mbsync is the name of the executable}}<br />
<br />
==Features==<br />
<br />
*Fine-grained selection of synchronization operations to perform<br />
*Synchronizes single mailboxes or entire mailbox collections<br />
*Partial mirrors possible: keep only the latest messages locally<br />
*Trash functionality: backup messages before removing them<br />
*IMAP features:<br />
**Security: supports TLS/SSL via imaps: (port 993) and STARTTLS; CRAM-MD5 for authentication<br />
**Supports NAMESPACE for simplified configuration<br />
**Pipelining for maximum speed (currently only partially implemented)<br />
<br />
==Installing==<br />
Install {{Pkg|isync}} from the [[official repositories]] or {{AUR|isync-git}} can be installed from the [[AUR]].<br />
<br />
==Configuring==<br />
<br />
<br />
{{Note| Google appears to block isync from downloading emails by default. You need to change your account's security preferences. Toggle "Allow less secure apps" to on. [https://myaccount.google.com/security Google Security Page] Also not that isync does is not an insecure app. }}<br />
<br />
<br />
First create and customize the main configuration file using this example ~/.mbsyncrc:<br />
{{hc|~/.mbsyncrc|2=<br />
<nowiki><br />
IMAPAccount gmail<br />
# Address to connect to<br />
Host imap.gmail.com<br />
User username@gmail.com<br />
Pass ***************<br />
# To store the password in an encrypted file use PassCmd instead of Pass<br />
# PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.mailpass.gpg"<br />
#<br />
# Use SSL<br />
SSLType IMAPS<br />
# The following line should work. If get certificate errors, uncomment the two following lines and read the "Troubleshooting" section.<br />
CertificateFile /etc/ssl/certs/ca-certificates.crt<br />
#CertificateFile ~/.cert/imap.gmail.com.pem<br />
#CertificateFile ~/.cert/Equifax_Secure_CA.pem<br />
<br />
IMAPStore gmail-remote<br />
Account gmail<br />
<br />
MaildirStore gmail-local<br />
# The trailing "/" is important<br />
Path ~/.mail/gmail/<br />
Inbox ~/.mail/gmail/Inbox<br />
<br />
Channel gmail<br />
Master :gmail-remote:<br />
Slave :gmail-local:<br />
# Exclude everything under the internal [Gmail] folder, except the interesting folders<br />
Patterns * ![Gmail]* "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail"<br />
# Or include everything<br />
#Patterns *<br />
# Automatically create missing mailboxes, both locally and on the server<br />
Create Both<br />
# Save the synchronization state files in the relevant directory<br />
SyncState *<br />
</nowiki><br />
}}<br />
<br />
To get rid of the [Gmail]-Stuff (or [Google Mail] as in my case) in each mailbox name, it's possible to use separate Channels for each directory, and later merge them to a group:<br />
{{hc|~/.mbsyncrc|2=<br />
<nowiki><br />
Channel sync-googlemail-default<br />
Master :googlemail-remote:<br />
Slave :googlemail-local:<br />
# Select some mailboxes to sync<br />
Patterns "INBOX" "arch"<br />
<br />
Channel sync-googlemail-sent<br />
Master :googlemail-remote:"[Google Mail]/Gesendet"<br />
Slave :googlemail-local:sent<br />
<br />
Channel sync-googlemail-trash<br />
Master :googlemail-remote:"[Google Mail]/Papierkorb"<br />
Slave :googlemail-local:trash<br />
<br />
# Get all the channels together into a group.<br />
Group googlemail<br />
Channel sync-googlemail-default<br />
Channel sync-googlemail-sent<br />
Channel sync-googlemail-trash<br />
</nowiki><br />
}}<br />
As you can see, name-translations are possible this way, as well. Now calling<br />
mbsync googlemail<br />
will sync all the folders.<br />
<br />
==Usage==<br />
First make any folders that were specified as Maildirs.<br />
$ mkdir -p ~/.mail/gmail<br />
Then to retrieve the mail for a specific channel run:<br />
$ mbsync gmail<br />
or to retrive the mail for all channels:<br />
$ mbsync -a<br />
<br />
==Automatic synchronization==<br />
If you want to automatically synchronize your mailboxes, isync can be started automatically with a [[systemd]] unit. The following service file can start the '''mbsync''' command :<br />
<br />
{{hc|/etc/systemd/system/mbsync@.service|2=<br />
<nowiki><br />
[Unit]<br />
Description=Mailbox synchronization service for user %I<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/mbsync -Va<br />
User=%i<br />
StandardOutput=syslog<br />
StandardError=syslog<br />
</nowiki><br />
}}<br />
<br />
{{Note|It's possible this service could trigger without an internet connection. A solution is to add the following into the Unit section:<br />
{{ic|<nowiki>After=network.target network-online.target dbus.socket</nowiki>}}}}<br />
<br />
<br />
The following timer configures '''mbsync''' to be started every 2 hours :<br />
<br />
{{hc|/etc/systemd/system/mbsync@.timer|2=<br />
<nowiki><br />
[Unit]<br />
Description=Mailbox synchronization timer<br />
<br />
[Timer]<br />
OnCalendar=*-*-* 00/2:00:00<br />
Persistent=true<br />
Unit=mbsync@%i.service<br />
<br />
[Install]<br />
WantedBy=timers.target<br />
</nowiki><br />
}}<br />
<br />
Once those two files are created, [[reload]] systemd, then [[enable]] and [[start]] {{ic|mbsync@''user''.timer}}, replacing {{ic|''user''}} with your username..<br />
<br />
===Integration with notmuch===<br />
<br />
If you want to run [[notmuch]] after automatically synchronizing your mails, it is preferable to modify the above {{ic|mbsync@.service}} by adding a post-start hook, like below:<br />
<br />
{{hc|/etc/systemd/system/mbsync@.service|2=<br />
<nowiki><br />
[Unit]<br />
Description=Mailbox synchronization service for user %I<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/mbsync -Va<br />
ExecStartPost=/usr/bin/notmuch new<br />
User=%i<br />
StandardOutput=syslog<br />
StandardError=syslog<br />
</nowiki><br />
}}<br />
<br />
This modification assumes that you have already setup notmuch for your user. If the ExecStart command does not execute successfully, the ExecStartPost command will not execute, so be aware of this!<br />
<br />
==Troubleshooting==<br />
If you get certificate related errors like<br />
{{bc|<br />
<nowiki><br />
SSL error connecting pop.mail.com (193.222.111.111:143): error:00000012:lib(0):func(0):reason(18) <br />
</nowiki><br />
}}<br />
<br />
you may need to retrieve the server's certificates manually in order for mbsync to correctly verify it.<br />
<br />
=== Step #1: Get the certificates ===<br />
<br />
{{Accuracy|This may not always be needed, e.g. for gmail {{ic|CertificateFile /etc/ssl/certs/ca-certificates.crt}} in the config file may be suffcient|section=Step #1: Get the certificates}}<br />
<br />
{{bc|<br />
<nowiki><br />
$ mkdir ~/.cert<br />
$ openssl s_client -connect some.imap.server:port -showcerts 2>&1 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sed -ne '1,/-END CERTIFICATE-/p' > ~/.cert/some.imap.server.pem<br />
</nowiki><br />
}}<br />
<br />
This will create a certificate file called {{ic|~/.cert/some.imap.server.pem}} (e.g. {{ic|~/.cert/imap.gmail.com.pem}}). Alternatively one can download [https://gist.githubusercontent.com/petRUShka/af96ae25ce8280729b9ea049b929f31d/raw/a79471ce8aee3f6d04049039adf870a53a524f7f/get_certs.sh get_certs.sh] and run it:<br />
<br />
{{bc|<br />
<nowiki><br />
$ mkdir ~/.cert<br />
$ wget https://gist.githubusercontent.com/petRUShka/af96ae25ce8280729b9ea049b929f31d/raw/a79471ce8aee3f6d04049039adf870a53a524f7f/get_certs.sh<br />
$ sh get_certs.sh some.imap.server port ~/.cert/<br />
</nowiki><br />
}}<br />
<br />
<br />
If you wish to do this manually, you may enter:<br />
<br />
{{bc|<br />
<nowiki><br />
$ openssl s_client -connect some.imap.server:port -showcerts<br />
</nowiki><br />
}}<br />
<br />
and it will display output something like:<br />
<br />
{{bc|<br />
<nowiki><br />
CONNECTED(00000003)<br />
depth=1 C = US, O = Google Inc, CN = Google Internet Authority<br />
verify error:num=20:unable to get local issuer certificate<br />
verify return:0<br />
---<br />
Certificate chain<br />
0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=imap.gmail.com<br />
i:/C=US/O=Google Inc/CN=Google Internet Authority<br />
-----BEGIN CERTIFICATE-----<br />
MIIDgDCCAumgAwIBAgIKO3MmiwAAAABopTANBgkqhkiG9w0BAQUFADBGMQswCQYD<br />
VQQGEwJVUzETMBEGA1UEChMKR29vZ2xlIEluYzEiMCAGA1UEAxMZR29vZ2xlIElu<br />
dGVybmV0IEF1dGhvcml0eTAeFw0xMjA5MTIxMTU1NDlaFw0xMzA2MDcxOTQzMjda<br />
MGgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1N<br />
b3VudGFpbiBWaWV3MRMwEQYDVQQKEwpHb29nbGUgSW5jMRcwFQYDVQQDEw5pbWFw<br />
LmdtYWlsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA2OmU9DjI+DFQ<br />
ThqIN4vL6EqZbzH0ejLKcc+zhxsq9BU5hXohSJ1sS5FUU2vReDKk8fd+ZR3cWtpf<br />
CTYAUSvdnz1ZFjESSzyUBmGRqByhoc0yqdfb61NosA4CDaO+z7DtAgKyecqnAJad<br />
TPYYf9aLk/UgJuc6GseitjzFYonXi6ECAwEAAaOCAVEwggFNMB0GA1UdJQQWMBQG<br />
CCsGAQUFBwMBBggrBgEFBQcDAjAdBgNVHQ4EFgQUFuLyTg2NcsyaEESytZbLbQan<br />
YIowHwYDVR0jBBgwFoAUv8Aw6/VDET5nup6R+/xq2uNrEiQwWwYDVR0fBFQwUjBQ<br />
oE6gTIZKaHR0cDovL3d3dy5nc3RhdGljLmNvbS9Hb29nbGVJbnRlcm5ldEF1dGhv<br />
cml0eS9Hb29nbGVJbnRlcm5ldEF1dGhvcml0eS5jcmwwZgYIKwYBBQUHAQEEWjBY<br />
MFYGCCsGAQUFBzAChkpodHRwOi8vd3d3LmdzdGF0aWMuY29tL0dvb2dsZUludGVy<br />
bmV0QXV0aG9yaXR5L0dvb2dsZUludGVybmV0QXV0aG9yaXR5LmNydDAMBgNVHRMB<br />
Af8EAjAAMBkGA1UdEQQSMBCCDmltYXAuZ21haWwuY29tMA0GCSqGSIb3DQEBBQUA<br />
A4GBAC1LV7tM6pcyVJLcwdPml4DomtowsjTrqvy5ZFa3SMKANK0iZBgFu74O0THX<br />
8SxP/vn4eAs0yRQxcT1ZuoishLGQl5NoimLaQ4BGQnzFQHDJendfaVKDl21GenJp<br />
is72sIrAeprsVU8PbNsllUamWsIjKr3DH5xQdH54hDtzQojY<br />
-----END CERTIFICATE-----<br />
1 s:/C=US/O=Google Inc/CN=Google Internet Authority<br />
i:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority<br />
-----BEGIN CERTIFICATE-----<br />
MIICsDCCAhmgAwIBAgIDC2dxMA0GCSqGSIb3DQEBBQUAME4xCzAJBgNVBAYTAlVT<br />
MRAwDgYDVQQKEwdFcXVpZmF4MS0wKwYDVQQLEyRFcXVpZmF4IFNlY3VyZSBDZXJ0<br />
aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDkwNjA4MjA0MzI3WhcNMTMwNjA3MTk0MzI3<br />
WjBGMQswCQYDVQQGEwJVUzETMBEGA1UEChMKR29vZ2xlIEluYzEiMCAGA1UEAxMZ<br />
R29vZ2xlIEludGVybmV0IEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAw<br />
gYkCgYEAye23pIucV+eEPkB9hPSP0XFjU5nneXQUr0SZMyCSjXvlKAy6rWxJfoNf<br />
NFlOCnowzdDXxFdF7dWq1nMmzq0yE7jXDx07393cCDaob1FEm8rWIFJztyaHNWrb<br />
qeXUWaUr/GcZOfqTGBhs3t0lig4zFEfC7wFQeeT9adGnwKziV28CAwEAAaOBozCB<br />
oDAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFL/AMOv1QxE+Z7qekfv8atrjaxIk<br />
MB8GA1UdIwQYMBaAFEjmaPkr0rKV10fYIyAQTzOYkJ/UMBIGA1UdEwEB/wQIMAYB<br />
Af8CAQAwOgYDVR0fBDMwMTAvoC2gK4YpaHR0cDovL2NybC5nZW90cnVzdC5jb20v<br />
Y3Jscy9zZWN1cmVjYS5jcmwwDQYJKoZIhvcNAQEFBQADgYEAuIojxkiWsRF8YHde<br />
BZqrocb6ghwYB8TrgbCoZutJqOkM0ymt9e8kTP3kS8p/XmOrmSfLnzYhLLkQYGfN<br />
0rTw8Ktx5YtaiScRhKqOv5nwnQkhClIZmloJ0pC3+gz4fniisIWvXEyZ2VxVKfml<br />
UUIuOss4jHg7y/j7lYe8vJD5UDI=<br />
-----END CERTIFICATE-----<br />
---<br />
Server certificate<br />
subject=/C=US/ST=California/L=Mountain View/O=Google Inc/CN=imap.gmail.com<br />
issuer=/C=US/O=Google Inc/CN=Google Internet Authority<br />
---<br />
No client certificate CA names sent<br />
---<br />
SSL handshake has read 2108 bytes and written 350 bytes<br />
---<br />
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-RC4-SHA<br />
Server public key is 1024 bit<br />
Secure Renegotiation IS supported<br />
Compression: NONE<br />
Expansion: NONE<br />
SSL-Session:<br />
Protocol : TLSv1.1<br />
Cipher : ECDHE-RSA-RC4-SHA<br />
Session-ID: 77136647F42633D82DEDFBB9EB62AB516547A3697D83BD1884726034613C1C09<br />
Session-ID-ctx: <br />
Master-Key: 635957FBA0762B10694560488905F73BDD2DB674C41970542ED079446F27234E2CA51CF26938B8CA56DF5BBC71E429A7<br />
Key-Arg : None<br />
PSK identity: None<br />
PSK identity hint: None<br />
SRP username: None<br />
TLS session ticket lifetime hint: 100800 (seconds)<br />
TLS session ticket:<br />
0000 - d6 5b a0 a7 10 0e 64 04-72 93 7c 9f 94 fa 07 57 .[....d.r.|....W<br />
0010 - f1 8b 9d 24 8b 9d 1b f3-a8 b1 4d 2c a9 00 e1 82 ...$......M,....<br />
0020 - 00 83 1e 3f e5 f2 b2 2c-d2 a8 87 83 16 02 0d 1e ...?...,........<br />
0030 - bf b6 c1 d6 75 21 04 e6-63 6b ab 5b ed 94 7a 30 ....u!..ck.[..z0<br />
0040 - 1a d0 aa 44 c2 04 9b 10-06 28 b5 7b a0 43 a6 0d ...D.....(.{.C..<br />
0050 - 3b 4a 85 1f 2e 07 0a e1-32 9b bd 5d 65 41 4c e2 ;J......2..]eAL.<br />
0060 - 7c d7 43 ec c4 18 77 53-b5 d4 84 b4 c9 bd 51 d6 |.C...wS......Q.<br />
0070 - 2d 4f 2e 10 a6 ed 38 c5-8e 9d f8 8b 8a 63 3f 7b -O....8......c?{<br />
0080 - ee e6 b8 bf 7a f8 b8 e8-47 92 84 f1 9b 0c 63 30 ....z...G.....c0<br />
0090 - 76 d8 e1 44 v..D<br />
<br />
Start Time: 1352632558<br />
Timeout : 300 (sec)<br />
Verify return code: 20 (unable to get local issuer certificate)<br />
---<br />
* OK Gimap ready for requests from 108.78.162.240 o67if11168976yhc.67<br />
</nowiki><br />
}}<br />
<br />
Simply copy the first block that begins with {{ic|-----BEGIN CERTIFICATE-----}} and ends with {{ic|-----END CERTIFICATE-----}}, paste into a file, and save with a .pem extension (this is necessary for the next step). Older instructions state that, with Gmail, both certificate blocks must be saved but on testing this was found to be unnecessary.<br />
<br />
Now, copy the root issuer certificate to your local certificate folder. In this example (Gmail), the root issuer is Equifax Secure Certificate Authority. This certificate is included in the {{pkg|ca-certificates}} package.<br />
<br />
{{bc|<br />
<nowiki><br />
cp /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt ~/.cert/Equifax_Secure_CA.pem<br />
</nowiki><br />
}}<br />
<br />
===Step #2: Setup mbsync ===<br />
<br />
Configure mbsync to use that certificate:<br />
<br />
{{hc|~/.mbsyncrc|2=<br />
<nowiki><br />
IMAPAccount gmail<br />
Host imap.gmail.com<br />
# ...<br />
CertificateFile ~/.cert/imap.gmail.com.pem<br />
<br />
</nowiki><br />
}}<br />
<br />
=== Exchange 2003 ===<br />
<br />
When connecting to an MS Exchange 2003 server, there could be problems when using pipelining (i.e. executing multiple imap commands concurrently). Such an issue could look as follows:<br />
{{bc|sample output of `mbsync -V exchange'<br />
<nowiki><br />
>>> 9 SELECT "arch"^M<br />
* 250 EXISTS<br />
* 0 RECENT<br />
* FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)<br />
* OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags<br />
* OK [UNSEEN 241] Is the first unseen message<br />
* OK [UIDVALIDITY 4352] UIDVALIDITY value<br />
9 OK [READ-WRITE] SELECT completed.<br />
>>> 10 UID FETCH 1:1000000000 (UID FLAGS)^M<br />
* 1 FETCH (UID 1 FLAGS (\Seen \Answered))<br />
* 2 FETCH (UID 2 FLAGS (\Seen \Answered))<br />
...<br />
* 249 FETCH (UID 696 FLAGS ())<br />
* 250 FETCH (UID 697 FLAGS (\Seen))<br />
10 OK FETCH completed.<br />
>>> 11 APPEND "arch" (\Seen) {4878+}^M<br />
(1 in progress) >>> 12 UID FETCH 697 (BODY.PEEK[])^M<br />
(2 in progress) >>> 13 UID STORE 696 +FLAGS.SILENT (\Deleted)^M<br />
12 BAD Command is not valid in this state.<br />
</nowiki><br />
}}<br />
So command 9 is to select a new folder, command 10 checks the mail and commands 11, 12 and 13 run in parallel, writing/getting/flagging a mail. In this case, the Exchange server would terminate the connection after the BAD return value and go on to the next channel. (And if all went well in this channel, mbsync would return with 0.) After setting<br />
PipelineDepth 1<br />
in the IMAPStore config part of the Exchange, this problem did not occur any more.<br />
<br />
==External Links==<br />
*[http://isync.sourceforge.net/ Home page]<br />
*[http://sourceforge.net/projects/isync/ Sourceforge page]<br />
*[http://kevin.deldycke.com/2012/08/gmail-backup-mbsync/ backing up gmail with mbsync]<br />
*[http://www.cyberciti.biz/faq/test-ssl-certificates-diagnosis-ssl-certificate/ How To Verify SSL Certificate From A Shell Prompt]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Talk:List_of_applications&diff=468515Talk:List of applications2017-02-18T16:43:51Z<p>JoshuaBranson: /* Add Org-mode as a markup language? */ new section</p>
<hr />
<div>== Categorization ==<br />
=== Classification troubles ===<br />
Can "CD/DVD Burning Tools" be considered part of "Multimedia"?<br />
Should "Screen Capture" section be part of "Utilities" or "Multimedia"? --[[User:AlexanderR|AlexanderR]] 21:10, 16 January 2012 (EST)<br />
<br />
:Eh I'm afraid we'll just have to establish a convention: I'd say Burning tools in Multimedia and Screen Capture in Utilities? Let's wait for more opinions. -- [[User:Kynikos|Kynikos]] 07:53, 17 January 2012 (EST)<br />
<br />
::As I see, '''CD/DVD Burning Tools''' are already a part of '''Multimedia'''. '''Screen Capture''', I think, must be in '''Utilities'''.<br />
::And there's another question from russian users. '''OCR software''' isn't a reader or viewer, so it must be before or after '''1.9 Note taking organizers''' with corresponding number '''1.9''' or '''1.10'''<br />
::UPD. Also, there's a good idea to add in this section some (or all) progs from [[Optical Character Recognition]] -- [[User:Kycok|Kycok]] ([[User talk:Kycok|talk]]) 05:32, 11 April 2014 (UTC)<br />
<br />
:::Um... "Utilities" is practically a default category for applications that don't fit anywhere else: since "Screen capture" is kind of related to "Multimedia", it would probably be better to leave it there (thus changing the opinion I expressed above, I think I'm allowed, after more than 2 years :P ).<br />
:::I'm quite neutral about moving "OCR software" in the tree: it is related to "Scans", but maybe not so closely. I'm also neutral about merging [[Optical Character Recognition]] there: actually that article doesn't contain anything except for a short list of applications, so it could indeed be merged.<br />
:::Anyone with a stronger position on the topic? -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 14:12, 11 April 2014 (UTC)<br />
<br />
::::So, I've made corresponding changes in '''Documents''' section. Also I've merged '''Pdf''' and '''DjVu''', because many progs in '''Pdf''' works with DjVu. I've deleted tool '''fbdjvu''', because, as I see, it's merged with '''fbpdf'''.<br />
::::Let's talk if there's another opinions about my changes -- [[User:Kycok|Kycok]] ([[User talk:Kycok|talk]]) 09:59, 14 April 2014 (UTC)<br />
<br />
:::::Well done, except you forgot to redirect [[Optical Character Recognition]], [https://wiki.archlinux.org/index.php?title=Optical_Character_Recognition&diff=310498&oldid=273112 fixed] now :) -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 12:53, 15 April 2014 (UTC)<br />
<br />
<br />
I have submitted a AUR package for {{AUR|sendanywhere}}, a cross-platform p2p file sharing utility (similar to Pushbullet, but with standalone software client). I am not sure under which section I should include it. It is definitely not FTP based or bittorrent based. Should it go under '''Downloaders''' or '''Communications'''; also, shall I start a new subsection, maybe called '''p2p file sharing/pushing'''? [[User:Jadelord|Jadelord]] ([[User talk:Jadelord|talk]]) 11:17, 6 January 2016 (UTC)<br />
<br />
:I've just created [[List_of_applications/Internet#Other_P2P_networks]], I think that's the best place for the moment. — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 03:11, 7 January 2016 (UTC)<br />
<br />
=== Split up completely? ===<br />
Just wondering if it would be better to completely split the article up into separate articles, rather than transcluding everything back in as templates. Perhaps just include links and a brief summary of each category in the top-level page, maybe something along the lines of:<br />
<br />
{{META Box | | This page has various categories of programs and points to lists of programs in those categories. It is a useful starting point for finding a program for a specific application. [Introduce console versus graphical.]<br />
<br />
'''[[Common Applications/Internet | Internet]]''' including network configuration, and clients or browsers for web sites, FTP, file sharing, chat and email messaging, web feeds, and microblogging<br />
<br />
'''[[Common Applications/Multimedia | Multimedia]]''' including viewers, players and editors for raster, vector, 3D, CAD, audio and video, GUI capture, systems for accessing audio devices, audio CD rippers, and e-book programs.<br />
<br />
'''[[Common Applications/Utilities | Utilities]]''', which covers package management, file managers including space usage, compression and merge tools, optical disc burning, clipboards, GUI taskbars.<br />
<br />
'''[[Common Applications/Documents | Documents]]''': readers for printable files like PDFs, office suites, word processors, spreadsheets, text search, OCR<br />
<br />
'''[[Common Applications/Security | Security]]''': firewalls; file, network and log monitoring, scanning and analysis; backup<br />
<br />
'''[[Common Applications/Games | Games]]''': native and emulators<br />
<br />
'''[[Common Applications/Science | Science]]''': calculators, visualisation, design, programming environments and other tools for maths, chemistry, biology, astronomy, electronics and physics<br />
<br />
'''[[Common Applications/Other | Other]]''': note taking and scheduling; translation; desktop environments and window managers; terminals; OS monitors; text editors<br />
<br />
'''See also''' [other general lists of programs]}}<br />
<br />
Smaller individual pages would be nicer, because often I’m only interested in programs for a specific application, such as (in the past) [[Common Applications/Science#Electronics | Science#Electronics]], and [[Common Applications/Multimedia#GUI players | Multimedia#GUI players]] (audio). Even using the TOC, I think currently it’s too easy to get lost or overwhelmed. [[User:Vadmium|Vadmium]] 00:18, 26 January 2012 (EST).<br />
<br />
:I think the main problem here is that if I'm looking for a particular subcategory I have to guess under which main category it can be, while currently, with the comprehensive ToC, that task is easier. Possible compromise: maintain a "manual" Table of Contents in the top-level page, with links to the various subpages/subsections. Let's hear more opinions. -- [[User:Kynikos|Kynikos]] 07:53, 26 January 2012 (EST)<br />
<br />
==See also visibility==<br />
Does somebody have any idea on how to improve the visibility of the See also section? -- [[User:Kynikos|Kynikos]] 07:13, 23 January 2012 (EST)<br />
:Its probably not in good style, but could we add an [[Writing Article Overviews| article overview]], and have an article summary section containing the see also links?--[[User:Leocp1|Leocp1]] 16:59, 23 January 2012 (EST)<br />
::@Leocp1 What links are you talking about? Wiki links already should be covered by [[Template:Article_summary_wiki]]), among others I'd prefer to see only '''important''' ones (like links to software home page, documentation, own wiki etc) included included in the template. --[[User:AlexanderR|AlexanderR]] 19:11, 23 January 2012 (EST)<br />
:::I've written a summary in the subsection below and added some other ideas: currently I think solution 4 may be the tidiest and best looking, otherwise I'd try solution 1 as a second choice. Please add your opinions there so we can make a better decision.<br />
:::@AlexanderR We're talking about the See also links at the bottom of the article, not the links specific to each application, which should stay in the proper App template and/or the related wiki article (I'm not sure if that's what you meant).<br />
:::-- [[User:Kynikos|Kynikos]] 07:38, 24 January 2012 (EST)<br />
::::Who in the world uses this links at all? Wikipedia does not have any links at the bottom of articles except proofs of written or ones in categories templates. We do not provide proofs.. Or do we? And it would be great to see statistics of clicks on such links... --[[User:AlexanderR|AlexanderR]] 08:01, 24 January 2012 (EST)<br />
:::::Not sure if I'm on the same page as you, but many Wikipedia articles have 'External links' section at the bottom, below the references and above the 'Related articles' part. Have a look at e.g. http://en.wikipedia.org/wiki/Uefi article. It has 'See also', 'References' and 'External links' sections. -- [[User:Karol|Karol]] 08:43, 24 January 2012 (EST)<br />
<br />
<br />
<br />
===Ideas so far===<br />
#Move all see-also links to article summary --[[User:Leocp1|Leocp1]] 16:59, 23 January 2012 (EST)<br />
#*PROS:<br />
#**Currently style compliant (but see related con) -- [[User:Kynikos|Kynikos]] 07:38, 24 January 2012 (EST)<br />
#*CONS:<br />
#**There's little room for long URLs and/or descriptions, unless we want to see ugly line wrapping. -- [[User:Kynikos|Kynikos]] 07:38, 24 January 2012 (EST)<br />
#**It's possible that in the future the style for article summaries will be reformed not to allow external links anymore, requiring them to be in See also sections only. -- [[User:Kynikos|Kynikos]] 07:38, 24 January 2012 (EST)<br />
#Move only important see-also links to article summary --[[User:AlexanderR|AlexanderR]] 19:11, 23 January 2012 (EST)<br />
#*PROS:<br />
#**Same as 1.<br />
#**No problems with line wrapping. --[[User:AlexanderR|AlexanderR]] 23:48, 3 February 2012 (EST)<br />
#**In many articles links to site/Wikipedia/etc. are already located in random places in text. Placing them all into single template at the top will hardly make "See also" section less visible than now. --[[User:AlexanderR|AlexanderR]] 23:48, 3 February 2012 (EST)<br />
#*CONS:<br />
#**Same as 1.<br />
#**The See also section will be even more "buried" at the bottom of the article, becoming practically useless. -- [[User:Kynikos|Kynikos]] 07:38, 24 January 2012 (EST)<br />
#Find a new name instead of "See also", move the section at the top, as the first section (and change its layout, e.g. use 2 columns?). -- [[User:Kynikos|Kynikos]] 07:38, 24 January 2012 (EST)<br />
#*PROS:<br />
#**Links are immediately accessible and there's room for long URLs and descriptions. -- [[User:Kynikos|Kynikos]] 07:38, 24 January 2012 (EST)<br />
#*CONS:<br />
#**Incosistent with the other articles, may look ugly. -- [[User:Kynikos|Kynikos]] 07:38, 24 January 2012 (EST)<br />
#Link to [[#See also]] from the introduction, with a sentence that enhances its visibility. -- [[User:Kynikos|Kynikos]] 07:38, 24 January 2012 (EST)<br />
#*PROS:<br />
#**Style compliant. -- [[User:Kynikos|Kynikos]] 07:38, 24 January 2012 (EST)<br />
#**The main content of the article is still shown first. -- [[User:Kynikos|Kynikos]] 07:38, 24 January 2012 (EST)<br />
#*CONS:<br />
#**Links are not evident at a glance unlike the solutions above. -- [[User:Kynikos|Kynikos]] 07:38, 24 January 2012 (EST)<br />
<br />
== IRC clients: Conspire fails to build ==<br />
<br />
Moving here Conspire from the IRC clients section, since it's reported to fail to build and it had been commented in the list (bad practice):<br />
<br />
* {{App|Conspire|Lightweight, simple, and powerful|http://nenolod.net/|{{AUR|conspire-client}}}}<br />
<br />
-- [[User:Kynikos|Kynikos]] 17:02, 10 March 2012 (EST)<br />
<br />
== Multi-Protocol Downloader section ==<br />
<br />
Similarly to command shells, a downloader section is missing. Here we find good the same one: [[pyLoad#Alternatives]] [[JDownloader#Alternatives]].<br />
Plus aria2, curl, wget, kget should be added. Is it ok? Could you point me more downloaders?<br />
As kget and aria2 would be doubled we can do a "Multi-Protocol Downloader" section like [[List_of_Applications#Multi-Protocol Clients]] and delete original entries liting supported protocols. -- [[User:Flu|Flu]] ([[User talk:Flu|talk]]) 16:37, 8 September 2013 (UTC)<br />
<br />
:Good plan, +1. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 05:01, 11 September 2013 (UTC)<br />
<br />
== Order of things? ==<br />
<br />
Is there any special order to these lists?<br />
<br />
For instance, under "Internet" it would seem more intuitive to begin with "Network Managers", then "Browsers", then a section for "Downloaders". and so on.<br />
[[User:Idomeneo1|Idomeneo1]] ([[User talk:Idomeneo1|talk]]) 00:51, 20 January 2014 (UTC)<br />
<br />
:"Intuitive" is subjective, I'd just simply use alphabetical order, although I know it's not used anywhere at the moment... -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 21:07, 20 January 2014 (UTC)<br />
<br />
::Call it chronological? i.e. an order in which people (especially beginners) would think of setting things up - network, browser, communication, downloads, media etc.<br />
::The problem with alphabetical lists is that even if we decide on "correct" terms for things, some people will, i.e., look for 'console', and others for 'terminal'.<br />
::[[User:Idomeneo1|Idomeneo1]] ([[User talk:Idomeneo1|talk]]) 14:10, 21 January 2014 (UTC)<br />
<br />
:::Eheh a similar objection could be made for the "chronological" order, which, as I said, is subjective, e.g. some people may want to install messaging apps before p2p or vice versa. Maybe what you really mean is a "dependency" order, i.e. if in a group of sections there's one that lists applications (e.g. network managers) that may be necessary for applications in other groups to work, then put it at the top. I can agree with that, also because other sections like the various "Other" should instead better be kept at the bottom. All the in-between sections, though, should be sorted alphabetically: the problem of synonyms would affect any kind of odering we may choose, and in general it affects all kinds of word lists (e.g. dictionaries), so users are used to dealing with it.<br />
:::If you're willing to do the reordering, please do it in several little edits, not a single big one.<br />
:::-- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 07:13, 22 January 2014 (UTC)<br />
<br />
::::Yes, having "Other" at the end is exactly the kind of order I mean.<br />
::::[[User:Idomeneo1|Idomeneo1]] ([[User talk:Idomeneo1|talk]]) 15:25, 22 January 2014 (UTC)<br />
<br />
== List dead projects or not? ==<br />
[https://wiki.archlinux.org/index.php?title=List_of_Applications/Multimedia&diff=next&oldid=296040 Kino is dead], it doesn't even have a maintainer in the AUR. Is it OK to remove dead-but-still-working applications from the list in the wiki? -- [[User:Karol|Karol]] ([[User talk:Karol|talk]]) 14:16, 3 February 2014 (UTC)<br />
<br />
:I wouldn't really know what's best to do, but if the application is confirmed to be still working, ''keep''ing it in the list should be the default action until somebody proves that listing it is counterproductive in some way. Of course a note about the EOL should be added if restored. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 15:50, 4 February 2014 (UTC)<br />
<br />
[http://www.afterstep.org/aterm.php The aterm project website] has been directing people to use urxvt instead since 2008. I've noticed quite a few projects in the maintainer-doesn't-even-advise-using-it category on this page and I don't see what purpose they serve. [[User:RyneEverett|Ryne Everett]] ([[User talk:RyneEverett|talk]]) 02:26, 13 December 2014 (UTC)<br />
<br />
:Well, the apps whose ''upstream'' maintainers explicitly discourage using them can indeed be removed, possibly making sure that any indicated alternative is already present in this list, adding it otherwise. Just note that, taking your post literally, "not advising to" is different from "discouraging to" (the aterm case falls indeed in the latter case) :) Please state the reason for removing applications from the list using the edit summary. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 02:32, 14 December 2014 (UTC)<br />
<br />
::I propose a deprecation warning, especially in the security subpage. there are numerous projects listed, that might still work, but are not developed anymore. this renders them insecure, as malware recognition needs to keep up with developement. This concerns rkhunter, chkrootkit and also the currently unlisted unhide. [[User:Fordprefect|Fordprefect]] ([[User talk:Fordprefect|talk]]) 12:35, 2 September 2016 (UTC)<br />
<br />
:::I think it's too soon to talk on warnings like that when there's hundreds of dead AUR packages on the list... -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 15:41, 2 September 2016 (UTC)<br />
<br />
::::Well, for packages meant to improve security concerning malware, frequent updates are no bonus, but crucial. a simple note would help users distinguish more and less active projects. [[User:Fordprefect|Fordprefect]] ([[User talk:Fordprefect|talk]]) 17:17, 2 September 2016 (UTC)<br />
<br />
:::::At least rkhunter is still in the official repos, and John Horne, the [http://rkhunter.cvs.sourceforge.net/viewvc/rkhunter/rkhunter/files/ACKNOWLEDGMENTS current] main developer is still answering posts in the [https://sourceforge.net/p/rkhunter/mailman/rkhunter-users/ mailing list]. — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 01:12, 3 September 2016 (UTC)<br />
<br />
== Where should "full-stack" scanning software go? ==<br />
<br />
Some software (two examples below, I can add a few more when I have times) provide some set of scanner/camera frontend, image processing, document layout analysis, OCR frontend and document writer. We have categories for almost all of these, but where should software that smoothly incorporates all the above go?<br />
<br />
* {{App|Scan Tailor|Image procesing, document layout analyzer, document writer|http://scantailor.sourceforge.net/|{{Pkg|scantailor-git}}}}<br />
* {{App|gscan2pdf|Scans, runs an OCR engine, minor post-processing, creates a document.|http://gscan2pdf.sourceforge.net/|{{AUR|gscan2pdf}}}}<br />
<br />
I had some difficulty finding software that did what I expected/desired, so perhaps others are too. [[User:Scientific29|Scientific29]] ([[User talk:Scientific29|talk]]) 01:16, 5 September 2014 (UTC)<br />
<br />
:ScanTailor is not a "full-stack" software, it does just the image processing. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:57, 5 September 2014 (UTC)<br />
<br />
== AUR3 packages ==<br />
<br />
It's been about half a year since the transition to AUR4, so I think it's time to start slowly removing the references to the old packages that were not migrated. The lists such as this one, its translations, [[Fonts#Font packages]] etc. would be a good start, we can wait even longer with normal pages. What do you say? -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 13:06, 16 January 2016 (UTC)<br />
<br />
:+1 from me. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 13:17, 16 January 2016 (UTC)<br />
<br />
::+0.5 from me: ok to trim old package references, but please take it slowly, as I'll probably be interested in verifying other factors such as objective popularity, as happened recently in [https://wiki.archlinux.org/index.php?title=Talk:Window_manager&oldid=412869#AUR_broken_links_cleanup Window manager]. — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 04:03, 17 January 2016 (UTC)<br />
<br />
:::Very well, are you interested in checking even the fonts or can I do a swift(er) action there? -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 09:42, 17 January 2016 (UTC)<br />
<br />
::::Nah, you can have all the fun you want with fonts. Just make sure to properly clean the floor and walls before leaving though, fonts' blood tends to stain very bad ;) — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 03:48, 18 January 2016 (UTC)<br />
<br />
== What is Xpra, really? ==<br />
<br />
Where should [[Xpra]] go? Technically, remote desktop may be applicable, but it's not limited to remote stuff. You can run<br />
it locally on another X display.<br />
<br />
Technically, all Xpra is is some persistent X sessions that you can attach to and detach from at any time. It's not ''really''<br />
a remote desktop thing.<br />
[[User:Dillebidum|Dillebidum]] ([[User talk:Dillebidum|talk]]) 17:27, 10 January 2017 (UTC)<br />
<br />
:Does it ''have'' to go anywhere? -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 18:09, 10 January 2017 (UTC)<br />
<br />
::Technically, yes. This ''is'' the list of applications, so why not? Xpra is a "screen for X". That way, the least vague thing to do would be to split terminal multiplexers into a multiplexers category and there would be two subcategories: terminal and X11. Xpra would, ''obviously'' be in X11. I say least vague, since screen is a multiplexer, yet Xpra isn't. The only thing it has in common with screen is the persistent sessions. [[User:Dillebidum|Dillebidum]] ([[User talk:Dillebidum|talk]]) 20:37, 11 January 2017 (UTC)<br />
<br />
:::It's just ''a'' list of applications, not list of ''all'' applications. The point is that there might be other, more appropriate places on the wiki, e.g. improving [[Allow a program to continue after logoff]]. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 21:10, 11 January 2017 (UTC)<br />
<br />
== Mention of pkgstats ==<br />
<br />
Besides the loss of the links between [https://wiki.archlinux.org/index.php?title=List_of_applications&diff=466468&oldid=463125] and [https://wiki.archlinux.org/index.php?title=General_recommendations&diff=prev&oldid=466467], I'm against the move as I think that pkgstats is too specific to be mentioned in [[General recommendations]]. — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 10:07, 24 January 2017 (UTC)<br />
<br />
== Add Org-mode as a markup language? ==<br />
<br />
Org-mode is a markup language, but it is tied to the Emacs text editor. Any editor can produce valid org markup, but at present, only Emacs can export that markup to pdf, .tex, html, etc. <br />
<br />
Org-mode is such a great markup language, but I wonder if being tied to the Emacs means we should omit it. What do ya'll think?<br />
<br />
http://orgmode.org/</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Sway&diff=468158Sway2017-02-11T18:49:50Z<p>JoshuaBranson: /* Keymap */ I added the export and ; to the command line starting sway. If it doesn't have export and the ";"s then sway won't start properly.</p>
<hr />
<div>[[Category:Tiling WMs]]<br />
[[Category:Dynamic WMs]]<br />
[[ja:Sway]]<br />
''sway'' is a compositor for [[Wayland]] designed to be fully compatible with [[i3]]. According to [https://swaywm.org the official website]:<br />
:Sway is a drop-in replacement for the i3 window manager, but for Wayland instead of X11. It works with your existing i3 configuration and supports most of i3's features, and a few extras.<br />
<br />
== Status ==<br />
Sway is a work-in-progress so caution is advised. However, the project's creator, [https://drewdevault.com/ Drew DeVault] (aka SirCmpwn) has deemed it ready for regular use. <br />
<br />
A detailed accounting of what features have been implemented and what features are still outstanding can be found at the following links:<br />
*[https://github.com/SirCmpwn/sway/issues/2#issue-99897933 i3 feature support]<br />
*[https://github.com/SirCmpwn/sway/issues/98 IPC feature support]<br />
*[https://github.com/SirCmpwn/sway/issues/343 i3bar compatibility]<br />
*[https://github.com/SirCmpwn/sway/issues/307 Airblader fork features]<br />
<br />
== Installation ==<br />
<br />
''sway'' can be [[installed]] with the {{Pkg|sway}} package (or {{AUR|sway-git}} for the latest git version). If you already use i3, then copy your i3 configuration to {{ic|~/.config/sway/config}} and it will work out of the box. Otherwise, copy the sample configuration file to {{ic|~/.config/sway/config}}. It is located at {{ic|/etc/sway/config}}, unless the {{ic|DFALLBACK_CONFIG_DIR}} flag has been set. See the sway(5) [[man page]] for information on the configuration.<br />
<br />
== Starting sway ==<br />
<br />
=== From a terminal ===<br />
<br />
You can start sway by simply typing {{ic|sway}} in a terminal.<br />
<br />
=== Automatically on log in ===<br />
<br />
{{Tip|See [[Wayland#GUI libraries]] for appropriate environment variables to set for window decoration libraries.}}<br />
<br />
To start on login to tty1, add the following to your {{ic|.bash_profile}}:<br />
<br />
<nowiki>if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then<br />
exec sway<br />
fi</nowiki><br />
<br />
=== Using a display manager ===<br />
The sway session is located at {{ic|/usr/share/wayland-sessions/sway.desktop}}. It is automatically recognized by GDM.<br />
<br />
=== From X ===<br />
If you want to start ''sway'' in an X session for testing purposes it is possible to start it as a regular program.<br />
<br />
== Configuration ==<br />
=== Keymap ===<br />
By default, sway starts with the US QWERTY keymap. You can override this behaviour by starting sway with<br />
$ export XKB_DEFAULT_LAYOUT=gb; export XKB_DEFAULT_VARIANT=colemak; export XKB_DEFAULT_MODEL=pc101; sway<br />
This will launch sway with the keyboard set to the Colemak variant of the British keymap with the 101-key keyboard model.<br />
<br />
If you are using a display manager, you can not simply prepend the above line to the {{ic|sway.desktop}} file. As root, create the following file:<br />
{{hc|/usr/bin/sway-gb-ck|2=<br />
#!/bin/sh<br />
XKB_DEFAULT_LAYOUT=gb XKB_DEFAULT_VARIANT=colemak XKB_DEFAULT_MODEL=pc101 sway}}<br />
Then, create a {{ic|sway-gb-ck.desktop}} file that starts the above script:<br />
{{hc|/usr/share/wayland-sessions/sway-gb-ck.desktop|2=<br />
[Desktop Entry]<br />
Name=Sway British(Colemak)<br />
Comment=SirCmpwn's Wayland window manager with the British Colemak keyboard layout<br />
Exec=sway-gb-ck<br />
Type=Application<br />
}}<br />
<br />
=== Statusbar ===<br />
Installing the program {{Pkg|i3status}} is an easy way to get a practical, default statusbar. All one has to do is add following snippet at the end of your sway config:<br />
{{hc|~/.config/sway/config|<nowiki><br />
bar {<br />
status_command i3status<br />
}<br />
</nowiki>}}<br />
If you want to achieve colored output of i3status, you can adjust following part in the i3status configuration:<br />
{{hc|~/.config/i3status/config|<nowiki><br />
general {<br />
colors = true<br />
interval = 5<br />
}<br />
</nowiki>}}<br />
In both examples, the system-wide installed configuration files has been copied over to the user directory and then modified.<br />
<br />
=== Wallpaper ===<br />
This line, which can be appended at the end of your sway configuration, sets a background image on all displays (output matches all with name {{ic|"*"}}):<br />
{{hc|~/.config/sway/config|<nowiki><br />
output "*" background /home/onny/pictures/fredwang_norway.jpg fill<br />
</nowiki>}}<br />
Of course you have to replace the file name and path according to your wallpaper.<br />
<br />
=== Input devices ===<br />
Its possible to tweak specific input device configurations. For example to enable tap-to-click and natural scolling for a touchpad, add an input block:<br />
{{hc|~/.config/sway/config|<nowiki><br />
input "2:14:ETPS/2_Elantech_Touchpad" {<br />
tap enabled<br />
natural_scroll enabled<br />
}<br />
</nowiki>}}<br />
Where as the device identifier can be queried with:<br />
swaymsg -t get_inputs<br />
<br />
The output from the command, sometimes has a "\" to escape symbols like "/" (ie {{ic|"2:14:ETPS\/2_Elantech_Touchpad"}}) and it needs to be removed.<br />
<br />
More documentation and options like acceleration profiles can be found with:<br />
man sway-input<br />
<br />
=== HiDPI ===<br />
<br />
Set your displays scale factor with the {{ic|output}} command in your config file. The scale factor must be an integer, and is usually 2 for HiDPI screens.<br />
output <name> scale <factor><br />
You can find your display name with the following command:<br />
swaymsg -t get_outputs<br />
<br />
=== Custom keybindings ===<br />
[[Extra keyboard keys|Special keys]] on your keyboard can be used to execute commands, for example to control your volume or your monitor brightness:<br />
<br />
{{hc|~/.config/sway/config|<nowiki><br />
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5%<br />
bindsym XF86AudioLowerVolume exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5%<br />
bindsym XF86AudioToggle exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle<br />
bindsym XF86MonBrightnessDown exec dsplight down 5<br />
bindsym XF86MonBrightnessUp exec dsplight up 5<br />
</nowiki>}}<br />
<br />
You many need to change the sound card index to 1 or 2 depending on your system configuration. See [[Backlight]] for a list of utilities to control brightness and color correction.<br />
<br />
== Known issues ==<br />
<br />
=== Using i3-dmenu-desktop ===<br />
<br />
i3-dmenu-desktop is not usable directly from sway, but a patch is available here : https://github.com/i3/i3/pull/2265/files<br />
Unfortunately, the patch cannot be merged because it breaks when used from i3 in some corner cases.<br />
<br />
See here for more information: https://github.com/SirCmpwn/sway/issues/521<br />
<br />
You can still apply the patch manually through installing {{AUR|sway-dmenu-desktop}}. This creates a new binary called {{ic|sway-dmenu-desktop}} to be using within sway.<br />
<br />
=== Using VirtualBox ===<br />
<br />
Sway doesn't work well (or at all) under VirtualBox.<br />
<br />
=== Sway Socket Not Detected ===<br />
<br />
Using a {{ic|swaymsg}} argument, such as {{ic|swaymsg -t get_outputs}}, will sometimes return the message<br />
sway socket not detected.<br />
ERROR: Unable to connect to<br />
when run inside a terminal multiplexer (such as gnu screen or tmux). To avoid this error, the current workaround is to run the command outside of a multiplexer.<br />
<br />
=== Incorrect Monitor Resolution ===<br />
<br />
Config options such as {{ic|output "HDMI-A-1" res 1280x1024}} may not successfully change the resolution. The window manager {{Pkg|wlc}} is responsible for setting the resolution, and attempts to figure out monitor resolution from the TTY.<br />
<br />
You may be able to alter your TTY resolution (thus also altering the WLC and Sway resolution) by passing a kernel parameter such as {{ic|1=video=HDMI-A-1:1280x1024:e}} or with with custom edid binaries ([[Kernel_mode_setting|see Kernel Mode Setting]]).<br />
<br />
=== Extraneous cursor after logging in with gdm ===<br />
<br />
If you use gdm as your login manager, an extraneous cursor will be left after logging in (see [https://github.com/SirCmpwn/sway/issues/759 issue #759]).<br />
<br />
The current workaround is to switch to another TTY, and switch back to sway.<br />
<br />
== See also ==<br />
<br />
* [https://github.com/SirCmpwn/sway Github project]<br />
* [http://swaywm.org Website]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Wordpress&diff=459675Wordpress2016-12-20T23:52:13Z<p>JoshuaBranson: I added a section about installing a plugin using WordPress' admin interface. This means a user would not have to set up an FTP server to install a plugin or theme.</p>
<hr />
<div>[[Category:Web server]]<br />
[[ja:Wordpress]]<br />
{{Related articles start}}<br />
{{Related|Apache HTTP Server}}<br />
{{Related|PHP}}<br />
{{Related|MySQL}}<br />
{{Related|phpMyAdmin}}<br />
{{Related articles end}}<br />
<br />
[http://wordpress.org WordPress] is a free and open source content management system ([[Wikipedia:Content management system|CMS]]) created by [[Wikipedia:Matt Mullenweg|Matt Mullenweg]] and first released in 2003. WordPress has a vast and vibrant community that provides tens of thousands of free plugins and themes to allow the user to easily customize the appearance and function of their WordPress CMS. WordPress is licensed under the GPLv2.<br />
<br />
The biggest feature of WordPress is its ease in configuration and administration. [http://codex.wordpress.org/Installing_WordPress Setting up a WordPress site takes five minutes]. The WordPress administration panel allows users to easily configure almost every aspect of their website including fetching and installing plugins and themes. WordPress provides effortless automatic updates.<br />
<br />
== Installation ==<br />
<br />
WordPress requires [[PHP]] and [[MySQL]] to be installed and configured. See the [[LAMP]] wiki article for more information. During configuration, be aware that some WordPress features require [http://wordpress.stackexchange.com/questions/42098/what-are-php-extensions-and-libraries-wp-needs-and-or-uses PHP extensions] that may not be turned on by default.<br />
<br />
{{note|As of August 2012, this article does not support using WordPress with PostrgreSQL. WordPress was designed to be used with MySQL only. It is possible to use WordPress with other databases such as PostgreSQL, through the use of a [http://wordpress.org/extend/plugins/postgresql-for-wordpress/ plugin] and a bit of work.}}<br />
<br />
=== Installation using pacman ===<br />
<br />
[[Install]] the {{pkg|wordpress}} package.<br />
<br />
{{warning|While it is easier to let pacman manage updating your WordPress install, this is not necessary. WordPress has functionality built-in for managing updates, themes, and plugins. If you decide to install the official community package, you will not be able to install plugins and themes using the WordPress admin panel without a needlessly complex permissions setup, or logging into FTP as root. pacman does not delete the WordPress install directory when uninstalling it from your system regardless of whether or not you have added data to the directory manually or otherwise.}}<br />
<br />
=== Manual install ===<br />
<br />
Go to [http://wordpress.org/download/ wordpress.org] and download the latest version of WordPress and extract it to your webserver directory. Give the directory enough permissions to allow your FTP user to write to the directory (used by WordPress).<br />
<br />
cd /srv/http/whatever<br />
wget https://wordpress.org/latest.tar.gz<br />
tar xvzf latest.tar.gz<br />
<br />
== Configuration ==<br />
<br />
The configuration method used here assumes you are using WordPress on a local network.<br />
<br />
=== Host config ===<br />
<br />
Make sure your {{ic|/etc/hosts}} file is setup correctly. This will be important when accessing your WordPress CMS from a local network. Your {{ic|/etc/hosts}} file should look something like the following,<br />
<br />
{{bc|#<ip-address> <hostname.domain.org> <hostname><br />
127.0.0.1 lithium.kaboodle.net localhost lithium<br />
::1 lithium.kaboodle.net localhost lithium}}<br />
<br />
{{note|You will need to use a proxy server to access your WordPress installation from mobile devices if you plan on using hostnames to install WordPress, otherwise your website will appear broken [[#Appearance is broken (no styling)]].}}<br />
<br />
=== Configure apache ===<br />
<br />
{{note|You will need [[Apache]] configured to run with [[PHP]] and [[MySQL]]. Check [[LAMP#PHP]] and [[LAMP#MySQL.2FMariaDB|LAMP#MySQL/MariaDB]] sections for instructions.}}<br />
<br />
You will need to create a config file for apache to find your WordPress install. Create the following file and edit it your favorite text editor:<br />
<br />
{{hc|# /etc/httpd/conf/extra/httpd-wordpress.conf|<br />
Alias /wordpress "/usr/share/webapps/wordpress"<br />
<Directory "/usr/share/webapps/wordpress"><br />
AllowOverride All<br />
Options FollowSymlinks<br />
Require all granted<br />
php_admin_value open_basedir "/srv/:/tmp/:/usr/share/webapps/:/etc/webapps:$"<br />
</Directory>}}<br />
<br />
{{note|As of PHP 7.0, {{ic|open_basedir}} [https://www.archlinux.org/news/php-70-packages-released is not set anymore by default] and the line ({{ic|php_admin_value open_basedir ...}}) can be safely skipped in default PHP configurations.}}<br />
<br />
Change {{ic|/wordpress}} in the first line to whatever you want. For example, {{ic|/myblog}} would require that you navigate to {{ic|http://hostname/myblog}} to see your WordPress website.<br />
<br />
Also change the paths to your WordPress install folder in case you did a manual install. Do not forget to append the parent directory to the {{ic|php_admin_value}} variable as well as shown below.<br />
<br />
{{hc|# /etc/httpd/conf/extra/httpd-wordpress.conf|<br />
Alias /myblog "/mnt/data/srv/wordpress"<br />
<Directory "/mnt/data/srv/wordpress"><br />
AllowOverride All<br />
Options FollowSymlinks<br />
Require all granted<br />
php_admin_value open_basedir "/srv/:/tmp/:/usr/share/webapps/:/etc/webapps:/mnt/data/srv:$"<br />
</Directory>}}<br />
<br />
Next edit the apache config file and add the following:<br />
<br />
{{hc|# /etc/httpd/conf/httpd.conf|<br />
...<br />
Include conf/extra/httpd-wordpress.conf<br />
...<br />
}}<br />
<br />
Now restart {{ic|httpd.service}} (Apache) using [[systemd#Using units|systemd]].<br />
<br />
=== Configure MySQL ===<br />
<br />
MySQL can be configured using a plethora of tools, but the most common are the command-line or [http://www.phpmyadmin.net/home_page/index.php phpMyAdmin].<br />
<br />
{{Tip|Make sure MariaDB is installed and configured correctly. At a minimum, follow the [[MySQL#Installation|installation instructions]] for Arch Linux.}}<br />
<br />
==== Using MariaDB command-line tool ====<br />
<br />
First, login as root. You will be asked for your MariaDB root password:<br />
<br />
$ mysql -u root -p<br />
<br />
Then create a user and database:<br />
{{Note|{{ic|wordpress}} is your Database Name and {{ic|wp-user}} is your User Name. You can change them if you wish. Also replace {{ic|choose_db_password}} with your new Password for this database. You will be asked for these values along with {{ic|localhost}} in the next section.}} <br />
<br />
{{bc|MariaDB> CREATE DATABASE wordpress;<br />
MariaDB> GRANT ALL PRIVILEGES ON wordpress.* TO "wp-user"@"localhost" IDENTIFIED BY "choose_db_password";<br />
MariaDB> FLUSH PRIVILEGES;<br />
MariaDB> EXIT}}<br />
<br />
See WordPress.org [https://codex.wordpress.org/Installing_WordPress#Using_the_MySQL_Client official instructions] for details.<br />
<br />
==== Using phpMyAdmin ====<br />
<br />
See [[phpMyAdmin]] to install and configure phpMyAdmin.<br />
<br />
In your web browser, navigate to your phpMyAdmin host and perform the following<br />
steps:<br />
<br />
# Login to phpMyAdmin.<br />
# Click "user" and then click "Add user".<br />
# Give the pop up window a name and a password.<br />
# Select "Create database with same name and grant all privileges".<br />
# Click the "Add user" button to create the user.<br />
<br />
== WordPress Installation ==<br />
<br />
Once you have spent a couple of hours setting up your http server, php, and mysql, it is finally time to let WordPress have its five minutes and install itself. So let us begin.<br />
<br />
The WordPress installation procedure will use the URL in the address field of your web browser as the default website URL. If you have navigated to http://localhost/wordpress, your website will be accessible from your local network, but it will be broken in appearance and function.<br />
<br />
# Navigate to {{ic|http://hostname/wordpress}}.<br />
# Click the "Create a Configuration File" button.<br />
# Click the "Let's go!" button.<br />
# Fill in you database information created in the previous section<br />
# Click "Submit".<br />
<br />
If you installed WordPress from the Official repository, then this setup procedure will not have the correct permissions to create the wp-config.php file used by WordPress. You will have to do this step yourself as root using information WordPress will provide.<br />
<br />
A page will appear saying WordPress can not write the wp-config.php file. Copy the text in the edit box and open {{ic|/usr/share/webapps/wordpress/wp-config.php}} as root in your text editor. Paste the copied text into the editor and save the file.<br />
<br />
After that, you will have to change permissions of the /usr/share/webapps/wordpress/ and all the files inside it to user {{ic|http}} and group {{ic|http}} by using chown so that the webserver can access it.<br />
<br />
Finally, Click "Run the install" and WordPress will populate the database with your information. Once complete, you will be shown "Success!" page. Click the login button to finish your installation.<br />
<br />
Now would be a good time to access your website from all your devices to be sure your WordPress installation is setup correctly.<br />
<br />
== Usage ==<br />
<br />
=== Installing a theme ===<br />
<br />
==== Finding new themes ====<br />
<br />
There are tens of thousands of themes available for WordPress. Searching on google for a good theme can be like wading through a river filled with trash. Good places for looking for themes include:<br />
<br />
* [https://wordpress.org/themes/ Official WordPress theme website]<br />
* [http://www.smashingmagazine.com/ Smashing Magazine]<br />
* [http://thethemefoundry.com/ The Theme Factory]<br />
* [http://www.woothemes.com/ Woo Themes]<br />
<br />
{{Tip|One can use WordPress' admin interface to install plugins and themes. To do this, make the user that serves WordPress the [[File_permissions_and_attributes#Changing_permissions|owner]] of your WordPress directory. For [[Apache_HTTP_Server#Advanced_options|Apache]] this user is normally http.}}<br />
<br />
==== Install using the admin panel ====<br />
<br />
Before installing a theme using the admin panel, you will need to setup an [[Very_Secure_FTP_Daemon|FTP]] server on your WordPress host. To maintain a high level of protection, you might set up a [[user]] on your system specifically for WordPress, give it the home directory of {{ic|<path to your WordPress install>/wp-content}}, disallow anonymous login, and allow no more users to log in than for WordPress (and obviously others as required by your setup).<br />
<br />
Once the FTP server is setup, login to your WordPress installation and click <nowiki>"Appearance->Install Themes->Upload"</nowiki>. From there select your zip file that contains your theme and click "Install Now". You will be presented with a box asking for FTP information, enter it and click "Proceed". You might need to update [[chown|file ownership]] and [[chmod|rights]] if WordPress reports that it is unable to write to the directory. If you have been following along closely, you should now have an installed theme. Activate it if you wish.<br />
<br />
==== Install manually ====<br />
<br />
Download the archive and extract into the '''wp-content/themes''' folder<br />
<br />
# Example for a theme named "MyTheme"<br />
cd /path/to/wordpress/root/directory<br />
cd wp-content/themes<br />
<br />
# get the theme archive and extract<br />
wget <nowiki>http://www.example.com/MyTheme.zip</nowiki><br />
unzip MyTheme.zip<br />
<br />
# remove the archive (optional)<br />
rm MyTheme.zip<br />
<br />
Be sure to follow any additional instructions as provided by the theme author.<br />
<br />
Select your new theme from the theme chooser (<nowiki>"Appearance->Themes"</nowiki>)<br />
<br />
=== Installing a plugin ===<br />
<br />
The steps for installing a plugin are the same as they are for installing a theme. Just click the "Plugins" link in the left navigation bar and follow the steps. WordPress is very easy to use.<br />
<br />
=== Updating ===<br />
<br />
Every now and then when you log into wordpress there will be a notification informing you of updates. If you have correctly installed and configured an FTP client, and have the correct filesystem permissions to write in the WordPress install path then you should be able to perform updates at the click of a button. Just follow the steps.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Appearance is broken (no styling) ===<br />
<br />
Your WordPress website will appear to have no styling to it when viewing it in a web browser (desktop or mobile) that does not have its hostnames mapped to ip addresses correctly.<br />
<br />
This occurs because you used a url with the hostname of your server, instead of an ip address, when doing the initial setup and WordPress has used this as the default website URL.<br />
<br />
To fix this, you will either need to edit your /etc/hosts file or setup a proxy server. For an easy to setup proxy server, see [[Polipo]], or if you want something with a little more configuration, see [[Squid]].<br />
<br />
Another option is changing a value in the database table of your WordPress, specifically the wp_options table. The fix is to change the siteurl option to point directly to the domain name and not "localhost".<br />
<br />
== Tips and tricks ==<br />
<br />
== See also ==<br />
* [[Wikipedia:WordPress|WordPress]]<br />
* [[Wikipedia:Content management system|Content management system]]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Blueman&diff=443555Blueman2016-07-28T12:16:15Z<p>JoshuaBranson: removed a word.</p>
<hr />
<div>[[Category:Bluetooth]]<br />
[[ja:Blueman]]<br />
{{Related articles start}}<br />
{{Related|Bluetooth}}<br />
{{Related|Bluez4}}<br />
{{Related articles end}}<br />
[https://github.com/blueman-project/blueman Blueman] is a full featured Bluetooth manager written in [[GTK+]]. See the project page on [https://github.com/blueman-project/blueman Github].<br />
<br />
== Installation ==<br />
<br />
Install either {{Pkg|blueman}} or {{AUR|blueman-git}} (the development version).<br />
<br />
Be sure to enable the [[Bluetooth]] daemon and start Blueman with {{ic|blueman-applet}}. A graphical settings panel can be launched with {{ic|blueman-manager}}.<br />
<br />
== Usage ==<br />
<br />
=== Autostarting ===<br />
<br />
The following autostart file should have been created: {{ic|/etc/xdg/autostart/blueman.desktop}}. This means that Blueman should be autostarted with most desktop environments without manual intervention. See the article for your desktop environment or window manager as well as the [[Autostarting]] article for further information on autostarting.<br />
<br />
=== Permissions ===<br />
<br />
To receive files remember to right click on the ''Blueman tray icon > Local Services > Transfer > File Receiving (Object Push)'' and tick the ''Accept files from trusted devices'' box.<br />
<br />
To be able to manage devices, you might need to add your user to the {{ic|lp}} group, else you might receive the following error when connecting to a device: {{ic|DBusFailedError: No such file or directory}}. This is because the user needs to be authorized to communicate with the bluetooth daemon via [[D-Bus]] - the {{ic|lp}} group is specified in {{ic|/etc/dbus-1/system.d/bluetooth.conf}}. For information on adding a user to a group, see [[Users and groups#Other examples of user management]].<br />
<br />
=== Mounting Bluetooth devices ===<br />
<br />
The instructions below describe a method for using different file managers with Blueman. The examples in this section focus on [[Thunar]]. If you are using a different file manager, substitute ''thunar'' with the name of the file manager you are using.<br />
<br />
{{hc|obex_thunar.sh|<br />
#!/bin/bash<br />
fusermount -u ~/bluetooth<br />
obexfs -b $1 ~/bluetooth<br />
thunar ~/bluetooth<br />
}}<br />
<br />
Now you will need to move the script to an appropriate location (e.g., {{ic|/usr/local/bin}}). After that, mark it as executable:<br />
# chmod +x /usr/local/bin/obex_thunar.sh<br />
<br />
The last step is to change the line in ''Blueman tray icon > Local Services > Transfer > Advanced'' to {{ic|obex_thunar.sh %d}}.<br />
<br />
{{Out of date|It would appear that {{ic|thunar obex://%d}} is not functional. Also note that changing command should not be necessary as the system default file manager will be used by default - see release notes for 1.99.alpha2|Talk:Blueman#thunar obex:// support}}<br />
<br />
{{Tip|If you do not want to create a script, you could just replace this command: {{ic|nautilus --browse obex://}} with this one: {{ic|thunar obex://}} in ''Local Services > Transfer > Advanced''}}<br />
<br />
=== Blueman and PulseAudio ===<br />
<br />
Users who want to use [[PulseAudio]] with a Bluetooth headset, in addition to [[install]]ing {{Pkg|pulseaudio-bluetooth}}, may want to activate the PulseAudio plugin of Blueman. This automatically loads PulseAudio Bluetooth module after audio device is connected and plays all audio through the Bluetooth headset. For more information see [[Bluetooth headset]]<br />
<br />
== Configuration ==<br />
Configuration is done through {{Pkg|dconf}} (or gsettings or {{Pkg|dconf-editor}}).<br />
<br />
=== Disable auto power-on ===<br />
<br />
Blueman automatically enables Bluetooth adapter ({{ic||rfkill unblock bluetooth}}) when certain events (on boot, laptop lid is opened, ...) occur. This can be disabled with the {{ic|auto-power-on}} in {{ic|org.blueman.plugins.powermanager}}:<br />
<br />
$ gsettings set org.blueman.plugins.powermanager auto-power-on false<br />
<br />
== Troubleshooting ==<br />
<br />
=== Blueman applet does not start ===<br />
<br />
If blueman-applet fails to start, try removing the entire {{ic|/var/lib/bluetooth}} directory and restarting the machine (or just the dbus and bluetooth services).<br />
# rm -rf /var/lib/bluetooth<br />
$ systemctl reboot<br />
If you see a notification saying {{ic|Incoming file over Bluetooth}} then this means that the device isn't marked as trusted. Mark it as trusted and try sending the file again.<br />
<br />
=== No adapters detected ===<br />
<br />
{{Accuracy|Is {{Pkg|rfkill}} genuinely required? It's not a {{Pkg|blueman}} dependency and my bluetooth adaptor is detected just fine by blueman without it.}}<br />
<br />
If your Bluetooth applet or manager doesn't show or detect any Bluetooth adapter, you might be missing {{Pkg|rfkill}}. Restart might be required.<br />
<br />
=== Can't receive files ===<br />
<br />
If you can't send or receive files and you encounter a python-dbus-exception error similar or exactly like {{ic|process org.bluez.obex exited with status 1}} then it is advised to start the obexd-service manually from {{ic|/usr/lib/bluetooth/obexd}} and see if that helps. Since the default permissions assume 755 it is possible to start the daemon from a user-account and/or create an autostarter.<br />
<br />
Should the error persist or another occur then try using {{Pkg|obexftp}} for file transfers instead, see [[Bluetooth#ObexFTP transfers]].<br />
<br />
== See also ==<br />
<br />
* [https://github.com/blueman-project/blueman Blueman development], on GitHub</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Blueman&diff=443554Blueman2016-07-28T12:15:52Z<p>JoshuaBranson: The introduction had unneccesary detail about the project's history</p>
<hr />
<div>[[Category:Bluetooth]]<br />
[[ja:Blueman]]<br />
{{Related articles start}}<br />
{{Related|Bluetooth}}<br />
{{Related|Bluez4}}<br />
{{Related articles end}}<br />
[https://github.com/blueman-project/blueman Blueman] is a full featured Bluetooth manager written in [[GTK+]]. See the project page on github [https://github.com/blueman-project/blueman Github].<br />
<br />
== Installation ==<br />
<br />
Install either {{Pkg|blueman}} or {{AUR|blueman-git}} (the development version).<br />
<br />
Be sure to enable the [[Bluetooth]] daemon and start Blueman with {{ic|blueman-applet}}. A graphical settings panel can be launched with {{ic|blueman-manager}}.<br />
<br />
== Usage ==<br />
<br />
=== Autostarting ===<br />
<br />
The following autostart file should have been created: {{ic|/etc/xdg/autostart/blueman.desktop}}. This means that Blueman should be autostarted with most desktop environments without manual intervention. See the article for your desktop environment or window manager as well as the [[Autostarting]] article for further information on autostarting.<br />
<br />
=== Permissions ===<br />
<br />
To receive files remember to right click on the ''Blueman tray icon > Local Services > Transfer > File Receiving (Object Push)'' and tick the ''Accept files from trusted devices'' box.<br />
<br />
To be able to manage devices, you might need to add your user to the {{ic|lp}} group, else you might receive the following error when connecting to a device: {{ic|DBusFailedError: No such file or directory}}. This is because the user needs to be authorized to communicate with the bluetooth daemon via [[D-Bus]] - the {{ic|lp}} group is specified in {{ic|/etc/dbus-1/system.d/bluetooth.conf}}. For information on adding a user to a group, see [[Users and groups#Other examples of user management]].<br />
<br />
=== Mounting Bluetooth devices ===<br />
<br />
The instructions below describe a method for using different file managers with Blueman. The examples in this section focus on [[Thunar]]. If you are using a different file manager, substitute ''thunar'' with the name of the file manager you are using.<br />
<br />
{{hc|obex_thunar.sh|<br />
#!/bin/bash<br />
fusermount -u ~/bluetooth<br />
obexfs -b $1 ~/bluetooth<br />
thunar ~/bluetooth<br />
}}<br />
<br />
Now you will need to move the script to an appropriate location (e.g., {{ic|/usr/local/bin}}). After that, mark it as executable:<br />
# chmod +x /usr/local/bin/obex_thunar.sh<br />
<br />
The last step is to change the line in ''Blueman tray icon > Local Services > Transfer > Advanced'' to {{ic|obex_thunar.sh %d}}.<br />
<br />
{{Out of date|It would appear that {{ic|thunar obex://%d}} is not functional. Also note that changing command should not be necessary as the system default file manager will be used by default - see release notes for 1.99.alpha2|Talk:Blueman#thunar obex:// support}}<br />
<br />
{{Tip|If you do not want to create a script, you could just replace this command: {{ic|nautilus --browse obex://}} with this one: {{ic|thunar obex://}} in ''Local Services > Transfer > Advanced''}}<br />
<br />
=== Blueman and PulseAudio ===<br />
<br />
Users who want to use [[PulseAudio]] with a Bluetooth headset, in addition to [[install]]ing {{Pkg|pulseaudio-bluetooth}}, may want to activate the PulseAudio plugin of Blueman. This automatically loads PulseAudio Bluetooth module after audio device is connected and plays all audio through the Bluetooth headset. For more information see [[Bluetooth headset]]<br />
<br />
== Configuration ==<br />
Configuration is done through {{Pkg|dconf}} (or gsettings or {{Pkg|dconf-editor}}).<br />
<br />
=== Disable auto power-on ===<br />
<br />
Blueman automatically enables Bluetooth adapter ({{ic||rfkill unblock bluetooth}}) when certain events (on boot, laptop lid is opened, ...) occur. This can be disabled with the {{ic|auto-power-on}} in {{ic|org.blueman.plugins.powermanager}}:<br />
<br />
$ gsettings set org.blueman.plugins.powermanager auto-power-on false<br />
<br />
== Troubleshooting ==<br />
<br />
=== Blueman applet does not start ===<br />
<br />
If blueman-applet fails to start, try removing the entire {{ic|/var/lib/bluetooth}} directory and restarting the machine (or just the dbus and bluetooth services).<br />
# rm -rf /var/lib/bluetooth<br />
$ systemctl reboot<br />
If you see a notification saying {{ic|Incoming file over Bluetooth}} then this means that the device isn't marked as trusted. Mark it as trusted and try sending the file again.<br />
<br />
=== No adapters detected ===<br />
<br />
{{Accuracy|Is {{Pkg|rfkill}} genuinely required? It's not a {{Pkg|blueman}} dependency and my bluetooth adaptor is detected just fine by blueman without it.}}<br />
<br />
If your Bluetooth applet or manager doesn't show or detect any Bluetooth adapter, you might be missing {{Pkg|rfkill}}. Restart might be required.<br />
<br />
=== Can't receive files ===<br />
<br />
If you can't send or receive files and you encounter a python-dbus-exception error similar or exactly like {{ic|process org.bluez.obex exited with status 1}} then it is advised to start the obexd-service manually from {{ic|/usr/lib/bluetooth/obexd}} and see if that helps. Since the default permissions assume 755 it is possible to start the daemon from a user-account and/or create an autostarter.<br />
<br />
Should the error persist or another occur then try using {{Pkg|obexftp}} for file transfers instead, see [[Bluetooth#ObexFTP transfers]].<br />
<br />
== See also ==<br />
<br />
* [https://github.com/blueman-project/blueman Blueman development], on GitHub</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Thunar&diff=436897Thunar2016-06-01T21:20:35Z<p>JoshuaBranson: /* Starting in daemon mode */</p>
<hr />
<div>[[Category:File managers]]<br />
[[ar:Thunar]]<br />
[[es:Thunar]]<br />
[[fr:Thunar]]<br />
[[it:Thunar]]<br />
[[ja:Thunar]]<br />
[[pl:Thunar]]<br />
[[ru:Thunar]]<br />
[[zh-CN:Thunar]]<br />
{{Related articles start}}<br />
{{Related|Xfce}}<br />
{{Related|File manager functionality}}<br />
{{Related|GNOME Files}}<br />
{{Related|PCManFM}}<br />
{{Related|Nemo}}<br />
{{Related articles end}}<br />
<br />
From the project [http://docs.xfce.org/xfce/thunar/start home page]:<br />
: ''Thunar is a modern file manager for the Xfce Desktop Environment. Thunar has been designed from the ground up to be fast and easy-to-use. Its user interface is clean and intuitive, and does not include any confusing or useless options by default. Thunar is fast and responsive with a good start up time and folder load time.''<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|thunar}} package. It is part of the {{Grp|xfce4}} group, so if you are running [[Xfce]], you probably already have Thunar installed.<br />
<br />
=== Additional functionality ===<br />
<br />
Thunar adheres to shared standards and can exploit common libraries to enhance its functionality, such as using [[GVFS]] for automounting. See [[File manager functionality]] for more details.<br />
<br />
=== Plugins and addons ===<br />
<br />
* {{App|Thunar Archive Plugin|Plugin which allows you to create and extract archive files using contextual menu items. It does not create or extract archives directly, but instead acts as a frontend for other programs such as File Roller ({{Pkg|file-roller}}), Ark ({{Pkg|ark}}) or Xarchiver ({{Pkg|xarchiver}}). Part of {{Grp|xfce4-goodies}}.|http://goodies.xfce.org/projects/thunar-plugins/thunar-archive-plugin|{{Pkg|thunar-archive-plugin}}}}<br />
* {{App|Thunar Media Tags Plugin|Plugin which allows you to view detailed information about media files. It also has a bulk renamed and allows editing of media tags. It supports ID3 (the MP3 file format's system) and Ogg/Vorbis tags. Part of {{Grp|xfce4-goodies}}.|http://goodies.xfce.org/projects/thunar-plugins/thunar-media-tags-plugin|{{Pkg|thunar-media-tags-plugin}}}}<br />
* {{App|Thunar Shares Plugin|Plugin which allows you to quickly share a folder using Samba from Thunar without requiring root access. See also [[Samba#Creating usershare path|how to configure directions]].|http://goodies.xfce.org/projects/thunar-plugins/thunar-shares-plugin|{{AUR|thunar-shares-plugin}}}}<br />
* {{App|[[ #Thunar Volume Manager|Thunar Volume Manager]]|Automatic management of removeable devices in Thunar. Part of {{Grp|xfce4}}.|http://goodies.xfce.org/projects/thunar-plugins/thunar-volman|{{Pkg|thunar-volman}}}}<br />
* {{App|Tumbler|External program to generate thumbnails. Also install {{Pkg|ffmpegthumbnailer}} to enable video thumbnailing.|http://git.xfce.org/xfce/tumbler/tree/README|{{Pkg|tumbler}}}}<br />
* {{App|RAW Thumbnailer|A lightweight and fast raw image thumbnailer that is needed to display raw thumbnails.|https://code.google.com/p/raw-thumbnailer/|{{Pkg|raw-thumbnailer}}}}<br />
* {{App|libgsf|The GNOME Structured File Library is a utility library for reading and writing structured file formats. Install if you need support for odf thumbnails|http://directory.fsf.org/wiki/Libgsf|{{Pkg|libgsf}}}}<br />
<br />
== Thunar Volume Manager ==<br />
<br />
While Thunar can support automatic mounting and unmounting of removable media, the Thunar Volume Manager allows extended functionality, such as automatically running commands or automatically opening a Thunar window for mounted media.<br />
<br />
=== Installation ===<br />
<br />
Thunar Volume Manager can be installed from the package {{Pkg|thunar-volman}} in the official repositories.<br />
<br />
{{Tip|To let Thunar handle automatic mounting, one must launch thunar in daemon mode. [[Thunar#Starting_in_daemon_mode]] }}<br />
<br />
=== Configuration ===<br />
<br />
It can also be configured to execute certain actions when cameras and audio players are connected. <br />
After installing the plugin:<br />
# Launch Thunar and go to ''Edit > Preferences''<br />
# Under the 'Advanced' tab, check 'Enable Volume Management'<br />
# Click configure and check the following items:<br />
#* Mount removable drives when hot-plugged.<br />
#* Mount removable media when inserted.<br />
# Also make desired changes (see the example below)<br />
Here's an example setting for making Amarok play an audio CD.<br />
Multimedia - Audio CDs: {{ic|amarok --cdplay %d}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Automounting of large external drives ===<br />
If Thunar refuses to mount large removable media (size > 1TB) although thunar-volman and gvfs has been installed, then try installing a different automounter such as {{Pkg|udevil}} or {{Pkg|udiskie}}. The latter should be preferred as it uses udisks2 and thus is compatible with gvfs. To start udiskie with udisks2 support, add the following line to your autostart file:<br />
<br />
udiskie -2 &<br />
<br />
=== Using Thunar to browse remote locations ===<br />
<br />
Since Xfce 4.8 (Thunar 1.2) it is possible to browse remote locations (such as FTP servers or Samba shares) directly in Thunar. To enable this functionality ensure that {{Pkg|gvfs}}, {{Pkg|gvfs-smb}} and {{Pkg|sshfs}} packages are installed. A 'Network' entry is visible in Thunar's side bar and remote locations can be opened by using the following URI schemes in the location dialog (opened with {{ic|Ctrl+l}}): smb://, <nowiki>ftp://</nowiki>, ssh://, sftp://, davs:// & followed by the server hostname or IP address.<br />
<br />
There is no URI scheme for [[NFS]] shares, but Thunar can issue a {{ic|mount}} command if you setup your [[fstab]] properly.<br />
{{hc|/etc/fstab|<br />
# nas1 server<br />
nas1:/c/home /media/nas1/home nfs noauto,user,_netdev,bg 0 0}}<br />
<br />
What's important here is the {{ic|noauto}} which prevents the share from being mounted until you click on it, {{ic|user}} which allows any user to mount (and unmount) the share, {{ic|_netdev}} which makes network connectivity a pre-requisite, and finally {{ic|bg}} which puts the mounting operation the background so if your server requires some spin-up time you won't have to deal with time out messages and re-clicking until it works.<br />
<br />
{{Tip|If you want to permanently store passphrases of remote filesystem locations, you have to install [[GNOME Keyring]].}}<br />
<br />
=== Starting in daemon mode ===<br />
<br />
Thunar may be run in daemon mode. This has several advantages, including a faster startup for Thunar, Thunar running in the background and only opening a window when necessary (for instance, when a flash drive is inserted), and letting Thunar handle automatic mounting of removable media.<br />
<br />
Make sure the command {{ic|thunar --daemon}} is autostarted on login. See [[Xfce]] and [[Autostarting]] for more details.<br />
<br />
=== Solving problem with slow cold start ===<br />
<br />
Some people still have problems with Thunar taking a long time to start for the first time. This is due to gvfs checking the network, preventing Thunar from starting until gvfs finishes its operations. To change this behaviour, edit {{ic|/usr/share/gvfs/mounts/network.mount}} and change '''AutoMount=true''' to '''AutoMount=false'''.<br />
<br />
=== Hide Shortcuts in Side Pane ===<br />
<br />
There is a hidden menu to hide Shortcuts in the Side Pane.<br />
<br />
Right click in the Side Pane where there are no shortcuts, like on the DEVICES section label. Then you will get a pop-up menu where you can uncheck items you do not want displayed.<br />
<br />
=== Assign keyboard shortcuts in Thunar ===<br />
<br />
See [[GTK+#Keyboard shortcuts]],<br />
<br />
=== Showing partitions defined in fstab ===<br />
<br />
By default Thunar will not show in devices any partitions defined in {{ic|/etc/fstab}} besides the root partition.<br />
<br />
We can change that by adding the option '''comment=x-gvfs-show''' to fstab for the partition we wish to show.<br />
<br />
== Custom actions ==<br />
<br />
This section covers useful custom actions which can be accessed through {{ic|Edit -> Configure custom actions}} and which are stored in {{ic|~/.config/Thunar/uca.xml}}. More examples are listed in the [http://docs.xfce.org/xfce/thunar/custom-actions thunar wiki]. Furthermore, [http://duncanlock.net/blog/2013/06/28/useful-thunar-custom-actions/ this] blog post provides a comprehensive collection of custom actions.<br />
<br />
=== Search for files and folders ===<br />
<br />
To use this action you need to have {{Pkg|catfish}} installed. The optional dependency {{Pkg|mlocate}} should be installed as well.<br />
{| class="wikitable"<br />
! Name !! Command !! File patterns !! Appears if selection contains<br />
|-<br />
! Search<br />
| {{ic|1=catfish --path=%f}} || * || Directories<br />
|}<br />
<br />
=== Scan for viruses ===<br />
<br />
To use this action you need to have {{Pkg|clamav}} and {{AUR|clamtk}} installed.<br />
<br />
{| class="wikitable"<br />
! Name !! Command !! File patterns !! Appears if selection contains<br />
|-<br />
! Scan for virus<br />
| {{ic|clamtk %F}} || * || Select all<br />
|}<br />
<br />
=== Link to Dropbox ===<br />
<br />
{| class="wikitable"<br />
! Name !! Command !! File patterns !! Appears if selection contains<br />
|-<br />
! Link to Dropbox<br />
| {{ic|ln -s %f /path/to/DropboxFolder}} || * || Directories, other files<br />
|}<br />
<br />
Please note that when using many custom actions to symlink files and folder to a particular place, it might be useful to put them into the {{ic|Send To}} folder of the context menu to avoid that the menu itself gets bloated. This is fairly easy to achieve and requires a .desktop file in {{ic|~/.local/share/Thunar/sendto}} for each action to perform. Say we want to put the above Dropbox symlink action into Send To, we create a {{ic|dropbox_folder.desktop}} with the following content. The new applied action will be active after restarting Thunar.<br />
<br />
{{bc|<nowiki><br />
[Desktop Entry]<br />
Type=Application<br />
Version=1.0<br />
Encoding=UTF-8<br />
Exec=ln -s %f /path/to/DropboxFolder<br />
Icon=/usr/share/icons/dropbox.png<br />
Name=Dropbox<br />
</nowiki>}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Tumblerd hangs up, uses too much CPU ===<br />
<br />
Tumblerd, the service that watches the file system and notifies the system when a thumbnail needs to be made may get stuck in a loop, using 100% of the system's CPU, see the [https://bugzilla.xfce.org/show_bug.cgi?id=7384 bug report]. The following script is a temporary workaround to stop this from happening. Copy, and paste this into a ''.sh'' file, save it somewhere in your home directory, mark the file as executable then set up the system to autostart it at system startup. <br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
period=20<br />
tumblerpath="/usr/lib/*/tumbler-1/tumblerd" # The * here should find the right one, whether 32 and 64-bit<br />
cpu_threshold=50<br />
mem_threshold=20<br />
max_strikes=2 # max number of above cpu/mem-threshold's in a row<br />
log="/tmp/tumblerd-watcher.log"<br />
<br />
if [[ -n "${log}" ]]; then<br />
cat /dev/null > "${log}"<br />
exec >"${log}" 2>&1<br />
fi<br />
<br />
<br />
strikes=0<br />
while sleep "${period}"; do<br />
while read pid; do<br />
cpu_usage=$(ps --no-headers -o pcpu -f "${pid}"|cut -f1 -d.)<br />
mem_usage=$(ps --no-headers -o pmem -f "${pid}"|cut -f1 -d.)<br />
<br />
if [[ $cpu_usage -gt $cpu_threshold ]] || [[ $mem_usage -gt $mem_threshold ]]; then<br />
echo "$(date +"%F %T") PID: $pid CPU: $cpu_usage/$cpu_threshold %cpu MEM: $mem_usage/$mem_threshold STRIKES: ${strikes} NPROCS: $(pgrep -c -f ${tumblerpath})"<br />
(( strikes++ ))<br />
if [[ ${strikes} -ge ${max_strikes} ]]; then<br />
kill "${pid}"<br />
echo "$(date +"%F %T") PID: $pid KILLED; NPROCS: $(pgrep -c -f ${tumblerpath})"<br />
strikes=0<br />
fi<br />
else<br />
strikes=0<br />
fi<br />
done < <(pgrep -f ${tumblerpath})<br />
done<br />
</nowiki>}}<br />
<br />
=== Trash/network icons disappear randomly ===<br />
<br />
Make sure all Thunar instances start '''after''' ''gvfs''. [https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/1057610] For {{ic|thunar --daemon}}, you can create a wrapper that waits until GVFS is active:<br />
<br />
{{Note|{{ic|/usr/local/bin}} should come before {{ic|/usr/bin}} in {{ic|$PATH}}.}}<br />
<br />
{{hc|/usr/local/bin/Thunar|<nowiki><br />
#!/bin/bash<br />
if [[ $1 == --daemon ]]; then<br />
until pgrep gvfs >/dev/null; do<br />
sleep 1<br />
done<br />
exec /usr/bin/Thunar "$@"<br />
else<br />
exec /usr/bin/Thunar "$@"<br />
fi<br />
</nowiki>}}<br />
<br />
=== Not authenticated to mount filesystems ===<br />
<br />
See [[File manager functionality#Troubleshooting]].<br />
<br />
== See also ==<br />
<br />
* [http://docs.xfce.org/xfce/thunar/start Thunar] project page<br />
* [http://goodies.xfce.org/projects/thunar-plugins/thunar-volman Thunar Volume Manager] project page<br />
* This [http://goodies.xfce.org/projects/thunar-plugins/start list] of plugins</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Thunar&diff=436894Thunar2016-06-01T21:19:43Z<p>JoshuaBranson: /* Installation */</p>
<hr />
<div>[[Category:File managers]]<br />
[[ar:Thunar]]<br />
[[es:Thunar]]<br />
[[fr:Thunar]]<br />
[[it:Thunar]]<br />
[[ja:Thunar]]<br />
[[pl:Thunar]]<br />
[[ru:Thunar]]<br />
[[zh-CN:Thunar]]<br />
{{Related articles start}}<br />
{{Related|Xfce}}<br />
{{Related|File manager functionality}}<br />
{{Related|GNOME Files}}<br />
{{Related|PCManFM}}<br />
{{Related|Nemo}}<br />
{{Related articles end}}<br />
<br />
From the project [http://docs.xfce.org/xfce/thunar/start home page]:<br />
: ''Thunar is a modern file manager for the Xfce Desktop Environment. Thunar has been designed from the ground up to be fast and easy-to-use. Its user interface is clean and intuitive, and does not include any confusing or useless options by default. Thunar is fast and responsive with a good start up time and folder load time.''<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|thunar}} package. It is part of the {{Grp|xfce4}} group, so if you are running [[Xfce]], you probably already have Thunar installed.<br />
<br />
=== Additional functionality ===<br />
<br />
Thunar adheres to shared standards and can exploit common libraries to enhance its functionality, such as using [[GVFS]] for automounting. See [[File manager functionality]] for more details.<br />
<br />
=== Plugins and addons ===<br />
<br />
* {{App|Thunar Archive Plugin|Plugin which allows you to create and extract archive files using contextual menu items. It does not create or extract archives directly, but instead acts as a frontend for other programs such as File Roller ({{Pkg|file-roller}}), Ark ({{Pkg|ark}}) or Xarchiver ({{Pkg|xarchiver}}). Part of {{Grp|xfce4-goodies}}.|http://goodies.xfce.org/projects/thunar-plugins/thunar-archive-plugin|{{Pkg|thunar-archive-plugin}}}}<br />
* {{App|Thunar Media Tags Plugin|Plugin which allows you to view detailed information about media files. It also has a bulk renamed and allows editing of media tags. It supports ID3 (the MP3 file format's system) and Ogg/Vorbis tags. Part of {{Grp|xfce4-goodies}}.|http://goodies.xfce.org/projects/thunar-plugins/thunar-media-tags-plugin|{{Pkg|thunar-media-tags-plugin}}}}<br />
* {{App|Thunar Shares Plugin|Plugin which allows you to quickly share a folder using Samba from Thunar without requiring root access. See also [[Samba#Creating usershare path|how to configure directions]].|http://goodies.xfce.org/projects/thunar-plugins/thunar-shares-plugin|{{AUR|thunar-shares-plugin}}}}<br />
* {{App|[[ #Thunar Volume Manager|Thunar Volume Manager]]|Automatic management of removeable devices in Thunar. Part of {{Grp|xfce4}}.|http://goodies.xfce.org/projects/thunar-plugins/thunar-volman|{{Pkg|thunar-volman}}}}<br />
* {{App|Tumbler|External program to generate thumbnails. Also install {{Pkg|ffmpegthumbnailer}} to enable video thumbnailing.|http://git.xfce.org/xfce/tumbler/tree/README|{{Pkg|tumbler}}}}<br />
* {{App|RAW Thumbnailer|A lightweight and fast raw image thumbnailer that is needed to display raw thumbnails.|https://code.google.com/p/raw-thumbnailer/|{{Pkg|raw-thumbnailer}}}}<br />
* {{App|libgsf|The GNOME Structured File Library is a utility library for reading and writing structured file formats. Install if you need support for odf thumbnails|http://directory.fsf.org/wiki/Libgsf|{{Pkg|libgsf}}}}<br />
<br />
== Thunar Volume Manager ==<br />
<br />
While Thunar can support automatic mounting and unmounting of removable media, the Thunar Volume Manager allows extended functionality, such as automatically running commands or automatically opening a Thunar window for mounted media.<br />
<br />
=== Installation ===<br />
<br />
Thunar Volume Manager can be installed from the package {{Pkg|thunar-volman}} in the official repositories.<br />
<br />
{{Tip|To let Thunar handle automatic mounting, one must launch thunar in daemon mode. [[Thunar#Starting_in_daemon_mode]] }}<br />
<br />
=== Configuration ===<br />
<br />
It can also be configured to execute certain actions when cameras and audio players are connected. <br />
After installing the plugin:<br />
# Launch Thunar and go to ''Edit > Preferences''<br />
# Under the 'Advanced' tab, check 'Enable Volume Management'<br />
# Click configure and check the following items:<br />
#* Mount removable drives when hot-plugged.<br />
#* Mount removable media when inserted.<br />
# Also make desired changes (see the example below)<br />
Here's an example setting for making Amarok play an audio CD.<br />
Multimedia - Audio CDs: {{ic|amarok --cdplay %d}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Automounting of large external drives ===<br />
If Thunar refuses to mount large removable media (size > 1TB) although thunar-volman and gvfs has been installed, then try installing a different automounter such as {{Pkg|udevil}} or {{Pkg|udiskie}}. The latter should be preferred as it uses udisks2 and thus is compatible with gvfs. To start udiskie with udisks2 support, add the following line to your autostart file:<br />
<br />
udiskie -2 &<br />
<br />
=== Using Thunar to browse remote locations ===<br />
<br />
Since Xfce 4.8 (Thunar 1.2) it is possible to browse remote locations (such as FTP servers or Samba shares) directly in Thunar. To enable this functionality ensure that {{Pkg|gvfs}}, {{Pkg|gvfs-smb}} and {{Pkg|sshfs}} packages are installed. A 'Network' entry is visible in Thunar's side bar and remote locations can be opened by using the following URI schemes in the location dialog (opened with {{ic|Ctrl+l}}): smb://, <nowiki>ftp://</nowiki>, ssh://, sftp://, davs:// & followed by the server hostname or IP address.<br />
<br />
There is no URI scheme for [[NFS]] shares, but Thunar can issue a {{ic|mount}} command if you setup your [[fstab]] properly.<br />
{{hc|/etc/fstab|<br />
# nas1 server<br />
nas1:/c/home /media/nas1/home nfs noauto,user,_netdev,bg 0 0}}<br />
<br />
What's important here is the {{ic|noauto}} which prevents the share from being mounted until you click on it, {{ic|user}} which allows any user to mount (and unmount) the share, {{ic|_netdev}} which makes network connectivity a pre-requisite, and finally {{ic|bg}} which puts the mounting operation the background so if your server requires some spin-up time you won't have to deal with time out messages and re-clicking until it works.<br />
<br />
{{Tip|If you want to permanently store passphrases of remote filesystem locations, you have to install [[GNOME Keyring]].}}<br />
<br />
=== Starting in daemon mode ===<br />
<br />
Thunar may be run in daemon mode. This has several advantages, including a faster startup for Thunar, as well as Thunar running in the background and only opening a window when necessary (for instance, when a flash drive is inserted).<br />
<br />
Make sure the command {{ic|thunar --daemon}} is autostarted on login. See [[Xfce]] and [[Autostarting]] for more details.<br />
<br />
=== Solving problem with slow cold start ===<br />
<br />
Some people still have problems with Thunar taking a long time to start for the first time. This is due to gvfs checking the network, preventing Thunar from starting until gvfs finishes its operations. To change this behaviour, edit {{ic|/usr/share/gvfs/mounts/network.mount}} and change '''AutoMount=true''' to '''AutoMount=false'''.<br />
<br />
=== Hide Shortcuts in Side Pane ===<br />
<br />
There is a hidden menu to hide Shortcuts in the Side Pane.<br />
<br />
Right click in the Side Pane where there are no shortcuts, like on the DEVICES section label. Then you will get a pop-up menu where you can uncheck items you do not want displayed.<br />
<br />
=== Assign keyboard shortcuts in Thunar ===<br />
<br />
See [[GTK+#Keyboard shortcuts]],<br />
<br />
=== Showing partitions defined in fstab ===<br />
<br />
By default Thunar will not show in devices any partitions defined in {{ic|/etc/fstab}} besides the root partition.<br />
<br />
We can change that by adding the option '''comment=x-gvfs-show''' to fstab for the partition we wish to show.<br />
<br />
== Custom actions ==<br />
<br />
This section covers useful custom actions which can be accessed through {{ic|Edit -> Configure custom actions}} and which are stored in {{ic|~/.config/Thunar/uca.xml}}. More examples are listed in the [http://docs.xfce.org/xfce/thunar/custom-actions thunar wiki]. Furthermore, [http://duncanlock.net/blog/2013/06/28/useful-thunar-custom-actions/ this] blog post provides a comprehensive collection of custom actions.<br />
<br />
=== Search for files and folders ===<br />
<br />
To use this action you need to have {{Pkg|catfish}} installed. The optional dependency {{Pkg|mlocate}} should be installed as well.<br />
{| class="wikitable"<br />
! Name !! Command !! File patterns !! Appears if selection contains<br />
|-<br />
! Search<br />
| {{ic|1=catfish --path=%f}} || * || Directories<br />
|}<br />
<br />
=== Scan for viruses ===<br />
<br />
To use this action you need to have {{Pkg|clamav}} and {{AUR|clamtk}} installed.<br />
<br />
{| class="wikitable"<br />
! Name !! Command !! File patterns !! Appears if selection contains<br />
|-<br />
! Scan for virus<br />
| {{ic|clamtk %F}} || * || Select all<br />
|}<br />
<br />
=== Link to Dropbox ===<br />
<br />
{| class="wikitable"<br />
! Name !! Command !! File patterns !! Appears if selection contains<br />
|-<br />
! Link to Dropbox<br />
| {{ic|ln -s %f /path/to/DropboxFolder}} || * || Directories, other files<br />
|}<br />
<br />
Please note that when using many custom actions to symlink files and folder to a particular place, it might be useful to put them into the {{ic|Send To}} folder of the context menu to avoid that the menu itself gets bloated. This is fairly easy to achieve and requires a .desktop file in {{ic|~/.local/share/Thunar/sendto}} for each action to perform. Say we want to put the above Dropbox symlink action into Send To, we create a {{ic|dropbox_folder.desktop}} with the following content. The new applied action will be active after restarting Thunar.<br />
<br />
{{bc|<nowiki><br />
[Desktop Entry]<br />
Type=Application<br />
Version=1.0<br />
Encoding=UTF-8<br />
Exec=ln -s %f /path/to/DropboxFolder<br />
Icon=/usr/share/icons/dropbox.png<br />
Name=Dropbox<br />
</nowiki>}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Tumblerd hangs up, uses too much CPU ===<br />
<br />
Tumblerd, the service that watches the file system and notifies the system when a thumbnail needs to be made may get stuck in a loop, using 100% of the system's CPU, see the [https://bugzilla.xfce.org/show_bug.cgi?id=7384 bug report]. The following script is a temporary workaround to stop this from happening. Copy, and paste this into a ''.sh'' file, save it somewhere in your home directory, mark the file as executable then set up the system to autostart it at system startup. <br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
period=20<br />
tumblerpath="/usr/lib/*/tumbler-1/tumblerd" # The * here should find the right one, whether 32 and 64-bit<br />
cpu_threshold=50<br />
mem_threshold=20<br />
max_strikes=2 # max number of above cpu/mem-threshold's in a row<br />
log="/tmp/tumblerd-watcher.log"<br />
<br />
if [[ -n "${log}" ]]; then<br />
cat /dev/null > "${log}"<br />
exec >"${log}" 2>&1<br />
fi<br />
<br />
<br />
strikes=0<br />
while sleep "${period}"; do<br />
while read pid; do<br />
cpu_usage=$(ps --no-headers -o pcpu -f "${pid}"|cut -f1 -d.)<br />
mem_usage=$(ps --no-headers -o pmem -f "${pid}"|cut -f1 -d.)<br />
<br />
if [[ $cpu_usage -gt $cpu_threshold ]] || [[ $mem_usage -gt $mem_threshold ]]; then<br />
echo "$(date +"%F %T") PID: $pid CPU: $cpu_usage/$cpu_threshold %cpu MEM: $mem_usage/$mem_threshold STRIKES: ${strikes} NPROCS: $(pgrep -c -f ${tumblerpath})"<br />
(( strikes++ ))<br />
if [[ ${strikes} -ge ${max_strikes} ]]; then<br />
kill "${pid}"<br />
echo "$(date +"%F %T") PID: $pid KILLED; NPROCS: $(pgrep -c -f ${tumblerpath})"<br />
strikes=0<br />
fi<br />
else<br />
strikes=0<br />
fi<br />
done < <(pgrep -f ${tumblerpath})<br />
done<br />
</nowiki>}}<br />
<br />
=== Trash/network icons disappear randomly ===<br />
<br />
Make sure all Thunar instances start '''after''' ''gvfs''. [https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/1057610] For {{ic|thunar --daemon}}, you can create a wrapper that waits until GVFS is active:<br />
<br />
{{Note|{{ic|/usr/local/bin}} should come before {{ic|/usr/bin}} in {{ic|$PATH}}.}}<br />
<br />
{{hc|/usr/local/bin/Thunar|<nowiki><br />
#!/bin/bash<br />
if [[ $1 == --daemon ]]; then<br />
until pgrep gvfs >/dev/null; do<br />
sleep 1<br />
done<br />
exec /usr/bin/Thunar "$@"<br />
else<br />
exec /usr/bin/Thunar "$@"<br />
fi<br />
</nowiki>}}<br />
<br />
=== Not authenticated to mount filesystems ===<br />
<br />
See [[File manager functionality#Troubleshooting]].<br />
<br />
== See also ==<br />
<br />
* [http://docs.xfce.org/xfce/thunar/start Thunar] project page<br />
* [http://goodies.xfce.org/projects/thunar-plugins/thunar-volman Thunar Volume Manager] project page<br />
* This [http://goodies.xfce.org/projects/thunar-plugins/start list] of plugins</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Thunar&diff=436893Thunar2016-06-01T21:18:37Z<p>JoshuaBranson: /* Installation */ I added a link to explain how to start thunar in daemon mode.</p>
<hr />
<div>[[Category:File managers]]<br />
[[ar:Thunar]]<br />
[[es:Thunar]]<br />
[[fr:Thunar]]<br />
[[it:Thunar]]<br />
[[ja:Thunar]]<br />
[[pl:Thunar]]<br />
[[ru:Thunar]]<br />
[[zh-CN:Thunar]]<br />
{{Related articles start}}<br />
{{Related|Xfce}}<br />
{{Related|File manager functionality}}<br />
{{Related|GNOME Files}}<br />
{{Related|PCManFM}}<br />
{{Related|Nemo}}<br />
{{Related articles end}}<br />
<br />
From the project [http://docs.xfce.org/xfce/thunar/start home page]:<br />
: ''Thunar is a modern file manager for the Xfce Desktop Environment. Thunar has been designed from the ground up to be fast and easy-to-use. Its user interface is clean and intuitive, and does not include any confusing or useless options by default. Thunar is fast and responsive with a good start up time and folder load time.''<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|thunar}} package. It is part of the {{Grp|xfce4}} group, so if you are running [[Xfce]], you probably already have Thunar installed.<br />
<br />
=== Additional functionality ===<br />
<br />
Thunar adheres to shared standards and can exploit common libraries to enhance its functionality, such as using [[GVFS]] for automounting. See [[File manager functionality]] for more details.<br />
<br />
=== Plugins and addons ===<br />
<br />
* {{App|Thunar Archive Plugin|Plugin which allows you to create and extract archive files using contextual menu items. It does not create or extract archives directly, but instead acts as a frontend for other programs such as File Roller ({{Pkg|file-roller}}), Ark ({{Pkg|ark}}) or Xarchiver ({{Pkg|xarchiver}}). Part of {{Grp|xfce4-goodies}}.|http://goodies.xfce.org/projects/thunar-plugins/thunar-archive-plugin|{{Pkg|thunar-archive-plugin}}}}<br />
* {{App|Thunar Media Tags Plugin|Plugin which allows you to view detailed information about media files. It also has a bulk renamed and allows editing of media tags. It supports ID3 (the MP3 file format's system) and Ogg/Vorbis tags. Part of {{Grp|xfce4-goodies}}.|http://goodies.xfce.org/projects/thunar-plugins/thunar-media-tags-plugin|{{Pkg|thunar-media-tags-plugin}}}}<br />
* {{App|Thunar Shares Plugin|Plugin which allows you to quickly share a folder using Samba from Thunar without requiring root access. See also [[Samba#Creating usershare path|how to configure directions]].|http://goodies.xfce.org/projects/thunar-plugins/thunar-shares-plugin|{{AUR|thunar-shares-plugin}}}}<br />
* {{App|[[ #Thunar Volume Manager|Thunar Volume Manager]]|Automatic management of removeable devices in Thunar. Part of {{Grp|xfce4}}.|http://goodies.xfce.org/projects/thunar-plugins/thunar-volman|{{Pkg|thunar-volman}}}}<br />
* {{App|Tumbler|External program to generate thumbnails. Also install {{Pkg|ffmpegthumbnailer}} to enable video thumbnailing.|http://git.xfce.org/xfce/tumbler/tree/README|{{Pkg|tumbler}}}}<br />
* {{App|RAW Thumbnailer|A lightweight and fast raw image thumbnailer that is needed to display raw thumbnails.|https://code.google.com/p/raw-thumbnailer/|{{Pkg|raw-thumbnailer}}}}<br />
* {{App|libgsf|The GNOME Structured File Library is a utility library for reading and writing structured file formats. Install if you need support for odf thumbnails|http://directory.fsf.org/wiki/Libgsf|{{Pkg|libgsf}}}}<br />
<br />
== Thunar Volume Manager ==<br />
<br />
While Thunar can support automatic mounting and unmounting of removable media, the Thunar Volume Manager allows extended functionality, such as automatically running commands or automatically opening a Thunar window for mounted media.<br />
<br />
=== Installation ===<br />
<br />
Thunar Volume Manager can be installed from the package {{Pkg|thunar-volman}} in the official repositories.<br />
<br />
{{Tip|To use Thunar support automatic mounting, one must launch thunar in daemon mode. [[Thunar#Starting_in_daemon_mode]] }}<br />
<br />
=== Configuration ===<br />
<br />
It can also be configured to execute certain actions when cameras and audio players are connected. <br />
After installing the plugin:<br />
# Launch Thunar and go to ''Edit > Preferences''<br />
# Under the 'Advanced' tab, check 'Enable Volume Management'<br />
# Click configure and check the following items:<br />
#* Mount removable drives when hot-plugged.<br />
#* Mount removable media when inserted.<br />
# Also make desired changes (see the example below)<br />
Here's an example setting for making Amarok play an audio CD.<br />
Multimedia - Audio CDs: {{ic|amarok --cdplay %d}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Automounting of large external drives ===<br />
If Thunar refuses to mount large removable media (size > 1TB) although thunar-volman and gvfs has been installed, then try installing a different automounter such as {{Pkg|udevil}} or {{Pkg|udiskie}}. The latter should be preferred as it uses udisks2 and thus is compatible with gvfs. To start udiskie with udisks2 support, add the following line to your autostart file:<br />
<br />
udiskie -2 &<br />
<br />
=== Using Thunar to browse remote locations ===<br />
<br />
Since Xfce 4.8 (Thunar 1.2) it is possible to browse remote locations (such as FTP servers or Samba shares) directly in Thunar. To enable this functionality ensure that {{Pkg|gvfs}}, {{Pkg|gvfs-smb}} and {{Pkg|sshfs}} packages are installed. A 'Network' entry is visible in Thunar's side bar and remote locations can be opened by using the following URI schemes in the location dialog (opened with {{ic|Ctrl+l}}): smb://, <nowiki>ftp://</nowiki>, ssh://, sftp://, davs:// & followed by the server hostname or IP address.<br />
<br />
There is no URI scheme for [[NFS]] shares, but Thunar can issue a {{ic|mount}} command if you setup your [[fstab]] properly.<br />
{{hc|/etc/fstab|<br />
# nas1 server<br />
nas1:/c/home /media/nas1/home nfs noauto,user,_netdev,bg 0 0}}<br />
<br />
What's important here is the {{ic|noauto}} which prevents the share from being mounted until you click on it, {{ic|user}} which allows any user to mount (and unmount) the share, {{ic|_netdev}} which makes network connectivity a pre-requisite, and finally {{ic|bg}} which puts the mounting operation the background so if your server requires some spin-up time you won't have to deal with time out messages and re-clicking until it works.<br />
<br />
{{Tip|If you want to permanently store passphrases of remote filesystem locations, you have to install [[GNOME Keyring]].}}<br />
<br />
=== Starting in daemon mode ===<br />
<br />
Thunar may be run in daemon mode. This has several advantages, including a faster startup for Thunar, as well as Thunar running in the background and only opening a window when necessary (for instance, when a flash drive is inserted).<br />
<br />
Make sure the command {{ic|thunar --daemon}} is autostarted on login. See [[Xfce]] and [[Autostarting]] for more details.<br />
<br />
=== Solving problem with slow cold start ===<br />
<br />
Some people still have problems with Thunar taking a long time to start for the first time. This is due to gvfs checking the network, preventing Thunar from starting until gvfs finishes its operations. To change this behaviour, edit {{ic|/usr/share/gvfs/mounts/network.mount}} and change '''AutoMount=true''' to '''AutoMount=false'''.<br />
<br />
=== Hide Shortcuts in Side Pane ===<br />
<br />
There is a hidden menu to hide Shortcuts in the Side Pane.<br />
<br />
Right click in the Side Pane where there are no shortcuts, like on the DEVICES section label. Then you will get a pop-up menu where you can uncheck items you do not want displayed.<br />
<br />
=== Assign keyboard shortcuts in Thunar ===<br />
<br />
See [[GTK+#Keyboard shortcuts]],<br />
<br />
=== Showing partitions defined in fstab ===<br />
<br />
By default Thunar will not show in devices any partitions defined in {{ic|/etc/fstab}} besides the root partition.<br />
<br />
We can change that by adding the option '''comment=x-gvfs-show''' to fstab for the partition we wish to show.<br />
<br />
== Custom actions ==<br />
<br />
This section covers useful custom actions which can be accessed through {{ic|Edit -> Configure custom actions}} and which are stored in {{ic|~/.config/Thunar/uca.xml}}. More examples are listed in the [http://docs.xfce.org/xfce/thunar/custom-actions thunar wiki]. Furthermore, [http://duncanlock.net/blog/2013/06/28/useful-thunar-custom-actions/ this] blog post provides a comprehensive collection of custom actions.<br />
<br />
=== Search for files and folders ===<br />
<br />
To use this action you need to have {{Pkg|catfish}} installed. The optional dependency {{Pkg|mlocate}} should be installed as well.<br />
{| class="wikitable"<br />
! Name !! Command !! File patterns !! Appears if selection contains<br />
|-<br />
! Search<br />
| {{ic|1=catfish --path=%f}} || * || Directories<br />
|}<br />
<br />
=== Scan for viruses ===<br />
<br />
To use this action you need to have {{Pkg|clamav}} and {{AUR|clamtk}} installed.<br />
<br />
{| class="wikitable"<br />
! Name !! Command !! File patterns !! Appears if selection contains<br />
|-<br />
! Scan for virus<br />
| {{ic|clamtk %F}} || * || Select all<br />
|}<br />
<br />
=== Link to Dropbox ===<br />
<br />
{| class="wikitable"<br />
! Name !! Command !! File patterns !! Appears if selection contains<br />
|-<br />
! Link to Dropbox<br />
| {{ic|ln -s %f /path/to/DropboxFolder}} || * || Directories, other files<br />
|}<br />
<br />
Please note that when using many custom actions to symlink files and folder to a particular place, it might be useful to put them into the {{ic|Send To}} folder of the context menu to avoid that the menu itself gets bloated. This is fairly easy to achieve and requires a .desktop file in {{ic|~/.local/share/Thunar/sendto}} for each action to perform. Say we want to put the above Dropbox symlink action into Send To, we create a {{ic|dropbox_folder.desktop}} with the following content. The new applied action will be active after restarting Thunar.<br />
<br />
{{bc|<nowiki><br />
[Desktop Entry]<br />
Type=Application<br />
Version=1.0<br />
Encoding=UTF-8<br />
Exec=ln -s %f /path/to/DropboxFolder<br />
Icon=/usr/share/icons/dropbox.png<br />
Name=Dropbox<br />
</nowiki>}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Tumblerd hangs up, uses too much CPU ===<br />
<br />
Tumblerd, the service that watches the file system and notifies the system when a thumbnail needs to be made may get stuck in a loop, using 100% of the system's CPU, see the [https://bugzilla.xfce.org/show_bug.cgi?id=7384 bug report]. The following script is a temporary workaround to stop this from happening. Copy, and paste this into a ''.sh'' file, save it somewhere in your home directory, mark the file as executable then set up the system to autostart it at system startup. <br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
period=20<br />
tumblerpath="/usr/lib/*/tumbler-1/tumblerd" # The * here should find the right one, whether 32 and 64-bit<br />
cpu_threshold=50<br />
mem_threshold=20<br />
max_strikes=2 # max number of above cpu/mem-threshold's in a row<br />
log="/tmp/tumblerd-watcher.log"<br />
<br />
if [[ -n "${log}" ]]; then<br />
cat /dev/null > "${log}"<br />
exec >"${log}" 2>&1<br />
fi<br />
<br />
<br />
strikes=0<br />
while sleep "${period}"; do<br />
while read pid; do<br />
cpu_usage=$(ps --no-headers -o pcpu -f "${pid}"|cut -f1 -d.)<br />
mem_usage=$(ps --no-headers -o pmem -f "${pid}"|cut -f1 -d.)<br />
<br />
if [[ $cpu_usage -gt $cpu_threshold ]] || [[ $mem_usage -gt $mem_threshold ]]; then<br />
echo "$(date +"%F %T") PID: $pid CPU: $cpu_usage/$cpu_threshold %cpu MEM: $mem_usage/$mem_threshold STRIKES: ${strikes} NPROCS: $(pgrep -c -f ${tumblerpath})"<br />
(( strikes++ ))<br />
if [[ ${strikes} -ge ${max_strikes} ]]; then<br />
kill "${pid}"<br />
echo "$(date +"%F %T") PID: $pid KILLED; NPROCS: $(pgrep -c -f ${tumblerpath})"<br />
strikes=0<br />
fi<br />
else<br />
strikes=0<br />
fi<br />
done < <(pgrep -f ${tumblerpath})<br />
done<br />
</nowiki>}}<br />
<br />
=== Trash/network icons disappear randomly ===<br />
<br />
Make sure all Thunar instances start '''after''' ''gvfs''. [https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/1057610] For {{ic|thunar --daemon}}, you can create a wrapper that waits until GVFS is active:<br />
<br />
{{Note|{{ic|/usr/local/bin}} should come before {{ic|/usr/bin}} in {{ic|$PATH}}.}}<br />
<br />
{{hc|/usr/local/bin/Thunar|<nowiki><br />
#!/bin/bash<br />
if [[ $1 == --daemon ]]; then<br />
until pgrep gvfs >/dev/null; do<br />
sleep 1<br />
done<br />
exec /usr/bin/Thunar "$@"<br />
else<br />
exec /usr/bin/Thunar "$@"<br />
fi<br />
</nowiki>}}<br />
<br />
=== Not authenticated to mount filesystems ===<br />
<br />
See [[File manager functionality#Troubleshooting]].<br />
<br />
== See also ==<br />
<br />
* [http://docs.xfce.org/xfce/thunar/start Thunar] project page<br />
* [http://goodies.xfce.org/projects/thunar-plugins/thunar-volman Thunar Volume Manager] project page<br />
* This [http://goodies.xfce.org/projects/thunar-plugins/start list] of plugins</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Thunar&diff=436892Thunar2016-06-01T21:15:46Z<p>JoshuaBranson: I added a small note for automatic mounting.</p>
<hr />
<div>[[Category:File managers]]<br />
[[ar:Thunar]]<br />
[[es:Thunar]]<br />
[[fr:Thunar]]<br />
[[it:Thunar]]<br />
[[ja:Thunar]]<br />
[[pl:Thunar]]<br />
[[ru:Thunar]]<br />
[[zh-CN:Thunar]]<br />
{{Related articles start}}<br />
{{Related|Xfce}}<br />
{{Related|File manager functionality}}<br />
{{Related|GNOME Files}}<br />
{{Related|PCManFM}}<br />
{{Related|Nemo}}<br />
{{Related articles end}}<br />
<br />
From the project [http://docs.xfce.org/xfce/thunar/start home page]:<br />
: ''Thunar is a modern file manager for the Xfce Desktop Environment. Thunar has been designed from the ground up to be fast and easy-to-use. Its user interface is clean and intuitive, and does not include any confusing or useless options by default. Thunar is fast and responsive with a good start up time and folder load time.''<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|thunar}} package. It is part of the {{Grp|xfce4}} group, so if you are running [[Xfce]], you probably already have Thunar installed.<br />
<br />
=== Additional functionality ===<br />
<br />
Thunar adheres to shared standards and can exploit common libraries to enhance its functionality, such as using [[GVFS]] for automounting. See [[File manager functionality]] for more details.<br />
<br />
=== Plugins and addons ===<br />
<br />
* {{App|Thunar Archive Plugin|Plugin which allows you to create and extract archive files using contextual menu items. It does not create or extract archives directly, but instead acts as a frontend for other programs such as File Roller ({{Pkg|file-roller}}), Ark ({{Pkg|ark}}) or Xarchiver ({{Pkg|xarchiver}}). Part of {{Grp|xfce4-goodies}}.|http://goodies.xfce.org/projects/thunar-plugins/thunar-archive-plugin|{{Pkg|thunar-archive-plugin}}}}<br />
* {{App|Thunar Media Tags Plugin|Plugin which allows you to view detailed information about media files. It also has a bulk renamed and allows editing of media tags. It supports ID3 (the MP3 file format's system) and Ogg/Vorbis tags. Part of {{Grp|xfce4-goodies}}.|http://goodies.xfce.org/projects/thunar-plugins/thunar-media-tags-plugin|{{Pkg|thunar-media-tags-plugin}}}}<br />
* {{App|Thunar Shares Plugin|Plugin which allows you to quickly share a folder using Samba from Thunar without requiring root access. See also [[Samba#Creating usershare path|how to configure directions]].|http://goodies.xfce.org/projects/thunar-plugins/thunar-shares-plugin|{{AUR|thunar-shares-plugin}}}}<br />
* {{App|[[ #Thunar Volume Manager|Thunar Volume Manager]]|Automatic management of removeable devices in Thunar. Part of {{Grp|xfce4}}.|http://goodies.xfce.org/projects/thunar-plugins/thunar-volman|{{Pkg|thunar-volman}}}}<br />
* {{App|Tumbler|External program to generate thumbnails. Also install {{Pkg|ffmpegthumbnailer}} to enable video thumbnailing.|http://git.xfce.org/xfce/tumbler/tree/README|{{Pkg|tumbler}}}}<br />
* {{App|RAW Thumbnailer|A lightweight and fast raw image thumbnailer that is needed to display raw thumbnails.|https://code.google.com/p/raw-thumbnailer/|{{Pkg|raw-thumbnailer}}}}<br />
* {{App|libgsf|The GNOME Structured File Library is a utility library for reading and writing structured file formats. Install if you need support for odf thumbnails|http://directory.fsf.org/wiki/Libgsf|{{Pkg|libgsf}}}}<br />
<br />
== Thunar Volume Manager ==<br />
<br />
While Thunar can support automatic mounting and unmounting of removable media, the Thunar Volume Manager allows extended functionality, such as automatically running commands or automatically opening a Thunar window for mounted media.<br />
<br />
=== Installation ===<br />
<br />
Thunar Volume Manager can be installed from the package {{Pkg|thunar-volman}} in the official repositories.<br />
<br />
{{Tip|To use Thunar support automatic mounting, one must launch thunar in daemon mode.}}<br />
<br />
=== Configuration ===<br />
<br />
It can also be configured to execute certain actions when cameras and audio players are connected. <br />
After installing the plugin:<br />
# Launch Thunar and go to ''Edit > Preferences''<br />
# Under the 'Advanced' tab, check 'Enable Volume Management'<br />
# Click configure and check the following items:<br />
#* Mount removable drives when hot-plugged.<br />
#* Mount removable media when inserted.<br />
# Also make desired changes (see the example below)<br />
Here's an example setting for making Amarok play an audio CD.<br />
Multimedia - Audio CDs: {{ic|amarok --cdplay %d}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Automounting of large external drives ===<br />
If Thunar refuses to mount large removable media (size > 1TB) although thunar-volman and gvfs has been installed, then try installing a different automounter such as {{Pkg|udevil}} or {{Pkg|udiskie}}. The latter should be preferred as it uses udisks2 and thus is compatible with gvfs. To start udiskie with udisks2 support, add the following line to your autostart file:<br />
<br />
udiskie -2 &<br />
<br />
=== Using Thunar to browse remote locations ===<br />
<br />
Since Xfce 4.8 (Thunar 1.2) it is possible to browse remote locations (such as FTP servers or Samba shares) directly in Thunar. To enable this functionality ensure that {{Pkg|gvfs}}, {{Pkg|gvfs-smb}} and {{Pkg|sshfs}} packages are installed. A 'Network' entry is visible in Thunar's side bar and remote locations can be opened by using the following URI schemes in the location dialog (opened with {{ic|Ctrl+l}}): smb://, <nowiki>ftp://</nowiki>, ssh://, sftp://, davs:// & followed by the server hostname or IP address.<br />
<br />
There is no URI scheme for [[NFS]] shares, but Thunar can issue a {{ic|mount}} command if you setup your [[fstab]] properly.<br />
{{hc|/etc/fstab|<br />
# nas1 server<br />
nas1:/c/home /media/nas1/home nfs noauto,user,_netdev,bg 0 0}}<br />
<br />
What's important here is the {{ic|noauto}} which prevents the share from being mounted until you click on it, {{ic|user}} which allows any user to mount (and unmount) the share, {{ic|_netdev}} which makes network connectivity a pre-requisite, and finally {{ic|bg}} which puts the mounting operation the background so if your server requires some spin-up time you won't have to deal with time out messages and re-clicking until it works.<br />
<br />
{{Tip|If you want to permanently store passphrases of remote filesystem locations, you have to install [[GNOME Keyring]].}}<br />
<br />
=== Starting in daemon mode ===<br />
<br />
Thunar may be run in daemon mode. This has several advantages, including a faster startup for Thunar, as well as Thunar running in the background and only opening a window when necessary (for instance, when a flash drive is inserted).<br />
<br />
Make sure the command {{ic|thunar --daemon}} is autostarted on login. See [[Xfce]] and [[Autostarting]] for more details.<br />
<br />
=== Solving problem with slow cold start ===<br />
<br />
Some people still have problems with Thunar taking a long time to start for the first time. This is due to gvfs checking the network, preventing Thunar from starting until gvfs finishes its operations. To change this behaviour, edit {{ic|/usr/share/gvfs/mounts/network.mount}} and change '''AutoMount=true''' to '''AutoMount=false'''.<br />
<br />
=== Hide Shortcuts in Side Pane ===<br />
<br />
There is a hidden menu to hide Shortcuts in the Side Pane.<br />
<br />
Right click in the Side Pane where there are no shortcuts, like on the DEVICES section label. Then you will get a pop-up menu where you can uncheck items you do not want displayed.<br />
<br />
=== Assign keyboard shortcuts in Thunar ===<br />
<br />
See [[GTK+#Keyboard shortcuts]],<br />
<br />
=== Showing partitions defined in fstab ===<br />
<br />
By default Thunar will not show in devices any partitions defined in {{ic|/etc/fstab}} besides the root partition.<br />
<br />
We can change that by adding the option '''comment=x-gvfs-show''' to fstab for the partition we wish to show.<br />
<br />
== Custom actions ==<br />
<br />
This section covers useful custom actions which can be accessed through {{ic|Edit -> Configure custom actions}} and which are stored in {{ic|~/.config/Thunar/uca.xml}}. More examples are listed in the [http://docs.xfce.org/xfce/thunar/custom-actions thunar wiki]. Furthermore, [http://duncanlock.net/blog/2013/06/28/useful-thunar-custom-actions/ this] blog post provides a comprehensive collection of custom actions.<br />
<br />
=== Search for files and folders ===<br />
<br />
To use this action you need to have {{Pkg|catfish}} installed. The optional dependency {{Pkg|mlocate}} should be installed as well.<br />
{| class="wikitable"<br />
! Name !! Command !! File patterns !! Appears if selection contains<br />
|-<br />
! Search<br />
| {{ic|1=catfish --path=%f}} || * || Directories<br />
|}<br />
<br />
=== Scan for viruses ===<br />
<br />
To use this action you need to have {{Pkg|clamav}} and {{AUR|clamtk}} installed.<br />
<br />
{| class="wikitable"<br />
! Name !! Command !! File patterns !! Appears if selection contains<br />
|-<br />
! Scan for virus<br />
| {{ic|clamtk %F}} || * || Select all<br />
|}<br />
<br />
=== Link to Dropbox ===<br />
<br />
{| class="wikitable"<br />
! Name !! Command !! File patterns !! Appears if selection contains<br />
|-<br />
! Link to Dropbox<br />
| {{ic|ln -s %f /path/to/DropboxFolder}} || * || Directories, other files<br />
|}<br />
<br />
Please note that when using many custom actions to symlink files and folder to a particular place, it might be useful to put them into the {{ic|Send To}} folder of the context menu to avoid that the menu itself gets bloated. This is fairly easy to achieve and requires a .desktop file in {{ic|~/.local/share/Thunar/sendto}} for each action to perform. Say we want to put the above Dropbox symlink action into Send To, we create a {{ic|dropbox_folder.desktop}} with the following content. The new applied action will be active after restarting Thunar.<br />
<br />
{{bc|<nowiki><br />
[Desktop Entry]<br />
Type=Application<br />
Version=1.0<br />
Encoding=UTF-8<br />
Exec=ln -s %f /path/to/DropboxFolder<br />
Icon=/usr/share/icons/dropbox.png<br />
Name=Dropbox<br />
</nowiki>}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Tumblerd hangs up, uses too much CPU ===<br />
<br />
Tumblerd, the service that watches the file system and notifies the system when a thumbnail needs to be made may get stuck in a loop, using 100% of the system's CPU, see the [https://bugzilla.xfce.org/show_bug.cgi?id=7384 bug report]. The following script is a temporary workaround to stop this from happening. Copy, and paste this into a ''.sh'' file, save it somewhere in your home directory, mark the file as executable then set up the system to autostart it at system startup. <br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
period=20<br />
tumblerpath="/usr/lib/*/tumbler-1/tumblerd" # The * here should find the right one, whether 32 and 64-bit<br />
cpu_threshold=50<br />
mem_threshold=20<br />
max_strikes=2 # max number of above cpu/mem-threshold's in a row<br />
log="/tmp/tumblerd-watcher.log"<br />
<br />
if [[ -n "${log}" ]]; then<br />
cat /dev/null > "${log}"<br />
exec >"${log}" 2>&1<br />
fi<br />
<br />
<br />
strikes=0<br />
while sleep "${period}"; do<br />
while read pid; do<br />
cpu_usage=$(ps --no-headers -o pcpu -f "${pid}"|cut -f1 -d.)<br />
mem_usage=$(ps --no-headers -o pmem -f "${pid}"|cut -f1 -d.)<br />
<br />
if [[ $cpu_usage -gt $cpu_threshold ]] || [[ $mem_usage -gt $mem_threshold ]]; then<br />
echo "$(date +"%F %T") PID: $pid CPU: $cpu_usage/$cpu_threshold %cpu MEM: $mem_usage/$mem_threshold STRIKES: ${strikes} NPROCS: $(pgrep -c -f ${tumblerpath})"<br />
(( strikes++ ))<br />
if [[ ${strikes} -ge ${max_strikes} ]]; then<br />
kill "${pid}"<br />
echo "$(date +"%F %T") PID: $pid KILLED; NPROCS: $(pgrep -c -f ${tumblerpath})"<br />
strikes=0<br />
fi<br />
else<br />
strikes=0<br />
fi<br />
done < <(pgrep -f ${tumblerpath})<br />
done<br />
</nowiki>}}<br />
<br />
=== Trash/network icons disappear randomly ===<br />
<br />
Make sure all Thunar instances start '''after''' ''gvfs''. [https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/1057610] For {{ic|thunar --daemon}}, you can create a wrapper that waits until GVFS is active:<br />
<br />
{{Note|{{ic|/usr/local/bin}} should come before {{ic|/usr/bin}} in {{ic|$PATH}}.}}<br />
<br />
{{hc|/usr/local/bin/Thunar|<nowiki><br />
#!/bin/bash<br />
if [[ $1 == --daemon ]]; then<br />
until pgrep gvfs >/dev/null; do<br />
sleep 1<br />
done<br />
exec /usr/bin/Thunar "$@"<br />
else<br />
exec /usr/bin/Thunar "$@"<br />
fi<br />
</nowiki>}}<br />
<br />
=== Not authenticated to mount filesystems ===<br />
<br />
See [[File manager functionality#Troubleshooting]].<br />
<br />
== See also ==<br />
<br />
* [http://docs.xfce.org/xfce/thunar/start Thunar] project page<br />
* [http://goodies.xfce.org/projects/thunar-plugins/thunar-volman Thunar Volume Manager] project page<br />
* This [http://goodies.xfce.org/projects/thunar-plugins/start list] of plugins</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Laptop_Mode_Tools&diff=428996Laptop Mode Tools2016-03-31T23:15:09Z<p>JoshuaBranson: /* Installation */</p>
<hr />
<div>[[Category:Laptops]]<br />
[[Category:Power management]]<br />
[[de:Laptop Mode Tools]]<br />
[[fr:Laptop Mode Tools]]<br />
[[it:Laptop Mode Tools]]<br />
[[ja:Laptop Mode Tools]]<br />
[[ru:Laptop Mode Tools]]<br />
[[zh-CN:Laptop Mode Tools]]<br />
{{Related articles start}}<br />
{{Related|acpid}}<br />
{{Related|systemd}}<br />
{{Related|cpufrequtils}}<br />
{{Related|pm-utils}}<br />
{{Related|Laptop}}<br />
{{Related|Powertop}}<br />
{{Related|TLP}}<br />
{{Related articles end}}<br />
<br />
[http://samwel.tk/laptop_mode/ Laptop Mode Tools] is a laptop power saving package for Linux systems. It is the primary way to enable the Laptop Mode feature of the Linux kernel, which lets your hard drive spin down. In addition, it allows you to tweak a number of other power-related settings using a simple configuration file.<br />
<br />
Combined with [[acpid]] and [[CPU frequency scaling]], LMT provides most users with a complete notebook power management suite.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{AUR|laptop-mode-tools}} package or the {{AUR|laptop-mode-tools-git}} package.<br />
<br />
<br />
{{Warning|1=Some arch users have experience many systemd errors using {{AUR|laptop-mode-tools}}. It is recommended to use {{AUR|laptop-mode-tools-git}}. The relevant forum articles are https://bbs.archlinux.org/viewtopic.php?id=209855 and https://bbs.archlinux.org/viewtopic.php?id=209100}}<br />
<br />
== Configuration ==<br />
<br />
Configuration is handled through:<br />
<br />
* {{ic|/etc/laptop-mode/laptop-mode.conf}} - primary configuration file.<br />
* {{ic|/etc/laptop-mode/conf.d/*}} - dozens of feature-specific "modules". <br />
<br />
Each module can be explicitly {{ic|enabled}}, {{ic|disabled}}, or set to {{ic|auto}} by changing the {{ic|CONTROL_*}} argument of any file in {{ic|conf.d/}}. LMT will attempt enable any modules where {{ic|CONTROL_*}} is set to {{ic|auto}} if {{ic|ENABLE_AUTO_MODULES}} is set in {{ic|/etc/laptop-mode/laptop-mode.conf}}. There are two exceptions to the above rule: {{ic|auto-hibernate.conf}} and {{ic|battery-level-polling.conf}} use an {{ic|ENABLE_*}} variable instead of {{ic|CONTROL_*}}.<br />
<br />
To quickly check which modules are enabled, disabled or auto, run:<br />
<br />
$ grep -r '^\(CONTROL\&#124;ENABLE\)_' /etc/laptop-mode/conf.d<br />
<br />
Finally, [[enable]] {{ic|laptop-mode.service}}.<br />
<br />
=== Hard disks ===<br />
<br />
For this you need to have ''hdparm'' and/or ''sdparm'' installed. See [[Hdparm]].<br />
<br />
Spinning down the hard drive through {{Ic|hdparm -S}} values saves power and makes everything a lot more quiet. By using the readahead function you can allow the drives to spin down more often even though you are using the computer. LMT can also establish {{Ic|hdparm -B}} values. The maximum hard drive power saving is 1 and the minimum is 254. For example, set this value to 254 when on AC and 20 when on battery. If you find that normal activity hangs often while waiting for the disk to spin up, it might be a good idea to set it to a higher value (e.g. 128) which will make it spin down less often. {{Ic|hdparm -S}} and {{Ic|hdparm -B}} values are configured in {{ic|/etc/laptop-mode/laptop-mode.conf}}.<br />
<br />
{{Warning|Spinning down a hard drive too frequently can shorten its lifespan. Take care when choosing a proper value.}}<br />
<br />
With the {{ic|CONTROL_MOUNT_OPTIONS}} variable (default on), laptop-mode-tools automatically remounts your partitions, appending {{ic|1=commit=600,noatime}} in the mount options. This keeps the journaling program jbd2 from accessing your disk every few seconds, instead the disk journal gets updated every 10 minutes.<br />
<br />
{{Warning|With this setting you could lose up to 10 minutes of work. Also be sure not to use the {{Ic|atime}} mount option. Use {{Ic|noatime}} or {{Ic|relatime}} instead.}}<br />
<br />
{{Note|1={{ic|CONTROL_MOUNT_OPTIONS}} should not be turned on with nilfs2 partitions. Refer to this thread on the forum: https://bbs.archlinux.org/viewtopic.php?id=134656}}<br />
<br />
==== Solid state drives ====<br />
<br />
From the [http://samwel.tk/laptop_mode/faq official, upstream FAQ]:<br />
<br />
'''Question:''' I have a solid-state disk (SSD) in my machine. Should I enable any of the disk-related parts of laptop-mode-tools, or are they irrelevant?<br />
<br />
'''Answer:''' They may be relevant, because (a) laptop mode will reduce the number of writes, which improves the lifetime of an SSD, and (b) laptop mode makes writes bursty, which enables power saving mechanisms like ALPM to kick in. However, your mileage may vary depending on the specific hardware involved. For some hardware, you will get no gain at all, for some the gain may be substantial.<br />
<br />
=== CPU frequency ===<br />
<br />
For this you need to have a CPU frequency driver installed. See [[CPU frequency scaling]].<br />
<br />
# cpufreq.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
CONTROL_CPU_FREQUENCY=1<br />
BATT_CPU_MAXFREQ=fastest<br />
BATT_CPU_MINFREQ=slowest<br />
BATT_CPU_GOVERNOR=ondemand<br />
BATT_CPU_IGNORE_NICE_LOAD=1<br />
LM_AC_CPU_MAXFREQ=fastest<br />
LM_AC_CPU_MINFREQ=slowest<br />
LM_AC_CPU_GOVERNOR=ondemand<br />
LM_AC_CPU_IGNORE_NICE_LOAD=1<br />
NOLM_AC_CPU_MAXFREQ=fastest<br />
NOLM_AC_CPU_MINFREQ=slowest<br />
NOLM_AC_CPU_GOVERNOR=ondemand<br />
NOLM_AC_CPU_IGNORE_NICE_LOAD=0<br />
CONTROL_CPU_THROTTLING=0<br />
<br />
=== Device and bus ===<br />
<br />
==== Intel SATA ====<br />
<br />
* Enable the Intel SATA AHCI controller Aggressive Link Power Management feature to set the disk link into a very low power mode in the absence of disk IO.<br />
<br />
# intel-sata-powermgmt.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_INTEL_SATA_POWER=1<br />
BATT_ACTIVATE_SATA_POWER=1<br />
LM_AC_ACTIVATE_SATA_POWER=1<br />
NOLM_AC_ACTIVATE_SATA_POWER=0<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/intel-sata-powermgmt.conf}} file for additional configuration details.}}<br />
<br />
==== USB autosuspend ====<br />
<br />
{{Tip|USB autosuspend functionality has been moved from the ''usb-autosuspend'' module to the ''runtime-pm'' module. Make sure to replace usb-autosuspend with runtime-pm on /lib/udev/rules.d/99-laptop-mode.rules.}}<br />
<br />
# runtime-pm.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_RUNTIME_AUTOSUSPEND=1<br />
BATT_SUSPEND_RUNTIME=1<br />
LM_AC_SUSPEND_RUNTIME=1<br />
NOLM_AC_SUSPEND_RUNTIME=1<br />
AUTOSUSPEND_TIMEOUT=2<br />
<br />
{{Note|Review the {{ic|/etc/laptop-mode/conf.d/runtime-pm.conf}} file for additional configuration details. If you have an USB tool you always use (like an USB mouse), blacklisting them would stop them from suspending.}}<br />
<br />
=== Display and graphics ===<br />
<br />
==== LCD brightness ====<br />
<br />
* Available brightness values for certain laptops can be obtained by running following command:<br />
<br />
$ cat /proc/acpi/video/VID/LCD/brightness<br />
<br />
===== ThinkPad T40/T42 =====<br />
<br />
For [[wikipedia:ThinkPad|ThinkPad]] T40/T42 notebooks, minimum and maximum brightness values can be obtained by running:<br />
<br />
$ cat /sys/class/backlight/acpi_video0/brightness<br />
$ cat /sys/class/backlight/acpi_video0/max_brightness<br />
<br />
# lcd-brightness.conf<br />
# ThinkPad T40/T42 Example<br />
#<br />
DEBUG=0<br />
CONTROL_BRIGHTNESS=1<br />
BATT_BRIGHTNESS_COMMAND="echo 0"<br />
LM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
NOLM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
BRIGHTNESS_OUTPUT="/sys/class/backlight/thinkpad_screen/brightness"<br />
<br />
===== ThinkPad T60 =====<br />
<br />
* For [[wikipedia:ThinkPad|ThinkPad]] T60 notebooks, minimum and maximum brightness values can be obtained by running:<br />
<br />
$ cat /sys/class/backlight/thinkpad_screen/max_brightness<br />
$ cat /sys/class/backlight/thinkpad_screen/brightness<br />
<br />
# lcd-brightness.conf<br />
# ThinkPad T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_BRIGHTNESS=1<br />
BATT_BRIGHTNESS_COMMAND="echo 0"<br />
LM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
NOLM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
BRIGHTNESS_OUTPUT="/sys/class/backlight/acpi_video0/brightness"<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/lcd-brightness.conf}} file for additional configuration details.}}<br />
<br />
==== Terminal blanking ====<br />
<br />
# terminal-blanking.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_TERMINAL=1<br />
TERMINALS="/dev/tty1"<br />
BATT_TERMINAL_BLANK_MINUTES=1<br />
BATT_TERMINAL_POWERDOWN_MINUTES=2<br />
LM_AC_TERMINAL_BLANK_MINUTES=10<br />
LM_AC_TERMINAL_POWERDOWN_MINUTES=10<br />
NOLM_AC_TERMINAL_BLANK_MINUTES=10<br />
NOLM_AC_TERMINAL_POWERDOWN_MINUTES=10<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/terminal-blanking.conf}} file for additional configuration details.}}<br />
<br />
=== Networking ===<br />
<br />
==== Ethernet ====<br />
<br />
# ethernet.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_ETHERNET=1<br />
LM_AC_THROTTLE_ETHERNET=0<br />
NOLM_AC_THROTTLE_ETHERNET=0<br />
DISABLE_WAKEUP_ON_LAN=1<br />
DISABLE_ETHERNET_ON_BATTERY=1<br />
ETHERNET_DEVICES="eth0"<br />
<br />
==== Wireless LAN ====<br />
<br />
Wireless interface power management settings are hardware-dependent, and thus a bit trickier to configure. Depending on the wireless chipset, the settings are managed in one of the following three files:<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-power.conf}} for a generic method of saving power (using "iwconfig wlan0 power on/off"). This applies to most chipsets (that is, anything but Intel chipsets listed below).<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-ipw-power.conf}} for Intel chipsets driven by the old ipw driver. This apply to IPW3945, IPW2200 and IPW2100. It currently (as of LMT 1.55-1) uses iwpriv for IPW3945, and a combination of iwconfig and iwpriv settings for IPW2100 and IPW220. See {{ic|/usr/share/laptop-mode-tools/modules/wireless-ipw-power}} for details. (note that the ipw3945 is not used anymore, see below)<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-iwl-power.conf}} for Intel chipsets driven by modules iwl4965, iwl3945 and iwlagn (this latter supports chipsets 4965, 5100, 5300, 5350, 5150, 1000, and 6000)<br />
Note that activating the three of them should not be much of a problem, since LMT detects the module used by the interface and acts accordingly.<br />
<br />
The supported modules for each configuration file, indicated above, are taken directly from LMT. However, this seems to be a bit out-of-date, since the current 2.6.34 kernel does not provide the ipw3945 and iwl4965 modules anymore (3945 chipset uses iwl3945 instead, and 4965 uses the generic module iwlagn). This is only brought here for information, as this does not (or should not) affect the way LMT works.<br />
<br />
There is a known issue with some chipsets running with the iwlagn module (namely, the 5300 chipset, and maybe others). On those chipsets, the following settings of {{ic|/etc/laptop-mode/conf.d/wireless-iwl-power.conf}}:<br />
<br />
IWL_AC_POWER<br />
IWL_BATT_POWER<br />
<br />
are ignored, because the {{ic|/sys/class/net/wlan*/device/power_level}} file does not exist. Instead, the standard method (with "iwconfig wlan0 power on/off") is automatically used.<br />
<br />
=== Audio ===<br />
<br />
==== AC97 ====<br />
<br />
# ac97-powersave.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_AC97_POWER=1<br />
<br />
==== Intel HDA ====<br />
<br />
# intel-hda-powersave.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_INTEL_HDA_POWER=1<br />
BATT_INTEL_HDA_POWERSAVE=1<br />
LM_AC_INTEL_HDA_POWERSAVE=1<br />
NOLM_AC_INTEL_HDA_POWERSAVE=0<br />
INTEL_HDA_DEVICE_TIMEOUT=10<br />
INTEL_HDA_DEVICE_CONTROLLER=0<br />
<br />
== Tips and tricks ==<br />
<br />
=== Aliases ===<br />
<br />
=== lm-profiler ===<br />
<br />
=== Disabling ===<br />
<br />
== Troubleshooting ==<br />
<br />
=== Laptop-mode-tools is not picking up events ===<br />
<br />
Install {{Pkg|acpid}} and enable its [[systemd]] service {{ic|acpid.service}}.<br />
<br />
If that does not help, go through the laptop-mode configuration files and make sure that the service you want to enable is set to 1. Many services (including cpufreq control) are by default set to "auto", which may not enable them.<br />
<br />
I have experienced issues with bluetooth not working if I boot up with battery, and I fixed it with disabling runtime-pm.<br />
<br />
=== Laptop-mode-tools does not disable on AC ===<br />
<br />
It is possible if you have both laptop-mode-tools and pm-utils installed, they can conflict with each other, causing laptop-mode-tools to not properly set its state.<br />
<br />
This can be fixed by disabling scripts with duplicate functionality in pm-utils. The main cause of this particular issue is the laptop-mode script located in {{ic|/usr/lib/pm-utils/power.d}}. You can stop any unwanted hooks from running by creating a dummy file in {{ic|/etc/pm/power.d}} with the same name as the corresponding {{ic|/usr/lib/pm-utils/power.d}} hook. For example if you want to disable the laptop-mode hook:<br />
<br />
# touch /etc/pm/power.d/laptop-mode<br />
<br />
{{Note|Do not set the executable bit on that dummy-hook.}}<br />
<br />
Its recommended to disable any hook that has equivalent functionality in LMT.<br />
<br />
=== USB Mouse sleeping after 5 seconds when on battery ===<br />
<br />
First find the ID of you device (it sould look like {{ic|046d:c534}}):<br />
<br />
$ lsusb<br />
<br />
Put this value into the {{ic|AUTOSUSPEND_DEVID_BLACKLIST}} variable in {{ic|/etc/laptop-mode/conf.d/runtime-pm.conf}}, for example:<br />
<br />
{{hc|/etc/laptop-mode/conf.d/runtime-pm.conf|2=<br />
...<br />
AUTOSUSPEND_DEVID_BLACKLIST="046d:c534"<br />
...<br />
}}<br />
<br />
Multiple IDs can be seperated with spaces.<br />
{{Note|Don't forget to [[restart]] the laptop-mode service. You might also need to reconnect the USB device.}}<br />
<br />
== See also ==<br />
<br />
* [http://samwel.tk/laptop_mode/ Laptop Mode Tools]<br />
* [http://mailman.samwel.tk/pipermail/laptop-mode/ Mailing List Archives]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Laptop_Mode_Tools&diff=428995Laptop Mode Tools2016-03-31T23:14:38Z<p>JoshuaBranson: /* Installation */</p>
<hr />
<div>[[Category:Laptops]]<br />
[[Category:Power management]]<br />
[[de:Laptop Mode Tools]]<br />
[[fr:Laptop Mode Tools]]<br />
[[it:Laptop Mode Tools]]<br />
[[ja:Laptop Mode Tools]]<br />
[[ru:Laptop Mode Tools]]<br />
[[zh-CN:Laptop Mode Tools]]<br />
{{Related articles start}}<br />
{{Related|acpid}}<br />
{{Related|systemd}}<br />
{{Related|cpufrequtils}}<br />
{{Related|pm-utils}}<br />
{{Related|Laptop}}<br />
{{Related|Powertop}}<br />
{{Related|TLP}}<br />
{{Related articles end}}<br />
<br />
[http://samwel.tk/laptop_mode/ Laptop Mode Tools] is a laptop power saving package for Linux systems. It is the primary way to enable the Laptop Mode feature of the Linux kernel, which lets your hard drive spin down. In addition, it allows you to tweak a number of other power-related settings using a simple configuration file.<br />
<br />
Combined with [[acpid]] and [[CPU frequency scaling]], LMT provides most users with a complete notebook power management suite.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{AUR|laptop-mode-tools}} package or the {{AUR|laptop-mode-tools-git}} package.<br />
<br />
<br />
{{Warning|1=Some arch users have experience many systemd errors using {{AUR|laptop-mode-tools}}. It is recommended to use {{AUR|laptop-mode-tools-git}}. The relevant forum articles are https://bbs.archlinux.org/viewtopic.php?id=209855 and https://bbs.archlinux.org/viewtopic.php?id=209100"}}<br />
<br />
== Configuration ==<br />
<br />
Configuration is handled through:<br />
<br />
* {{ic|/etc/laptop-mode/laptop-mode.conf}} - primary configuration file.<br />
* {{ic|/etc/laptop-mode/conf.d/*}} - dozens of feature-specific "modules". <br />
<br />
Each module can be explicitly {{ic|enabled}}, {{ic|disabled}}, or set to {{ic|auto}} by changing the {{ic|CONTROL_*}} argument of any file in {{ic|conf.d/}}. LMT will attempt enable any modules where {{ic|CONTROL_*}} is set to {{ic|auto}} if {{ic|ENABLE_AUTO_MODULES}} is set in {{ic|/etc/laptop-mode/laptop-mode.conf}}. There are two exceptions to the above rule: {{ic|auto-hibernate.conf}} and {{ic|battery-level-polling.conf}} use an {{ic|ENABLE_*}} variable instead of {{ic|CONTROL_*}}.<br />
<br />
To quickly check which modules are enabled, disabled or auto, run:<br />
<br />
$ grep -r '^\(CONTROL\&#124;ENABLE\)_' /etc/laptop-mode/conf.d<br />
<br />
Finally, [[enable]] {{ic|laptop-mode.service}}.<br />
<br />
=== Hard disks ===<br />
<br />
For this you need to have ''hdparm'' and/or ''sdparm'' installed. See [[Hdparm]].<br />
<br />
Spinning down the hard drive through {{Ic|hdparm -S}} values saves power and makes everything a lot more quiet. By using the readahead function you can allow the drives to spin down more often even though you are using the computer. LMT can also establish {{Ic|hdparm -B}} values. The maximum hard drive power saving is 1 and the minimum is 254. For example, set this value to 254 when on AC and 20 when on battery. If you find that normal activity hangs often while waiting for the disk to spin up, it might be a good idea to set it to a higher value (e.g. 128) which will make it spin down less often. {{Ic|hdparm -S}} and {{Ic|hdparm -B}} values are configured in {{ic|/etc/laptop-mode/laptop-mode.conf}}.<br />
<br />
{{Warning|Spinning down a hard drive too frequently can shorten its lifespan. Take care when choosing a proper value.}}<br />
<br />
With the {{ic|CONTROL_MOUNT_OPTIONS}} variable (default on), laptop-mode-tools automatically remounts your partitions, appending {{ic|1=commit=600,noatime}} in the mount options. This keeps the journaling program jbd2 from accessing your disk every few seconds, instead the disk journal gets updated every 10 minutes.<br />
<br />
{{Warning|With this setting you could lose up to 10 minutes of work. Also be sure not to use the {{Ic|atime}} mount option. Use {{Ic|noatime}} or {{Ic|relatime}} instead.}}<br />
<br />
{{Note|1={{ic|CONTROL_MOUNT_OPTIONS}} should not be turned on with nilfs2 partitions. Refer to this thread on the forum: https://bbs.archlinux.org/viewtopic.php?id=134656}}<br />
<br />
==== Solid state drives ====<br />
<br />
From the [http://samwel.tk/laptop_mode/faq official, upstream FAQ]:<br />
<br />
'''Question:''' I have a solid-state disk (SSD) in my machine. Should I enable any of the disk-related parts of laptop-mode-tools, or are they irrelevant?<br />
<br />
'''Answer:''' They may be relevant, because (a) laptop mode will reduce the number of writes, which improves the lifetime of an SSD, and (b) laptop mode makes writes bursty, which enables power saving mechanisms like ALPM to kick in. However, your mileage may vary depending on the specific hardware involved. For some hardware, you will get no gain at all, for some the gain may be substantial.<br />
<br />
=== CPU frequency ===<br />
<br />
For this you need to have a CPU frequency driver installed. See [[CPU frequency scaling]].<br />
<br />
# cpufreq.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
CONTROL_CPU_FREQUENCY=1<br />
BATT_CPU_MAXFREQ=fastest<br />
BATT_CPU_MINFREQ=slowest<br />
BATT_CPU_GOVERNOR=ondemand<br />
BATT_CPU_IGNORE_NICE_LOAD=1<br />
LM_AC_CPU_MAXFREQ=fastest<br />
LM_AC_CPU_MINFREQ=slowest<br />
LM_AC_CPU_GOVERNOR=ondemand<br />
LM_AC_CPU_IGNORE_NICE_LOAD=1<br />
NOLM_AC_CPU_MAXFREQ=fastest<br />
NOLM_AC_CPU_MINFREQ=slowest<br />
NOLM_AC_CPU_GOVERNOR=ondemand<br />
NOLM_AC_CPU_IGNORE_NICE_LOAD=0<br />
CONTROL_CPU_THROTTLING=0<br />
<br />
=== Device and bus ===<br />
<br />
==== Intel SATA ====<br />
<br />
* Enable the Intel SATA AHCI controller Aggressive Link Power Management feature to set the disk link into a very low power mode in the absence of disk IO.<br />
<br />
# intel-sata-powermgmt.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_INTEL_SATA_POWER=1<br />
BATT_ACTIVATE_SATA_POWER=1<br />
LM_AC_ACTIVATE_SATA_POWER=1<br />
NOLM_AC_ACTIVATE_SATA_POWER=0<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/intel-sata-powermgmt.conf}} file for additional configuration details.}}<br />
<br />
==== USB autosuspend ====<br />
<br />
{{Tip|USB autosuspend functionality has been moved from the ''usb-autosuspend'' module to the ''runtime-pm'' module. Make sure to replace usb-autosuspend with runtime-pm on /lib/udev/rules.d/99-laptop-mode.rules.}}<br />
<br />
# runtime-pm.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_RUNTIME_AUTOSUSPEND=1<br />
BATT_SUSPEND_RUNTIME=1<br />
LM_AC_SUSPEND_RUNTIME=1<br />
NOLM_AC_SUSPEND_RUNTIME=1<br />
AUTOSUSPEND_TIMEOUT=2<br />
<br />
{{Note|Review the {{ic|/etc/laptop-mode/conf.d/runtime-pm.conf}} file for additional configuration details. If you have an USB tool you always use (like an USB mouse), blacklisting them would stop them from suspending.}}<br />
<br />
=== Display and graphics ===<br />
<br />
==== LCD brightness ====<br />
<br />
* Available brightness values for certain laptops can be obtained by running following command:<br />
<br />
$ cat /proc/acpi/video/VID/LCD/brightness<br />
<br />
===== ThinkPad T40/T42 =====<br />
<br />
For [[wikipedia:ThinkPad|ThinkPad]] T40/T42 notebooks, minimum and maximum brightness values can be obtained by running:<br />
<br />
$ cat /sys/class/backlight/acpi_video0/brightness<br />
$ cat /sys/class/backlight/acpi_video0/max_brightness<br />
<br />
# lcd-brightness.conf<br />
# ThinkPad T40/T42 Example<br />
#<br />
DEBUG=0<br />
CONTROL_BRIGHTNESS=1<br />
BATT_BRIGHTNESS_COMMAND="echo 0"<br />
LM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
NOLM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
BRIGHTNESS_OUTPUT="/sys/class/backlight/thinkpad_screen/brightness"<br />
<br />
===== ThinkPad T60 =====<br />
<br />
* For [[wikipedia:ThinkPad|ThinkPad]] T60 notebooks, minimum and maximum brightness values can be obtained by running:<br />
<br />
$ cat /sys/class/backlight/thinkpad_screen/max_brightness<br />
$ cat /sys/class/backlight/thinkpad_screen/brightness<br />
<br />
# lcd-brightness.conf<br />
# ThinkPad T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_BRIGHTNESS=1<br />
BATT_BRIGHTNESS_COMMAND="echo 0"<br />
LM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
NOLM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
BRIGHTNESS_OUTPUT="/sys/class/backlight/acpi_video0/brightness"<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/lcd-brightness.conf}} file for additional configuration details.}}<br />
<br />
==== Terminal blanking ====<br />
<br />
# terminal-blanking.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_TERMINAL=1<br />
TERMINALS="/dev/tty1"<br />
BATT_TERMINAL_BLANK_MINUTES=1<br />
BATT_TERMINAL_POWERDOWN_MINUTES=2<br />
LM_AC_TERMINAL_BLANK_MINUTES=10<br />
LM_AC_TERMINAL_POWERDOWN_MINUTES=10<br />
NOLM_AC_TERMINAL_BLANK_MINUTES=10<br />
NOLM_AC_TERMINAL_POWERDOWN_MINUTES=10<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/terminal-blanking.conf}} file for additional configuration details.}}<br />
<br />
=== Networking ===<br />
<br />
==== Ethernet ====<br />
<br />
# ethernet.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_ETHERNET=1<br />
LM_AC_THROTTLE_ETHERNET=0<br />
NOLM_AC_THROTTLE_ETHERNET=0<br />
DISABLE_WAKEUP_ON_LAN=1<br />
DISABLE_ETHERNET_ON_BATTERY=1<br />
ETHERNET_DEVICES="eth0"<br />
<br />
==== Wireless LAN ====<br />
<br />
Wireless interface power management settings are hardware-dependent, and thus a bit trickier to configure. Depending on the wireless chipset, the settings are managed in one of the following three files:<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-power.conf}} for a generic method of saving power (using "iwconfig wlan0 power on/off"). This applies to most chipsets (that is, anything but Intel chipsets listed below).<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-ipw-power.conf}} for Intel chipsets driven by the old ipw driver. This apply to IPW3945, IPW2200 and IPW2100. It currently (as of LMT 1.55-1) uses iwpriv for IPW3945, and a combination of iwconfig and iwpriv settings for IPW2100 and IPW220. See {{ic|/usr/share/laptop-mode-tools/modules/wireless-ipw-power}} for details. (note that the ipw3945 is not used anymore, see below)<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-iwl-power.conf}} for Intel chipsets driven by modules iwl4965, iwl3945 and iwlagn (this latter supports chipsets 4965, 5100, 5300, 5350, 5150, 1000, and 6000)<br />
Note that activating the three of them should not be much of a problem, since LMT detects the module used by the interface and acts accordingly.<br />
<br />
The supported modules for each configuration file, indicated above, are taken directly from LMT. However, this seems to be a bit out-of-date, since the current 2.6.34 kernel does not provide the ipw3945 and iwl4965 modules anymore (3945 chipset uses iwl3945 instead, and 4965 uses the generic module iwlagn). This is only brought here for information, as this does not (or should not) affect the way LMT works.<br />
<br />
There is a known issue with some chipsets running with the iwlagn module (namely, the 5300 chipset, and maybe others). On those chipsets, the following settings of {{ic|/etc/laptop-mode/conf.d/wireless-iwl-power.conf}}:<br />
<br />
IWL_AC_POWER<br />
IWL_BATT_POWER<br />
<br />
are ignored, because the {{ic|/sys/class/net/wlan*/device/power_level}} file does not exist. Instead, the standard method (with "iwconfig wlan0 power on/off") is automatically used.<br />
<br />
=== Audio ===<br />
<br />
==== AC97 ====<br />
<br />
# ac97-powersave.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_AC97_POWER=1<br />
<br />
==== Intel HDA ====<br />
<br />
# intel-hda-powersave.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_INTEL_HDA_POWER=1<br />
BATT_INTEL_HDA_POWERSAVE=1<br />
LM_AC_INTEL_HDA_POWERSAVE=1<br />
NOLM_AC_INTEL_HDA_POWERSAVE=0<br />
INTEL_HDA_DEVICE_TIMEOUT=10<br />
INTEL_HDA_DEVICE_CONTROLLER=0<br />
<br />
== Tips and tricks ==<br />
<br />
=== Aliases ===<br />
<br />
=== lm-profiler ===<br />
<br />
=== Disabling ===<br />
<br />
== Troubleshooting ==<br />
<br />
=== Laptop-mode-tools is not picking up events ===<br />
<br />
Install {{Pkg|acpid}} and enable its [[systemd]] service {{ic|acpid.service}}.<br />
<br />
If that does not help, go through the laptop-mode configuration files and make sure that the service you want to enable is set to 1. Many services (including cpufreq control) are by default set to "auto", which may not enable them.<br />
<br />
I have experienced issues with bluetooth not working if I boot up with battery, and I fixed it with disabling runtime-pm.<br />
<br />
=== Laptop-mode-tools does not disable on AC ===<br />
<br />
It is possible if you have both laptop-mode-tools and pm-utils installed, they can conflict with each other, causing laptop-mode-tools to not properly set its state.<br />
<br />
This can be fixed by disabling scripts with duplicate functionality in pm-utils. The main cause of this particular issue is the laptop-mode script located in {{ic|/usr/lib/pm-utils/power.d}}. You can stop any unwanted hooks from running by creating a dummy file in {{ic|/etc/pm/power.d}} with the same name as the corresponding {{ic|/usr/lib/pm-utils/power.d}} hook. For example if you want to disable the laptop-mode hook:<br />
<br />
# touch /etc/pm/power.d/laptop-mode<br />
<br />
{{Note|Do not set the executable bit on that dummy-hook.}}<br />
<br />
Its recommended to disable any hook that has equivalent functionality in LMT.<br />
<br />
=== USB Mouse sleeping after 5 seconds when on battery ===<br />
<br />
First find the ID of you device (it sould look like {{ic|046d:c534}}):<br />
<br />
$ lsusb<br />
<br />
Put this value into the {{ic|AUTOSUSPEND_DEVID_BLACKLIST}} variable in {{ic|/etc/laptop-mode/conf.d/runtime-pm.conf}}, for example:<br />
<br />
{{hc|/etc/laptop-mode/conf.d/runtime-pm.conf|2=<br />
...<br />
AUTOSUSPEND_DEVID_BLACKLIST="046d:c534"<br />
...<br />
}}<br />
<br />
Multiple IDs can be seperated with spaces.<br />
{{Note|Don't forget to [[restart]] the laptop-mode service. You might also need to reconnect the USB device.}}<br />
<br />
== See also ==<br />
<br />
* [http://samwel.tk/laptop_mode/ Laptop Mode Tools]<br />
* [http://mailman.samwel.tk/pipermail/laptop-mode/ Mailing List Archives]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Laptop_Mode_Tools&diff=428994Laptop Mode Tools2016-03-31T23:12:35Z<p>JoshuaBranson: /* Installation */</p>
<hr />
<div>[[Category:Laptops]]<br />
[[Category:Power management]]<br />
[[de:Laptop Mode Tools]]<br />
[[fr:Laptop Mode Tools]]<br />
[[it:Laptop Mode Tools]]<br />
[[ja:Laptop Mode Tools]]<br />
[[ru:Laptop Mode Tools]]<br />
[[zh-CN:Laptop Mode Tools]]<br />
{{Related articles start}}<br />
{{Related|acpid}}<br />
{{Related|systemd}}<br />
{{Related|cpufrequtils}}<br />
{{Related|pm-utils}}<br />
{{Related|Laptop}}<br />
{{Related|Powertop}}<br />
{{Related|TLP}}<br />
{{Related articles end}}<br />
<br />
[http://samwel.tk/laptop_mode/ Laptop Mode Tools] is a laptop power saving package for Linux systems. It is the primary way to enable the Laptop Mode feature of the Linux kernel, which lets your hard drive spin down. In addition, it allows you to tweak a number of other power-related settings using a simple configuration file.<br />
<br />
Combined with [[acpid]] and [[CPU frequency scaling]], LMT provides most users with a complete notebook power management suite.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{AUR|laptop-mode-tools}} package or the {{AUR|laptop-mode-tools-git}} package.<br />
<br />
<br />
{{Warning|Some arch users have experience many systemd errors using {{AUR|laptop-mode-tools}}. It is recommended to use {{AUR|laptop-mode-tools-git}}. The relevant forum articles are <a src="https://bbs.archlinux.org/viewtopic.php?id=209855">here</a> and <a href="https://bbs.archlinux.org/viewtopic.php?id=209100">here</a>}}<br />
<br />
== Configuration ==<br />
<br />
Configuration is handled through:<br />
<br />
* {{ic|/etc/laptop-mode/laptop-mode.conf}} - primary configuration file.<br />
* {{ic|/etc/laptop-mode/conf.d/*}} - dozens of feature-specific "modules". <br />
<br />
Each module can be explicitly {{ic|enabled}}, {{ic|disabled}}, or set to {{ic|auto}} by changing the {{ic|CONTROL_*}} argument of any file in {{ic|conf.d/}}. LMT will attempt enable any modules where {{ic|CONTROL_*}} is set to {{ic|auto}} if {{ic|ENABLE_AUTO_MODULES}} is set in {{ic|/etc/laptop-mode/laptop-mode.conf}}. There are two exceptions to the above rule: {{ic|auto-hibernate.conf}} and {{ic|battery-level-polling.conf}} use an {{ic|ENABLE_*}} variable instead of {{ic|CONTROL_*}}.<br />
<br />
To quickly check which modules are enabled, disabled or auto, run:<br />
<br />
$ grep -r '^\(CONTROL\&#124;ENABLE\)_' /etc/laptop-mode/conf.d<br />
<br />
Finally, [[enable]] {{ic|laptop-mode.service}}.<br />
<br />
=== Hard disks ===<br />
<br />
For this you need to have ''hdparm'' and/or ''sdparm'' installed. See [[Hdparm]].<br />
<br />
Spinning down the hard drive through {{Ic|hdparm -S}} values saves power and makes everything a lot more quiet. By using the readahead function you can allow the drives to spin down more often even though you are using the computer. LMT can also establish {{Ic|hdparm -B}} values. The maximum hard drive power saving is 1 and the minimum is 254. For example, set this value to 254 when on AC and 20 when on battery. If you find that normal activity hangs often while waiting for the disk to spin up, it might be a good idea to set it to a higher value (e.g. 128) which will make it spin down less often. {{Ic|hdparm -S}} and {{Ic|hdparm -B}} values are configured in {{ic|/etc/laptop-mode/laptop-mode.conf}}.<br />
<br />
{{Warning|Spinning down a hard drive too frequently can shorten its lifespan. Take care when choosing a proper value.}}<br />
<br />
With the {{ic|CONTROL_MOUNT_OPTIONS}} variable (default on), laptop-mode-tools automatically remounts your partitions, appending {{ic|1=commit=600,noatime}} in the mount options. This keeps the journaling program jbd2 from accessing your disk every few seconds, instead the disk journal gets updated every 10 minutes.<br />
<br />
{{Warning|With this setting you could lose up to 10 minutes of work. Also be sure not to use the {{Ic|atime}} mount option. Use {{Ic|noatime}} or {{Ic|relatime}} instead.}}<br />
<br />
{{Note|1={{ic|CONTROL_MOUNT_OPTIONS}} should not be turned on with nilfs2 partitions. Refer to this thread on the forum: https://bbs.archlinux.org/viewtopic.php?id=134656}}<br />
<br />
==== Solid state drives ====<br />
<br />
From the [http://samwel.tk/laptop_mode/faq official, upstream FAQ]:<br />
<br />
'''Question:''' I have a solid-state disk (SSD) in my machine. Should I enable any of the disk-related parts of laptop-mode-tools, or are they irrelevant?<br />
<br />
'''Answer:''' They may be relevant, because (a) laptop mode will reduce the number of writes, which improves the lifetime of an SSD, and (b) laptop mode makes writes bursty, which enables power saving mechanisms like ALPM to kick in. However, your mileage may vary depending on the specific hardware involved. For some hardware, you will get no gain at all, for some the gain may be substantial.<br />
<br />
=== CPU frequency ===<br />
<br />
For this you need to have a CPU frequency driver installed. See [[CPU frequency scaling]].<br />
<br />
# cpufreq.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
CONTROL_CPU_FREQUENCY=1<br />
BATT_CPU_MAXFREQ=fastest<br />
BATT_CPU_MINFREQ=slowest<br />
BATT_CPU_GOVERNOR=ondemand<br />
BATT_CPU_IGNORE_NICE_LOAD=1<br />
LM_AC_CPU_MAXFREQ=fastest<br />
LM_AC_CPU_MINFREQ=slowest<br />
LM_AC_CPU_GOVERNOR=ondemand<br />
LM_AC_CPU_IGNORE_NICE_LOAD=1<br />
NOLM_AC_CPU_MAXFREQ=fastest<br />
NOLM_AC_CPU_MINFREQ=slowest<br />
NOLM_AC_CPU_GOVERNOR=ondemand<br />
NOLM_AC_CPU_IGNORE_NICE_LOAD=0<br />
CONTROL_CPU_THROTTLING=0<br />
<br />
=== Device and bus ===<br />
<br />
==== Intel SATA ====<br />
<br />
* Enable the Intel SATA AHCI controller Aggressive Link Power Management feature to set the disk link into a very low power mode in the absence of disk IO.<br />
<br />
# intel-sata-powermgmt.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_INTEL_SATA_POWER=1<br />
BATT_ACTIVATE_SATA_POWER=1<br />
LM_AC_ACTIVATE_SATA_POWER=1<br />
NOLM_AC_ACTIVATE_SATA_POWER=0<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/intel-sata-powermgmt.conf}} file for additional configuration details.}}<br />
<br />
==== USB autosuspend ====<br />
<br />
{{Tip|USB autosuspend functionality has been moved from the ''usb-autosuspend'' module to the ''runtime-pm'' module. Make sure to replace usb-autosuspend with runtime-pm on /lib/udev/rules.d/99-laptop-mode.rules.}}<br />
<br />
# runtime-pm.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_RUNTIME_AUTOSUSPEND=1<br />
BATT_SUSPEND_RUNTIME=1<br />
LM_AC_SUSPEND_RUNTIME=1<br />
NOLM_AC_SUSPEND_RUNTIME=1<br />
AUTOSUSPEND_TIMEOUT=2<br />
<br />
{{Note|Review the {{ic|/etc/laptop-mode/conf.d/runtime-pm.conf}} file for additional configuration details. If you have an USB tool you always use (like an USB mouse), blacklisting them would stop them from suspending.}}<br />
<br />
=== Display and graphics ===<br />
<br />
==== LCD brightness ====<br />
<br />
* Available brightness values for certain laptops can be obtained by running following command:<br />
<br />
$ cat /proc/acpi/video/VID/LCD/brightness<br />
<br />
===== ThinkPad T40/T42 =====<br />
<br />
For [[wikipedia:ThinkPad|ThinkPad]] T40/T42 notebooks, minimum and maximum brightness values can be obtained by running:<br />
<br />
$ cat /sys/class/backlight/acpi_video0/brightness<br />
$ cat /sys/class/backlight/acpi_video0/max_brightness<br />
<br />
# lcd-brightness.conf<br />
# ThinkPad T40/T42 Example<br />
#<br />
DEBUG=0<br />
CONTROL_BRIGHTNESS=1<br />
BATT_BRIGHTNESS_COMMAND="echo 0"<br />
LM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
NOLM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
BRIGHTNESS_OUTPUT="/sys/class/backlight/thinkpad_screen/brightness"<br />
<br />
===== ThinkPad T60 =====<br />
<br />
* For [[wikipedia:ThinkPad|ThinkPad]] T60 notebooks, minimum and maximum brightness values can be obtained by running:<br />
<br />
$ cat /sys/class/backlight/thinkpad_screen/max_brightness<br />
$ cat /sys/class/backlight/thinkpad_screen/brightness<br />
<br />
# lcd-brightness.conf<br />
# ThinkPad T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_BRIGHTNESS=1<br />
BATT_BRIGHTNESS_COMMAND="echo 0"<br />
LM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
NOLM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
BRIGHTNESS_OUTPUT="/sys/class/backlight/acpi_video0/brightness"<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/lcd-brightness.conf}} file for additional configuration details.}}<br />
<br />
==== Terminal blanking ====<br />
<br />
# terminal-blanking.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_TERMINAL=1<br />
TERMINALS="/dev/tty1"<br />
BATT_TERMINAL_BLANK_MINUTES=1<br />
BATT_TERMINAL_POWERDOWN_MINUTES=2<br />
LM_AC_TERMINAL_BLANK_MINUTES=10<br />
LM_AC_TERMINAL_POWERDOWN_MINUTES=10<br />
NOLM_AC_TERMINAL_BLANK_MINUTES=10<br />
NOLM_AC_TERMINAL_POWERDOWN_MINUTES=10<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/terminal-blanking.conf}} file for additional configuration details.}}<br />
<br />
=== Networking ===<br />
<br />
==== Ethernet ====<br />
<br />
# ethernet.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_ETHERNET=1<br />
LM_AC_THROTTLE_ETHERNET=0<br />
NOLM_AC_THROTTLE_ETHERNET=0<br />
DISABLE_WAKEUP_ON_LAN=1<br />
DISABLE_ETHERNET_ON_BATTERY=1<br />
ETHERNET_DEVICES="eth0"<br />
<br />
==== Wireless LAN ====<br />
<br />
Wireless interface power management settings are hardware-dependent, and thus a bit trickier to configure. Depending on the wireless chipset, the settings are managed in one of the following three files:<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-power.conf}} for a generic method of saving power (using "iwconfig wlan0 power on/off"). This applies to most chipsets (that is, anything but Intel chipsets listed below).<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-ipw-power.conf}} for Intel chipsets driven by the old ipw driver. This apply to IPW3945, IPW2200 and IPW2100. It currently (as of LMT 1.55-1) uses iwpriv for IPW3945, and a combination of iwconfig and iwpriv settings for IPW2100 and IPW220. See {{ic|/usr/share/laptop-mode-tools/modules/wireless-ipw-power}} for details. (note that the ipw3945 is not used anymore, see below)<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-iwl-power.conf}} for Intel chipsets driven by modules iwl4965, iwl3945 and iwlagn (this latter supports chipsets 4965, 5100, 5300, 5350, 5150, 1000, and 6000)<br />
Note that activating the three of them should not be much of a problem, since LMT detects the module used by the interface and acts accordingly.<br />
<br />
The supported modules for each configuration file, indicated above, are taken directly from LMT. However, this seems to be a bit out-of-date, since the current 2.6.34 kernel does not provide the ipw3945 and iwl4965 modules anymore (3945 chipset uses iwl3945 instead, and 4965 uses the generic module iwlagn). This is only brought here for information, as this does not (or should not) affect the way LMT works.<br />
<br />
There is a known issue with some chipsets running with the iwlagn module (namely, the 5300 chipset, and maybe others). On those chipsets, the following settings of {{ic|/etc/laptop-mode/conf.d/wireless-iwl-power.conf}}:<br />
<br />
IWL_AC_POWER<br />
IWL_BATT_POWER<br />
<br />
are ignored, because the {{ic|/sys/class/net/wlan*/device/power_level}} file does not exist. Instead, the standard method (with "iwconfig wlan0 power on/off") is automatically used.<br />
<br />
=== Audio ===<br />
<br />
==== AC97 ====<br />
<br />
# ac97-powersave.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_AC97_POWER=1<br />
<br />
==== Intel HDA ====<br />
<br />
# intel-hda-powersave.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_INTEL_HDA_POWER=1<br />
BATT_INTEL_HDA_POWERSAVE=1<br />
LM_AC_INTEL_HDA_POWERSAVE=1<br />
NOLM_AC_INTEL_HDA_POWERSAVE=0<br />
INTEL_HDA_DEVICE_TIMEOUT=10<br />
INTEL_HDA_DEVICE_CONTROLLER=0<br />
<br />
== Tips and tricks ==<br />
<br />
=== Aliases ===<br />
<br />
=== lm-profiler ===<br />
<br />
=== Disabling ===<br />
<br />
== Troubleshooting ==<br />
<br />
=== Laptop-mode-tools is not picking up events ===<br />
<br />
Install {{Pkg|acpid}} and enable its [[systemd]] service {{ic|acpid.service}}.<br />
<br />
If that does not help, go through the laptop-mode configuration files and make sure that the service you want to enable is set to 1. Many services (including cpufreq control) are by default set to "auto", which may not enable them.<br />
<br />
I have experienced issues with bluetooth not working if I boot up with battery, and I fixed it with disabling runtime-pm.<br />
<br />
=== Laptop-mode-tools does not disable on AC ===<br />
<br />
It is possible if you have both laptop-mode-tools and pm-utils installed, they can conflict with each other, causing laptop-mode-tools to not properly set its state.<br />
<br />
This can be fixed by disabling scripts with duplicate functionality in pm-utils. The main cause of this particular issue is the laptop-mode script located in {{ic|/usr/lib/pm-utils/power.d}}. You can stop any unwanted hooks from running by creating a dummy file in {{ic|/etc/pm/power.d}} with the same name as the corresponding {{ic|/usr/lib/pm-utils/power.d}} hook. For example if you want to disable the laptop-mode hook:<br />
<br />
# touch /etc/pm/power.d/laptop-mode<br />
<br />
{{Note|Do not set the executable bit on that dummy-hook.}}<br />
<br />
Its recommended to disable any hook that has equivalent functionality in LMT.<br />
<br />
=== USB Mouse sleeping after 5 seconds when on battery ===<br />
<br />
First find the ID of you device (it sould look like {{ic|046d:c534}}):<br />
<br />
$ lsusb<br />
<br />
Put this value into the {{ic|AUTOSUSPEND_DEVID_BLACKLIST}} variable in {{ic|/etc/laptop-mode/conf.d/runtime-pm.conf}}, for example:<br />
<br />
{{hc|/etc/laptop-mode/conf.d/runtime-pm.conf|2=<br />
...<br />
AUTOSUSPEND_DEVID_BLACKLIST="046d:c534"<br />
...<br />
}}<br />
<br />
Multiple IDs can be seperated with spaces.<br />
{{Note|Don't forget to [[restart]] the laptop-mode service. You might also need to reconnect the USB device.}}<br />
<br />
== See also ==<br />
<br />
* [http://samwel.tk/laptop_mode/ Laptop Mode Tools]<br />
* [http://mailman.samwel.tk/pipermail/laptop-mode/ Mailing List Archives]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Laptop_Mode_Tools&diff=428993Laptop Mode Tools2016-03-31T23:10:31Z<p>JoshuaBranson: /* Installation */</p>
<hr />
<div>[[Category:Laptops]]<br />
[[Category:Power management]]<br />
[[de:Laptop Mode Tools]]<br />
[[fr:Laptop Mode Tools]]<br />
[[it:Laptop Mode Tools]]<br />
[[ja:Laptop Mode Tools]]<br />
[[ru:Laptop Mode Tools]]<br />
[[zh-CN:Laptop Mode Tools]]<br />
{{Related articles start}}<br />
{{Related|acpid}}<br />
{{Related|systemd}}<br />
{{Related|cpufrequtils}}<br />
{{Related|pm-utils}}<br />
{{Related|Laptop}}<br />
{{Related|Powertop}}<br />
{{Related|TLP}}<br />
{{Related articles end}}<br />
<br />
[http://samwel.tk/laptop_mode/ Laptop Mode Tools] is a laptop power saving package for Linux systems. It is the primary way to enable the Laptop Mode feature of the Linux kernel, which lets your hard drive spin down. In addition, it allows you to tweak a number of other power-related settings using a simple configuration file.<br />
<br />
Combined with [[acpid]] and [[CPU frequency scaling]], LMT provides most users with a complete notebook power management suite.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{AUR|laptop-mode-tools}} package or the {{AUR|laptop-mode-tools-git}} package.<br />
<br />
<br />
{{Warning|Some arch users have experience many systemd errors using {{AUR|laptop-mode-tools}}. It is recommended to use {{AUR|laptop-mode-tools-git}}. The relevant forum articles are [https://bbs.archlinux.org/viewtopic.php?id=209855|here] and [https://bbs.archlinux.org/viewtopic.php?id=209100|here]}}<br />
<br />
== Configuration ==<br />
<br />
Configuration is handled through:<br />
<br />
* {{ic|/etc/laptop-mode/laptop-mode.conf}} - primary configuration file.<br />
* {{ic|/etc/laptop-mode/conf.d/*}} - dozens of feature-specific "modules". <br />
<br />
Each module can be explicitly {{ic|enabled}}, {{ic|disabled}}, or set to {{ic|auto}} by changing the {{ic|CONTROL_*}} argument of any file in {{ic|conf.d/}}. LMT will attempt enable any modules where {{ic|CONTROL_*}} is set to {{ic|auto}} if {{ic|ENABLE_AUTO_MODULES}} is set in {{ic|/etc/laptop-mode/laptop-mode.conf}}. There are two exceptions to the above rule: {{ic|auto-hibernate.conf}} and {{ic|battery-level-polling.conf}} use an {{ic|ENABLE_*}} variable instead of {{ic|CONTROL_*}}.<br />
<br />
To quickly check which modules are enabled, disabled or auto, run:<br />
<br />
$ grep -r '^\(CONTROL\&#124;ENABLE\)_' /etc/laptop-mode/conf.d<br />
<br />
Finally, [[enable]] {{ic|laptop-mode.service}}.<br />
<br />
=== Hard disks ===<br />
<br />
For this you need to have ''hdparm'' and/or ''sdparm'' installed. See [[Hdparm]].<br />
<br />
Spinning down the hard drive through {{Ic|hdparm -S}} values saves power and makes everything a lot more quiet. By using the readahead function you can allow the drives to spin down more often even though you are using the computer. LMT can also establish {{Ic|hdparm -B}} values. The maximum hard drive power saving is 1 and the minimum is 254. For example, set this value to 254 when on AC and 20 when on battery. If you find that normal activity hangs often while waiting for the disk to spin up, it might be a good idea to set it to a higher value (e.g. 128) which will make it spin down less often. {{Ic|hdparm -S}} and {{Ic|hdparm -B}} values are configured in {{ic|/etc/laptop-mode/laptop-mode.conf}}.<br />
<br />
{{Warning|Spinning down a hard drive too frequently can shorten its lifespan. Take care when choosing a proper value.}}<br />
<br />
With the {{ic|CONTROL_MOUNT_OPTIONS}} variable (default on), laptop-mode-tools automatically remounts your partitions, appending {{ic|1=commit=600,noatime}} in the mount options. This keeps the journaling program jbd2 from accessing your disk every few seconds, instead the disk journal gets updated every 10 minutes.<br />
<br />
{{Warning|With this setting you could lose up to 10 minutes of work. Also be sure not to use the {{Ic|atime}} mount option. Use {{Ic|noatime}} or {{Ic|relatime}} instead.}}<br />
<br />
{{Note|1={{ic|CONTROL_MOUNT_OPTIONS}} should not be turned on with nilfs2 partitions. Refer to this thread on the forum: https://bbs.archlinux.org/viewtopic.php?id=134656}}<br />
<br />
==== Solid state drives ====<br />
<br />
From the [http://samwel.tk/laptop_mode/faq official, upstream FAQ]:<br />
<br />
'''Question:''' I have a solid-state disk (SSD) in my machine. Should I enable any of the disk-related parts of laptop-mode-tools, or are they irrelevant?<br />
<br />
'''Answer:''' They may be relevant, because (a) laptop mode will reduce the number of writes, which improves the lifetime of an SSD, and (b) laptop mode makes writes bursty, which enables power saving mechanisms like ALPM to kick in. However, your mileage may vary depending on the specific hardware involved. For some hardware, you will get no gain at all, for some the gain may be substantial.<br />
<br />
=== CPU frequency ===<br />
<br />
For this you need to have a CPU frequency driver installed. See [[CPU frequency scaling]].<br />
<br />
# cpufreq.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
CONTROL_CPU_FREQUENCY=1<br />
BATT_CPU_MAXFREQ=fastest<br />
BATT_CPU_MINFREQ=slowest<br />
BATT_CPU_GOVERNOR=ondemand<br />
BATT_CPU_IGNORE_NICE_LOAD=1<br />
LM_AC_CPU_MAXFREQ=fastest<br />
LM_AC_CPU_MINFREQ=slowest<br />
LM_AC_CPU_GOVERNOR=ondemand<br />
LM_AC_CPU_IGNORE_NICE_LOAD=1<br />
NOLM_AC_CPU_MAXFREQ=fastest<br />
NOLM_AC_CPU_MINFREQ=slowest<br />
NOLM_AC_CPU_GOVERNOR=ondemand<br />
NOLM_AC_CPU_IGNORE_NICE_LOAD=0<br />
CONTROL_CPU_THROTTLING=0<br />
<br />
=== Device and bus ===<br />
<br />
==== Intel SATA ====<br />
<br />
* Enable the Intel SATA AHCI controller Aggressive Link Power Management feature to set the disk link into a very low power mode in the absence of disk IO.<br />
<br />
# intel-sata-powermgmt.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_INTEL_SATA_POWER=1<br />
BATT_ACTIVATE_SATA_POWER=1<br />
LM_AC_ACTIVATE_SATA_POWER=1<br />
NOLM_AC_ACTIVATE_SATA_POWER=0<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/intel-sata-powermgmt.conf}} file for additional configuration details.}}<br />
<br />
==== USB autosuspend ====<br />
<br />
{{Tip|USB autosuspend functionality has been moved from the ''usb-autosuspend'' module to the ''runtime-pm'' module. Make sure to replace usb-autosuspend with runtime-pm on /lib/udev/rules.d/99-laptop-mode.rules.}}<br />
<br />
# runtime-pm.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_RUNTIME_AUTOSUSPEND=1<br />
BATT_SUSPEND_RUNTIME=1<br />
LM_AC_SUSPEND_RUNTIME=1<br />
NOLM_AC_SUSPEND_RUNTIME=1<br />
AUTOSUSPEND_TIMEOUT=2<br />
<br />
{{Note|Review the {{ic|/etc/laptop-mode/conf.d/runtime-pm.conf}} file for additional configuration details. If you have an USB tool you always use (like an USB mouse), blacklisting them would stop them from suspending.}}<br />
<br />
=== Display and graphics ===<br />
<br />
==== LCD brightness ====<br />
<br />
* Available brightness values for certain laptops can be obtained by running following command:<br />
<br />
$ cat /proc/acpi/video/VID/LCD/brightness<br />
<br />
===== ThinkPad T40/T42 =====<br />
<br />
For [[wikipedia:ThinkPad|ThinkPad]] T40/T42 notebooks, minimum and maximum brightness values can be obtained by running:<br />
<br />
$ cat /sys/class/backlight/acpi_video0/brightness<br />
$ cat /sys/class/backlight/acpi_video0/max_brightness<br />
<br />
# lcd-brightness.conf<br />
# ThinkPad T40/T42 Example<br />
#<br />
DEBUG=0<br />
CONTROL_BRIGHTNESS=1<br />
BATT_BRIGHTNESS_COMMAND="echo 0"<br />
LM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
NOLM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
BRIGHTNESS_OUTPUT="/sys/class/backlight/thinkpad_screen/brightness"<br />
<br />
===== ThinkPad T60 =====<br />
<br />
* For [[wikipedia:ThinkPad|ThinkPad]] T60 notebooks, minimum and maximum brightness values can be obtained by running:<br />
<br />
$ cat /sys/class/backlight/thinkpad_screen/max_brightness<br />
$ cat /sys/class/backlight/thinkpad_screen/brightness<br />
<br />
# lcd-brightness.conf<br />
# ThinkPad T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_BRIGHTNESS=1<br />
BATT_BRIGHTNESS_COMMAND="echo 0"<br />
LM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
NOLM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
BRIGHTNESS_OUTPUT="/sys/class/backlight/acpi_video0/brightness"<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/lcd-brightness.conf}} file for additional configuration details.}}<br />
<br />
==== Terminal blanking ====<br />
<br />
# terminal-blanking.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_TERMINAL=1<br />
TERMINALS="/dev/tty1"<br />
BATT_TERMINAL_BLANK_MINUTES=1<br />
BATT_TERMINAL_POWERDOWN_MINUTES=2<br />
LM_AC_TERMINAL_BLANK_MINUTES=10<br />
LM_AC_TERMINAL_POWERDOWN_MINUTES=10<br />
NOLM_AC_TERMINAL_BLANK_MINUTES=10<br />
NOLM_AC_TERMINAL_POWERDOWN_MINUTES=10<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/terminal-blanking.conf}} file for additional configuration details.}}<br />
<br />
=== Networking ===<br />
<br />
==== Ethernet ====<br />
<br />
# ethernet.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_ETHERNET=1<br />
LM_AC_THROTTLE_ETHERNET=0<br />
NOLM_AC_THROTTLE_ETHERNET=0<br />
DISABLE_WAKEUP_ON_LAN=1<br />
DISABLE_ETHERNET_ON_BATTERY=1<br />
ETHERNET_DEVICES="eth0"<br />
<br />
==== Wireless LAN ====<br />
<br />
Wireless interface power management settings are hardware-dependent, and thus a bit trickier to configure. Depending on the wireless chipset, the settings are managed in one of the following three files:<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-power.conf}} for a generic method of saving power (using "iwconfig wlan0 power on/off"). This applies to most chipsets (that is, anything but Intel chipsets listed below).<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-ipw-power.conf}} for Intel chipsets driven by the old ipw driver. This apply to IPW3945, IPW2200 and IPW2100. It currently (as of LMT 1.55-1) uses iwpriv for IPW3945, and a combination of iwconfig and iwpriv settings for IPW2100 and IPW220. See {{ic|/usr/share/laptop-mode-tools/modules/wireless-ipw-power}} for details. (note that the ipw3945 is not used anymore, see below)<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-iwl-power.conf}} for Intel chipsets driven by modules iwl4965, iwl3945 and iwlagn (this latter supports chipsets 4965, 5100, 5300, 5350, 5150, 1000, and 6000)<br />
Note that activating the three of them should not be much of a problem, since LMT detects the module used by the interface and acts accordingly.<br />
<br />
The supported modules for each configuration file, indicated above, are taken directly from LMT. However, this seems to be a bit out-of-date, since the current 2.6.34 kernel does not provide the ipw3945 and iwl4965 modules anymore (3945 chipset uses iwl3945 instead, and 4965 uses the generic module iwlagn). This is only brought here for information, as this does not (or should not) affect the way LMT works.<br />
<br />
There is a known issue with some chipsets running with the iwlagn module (namely, the 5300 chipset, and maybe others). On those chipsets, the following settings of {{ic|/etc/laptop-mode/conf.d/wireless-iwl-power.conf}}:<br />
<br />
IWL_AC_POWER<br />
IWL_BATT_POWER<br />
<br />
are ignored, because the {{ic|/sys/class/net/wlan*/device/power_level}} file does not exist. Instead, the standard method (with "iwconfig wlan0 power on/off") is automatically used.<br />
<br />
=== Audio ===<br />
<br />
==== AC97 ====<br />
<br />
# ac97-powersave.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_AC97_POWER=1<br />
<br />
==== Intel HDA ====<br />
<br />
# intel-hda-powersave.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_INTEL_HDA_POWER=1<br />
BATT_INTEL_HDA_POWERSAVE=1<br />
LM_AC_INTEL_HDA_POWERSAVE=1<br />
NOLM_AC_INTEL_HDA_POWERSAVE=0<br />
INTEL_HDA_DEVICE_TIMEOUT=10<br />
INTEL_HDA_DEVICE_CONTROLLER=0<br />
<br />
== Tips and tricks ==<br />
<br />
=== Aliases ===<br />
<br />
=== lm-profiler ===<br />
<br />
=== Disabling ===<br />
<br />
== Troubleshooting ==<br />
<br />
=== Laptop-mode-tools is not picking up events ===<br />
<br />
Install {{Pkg|acpid}} and enable its [[systemd]] service {{ic|acpid.service}}.<br />
<br />
If that does not help, go through the laptop-mode configuration files and make sure that the service you want to enable is set to 1. Many services (including cpufreq control) are by default set to "auto", which may not enable them.<br />
<br />
I have experienced issues with bluetooth not working if I boot up with battery, and I fixed it with disabling runtime-pm.<br />
<br />
=== Laptop-mode-tools does not disable on AC ===<br />
<br />
It is possible if you have both laptop-mode-tools and pm-utils installed, they can conflict with each other, causing laptop-mode-tools to not properly set its state.<br />
<br />
This can be fixed by disabling scripts with duplicate functionality in pm-utils. The main cause of this particular issue is the laptop-mode script located in {{ic|/usr/lib/pm-utils/power.d}}. You can stop any unwanted hooks from running by creating a dummy file in {{ic|/etc/pm/power.d}} with the same name as the corresponding {{ic|/usr/lib/pm-utils/power.d}} hook. For example if you want to disable the laptop-mode hook:<br />
<br />
# touch /etc/pm/power.d/laptop-mode<br />
<br />
{{Note|Do not set the executable bit on that dummy-hook.}}<br />
<br />
Its recommended to disable any hook that has equivalent functionality in LMT.<br />
<br />
=== USB Mouse sleeping after 5 seconds when on battery ===<br />
<br />
First find the ID of you device (it sould look like {{ic|046d:c534}}):<br />
<br />
$ lsusb<br />
<br />
Put this value into the {{ic|AUTOSUSPEND_DEVID_BLACKLIST}} variable in {{ic|/etc/laptop-mode/conf.d/runtime-pm.conf}}, for example:<br />
<br />
{{hc|/etc/laptop-mode/conf.d/runtime-pm.conf|2=<br />
...<br />
AUTOSUSPEND_DEVID_BLACKLIST="046d:c534"<br />
...<br />
}}<br />
<br />
Multiple IDs can be seperated with spaces.<br />
{{Note|Don't forget to [[restart]] the laptop-mode service. You might also need to reconnect the USB device.}}<br />
<br />
== See also ==<br />
<br />
* [http://samwel.tk/laptop_mode/ Laptop Mode Tools]<br />
* [http://mailman.samwel.tk/pipermail/laptop-mode/ Mailing List Archives]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Laptop_Mode_Tools&diff=428992Laptop Mode Tools2016-03-31T23:10:03Z<p>JoshuaBranson: /* Installation */</p>
<hr />
<div>[[Category:Laptops]]<br />
[[Category:Power management]]<br />
[[de:Laptop Mode Tools]]<br />
[[fr:Laptop Mode Tools]]<br />
[[it:Laptop Mode Tools]]<br />
[[ja:Laptop Mode Tools]]<br />
[[ru:Laptop Mode Tools]]<br />
[[zh-CN:Laptop Mode Tools]]<br />
{{Related articles start}}<br />
{{Related|acpid}}<br />
{{Related|systemd}}<br />
{{Related|cpufrequtils}}<br />
{{Related|pm-utils}}<br />
{{Related|Laptop}}<br />
{{Related|Powertop}}<br />
{{Related|TLP}}<br />
{{Related articles end}}<br />
<br />
[http://samwel.tk/laptop_mode/ Laptop Mode Tools] is a laptop power saving package for Linux systems. It is the primary way to enable the Laptop Mode feature of the Linux kernel, which lets your hard drive spin down. In addition, it allows you to tweak a number of other power-related settings using a simple configuration file.<br />
<br />
Combined with [[acpid]] and [[CPU frequency scaling]], LMT provides most users with a complete notebook power management suite.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{AUR|laptop-mode-tools}} package or the {{AUR|laptop-mode-tools-git}} package.<br />
<br />
<br />
{{Warning|Some arch users have experience many systemd errors using {{AUR|laptop-mode-tools}}. It is recommended to use {{AUR|laptop-mode-tools-git}}. The relevant forum articles are [[https://bbs.archlinux.org/viewtopic.php?id=209855|here]] and [[https://bbs.archlinux.org/viewtopic.php?id=209100|here]]}}<br />
<br />
== Configuration ==<br />
<br />
Configuration is handled through:<br />
<br />
* {{ic|/etc/laptop-mode/laptop-mode.conf}} - primary configuration file.<br />
* {{ic|/etc/laptop-mode/conf.d/*}} - dozens of feature-specific "modules". <br />
<br />
Each module can be explicitly {{ic|enabled}}, {{ic|disabled}}, or set to {{ic|auto}} by changing the {{ic|CONTROL_*}} argument of any file in {{ic|conf.d/}}. LMT will attempt enable any modules where {{ic|CONTROL_*}} is set to {{ic|auto}} if {{ic|ENABLE_AUTO_MODULES}} is set in {{ic|/etc/laptop-mode/laptop-mode.conf}}. There are two exceptions to the above rule: {{ic|auto-hibernate.conf}} and {{ic|battery-level-polling.conf}} use an {{ic|ENABLE_*}} variable instead of {{ic|CONTROL_*}}.<br />
<br />
To quickly check which modules are enabled, disabled or auto, run:<br />
<br />
$ grep -r '^\(CONTROL\&#124;ENABLE\)_' /etc/laptop-mode/conf.d<br />
<br />
Finally, [[enable]] {{ic|laptop-mode.service}}.<br />
<br />
=== Hard disks ===<br />
<br />
For this you need to have ''hdparm'' and/or ''sdparm'' installed. See [[Hdparm]].<br />
<br />
Spinning down the hard drive through {{Ic|hdparm -S}} values saves power and makes everything a lot more quiet. By using the readahead function you can allow the drives to spin down more often even though you are using the computer. LMT can also establish {{Ic|hdparm -B}} values. The maximum hard drive power saving is 1 and the minimum is 254. For example, set this value to 254 when on AC and 20 when on battery. If you find that normal activity hangs often while waiting for the disk to spin up, it might be a good idea to set it to a higher value (e.g. 128) which will make it spin down less often. {{Ic|hdparm -S}} and {{Ic|hdparm -B}} values are configured in {{ic|/etc/laptop-mode/laptop-mode.conf}}.<br />
<br />
{{Warning|Spinning down a hard drive too frequently can shorten its lifespan. Take care when choosing a proper value.}}<br />
<br />
With the {{ic|CONTROL_MOUNT_OPTIONS}} variable (default on), laptop-mode-tools automatically remounts your partitions, appending {{ic|1=commit=600,noatime}} in the mount options. This keeps the journaling program jbd2 from accessing your disk every few seconds, instead the disk journal gets updated every 10 minutes.<br />
<br />
{{Warning|With this setting you could lose up to 10 minutes of work. Also be sure not to use the {{Ic|atime}} mount option. Use {{Ic|noatime}} or {{Ic|relatime}} instead.}}<br />
<br />
{{Note|1={{ic|CONTROL_MOUNT_OPTIONS}} should not be turned on with nilfs2 partitions. Refer to this thread on the forum: https://bbs.archlinux.org/viewtopic.php?id=134656}}<br />
<br />
==== Solid state drives ====<br />
<br />
From the [http://samwel.tk/laptop_mode/faq official, upstream FAQ]:<br />
<br />
'''Question:''' I have a solid-state disk (SSD) in my machine. Should I enable any of the disk-related parts of laptop-mode-tools, or are they irrelevant?<br />
<br />
'''Answer:''' They may be relevant, because (a) laptop mode will reduce the number of writes, which improves the lifetime of an SSD, and (b) laptop mode makes writes bursty, which enables power saving mechanisms like ALPM to kick in. However, your mileage may vary depending on the specific hardware involved. For some hardware, you will get no gain at all, for some the gain may be substantial.<br />
<br />
=== CPU frequency ===<br />
<br />
For this you need to have a CPU frequency driver installed. See [[CPU frequency scaling]].<br />
<br />
# cpufreq.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
CONTROL_CPU_FREQUENCY=1<br />
BATT_CPU_MAXFREQ=fastest<br />
BATT_CPU_MINFREQ=slowest<br />
BATT_CPU_GOVERNOR=ondemand<br />
BATT_CPU_IGNORE_NICE_LOAD=1<br />
LM_AC_CPU_MAXFREQ=fastest<br />
LM_AC_CPU_MINFREQ=slowest<br />
LM_AC_CPU_GOVERNOR=ondemand<br />
LM_AC_CPU_IGNORE_NICE_LOAD=1<br />
NOLM_AC_CPU_MAXFREQ=fastest<br />
NOLM_AC_CPU_MINFREQ=slowest<br />
NOLM_AC_CPU_GOVERNOR=ondemand<br />
NOLM_AC_CPU_IGNORE_NICE_LOAD=0<br />
CONTROL_CPU_THROTTLING=0<br />
<br />
=== Device and bus ===<br />
<br />
==== Intel SATA ====<br />
<br />
* Enable the Intel SATA AHCI controller Aggressive Link Power Management feature to set the disk link into a very low power mode in the absence of disk IO.<br />
<br />
# intel-sata-powermgmt.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_INTEL_SATA_POWER=1<br />
BATT_ACTIVATE_SATA_POWER=1<br />
LM_AC_ACTIVATE_SATA_POWER=1<br />
NOLM_AC_ACTIVATE_SATA_POWER=0<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/intel-sata-powermgmt.conf}} file for additional configuration details.}}<br />
<br />
==== USB autosuspend ====<br />
<br />
{{Tip|USB autosuspend functionality has been moved from the ''usb-autosuspend'' module to the ''runtime-pm'' module. Make sure to replace usb-autosuspend with runtime-pm on /lib/udev/rules.d/99-laptop-mode.rules.}}<br />
<br />
# runtime-pm.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_RUNTIME_AUTOSUSPEND=1<br />
BATT_SUSPEND_RUNTIME=1<br />
LM_AC_SUSPEND_RUNTIME=1<br />
NOLM_AC_SUSPEND_RUNTIME=1<br />
AUTOSUSPEND_TIMEOUT=2<br />
<br />
{{Note|Review the {{ic|/etc/laptop-mode/conf.d/runtime-pm.conf}} file for additional configuration details. If you have an USB tool you always use (like an USB mouse), blacklisting them would stop them from suspending.}}<br />
<br />
=== Display and graphics ===<br />
<br />
==== LCD brightness ====<br />
<br />
* Available brightness values for certain laptops can be obtained by running following command:<br />
<br />
$ cat /proc/acpi/video/VID/LCD/brightness<br />
<br />
===== ThinkPad T40/T42 =====<br />
<br />
For [[wikipedia:ThinkPad|ThinkPad]] T40/T42 notebooks, minimum and maximum brightness values can be obtained by running:<br />
<br />
$ cat /sys/class/backlight/acpi_video0/brightness<br />
$ cat /sys/class/backlight/acpi_video0/max_brightness<br />
<br />
# lcd-brightness.conf<br />
# ThinkPad T40/T42 Example<br />
#<br />
DEBUG=0<br />
CONTROL_BRIGHTNESS=1<br />
BATT_BRIGHTNESS_COMMAND="echo 0"<br />
LM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
NOLM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
BRIGHTNESS_OUTPUT="/sys/class/backlight/thinkpad_screen/brightness"<br />
<br />
===== ThinkPad T60 =====<br />
<br />
* For [[wikipedia:ThinkPad|ThinkPad]] T60 notebooks, minimum and maximum brightness values can be obtained by running:<br />
<br />
$ cat /sys/class/backlight/thinkpad_screen/max_brightness<br />
$ cat /sys/class/backlight/thinkpad_screen/brightness<br />
<br />
# lcd-brightness.conf<br />
# ThinkPad T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_BRIGHTNESS=1<br />
BATT_BRIGHTNESS_COMMAND="echo 0"<br />
LM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
NOLM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
BRIGHTNESS_OUTPUT="/sys/class/backlight/acpi_video0/brightness"<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/lcd-brightness.conf}} file for additional configuration details.}}<br />
<br />
==== Terminal blanking ====<br />
<br />
# terminal-blanking.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_TERMINAL=1<br />
TERMINALS="/dev/tty1"<br />
BATT_TERMINAL_BLANK_MINUTES=1<br />
BATT_TERMINAL_POWERDOWN_MINUTES=2<br />
LM_AC_TERMINAL_BLANK_MINUTES=10<br />
LM_AC_TERMINAL_POWERDOWN_MINUTES=10<br />
NOLM_AC_TERMINAL_BLANK_MINUTES=10<br />
NOLM_AC_TERMINAL_POWERDOWN_MINUTES=10<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/terminal-blanking.conf}} file for additional configuration details.}}<br />
<br />
=== Networking ===<br />
<br />
==== Ethernet ====<br />
<br />
# ethernet.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_ETHERNET=1<br />
LM_AC_THROTTLE_ETHERNET=0<br />
NOLM_AC_THROTTLE_ETHERNET=0<br />
DISABLE_WAKEUP_ON_LAN=1<br />
DISABLE_ETHERNET_ON_BATTERY=1<br />
ETHERNET_DEVICES="eth0"<br />
<br />
==== Wireless LAN ====<br />
<br />
Wireless interface power management settings are hardware-dependent, and thus a bit trickier to configure. Depending on the wireless chipset, the settings are managed in one of the following three files:<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-power.conf}} for a generic method of saving power (using "iwconfig wlan0 power on/off"). This applies to most chipsets (that is, anything but Intel chipsets listed below).<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-ipw-power.conf}} for Intel chipsets driven by the old ipw driver. This apply to IPW3945, IPW2200 and IPW2100. It currently (as of LMT 1.55-1) uses iwpriv for IPW3945, and a combination of iwconfig and iwpriv settings for IPW2100 and IPW220. See {{ic|/usr/share/laptop-mode-tools/modules/wireless-ipw-power}} for details. (note that the ipw3945 is not used anymore, see below)<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-iwl-power.conf}} for Intel chipsets driven by modules iwl4965, iwl3945 and iwlagn (this latter supports chipsets 4965, 5100, 5300, 5350, 5150, 1000, and 6000)<br />
Note that activating the three of them should not be much of a problem, since LMT detects the module used by the interface and acts accordingly.<br />
<br />
The supported modules for each configuration file, indicated above, are taken directly from LMT. However, this seems to be a bit out-of-date, since the current 2.6.34 kernel does not provide the ipw3945 and iwl4965 modules anymore (3945 chipset uses iwl3945 instead, and 4965 uses the generic module iwlagn). This is only brought here for information, as this does not (or should not) affect the way LMT works.<br />
<br />
There is a known issue with some chipsets running with the iwlagn module (namely, the 5300 chipset, and maybe others). On those chipsets, the following settings of {{ic|/etc/laptop-mode/conf.d/wireless-iwl-power.conf}}:<br />
<br />
IWL_AC_POWER<br />
IWL_BATT_POWER<br />
<br />
are ignored, because the {{ic|/sys/class/net/wlan*/device/power_level}} file does not exist. Instead, the standard method (with "iwconfig wlan0 power on/off") is automatically used.<br />
<br />
=== Audio ===<br />
<br />
==== AC97 ====<br />
<br />
# ac97-powersave.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_AC97_POWER=1<br />
<br />
==== Intel HDA ====<br />
<br />
# intel-hda-powersave.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_INTEL_HDA_POWER=1<br />
BATT_INTEL_HDA_POWERSAVE=1<br />
LM_AC_INTEL_HDA_POWERSAVE=1<br />
NOLM_AC_INTEL_HDA_POWERSAVE=0<br />
INTEL_HDA_DEVICE_TIMEOUT=10<br />
INTEL_HDA_DEVICE_CONTROLLER=0<br />
<br />
== Tips and tricks ==<br />
<br />
=== Aliases ===<br />
<br />
=== lm-profiler ===<br />
<br />
=== Disabling ===<br />
<br />
== Troubleshooting ==<br />
<br />
=== Laptop-mode-tools is not picking up events ===<br />
<br />
Install {{Pkg|acpid}} and enable its [[systemd]] service {{ic|acpid.service}}.<br />
<br />
If that does not help, go through the laptop-mode configuration files and make sure that the service you want to enable is set to 1. Many services (including cpufreq control) are by default set to "auto", which may not enable them.<br />
<br />
I have experienced issues with bluetooth not working if I boot up with battery, and I fixed it with disabling runtime-pm.<br />
<br />
=== Laptop-mode-tools does not disable on AC ===<br />
<br />
It is possible if you have both laptop-mode-tools and pm-utils installed, they can conflict with each other, causing laptop-mode-tools to not properly set its state.<br />
<br />
This can be fixed by disabling scripts with duplicate functionality in pm-utils. The main cause of this particular issue is the laptop-mode script located in {{ic|/usr/lib/pm-utils/power.d}}. You can stop any unwanted hooks from running by creating a dummy file in {{ic|/etc/pm/power.d}} with the same name as the corresponding {{ic|/usr/lib/pm-utils/power.d}} hook. For example if you want to disable the laptop-mode hook:<br />
<br />
# touch /etc/pm/power.d/laptop-mode<br />
<br />
{{Note|Do not set the executable bit on that dummy-hook.}}<br />
<br />
Its recommended to disable any hook that has equivalent functionality in LMT.<br />
<br />
=== USB Mouse sleeping after 5 seconds when on battery ===<br />
<br />
First find the ID of you device (it sould look like {{ic|046d:c534}}):<br />
<br />
$ lsusb<br />
<br />
Put this value into the {{ic|AUTOSUSPEND_DEVID_BLACKLIST}} variable in {{ic|/etc/laptop-mode/conf.d/runtime-pm.conf}}, for example:<br />
<br />
{{hc|/etc/laptop-mode/conf.d/runtime-pm.conf|2=<br />
...<br />
AUTOSUSPEND_DEVID_BLACKLIST="046d:c534"<br />
...<br />
}}<br />
<br />
Multiple IDs can be seperated with spaces.<br />
{{Note|Don't forget to [[restart]] the laptop-mode service. You might also need to reconnect the USB device.}}<br />
<br />
== See also ==<br />
<br />
* [http://samwel.tk/laptop_mode/ Laptop Mode Tools]<br />
* [http://mailman.samwel.tk/pipermail/laptop-mode/ Mailing List Archives]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Laptop_Mode_Tools&diff=428991Laptop Mode Tools2016-03-31T23:07:55Z<p>JoshuaBranson: I linked to the relevant forum articles.</p>
<hr />
<div>[[Category:Laptops]]<br />
[[Category:Power management]]<br />
[[de:Laptop Mode Tools]]<br />
[[fr:Laptop Mode Tools]]<br />
[[it:Laptop Mode Tools]]<br />
[[ja:Laptop Mode Tools]]<br />
[[ru:Laptop Mode Tools]]<br />
[[zh-CN:Laptop Mode Tools]]<br />
{{Related articles start}}<br />
{{Related|acpid}}<br />
{{Related|systemd}}<br />
{{Related|cpufrequtils}}<br />
{{Related|pm-utils}}<br />
{{Related|Laptop}}<br />
{{Related|Powertop}}<br />
{{Related|TLP}}<br />
{{Related articles end}}<br />
<br />
[http://samwel.tk/laptop_mode/ Laptop Mode Tools] is a laptop power saving package for Linux systems. It is the primary way to enable the Laptop Mode feature of the Linux kernel, which lets your hard drive spin down. In addition, it allows you to tweak a number of other power-related settings using a simple configuration file.<br />
<br />
Combined with [[acpid]] and [[CPU frequency scaling]], LMT provides most users with a complete notebook power management suite.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{AUR|laptop-mode-tools}} package or the {{AUR|laptop-mode-tools-git}} package.<br />
<br />
<br />
{{Warning|Some arch users have experience many systemd errors using {{AUR|laptop-mode-tools}}. It is recommended to use {{AUR|laptop-mode-tools-git}}. The relevant forum articles are https://bbs.archlinux.org/viewtopic.php?id=209855 and https://bbs.archlinux.org/viewtopic.php?id=209100}}<br />
<br />
== Configuration ==<br />
<br />
Configuration is handled through:<br />
<br />
* {{ic|/etc/laptop-mode/laptop-mode.conf}} - primary configuration file.<br />
* {{ic|/etc/laptop-mode/conf.d/*}} - dozens of feature-specific "modules". <br />
<br />
Each module can be explicitly {{ic|enabled}}, {{ic|disabled}}, or set to {{ic|auto}} by changing the {{ic|CONTROL_*}} argument of any file in {{ic|conf.d/}}. LMT will attempt enable any modules where {{ic|CONTROL_*}} is set to {{ic|auto}} if {{ic|ENABLE_AUTO_MODULES}} is set in {{ic|/etc/laptop-mode/laptop-mode.conf}}. There are two exceptions to the above rule: {{ic|auto-hibernate.conf}} and {{ic|battery-level-polling.conf}} use an {{ic|ENABLE_*}} variable instead of {{ic|CONTROL_*}}.<br />
<br />
To quickly check which modules are enabled, disabled or auto, run:<br />
<br />
$ grep -r '^\(CONTROL\&#124;ENABLE\)_' /etc/laptop-mode/conf.d<br />
<br />
Finally, [[enable]] {{ic|laptop-mode.service}}.<br />
<br />
=== Hard disks ===<br />
<br />
For this you need to have ''hdparm'' and/or ''sdparm'' installed. See [[Hdparm]].<br />
<br />
Spinning down the hard drive through {{Ic|hdparm -S}} values saves power and makes everything a lot more quiet. By using the readahead function you can allow the drives to spin down more often even though you are using the computer. LMT can also establish {{Ic|hdparm -B}} values. The maximum hard drive power saving is 1 and the minimum is 254. For example, set this value to 254 when on AC and 20 when on battery. If you find that normal activity hangs often while waiting for the disk to spin up, it might be a good idea to set it to a higher value (e.g. 128) which will make it spin down less often. {{Ic|hdparm -S}} and {{Ic|hdparm -B}} values are configured in {{ic|/etc/laptop-mode/laptop-mode.conf}}.<br />
<br />
{{Warning|Spinning down a hard drive too frequently can shorten its lifespan. Take care when choosing a proper value.}}<br />
<br />
With the {{ic|CONTROL_MOUNT_OPTIONS}} variable (default on), laptop-mode-tools automatically remounts your partitions, appending {{ic|1=commit=600,noatime}} in the mount options. This keeps the journaling program jbd2 from accessing your disk every few seconds, instead the disk journal gets updated every 10 minutes.<br />
<br />
{{Warning|With this setting you could lose up to 10 minutes of work. Also be sure not to use the {{Ic|atime}} mount option. Use {{Ic|noatime}} or {{Ic|relatime}} instead.}}<br />
<br />
{{Note|1={{ic|CONTROL_MOUNT_OPTIONS}} should not be turned on with nilfs2 partitions. Refer to this thread on the forum: https://bbs.archlinux.org/viewtopic.php?id=134656}}<br />
<br />
==== Solid state drives ====<br />
<br />
From the [http://samwel.tk/laptop_mode/faq official, upstream FAQ]:<br />
<br />
'''Question:''' I have a solid-state disk (SSD) in my machine. Should I enable any of the disk-related parts of laptop-mode-tools, or are they irrelevant?<br />
<br />
'''Answer:''' They may be relevant, because (a) laptop mode will reduce the number of writes, which improves the lifetime of an SSD, and (b) laptop mode makes writes bursty, which enables power saving mechanisms like ALPM to kick in. However, your mileage may vary depending on the specific hardware involved. For some hardware, you will get no gain at all, for some the gain may be substantial.<br />
<br />
=== CPU frequency ===<br />
<br />
For this you need to have a CPU frequency driver installed. See [[CPU frequency scaling]].<br />
<br />
# cpufreq.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
CONTROL_CPU_FREQUENCY=1<br />
BATT_CPU_MAXFREQ=fastest<br />
BATT_CPU_MINFREQ=slowest<br />
BATT_CPU_GOVERNOR=ondemand<br />
BATT_CPU_IGNORE_NICE_LOAD=1<br />
LM_AC_CPU_MAXFREQ=fastest<br />
LM_AC_CPU_MINFREQ=slowest<br />
LM_AC_CPU_GOVERNOR=ondemand<br />
LM_AC_CPU_IGNORE_NICE_LOAD=1<br />
NOLM_AC_CPU_MAXFREQ=fastest<br />
NOLM_AC_CPU_MINFREQ=slowest<br />
NOLM_AC_CPU_GOVERNOR=ondemand<br />
NOLM_AC_CPU_IGNORE_NICE_LOAD=0<br />
CONTROL_CPU_THROTTLING=0<br />
<br />
=== Device and bus ===<br />
<br />
==== Intel SATA ====<br />
<br />
* Enable the Intel SATA AHCI controller Aggressive Link Power Management feature to set the disk link into a very low power mode in the absence of disk IO.<br />
<br />
# intel-sata-powermgmt.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_INTEL_SATA_POWER=1<br />
BATT_ACTIVATE_SATA_POWER=1<br />
LM_AC_ACTIVATE_SATA_POWER=1<br />
NOLM_AC_ACTIVATE_SATA_POWER=0<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/intel-sata-powermgmt.conf}} file for additional configuration details.}}<br />
<br />
==== USB autosuspend ====<br />
<br />
{{Tip|USB autosuspend functionality has been moved from the ''usb-autosuspend'' module to the ''runtime-pm'' module. Make sure to replace usb-autosuspend with runtime-pm on /lib/udev/rules.d/99-laptop-mode.rules.}}<br />
<br />
# runtime-pm.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_RUNTIME_AUTOSUSPEND=1<br />
BATT_SUSPEND_RUNTIME=1<br />
LM_AC_SUSPEND_RUNTIME=1<br />
NOLM_AC_SUSPEND_RUNTIME=1<br />
AUTOSUSPEND_TIMEOUT=2<br />
<br />
{{Note|Review the {{ic|/etc/laptop-mode/conf.d/runtime-pm.conf}} file for additional configuration details. If you have an USB tool you always use (like an USB mouse), blacklisting them would stop them from suspending.}}<br />
<br />
=== Display and graphics ===<br />
<br />
==== LCD brightness ====<br />
<br />
* Available brightness values for certain laptops can be obtained by running following command:<br />
<br />
$ cat /proc/acpi/video/VID/LCD/brightness<br />
<br />
===== ThinkPad T40/T42 =====<br />
<br />
For [[wikipedia:ThinkPad|ThinkPad]] T40/T42 notebooks, minimum and maximum brightness values can be obtained by running:<br />
<br />
$ cat /sys/class/backlight/acpi_video0/brightness<br />
$ cat /sys/class/backlight/acpi_video0/max_brightness<br />
<br />
# lcd-brightness.conf<br />
# ThinkPad T40/T42 Example<br />
#<br />
DEBUG=0<br />
CONTROL_BRIGHTNESS=1<br />
BATT_BRIGHTNESS_COMMAND="echo 0"<br />
LM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
NOLM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
BRIGHTNESS_OUTPUT="/sys/class/backlight/thinkpad_screen/brightness"<br />
<br />
===== ThinkPad T60 =====<br />
<br />
* For [[wikipedia:ThinkPad|ThinkPad]] T60 notebooks, minimum and maximum brightness values can be obtained by running:<br />
<br />
$ cat /sys/class/backlight/thinkpad_screen/max_brightness<br />
$ cat /sys/class/backlight/thinkpad_screen/brightness<br />
<br />
# lcd-brightness.conf<br />
# ThinkPad T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_BRIGHTNESS=1<br />
BATT_BRIGHTNESS_COMMAND="echo 0"<br />
LM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
NOLM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
BRIGHTNESS_OUTPUT="/sys/class/backlight/acpi_video0/brightness"<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/lcd-brightness.conf}} file for additional configuration details.}}<br />
<br />
==== Terminal blanking ====<br />
<br />
# terminal-blanking.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_TERMINAL=1<br />
TERMINALS="/dev/tty1"<br />
BATT_TERMINAL_BLANK_MINUTES=1<br />
BATT_TERMINAL_POWERDOWN_MINUTES=2<br />
LM_AC_TERMINAL_BLANK_MINUTES=10<br />
LM_AC_TERMINAL_POWERDOWN_MINUTES=10<br />
NOLM_AC_TERMINAL_BLANK_MINUTES=10<br />
NOLM_AC_TERMINAL_POWERDOWN_MINUTES=10<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/terminal-blanking.conf}} file for additional configuration details.}}<br />
<br />
=== Networking ===<br />
<br />
==== Ethernet ====<br />
<br />
# ethernet.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_ETHERNET=1<br />
LM_AC_THROTTLE_ETHERNET=0<br />
NOLM_AC_THROTTLE_ETHERNET=0<br />
DISABLE_WAKEUP_ON_LAN=1<br />
DISABLE_ETHERNET_ON_BATTERY=1<br />
ETHERNET_DEVICES="eth0"<br />
<br />
==== Wireless LAN ====<br />
<br />
Wireless interface power management settings are hardware-dependent, and thus a bit trickier to configure. Depending on the wireless chipset, the settings are managed in one of the following three files:<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-power.conf}} for a generic method of saving power (using "iwconfig wlan0 power on/off"). This applies to most chipsets (that is, anything but Intel chipsets listed below).<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-ipw-power.conf}} for Intel chipsets driven by the old ipw driver. This apply to IPW3945, IPW2200 and IPW2100. It currently (as of LMT 1.55-1) uses iwpriv for IPW3945, and a combination of iwconfig and iwpriv settings for IPW2100 and IPW220. See {{ic|/usr/share/laptop-mode-tools/modules/wireless-ipw-power}} for details. (note that the ipw3945 is not used anymore, see below)<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-iwl-power.conf}} for Intel chipsets driven by modules iwl4965, iwl3945 and iwlagn (this latter supports chipsets 4965, 5100, 5300, 5350, 5150, 1000, and 6000)<br />
Note that activating the three of them should not be much of a problem, since LMT detects the module used by the interface and acts accordingly.<br />
<br />
The supported modules for each configuration file, indicated above, are taken directly from LMT. However, this seems to be a bit out-of-date, since the current 2.6.34 kernel does not provide the ipw3945 and iwl4965 modules anymore (3945 chipset uses iwl3945 instead, and 4965 uses the generic module iwlagn). This is only brought here for information, as this does not (or should not) affect the way LMT works.<br />
<br />
There is a known issue with some chipsets running with the iwlagn module (namely, the 5300 chipset, and maybe others). On those chipsets, the following settings of {{ic|/etc/laptop-mode/conf.d/wireless-iwl-power.conf}}:<br />
<br />
IWL_AC_POWER<br />
IWL_BATT_POWER<br />
<br />
are ignored, because the {{ic|/sys/class/net/wlan*/device/power_level}} file does not exist. Instead, the standard method (with "iwconfig wlan0 power on/off") is automatically used.<br />
<br />
=== Audio ===<br />
<br />
==== AC97 ====<br />
<br />
# ac97-powersave.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_AC97_POWER=1<br />
<br />
==== Intel HDA ====<br />
<br />
# intel-hda-powersave.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_INTEL_HDA_POWER=1<br />
BATT_INTEL_HDA_POWERSAVE=1<br />
LM_AC_INTEL_HDA_POWERSAVE=1<br />
NOLM_AC_INTEL_HDA_POWERSAVE=0<br />
INTEL_HDA_DEVICE_TIMEOUT=10<br />
INTEL_HDA_DEVICE_CONTROLLER=0<br />
<br />
== Tips and tricks ==<br />
<br />
=== Aliases ===<br />
<br />
=== lm-profiler ===<br />
<br />
=== Disabling ===<br />
<br />
== Troubleshooting ==<br />
<br />
=== Laptop-mode-tools is not picking up events ===<br />
<br />
Install {{Pkg|acpid}} and enable its [[systemd]] service {{ic|acpid.service}}.<br />
<br />
If that does not help, go through the laptop-mode configuration files and make sure that the service you want to enable is set to 1. Many services (including cpufreq control) are by default set to "auto", which may not enable them.<br />
<br />
I have experienced issues with bluetooth not working if I boot up with battery, and I fixed it with disabling runtime-pm.<br />
<br />
=== Laptop-mode-tools does not disable on AC ===<br />
<br />
It is possible if you have both laptop-mode-tools and pm-utils installed, they can conflict with each other, causing laptop-mode-tools to not properly set its state.<br />
<br />
This can be fixed by disabling scripts with duplicate functionality in pm-utils. The main cause of this particular issue is the laptop-mode script located in {{ic|/usr/lib/pm-utils/power.d}}. You can stop any unwanted hooks from running by creating a dummy file in {{ic|/etc/pm/power.d}} with the same name as the corresponding {{ic|/usr/lib/pm-utils/power.d}} hook. For example if you want to disable the laptop-mode hook:<br />
<br />
# touch /etc/pm/power.d/laptop-mode<br />
<br />
{{Note|Do not set the executable bit on that dummy-hook.}}<br />
<br />
Its recommended to disable any hook that has equivalent functionality in LMT.<br />
<br />
=== USB Mouse sleeping after 5 seconds when on battery ===<br />
<br />
First find the ID of you device (it sould look like {{ic|046d:c534}}):<br />
<br />
$ lsusb<br />
<br />
Put this value into the {{ic|AUTOSUSPEND_DEVID_BLACKLIST}} variable in {{ic|/etc/laptop-mode/conf.d/runtime-pm.conf}}, for example:<br />
<br />
{{hc|/etc/laptop-mode/conf.d/runtime-pm.conf|2=<br />
...<br />
AUTOSUSPEND_DEVID_BLACKLIST="046d:c534"<br />
...<br />
}}<br />
<br />
Multiple IDs can be seperated with spaces.<br />
{{Note|Don't forget to [[restart]] the laptop-mode service. You might also need to reconnect the USB device.}}<br />
<br />
== See also ==<br />
<br />
* [http://samwel.tk/laptop_mode/ Laptop Mode Tools]<br />
* [http://mailman.samwel.tk/pipermail/laptop-mode/ Mailing List Archives]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Laptop_Mode_Tools&diff=428990Laptop Mode Tools2016-03-31T23:05:58Z<p>JoshuaBranson: I let people know there is also a laptop-mode-tools-git</p>
<hr />
<div>[[Category:Laptops]]<br />
[[Category:Power management]]<br />
[[de:Laptop Mode Tools]]<br />
[[fr:Laptop Mode Tools]]<br />
[[it:Laptop Mode Tools]]<br />
[[ja:Laptop Mode Tools]]<br />
[[ru:Laptop Mode Tools]]<br />
[[zh-CN:Laptop Mode Tools]]<br />
{{Related articles start}}<br />
{{Related|acpid}}<br />
{{Related|systemd}}<br />
{{Related|cpufrequtils}}<br />
{{Related|pm-utils}}<br />
{{Related|Laptop}}<br />
{{Related|Powertop}}<br />
{{Related|TLP}}<br />
{{Related articles end}}<br />
<br />
[http://samwel.tk/laptop_mode/ Laptop Mode Tools] is a laptop power saving package for Linux systems. It is the primary way to enable the Laptop Mode feature of the Linux kernel, which lets your hard drive spin down. In addition, it allows you to tweak a number of other power-related settings using a simple configuration file.<br />
<br />
Combined with [[acpid]] and [[CPU frequency scaling]], LMT provides most users with a complete notebook power management suite.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{AUR|laptop-mode-tools}} package or the {{AUR|laptop-mode-tools-git}} package.<br />
<br />
<br />
{{Warning|Some arch users have experience many systemd errors using {{AUR|laptop-mode-tools}}. It is recommended to use laptop-mode-tools-git.}}<br />
<br />
== Configuration ==<br />
<br />
Configuration is handled through:<br />
<br />
* {{ic|/etc/laptop-mode/laptop-mode.conf}} - primary configuration file.<br />
* {{ic|/etc/laptop-mode/conf.d/*}} - dozens of feature-specific "modules". <br />
<br />
Each module can be explicitly {{ic|enabled}}, {{ic|disabled}}, or set to {{ic|auto}} by changing the {{ic|CONTROL_*}} argument of any file in {{ic|conf.d/}}. LMT will attempt enable any modules where {{ic|CONTROL_*}} is set to {{ic|auto}} if {{ic|ENABLE_AUTO_MODULES}} is set in {{ic|/etc/laptop-mode/laptop-mode.conf}}. There are two exceptions to the above rule: {{ic|auto-hibernate.conf}} and {{ic|battery-level-polling.conf}} use an {{ic|ENABLE_*}} variable instead of {{ic|CONTROL_*}}.<br />
<br />
To quickly check which modules are enabled, disabled or auto, run:<br />
<br />
$ grep -r '^\(CONTROL\&#124;ENABLE\)_' /etc/laptop-mode/conf.d<br />
<br />
Finally, [[enable]] {{ic|laptop-mode.service}}.<br />
<br />
=== Hard disks ===<br />
<br />
For this you need to have ''hdparm'' and/or ''sdparm'' installed. See [[Hdparm]].<br />
<br />
Spinning down the hard drive through {{Ic|hdparm -S}} values saves power and makes everything a lot more quiet. By using the readahead function you can allow the drives to spin down more often even though you are using the computer. LMT can also establish {{Ic|hdparm -B}} values. The maximum hard drive power saving is 1 and the minimum is 254. For example, set this value to 254 when on AC and 20 when on battery. If you find that normal activity hangs often while waiting for the disk to spin up, it might be a good idea to set it to a higher value (e.g. 128) which will make it spin down less often. {{Ic|hdparm -S}} and {{Ic|hdparm -B}} values are configured in {{ic|/etc/laptop-mode/laptop-mode.conf}}.<br />
<br />
{{Warning|Spinning down a hard drive too frequently can shorten its lifespan. Take care when choosing a proper value.}}<br />
<br />
With the {{ic|CONTROL_MOUNT_OPTIONS}} variable (default on), laptop-mode-tools automatically remounts your partitions, appending {{ic|1=commit=600,noatime}} in the mount options. This keeps the journaling program jbd2 from accessing your disk every few seconds, instead the disk journal gets updated every 10 minutes.<br />
<br />
{{Warning|With this setting you could lose up to 10 minutes of work. Also be sure not to use the {{Ic|atime}} mount option. Use {{Ic|noatime}} or {{Ic|relatime}} instead.}}<br />
<br />
{{Note|1={{ic|CONTROL_MOUNT_OPTIONS}} should not be turned on with nilfs2 partitions. Refer to this thread on the forum: https://bbs.archlinux.org/viewtopic.php?id=134656}}<br />
<br />
==== Solid state drives ====<br />
<br />
From the [http://samwel.tk/laptop_mode/faq official, upstream FAQ]:<br />
<br />
'''Question:''' I have a solid-state disk (SSD) in my machine. Should I enable any of the disk-related parts of laptop-mode-tools, or are they irrelevant?<br />
<br />
'''Answer:''' They may be relevant, because (a) laptop mode will reduce the number of writes, which improves the lifetime of an SSD, and (b) laptop mode makes writes bursty, which enables power saving mechanisms like ALPM to kick in. However, your mileage may vary depending on the specific hardware involved. For some hardware, you will get no gain at all, for some the gain may be substantial.<br />
<br />
=== CPU frequency ===<br />
<br />
For this you need to have a CPU frequency driver installed. See [[CPU frequency scaling]].<br />
<br />
# cpufreq.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
CONTROL_CPU_FREQUENCY=1<br />
BATT_CPU_MAXFREQ=fastest<br />
BATT_CPU_MINFREQ=slowest<br />
BATT_CPU_GOVERNOR=ondemand<br />
BATT_CPU_IGNORE_NICE_LOAD=1<br />
LM_AC_CPU_MAXFREQ=fastest<br />
LM_AC_CPU_MINFREQ=slowest<br />
LM_AC_CPU_GOVERNOR=ondemand<br />
LM_AC_CPU_IGNORE_NICE_LOAD=1<br />
NOLM_AC_CPU_MAXFREQ=fastest<br />
NOLM_AC_CPU_MINFREQ=slowest<br />
NOLM_AC_CPU_GOVERNOR=ondemand<br />
NOLM_AC_CPU_IGNORE_NICE_LOAD=0<br />
CONTROL_CPU_THROTTLING=0<br />
<br />
=== Device and bus ===<br />
<br />
==== Intel SATA ====<br />
<br />
* Enable the Intel SATA AHCI controller Aggressive Link Power Management feature to set the disk link into a very low power mode in the absence of disk IO.<br />
<br />
# intel-sata-powermgmt.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_INTEL_SATA_POWER=1<br />
BATT_ACTIVATE_SATA_POWER=1<br />
LM_AC_ACTIVATE_SATA_POWER=1<br />
NOLM_AC_ACTIVATE_SATA_POWER=0<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/intel-sata-powermgmt.conf}} file for additional configuration details.}}<br />
<br />
==== USB autosuspend ====<br />
<br />
{{Tip|USB autosuspend functionality has been moved from the ''usb-autosuspend'' module to the ''runtime-pm'' module. Make sure to replace usb-autosuspend with runtime-pm on /lib/udev/rules.d/99-laptop-mode.rules.}}<br />
<br />
# runtime-pm.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_RUNTIME_AUTOSUSPEND=1<br />
BATT_SUSPEND_RUNTIME=1<br />
LM_AC_SUSPEND_RUNTIME=1<br />
NOLM_AC_SUSPEND_RUNTIME=1<br />
AUTOSUSPEND_TIMEOUT=2<br />
<br />
{{Note|Review the {{ic|/etc/laptop-mode/conf.d/runtime-pm.conf}} file for additional configuration details. If you have an USB tool you always use (like an USB mouse), blacklisting them would stop them from suspending.}}<br />
<br />
=== Display and graphics ===<br />
<br />
==== LCD brightness ====<br />
<br />
* Available brightness values for certain laptops can be obtained by running following command:<br />
<br />
$ cat /proc/acpi/video/VID/LCD/brightness<br />
<br />
===== ThinkPad T40/T42 =====<br />
<br />
For [[wikipedia:ThinkPad|ThinkPad]] T40/T42 notebooks, minimum and maximum brightness values can be obtained by running:<br />
<br />
$ cat /sys/class/backlight/acpi_video0/brightness<br />
$ cat /sys/class/backlight/acpi_video0/max_brightness<br />
<br />
# lcd-brightness.conf<br />
# ThinkPad T40/T42 Example<br />
#<br />
DEBUG=0<br />
CONTROL_BRIGHTNESS=1<br />
BATT_BRIGHTNESS_COMMAND="echo 0"<br />
LM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
NOLM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
BRIGHTNESS_OUTPUT="/sys/class/backlight/thinkpad_screen/brightness"<br />
<br />
===== ThinkPad T60 =====<br />
<br />
* For [[wikipedia:ThinkPad|ThinkPad]] T60 notebooks, minimum and maximum brightness values can be obtained by running:<br />
<br />
$ cat /sys/class/backlight/thinkpad_screen/max_brightness<br />
$ cat /sys/class/backlight/thinkpad_screen/brightness<br />
<br />
# lcd-brightness.conf<br />
# ThinkPad T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_BRIGHTNESS=1<br />
BATT_BRIGHTNESS_COMMAND="echo 0"<br />
LM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
NOLM_AC_BRIGHTNESS_COMMAND="echo 7"<br />
BRIGHTNESS_OUTPUT="/sys/class/backlight/acpi_video0/brightness"<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/lcd-brightness.conf}} file for additional configuration details.}}<br />
<br />
==== Terminal blanking ====<br />
<br />
# terminal-blanking.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_TERMINAL=1<br />
TERMINALS="/dev/tty1"<br />
BATT_TERMINAL_BLANK_MINUTES=1<br />
BATT_TERMINAL_POWERDOWN_MINUTES=2<br />
LM_AC_TERMINAL_BLANK_MINUTES=10<br />
LM_AC_TERMINAL_POWERDOWN_MINUTES=10<br />
NOLM_AC_TERMINAL_BLANK_MINUTES=10<br />
NOLM_AC_TERMINAL_POWERDOWN_MINUTES=10<br />
<br />
{{Note|Review the well-documented {{ic|/etc/laptop-mode/conf.d/terminal-blanking.conf}} file for additional configuration details.}}<br />
<br />
=== Networking ===<br />
<br />
==== Ethernet ====<br />
<br />
# ethernet.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_ETHERNET=1<br />
LM_AC_THROTTLE_ETHERNET=0<br />
NOLM_AC_THROTTLE_ETHERNET=0<br />
DISABLE_WAKEUP_ON_LAN=1<br />
DISABLE_ETHERNET_ON_BATTERY=1<br />
ETHERNET_DEVICES="eth0"<br />
<br />
==== Wireless LAN ====<br />
<br />
Wireless interface power management settings are hardware-dependent, and thus a bit trickier to configure. Depending on the wireless chipset, the settings are managed in one of the following three files:<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-power.conf}} for a generic method of saving power (using "iwconfig wlan0 power on/off"). This applies to most chipsets (that is, anything but Intel chipsets listed below).<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-ipw-power.conf}} for Intel chipsets driven by the old ipw driver. This apply to IPW3945, IPW2200 and IPW2100. It currently (as of LMT 1.55-1) uses iwpriv for IPW3945, and a combination of iwconfig and iwpriv settings for IPW2100 and IPW220. See {{ic|/usr/share/laptop-mode-tools/modules/wireless-ipw-power}} for details. (note that the ipw3945 is not used anymore, see below)<br />
#{{ic|/etc/laptop-mode/conf.d/wireless-iwl-power.conf}} for Intel chipsets driven by modules iwl4965, iwl3945 and iwlagn (this latter supports chipsets 4965, 5100, 5300, 5350, 5150, 1000, and 6000)<br />
Note that activating the three of them should not be much of a problem, since LMT detects the module used by the interface and acts accordingly.<br />
<br />
The supported modules for each configuration file, indicated above, are taken directly from LMT. However, this seems to be a bit out-of-date, since the current 2.6.34 kernel does not provide the ipw3945 and iwl4965 modules anymore (3945 chipset uses iwl3945 instead, and 4965 uses the generic module iwlagn). This is only brought here for information, as this does not (or should not) affect the way LMT works.<br />
<br />
There is a known issue with some chipsets running with the iwlagn module (namely, the 5300 chipset, and maybe others). On those chipsets, the following settings of {{ic|/etc/laptop-mode/conf.d/wireless-iwl-power.conf}}:<br />
<br />
IWL_AC_POWER<br />
IWL_BATT_POWER<br />
<br />
are ignored, because the {{ic|/sys/class/net/wlan*/device/power_level}} file does not exist. Instead, the standard method (with "iwconfig wlan0 power on/off") is automatically used.<br />
<br />
=== Audio ===<br />
<br />
==== AC97 ====<br />
<br />
# ac97-powersave.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_AC97_POWER=1<br />
<br />
==== Intel HDA ====<br />
<br />
# intel-hda-powersave.conf<br />
# ThinkPad T40/T42/T60 Example<br />
#<br />
DEBUG=0<br />
CONTROL_INTEL_HDA_POWER=1<br />
BATT_INTEL_HDA_POWERSAVE=1<br />
LM_AC_INTEL_HDA_POWERSAVE=1<br />
NOLM_AC_INTEL_HDA_POWERSAVE=0<br />
INTEL_HDA_DEVICE_TIMEOUT=10<br />
INTEL_HDA_DEVICE_CONTROLLER=0<br />
<br />
== Tips and tricks ==<br />
<br />
=== Aliases ===<br />
<br />
=== lm-profiler ===<br />
<br />
=== Disabling ===<br />
<br />
== Troubleshooting ==<br />
<br />
=== Laptop-mode-tools is not picking up events ===<br />
<br />
Install {{Pkg|acpid}} and enable its [[systemd]] service {{ic|acpid.service}}.<br />
<br />
If that does not help, go through the laptop-mode configuration files and make sure that the service you want to enable is set to 1. Many services (including cpufreq control) are by default set to "auto", which may not enable them.<br />
<br />
I have experienced issues with bluetooth not working if I boot up with battery, and I fixed it with disabling runtime-pm.<br />
<br />
=== Laptop-mode-tools does not disable on AC ===<br />
<br />
It is possible if you have both laptop-mode-tools and pm-utils installed, they can conflict with each other, causing laptop-mode-tools to not properly set its state.<br />
<br />
This can be fixed by disabling scripts with duplicate functionality in pm-utils. The main cause of this particular issue is the laptop-mode script located in {{ic|/usr/lib/pm-utils/power.d}}. You can stop any unwanted hooks from running by creating a dummy file in {{ic|/etc/pm/power.d}} with the same name as the corresponding {{ic|/usr/lib/pm-utils/power.d}} hook. For example if you want to disable the laptop-mode hook:<br />
<br />
# touch /etc/pm/power.d/laptop-mode<br />
<br />
{{Note|Do not set the executable bit on that dummy-hook.}}<br />
<br />
Its recommended to disable any hook that has equivalent functionality in LMT.<br />
<br />
=== USB Mouse sleeping after 5 seconds when on battery ===<br />
<br />
First find the ID of you device (it sould look like {{ic|046d:c534}}):<br />
<br />
$ lsusb<br />
<br />
Put this value into the {{ic|AUTOSUSPEND_DEVID_BLACKLIST}} variable in {{ic|/etc/laptop-mode/conf.d/runtime-pm.conf}}, for example:<br />
<br />
{{hc|/etc/laptop-mode/conf.d/runtime-pm.conf|2=<br />
...<br />
AUTOSUSPEND_DEVID_BLACKLIST="046d:c534"<br />
...<br />
}}<br />
<br />
Multiple IDs can be seperated with spaces.<br />
{{Note|Don't forget to [[restart]] the laptop-mode service. You might also need to reconnect the USB device.}}<br />
<br />
== See also ==<br />
<br />
* [http://samwel.tk/laptop_mode/ Laptop Mode Tools]<br />
* [http://mailman.samwel.tk/pipermail/laptop-mode/ Mailing List Archives]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Beginners%27_guide&diff=343905Beginners' guide2014-11-08T16:45:33Z<p>JoshuaBranson: I explained how one can log into their linux box after one has installed Arch Linux.</p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
[[ar:Beginners' Guide]]<br />
[[bg:Beginners' Guide]]<br />
[[cs:Beginners' Guide]]<br />
[[da:Beginners' Guide]]<br />
[[de:Anleitung für Einsteiger]]<br />
[[el:Beginners' Guide]]<br />
[[es:Beginners' Guide]]<br />
[[fa:راهنمای تازهکارها]]<br />
[[fr:Installation]]<br />
[[he:Beginners' Guide]]<br />
[[hr:Beginners' Guide]]<br />
[[hu:Beginners' Guide]]<br />
[[id:Beginners' Guide]]<br />
[[it:Beginners' Guide]]<br />
[[ja:Beginners' Guide]]<br />
[[ko:Beginners' Guide]]<br />
[[lt:Beginners' Guide]]<br />
[[nl:Beginners' Guide]]<br />
[[pl:Beginners' Guide]]<br />
[[pt:Beginners' Guide]]<br />
[[ro:Ghidul începătorilor]]<br />
[[ru:Beginners' guide]]<br />
[[sk:Beginners' Guide]]<br />
[[sr:Beginners' Guide]]<br />
[[sv:Nybörjarguiden]]<br />
[[tr:Yeni başlayanlar rehberi]]<br />
[[uk:Beginners' Guide]]<br />
[[zh-CN:Beginners' guide]]<br />
[[zh-TW:Beginners' Guide]]<br />
{{Related articles start}}<br />
{{Related|:Category:Accessibility}}<br />
{{Related|Installation guide}}<br />
{{Related|Diskless system}}<br />
{{Related|Install from SSH}}<br />
{{Related|General recommendations}}<br />
{{Related|General troubleshooting}}<br />
{{Related articles end}}<br />
This document will guide you through the process of installing [[Arch Linux]] using the [https://projects.archlinux.org/arch-install-scripts.git/ Arch Install Scripts]. Before installing, you are advised to skim over the [[FAQ]].<br />
<br />
The community-maintained [[Main page|ArchWiki]] is the primary resource that should be consulted if issues arise. The [[IRC channel]] (irc://irc.freenode.net/#archlinux) and the [https://bbs.archlinux.org/ forums] are also excellent resources if an answer cannot be found elsewhere. In accordance with [[the Arch Way]], you are encouraged to type {{ic|man ''command''}} to read the [[man page]] of any command you are unfamiliar with.<br />
<br />
== Preparation ==<br />
<br />
{{Note|If you wish to install from an existing GNU/Linux distribution, please see [[Install from Existing Linux]]. This can be useful particularly if you plan to install Arch via [[VNC]] or [[SSH]] remotely. Users seeking to perform the Arch Linux installation remotely via an [[SSH]] connection should read [[Install from SSH]] for additional tips.}}<br />
<br />
=== System requirements ===<br />
<br />
Arch Linux should run on any [[Wikipedia:P6 (microarchitecture)|i686]] compatible machine with a minimum of 64 MB RAM. A basic installation with all packages from the {{Grp|base}} group should take less than 800 MB of disk space. If you are working with limited space, this can be trimmed down considerably, but you will have to know what you are doing.<br />
<br />
=== Prepare the latest installation medium ===<br />
<br />
The latest release of the installation media can be obtained from the [https://archlinux.org/download/ Download] page. Note that the single ISO image supports both 32 and 64-bit architectures. It is highly recommended to always use the latest ISO image.<br />
<br />
{{Tip|The [https://downloads.archlinux.de/iso/archboot/latest archboot] ISO images can take several steps explained in this guide [[Archboot#Interactive_setup_features|interactively]]. See [[Archboot]] for details.}}<br />
<br />
* Install images are signed and it is highly recommended to verify their signature before use. Download the ''.sig'' file from the download page (or one of the mirrors listed there) to the same directory as the ''.iso'' file. On Arch Linux, use {{ic|pacman-key -v ''iso-file''.sig}} as root; in other environments make use, still as root, of gpg2 directly with {{ic|gpg2 --verify ''iso-file''.sig}}. The file integrity checksums md5 and sha1 are also provided {{Note|The gpg2 verification will fail if you have not downloaded the public key corresponding to the RSA key ID. See http://sparewotw.wordpress.com/2012/10/31/how-to-verify-signature-using-sig-file/ for details}}<br />
* Burn the ISO image on a CD or DVD with your preferred software. On Arch, that is covered in [[Optical disc drive#Burning]] <br> {{Note|The quality of optical drives and the discs themselves varies greatly. Generally, using a slow burn speed is recommended for reliable burns. If you are experiencing unexpected behaviour from the disc, try burning at the lowest speed supported by your burner}}<br />
* Or you can write the ISO image to a USB stick. For detailed instructions, see [[USB flash installation media]]<br />
<br />
==== Installing over the network ====<br />
<br />
Instead of writing the boot media to a disc or USB stick, you may alternatively boot the ISO image over the network. This works well when you already have a server set up. Please see the [[PXE]] article for more information, and then continue to [[#Boot the installation medium]].<br />
<br />
==== Install from an existing Linux system ====<br />
<br />
Alternatively, it is possible to install from an already running Linux system. See [[Install from Existing Linux]].<br />
<br />
==== Installing on a virtual machine ====<br />
<br />
Installing on a [[Wikipedia:Virtual machine|virtual machine]] is a good way to become familiar with Arch Linux and its installation procedure without leaving your current operating system and repartitioning the storage drive. It will also let you keep this Beginners' Guide open in your browser throughout the installation. Some users may find it beneficial to have an independent Arch Linux system on a virtual drive, for testing purposes.<br />
<br />
Examples of virtualization software are [[VirtualBox]], [[VMware]], [[QEMU]], [[Xen]], [[Parallels]].<br />
<br />
The exact procedure for preparing a virtual machine depends on the software, but will generally follow these steps:<br />
<br />
# Create the virtual disk image that will host the operating system.<br />
# Properly configure the virtual machine parameters.<br />
# Boot the downloaded ISO image with a virtual CD drive.<br />
# Continue with [[#Boot the installation medium|Boot the installation medium]].<br />
<br />
The following articles may be helpful:<br />
<br />
* [[VirtualBox#Installation steps for Arch Linux guests|Arch Linux as VirtualBox guest]]<br />
* [[Installing Arch Linux from VirtualBox]]<br />
* [[VirtualBox Arch Linux Guest On Physical Drive|Arch Linux as VirtualBox guest on a physical drive]]<br />
* [[Installing Arch Linux in VMware|Arch Linux as VMware guest]]<br />
* [[Moving an existing install into (or out of) a virtual machine]]<br />
<br />
==== Boot the installation medium ====<br />
<br />
Most modern systems allow you to select the boot device during the [[Wikipedia:Power-on self test|POST]] phase, usually by pressing the {{ic|F12}} key while the BIOS splash screen is visible. Select the device which contains the Arch ISO. Alternatively, you may need to change the boot order in your computer's BIOS. <br />
<br />
To do this, press a key (usually {{ic|Delete}}, {{ic|F1}}, {{ic|F2}}, {{ic|F11}} or {{ic|F12}}) during the [[Wikipedia:Power-on self test|POST]] phase. This will take you into the BIOS settings screen where you can set the order in which the system searches for devices to boot from. Set the device which contains the Arch ISO as the first device from which boot is attempted. Select "Save & Exit" (or your BIOS's equivalent) and the computer should then complete its normal boot process.<br />
<br />
When the Arch menu appears, select "Boot Arch Linux" and press {{ic|Enter}} to enter the live environment where you will run the actual installation (if booting from a UEFI boot disk, the option may look more like "Arch Linux archiso x86_64 UEFI").<br />
<br />
===== Testing if you are booted into UEFI mode =====<br />
<br />
In case you have a [[Unified Extensible Firmware Interface|UEFI]] motherboard and UEFI Boot mode is enabled (and is preferred over BIOS/Legacy mode), the CD/USB will automatically launch Arch Linux via [[Gummiboot]] and you will get the following menu (white letters on black background), with the first item highlighted:<br />
{{bc|<br />
Arch Linux archiso x86_64 UEFI USB<br />
UEFI Shell x86_64 v1<br />
UEFI Shell x86_64 v2<br />
EFI Default Loader}}<br />
<br />
If you do not remember which menu you had at boot time, or if you want to make sure you booted into UEFI mode, run:<br />
<br />
# efivar -l<br />
<br />
If ''efivar'' lists the UEFI variables properly, then you have booted in UEFI mode. If not check whether all the requirements listed in [[Unified Extensible Firmware Interface#Requirements for UEFI Variables support to work properly|Unified Extensible Firmware Interface]] are met.<br />
<br />
==== Troubleshooting boot problems ====<br />
<br />
* If you are using an Intel video chipset and the screen goes blank during the boot process, the problem is likely an issue with [[Kernel mode setting]]. A possible workaround may be achieved by rebooting and pressing {{ic|Tab}} over the entry that you are trying to boot (i686 or x86_64). At the end of the string type {{ic|nomodeset}} and press {{ic|Enter}}. Alternatively, try {{ic|1=video=SVIDEO-1:d}} which, if it works, will not disable kernel mode setting. You can also try {{ic|1=i915.modeset=0}}. See the [[Intel]] article for more information.<br />
* If the screen does ''not'' go blank and the boot process gets stuck while trying to load the kernel, press {{ic|Tab}} while hovering over the menu entry, type {{ic|1=acpi=off}} at the end of the string and press {{ic|Enter}}.<br />
<br />
== Installation ==<br />
<br />
You are now presented with a shell prompt, automatically logged in as root. Your shell is [[Zsh]]; this will provide you advanced Tab completion, and other features as part of the [http://grml.org/zsh/ grml config].<br />
For editing text files, the console editor ''nano'' is suggested. If you are not familiar with it, see [[nano#nano usage]].<br />
If you have (or plan on having) a dual boot setup with Windows, see [[Windows and Arch Dual Boot]].<br />
<br />
=== Change the language ===<br />
<br />
{{Tip|These are optional for the majority of users. Useful only if you plan on writing in your own language in any of the configuration files, if you use diacritical marks in the Wi-Fi password, or if you would like to receive system messages (e.g. possible errors) in your own language. Changes here ''only'' affect the installation process.}}<br />
<br />
By default, the keyboard layout is set to {{ic|us}}. If you have a non-[[Wikipedia:File:KB United States-NoAltGr.svg|US]] keyboard layout, run:<br />
<br />
# loadkeys ''layout''<br />
<br />
...where ''layout'' can be {{ic|fr}}, {{ic|uk}}, {{ic|dvorak}}, {{ic|be-latin1}}, etc. See this [[Wikipedia:ISO 3166-1 alpha-2#Officially assigned code elements|wikipedia article]] for a 2-letter country code list. Use the command {{ic|localectl list-keymaps}} to list all available keymaps.<br />
<br />
If some glyphs of your language's alphabet (e.g. accented and non Latin letters) show up as white squares or as other symbols, you may want to change the console font with one from {{ic|/usr/share/kbd/consolefonts/}}. For example:<br />
<br />
# setfont lat9w-16<br />
<br />
You can run the {{ic|showconsolefont}} command to display the full contents of the loaded font. Note that the font name is case-sensitive, so type it ''exactly'' as you see it. See [[Fonts#Console fonts]] for more information.<br />
<br />
By default, the language is set to English (US). If you would like to change the language for the install process ''(German, in this example)'', remove the {{ic|#}} in front of the [[locale]] you want from {{ic|/etc/locale.gen}}, along with English (US). Please choose the {{ic|UTF-8}} entries:<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8<br />
de_DE.UTF-8 UTF-8<br />
}}<br />
<br />
# locale-gen<br />
# export LANG=de_DE.UTF-8<br />
<br />
=== Establish an internet connection ===<br />
<br />
{{Warning|As of [http://cgit.freedesktop.org/systemd/systemd/tree/NEWS?id&#61;dee4c244254bb49d1ffa8bd7171ae9cce596d2d0 v197], udev no longer assigns network interface names according to the ''wlanX'' and ''ethX'' naming scheme. If you are coming from a different distribution or are reinstalling Arch and not aware of the new interface naming style, please do not assume that your wireless interface is named ''wlan0'', or that your wired interface is named ''eth0''. You can use the command {{ic|ip link}} to discover the names of your interfaces.}}<br />
<br />
{{Note|Since the ISO released on 2014.04 (but maybe even on previous ones) there seems to be a problem in getting an IP address with DHCP if you are using the family of routers "FritzBox!". At this time models 7390[http://unix.stackexchange.com/questions/126526/archlinux-2014-04-64bit-and-connectivity-problem-during-instalation] and 7112[https://unix.stackexchange.com/questions/126694/enabling-wired-internet-connection-with-dhcp-during-arch-linux-installation/126709] seem to have this issue, but other models may be affected. The issue seems to be between the [[dhcpcd]] client and the FritzBox! routers and the way they assign IP addresses. The solution to the problem seems to be as follows: in your FritzBox! settings, manually delete the entry related to the IP address that identifies your machine. Also, disable the option "Assign always the same IP address to this machine". Now restart the DHCP process or simply reboot your computer and you should get an IP address as usual. If it does not work, try also to reboot your FritzBox!. Once your computer gets the IP address, you can re-enable the previously disabled option. }}<br />
<br />
The {{ic|dhcpcd}} network daemon starts automatically during boot and it will attempt to start a wired connection. Try to ping a server to see if a connection was established. For example, Google's webservers:<br />
<br />
{{hc|# ping -c 3 www.google.com|2=<br />
PING www.l.google.com (74.125.132.105) 56(84) bytes of data.<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=1 ttl=50 time=17.0 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=2 ttl=50 time=18.2 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=3 ttl=50 time=16.6 ms<br />
<br />
--- www.l.google.com ping statistics ---<br />
3 packets transmitted, 3 received, 0% packet loss, time 2003ms<br />
rtt min/avg/max/mdev = 16.660/17.320/18.254/0.678 ms<br />
}}<br />
<br />
If you get a {{ic|ping: unknown host}} error, first check if there is an issue with your cable or wireless signal strength. If not, you will need to set up the network manually, as explained below. Once a connection is established move on to [[#Prepare the storage drive]].<br />
<br />
==== Wired ====<br />
<br />
Follow this procedure if you need to set up a wired connection via a static IP address.<br />
<br />
First, disable the {{ic|dhcpcd}} service which was started automatically at boot:<br />
<br />
{{Note|That service may have another name {{ic|dhcpcd@''your_ethernet_interface''.service}}, for example {{ic|dhcpcd@enp0s25.service}}. Just press {{ic|Tab}} two times after {{ic|systemctl stop dhcpcd}} to choose the proper one}}<br />
<br />
# systemctl stop dhcpcd.service<br />
<br />
Identify the name of your Ethernet interface.<br />
<br />
{{hc|# ip link|<br />
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT<br />
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00<br />
2: enp2s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000<br />
link/ether 00:11:25:31:69:20 brd ff:ff:ff:ff:ff:ff<br />
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT qlen 1000<br />
link/ether 01:02:03:04:05:06 brd ff:ff:ff:ff:ff:ff<br />
}}<br />
<br />
In this example, the Ethernet interface is {{ic|enp2s0f0}}. If you are unsure, your Ethernet interface is likely to start with the letter "e", and unlikely to be "lo" or start with the letter "w".<br />
<br />
You also need to know these settings:<br />
<br />
* Static IP address.<br />
* Subnet mask in [[wikipedia:Classless Inter-Domain Routing#CIDR notation|CIDR notation]], for example {{ic|/24}} is the CIDR notation of {{ic|255.255.255.0}} netmask.<br />
* Gateway's IP address.<br />
* Name servers' (DNS) IP addresses.<br />
* Domain name (unless you are on a local LAN, in which case you can make it up).<br />
<br />
Activate the connected Ethernet interface (e.g. {{ic|enp2s0f0}}):<br />
<br />
# ip link set enp2s0f0 up<br />
<br />
Add the address:<br />
<br />
# ip addr add ''ip_address''/''mask_bits'' dev ''interface_name''<br />
<br />
For example:<br />
<br />
# ip addr add 192.168.1.2/24 dev enp2s0f0<br />
<br />
For more options, run {{ic|man ip}}.<br />
<br />
Add your gateway like this, substituting your own gateway's IP address:<br />
<br />
# ip route add default via ''ip_address''<br />
<br />
For example:<br />
<br />
# ip route add default via 192.168.1.1<br />
<br />
Edit {{ic|resolv.conf}}, substituting your name servers' IP addresses and your local domain name:<br />
<br />
{{hc|# nano /etc/resolv.conf|<br />
nameserver 61.23.173.5<br />
nameserver 61.95.849.8<br />
search example.com<br />
}}<br />
<br />
{{Note|Currently, you may include a maximum of three {{ic|nameserver}} lines. In order to overcome this limitation, you can use a locally caching nameserver like [[dnsmasq]].}}<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Network configuration]] page.<br />
<br />
==== Wireless ====<br />
<br />
Follow this procedure if you need wireless connectivity (Wi-Fi) during the installation process.<br />
<br />
First, identify the name of your wireless interface:<br />
<br />
{{hc|# iw dev|2=<br />
phy#0<br />
Interface wlp3s0<br />
ifindex 3<br />
wdev 0x1<br />
addr 00:11:22:33:44:55<br />
type managed<br />
}}<br />
<br />
In this example, {{ic|wlp3s0}} is the available wireless interface. If you are unsure, your wireless interface is likely to start with the letter "w", and unlikely to be "lo" or start with the letter "e". <br />
<br />
{{Note|If you do not see output similar to this, then your wireless driver has not been loaded. If this is the case, you must load the driver yourself. Please see [[Wireless network configuration]] for more detailed information.}}<br />
<br />
Now use [[netctl]]'s {{ic|wifi-menu}} to connect to a network:<br />
<br />
# wifi-menu wlp3s0<br />
<br />
You should now have a working network connection. If you do not, try [[#Without wifi-menu]] or check the detailed [[Wireless network configuration]] page.<br />
<br />
===== Without wifi-menu =====<br />
<br />
Bring the interface up with:<br />
<br />
# ip link set wlp3s0 up<br />
<br />
To verify that the interface is up, inspect the output of the following command:<br />
<br />
{{hc|# ip link show wlp3s0|<br />
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000<br />
link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff<br />
}}<br />
<br />
The {{ic|UP}} in {{ic|<BROADCAST,MULTICAST,UP,LOWER_UP>}} is what indicates the interface is up, not the later {{ic|state DOWN}}.<br />
<br />
Most wireless chipsets require firmware in addition to a corresponding driver. The kernel tries to identify and load both automatically. If you get output like {{ic|SIOCSIFFLAGS: No such file or directory}}, this means you will need to manually load the firmware. If unsure, invoke {{ic|dmesg}} to query the kernel log for a firmware request from the wireless chipset. For example, if you have an Intel chipset which requires and has requested firmware from the kernel at boot:<br />
<br />
{{hc|<nowiki># dmesg | grep firmware</nowiki>|<br />
firmware: requesting iwlwifi-5000-1.ucode<br />
}}<br />
<br />
If there is no output, it may be concluded that the system's wireless chipset does not require firmware.<br />
<br />
{{Warning|Wireless chipset firmware packages (for cards which require them) are pre-installed under {{ic|/usr/lib/firmware}} in the live environment (on CD/USB stick) '''but must be explicitly installed to your actual system to provide wireless functionality after you reboot into it!''' Package installation is covered later in this guide. Ensure installation of both your wireless module and firmware before rebooting! See [[Wireless network configuration]] if you are unsure about the requirement of corresponding firmware installation for your particular chipset.}}<br />
<br />
Next, scan for available networks using {{ic|iw dev wlp3s0 scan <nowiki>|</nowiki> grep SSID}}, then connect to a network with:<br />
<br />
# wpa_supplicant -B -i wlp3s0 -c <(wpa_passphrase "''ssid''" "''psk''")<br />
<br />
You need to replace ''ssid'' with the name of your network (e.g. "Linksys etc...") and ''psk'' with your wireless password, '''leaving the quotes around the network name and password'''.<br />
<br />
Finally, you have to give your interface an IP address. This can be set manually or using dhcp:<br />
<br />
# dhcpcd wlp3s0<br />
<br />
If that does not work, issue the following commands:<br />
<br />
# echo 'ctrl_interface=DIR=/run/wpa_supplicant' > /etc/wpa_supplicant.conf<br />
# wpa_passphrase ''ssid'' ''passphrase'' >> /etc/wpa_supplicant.conf<br />
# ip link set ''interface'' up<br />
# wpa_supplicant -B -D nl80211 -c /etc/wpa_supplicant.conf -i ''interface''<br />
# dhcpcd -A ''interface''<br />
<br />
Setting the interface up at step 3 may not be needed, but does no harm in any case.<br />
<br />
If ''wpa_supplicant'' complains about an unsupported driver at step 4, just leave out the {{ic|-D nl80211}} parameter:<br />
<br />
# wpa_supplicant -B -c /etc/wpa_supplicant.conf -i ''interface''<br />
<br />
==== Analog modem, ISDN, or PPPoE DSL ====<br />
<br />
For xDSL, dial-up, and ISDN connections, see [[Direct Modem Connection]].<br />
<br />
==== Behind a proxy server ====<br />
<br />
If you are behind a proxy server, you will need to export the {{ic|http_proxy}} and {{ic|ftp_proxy}} environment variables. See [[Proxy settings]] for more information.<br />
<br />
=== Prepare the storage drive ===<br />
<br />
{{Warning|Partitioning can destroy data. You are '''strongly''' cautioned and advised to backup any critical data before proceeding.}}<br />
{{Note|If you are installing to a USB flash key, see [[Installing Arch Linux on a USB key]].}}<br />
{{Tip|If you want to create any stacked block devices for [[LVM]], [[disk encryption]] or [[RAID]], do it now.}}<br />
<br />
==== Choose a partition table type ====<br />
<br />
{{Note|If Arch and Windows are dual-booting from same disk, then Arch '''should''' follow the same firmware boot mode and partitioning combination used by the installed Windows in the disk. Otherwise Windows will fail to boot. See [[Windows and Arch Dual Boot#Important information]] for details.}}<br />
<br />
You have to choose between [[GUID Partition Table]] (GPT) and [[Master Boot Record]] (MBR), see also [[Partitioning#Choosing between GPT and MBR]].<br />
<br />
* It is recommended to always use GPT for UEFI boot, as some UEFI firmwares do not allow UEFI-MBR boot.<br />
* Some BIOS systems may have issues with GPT. See http://mjg59.dreamwidth.org/8035.html and http://rodsbooks.com/gdisk/bios.html for more info and possible workarounds.<br />
<br />
==== Partitioning tool ====<br />
<br />
Absolute beginners are encouraged to use a graphical partitioning tool. [[GParted]] is a good example, and is [http://gparted.sourceforge.net/livecd.php provided as a live CD]. A drive should first be [[partitioning|partitioned]] and afterwards the partitions should be formatted with a [[File systems|file system]].<br />
<br />
While ''gparted'' may be easier to use, if you just want to create a few partitions on a new disk you can get the job done quickly by just using one of the [[Partitioning#Partitioning tools|fdisk variants]] which are included on the install medium. In the next section short usage instructions for both [[Partitioning#Gdisk usage summary|gdisk]] and [[Partitioning#Fdisk usage summary|fdisk]] follow.<br />
<br />
==== Erase partition table ====<br />
<br />
If you want to start from scratch, and do not intend to keep existing partitions, erase the partition table with the following command. This simplifies creating new partitions and avoids problems with converting disks from MBR to GPT and vice versa.<br />
<br />
# sgdisk --zap-all /dev/sda<br />
<br />
==== Partition scheme ====<br />
<br />
You can decide into how many partitions the disk should be split, and for which directory each partition should be used in the system. The mapping from partitions to directories (frequently called 'mount points') is the [[Partitioning#Partition scheme|Partition scheme]]. The simplest, and not a bad choice, is to make just one huge {{ic|/}} partition. Another popular choice is to have a {{ic|/}} and a {{ic|/home}} partition.<br />
<br />
'''Additional required partitions:'''<br />
* If you have a [[Unified Extensible Firmware Interface|UEFI]] motherboard, you will need to create an extra [[Unified Extensible Firmware Interface#EFI System Partition|EFI System Partition]].<br />
* If you have a BIOS motherboard (or plan on booting in BIOS compatibility mode) and you want to setup GRUB on a GPT-partitioned drive, you will need to create an extra [[GRUB#GUID Partition Table (GPT) specific instructions|BIOS Boot Partition]] of size 1 or 2 MiB and {{ic|EF02}} type code. Syslinux does not need one.<br />
* If you have a requirement for a [[Disk encryption]] of the system itself, this must be reflected in your partition scheme. It is unproblematic to add encrypted folders, containers or home directories after the system is installed.<br />
<br />
See [[Swap]] for details if you wish to set up a swap partition or swap file. A swap file is easier to resize than a partition and can be created at any point after installation, but cannot be used with a Btrfs filesystem.<br />
<br />
If you have already created your partitions, proceed to [[#Create filesystems]]. Otherwise, see the following example.<br />
<br />
==== Example ====<br />
<br />
The Arch Linux install media includes the following partitioning tools: {{ic|fdisk}}, {{ic|gdisk}}, {{ic|cfdisk}}, {{ic|cgdisk}} and {{ic|parted}}.<br />
<br />
{{Tip|Use the {{ic|lsblk}} command to list the hard disks attached to your system, along with the sizes of their existing partitions. This will help you to be confident you are partitioning the right disk. {{ic|lsblk -f}} will show additional information about Labels, UUIDs and filesystem types.}}<br />
<br />
The example system will contain a 15 GB root partition, and a [[Partitioning#/home|home]] partition for the remaining space. Choose either MBR or GPT, as described above. Do not choose both!<br />
<br />
It should be emphasized that partitioning is a personal choice and that this example is only for illustrative purposes. See [[Partitioning]].<br />
<br />
===== Using cgdisk to create GPT partitions =====<br />
<br />
Launch ''cgdisk'' with:<br />
<br />
# cgdisk /dev/sda<br />
<br />
{{Tip|If cgdisk cannot change your disk to GPT, {{pkg|parted}} can.}}<br />
<br />
'''Root:'''<br />
* Choose ''New'' (or press {{ic|N}}) – {{ic|Enter}} for the first sector (2048) – type in {{ic|15G}} – {{ic|Enter}} for the default hex code (8300) – {{ic|Enter}} for a blank partition name.<br />
<br />
'''Home:'''<br />
* Press the down arrow a couple of times to move to the larger free space area.<br />
* Choose ''New'' (or press {{ic|N}}) – {{ic|Enter}} for the first sector – {{ic|Enter}} to use the rest of the drive (or you could type in the desired size; for example {{ic|30G}}) – {{ic|Enter}} for the default hex code (8300) – {{ic|Enter}} for a blank partition name.<br />
<br />
Here is what it should look like:<br />
<br />
Part. # Size Partition Type Partition Name<br />
----------------------------------------------------------------<br />
1007.0 KiB free space<br />
1 15.0 GiB Linux filesystem<br />
2 123.45 GiB Linux filesystem<br />
<br />
Double check and make sure that you are happy with the partition sizes as well as the partition table layout before continuing.<br />
<br />
If you would like to start over, you can simply select ''Quit'' (or press {{ic|Q}}) to exit without saving changes and then restart ''cgdisk''.<br />
<br />
If you are satisfied, choose ''Write'' (or press {{ic|Shift+W}}) to finalize and to write the partition table to the drive. Type {{ic|yes}} and choose ''Quit'' (or press {{ic|Q}}) to exit without making any more changes.<br />
<br />
===== Using fdisk to create MBR partitions =====<br />
<br />
{{Note|There is also ''cfdisk'', which is similar in UI to ''cgdisk'', but it currently does not automatically align the first partition properly. That is why the classic ''fdisk'' tool is used here.}}<br />
<br />
Launch ''fdisk'' with:<br />
<br />
# fdisk /dev/sda<br />
<br />
Create the partition table:<br />
<br />
* {{ic|Command (m for help):}} type {{ic|o}} and press {{ic|Enter}}<br />
<br />
Then create the first partition:<br />
<br />
# {{ic|Command (m for help):}} type {{ic|n}} and press {{ic|Enter}}<br />
# Partition type: {{ic|Select (default p):}} press {{ic|Enter}}<br />
# {{ic|Partition number (1-4, default 1):}} press {{ic|Enter}}<br />
# {{ic|First sector (2048-209715199, default 2048):}} press {{ic|Enter}}<br />
# {{ic|Last sector, +sectors or +size{K,M,G,T,P} (2048-209715199....., default 209715199):}} type {{ic|+15G}} and press {{ic|Enter}}<br />
<br />
Then create a second partition:<br />
<br />
# {{ic|Command (m for help):}} type {{ic|n}} and press {{ic|Enter}}<br />
# Partition type: {{ic|Select (default p):}} press {{ic|Enter}}<br />
# {{ic|Partition number (1-4, default 2):}} press {{ic|Enter}}<br />
# {{ic|First sector (31459328-209715199, default 31459328):}} press {{ic|Enter}}<br />
# {{ic|Last sector, +sectors or +size{K,M,G,T,P} (31459328-209715199....., default 209715199):}} press {{ic|Enter}}<br />
<br />
Now preview the new partition table:<br />
<br />
* {{ic|Command (m for help):}} type {{ic|p}} and press {{ic|Enter}}<br />
<br />
{{bc|<br />
Disk /dev/sda: 107.4 GB, 107374182400 bytes, 209715200 sectors<br />
Units &#61; sectors of 1 * 512 &#61; 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disk identifier: 0x5698d902<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sda1 2048 31459327 15728640 83 Linux<br />
/dev/sda2 31459328 209715199 89127936 83 Linux<br />
}}<br />
<br />
Then write the changes to disk:<br />
<br />
* {{ic|Command (m for help):}} type {{ic|w}} and press {{ic|Enter}}<br />
<br />
If everything went well fdisk will now quit with the following message:<br />
<br />
{{bc|<br />
The partition table has been altered!<br />
<br />
Calling ioctl() to re-read partition table.<br />
Syncing disks. <br />
}}<br />
<br />
In case this does not work because ''fdisk'' encountered an error, you can use the {{ic|q}} command to exit.<br />
<br />
==== Create filesystems ====<br />
<br />
Simply partitioning is not enough; the partitions also need a [[File systems|filesystem]]. To format the partitions with an ext4 filesystem:<br />
<br />
{{Warning|Double check and triple check that it is actually {{ic|/dev/sda1}} and {{ic|/dev/sda2}} that you want to format. You can use {{ic|lsblk}} to help with this.}}<br />
<br />
# mkfs.ext4 /dev/sda1<br />
# mkfs.ext4 /dev/sda2<br />
<br />
If you have made a partition dedicated to swap (code 82), do not forget to format and activate it with:<br />
<br />
# mkswap /dev/sda''X''<br />
# swapon /dev/sda''X''<br />
<br />
For UEFI, you should format the EFI System Partition (for example /dev/sd''XY'') with:<br />
<br />
# mkfs.fat -F32 /dev/sd''XY''<br />
<br />
{{Note|If you plan to use [[GRUB]] on a BIOS system using a [[GUID Partition Table]], please note that the [[GRUB#GUID Partition Table (GPT) specific instructions|BIOS Boot Partition]] has nothing to do with the {{ic|/boot}} mountpoint. It will be used by GRUB directly. Do not create a filesystem on it, and do not mount it anywhere in the next step.}}<br />
<br />
=== Mount the partitions ===<br />
<br />
Each partition is identified with a number suffix. For example, {{ic|sda1}} specifies the first partition of the first drive, while {{ic|sda}} designates the entire drive.<br />
<br />
To display the current partition layout:<br />
<br />
# lsblk -f<br />
<br />
{{Note|Do not mount more than one partition to the same directory. And pay attention, because the mounting order is important.}}<br />
<br />
First, mount the root partition on {{ic|/mnt}}. Following the example above (yours may be different), it would be:<br />
<br />
# mount /dev/sda1 /mnt<br />
<br />
Then mount the home partition and any other separate partition ({{ic|/boot}}, {{ic|/var}}, etc), if you have any:<br />
<br />
# mkdir /mnt/home<br />
# mount /dev/sda2 /mnt/home<br />
<br />
In case you have a UEFI motherboard, mount the EFI System Partition to {{ic|/boot}}. Whilst other mountpoints are viable, using {{ic|/boot}} is recommended as explained in the [[EFISTUB]] article.<br />
<br />
# mkdir /mnt/boot<br />
# mount /dev/sd''XY'' /mnt/boot<br />
<br />
=== Select a mirror ===<br />
<br />
You may want to edit the {{ic|mirrorlist}} file and place your preferred mirror first. A copy of this file will be installed on your new system by {{ic|pacstrap}} as well, so it is worth getting it right.<br />
<br />
{{hc|# nano /etc/pacman.d/mirrorlist|<br />
##<br />
## Arch Linux repository mirrorlist<br />
## Sorted by mirror score from mirror status page<br />
## Generated on YYYY-MM-DD<br />
##<br />
<br />
<nowiki>Server = http://mirror.example.xyz/archlinux/$repo/os/$arch</nowiki><br />
...}}<br />
<br />
If you want, you can make it the ''only'' mirror available by deleting all other lines, but it is usually a good idea to have a few more, in case the first one goes offline.<br />
<br />
{{Tip|<br />
* Use the [https://www.archlinux.org/mirrorlist/ Mirrorlist Generator] to get an updated list for your country. HTTP mirrors are faster than FTP, because of something called [[Wikipedia:Keepalive|keepalive]]. With FTP, ''pacman'' has to send out a signal each time it downloads a package, resulting in a brief pause. For other ways to generate a mirror list, see [[Mirrors#Sorting mirrors|Sorting mirrors]] and [[Reflector]].<br />
* [https://archlinux.org/mirrors/status/ Arch Linux MirrorStatus] reports various aspects about the mirrors such as network problems with mirrors, data collection problems, the last time mirrors have been synced, etc.<br />
}}<br />
<br />
{{Note|<br />
* Whenever in the future you change your mirrorlist, refresh all package lists with {{ic|pacman -Syy}}, to ensure that the package lists are updated consistently. See [[Mirrors]] for more information.<br />
* If you are using an older installation medium, your mirrorlist might be outdated, which might lead to problems when updating Arch Linux (see {{Bug|22510}}). Therefore it is advised to obtain the latest mirror information as described above.<br />
* Some issues have been reported in the [https://bbs.archlinux.org/ Arch Linux forums] regarding network problems that prevent ''pacman'' from updating/synchronizing repositories (see [https://bbs.archlinux.org/viewtopic.php?id&#61;68944] and [https://bbs.archlinux.org/viewtopic.php?id&#61;65728]). When installing Arch Linux natively, these issues have been resolved by replacing the default ''pacman'' file downloader with an alternative (see [[Improve pacman performance]] for more details). When installing Arch Linux as a guest OS in [[VirtualBox]], this issue has also been addressed by using "Host interface" instead of "NAT" in the machine properties.<br />
}}<br />
<br />
=== Install the base system ===<br />
<br />
The base system is installed using the ''pacstrap'' script. The {{ic|-i}} switch can be omitted if you wish to install every package from the {{Grp|base}} group without prompting. You may also want to include {{Grp|base-devel}}, as you will need these packages should you want to build packages from the [[AUR]] or using the [[ABS]]:<br />
<br />
# pacstrap -i /mnt base base-devel<br />
<br />
{{Note|<br />
* If ''pacstrap'' hangs with {{ic|error: failed retrieving file 'core.db' from mirror... : Connection time-out}}, yet your mirrors are configured correctly, try setting a different [[Resolv.conf|name server]].<br />
* If in the middle of the installation of base packages you get a request to import a PGP key, agree to download the key to proceed. This is likely to happen if the Arch ISO you are using is out of date. If you are unable to add the PGP key successfully, try upgrading the package {{Pkg|archlinux-keyring}} as follows: {{ic|pacman -S archlinux-keyring}}<br />
* If ''pacman'' fails to verify your packages, stop the process with {{ic|Ctrl+C}} and check the system time with {{ic|cal}}. If the system date is invalid (e.g. it shows the year 2010), signing keys will be considered expired (or invalid), signature checks on packages will fail and installation will be interrupted. Make sure to correct the system time, using the command {{ic|ntpd -qg}}, and retry running the ''pacstrap'' command. Refer to [[Time]] page for more information on correcting system time.<br />
* If ''pacman'' complains that {{ic|error: failed to commit transaction (invalid or corrupted package)}}, run the following command:<br />
# pacman-key --init && pacman-key --populate archlinux<br />
}}<br />
<br />
This will give you a basic Arch system. Other packages can be installed later using [[pacman]].<br />
<br />
=== Generate an fstab ===<br />
<br />
Generate an [[fstab]] file with the following command. UUIDs will be used because they have certain advantages (see [[fstab#Identifying filesystems]]). If you would prefer to use labels instead, replace the {{ic|-U}} option with {{ic|-L}}:<br />
<br />
# genfstab -U -p /mnt >> /mnt/etc/fstab<br />
# nano /mnt/etc/fstab<br />
<br />
{{Warning|The {{ic|fstab}} file should always be checked after generating it. If you encounter errors running ''genfstab'' or later in the install process, do '''not''' run ''genfstab'' again; just edit the {{ic|fstab}} file.}}<br />
<br />
A few considerations:<br />
<br />
* The last field determines the order in which partitions are checked at start up: use {{ic|1}} for the (non-Btrfs) root partition, which should be checked first; {{ic|2}} for all other partitions you want checked at start up; and {{ic|0}} means 'do not check' (see [[fstab#Field definitions]]).<br />
* All [[Btrfs]] partitions should have {{ic|0}} for this field. Normally, you will also want your ''swap'' partition to have {{ic|0}}.<br />
<br />
=== Chroot and configure the base system ===<br />
<br />
Next, [[Change root|chroot]] into your newly installed system:<br />
<br />
# arch-chroot /mnt /bin/bash<br />
<br />
{{Note|Leave out {{ic|/bin/bash}} to chroot into the sh shell.}}<br />
<br />
At this stage of the installation, you will configure the primary configuration files of your Arch Linux base system. These can either be created if they do not exist, or edited if you wish to change the defaults.<br />
<br />
Closely following and understanding these steps is of key importance to ensure a properly configured system.<br />
<br />
==== Locale ====<br />
<br />
Locales are used by {{Pkg|glibc}} and other locale-aware programs or libraries for rendering text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards. These values are defined in {{ic|locale.gen}} and {{ic|locale.conf}}.<br />
<br />
The {{ic|locale.gen}} file has everything commented out by default. To uncomment a line remove the {{ic|#}} in front. {{ic|UTF-8}} is highly recommended over {{ic|ISO-8859}}. <br />
<br />
Uncomment {{ic|en_US.UTF-8 UTF-8}} as well as other localisations users might need:<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
...<br />
#en_SG ISO-8859-1<br />
en_US.UTF-8 UTF-8<br />
#en_US ISO-8859-1<br />
...<br />
}}<br />
<br />
Generate the locale(s) specified in {{ic|/etc/locale.gen}}:<br />
<br />
# locale-gen<br />
<br />
{{Note|This command also runs with every update of {{Pkg|glibc}}.}}<br />
<br />
Create the {{ic|/etc/locale.conf}} file substituting your chosen locale:<br />
<br />
{{Tip|Setting {{ic|en_US.UTF-8}} as the system-wide locale allows to keep system logs in English for easier troubleshooting. Users can override this setting for their environment as required; see [[Locale#Per user]] for details.}}<br />
<br />
# echo LANG=en_US.UTF-8 > /etc/locale.conf<br />
<br />
{{Note|<br />
* The locale specified in the {{ic|LANG}} variable must be uncommented in {{ic|/etc/locale.gen}}.<br />
* The {{ic|locale.conf}} file does not exist by default. Setting only {{ic|LANG}} should be enough as it will act as the default value for all other variables.<br />
}}<br />
<br />
Export substituting your chosen locale:<br />
<br />
# export LANG=en_US.UTF-8<br />
<br />
{{Tip|To use other locales for other {{ic|LC_*}} variables, run {{ic|locale}} to see the available options and add them to {{ic|locale.conf}}. It is not recommended to set the {{ic|LC_ALL}} variable. See [[Locale]] for details.}}<br />
<br />
==== Console font and keymap ====<br />
<br />
If you changed the default console keymap and font in [[#Change the language]], you will have to edit {{ic|/etc/vconsole.conf}} ''accordingly'' (create it if it does not exist) to make those changes persist in the installed system, for example:<br />
<br />
{{hc|# nano /etc/vconsole.conf|2=<br />
KEYMAP=de-latin1<br />
FONT=lat9w-16<br />
}}<br />
<br />
{{Warning|If you set {{ic|KEYMAP}} to a different value than the one you initially set with ''loadkeys'', and then you [[#Set the root password]], you may have problems logging into the new system after rebooting, because some keys may be mapped differently between the two layouts.}}<br />
<br />
Note that these settings are only valid for your virtual consoles, not in [[Xorg]]. See [[Fonts#Console fonts]] for more information.<br />
<br />
==== Time zone ====<br />
<br />
Available time zones and subzones can be found in the {{ic|/usr/share/zoneinfo/''Zone''/''SubZone''}} directories.<br />
<br />
To view the available zones, check the directory {{ic|/usr/share/zoneinfo/}}:<br />
<br />
# ls /usr/share/zoneinfo/<br />
<br />
Similarly, you can check the contents of directories belonging to a subzone:<br />
<br />
# ls /usr/share/zoneinfo/Europe<br />
<br />
Create a symbolic link {{ic|/etc/localtime}} to your subzone file {{ic|/usr/share/zoneinfo/''Zone''/''SubZone''}} using this command:<br />
<br />
# ln -s /usr/share/zoneinfo/''Zone''/''SubZone'' /etc/localtime<br />
<br />
'''Example:'''<br />
<br />
# ln -s /usr/share/zoneinfo/Europe/Minsk /etc/localtime<br />
<br />
{{Note|If you get {{ic|ln: failed to create symbolic link '/etc/localtime': File exists}}, check the existing file with {{ic|ls -l /etc/localtime}} and add the {{ic|-f}} option to the ''ln'' command to overwrite it.}}<br />
<br />
==== Hardware clock ====<br />
<br />
Set the hardware clock mode uniformly between your operating systems. Otherwise, they may overwrite the hardware clock and cause time shifts.<br />
<br />
You can generate {{ic|/etc/adjtime}} automatically by using one of the following commands:<br />
<br />
* '''UTC''' (recommended): {{Note|Using [[Wikipedia:Coordinated Universal Time|UTC]] for the hardware clock does not mean that software will display time in UTC.}} {{bc|# hwclock --systohc --utc}}<br />
* '''localtime''' (discouraged; used by default in Windows): {{Warning|Using ''localtime'' may lead to several known and unfixable bugs. However, there are no plans to drop support for ''localtime''.}} {{bc|# hwclock --systohc --localtime}}<br />
<br />
==== Kernel modules ====<br />
<br />
{{Tip|This is just an example, you do not need to set it. All needed modules are automatically loaded by udev, so you will rarely need to add something here. Only add modules that you know are missing.}}<br />
<br />
For kernel modules to load during boot, place a {{ic|*.conf}} file in {{ic|/etc/modules-load.d/}}, with a name based on the program that uses them:<br />
<br />
{{hc|# nano /etc/modules-load.d/virtio-net.conf|<br />
# Load 'virtio-net.ko' at boot.<br />
<br />
virtio-net<br />
}}<br />
<br />
If there are more modules to load per {{ic|*.conf}}, the module names can be separated by newlines. A good example are the [[VirtualBox#Installation steps for Arch Linux guests|VirtualBox Guest Additions]].<br />
<br />
Empty lines and lines starting with {{ic|#}} or {{ic|;}} are ignored.<br />
<br />
==== Hostname ====<br />
<br />
Set the [[Wikipedia:Hostname|hostname]] to your liking (e.g. ''arch''):<br />
<br />
# echo ''myhostname'' > /etc/hostname<br />
<br />
Add the same hostname to {{ic|/etc/hosts}}:<br />
<br />
{{hc|# nano /etc/hosts|<br />
#<br />
# /etc/hosts: static lookup table for host names<br />
#<br />
<br />
#<ip-address> <hostname.domain.org> <hostname><br />
127.0.0.1 localhost.localdomain localhost<br />
127.0.1.1 ''myhostname''.localdomain ''myhostname'' <br />
::1 localhost.localdomain localhost<br />
<br />
# End of file<br />
}}<br />
{{Note|For a system with a permanent IP address, that permanent IP address should be used here instead of {{ic|127.0.1.1}}}}<br />
<br />
=== Configure the network ===<br />
<br />
You need to configure the network again, but this time for your newly installed environment. The procedure and prerequisites are very similar to the one described [[#Establish an internet connection|above]], except we are going to make it persistent and automatically run at boot.<br />
<br />
As a first step, identify the network interface name you want to configure the connection for with {{ic|ip link}}. <br />
<br />
{{Note|<br />
* For more in-depth information on network configration, visit [[Network configuration]] and [[Wireless network configuration]].<br />
* If you would like to use the old interface naming scheme (ie. eth* and wlan*) you can accomplish this by creating an empty file at {{ic|/etc/udev/rules.d/80-net-setup-link.rules}} which will mask the file of the same name located under {{ic|/usr/lib/udev/rules.d}}.<br />
}}<br />
<br />
==== Wired ====<br />
<br />
===== Dynamic IP =====<br />
<br />
; Using dhcpcd<br />
<br />
If you only use a single fixed wired network connection, you do not need a network management service and can simply enable the {{ic|dhcpcd}} service for the interface:<br />
<br />
# systemctl enable dhcpcd@''interface_name''.service<br />
<br />
; Using netctl<br />
<br />
Copy a sample profile from {{ic|/etc/netctl/examples}} to {{ic|/etc/netctl}}:<br />
<br />
# cd /etc/netctl<br />
# cp examples/ethernet-dhcp my_network<br />
<br />
Edit the profile as needed (update {{ic|Interface}} from {{ic|eth0}} to the interface name of the system. <br />
# nano my_network<br />
<br />
Enable the {{ic|my_network}} profile:<br />
<br />
# netctl enable my_network<br />
<br />
{{Note|You will get the message "Running in chroot, ignoring request.". This can be ignored for now.}}<br />
<br />
; Using netctl-ifplugd<br />
<br />
{{Warning|You cannot use this method in conjunction with explicitly enabling profiles, such as {{ic|netctl enable ''profile''}}.}}<br />
<br />
Alternatively, you can use {{ic|netctl-ifplugd}}, which gracefully handles dynamic connections to new networks.<br />
<br />
Install {{Pkg|ifplugd}}, which is required for {{ic|netctl-ifplugd}}:<br />
<br />
# pacman -S ifplugd<br />
<br />
Then enable for interface that you want:<br />
<br />
# systemctl enable netctl-ifplugd@''interface''.service<br />
<br />
{{Tip|[[netctl]] also provides {{ic|netctl-auto}}, which can be used to handle wired profiles in conjunction with {{ic|netctl-ifplugd}}.}}<br />
<br />
===== Static IP =====<br />
<br />
; Using netctl<br />
<br />
Copy a sample profile from {{ic|/etc/netctl/examples}} to {{ic|/etc/netctl}}:<br />
<br />
# cd /etc/netctl<br />
# cp examples/ethernet-static my_network<br />
<br />
Edit the profile as needed (modify {{ic|Interface}}, {{ic|Address}}, {{ic|Gateway}} and {{ic|DNS}}):<br />
<br />
# nano my_network<br />
<br />
For the {{ic|Address}} take care to include the correct netmask (the {{ic|/24}} in the sample profile equates to a netmask of {{ic|255.255.255.0}}) or the profile will fail to start. See also [[wikipedia:Classless Inter-Domain Routing#CIDR notation|CIDR notation]].<br />
<br />
Enable above created profile to start it at every boot:<br />
<br />
# netctl enable my_network<br />
<br />
; Using systemd-networkd<br />
<br />
See [[systemd-networkd]].<br />
<br />
==== Wireless ====<br />
<br />
{{Note|If your wireless adapter requires a firmware (as described in the above [[#Wireless|Establish an internet connection]] section and also in the article [[Wireless network configuration#Device driver]]), install the package containing your firmware. Most of the time, the {{Pkg|linux-firmware}} package will contain the needed firmware. Though for some devices, the required firmware might be in its own package. For example:<br />
{{bc|# pacman -S zd1211-firmware}}<br />
See [[Wireless network configuration#Installing driver/firmware]] for more info.}}<br />
<br />
Install {{Pkg|iw}} and {{Pkg|wpa_supplicant}} which you will need to connect to a network:<br />
<br />
# pacman -S iw wpa_supplicant<br />
<br />
===== Adding wireless networks =====<br />
<br />
; Using wifi-menu<br />
<br />
Install {{Pkg|dialog}}, which is required for {{ic|wifi-menu}}:<br />
<br />
# pacman -S dialog<br />
<br />
After finishing the rest of this installation and rebooting, you can connect to the network with {{ic|wifi-menu ''interface_name''}} (where {{ic|''interface_name''}} is the interface of your wireless chipset).<br />
<br />
# wifi-menu ''interface_name''<br />
<br />
{{Warning|This must be done '''after''' your reboot when you are no longer chrooted. The process spawned by this command will conflict with the one you have running outside of the chroot. Alternatively, you could just configure a network profile manually using the following templates so that you do not have to worry about using {{ic|wifi-menu}} at all.}}<br />
<br />
; Using manual netctl profiles<br />
<br />
Copy a network profile from {{ic|/etc/netctl/examples}} to {{ic|/etc/netctl}}:<br />
<br />
# cd /etc/netctl<br />
# cp examples/wireless-wpa my-network<br />
<br />
Edit the profile as needed (modify {{ic|Interface}}, {{ic|ESSID}} and {{ic|Key}}):<br />
<br />
# nano my-network<br />
<br />
Enable above created profile to start it at every boot:<br />
<br />
# netctl enable my-network<br />
<br />
===== Connect automatically to known networks =====<br />
<br />
{{Warning|You cannot use this method in conjunction with explicitly enabling profiles, such as {{ic|netctl enable ''profile''}}.}}<br />
<br />
Install {{Pkg|wpa_actiond}}, which is required for {{ic|netctl-auto}}:<br />
<br />
# pacman -S wpa_actiond<br />
<br />
Enable the {{ic|netctl-auto}} service, which will connect to known networks and gracefully handle roaming and disconnects:<br />
<br />
# systemctl enable netctl-auto@''interface_name''.service<br />
<br />
{{Tip|[[netctl]] also provides {{ic|netctl-ifplugd}}, which can be used to handle wired profiles in conjunction with {{ic|netctl-auto}}.}}<br />
<br />
==== Analog modem, ISDN or PPPoE DSL ====<br />
<br />
For xDSL, dial-up and ISDN connections, see [[Direct Modem Connection]].<br />
<br />
=== Create an initial ramdisk environment ===<br />
<br />
{{Tip|Most users can skip this step and use the defaults provided in {{ic|mkinitcpio.conf}}. The initramfs image (from the {{ic|/boot}} folder) has already been generated based on this file when the {{Pkg|linux}} package (the Linux kernel) was installed earlier with ''pacstrap''.}}<br />
<br />
Here you need to set the right [[Mkinitcpio#HOOKS|hooks]] if the root is on a USB drive, if you use RAID, LVM, if using a multi-device Btrfs volumes as root, or if {{ic|/usr}} is on a separate partition.<br />
<br />
Edit {{ic|/etc/mkinitcpio.conf}} as needed and re-generate the initramfs image with:<br />
<br />
# mkinitcpio -p linux<br />
<br />
{{Note|Arch VPS installations on QEMU (e.g. when using {{ic|virt-manager}}) may need {{ic|virtio}} modules in {{ic|mkinitcpio.conf}} to be able to boot.<br />
{{hc|# nano /etc/mkinitcpio.conf|2=<br />
MODULES="virtio virtio_blk virtio_pci virtio_net"<br />
}}<br />
}}<br />
<br />
=== Set the root password ===<br />
<br />
Set the root password with:<br />
<br />
# passwd<br />
<br />
=== Install and configure a bootloader ===<br />
<br />
If you have an Intel CPU (on AMD it is automatic) you might want to [[Microcode#Enabling Intel Microcode Updates|configure your bootloader to setup microcode updates]].<br />
<br />
==== For BIOS motherboards ====<br />
<br />
For BIOS systems, several boot loaders are available, see [[Boot loaders]] for a complete list. Choose one as per your convenience. Here, two of the possibilities are given as examples:<br />
<br />
* [[Syslinux]] is (currently) limited to loading only files from the partition where it was installed. Its configuration file is considered to be easier to understand. An example configuration can be found in the [[Syslinux#Examples|syslinux]] article.<br />
* [[GRUB]] is more feature-rich and supports more complex scenarios. Its configuration file(s) is more similar to 'sh' scripting language, which may be difficult for beginners to manually write. It is recommended that they automatically generate one.<br />
<br />
===== Syslinux =====<br />
<br />
If you opted for a GUID partition table (GPT) for your hard drive earlier, you need to install the {{Pkg|gptfdisk}} package now for the installation of ''syslinux'' to work:<br />
<br />
# pacman -S gptfdisk<br />
<br />
Install the {{Pkg|syslinux}} package and then use the {{ic|syslinux-install_update}} script to automatically ''install'' the bootloader ({{ic|-i}}), mark the partition ''active'' by setting the boot flag ({{ic|-a}}), and install the ''MBR'' boot code ({{ic|-m}}):<br />
<br />
# pacman -S syslinux<br />
# syslinux-install_update -iam<br />
<br />
After installing Syslinux, configure {{ic|syslinux.cfg}} to point to the right root partition. This step is vital. If it points to the wrong partition, Arch Linux will not boot. Change {{ic|/dev/sda3}} to reflect your root partition (if you partitioned your drive as in [[#Prepare the storage drive|the example]], your root partition is {{ic|/dev/sda1}}).<br />
<br />
{{hc|# nano /boot/syslinux/syslinux.cfg|2=<br />
...<br />
LABEL arch<br />
...<br />
APPEND root='''/dev/sda3''' rw<br />
...<br />
LABEL archfallback<br />
...<br />
APPEND root='''/dev/sda3''' rw<br />
...<br />
}}<br />
<br />
If adding [[UUID]] rather than partition number the syntax is {{ic|1=APPEND root=UUID=''partition_uuid'' rw}}.<br />
<br />
For more information on configuring and using Syslinux, see [[Syslinux]].<br />
<br />
===== GRUB =====<br />
<br />
Install the {{Pkg|grub}} package and then run {{ic|grub-install}} to install the bootloader:<br />
<br />
# pacman -S grub<br />
# grub-install --target=i386-pc --recheck '''/dev/sda'''<br />
<br />
{{Note|<br />
* Change {{ic|/dev/sda}} to reflect the drive you installed Arch on. Do not append a partition number (do not use {{ic|sda''X''}}).<br />
* For GPT-partitioned drives on BIOS motherboards, you also need a "BIOS Boot Partition". See [[GRUB#GUID Partition Table (GPT) specific instructions|GPT-specific instructions]] in the GRUB page.<br />
* A sample {{ic|/boot/grub/grub.cfg}} gets installed as part of the {{Pkg|grub}} package, and subsequent {{ic|grub-*}} commands may not over-write it. Ensure that your intended changes are in {{ic|grub.cfg}}, rather than in {{ic|grub.cfg.new}} or some such file.<br />
}}<br />
<br />
While using a manually created {{ic|grub.cfg}} is absolutely fine, it is recommended that beginners automatically generate one:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} ({{ic|pacman -S os-prober}}) before running the next command.}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
==== For UEFI motherboards ====<br />
<br />
{{Note|Some UEFI firmware requires that the bootable {{ic|.efi}} stub of the installed bootloader have a specific name and be placed in a specific location: {{ic|$esp/EFI/boot/bootx64.efi}} (where {{ic|$esp}} is the EFI System Partition mountpoint). Failure to do so in such instances will result in an unbootable installation. This is detailed for each boot loader, in their respective sections below.}}<br />
<br />
For UEFI systems, several boot loaders are available, see [[Boot loaders]] for a complete list. Choose one as per your convenience. Here, two of the possibilities are given as examples:<br />
<br />
* [[gummiboot]] is a minimal UEFI Boot Manager which provides a menu for [[EFISTUB]] kernels and other UEFI applications. This is recommended for beginners, especially those wishing to dual-boot with other installed operating systems such as Windows 8.<br />
* [[GRUB]] is a more complete bootloader, useful if you run into problems with Gummiboot.<br />
<br />
Irrespective of the choice, first install {{Pkg|dosfstools}} to manipulate the EFI System Partition post-installation, and {{Pkg|efibootmgr}} to create bootable {{ic|.efi}} stubs (used by bootmanager installation scripts): <br />
<br />
# pacman -S dosfstools efibootmgr<br />
<br />
{{Note|For UEFI boot, the drive needs to be GPT-partitioned and an [[Unified Extensible Firmware Interface#EFI System Partition|EFI System Partition]] (512 MiB or larger, gdisk type {{ic|EF00}}, formatted with FAT32) must be present. In the following examples, this partition is assumed to be mounted at {{ic|/boot}}. If you have followed this guide from the beginning, you have already done all of these.}}<br />
<br />
===== Gummiboot =====<br />
<br />
{{Note|It is strongly recommended to have the EFI System Partition mounted at {{ic|/boot}} as this is required to automatically update Gummiboot.}}<br />
<br />
Install the {{Pkg|gummiboot}} package and run the automated installation script, replacing {{ic|'''$esp'''}} with the location of your EFI System Partiton, usually {{ic|/boot}}:<br />
<br />
# pacman -S gummiboot<br />
# gummiboot --path='''$esp''' install<br />
<br />
Gummiboot will automatically be detected by firmware that requires that the bootable {{ic|bootx64.efi}} stub be placed in {{ic|'''$esp'''/EFI/boot}}, and will in turn automatically detect the presence of any other installed operating systems using {{ic|.efi}} stubs. However, it will still be necessary to manually create a configuration file for Gummiboot.<br />
<br />
First, create {{ic|'''$esp'''/loader/entries/arch.conf}} and add the following, replacing {{ic|/dev/sdaX}} with your '''root''' partition (e.g. {{ic|/dev/sda1}}):<br />
<br />
{{hc|# nano '''$esp'''/loader/entries/arch.conf|2=<br />
title Arch Linux<br />
linux /vmlinuz-linux<br />
initrd /initramfs-linux.img<br />
options root='''/dev/sdaX''' rw<br />
}}<br />
<br />
Second, create {{ic|'''$esp'''/loader/loader.conf}} and add the following, replacing the timeout value (in seconds) with your own choice:<br />
{{hc|# nano '''$esp'''/loader/loader.conf|2=<br />
default arch<br />
timeout 5<br />
}}<br />
<br />
For more information on configuring and using gummiboot, see [[gummiboot]].<br />
<br />
===== GRUB =====<br />
<br />
{{Note|The Grub installation script will create a bootable {{ic|.efi}} stub called {{ic|grubx64.efi}}, which will not be detected by some UEFI firmware. This guide also assumes (as specified above) that {{Pkg|dosfstools}} and {{Pkg|efibootmgr}} have already been installed. Grub will not automatically detect the presence of other installed UEFI operating systems.}}<br />
<br />
Install {{Pkg|grub}} and run the grub installation script, replacing {{ic|'''$esp'''}} with the location of your EFI System Partiton, usually {{ic|/boot}}:<br />
<br />
# pacman -S grub<br />
# grub-install --target=x86_64-efi --efi-directory='''$esp''' --bootloader-id=arch_grub --recheck<br />
<br />
The bootable {{ic|grubx64.efi}} stub will be located in {{ic|$esp/EFI/arch_grub}}. Where unsure that your firmware will detect this stub - and/or where not intending to use multiple bootloaders - as stated above, it is possible to copy the stub across to the default location and rename it in the process to ensure a bootable installation for most UEFI firmware:<br />
<br />
# mkdir '''$esp'''/EFI/boot<br />
# cp '''$esp'''/EFI/arch_grub/grubx64.efi '''$esp'''/EFI/boot/bootx64.efi<br />
<br />
Next, while using a manually created {{ic|grub.cfg}} is absolutely fine, it is recommended that beginners automatically generate one.<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
For more information on configuring and using GRUB in general, see [[GRUB]].<br />
<br />
=== Unmount the partitions and reboot ===<br />
<br />
Exit from the chroot environment:<br />
<br />
# exit<br />
<br />
{{Note|While partitions are unmounted automatically by ''systemd'' on shutdown, you may do so manually with {{ic|umount -R /mnt}} as a safety measure. If the partition is "busy", you can find the cause with [[Wikipedia:fuser_(Unix)|fuser]].}}<br />
<br />
Reboot the computer:<br />
<br />
# reboot<br />
<br />
{{Tip|Be sure to remove the installation media, otherwise you will boot back into it. You can log into your machine as the user "root" and the password that you specified with the passwd command. The default password is "root". }}<br />
<br />
== Post-installation ==<br />
<br />
Your new Arch Linux base system is now a functional GNU/Linux environment ready to be built into whatever you wish or require for your purposes. You are now ''strongly'' advised to read the [[General recommendations]] article, especially the first two sections. Its other sections provide links to post-installation tutorials like setting up a graphical user interface, sound or a touchpad.<br />
<br />
For a list of applications that may be of interest, see [[List of applications]].</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Liri&diff=315148Liri2014-05-14T20:00:55Z<p>JoshuaBranson: I changed some poorly worded sentences.</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[ja:Hawaii]]<br />
{{Related articles start}}<br />
{{Related|Wayland}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Window manager}}<br />
{{Related|Qt}}<br />
{{Related articles end}}<br />
<br />
From [http://www.phoronix.com/scan.php?page=news_item&px=MTI4ODA phoronix.com]:<br />
:The Hawaii Desktop is looking to be the very first [[Wayland]]-friendly desktop environment for Linux. The Hawaii desktop is the product of the Maui OS team, a Linux distribution that's trying to avoid traditional packages and instead provide a minimal image with the Linux kernel, systemd, ConnMan, and other core components, while being powered by a Wayland desktop.<br />
<br />
{{Note|The hawaii desktop environment has not reached its stable 1.0 release. The latest version is 0.2.0. It may not work properly on your system.}}<br />
<br />
==Installation==<br />
<br />
[[pacman|Install]] {{AUR|hawaii-meta-git}} from the [[AUR]].<br />
<br />
Alternatively, you can use the upstream binary package for hawaii. It is recommended to install the upstream binary from the official Maui site: http://www.maui-project.org/download/<br />
<br />
{{Expansion|Needs a link to a bug report.}}<br />
<br />
The latest details from the upstream site warns that Mesa 10.1 might crash Hawaii. If this happens to you, use the Arch roll back machine to install Mesa 10.0.3. The packages that one needs to downgrade are mesa, mesa-libgl and *-dri (for example intel-dri for Intel GPUs).<br />
<br />
After you have downgraded Mesa and the relevant packages, add those down graded packages to the ignore section in {{Ic|/ect/pacman.conf}}<br />
{{hc|/etc/pacman.conf|2=<br />
IgnorePkg = mesa mesa-libgl intel-dri<br />
}}<br />
<br />
{{Poor writing|Does not comply with [[Help:Style#Package management instructions]].}}<br />
<br />
Add the upstream respository to {{Ic|/etc/pacman.conf}}. <br />
<br />
{{hc|/etc/pacman.conf|2=<br />
Server = http://archive.maui-project.org/archlinux/$repo/os/$arch<br />
SigLevel = Optional TrustAll<br />
}}<br />
<br />
Install hawaii and its dependencies with<br />
{{Ic|pacman -Syu hawaii-meta-git}}<br />
<br />
Install more packages with<br />
<br />
{{Ic|pacman -Syu communi-desktop-git qupzilla-qt5-git sddm-qt5-git}}<br />
<br />
{{Note|If you use this binary package, then the hawaii binary will be stored in {{Ic|/opt/hawaii-git/bin/hawaii}}}}<br />
<br />
{{Note|The current upstream binary package only supports the x86_64 architecture.}}<br />
<br />
== Run hawaii ==<br />
<br />
=== Without login manager ===<br />
To run hawaii without a login manager, add {{Ic|systemctl start hawaii}} to the startup script of your choice. <br />
<br />
{{Note|Do not use ~/.xinitrc to start hawaii. [[Xinit]] is commonly used to start [[Xorg]], but hawaii uses Wayland, which is a newer graphical protocal.}}<br />
<br />
== See also ==<br />
<br />
* http://www.maui-project.org/ Maui Linux OS website<br />
* https://github.com/mauios/hawaii Hawaii's github page</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Liri&diff=313943Liri2014-05-08T14:15:33Z<p>JoshuaBranson: /* Installation */ I included the directions to install Hawaii from the upstream source. I suggested that users should downgrade Mesa.</p>
<hr />
<div><br />
[[Category:Desktop environments]]<br />
[[ja:Hawaii]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Window manager}}<br />
{{Related|Qt}}<br />
{{Related articles end}}<br />
<br />
From phoronix.com <br />
<br />
"...the Hawaii Desktop is looking to be the very first Wayland-friendly desktop environment for Linux. The Hawaii desktop is the product of the Maui OS team, a Linux distribution that's trying to avoid traditional packages and instead provide a minimal image with the Linux kernel, systemd, ConnMan, and other core components, while being powered by a Wayland desktop."<br />
{{Note|The hawaii desktop environment, has not reached its stable 1.0 release. The latest version is 0.2.0. It may not work properly on your system.}}<br />
==Installation==<br />
Ensure {{Pkg|wayland}} and {{Pkg|weston}} are installed from the [[official repositories]].<br />
<br />
[[pacman|Install]] {{AUR|hawaii-meta-git}} from the [[AUR]].<br />
<br />
Alternatively, you can use the upstream binary package for hawaii. It is recommended to install the upstream binary from the official Maui site: http://www.maui-project.org/download/<br />
<br />
The latest details from the upstream site warns that Mesa 10.1 might crash Hawaii. If this happens to you, use the Arch roll back machine to install Mesa 10.0.3. The packages that one needs to downgrade are mesa, mesa-libgl and *-dri (for example intel-dri for Intel GPUs).<br />
<br />
After you have downgraded Mesa and the relevant packages, add those down graded packages to the ignore section in {{Ic|/ect/pacman.conf}}<br />
{{hc|/etc/pacman.conf|2=<br />
IgnorePkg = mesa mesa-libgl intel-dri<br />
}}<br />
<br />
Add the upstream respository to {{Ic|/etc/pacman.conf}}. <br />
<br />
{{hc|/etc/pacman.conf|2=<br />
Server = http://archive.maui-project.org/archlinux/$repo/os/$arch<br />
SigLevel = Optional TrustAll<br />
}}<br />
<br />
Install hawaii and its dependencies with<br />
{{Ic|pacman -Syu hawaii-meta-git}}<br />
<br />
Install more packages with<br />
<br />
{{Ic|pacman -Syu communi-desktop-git qupzilla-qt5-git sddm-qt5-git}}<br />
<br />
<br />
{{Note|If you use this binary package, then the hawaii binary will be stored in {{Ic|/opt/hawaii-git/bin/hawaii}}}}<br />
<br />
{{Note|The current upstream binary package only supports the x86_64 architecture.}}<br />
<br />
== Run hawaii ==<br />
<br />
=== Without login manager ===<br />
To run hawaii without a login manager, add {{Ic|systemctl start hawaii}} to the startup script of your choice. <br />
<br />
{{Note|Do not use ~/.xinitrc to start hawaii. [[Xinit]] is commonly used to start [[Xorg]], but hawaii uses Wayland, which is a newer graphical protocal.}}<br />
<br />
==External Links==<br />
* http://www.maui-project.org/ Maui Linux OS website<br />
* https://github.com/mauios/hawaii Hawaii's github page</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Liri&diff=313942Liri2014-05-08T13:52:03Z<p>JoshuaBranson: /* Without login manager */ I deleted the word simply.</p>
<hr />
<div><br />
[[Category:Desktop environments]]<br />
[[ja:Hawaii]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Window manager}}<br />
{{Related|Qt}}<br />
{{Related articles end}}<br />
<br />
From phoronix.com <br />
<br />
"...the Hawaii Desktop is looking to be the very first Wayland-friendly desktop environment for Linux. The Hawaii desktop is the product of the Maui OS team, a Linux distribution that's trying to avoid traditional packages and instead provide a minimal image with the Linux kernel, systemd, ConnMan, and other core components, while being powered by a Wayland desktop."<br />
{{Note|The hawaii desktop environment, has not reached its stable 1.0 release. The latest version is 0.2.0. It may not work properly on your system.}}<br />
==Installation==<br />
Ensure {{Pkg|wayland}} and {{Pkg|weston}} are installed from the [[official repositories]].<br />
<br />
[[pacman|Install]] {{AUR|hawaii-meta-git}} from the [[AUR]].<br />
<br />
Alternatively, you can use the upstream binary package for hawaii. Click on the tab labeled "Arch Linux" and follow the instructions.<br />
<br />
http://www.maui-project.org/download/<br />
<br />
{{Note|If you use this binary package, then the hawaii binary will be stored in {{Ic|/opt/hawaii-git/bin/hawaii}}}}<br />
<br />
{{Note|The current upstream binary package only supports the x86_64 architecture.}}<br />
<br />
== Run hawaii ==<br />
<br />
=== Without login manager ===<br />
To run hawaii without a login manager, add {{Ic|systemctl start hawaii}} to the startup script of your choice. <br />
<br />
{{Note|Do not use ~/.xinitrc to start hawaii. [[Xinit]] is commonly used to start [[Xorg]], but hawaii uses Wayland, which is a newer graphical protocal.}}<br />
<br />
==External Links==<br />
* http://www.maui-project.org/ Maui Linux OS website<br />
* https://github.com/mauios/hawaii Hawaii's github page</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Liri&diff=313941Liri2014-05-08T13:51:37Z<p>JoshuaBranson: /* Without login manager */ I explained how to start hawaii with systemctl.</p>
<hr />
<div><br />
[[Category:Desktop environments]]<br />
[[ja:Hawaii]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Window manager}}<br />
{{Related|Qt}}<br />
{{Related articles end}}<br />
<br />
From phoronix.com <br />
<br />
"...the Hawaii Desktop is looking to be the very first Wayland-friendly desktop environment for Linux. The Hawaii desktop is the product of the Maui OS team, a Linux distribution that's trying to avoid traditional packages and instead provide a minimal image with the Linux kernel, systemd, ConnMan, and other core components, while being powered by a Wayland desktop."<br />
{{Note|The hawaii desktop environment, has not reached its stable 1.0 release. The latest version is 0.2.0. It may not work properly on your system.}}<br />
==Installation==<br />
Ensure {{Pkg|wayland}} and {{Pkg|weston}} are installed from the [[official repositories]].<br />
<br />
[[pacman|Install]] {{AUR|hawaii-meta-git}} from the [[AUR]].<br />
<br />
Alternatively, you can use the upstream binary package for hawaii. Click on the tab labeled "Arch Linux" and follow the instructions.<br />
<br />
http://www.maui-project.org/download/<br />
<br />
{{Note|If you use this binary package, then the hawaii binary will be stored in {{Ic|/opt/hawaii-git/bin/hawaii}}}}<br />
<br />
{{Note|The current upstream binary package only supports the x86_64 architecture.}}<br />
<br />
== Run hawaii ==<br />
<br />
=== Without login manager ===<br />
To run hawaii without a login manager, simply add {{Ic|systemctl start hawaii}} to the startup script of your choice. <br />
<br />
{{Note|Do not use ~/.xinitrc to start hawaii. [[Xinit]] is commonly used to start [[Xorg]], but hawaii uses Wayland, which is a newer graphical protocal.}}<br />
<br />
==External Links==<br />
* http://www.maui-project.org/ Maui Linux OS website<br />
* https://github.com/mauios/hawaii Hawaii's github page</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Liri&diff=313939Liri2014-05-08T13:35:31Z<p>JoshuaBranson: I capitalized the article title.</p>
<hr />
<div><br />
[[Category:Desktop environments]]<br />
[[ja:Hawaii]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Window manager}}<br />
{{Related|Qt}}<br />
{{Related articles end}}<br />
<br />
From phoronix.com <br />
<br />
"...the Hawaii Desktop is looking to be the very first Wayland-friendly desktop environment for Linux. The Hawaii desktop is the product of the Maui OS team, a Linux distribution that's trying to avoid traditional packages and instead provide a minimal image with the Linux kernel, systemd, ConnMan, and other core components, while being powered by a Wayland desktop."<br />
{{Note|The hawaii desktop environment, has not reached its stable 1.0 release. The latest version is 0.2.0. It may not work properly on your system.}}<br />
==Installation==<br />
Ensure {{Pkg|wayland}} and {{Pkg|weston}} are installed from the [[official repositories]].<br />
<br />
[[pacman|Install]] {{AUR|hawaii-meta-git}} from the [[AUR]].<br />
<br />
Alternatively, you can use the upstream binary package for hawaii. Click on the tab labeled "Arch Linux" and follow the instructions.<br />
<br />
http://www.maui-project.org/download/<br />
<br />
{{Note|If you use this binary package, then the hawaii binary will be stored in {{Ic|/opt/hawaii-git/bin/hawaii}}}}<br />
<br />
{{Note|The current upstream binary package only supports the x86_64 architecture.}}<br />
<br />
== Run hawaii ==<br />
<br />
=== Without login manager ===<br />
To run hawaii without a login manager, simply add {{Ic|exec hawaii}} to the startup script of your choice. <br />
<br />
{{Note|Do not start hawaii by adding it to ~/.xinitrc. [[Xinit]] is commonly used to start [[Xorg]], but hawaii uses Wayland, which is a newer graphical protocal.}}<br />
<br />
==External Links==<br />
* http://www.maui-project.org/ Maui Linux OS website<br />
* https://github.com/mauios/hawaii Hawaii's github page</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Profile-sync-daemon&diff=313936Profile-sync-daemon2014-05-08T13:30:55Z<p>JoshuaBranson: I added Pdnsd to the related articles section, because someone who wants to use psd is interested in speeding up their web browsing; Pdnsd also helps one speed up their web browsing.</p>
<hr />
<div>[[Category:Web Browser]]<br />
[[Category:Scripts]]<br />
[[ru:Profile-sync-daemon]]<br />
{{Related articles start}}<br />
{{Related|Anything-sync-daemon}}<br />
{{Related|Firefox}}<br />
{{Related|Chromium}}<br />
{{Related|Opera}}<br />
{{Related|Pdnsd}}<br />
{{Related|SSD}}<br />
{{Related articles end}}<br />
<br />
{{AUR|Profile-sync-daemon}} (psd) is a diminutive pseudo-daemon designed to manage your browser's profile in tmpfs and to periodically sync it back to your physical disc (HDD/SSD). This is accomplished via a symlinking step and an innovative use of rsync to maintain back-up and synchronization between the two. One of the major design goals of psd is a completely transparent user experience.<br />
<br />
== Benefits of psd ==<br />
<br />
Running this daemon is beneficial for two reasons:<br />
#Reduced wear to physical drives<br />
#Speed<br />
<br />
Since the profile(s), browser cache*, etc. are relocated into [[tmpfs]] (RAM disk), the corresponding onslaught of I/O associated with using the browser is also redirected from the physical drive to RAM, thus reducing wear to the physical drive and also greatly improving browser speed and responsiveness. For example, the access time of RAM is on the order of nanoseconds while the access time of physical discs is on the order of milliseconds. This is a difference of six orders of magnitude or 1,000,000 times faster.<br />
<br />
{{Note|Some browsers such as Chrome/Chromium, Firefox (since v21), Midori, and Rekonq actually keeps their cache directories '''separately''' from their profile directory. It is not within the scope of profile-sync-daemon to modify this behavior; users are encouraged to refer to the [[Chromium tweaks#Cache_in_tmpfs]] section for Chromium and to the [[Firefox_Ramdisk]] article for several workarounds. An easy fix is to move the various browsers' cache directory from their default location (e.g. {{ic|/home/$USER/.cache/<browser>/<profile>/}}) to the corresponding profile directory, e.g. {{ic|/home/$USER/.mozilla/firefox/<profile>/cache}}, and then symlink the new cache folder back to its original location. This way, profile-sync-daemon will automatically take into account the cache folder too.}}<br />
<br />
== Supported browsers ==<br />
<br />
Currently, the following browsers are auto-detected and managed:<br />
* [[Chromium]]<br />
* {{AUR|conkeror-git}}<br />
* [[Epiphany]]<br />
* [[Firefox]] (all flavors including stable, beta, and aurora)<br />
* {{AUR|google-chrome}}<br />
* {{AUR|google-chrome-beta}}<br />
* [https://bbs.archlinux.org/viewtopic.php?id=117157 heftig's version of Aurora]: An Arch Linux-only browser<br />
* [[Luakit]]<br />
* [[Midori]]<br />
* [[Opera]]<br />
* {{AUR|opera-next}}<br />
* Qupzilla<br />
* {{Pkg|rekonq}}<br />
* {{Pkg|seamonkey}}<br />
<br />
== Setup and installation ==<br />
<br />
{{AUR|profile-sync-daemon}} is available for download from the [[Arch User Repository|AUR]]. Build it and install like any other package. <br />
<br />
=== Edit /etc/psd.conf ===<br />
<br />
Edit the included {{ic|/etc/psd.conf}} defining which user(s) will have their profiles managed by ''psd''.<br />
<br />
Example:<br />
# List users separated by spaces whose browser(s) profile(s) will get symlinked <br />
# and sync'ed to tmpfs.<br />
# Do NOT list a user twice!<br />
USERS="facade happy"<br />
<br />
{{Note|At least one user must be defined.}}<br />
<br />
Optionally uncomment the BROWSERS array and populate it with whichever browser(s) are to be sync'ed to tmpfs. If the BROWSERS array stays commented (default) then all supported browser profiles will be sync'ed if they exist.<br />
<br />
Example: Let's say that Chromium, Opera and Midori are installed but only Chromium and Opera are to be sync'ed to tmpfs since the user keeps Midori as a backup browser and it is seldom used:<br />
<br />
# List browsers separated by spaces to include in the sync. Useful if you do not<br />
# wish to have all possible browser profiles sync'ed.<br />
#<br />
# Possible values:<br />
# chromium<br />
# conkeror.mozdev.org<br />
# firefox<br />
# firefox-trunk<br />
# google-chrome<br />
# heftig-aurora <br />
# midori<br />
# opera<br />
# opera-next<br />
# qupzilla<br />
#<br />
# If the following is commented out (default), then all available/supported <br />
# browsers will be sync'ed, separated by comma<br />
BROWSERS="chromium opera"<br />
<br />
== Using psd ==<br />
<br />
=== Preview mode (parse) ===<br />
<br />
The 'parse' option can be called to show users exactly what ''psd'' will do based on the {{ic|/etc/psd.conf}} entered. Call it like so:<br />
$ profile-sync-daemon parse<br />
Profile-sync-daemon v5.24<br />
<br />
psd will manage the following per /etc/psd.conf settings:<br />
<br />
browser/psname: chromium/chromium<br />
owner/group: facade/users<br />
sync target: /home/facade/.config/chromium<br />
tmpfs dir: /tmp/facade-chromium<br />
profile size: 81M<br />
<br />
browser/psname: firefox/firefox<br />
owner/group: facade/users<br />
sync target: /mnt/data/docs/facade/mozilla/firefox/1Zp9V43q.banking<br />
tmpfs dir: /tmp/facade-firefox-1Zp9V43q.banking<br />
profile size: 5.9M<br />
<br />
browser/psname: firefox/firefox<br />
owner/group: facade/users<br />
sync target: /mnt/data/docs/facade/mozilla/firefox/obg67zqQ.proxy<br />
tmpfs dir: /tmp/facade-firefox-obg67zqQ.proxy<br />
profile size: 17M<br />
<br />
As shown in the output and as stated above, if no specific browser or subset of browsers are defined in the BROWSERS array, ''psd'' will sync ALL supported profiles that it finds for the given user(s).<br />
<br />
=== Running psd to manage profiles ===<br />
<br />
Do not call {{ic|/usr/bin/profile-sync-daemon}} to sync or to unsync directly. Instead use the provided service files. <br />
<br />
Both a [[systemd]] [[daemon|service]] file and a timer are provided and should be used to interact with ''psd''. Both should be invoked together! The role of the timer is update the tmpfs copy/copies back to the disk which it does once per hour. Failure to start the resync timer will result in the profile being sync'ed only on start up and shutdown.<br />
<br />
Start {{ic|psd}} and {{ic|psd-resync}} service and enable them to start/stop at boot/shutdown ('''highly recommended''').<br />
<br />
Obviously, you must first close your browser before starting the service.<br />
<br />
=== Sync at more frequent intervals (optional) ===<br />
<br />
The package provided timer syncs once per hour. Users may optionally redefine this behavior simply by [[Systemd#Editing_provided_unit_files|extending the systemd unit]]. The example below changes the timer to sync once every ten minutes:<br />
<br />
{{hc|/etc/systemd/system/psd-resync.timer.d/frequency.conf|<nowiki><br />
[Unit]<br />
Description=Timer for Profile-sync-daemon - 10min<br />
<br />
[Timer]<br />
# Empty value resets the list of timers<br />
OnUnitActiveSec=<br />
OnUnitActiveSec=10min<br />
</nowiki>}}<br />
<br />
See {{ic|man systemd.timer}} for additional options.<br />
<br />
== Caveats for Firefox and Heftig's Aurora ONLY ==<br />
<br />
The way ''psd'' keeps track of browser profiles and sync targets requires users to have a unique name as the ''last directory'' for all profiles in their respective {{ic|$HOME/.mozilla/''browser''/profiles.ini}} files. ''psd'' will check when it is called to run for this and refuse if this rule is not satisfied. The following is an example of a BAD profile that will fail the the test. Note that although each full path is unique, they both ''end'' in the same name! Again, the user must modify the {{ic|profiles.ini}} and the corresponding directory on the filesystem to correct this in order to use ''psd''.<br />
<br />
{{hc|~/.mozilla/firefox/profiles.ini|<br />
[General]<br />
StartWithLastProfile&#61;1<br />
<br />
[Profile0 for user facade]<br />
Name&#61;normal<br />
IsRelative&#61;0<br />
Path&#61;/mnt/data/docs/'''facade'''/mozilla/firefox/'''myprofile.abc'''<br />
Default&#61;1<br />
<br />
[Profile1 for user happy]<br />
Name&#61;proxy<br />
IsRelative&#61;0<br />
Path&#61;/mnt/data/docs/'''happy'''/mozilla/firefox/'''myprofile.abc'''<br />
}}<br />
<br />
== FAQ ==<br />
<br />
{{Note|The first three questions apply to versions of ''psd'' equal to or greater than v5.40 only.}}<br />
<br />
=== Q1. My system crashed and didn't sync back. What do I do? ===<br />
<br />
Odds are the "last good" backup of your browser profiles is just fine still sitting happily on your filesystem. Upon restarting {{ic|psd}} (on a reboot for example), a check is preformed to see if the symlink to the tmpfs copy of your profile is invalid. If it is invalid, ''psd'' will snapshot the "last good" backup before it rotates it back into place. This is more for a sanity check that ''psd'' did no harm and that any data loss was a function of something else.<br />
<br />
=== Q2. Where can I find this snapshot? ===<br />
<br />
It depends on the browser. You will find the snapshot in the same directory as the browser profile and it will contain a date-time-stamp that corresponds to the time at which the recovery took place. For example, chromium will be {{ic|~/.config/chromium-backup-crashrecovery-20130912_153310}} -- of course, the date_time suffix will be different for you.<br />
<br />
=== Q3. How can I restore the snapshot? ===<br />
<br />
* Stop {{ic|psd}}.<br />
* Confirm that there is no symlink to the tmpfs browser profile directory. If there is, ''psd'' did not stop correctly for other reasons.<br />
* Move the "bad" copy of the profile to a backup (don't blindly delete anything).<br />
* Copy the snapshot directory to the name that browser expects.<br />
<br />
Example using Chromium:<br />
mv ~/.config/chromium ~/.config/chromium-bad<br />
cp -a ~/.config/chromium-backup-crashrecovery-20130912_153310 ~/.config/chromium<br />
<br />
At this point you can launch chromium which will use the backup snapshot you just copied into place. If all is well, close the browser and restart psd and psd-resync (if using systemd). You may safely delete {{ic|~/.config/chromium-backup-crashrecovery-20130912_153310}} at this point.<br />
<br />
== Support ==<br />
<br />
Post in the [https://bbs.archlinux.org/viewtopic.php?pid=1026974 discussion thread] with comments or concerns.<br />
<br />
== PSD on other distros ==<br />
<br />
''psd'' is a bash script and should therefore run on any Linux distro. See the [https://github.com/graysky2/profile-sync-daemon#installation-from-distro-packages official website] for installation instructions.<br />
<br />
== See also ==<br />
<br />
* http://www.webupd8.org/2013/02/keep-your-browser-profiles-in-tmpfs-ram.html<br />
* http://bernaerts.dyndns.org/linux/250-ubuntu-tweaks-ssd</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Talk:Sysctl&diff=306672Talk:Sysctl2014-03-23T01:30:32Z<p>JoshuaBranson: I explaned why a section of the article should be removed.</p>
<hr />
<div>It seems silly to keep this section of the article. It's information yes, but I doesn't appear to be useful anymore. May I delete it?<br />
<br />
=== Preventing link [[Wikipedia:TOCTOU|TOCTOU]] vulnerabilities ===<br />
<br />
See the [https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=800179c9b8a1e796e441674776d11cd4c05d61d7 commit message] for when this feature was added for the rationale.<br />
<br />
fs.protected_hardlinks = 1<br />
fs.protected_symlinks = 1<br />
<br />
{{Note|Already enabled by default nowadays. Only left here as information.}}<br />
<br />
<br />
I can't imagine this being a very long article, but I do find it useful. I didn't have a clue what this command did until I came across it now. I recall it from my first time installing Arch, with regard to storing the volume levels in alsamixer. --[[User:Mustard|Mustard]] 10:31, 22 October 2010 (EDT)<br />
<br />
error: permission denied on key 'net.ipv4.conf.all.mc_forwarding'<br />
error: permission denied on key 'net.ipv4.conf.default.mc_forwarding'<br />
<br />
Are these not used any-more?<br />
<br />
:it's read only which might mean that it has to be changed while compiling the kernel, I'm not sure (it used to work), it is disabled by default anyway [[User:Thestinger|thestinger]] 16:39, 26 October 2010 (EDT)<br />
<br />
== net.ipv4.tcp_rfc1337 ==<br />
<br />
From [https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt kernel doc]:<br />
<br />
{{bc|<br />
tcp_rfc1337 - BOOLEAN<br />
If set, the TCP stack behaves conforming to RFC1337. If unset,<br />
we are not conforming to RFC, but prevent TCP TIME_WAIT<br />
assassination.<br />
Default: 0<br />
}}<br />
<br />
So, isn't {{ic|0}} the safe value? Our wiki says otherwise. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:56, 17 September 2013 (UTC)<br />
:With setting {{ic|0}} the system would 'assassinate' a socket in time_wait prematurely upon receiving a RST. While this might sound like a good idea (it frees up a socket quicker), it opens the door for tcp sequence problems/syn replay. Those problems were described in RFC1337 and enabling the setting {{ic|1}} is one way to deal with them (letting TIME_WAIT packets idle out even if a reset is received, so that the sequence number cannot be reused meanwhile). The wiki is correct in my view. Kernel doc is wrong here - "prevent" should read "enable". --[[User:Indigo|Indigo]] ([[User talk:Indigo|talk]]) 21:12, 17 September 2013 (UTC)</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Liri&diff=298429Liri2014-02-16T20:56:20Z<p>JoshuaBranson: /* Installation */ I wrote that the packages wayland and weston, need to be installed for Hawaii to work properly.</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Desktop environments]]<br />
{{Related articles start}}<br />
{{Related|Desktop Environment}}<br />
{{Related|Display Manager}}<br />
{{Related|Window Manager}}<br />
{{Related|Qt}}<br />
{{Related articles end}}<br />
<br />
From phoronix.com <br />
<br />
"...the Hawaii Desktop is looking to be the very first Wayland-friendly desktop environment for Linux. The Hawaii desktop is the product of the Maui OS team, a Linux distribution that's trying to avoid traditional packages and instead provide a minimal image with the Linux kernel, systemd, ConnMan, and other core components, while being powered by a Wayland desktop."<br />
<br />
<br />
{{Note|<br />
<br />
The hawaii desktop environment, has not reached its stable 1.0 release. The latest version is 0.2.0. It may not work properly on your system.<br />
<br />
}}<br />
<br />
<br />
==Installation==<br />
Ensure {{Pkg|wayland}} and {{Pkg|weston}} are installed from the [[official repositories]].<br />
<br />
<br />
[[pacman|Install]] {{AUR|hawaii-meta-git}} from the [[AUR]].<br />
<br />
<br />
Alternatively, you can use the upstream binary package for hawaii. Click on the tab labeled "Arch Linux" and follow the instructions.<br />
<br />
http://www.maui-project.org/download/<br />
<br />
{{Note|<br />
<br />
If you use this binary package, then the hawaii binary will be stored in {{Ic|/opt/hawaii-git/bin/hawaii}}<br />
<br />
}}<br />
<br />
{{Note|<br />
<br />
The current upstream binary package only supports the x86_64 architecture.<br />
<br />
}}<br />
<br />
== Run hawaii ==<br />
<br />
=== Without login manager ===<br />
To run hawaii without a login manager, simply add {{Ic|exec hawaii}} to the startup script of your choice. <br />
<br />
{{Note|<br />
<br />
Do not start hawaii by adding it to ~/.xinitrc. [[Xinit]] is commonly used to start [[Xorg]], but hawaii uses Wayland, which is a newer graphical protocal.<br />
<br />
}}<br />
<br />
==External Links==<br />
* http://www.maui-project.org/ Maui Linux OS website<br />
* https://github.com/mauios/hawaii Hawaii's github page</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Liri&diff=297550Liri2014-02-14T22:34:46Z<p>JoshuaBranson: /* Without login manager */ I fixed a typo.</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Desktop Environment]]<br />
{{Related articles start}}<br />
{{Related|Desktop Environment}}<br />
{{Related|Display Manager}}<br />
{{Related|Window Manager}}<br />
{{Related|Qt}}<br />
{{Related articles end}}<br />
<br />
From phoronix.com <br />
<br />
"...the Hawaii Desktop is looking to be the very first Wayland-friendly desktop environment for Linux. The Hawaii desktop is the product of the Maui OS team, a Linux distribution that's trying to avoid traditional packages and instead provide a minimal image with the Linux kernel, systemd, ConnMan, and other core components, while being powered by a Wayland desktop."<br />
<br />
<br />
{{Note|<br />
<br />
The hawaii desktop environment, has not reached its stable 1.0 release. The latest version is 0.2.0. It may not work properly on your system.<br />
<br />
}}<br />
<br />
<br />
==Installation==<br />
<br />
[[pacman|Install]] {{AUR|hawaii-meta-git}} from the [[AUR]].<br />
<br />
<br />
Alternatively, you can use the upstream binary package for hawaii. Click on the tab labeled "Arch Linux" and follow the instructions.<br />
<br />
http://www.maui-project.org/download/<br />
<br />
{{Note|<br />
<br />
If you use this binary package, then the hawaii binary will be stored in {{Ic|/opt/hawaii-git/bin/hawaii}}<br />
<br />
}}<br />
<br />
{{Note|<br />
<br />
The current upstream binary package only supports the x86_64 architecture.<br />
<br />
}}<br />
<br />
== Run hawaii ==<br />
<br />
=== Without login manager ===<br />
To run hawaii without a login manager, simply add {{Ic|exec hawaii}} to the startup script of your choice. <br />
<br />
{{Note|<br />
<br />
Do not start hawaii by adding it to ~/.xinitrc. [[Xinit]] is commonly used to start [[Xorg]], but hawaii uses Wayland, which is a newer graphical protocal.<br />
<br />
}}<br />
<br />
==External Links==<br />
* http://www.maui-project.org/ Maui Linux OS website<br />
* https://github.com/mauios/hawaii Hawaii's github page</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Liri&diff=297548Liri2014-02-14T22:30:08Z<p>JoshuaBranson: I slightly modified the quote in the introduction. and I edited the wording in the first {{Note| on the page.</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Desktop Environment]]<br />
{{Related articles start}}<br />
{{Related|Desktop Environment}}<br />
{{Related|Display Manager}}<br />
{{Related|Window Manager}}<br />
{{Related|Qt}}<br />
{{Related articles end}}<br />
<br />
From phoronix.com <br />
<br />
"...the Hawaii Desktop is looking to be the very first Wayland-friendly desktop environment for Linux. The Hawaii desktop is the product of the Maui OS team, a Linux distribution that's trying to avoid traditional packages and instead provide a minimal image with the Linux kernel, systemd, ConnMan, and other core components, while being powered by a Wayland desktop."<br />
<br />
<br />
{{Note|<br />
<br />
The hawaii desktop environment, has not reached its stable 1.0 release. The latest version is 0.2.0. It may not work properly on your system.<br />
<br />
}}<br />
<br />
<br />
==Installation==<br />
<br />
[[pacman|Install]] {{AUR|hawaii-meta-git}} from the [[AUR]].<br />
<br />
<br />
Alternatively, you can use the upstream binary package for hawaii. Click on the tab labeled "Arch Linux" and follow the instructions.<br />
<br />
http://www.maui-project.org/download/<br />
<br />
{{Note|<br />
<br />
If you use this binary package, then the hawaii binary will be stored in {{Ic|/opt/hawaii-git/bin/hawaii}}<br />
<br />
}}<br />
<br />
{{Note|<br />
<br />
The current upstream binary package only supports the x86_64 architecture.<br />
<br />
}}<br />
<br />
== Run hawaii ==<br />
<br />
=== Without login manager ===<br />
To run hawaii without a login manager, simply add {{Ic|exec hawaii}} to the startup script of your choice. <br />
<br />
{{Note|<br />
<br />
Do not start hawaii by adding it to ~/.xinitrc. [[Xinit]] is commonly used to start [[Xorg]], but hawaii used Wayland, which is a newer graphical protocal.<br />
<br />
}}<br />
<br />
<br />
==External Links==<br />
* http://www.maui-project.org/ Maui Linux OS website<br />
* https://github.com/mauios/hawaii Hawaii's github page</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Liri&diff=297547Liri2014-02-14T22:26:26Z<p>JoshuaBranson: /* Installation */ I explained that the binary file only works on x86_64 architectures.</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Desktop Environment]]<br />
{{Related articles start}}<br />
{{Related|Desktop Environment}}<br />
{{Related|Display Manager}}<br />
{{Related|Window Manager}}<br />
{{Related|Qt}}<br />
{{Related articles end}}<br />
<br />
From phoronix.com <br />
<br />
"With the Green Island Compositor, the Hawaii Desktop is looking to be the very first Wayland-friendly desktop environment for Linux. The Hawaii desktop is the product of the Maui OS team, a Linux distribution that's trying to avoid traditional packages and instead provide a minimal image with the Linux kernel, systemd, ConnMan, and other core components, while being powered by a Wayland desktop."<br />
<br />
<br />
{{Note|<br />
<br />
Be warned, the hawaii desktop environment, has not reached its stable 1.0 release. It is only at version 0.2.0. It may not work properly on your system.<br />
<br />
}}<br />
<br />
<br />
==Installation==<br />
<br />
[[pacman|Install]] {{AUR|hawaii-meta-git}} from the [[AUR]].<br />
<br />
<br />
Alternatively, you can use the upstream binary package for hawaii. Click on the tab labeled "Arch Linux" and follow the instructions.<br />
<br />
http://www.maui-project.org/download/<br />
<br />
{{Note|<br />
<br />
If you use this binary package, then the hawaii binary will be stored in {{Ic|/opt/hawaii-git/bin/hawaii}}<br />
<br />
}}<br />
<br />
{{Note|<br />
<br />
The current upstream binary package only supports the x86_64 architecture.<br />
<br />
}}<br />
<br />
== Run hawaii ==<br />
<br />
=== Without login manager ===<br />
To run hawaii without a login manager, simply add {{Ic|exec hawaii}} to the startup script of your choice. <br />
<br />
{{Note|<br />
<br />
Do not start hawaii by adding it to ~/.xinitrc. [[Xinit]] is commonly used to start [[Xorg]], but hawaii used Wayland, which is a newer graphical protocal.<br />
<br />
}}<br />
<br />
<br />
==External Links==<br />
* http://www.maui-project.org/ Maui Linux OS website<br />
* https://github.com/mauios/hawaii Hawaii's github page</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Liri&diff=297546Liri2014-02-14T22:23:56Z<p>JoshuaBranson: /* Installation */ I changed where the hyperlink was stored on the page.</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Desktop Environment]]<br />
{{Related articles start}}<br />
{{Related|Desktop Environment}}<br />
{{Related|Display Manager}}<br />
{{Related|Window Manager}}<br />
{{Related|Qt}}<br />
{{Related articles end}}<br />
<br />
From phoronix.com <br />
<br />
"With the Green Island Compositor, the Hawaii Desktop is looking to be the very first Wayland-friendly desktop environment for Linux. The Hawaii desktop is the product of the Maui OS team, a Linux distribution that's trying to avoid traditional packages and instead provide a minimal image with the Linux kernel, systemd, ConnMan, and other core components, while being powered by a Wayland desktop."<br />
<br />
<br />
{{Note|<br />
<br />
Be warned, the hawaii desktop environment, has not reached its stable 1.0 release. It is only at version 0.2.0. It may not work properly on your system.<br />
<br />
}}<br />
<br />
<br />
==Installation==<br />
<br />
[[pacman|Install]] {{AUR|hawaii-meta-git}} from the [[AUR]].<br />
<br />
<br />
Alternatively, you can use the upstream binary package for hawaii. Click on the tab labeled "Arch Linux" and follow the instructions.<br />
<br />
http://www.maui-project.org/download/<br />
<br />
{{Note|<br />
<br />
If you use this binary package, then the hawaii binary will be stored in {{Ic|/opt/hawaii-git/bin/hawaii}}<br />
<br />
}}<br />
<br />
== Run hawaii ==<br />
<br />
=== Without login manager ===<br />
To run hawaii without a login manager, simply add {{Ic|exec hawaii}} to the startup script of your choice. <br />
<br />
{{Note|<br />
<br />
Do not start hawaii by adding it to ~/.xinitrc. [[Xinit]] is commonly used to start [[Xorg]], but hawaii used Wayland, which is a newer graphical protocal.<br />
<br />
}}<br />
<br />
<br />
==External Links==<br />
* http://www.maui-project.org/ Maui Linux OS website<br />
* https://github.com/mauios/hawaii Hawaii's github page</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Liri&diff=297544Liri2014-02-14T22:22:18Z<p>JoshuaBranson: I deleted unneeded things on the page. I explained why you should not start hawaii with .xinitrc, of rid of the trouble shooting, configurating and starting via graphical log in managers.</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Desktop Environment]]<br />
{{Related articles start}}<br />
{{Related|Desktop Environment}}<br />
{{Related|Display Manager}}<br />
{{Related|Window Manager}}<br />
{{Related|Qt}}<br />
{{Related articles end}}<br />
<br />
From phoronix.com <br />
<br />
"With the Green Island Compositor, the Hawaii Desktop is looking to be the very first Wayland-friendly desktop environment for Linux. The Hawaii desktop is the product of the Maui OS team, a Linux distribution that's trying to avoid traditional packages and instead provide a minimal image with the Linux kernel, systemd, ConnMan, and other core components, while being powered by a Wayland desktop."<br />
<br />
<br />
{{Note|<br />
<br />
Be warned, the hawaii desktop environment, has not reached its stable 1.0 release. It is only at version 0.2.0. It may not work properly on your system.<br />
<br />
}}<br />
<br />
<br />
==Installation==<br />
<br />
[[pacman|Install]] {{AUR|hawaii-meta-git}} from the [[AUR]].<br />
<br />
<br />
Alternatively, you can use the upstream binary package for hawaii. Click on the tab labeled "Arch Linux" and follow the instructions.<br />
<br />
{{Note|<br />
<br />
If you use this binary package, then the hawaii binary will be stored in {{Ic|/opt/hawaii-git/bin/hawaii}}<br />
<br />
}} <br />
http://www.maui-project.org/download/<br />
<br />
== Run hawaii ==<br />
<br />
=== Without login manager ===<br />
To run hawaii without a login manager, simply add {{Ic|exec hawaii}} to the startup script of your choice. <br />
<br />
{{Note|<br />
<br />
Do not start hawaii by adding it to ~/.xinitrc. [[Xinit]] is commonly used to start [[Xorg]], but hawaii used Wayland, which is a newer graphical protocal.<br />
<br />
}}<br />
<br />
<br />
==External Links==<br />
* http://www.maui-project.org/ Maui Linux OS website<br />
* https://github.com/mauios/hawaii Hawaii's github page</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Liri&diff=297541Liri2014-02-14T21:58:26Z<p>JoshuaBranson: I created the initial page for the Hawaii desktop environment. It will explain how to install and use hawaii.</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Desktop Environment]]<br />
<br />
From phoronix.com <br />
"With the Green Island Compositor, the Hawaii Desktop is looking to be the very first Wayland-friendly desktop environment for Linux. The Hawaii desktop is the product of the Maui OS team, a Linux distribution that's trying to avoid traditional packages and instead provide a minimal image with the Linux kernel, systemd, ConnMan, and other core components, while being powered by a Wayland desktop."<br />
<br />
<br />
{{Note|<br />
<br />
Be warned,the hawaii desktop environment, is has not reached its stable 1.0 release. It is only at version 0.2.0. It may not work properly on your system.<br />
<br />
}}<br />
<br />
<br />
==Installation==<br />
<br />
Install {{pkg|awesome}} from the [[official repositories]].<br />
<br />
For pre-release versions, an {{aur|awesome-git}} build is in the [[Arch User Repository|AUR]]. <br />
<br />
Alternatively, you can use the upstream binary package for hawaii. Click on the tab labeled "Arch Linux" and follow the instructions.<br />
<br />
{{Note|<br />
<br />
If you use this binary package, then the hawaii binary will be stored in {{Ic|/opt/hawaii-git/bin/hawaii}}<br />
<br />
}} <br />
http://www.maui-project.org/download/<br />
<br />
== Run hawaii ==<br />
<br />
=== Without login manager ===<br />
To run hawaii without a login manager, simply add {{Ic|exec hawaii}} to the startup script of your choice (e.g. ~/.xinitrc.)<br />
<br />
=== With login manager ===<br />
Can you start hawaii with a display manager? Will current display managers work for a Wayland based destop environment? [[Display Manager|this article]].<br />
<br />
==== GDM, LightDM, others using /usr/share/xsessions/ ====<br />
<br />
Awesome automatically installs a config file for these display managers. You don't need to do anything special to see awesome offered at login.<br />
<br />
==== KDM ====<br />
<br />
Create as root:<br />
{{hc|/usr/share/apps/kdm/sessions/awesome.desktop|2=<br />
[Desktop Entry]<br />
Name=hawaii<br />
Comment=Wayland Desktop Environment<br />
Type=Application<br />
Exec=/usr/bin/hawaii<br />
TryExec=/usr/bin/hawaii<br />
}}<br />
<br />
==Configuration==<br />
<br />
==Troubleshooting==<br />
<br />
<br />
==External Links==<br />
* http://www.maui-project.org/ Maui Linux OS website<br />
* https://github.com/mauios/hawaii Hawaii's github page</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=RAID&diff=265412RAID2013-07-07T22:08:00Z<p>JoshuaBranson: I changed the hooks from 'pata sata scsi' to 'block', which is requested on the Arch wiki requests page.</p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
[[Category:File systems]]<br />
[[it:RAID]]<br />
{{Article summary start}}<br />
{{Article summary text|This article explains what RAID is and how to install, configure and maintain it.}}<br />
{{Article summary heading|Required software}}<br />
{{Article summary link|mdadm|http://neil.brown.name/blog/mdadm}}<br />
{{Article summary link|parted|http://www.gnu.org/software/parted/}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Software RAID and LVM}}<br />
{{Article summary wiki|Installing with Fake RAID}}<br />
{{Article summary wiki|Convert a single drive system to RAID}}<br />
{{Article summary end}}<br />
<br />
== Introduction ==<br />
{{Wikipedia|RAID}}<br />
Redundant Array of Independent Disks (RAID) devices are virtual devices created from two or more real block devices. This allows multiple devices (typically disk drives or partitions thereof) to be combined into a single device to hold (for example) a single filesystem. RAID is designed to prevent data loss in the event of a hard disk failure. There are different [[Wikipedia:Standard RAID levels|levels of RAID]].<br />
<br />
===Standard RAID levels===<br />
; [[Wikipedia:Standard RAID levels#RAID 0|RAID 0]]: Uses striping to combine disks. Not really RAID in that it ''provides no redundancy''. It does, however, ''provide a big speed benefit''. This example will utilize RAID 0 for swap, on the assumption that a desktop system is being used, where the speed increase is worth the possibility of system crash if one of your drives fails. On a server, a RAID 1 or RAID 5 array is more appropriate. The size of a RAID 0 array block device is the size of the smallest component partition times the number of component partitions.<br />
; [[Wikipedia:Standard RAID levels#RAID 1|RAID 1]]: The most straightforward RAID level: straight mirroring. As with other RAID levels, it only makes sense if the partitions are on different physical disk drives. If one of those drives fails, the block device provided by the RAID array will continue to function as normal. The example will be using RAID 1 for everything except swap. Note that RAID 1 is the only option for the boot partition, because bootloaders (which read the boot partition) do not understand RAID, but a RAID 1 component partition can be read as a normal partition. The size of a RAID 1 array block device is the size of the smallest component partition.<br />
; [[Wikipedia:Standard RAID levels#RAID 5|RAID 5]]: Requires 3 or more physical drives, and provides the redundancy of RAID 1 combined with the speed and size benefits of RAID 0. RAID 5 uses striping, like RAID 0, but also stores parity blocks distributed across each member disk. In the event of a failed disk, these parity blocks are used to reconstruct the data on a replacement disk. RAID 5 can withstand the loss of one member disk.<br />
: {{Note|RAID 5 is a common choice due to its combination of speed and data redundancy. The caveat is that if 1 drive were to fail and before that drive was replaced another drive failed, all data will be lost. For excellent information regarding this, see the ''[http://ubuntuforums.org/showthread.php?t&#x3d;1588106 RAID5 Risks]'' discussion thread on the Ubuntu forums. The best alternative to RAID5 when redundancy is crucial is RAID 10.}}<br />
<br />
===Nested RAID levels===<br />
; [[Wikipedia:Nested RAID levels#RAID 1 + 0|RAID 1+0]]: Commonly referred to as ''RAID 10'', is a nested RAID that combines two of the standard levels of RAID to gain performance and additional redundancy.<br />
<br />
=== Redundancy ===<br />
{{Warning|Installing a system with RAID is a complex process that may destroy data. Be sure to backup all data before proceeding.}}<br />
<br />
RAID does not guarantee that data is safe. A RAID will not protect data if there is a fire, the computer is stolen or multiple hard drives fail. Therefore it is important to make backups (see [[Backup Programs|List of backup software]]).<br />
<br />
=== RAID level comparison ===<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! RAID level!!Data redundancy!!Physical drive utilization!!Read performance!!Write performance!!Min drives<br />
|-<br />
| '''0'''||'''No'''||100%||'''Superior'''||'''Superior'''||1<br />
|-<br />
| '''1'''||Yes||50%||Very high||Very high||2<br />
|-<br />
| '''5'''||Yes||67% - 94%||'''Superior'''||High||3<br />
|-<br />
| '''6'''||Yes||50% - 88%||Very High||High||4<br />
|-<br />
| '''10'''||Yes||50%||Very high||Very high||4<br />
|}<br />
<br />
==Installation==<br />
[[pacman|Install]] {{Pkg|mdadm}} and {{Pkg|parted}}, available in the [[Official Repositories]].<br />
<br />
===Prepare the device===<br />
{{Warning|These steps erase everything on a device, so type carefully.}}<br />
<br />
To prevent possible issues each device in the RAID should be [[Securely wipe disk|securely wiped]]. Additionally, the following steps can be taken.<br />
<br />
Erase any old RAID configuration information on the device:<br />
{{bc|1=# mdadm --zero-superblock /dev/<drive>}}<br />
<br />
Verify that the kernel clears old entries:<br />
{{bc|1=# partprobe -s}}<br />
<br />
With a software RAID, disabling the hard disk cache will help prevent data loss during power loss, as long as you do not use a [[Wikipedia:Uninterruptible power supply|UPS]]. Repeat the command for each drive in the array. Note however, that this decreases performance.<br />
{{bc|# hdparm -W 0 /dev/<drive>}}<br />
<br />
===Create the partition table===<br />
It is recommended to format the disks you want in your array. It is also possible to create a RAID directly on the raw disks (without partitions), but not recommended because it can cause problems when swapping a failed disk.<br />
<br />
When replacing a failed disk of a RAID, the new disk has to be exactly the same size as the failed disk or bigger — otherwise the array recreation process will not work. Even hard drives of the same manufacturer and model can have small size differences. By leaving a little space at the end of the disk unallocated one can compensate for the size differences between drives, which makes choosing a replacement drive model easier. Therefore, it is good practice to leave about 100 MB of unallocated space at the end of the disk.<br />
<br />
====Partition code====<br />
The two [[Wikipedia:Partition types|partition type]]s that are applicable to RAID devices are Non-FS data and Linux RAID auto. Non-FS data is recommended, as your array is not auto-assembled during boot. With Linux RAID auto one may run into trouble when booting from a live-cd or when installing the degraded RAID in a different system (maybe with other degraded RAIDs in worst case) as Linux will try to automatically assemble and resync the array which could render your data on the array unreadable if it fails.<br />
<br />
{{note|cfdisk and mkpart use a set of "filesystem types" to set the partition codes. Each type corresponds to a partition code (see [http://www.gnu.org/software/parted/manual/html_node/mkpart.html#mkpart Parted User's Manual]). It uses the {{ic|da}} type to denote Non-FS data and {{ic|fd}} for Linux RAID auto.}}<br />
<br />
Once you have selected a partition type follow the [[Beginner's Guide]] to [[Beginner's Guide#Prepare the storage drive|prepare the storage drive]].<br />
<br />
===Copy the partition table===<br />
Once you have a properly partitioned the disk copy the partition table to the other disks in the RAID.<br />
<br />
Verify your partitions meet basic requirements:<br />
{{bc|1=# sfdisk -lRV /dev/<drive>}}<br />
<br />
Dump the partition table from the formatted disk to a file:<br />
{{bc|<nowiki># sfdisk -d /dev/<drive> > ~/partitions.dump</nowiki>}}<br />
<br />
Copy the partition table from the dump file to all other disks in the array: <br />
{{bc|<nowiki># sfdisk /dev/<drive> < ~/partitions.dump</nowiki>}}<br />
<br />
After repeating the command for every other disk of the array, verify that the disks are identical with {{ic|fdisk -l}} or {{ic|sfdisk -l -u S}}.<br />
<br />
===Build the array===<br />
Use {{ic|mdadm}} to build the array.<br />
<br />
{{Warning|Make sure to change the '''bold values''' below to match your setup.}}<br />
<br />
{{bc| <nowiki># mdadm --create --verbose --level=</nowiki>'''5''' <nowiki>--metadata=</nowiki>'''1.2''' <nowiki>--chunk=</nowiki>'''256''' <nowiki>--raid-devices=</nowiki>'''5 /dev/<raid-device-name> /dev/<disk1> /dev/<disk2> /dev/<disk3> /dev/<disk4> /dev/<disk5>''' }}<br />
<br />
The array is created under the virtual device {{ic|/dev/md/<array>}}, assembled and ready to use (in degraded mode). You can directly start using it while mdadm resyncs the array in the background. It can take a long time to restore parity. Check the progress with:<br />
{{bc|$ cat /proc/mdstat}}<br />
<br />
===Update configuration file===<br />
Since the installer builds the initrd using {{ic|/etc/mdadm.conf}} in the target system, you should update the default configuration file. The default file can be overwritten using the redirection operator, because it only contains explanatory comments.<br />
<br />
Redirect the contents of the metadata stored on the named devices to the configuration file:<br />
# mdadm --examine --scan > /etc/mdadm.conf<br />
<br />
{{Note|If you are updating your RAID configuration from within the Arch Installer by swapping to another TTY, you will need to ensure that you are writing to the correct {{ic|mdadm.conf}} file:}}<br />
# mdadm --examine --scan > /mnt/etc/mdadm.conf<br />
<br />
Once the configuration file has been updated the array can be assembled using mdadm:<br />
# mdadm --assemble --scan<br />
<br />
===Configure filesystem===<br />
The array can now be formatted like any other disk, just keep in mind that:<br />
* Due to the large volume size not all filesystems are suited (see: [[Wikipedia:Comparison of file systems#Limits|File system limits]]).<br />
* The filesystem should support growing and shrinking while online (see: [[Wikipedia:Comparison of file systems#Features|File system features]]).<br />
* The biggest performance gain you can achieve on a raid array is to make sure you format the volume aligned to your RAID stripe size (see: [http://wiki.centos.org/HowTos/Disk_Optimization RAID Math]).<br />
<br />
===Assemble array on boot===<br />
If you selected the Non-FS data partition code the array will not be automatically recreated after the next boot. To assemble the array issue the following command:<br />
{{bc| <nowiki># mdadm --assemble --scan /dev/your_array --uuid=your_array_uuid</nowiki> }}<br />
<br />
or write it to {{ic|rc.local}}.<br />
<br />
===Add to kernel image===<br />
Add {{ic|mdadm_udev}} to the [[Mkinitcpio#HOOKS|HOOKS]] section of the [[Mkinitcpio]] file before the {{ic|filesystems}} hook. This will add support for mdadm directly into the init image.<br />
{{bc|1= HOOKS="base udev autodetect block '''mdadm_udev''' filesystems usbinput fsck"}}<br />
<br />
Add the {{ic|raid456}} module and the filesystem module created on the RAID (e.g. {{ic|ext4}}) to the [[Mkinitcpio#MODULES|MODULES]] section. This will build these modules into the kernel image. For example,<br />
{{bc|<nowiki>MODULES="ext4 raid456"</nowiki>}}<br />
<br />
Next regenerate the initramfs image (see [[Mkinitcpio#Image creation and activation|Image creation and activation]]).<br />
<br />
== Mounting from a Live CD ==<br />
<br />
If you want to mount your RAID partition from a Live CD, use<br />
# mdadm --assemble /dev/<disk1> /dev/<disk2> /dev/<disk3> /dev/<disk4><br />
<br />
{{Note|Live CDs like [http://www.sysresccd.org/Main_Page SystemrescueCD] assemble the RAIDs automatically at boot time if you used the partition type {{ic|fd}} at the install of the array.}}<br />
<br />
==Removing device, stop using the array==<br />
<br />
You can remove a device from the array after you mark it as faulty.<br />
<br />
# mdadm --fail /dev/md0 /dev/sdxx<br />
<br />
Then you can remove it from the array.<br />
<br />
# mdadm -r /dev/md0 /dev/sdxx<br />
<br />
Remove device permanently (for example in the case you want to use it individally from now on).<br />
Issue the two commands described above then:<br />
<br />
# mdadm --zero-superblock /dev/sdxx<br />
<br />
After this you can use the disk as you did before creating the array.<br />
<br />
{{Warning | If you reuse the removed disk without zeroing the superblock you will '''LOSE''' all your data next boot. (After mdadm will try to use it as the part of the raid array). '''DO NOT''' issue this command on linear or RAID0 arrays or you will '''LOSE''' all your data on the raid array. }}<br />
<br />
Stop using an array:<br />
# Umount target array<br />
# Stop the array with: {{ic|mdadm --stop /dev/md0}}<br />
# Repeat the three command described in the beginning of this section on each device.<br />
# Remove the corresponding line from /etc/mdadm.conf<br />
<br />
== Adding a device to the array ==<br />
Adding new devices with mdadm can be done on a running system with the devices mounted.<br />
Partition the new device {{ic|/dev/sdx}} using the same layout as one of those already in the arrays {{ic|/dev/sda}}.<br />
# sfdisk -d /dev/sda > table<br />
# sfdisk /dev/sdx < table<br />
<br />
Assemble the RAID arrays if they are not already assembled:<br />
# mdadm --assemble /dev/md1 /dev/sda1 /dev/sdb1 /dev/sdc1<br />
# mdadm --assemble /dev/md2 /dev/sda2 /dev/sdb2 /dev/sdc2<br />
# mdadm --assemble /dev/md0 /dev/sda3 /dev/sdb3 /dev/sdc3<br />
<br />
First, add the new device as a Spare Device to all of the arrays. We will assume you have followed the guide and use separate arrays for {{ic|/boot}} RAID 1 (/dev/md1), {{ic|swap}} RAID 1 (/dev/md2) and {{ic|root}} RAID 5 (/dev/md0).<br />
# mdadm --add /dev/md1 /dev/sdx1<br />
# mdadm --add /dev/md2 /dev/sdx2<br />
# mdadm --add /dev/md0 /dev/sdx3<br />
<br />
This should not take long for mdadm to do. Check the progress with:<br />
# cat /proc/mdstat<br />
<br />
Check that the device has been added with the command:<br />
# mdadm --misc --detail /dev/md0<br />
<br />
It should be listed as a Spare Device.<br />
<br />
Tell mdadm to grow the arrays from 3 devices to 4 (or however many devices you want to use):<br />
# mdadm --grow -n 4 /dev/md1<br />
# mdadm --grow -n 4 /dev/md2<br />
# mdadm --grow -n 4 /dev/md0<br />
<br />
This will probably take several hours. You need to wait for it to finish before you can continue. Check the progress in {{ic|/proc/mdstat}}. The RAID 1 arrays should automatically sync {{ic|/boot}} and {{ic|swap}} but you need to install Grub on the MBR of the new device manually. [[Installing_with_Software_RAID_or_LVM#Install_Grub_on_the_Alternate_Boot_Drives]]<br />
<br />
The rest of this guide will explain how to resize the underlying LVM and filesystem on the RAID 5 array.<br />
{{Note|I am not sure if this can be done with the volumes mounted and will assume you are booting from a live-cd/usb}}<br />
<br />
If you are have encrypted your LVM volumes with LUKS, you need resize the LUKS volume first. Otherwise, ignore this step.<br />
# cryptsetup luksOpen /dev/md0 cryptedlvm<br />
# cryptsetup resize cryptedlvm<br />
<br />
Activate the LVM volume groups:<br />
# vgscan<br />
# vgchange -ay<br />
<br />
Resize the LVM Physical Volume {{ic|/dev/md0}} (or e.g. {{ic|/dev/mapper/cryptedlvm}} if using LUKS) to take up all the available space on the array. You can list them with the command "pvdisplay".<br />
# pvresize /dev/md0<br />
<br />
Resize the Logical Volume you wish to allocate the new space to. You can list them with "lvdisplay". Assuming you want to put it all to your {{ic|/home}} volume:<br />
# lvresize -l +100%FREE /dev/array/home<br />
<br />
To resize the filesystem to allocate the new space use the appropriate tool. If using ext2 you can resize a mounted filesystem with ext2online. For ext3 you can use resize2fs or ext2resize but not while mounted.<br />
<br />
You should check the filesystem before resizing.<br />
# e2fsck -f /dev/array/home<br />
# resize2fs /dev/array/home<br />
<br />
Read the manuals for lvresize and resize2fs if you want to customize the sizes for the volumes.<br />
<br />
== Monitoring ==<br />
A simple one-liner that prints out the status of your Raid devices:<br />
{{hc|awk '/^md/ {printf "%s: ", $1}; /blocks/ {print $NF}' </proc/mdstat<br />
|md1: [UU]<br />
md0: [UU]<br />
}}<br />
<br />
===Watch mdstat===<br />
{{bc|watch -t 'cat /proc/mdstat'}}<br />
Or preferably using {{pkg|tmux}}<br />
{{bc|tmux split-window -l 12 "watch -t 'cat /proc/mdstat'"}}<br />
<br />
===Track IO with iotop===<br />
The {{pkg|iotop}} package lets you view the input/output stats for processes. Use this command to view the IO for raid threads.<br />
<br />
{{bc|<nowiki>iotop -a -p $(sed 's, , -p ,g' <<<`pgrep "_raid|_resync|jbd2"`)</nowiki>}}<br />
<br />
===Mailing on events===<br />
You need a smtp mail server (sendmail) or at least an email forwarder (ssmtp/msmtp). Be sure you have configured an email in {{ic|/etc/mdadm.conf}}<br />
<br />
# mdadm --monitor --scan --test<br />
<br />
When it is ready you can enable the service<br />
<br />
# systemctl enable mdadm.service<br />
<br />
==Troubleshooting==<br />
If you are getting error when you reboot about "invalid raid superblock magic" and you have additional hard drives other than the ones you installed to, check that your hard drive order is correct. During installation, your RAID devices may be hdd, hde and hdf, but during boot they may be hda, hdb and hdc. Adjust your kernel line accordingly. This is what happened to me anyway.<br />
<br />
===Start arrays read-only===<br />
When an md array is started, the superblock will be written, and resync may begin. To start read-only set the kernel module {{ic|md_mod}} parameter {{ic|start_ro}}. When this is set, new arrays get an 'auto-ro' mode, which disables all internal io (superblock updates, resync, recovery) and is automatically switched to 'rw' when the first write request arrives.<br />
<br />
{{Note|The array can be set to true 'ro' mode using {{ic|mdadm -r}} before the first write request, or resync can be started without a write using {{ic|mdadm -w}}.}}<br />
<br />
To set the parameter at boot, add {{ic|<nowiki>md_mod.start_ro=1</nowiki>}} to your kernel line.<br />
<br />
Or set it at module load time from {{ic|/etc/modprobe.d/}} file or from directly from {{ic|/sys/}}.<br />
{{bc|echo 1 > /sys/module/md_mod/parameters/start_ro}}<br />
<br />
===Recovering from a broken or missing drive in the raid===<br />
You might get the above mentioned error also when one of the drives breaks for whatever reason. In that case you will have to force the raid to still turn on even with one disk short. Type this (change where needed):<br />
# mdadm --manage /dev/md0 --run<br />
<br />
Now you should be able to mount it again with something like this (if you had it in fstab):<br />
# mount /dev/md0<br />
<br />
Now the raid should be working again and available to use, however with one disk short! So, to add that one disc partition it the way like described above in [[#Prepare_the_device|Prepare the device]]. Once that is done you can add the new disk to the raid by doing:<br />
# mdadm --manage --add /dev/md0 /dev/sdd1<br />
<br />
If you type:<br />
# cat /proc/mdstat<br />
you probably see that the raid is now active and rebuilding.<br />
<br />
You also might want to update your configuration (see: [[#Update configuration file]]).<br />
<br />
== Benchmarking ==<br />
There are several tools for benchmarking a RAID. The most notable improvement is the speed increase when multiple threads are reading from the same RAID volume.<br />
<br />
[http://sourceforge.net/projects/tiobench/ Tiobench] specifically benchmarks these performance improvements by measuring fully-threaded I/O on the disk.<br />
<br />
[http://www.coker.com.au/bonnie++/ Bonnie++] tests database type access to one or more files, and creation, reading, and deleting of small files which can simulate the usage of programs such as Squid, INN, or Maildir format e-mail. The enclosed [http://www.coker.com.au/bonnie++/zcav/ ZCAV] program tests the performance of different zones of a hard drive without writing any data to the disk.<br />
<br />
{{ic|hdparm}} should '''NOT''' be used to benchmark a RAID, because it provides very inconsistent results.<br />
<br />
== See also ==<br />
* [http://en.gentoo-wiki.com/wiki/RAID/Software RAID/Software] on the Gentoo Wiki<br />
* [http://en.gentoo-wiki.com/wiki/Software_RAID_Install Software RAID Install] on the Gentoo Wiki<br />
* [http://www.gentoo.org/doc/en/articles/software-raid-p1.xml Software RAID in the new Linux 2.4 kernel, Part 1] and [http://www.gentoo.org/doc/en/articles/software-raid-p2.xml Part 2] in the Gentoo Linux Docs<br />
* [http://raid.wiki.kernel.org/index.php/Linux_Raid Linux RAID wiki entry] on The Linux Kernel Archives<br />
* [http://linux-101.org/howto/arch-linux-software-raid-installation-guide Arch Linux software RAID installation guide] on Linux 101<br />
* [http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/ch-raid.html Chapter 15: Redundant Array of Independent Disks (RAID)] of Red Hat Enterprise Linux 6 Documentation<br />
* [http://tldp.org/FAQ/Linux-RAID-FAQ/x37.html Linux-RAID FAQ] on the Linux Documentation Project<br />
* [http://support.dell.com/support/topics/global.aspx/support/entvideos/raid?c=us&l=en&s=gen Dell.com Raid Tutorial] - Interactive Walkthrough of Raid<br />
* [http://www.miracleas.com/BAARF/ BAARF] including ''[http://www.miracleas.com/BAARF/RAID5_versus_RAID10.txt Why should I not use RAID 5?]'' by Art S. Kagel<br />
* [http://www.linux-mag.com/id/7924/ Introduction to RAID], [http://www.linux-mag.com/id/7931/ Nested-RAID: RAID-5 and RAID-6 Based Configurations], [http://www.linux-mag.com/id/7928/ Intro to Nested-RAID: RAID-01 and RAID-10], and [http://www.linux-mag.com/id/7932/ Nested-RAID: The Triple Lindy] in Linux Magazine<br />
* [http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html HowTo: Speed Up Linux Software Raid Building And Re-syncing]<br />
* [http://fomori.org/blog/?p=94 RAID5-Server to hold all your data]<br />
<br />
'''mdadm'''<br />
* [http://anonscm.debian.org/gitweb/?p=pkg-mdadm/mdadm.git;a=blob_plain;f=debian/FAQ;hb=HEAD Debian mdadm FAQ]<br />
* [http://www.kernel.org/pub/linux/utils/raid/mdadm/ mdadm source code]<br />
* [http://www.linux-mag.com/id/7939/ Software RAID on Linux with mdadm] in Linux Magazine<br />
<br />
'''Forum threads'''<br />
* [http://forums.overclockers.com.au/showthread.php?t=865333 Raid Performance Improvements with bitmaps]<br />
* [https://bbs.archlinux.org/viewtopic.php?id=125445 GRUB and GRUB2]<br />
* [https://bbs.archlinux.org/viewtopic.php?id=123698 Can't install grub2 on software RAID]<br />
* [http://forums.gentoo.org/viewtopic-t-888624-start-0.html Use RAID metadata 1.2 in boot and root partition]<br />
<br />
'''RAID with encryption'''<br />
* [http://www.shimari.com/dm-crypt-on-raid/ Linux/Fedora: Encrypt /home and swap over RAID with dm-crypt] by Justin Wells</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Archiso_(Nederlands)&diff=265411Archiso (Nederlands)2013-07-07T22:06:30Z<p>JoshuaBranson: I changed the hooks from 'pata sata scsi' to 'block', which is requested on the Arch wiki requests page.</p>
<hr />
<div>[[Category:Nederlands]]<br />
[[el:Archiso]]<br />
[[en:Archiso]]<br />
[[fr:Archiso]]<br />
[[it:Archiso]]<br />
[[ru:Archiso]]<br />
[[uk:Archiso]]<br />
== WORK in progress ==<br />
<br />
== Wat is het? ==<br />
'''Archiso''' is een aantal bash scripts dat in staat is om een volledig functionerend op '''Arch Linux''' gebaseerde live CD/DCD en USB '''images''' te maken. Het is een erg basale tool en kan dus worden gebruikt voor herstell CDs, installatie CDs of live CD/DVD/USB voor een specifieke doelgroep. En wie weet wat nog meer. Simpelweg gezegd, het gaat hier over Arch op een mooie zilveren onderzetter.<br />
Hart en ziel van Archiso is '''mkarchiso'''. Alle opties zijn gedocumenteerd in de help output, dus direct gebruik van dit bestand zal hier niet worden besproken. Echter, deze wiki artikel zal dienen als een gids om uw eigen live media uit te rollen in een zeer korte tijd!<br />
<br />
Door recente aanpassingen zal '''Archiso''' nu automatisch ISO images creeeren die ook dienen als USB images! Seperate CD/USB doelen zijn daardoor niet meer nodig.<br />
<br />
== De meest kale Arch Linux live media bouwen. ==<br />
<br />
{{Note|Werken in een schone chroot is niet nodig maar wel aangeraden}}<br />
<br />
* Installeer devtools indien nodig, mkarchroot heeft dit nodig.<br />
[host] # pacman -S devtools --needed<br />
<br />
* Creëer een basis chroot om in te werken.<br />
{{Note|prefix met linux32 als je een 32 bits omgeving wilt bouwen onder 64 bits}}<br />
[host] # mkarchroot /tmp/chroot base<br />
<br />
* Installeer archiso onder chroot '''(AUR methode)'''<br />
Halen van: [https://aur.archlinux.org/packages.php?ID=25996 archiso-git AUR package]<br />
[host] # pacman -U archiso-git-YYYYMMDD-R-any.pkg.tar.xz -r /tmp/chroot<br />
<br />
* Installeer archiso '''(GIT methode)'''<br />
[host] # pacman -S git make --needed<br />
[host] # git clone git://projects.archlinux.org/archiso.git<br />
[host] # make -C archiso/archiso DESTDIR=/tmp/chroot install<br />
<br />
* Chroot betreden.<br />
{{Note|prefix met linux32 indien nodig}}<br />
[host] # mkarchroot -r bash /tmp/chroot<br />
<br />
* Creëer een loopback device.<br />
{{Note|mkarchroot maakt deze niet. Gebruik een ander cijfer indien niet aanwezig}}<br />
[chroot] # mknod /dev/loop0 b 7 0<br />
<br />
* Een mirror instellen<br />
{{Note|Verander MIRROR naar believen}}<br />
[chroot] # echo 'Server = MIRROR/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist<br />
<br />
* Installeer aditionale packages nodig voor archiso '''(aleen als de GIT methode is gebruikt)'''<br />
[chroot] # pacman -S devtools squashfs-tools syslinux cdrkit<br />
<br />
* Bouw een basis ISO.<br />
[chroot] # cp -r /usr/share/archiso/configs/baseline /tmp<br />
[chroot] # cd /tmp/baseline<br />
[chroot] # ./build.sh<br />
<br />
* Chroot verlaten.<br />
[chroot] # exit<br />
<br />
<br />
== Algemene (handmatig) ==<br />
<br />
* Setup a base filesystem<br />
mkarchiso -p "base" create work/root-image<br />
<br />
* Install syslinux<br />
mkarchiso -p "syslinux" create work/root-image<br />
<br />
* Install other packages (optional)<br />
mkarchiso -p "pkg1 pkg2 pkg3 ... pkgN" create work/root-image.<br />
<br />
* At this point, customize anything what you want in root-image.<br />
<br />
mkarchroot -n -r bash work/root-image<br />
<br />
* Setup initramfs image.<br />
<br />
** Create a config for mkinitcpio '''mkinitcpio.conf'''<br />
HOOKS="base udev archiso sata filesystems"<br />
COMPRESSION="xz"<br />
<br />
** Generate the initramfs image<br />
mkinitcpio -c ./mkinitcpio.conf -b work/root-image -k 2.6.39-ARCH -g work/iso/arch/boot/i686/archiso.img<br />
<br />
* Move kernel to boot/<br />
mv work/root-image/boot/vmlinuz26 work/iso/arch/boot/i686<br />
<br />
* Setup syslinux<br />
<br />
** Create a directory for it.<br />
mkdir -p work/iso/arch/boot/syslinux<br />
<br />
** Create a '''work/iso/arch/boot/syslinux/syslinux.cfg''' file.<br />
<br />
<pre><br />
DEFAULT menu.c32<br />
PROMPT 0<br />
MENU TITLE Arch Linux<br />
TIMEOUT 300<br />
<br />
LABEL arch<br />
MENU LABEL Arch Linux<br />
LINUX /arch/boot/i686/vmlinuz26<br />
INITRD /arch/boot/i686/archiso.img<br />
APPEND archisolabel=MY_ARCH<br />
<br />
ONTIMEOUT arch<br />
</pre><br />
<br />
** Copy menu.c32 needed by previous config.<br />
cp work/root-image/usr/lib/syslinux/menu.c32 work/iso/arch/boot/syslinux/<br />
<br />
* Setup isolinux (optional, only needed for booteable iso)<br />
<br />
mkdir work/iso/isolinux<br />
cp work/root-image/usr/lib/syslinux/isolinux.bin work/iso/isolinux/<br />
<br />
** Create a '''work/iso/isolinux/isolinux.cfg'''<br />
<pre><br />
DEFAULT loadconfig<br />
<br />
LABEL loadconfig<br />
CONFIG /arch/boot/syslinux/syslinux.cfg<br />
APPEND /arch/boot/syslinux/<br />
</pre><br />
<br />
* Create an '''work/arch/aitab''' file.<br />
# <img> <mnt> <arch> <sfs_comp> <fs_type> <fs_size><br />
root-image / i686 xz ext4 50%<br />
<br />
* Build all filesystem images specified in aitab (.fs .fs.sfs .sfs)<br />
mkarchiso prepare work<br />
<br />
* Generate an ISO 9660 with "El Torito" boot image (optional)<br />
mkarchiso -L "MY_ARCH" iso work "my-arch.iso"<br />
<br />
== Make a booteable "pendrive" that have more things than "Arch Linux" ==<br />
<br />
Copy "work/iso/arch" directory to some partition (must be booteable) that you have on the desired medium.<br />
<br />
cp -r work/iso/arch /mnt/pen1<br />
<br />
If partition is "vfat" run syslinux and set LABEL.<br />
syslinux -i -d /mnt/pen1/arch/boot/syslinux /dev/pen1<br />
{{Note|Due bug in mmove (from mtools), ldlinux.sys install fails, you can workaround with:}}<br />
mv /mnt/pen1/arch/boot/syslinux /mnt/pen1/syslinux<br />
syslinux -i -d /mnt/syslinux /dev/pen1<br />
mv /mnt/pen1/ldlinux.sys /mnt/pen1/syslinux<br />
<br />
dosfslabel /dev/pen1 MY_ARCH<br />
<br />
If partition is ext2/3/4 or btrfs run extlinux and set LABEL.<br />
extlinux -i /mnt/pen1/arch/boot/syslinux<br />
e2label /dev/pen1 MY_ARCH<br />
<br />
Finally install the master boot sector code.<br />
cat /usr/lib/syslinux/mbr.bin > /dev/pen<br />
<br />
== Configure our live medium ==<br />
<br />
=== mkinitcpio.conf ===<br />
<br />
An ''initcpio'' is necessary for creating a system that is able to "wake-up" from a CD/DVD/USB.<br />
<br />
Therefore, you should create a mkinitcpio.conf that holds a list of our hooks:<br />
$ vim mkinitcpio.conf<br />
A typical set of hooks for archiso looks something like this:<br />
HOOKS="base udev memdisk archiso archiso_pxe_nbd archiso_loop_mnt block usb fw pcmcia filesystems usbinput"<br />
<br />
This list will get you a system that can be booted off a CD/DVD or a USB device. It's worth mentioning that hardware auto-detection and things of that nature do not belong here. Only what's necessary to get the system on its feet, and out of the ''initcpio'' really belong here, fancier stuff can be done on the booted system anyway.<br />
<br />
=== packages.list ===<br />
<br />
You'll also want to create a list of packages you want installed on your live CD system. A file full of package names, one-per-line, is the format for this. This is '''''great''''' for special interest live CDs, just specify packages you want and bake the image.<br />
<br />
{{Tip|You can also create a '''[[custom local repository]]''' for the purpose of preparing custom packages or packages from [[AUR]]/[[ABS]]. Just add your local repository at the first position (for top priority) of your build machine's '''pacman.conf''' and you are good to go!}}<br />
<br />
=== aitab ===<br />
<br />
The aitab file holds information about the filesystems images that must be created by mkarchiso and mounted at initramfs stage from the archiso hook.<br />
It consists of some fields which define the behaviour of images.<br />
<br />
# <img> <mnt> <arch> <sfs_comp> <fs_type> <fs_size><br />
<br />
; <img>: Image name without extension (.fs .fs.sfs .sfs).<br />
; <mnt>: Mount point.<br />
; <arch>: Architecture { i686 | x86_64 | any }.<br />
; <sfs_comp>: SquashFS compression type { gzip | lzo | xz }. A special value of "none" denotes no usage of SquashFS.<br />
; <fs_type>: Set the filesystem type of the image { ext4 | ext3 | ext2 | xfs }. A special value of "none" denotes no usage of a filesystem. In that case all files are pushed directly to SquashFS filesystem.<br />
; <fs_size>: An absolute value of file system image size in MiB (example: 100, 1000, 4096, etc) A relative value of file system free space [in percent] {1%..99%} (example 50%, 10%, 7%). This is an estimation, and calculated in a simple way. Space used + 10% (estimated for metadata overhead) + desired %<br />
<br />
{{Note|Some combinations are invalid. Example both sfs_comp and fs_type are set to none}}<br />
<br />
==== Boot Loader ====<br />
<br />
<pre><br />
DEFAULT menu.c32<br />
PROMPT 0<br />
MENU TITLE Arch Linux<br />
TIMEOUT 300<br />
<br />
LABEL arch<br />
MENU LABEL Arch Linux<br />
LINUX /%INSTALL_DIR%/boot/%ARCH%/vmlinuz26<br />
INITRD /%INSTALL_DIR%/boot/%ARCH%/archiso.img<br />
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%<br />
<br />
ONTIMEOUT arch<br />
</pre><br />
<br />
Due to the modular nature of isolinux, you are able to use lots of addons since all *.c32 files are copied and available to you. Take a look at the [http://syslinux.zytor.com/wiki/index.php/SYSLINUX official syslinux site] and the [https://projects.archlinux.org/archiso.git/tree/configs/syslinux-iso/boot-files archiso git repo]. Using said addons, it is possible to make visually attractive and complex menus. See [http://syslinux.zytor.com/wiki/index.php/Comboot/menu.c32 here].<br />
<br />
==== Adding a fstab ====<br />
It is required to add a '''fstab''' file in /etc:<br />
<br />
<pre><br />
# <file system> <dir> <type> <options> <dump> <pass><br />
/dev/mapper/root-image / auto defaults 0 0<br />
</pre><br />
<br />
==== Finishing the root-image ====<br />
Some tips that will not be covered in this article because there are other articles on this wiki that already do:<br />
*Adding an user.<br />
*Configure an ''inittab'' to start into X at boot time<br />
*Configure the ''hosts'' file<br />
*Configure ''rc.conf'' (no fancy modules required here)<br />
*Configure ''sudoers''<br />
*Configure ''rc.local''<br />
*Put more stuff into etc/skel<br />
*Put additional artworks onto the medium <br />
*Put arbitrary binary stuff into opt/<br />
<br />
== See also ==<br />
*[https://projects.archlinux.org/?p=archiso.git;a=summary Archiso project page]<br />
*[[Archiso_as_pxe_server|Archiso as pxe server]]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Archiso_(%D0%A3%D0%BA%D1%80%D0%B0%D1%97%D0%BD%D1%81%D1%8C%D0%BA%D0%B0)&diff=265410Archiso (Українська)2013-07-07T22:05:52Z<p>JoshuaBranson: I changed the hooks from 'pata sata scsi' to 'block', which is requested on the Arch wiki requests page.</p>
<hr />
<div>[[Category:Live Arch systems (Українська)]]<br />
[[Category:HOWTOs (Українська)]]<br />
[[el:Archiso]]<br />
[[en:Archiso]]<br />
[[fr:Archiso]]<br />
[[it:Archiso]]<br />
[[nl:Archiso]]<br />
[[ru:Archiso]]<br />
== Що це? ==<br />
'''Archiso''' - набір bash скриптів, призначених для створення повністю функціональних Live-CD/DVD і Live-USB на базі Arch Linux. Це досить гнучкий інструмент, який може бути використаний як для створення дисків відновлення або встановлення, так і для спеціалізованих live-CD/DVD/USB систем.<br />
Центр Archiso - '''mkarchiso'''. Для отримання детального опису всіх його опцій досить викликати його без параметрів, так що тут буде описано тільки створення live диска своїми руками.<br />
<br />
Завдяки останнім доробкам Archiso тепер створює такі ISO образи, котрі можна записати як на диск, так і на USB flash носій.<br />
<br />
== Установка Archiso ==<br />
<br />
Archiso можна встановити двома способами:<br />
<br />
*Через [https://aur.archlinux.org/packages.php?ID=25996 AUR] (рекомендується использовать [[Yaourt_(Русский)|yaourt]])(рекомендований метод)<br />
*Самостійно поставити з Git:<br />
$ git clone git://projects.archlinux.org/archiso.git<br />
$ cd archiso/archiso<br />
$ sudo make install<br />
$ sudo pacman -S mkinitcpio cdrkit squashfs-tools devtools syslinux mkinitcpio-nfs-utils nbd<br />
<br />
{{Note| Зараз Archiso, що міститься в [[Official_Repositories|extra]], застарілий та не відповідає даній статті.}}<br />
<br />
== Конфігурація створюваної системи ==<br />
<br />
=== Makefile ===<br />
Спочатку створимо окрему директорію для роботи і перейдемо до неї.<br />
$ mkdir myarch && cd myarch<br />
Тепер створимо Makefile та пропишемо туда наступні інструкції.<br />
$ vim Makefile<br />
Нижче ви знайдете приклад Makefile.<br />
{{Warning | Всі відступи в файлі робити табуляцією. На пробіли буде матюкатись.}}<br />
<br />
{{Warning | В ранніх версіях працювала команда "mkinitcpio -c mkinitcpio.conf..." так чи інакше (можливо, через останні оновлення) тепер, якщо скрипт не может знайти конфіг-файл, вказуйте до нього повний шлях в mkinitcpio.conf, інакше ви можете отримати пустий initcpio на виході, через що отримана система не будет завантажуватись (VFS error, kernel panic)}}<br />
<br />
<code><br />
#### Редагуйте даний файл для модифікації кінцевої системи.<br />
# Рабочая директория для построения системы.<br />
'''WORKDIR=work'''<br />
# Список устанавливаемых приложений, either space separated in a string or line separated in a file. Может включать группы.<br />
'''PACKAGES="$(shell cat packages.list) syslinux"'''<br />
# Имя дистрибутива. Не зависит от/не определяет целевую архитектуру.<br />
'''NAME=myarch'''<br />
# Версия дистрибутива.<br />
'''VER=1.00'''<br />
# Версия ядра.<br />
'''KVER=2.6.32-ARCH'''<br />
# Архитектура.<br />
'''ARCH?=$(shell uname -m)'''<br />
# Директория, в которой находился пользователь, запустивший скрипт<br />
'''PWD:=$(shell pwd)'''<br />
# Полное (финальное) имя образа.<br />
'''FULLNAME="$(PWD)"/$(NAME)-$(VER)-$(ARCH)'''<br />
<br />
# Умолчальная инструкция make'у, для компиляции всего(?) (оригинал:"Default make instruction to build everything.")<br />
'''all: myarch'''<br />
<br />
# Запуск ''base-fs'' перед сборкой финального ISO образа.<br />
'''myarch: base-fs'''<br />
'''mkarchiso -p syslinux iso "$(WORKDIR)" "$(FULLNAME)".iso'''<br />
<br />
# Основное правило для процесса создания файловой системы образа. Приложения отрабатывают слева на право.<br />
# Тоесть, сначала ''root-image'' в конце - ''syslinux''.<br />
'''base-fs: root-image boot-files initcpio overlay iso-mounts syslinux'''<br />
<br />
# ''root-image'' всегда запускается первым. <br />
# Скачивание и установка приложений в ''$WORKDIR''.<br />
'''root-image: "$(WORKDIR)"/root-image/.arch-chroot'''<br />
'''"$(WORKDIR)"/root-image/.arch-chroot:'''<br />
'''root-image:'''<br />
'''mkarchiso -p $(PACKAGES) create "$(WORKDIR)"'''<br />
<br />
# Правило для создания /boot<br />
'''boot-files: root-image'''<br />
'''cp -r "$(WORKDIR)"/root-image/boot "$(WORKDIR)"/iso/'''<br />
'''cp -r boot-files/* "$(WORKDIR)"/iso/boot/'''<br />
<br />
# Правило для образов initcpio<br />
'''initcpio: "$(WORKDIR)"/iso/boot/myarch.img'''<br />
'''"$(WORKDIR)"/iso/boot/myarch.img: mkinitcpio.conf "$(WORKDIR)"/root-image/.arch-chroot'''<br />
'''mkdir -p "$(WORKDIR)"/iso/boot'''<br />
'''mkinitcpio -c ./mkinitcpio.conf -b "$(WORKDIR)"/root-image -k $(KVER) -g $@'''<br />
<br />
# Подробнее см.: [[#overlay|Overlay]]<br />
'''overlay:'''<br />
'''mkdir -p "$(WORKDIR)"/overlay/etc/pacman.d'''<br />
'''cp -r overlay "$(WORKDIR)"/'''<br />
'''wget -O "$(WORKDIR)"/overlay/etc/pacman.d/mirrorlist https://www.archlinux.org/mirrorlist/$(ARCH)/all/'''<br />
'''sed -i "s/#Server/Server/g" "$(WORKDIR)"/overlay/etc/pacman.d/mirrorlist'''<br />
<br />
# Правило для создания isomounts.'''<br />
'''iso-mounts: "$(WORKDIR)"/isomounts'''<br />
'''"$(WORKDIR)"/isomounts: isomounts root-image'''<br />
'''sed "s|@ARCH@|$(ARCH)|g" isomounts > $@'''<br />
<br />
# Исполняется перед генерацией финального образа.<br />
'''syslinux: root-image'''<br />
'''mkdir -p $(WORKDIR)/iso/boot/isolinux'''<br />
'''cp $(WORKDIR)/root-image/usr/lib/syslinux/*.c32 $(WORKDIR)/iso/boot/isolinux/'''<br />
'''cp $(WORKDIR)/root-image/usr/lib/syslinux/isolinux.bin $(WORKDIR)/iso/boot/isolinux/'''<br />
<br />
# При вызове "make clean" отчищает систему от вчего, созданного в процессе создания образа.<br />
'''clean:'''<br />
'''rm -rf "$(WORKDIR)" "$(FULLNAME)".img "$(FULLNAME)".iso'''<br />
<br />
.PHONY: all myarch<br />
.PHONY: base-fs<br />
.PHONY: root-image boot-files initcpio overlay iso-mounts<br />
.PHONY: syslinux<br />
.PHONY: clean<br />
<br />
Тоесть, при исполнении "make myarch" из под рута,происходит следующее:<br />
*'''root-image''' скачивает и устанавливает выбранные приложения в ''$WORKDIR''<br />
*'''boot-files''' готовит загрузочные файлы и копирует загрузочные скрипты<br />
*'''initcpio''' работает с ''initcpio''<br />
*'''overlay''' копирует файлы, перекрывающие базовую конфигурацию в ''root-image'' в ''$WORKDIR'' <br />
*'''iso-mounts''' немного уличной магии с применением sed, чтобы AUFS знала, куда ей монтироваться при загрузке<br />
*'''syslinux''' копирует загрузчик<br />
*'''myarch''' создаёт конечный образ, пригодный для записи на CD/DVD/флешку.<br />
</code><br />
<br />
Одного Makefile буде недостатньо, так що потрібно буде створити файли, описані нижче.<br />
<br />
=== mkinitcpio.conf ===<br />
<br />
''initcpio'' необходим для создания системы,способной загружаться с CD/DVD/USB.<br />
<br />
Создайте mkinitcpio.conf:<br />
$ vim mkinitcpio.conf<br />
Обычно он содержит следующую информацию:<br />
HOOKS="base udev archiso block usb fw filesystems usbinput"<br />
<br />
Благодаря этому ваша система сможет загружаться с CD/DVD или USB. Стоит отметить, что автоопределение железа и прочее настраивается не здесь.<br />
<br />
=== packages.list ===<br />
<br />
Вам так-же понадобится список приложений, устанавливаемых на вашу live-систему. Как минимум вам понадобятся '''base''' и '''kernel26''', но, вы вольны дополнять список приложениями на ваше усмотрение.<br />
<br />
{{Note|'''mkarchiso''' использует ''/etc/pacman.conf'' из основной системы. Если вы раскоментировали [testing], то приложения из него тоже будут использованы при создании образа.Если вы хотите использовать другой ''pacman.conf'', вы можете создать его в папке проекта и использовать командой '''mkarchiso -C pacman.conf'''Для использования выделенного ''pacman.conf''нужно добавить '''-C pacman.conf''' во все вызовы '''mkarchiso''' в Makefile.}}<br />
$ vim packages.list<br />
В список устанавливаемых пакетов будет разумно вставить, как минимум, следующее:<br />
aufs2<br />
aufs2-util<br />
base<br />
bash<br />
coreutils<br />
cpio<br />
dhcpcd<br />
dnsutils<br />
file<br />
fuse<br />
kernel26<br />
syslinux<br />
nano<br />
<br />
Этот список должен дать вам минимальную рабочую систему. Но не забывайте, что в ней не будет драйверов свыше включённых в ядро (видео, вай-фай, специализированные - их нужно будет добавить в список).<br />
<br />
{{Tip|Вы так-же можете создать '''[[custom local repository]]''' для подготовки пакетов. Просто поставьте ваш локальный репозитарий на первую позицию в используемом '''pacman.conf'''.}}<br />
<br />
=== isomounts ===<br />
<br />
Вам понадобится файл, содержащий информацию о файловых системах, монтируемых при загрузке системы.<br />
$ vim isomounts<br />
Пример ''isomounts'':<br />
# archiso isomounts file<br />
# img - location of image/directory to mount relative to addons directory<br />
# arch - architecture of this image<br />
# mount point - absolute location on the post-initrd root<br />
# type - either 'bind' or 'squashfs' for now<br />
# syntax: <img> <arch> <mount point> <type><br />
# ORDER MATTERS! Files take top-down precedence. Be careful<br />
overlay.sqfs @ARCH@ / squashfs<br />
root-image.sqfs @ARCH@ / squashfs<br />
<br />
<br />
{{warning| В конце файла должна быть пустая строка (EOF) иначе ждите, что система упадёт в kernel panic!}}<br />
<br />
=== boot-files ===<br />
<br />
Вам нужно будет добавить директорию "boot-files" и поддиректорию "isolinux/" содержащую "isolinux.cfg".<br />
<br />
{{warning|Ввиду последних изменений поддержка [[grub]] в Archiso была отменена. Пожалуйста, не используйте grub. Взамен, вы можете использовать isolinux из syslinux'а, при этом вы получите образ, который может быть записан не только на диск, но и на флэшку.}}<br />
<br />
==== Использование isolinux ====<br />
Использовать ''isolinux'' просто:<br />
$ mkdir -p boot-files/isolinux/<br />
$ vim boot-files/isolinux/isolinux.cfg<br />
<br />
Образец:<br />
prompt 1<br />
timeout 0<br />
display myarch.msg<br />
DEFAULT myarch<br />
<br />
LABEL myarch<br />
KERNEL /boot/vmlinuz26<br />
APPEND initrd=/boot/myarch.img archisolabel=XXX tmpfs_size=75% locale=en_US.UTF-8<br />
<br />
LABEL memtest86+<br />
KERNEL /boot/memtest86+-2.10.bin<br />
<br />
Возможно, вы захотите отображать сообщение над меню загрузки:<br />
$ vim boot-files/isolinux/myarch.msg<br />
<br />
Это может быть любое сообщение в ASCII:<br />
<br />
HI GENTLEMEN LOL<br />
WELCOME TO MY DISTRO<br />
I HOPE U ENJOY MAKE UR TIME<br />
HA-HA-HA<br />
(ПРЕВЕД ДЖЕНТЕЛЬМЕНЫ Ы<br />
ДОБРО ПОЖАЛОВАТЬ В МОЙ ДИСТРИБУТИВЧЕГ<br />
НАДЕЮСЬ, ВАМ ПОНРАВИТСЯ ВРЕМЯ, КОТОРОЕ ВЫ НА НЕГО ПОТРАТИТЕ<br />
ГЫ-ГЫ-ГЫ)<br />
Обратите внимание, что вам нужно будет где-нибудь достать memtest*.bin потому как в "поставку по умолчанию" он не входит. Если вы не хотите его использовать - закоментируйте.<br />
<br />
Благодаря модульной структуре isolinux вы можете использовать большое колличество аддонов, потому что все *.c32 файлы скопированны и доступны вам. Подробней можете посмотреть [http://syslinux.zytor.com/wiki/index.php/SYSLINUX официальный сайт syslinux] и [https://projects.archlinux.org/archiso.git/tree/configs/syslinux-iso/boot-files archiso git-репозитарий]. Использование вышеперечисленных аддонов позволяет создавать красивые и сложные меню. Подробнее см. [http://syslinux.zytor.com/wiki/index.php/Comboot/menu.c32 тут].<br />
<br />
=== overlay ===<br />
'''overlay''' предназначен для включения в дистрибутив бинарных репозитариев, конфигов, отличающихся от умолчальных и прочего. ''mkarchiso'' требует помещения всех файлов, предназначенных для оверлея, в одну директорию. Оверлей будет наложен на систему во время загрузки используя ''AUFS''. Структура папки, содержащей файлы оверлея, должна повторять корневую систему.<br />
<br />
Все файлы и директории, не существующие в оригинальной системе, но существующие в оверлее, будут созданы.<br />
Все файлы и директории существующие в оригинальной системе и в оверлее, будут перезаписаны оверлеем.<br />
<br />
Создаём ''overlay'':<br />
$ mkdir overlay && cd overlay/<br />
<br />
Это было легко, теперь надо наполнить оверлей полезняшками. Несколько примеров: <br />
<br />
'''''Note:''' Важно, чтобы всем файлам в оверлее были назначены правильные права доступа.Поэтому все изменения в директории оврелея рекомендуется производить из под рута.''<br />
<br />
==== Добавление fstab ====<br />
Если нужно добавить '''fstab''':<br />
$ mkdir etc<br />
$ vim etc/fstab<br />
<br />
aufs / aufs noauto 0 0<br />
none /dev/pts devpts defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
<br />
==== Добавление пользователя ====<br />
<br />
===== Вручную =====<br />
Так или иначе, но вам понядобятся пользователи в вашей live-системе. Есть много способов их добавления.Один из - скопировать файлы, для этого требуемые из корневой системы, и привести их в вид, удовлетворяющий вашим требованиям:<br />
<br />
$ cp /etc/group etc/group<br />
$ cp /etc/passwd etc/passwd<br />
$ cp /etc/shadow etc/shadow<br />
<br />
'''''Note:''' Не оставляёте зашифрованный пароль passwd или shadow файле! Пароль находится на второй позиции (после первого ':').''<br />
<br />
Пример безпарольного пользователя: <br />
root::99999::::::<br />
<br />
Так-же не забудьте создать домашнюю папку для пользователя (не забудьте изменить домашнюю папку в ''passwd''). Для создания домашней папки во время загрузки и добавления туда /etc/skel пользовательской папки можно использовать rc.local. Если про /etc/skel в слышите впервые, вам, и правда, следует об этом прочесть.<br />
$ vim etc/rc.local<br />
mkdir /home/archie && chown archie:archie /home/archie<br />
su -c "cp -r /etc/skel/.[a-zA-Z0-9]* /home/archie/" archie<br />
<br />
===== Используя useradd =====<br />
Другим способом добавления пользователя является использование ''etc/rc.local'' для создания пользователя при загрузке:<br />
$ vim etc/rc.local<br />
<br />
useradd -u 1000 -g users -G storage,floppy,optical,audio,video,network,games,wheel,disk -d /home/archie archie<br />
<br />
Это создаст пользователя и домашнюю директорию для него.<br />
<br />
==== Добавление чего-либо в домашнюю директорию пользователя при загрузке ====<br />
Возможно, вы захотите добавить какие-то файлы кофигурации для пользователя live-системы.<br />
<br />
Вам нужно будет создать следующую директорию, и поместить желаемое туда:<br />
$ mkdir etc/skel<br />
<br />
Для примера:<br />
$ vim etc/skel/.bashrc <br />
<br />
alias ls='ls --color=auto'<br />
PS1='[\u@\h \W]\$ '<br />
<br />
Описание всего, что можно сделать таким образом, значительно выходит за рамки данной статьи.<br />
<br />
'''''Note:''' Не пытайтесь использовать оверлей для прямого изменения /home/user/, это вызовет ошибки в правах доступа! Используйте /etc/skel/.''<br />
<br />
==== Закрытие темы оверлея ====<br />
Некоторые темы, не рассмотренные в данной статье (потому как рассмотрены в вики):<br />
*Конфигурация ''inittab'' для старта Х во время загрузки<br />
*Конфигурация ''hosts''<br />
*Конфигурация ''rc.conf''<br />
*Конфигурация ''sudoers''<br />
*Конфигурация ''rc.local''<br />
*Добавление большего колличества полезняшек etc/skel<br />
*Добавление большего колличества графического оформления<br />
*Добавление разнообраных бинарников в opt/<br />
<br />
== Генерация образа ==<br />
После всего времени, потраченного на конфигурацию, осталась самая приятная часть: Создание образа.<br />
<br />
Это легко: Из под рута (это важно!) выполните следующую команду в директории вашего проекта (там, где лежит ''Makefile''):<br />
$ make all<br />
На выходе вы получите .iso, готовый для записи на CD/DVD или USB: <br />
dd if=my-image.iso of=/dev/some-usb-drive bs=8M<br />
<br />
{{Note| Если на флеш носителе более одного раздела, не забудьте присвоить метку разделу, содержащему live-систему. Иначе с него будет не возможно загрузиться.}}<br />
{{warning|Осторожней с <tt>dd</tt>! Если вы используете его на не том устройстве, данные будет практически не возможно восстановить. Используйте с осторожностью.}}<br />
<br />
== Links ==<br />
[https://projects.archlinux.org/?p=archiso.git;a=summary Archiso project page]<br />
<br />
[[Arch Based Distributions (Active)]]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Uswsusp&diff=265409Uswsusp2013-07-07T22:04:48Z<p>JoshuaBranson: I changed the hooks from 'pata sata scsi' to 'block', which is requested on the Arch wiki requests page.</p>
<hr />
<div>[[Category:Power management]]<br />
{{Article summary start}}<br />
{{Article summary text|Describes installing, configuring and using uswsusp, a set of userspace tools used for suspending to disk and/or to RAM.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Suspending to RAM with hibernate-script}}<br />
{{Article summary wiki|Suspending to Disk with hibernate-script}}<br />
{{Article summary wiki|Pm-utils}}<br />
{{Article summary wiki|Tuxonice}}<br />
{{Article summary end}}<br />
<br />
[http://suspend.sourceforge.net/ uswsusp] (userspace software suspend) is a set of user space tools used for hibernation (suspend-to-disk) and suspend (suspend-to-RAM or standby) on Linux systems.<br />
It consists of:<br />
* '''s2ram''' - a wrapper around the kernel's suspend-to-RAM mechanism allowing the user to perform some graphics adapter manipulations from the user land before suspending and after resuming that may help to bring the graphics (and the entire system) back to life after the resume. Incorporates the functionality of vbetool and radeontool as well as some tricks of its own. Includes a list of working hardware configurations along with the appropriate sets of operations to be performed to resume them successfully. This is accomplished by a hardware whitelist maintained by HAL - '''s2ram''' translates the HAL database options into '''s2ram''' parameters.<br />
:{{Note|Since HAL is deprecated and KMS drivers can save the state of the grahic card directly without userspace quirks, '''s2ram''' development is discontinued and no further whitelist entries are accepted. If a KMS driver is in use, '''s2ram''' will directly suspend the machine.}}<br />
* '''s2disk''' - the reference implementation of the userspace software suspend (µswsusp); it coordinates the steps necessary to suspend the system (such as freezing the processes, preparing the swap space, etc.) and handles image writing and reading. s2disk already supports compression and encryption of the image and other features (e.g. a nice progress bar, saving the image on a remote disk, playing tetris while resuming, etc.) can be easily added.<br />
<br />
* '''s2both''' - combines the funtionalities of s2ram and s2disk and it's very useful when the battery is almost depleted. s2both writes the system snapshot to the swap (just like s2disk) but then puts the machine into STR (just like s2ram). If the battery has enough power left you can quickly resume from STR, otherwise you can still resume from disk without losing your work. <br />
<br />
== Installation ==<br />
<br />
uswsusp is available in the [[AUR]] under the name [https://aur.archlinux.org/packages.php?ID=44473 uswsusp-git].<br />
<br />
== Configuration ==<br />
<br />
You must edit {{ic|/etc/suspend.conf}} before attempting to suspend to disk.<br />
<br />
* If using a swap partition:<br />
resume device = /dev/disk/by-label/swap<br />
<br />
where {{ic|/dev/disk/by-label/swap}} must be replaced with the correct block device containing the swap partition.<br />
<br />
* If using a [[Swap#swap_file|swap file]]:<br />
resume device = /dev/sdX # the partition which contains swapfile <br />
resume offset = 123456<br />
<br />
where 123456 is the offset from the beginning of the resume device where the swap file's header is located. To obtain the offset, you can check [[Swap#Swap_file_resuming|Swap file resuming]].<br />
The resume offset can be obtained by running<br />
<br />
# swap-offset your-swap-file<br />
<br />
* The {{ic|image size}} parameter (optional) can be used to limit the size of the system snapshot image created by s2disk. If it's not possible to create an image of the desired size, s2disk will suspend anyway, using a bigger image. If image size is set to 0, the image will be as small as possible.<br />
<br />
* The {{ic|shutdown method}} parameter (optional) specifies the operation that will be carried out when the machine is ready to be powered off. If set to "reboot" the machine will be rebooted immediately. If set to "platform" the machine will be shut down using special power management operations available from the kernel that may be necessary for the hardware to be properly reinitialized after the resume, and may cause the system to resume faster.<br />
<br />
* If the {{ic|compute checksum}} parameter is set to 'y', the s2disk and resume tools will use the MD5 algorithm to verify the image integrity.<br />
<br />
* If the {{ic|compress}} parameter is set to 'y', the s2disk and resume tools will use the LZF compression algorithm to compress/decompress the image.<br />
<br />
* If {{ic|splash}} is set to 'y', s2disk and/or resume will use a splash system. Currently splashy and fbsplash are supported. {{Note|This requires additional {{ic|configure}} flags for uswsusp ({{ic|--enable-splashy}} and {{ic|--enable-fbsplash}}, respectively).}}<br />
<br />
* The {{ic|resume pause}} option will introduce a delay after successfully resuming from hibernation, in order to allow the user to read the stats (read and write speed, image size, etc.)<br />
<br />
* If {{ic|threads}} is enabled, s2disk will use several threads for compressing, encrypting and writing the image. This is supposed to speed things up. For details, read the comments in [http://git.kernel.org/?p=linux/kernel/git/rafael/suspend-utils.git;a=blob;f=suspend.c;h=166a62f03ea9daaba271e7cebf94c76881d4266f;hb=HEAD suspend.c]<br />
<br />
=== Support for encryption ===<br />
* generate a key with the suspend-keygen utility included in the package;<br />
* write the name of the key in {{Ic|/etc/suspend.conf}};<br />
encrypt = y<br />
RSA key file = <path_to_keyfile><br />
<br />
=== Recreate initramfs ===<br />
{{Note|Whenever you modify {{ic|/etc/suspend.conf}}, '''you will need to rebuild''' your initramfs. If you fail to do so, and linux cannot find your image at startup, you will not see an error message indicating this. Your boot process will hang after starting the {{ic|uresume}} hook, typically after the message with the libgcrypt version.}} <br />
Edit your {{ic|/etc/mkinitcpio.conf}} file and add "uresume" to the HOOKS entry.<br />
HOOKS="base udev autodetect block '''uresume''' filesystems"<br />
* rebuild the ramdisk<br />
# mkinitcpio -p linux<br />
<br />
=== Sample config ===<br />
<br />
{{hc|/etc/suspend.conf|2=<br />
snapshot device = /dev/snapshot<br />
<br />
resume device = /dev/disk/by-label/swap<br />
<br />
# image size is in bytes<br />
image size = 1468006400<br />
<br />
#suspend loglevel = 2<br />
<br />
compute checksum = y<br />
<br />
compress = y<br />
<br />
#encrypt = y<br />
<br />
#early writeout = y<br />
<br />
#splash = y<br />
<br />
# up to 60 (seconds)<br />
#resume pause = 30 <br />
<br />
threads = y<br />
}}<br />
<br />
== Usage ==<br />
<br />
=== Standalone ===<br />
<br />
To suspend to disk, run:<br />
<br />
# s2disk<br />
<br />
To suspend to ram, first run:<br />
<br />
# s2ram --test<br />
<br />
to see if your machine is in the database of machines known to work. If it returns something like "Machine matched entry xyz" then go ahead and run:<br />
<br />
# s2ram<br />
<br />
Otherwise, the --force parameter will be necessary, possibly combined with other parameters (see {{ic|s2ram --help}}). It may fail.<br />
<br />
Now you could try to suspend directly calling s2disk from the command line:<br />
# s2disk<br />
<br />
It is probably necessary to resort to a userspace tool which calls internally s2disk, like [[Pm-utils]] or hibernate-script. See [[Suspending to Disk with hibernate-script]] about details for defining the ususpend-disk method as default.<br />
<br />
=== With pm-utils ===<br />
<br />
[[Pm-utils]] can utilise several [[Pm-utils#Using_another_sleep_backend_.28like_uswsusp.29|sleep back-ends]], including uswsusp. Create or edit {{ic|/etc/pm/config.d/module}}:<br />
SLEEP_MODULE=uswsusp<br />
<br />
This way, pm-suspend and pm-hibernate will use uswsusp.<br />
There is an advantage to this: regular users can use these commands to suspend with uswsusp:<br />
<br />
$ dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend<br />
<br />
$ dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Hibernate<br />
{{Note|The user's [[Window Manager|window manager]] or [[Desktop Environment|desktop environment]] needs to be started either with a [[Display Manager|login manager]] like gdm or kdm. Also, upower needs to be installed.}}<br />
<br />
=== With systemd ===<br />
<br />
To to put your system into hibernation a.k.a ''Suspend to Disk'' with {{ic|systemctl hibernate}}, do:<br />
<br />
# cp /usr/lib/systemd/system/systemd-hibernate.service /etc/systemd/system/<br />
# cd /etc/systemd/system/<br />
<br />
Open {{ic|systemd-hibernate.service}} with your preferred text editor and edit the line from this:<br />
<br />
{{hc|/etc/systemd/system/systemd-hibernate.service|2=<br />
...<br />
ExecStart=/usr/lib/systemd/systemd-sleep hibernate}}<br />
<br />
to this:<br />
<br />
{{hc|/etc/systemd/system/systemd-hibernate.service|2=<br />
...<br />
ExecStart=/bin/sh -c 's2disk && run-parts --regex .\* -a post /usr/lib/systemd/system-sleep'}}<br />
<br />
After that, execute {{ic|systemctl hibernate}} to put your system into hibernation. Do similar changes for systemd-hybrid-sleep.service to enable uswsusp-based hybrid sleep too.<br />
<br />
== Further reading ==<br />
<br />
Most of this page is adapted/copied from the [http://git.kernel.org/?p=linux/kernel/git/rafael/suspend-utils.git;a=blob;f=HOWTO;h=116cddaa76cbdec69eb8b1e87b7df8931d3a73da;hb=HEAD HOWTO file] included with the source code. <br /><br />
The introduction is from http://suspend.sourceforge.net/intro.shtml</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Archiso_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=265408Archiso (Русский)2013-07-07T21:56:31Z<p>JoshuaBranson: I changed the hooks from 'pata sata scsi' to 'block', which is requested on the Arch wiki requests page.</p>
<hr />
<div>[[Category:Live Arch systems (Русский)]]<br />
[[el:Archiso]]<br />
[[en:Archiso]]<br />
[[fr:Archiso]]<br />
[[it:Archiso]]<br />
[[nl:Archiso]]<br />
[[uk:Archiso]]<br />
== Что это? ==<br />
'''Archiso''' - набор bash скриптов, предназначенных для создания полностью функциональных Live-CD/DVD и Live-USB на базе Arch Linux. Это довольно гибкий инструмент, который может быть использован как для создания дисков восстановления или установочных, так и для специализированных live-CD/DVD/USB систем.<br />
Центр Archiso - '''mkarchiso'''. Для получения подробного описания всех его опций достаточно вызвать его без параметров, так что здесь будет описанно только создание live диска своими руками.<br />
<br />
Благодаря последним изменениям Archiso создаёт ISO образы, пригодные как для записи на диск, так и на флеш носитель.<br />
<br />
== Установка Archiso ==<br />
<br />
Archiso можно поставить двумя способами:<br />
<br />
*Через [https://aur.archlinux.org/packages.php?ID=25996 AUR ] (рекомендуется использовать [[Yaourt_(Русский)|yaourt]])(рекомендуется):<br />
$ yaourt -S archiso-git<br />
*Самостоятельно поставить из Git:<br />
$ git clone git://projects.archlinux.org/archiso.git<br />
$ cd archiso/archiso<br />
$ sudo make install<br />
$ sudo pacman -S mkinitcpio cdrkit squashfs-tools devtools syslinux mkinitcpio-nfs-utils nbd<br />
<br />
{{Note| Сейчас Archiso, содержащийся в [[Official_Repositories|extra]], устарел и не соответствует данной статье.}}<br />
<br />
== Конфигурация создаваемой системы ==<br />
<br />
=== Makefile ===<br />
Первым делом создаём отдельную директорию для работы и переходим в неё.<br />
$ mkdir myarch && cd myarch<br />
Далее создаём Makefile и прописываем (или обдуманно копипастим от сюда) туда нижеследующие инструкции.<br />
$ vim Makefile<br />
Ниже вы найдёте пример Makefile.<br />
{{Warning | Все отступы в файле делать табуляцией. На пробелы будет ругаться.}}<br />
<br />
{{Warning | В ранних версиях работала команда "mkinitcpio -c mkinitcpio.conf..." так или иначе (возможно, ввиду последних обновлений) теперь, если скрипт не может найти конфиг-файл, указывайте к последнему полный путь в mkinitcpio.conf, иначе вы можете получить пустой initcpio на выходе, из-за чего полученная система не будет загружаться (VFS error, kernel panic)}}<br />
<br />
<code><br />
#### Редактируйте данный файл для модифицирования конечной системы.<br />
# Рабочая директория для построения системы.<br />
'''WORKDIR=work'''<br />
# Список устанавливаемых приложений, either space separated in a string or line separated in a file. Может включать группы.<br />
'''PACKAGES="$(shell cat packages.list) syslinux"'''<br />
# Имя дистрибутива. Не зависит от/не определяет целевую архитектуру.<br />
'''NAME=myarch'''<br />
# Версия дистрибутива.<br />
'''VER=1.00'''<br />
# Версия ядра.<br />
'''KVER=2.6.32-ARCH'''<br />
# Архитектура.<br />
'''ARCH?=$(shell uname -m)'''<br />
# Директория, в которой находился пользователь, запустивший скрипт<br />
'''PWD:=$(shell pwd)'''<br />
# Полное (финальное) имя образа.<br />
'''FULLNAME="$(PWD)"/$(NAME)-$(VER)-$(ARCH)'''<br />
<br />
# Умолчальная инструкция make'у, для компиляции всего(?) (оригинал:"Default make instruction to build everything.")<br />
'''all: myarch'''<br />
<br />
# Запуск ''base-fs'' перед сборкой финального ISO образа.<br />
'''myarch: base-fs'''<br />
'''mkarchiso -p syslinux iso "$(WORKDIR)" "$(FULLNAME)".iso'''<br />
<br />
# Основное правило для процесса создания файловой системы образа. Приложения отрабатывают слева на право.<br />
# Тоесть, сначала ''root-image'' в конце - ''syslinux''.<br />
'''base-fs: root-image boot-files initcpio overlay iso-mounts syslinux'''<br />
<br />
# ''root-image'' всегда запускается первым. <br />
# Скачивание и установка приложений в ''$WORKDIR''.<br />
'''root-image: "$(WORKDIR)"/root-image/.arch-chroot'''<br />
'''"$(WORKDIR)"/root-image/.arch-chroot:'''<br />
'''root-image:'''<br />
'''mkarchiso -p $(PACKAGES) create "$(WORKDIR)"'''<br />
<br />
# Правило для создания /boot<br />
'''boot-files: root-image'''<br />
'''cp -r "$(WORKDIR)"/root-image/boot "$(WORKDIR)"/iso/'''<br />
'''cp -r boot-files/* "$(WORKDIR)"/iso/boot/'''<br />
<br />
# Правило для образов initcpio<br />
'''initcpio: "$(WORKDIR)"/iso/boot/myarch.img'''<br />
'''"$(WORKDIR)"/iso/boot/myarch.img: mkinitcpio.conf "$(WORKDIR)"/root-image/.arch-chroot'''<br />
'''mkdir -p "$(WORKDIR)"/iso/boot'''<br />
'''mkinitcpio -c ./mkinitcpio.conf -b "$(WORKDIR)"/root-image -k $(KVER) -g $@'''<br />
<br />
# Подробнее см.: [[#overlay|Overlay]]<br />
'''overlay:'''<br />
'''mkdir -p "$(WORKDIR)"/overlay/etc/pacman.d'''<br />
'''cp -r overlay "$(WORKDIR)"/'''<br />
'''wget -O "$(WORKDIR)"/overlay/etc/pacman.d/mirrorlist https://www.archlinux.org/mirrorlist/all/'''<br />
'''sed -i "s/#Server/Server/g" "$(WORKDIR)"/overlay/etc/pacman.d/mirrorlist'''<br />
<br />
# Правило для создания isomounts.'''<br />
'''iso-mounts: "$(WORKDIR)"/isomounts'''<br />
'''"$(WORKDIR)"/isomounts: isomounts root-image'''<br />
'''sed "s|@ARCH@|$(ARCH)|g" isomounts > $@'''<br />
<br />
# Исполняется перед генерацией финального образа.<br />
'''syslinux: root-image'''<br />
'''mkdir -p $(WORKDIR)/iso/boot/isolinux'''<br />
'''cp $(WORKDIR)/root-image/usr/lib/syslinux/*.c32 $(WORKDIR)/iso/boot/isolinux/'''<br />
'''cp $(WORKDIR)/root-image/usr/lib/syslinux/isolinux.bin $(WORKDIR)/iso/boot/isolinux/'''<br />
<br />
# При вызове "make clean" отчищает систему от вчего, созданного в процессе создания образа.<br />
'''clean:'''<br />
'''rm -rf "$(WORKDIR)" "$(FULLNAME)".img "$(FULLNAME)".iso'''<br />
<br />
.PHONY: all myarch<br />
.PHONY: base-fs<br />
.PHONY: root-image boot-files initcpio overlay iso-mounts<br />
.PHONY: syslinux<br />
.PHONY: clean<br />
<br />
Тоесть, при исполнении "make myarch" из под рута,происходит следующее:<br />
*'''root-image''' скачивает и устанавливает выбранные приложения в ''$WORKDIR''<br />
*'''boot-files''' готовит загрузочные файлы и копирует загрузочные скрипты<br />
*'''initcpio''' работает с ''initcpio''<br />
*'''overlay''' копирует файлы, перекрывающие базовую конфигурацию в ''root-image'' в ''$WORKDIR'' <br />
*'''iso-mounts''' немного уличной магии с применением sed, чтобы AUFS знала, куда ей монтироваться при загрузке<br />
*'''syslinux''' копирует загрузчик<br />
*'''myarch''' создаёт конечный образ, пригодный для записи на CD/DVD/флешку.<br />
</code><br />
<br />
Одного Makefile будет недостаточно, так что нужно будет создать файлы, описанные ниже.<br />
<br />
=== mkinitcpio.conf ===<br />
<br />
''initcpio'' необходим для создания системы,способной загружаться с CD/DVD/USB.<br />
<br />
Создайте mkinitcpio.conf:<br />
$ vim mkinitcpio.conf<br />
Обычно он содержит следующую информацию:<br />
HOOKS="base udev archiso block usb fw filesystems usbinput"<br />
<br />
Благодаря этому ваша система сможет загружаться с CD/DVD или USB. Стоит отметить, что автоопределение железа и прочее настраивается не здесь.<br />
<br />
=== packages.list ===<br />
<br />
Вам так-же понадобится список приложений, устанавливаемых на вашу live-систему. Как минимум вам понадобятся '''base''' и '''kernel26''', но, вы вольны дополнять список приложениями на ваше усмотрение.<br />
<br />
{{Note|'''mkarchiso''' использует ''/etc/pacman.conf'' из основной системы. Если вы раскоментировали [testing], то приложения из него тоже будут использованы при создании образа.Если вы хотите использовать другой ''pacman.conf'', вы можете создать его в папке проекта и использовать командой '''mkarchiso -C pacman.conf'''Для использования выделенного ''pacman.conf''нужно добавить '''-C pacman.conf''' во все вызовы '''mkarchiso''' в Makefile.}}<br />
$ vim packages.list<br />
В список устанавливаемых пакетов будет разумно вставить, как минимум, следующее:<br />
aufs2<br />
aufs2-util<br />
base<br />
bash<br />
coreutils<br />
cpio<br />
dhcpcd<br />
dnsutils<br />
file<br />
fuse<br />
kernel26<br />
syslinux<br />
nano<br />
<br />
Этот список должен дать вам минимальную рабочую систему. Но не забывайте, что в ней не будет драйверов свыше включённых в ядро (видео, вай-фай, специализированные - их нужно будет добавить в список).<br />
<br />
{{Tip|Вы так-же можете создать '''[[custom local repository]]''' для подготовки пакетов. Просто поставьте ваш локальный репозитарий на первую позицию в используемом '''pacman.conf'''.}}<br />
<br />
=== isomounts ===<br />
<br />
Вам понадобится файл, содержащий информацию о файловых системах, монтируемых при загрузке системы.<br />
$ vim isomounts<br />
Пример ''isomounts'':<br />
# archiso isomounts file<br />
# img - location of image/directory to mount relative to addons directory<br />
# arch - architecture of this image<br />
# mount point - absolute location on the post-initrd root<br />
# type - either 'bind' or 'squashfs' for now<br />
# syntax: <img> <arch> <mount point> <type><br />
# ORDER MATTERS! Files take top-down precedence. Be careful<br />
overlay.sqfs @ARCH@ / squashfs<br />
root-image.sqfs @ARCH@ / squashfs<br />
<br />
<br />
{{warning| В конце файла должна быть пустая строка (EOF) иначе ждите, что система упадёт в kernel panic!}}<br />
<br />
=== boot-files ===<br />
<br />
Вам нужно будет добавить директорию "boot-files" и поддиректорию "isolinux/" содержащую "isolinux.cfg".<br />
<br />
{{warning|Ввиду последних изменений поддержка [[grub]] в Archiso была отменена. Пожалуйста, не используйте grub. Взамен, вы можете использовать isolinux из syslinux'а, при этом вы получите образ, который может быть записан не только на диск, но и на флэшку.}}<br />
<br />
==== Использование isolinux ====<br />
Использовать ''isolinux'' просто:<br />
$ mkdir -p boot-files/isolinux/<br />
$ vim boot-files/isolinux/isolinux.cfg<br />
<br />
Образец:<br />
prompt 1<br />
timeout 0<br />
display myarch.msg<br />
DEFAULT myarch<br />
<br />
LABEL myarch<br />
KERNEL /boot/vmlinuz26<br />
APPEND initrd=/boot/myarch.img archisolabel=XXX tmpfs_size=75% locale=en_US.UTF-8<br />
<br />
LABEL memtest86+<br />
KERNEL /boot/memtest86+-2.10.bin<br />
<br />
Возможно, вы захотите отображать сообщение над меню загрузки:<br />
$ vim boot-files/isolinux/myarch.msg<br />
<br />
Это может быть любое сообщение в ASCII:<br />
<br />
HI GENTLEMEN LOL<br />
WELCOME TO MY DISTRO<br />
I HOPE U ENJOY MAKE UR TIME<br />
HA-HA-HA<br />
(ПРЕВЕД ДЖЕНТЕЛЬМЕНЫ Ы<br />
ДОБРО ПОЖАЛОВАТЬ В МОЙ ДИСТРИБУТИВЧЕГ<br />
НАДЕЮСЬ, ВАМ ПОНРАВИТСЯ ВРЕМЯ, КОТОРОЕ ВЫ НА НЕГО ПОТРАТИТЕ<br />
ГЫ-ГЫ-ГЫ)<br />
Обратите внимание, что вам нужно будет где-нибудь достать memtest*.bin потому как в "поставку по умолчанию" он не входит. Если вы не хотите его использовать - закоментируйте.<br />
<br />
Благодаря модульной структуре isolinux вы можете использовать большое колличество аддонов, потому что все *.c32 файлы скопированны и доступны вам. Подробней можете посмотреть [http://syslinux.zytor.com/wiki/index.php/SYSLINUX официальный сайт syslinux] и [https://projects.archlinux.org/archiso.git/tree/configs/syslinux-iso/boot-files archiso git-репозитарий]. Использование вышеперечисленных аддонов позволяет создавать красивые и сложные меню. Подробнее см. [http://syslinux.zytor.com/wiki/index.php/Comboot/menu.c32 тут].<br />
<br />
=== overlay ===<br />
'''overlay''' предназначен для включения в дистрибутив бинарных репозитариев, конфигов, отличающихся от умолчальных и прочего. ''mkarchiso'' требует помещения всех файлов, предназначенных для оверлея, в одну директорию. Оверлей будет наложен на систему во время загрузки используя ''AUFS''. Структура папки, содержащей файлы оверлея, должна повторять корневую систему.<br />
<br />
Все файлы и директории, не существующие в оригинальной системе, но существующие в оверлее, будут созданы.<br />
Все файлы и директории существующие в оригинальной системе и в оверлее, будут перезаписаны оверлеем.<br />
<br />
Создаём ''overlay'':<br />
$ mkdir overlay && cd overlay/<br />
<br />
Это было легко, теперь надо наполнить оверлей полезняшками. Несколько примеров: <br />
<br />
'''''Note:''' Важно, чтобы всем файлам в оверлее были назначены правильные права доступа.Поэтому все изменения в директории оврелея рекомендуется производить из под рута.''<br />
<br />
==== Добавление fstab ====<br />
Если нужно добавить '''fstab''':<br />
$ mkdir etc<br />
$ vim etc/fstab<br />
<br />
aufs / aufs noauto 0 0<br />
none /dev/pts devpts defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
<br />
==== Добавление пользователя ====<br />
<br />
===== Вручную =====<br />
Так или иначе, но вам понадобятся пользователи в вашей live-системе. Есть много способов их добавления.Один из — скопировать файлы, для этого требуемые из корневой системы, и привести их в вид, удовлетворяющий вашим требованиям:<br />
<br />
$ cp /etc/group etc/group<br />
$ cp /etc/passwd etc/passwd<br />
$ cp /etc/shadow etc/shadow<br />
<br />
'''''Note:''' Не оставляйте зашифрованный пароль passwd или shadow в файле! Пароль находится на второй позиции (после первого ':').''<br />
<br />
Пример беспарольного пользователя: <br />
root::99999::::::<br />
<br />
Так-же не забудьте создать домашнюю папку для пользователя (не забудьте изменить домашнюю папку в ''passwd''). Для создания домашней папки во время загрузки и добавления туда /etc/skel пользовательской папки можно использовать rc.local. Если про /etc/skel в слышите впервые, вам, и правда, следует об этом прочитать.<br />
$ vim etc/rc.local<br />
mkdir /home/archie && chown archie:archie /home/archie<br />
su -c "cp -r /etc/skel/.[a-zA-Z0-9]* /home/archie/" archie<br />
<br />
===== Используя useradd =====<br />
Другим способом добавления пользователя является использование ''etc/rc.local'' для создания пользователя при загрузке:<br />
$ vim etc/rc.local<br />
<br />
useradd -u 1000 -g users -G storage,floppy,optical,audio,video,network,games,wheel,disk -d /home/archie archie<br />
<br />
Это создаст пользователя и домашнюю директорию для него.<br />
<br />
==== Добавление чего-либо в домашнюю директорию пользователя при загрузке ====<br />
Возможно, вы захотите добавить какие-то файлы кофигурации для пользователя live-системы.<br />
<br />
Вам нужно будет создать следующую директорию, и поместить желаемое туда:<br />
$ mkdir etc/skel<br />
<br />
Для примера:<br />
$ vim etc/skel/.bashrc <br />
<br />
alias ls='ls --color=auto'<br />
PS1='[\u@\h \W]\$ '<br />
<br />
Описание всего, что можно сделать таким образом, значительно выходит за рамки данной статьи.<br />
<br />
'''''Note:''' Не пытайтесь использовать оверлей для прямого изменения /home/user/, это вызовет ошибки в правах доступа! Используйте /etc/skel/.''<br />
<br />
==== Закрытие темы оверлея ====<br />
Некоторые темы, не рассмотренные в данной статье (потому как рассмотрены в вики):<br />
*Конфигурация ''inittab'' для старта Х во время загрузки<br />
*Конфигурация ''hosts''<br />
*Конфигурация ''rc.conf''<br />
*Конфигурация ''sudoers''<br />
*Конфигурация ''rc.local''<br />
*Добавление большего колличества полезняшек etc/skel<br />
*Добавление большего колличества графического оформления<br />
*Добавление разнообраных бинарников в opt/<br />
<br />
== Генерация образа ==<br />
После всего времени, потраченного на конфигурацию, осталась самая приятная часть: Создание образа.<br />
<br />
Это легко: Из под рута (это важно!) выполните следующую команду в директории вашего проекта (там, где лежит ''Makefile''):<br />
$ make all<br />
На выходе вы получите .iso, готовый для записи на CD/DVD или USB: <br />
dd if=my-image.iso of=/dev/some-usb-drive bs=8M<br />
<br />
{{Note| Если на флеш носителе более одного раздела, не забудьте присвоить метку разделу, содержащему live-систему. Иначе с него будет невозможно загрузиться.}}<br />
{{warning|Осторожней с <tt>dd</tt>! Если вы используете его не на том устройстве, данные будет практически невозможно восстановить. Используйте с осторожностью.}}<br />
<br />
== Links ==<br />
[https://projects.archlinux.org/?p=archiso.git;a=summary Archiso project page]<br />
<br />
[[Arch Based Distributions (Active)]]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=TuxOnIce_(Italiano)&diff=265407TuxOnIce (Italiano)2013-07-07T21:52:56Z<p>JoshuaBranson: I changed the hooks from 'pata sata scsi' to 'block', which is requested on the Arch wiki requests page.</p>
<hr />
<div>[[Category:Power management (Italiano)]]<br />
[[Category:Laptops (Italiano)]]<br />
[[en:TuxOnIce]]<br />
Questa è una guida veloce all'installazione di [http://www.tuxonice.net TuxOnIce] (conosciuto anche come suspend2), un framework avanzato per la sospensione/ibernazione, che supporta l'ibernazione in una partizione swap o in un normale file con una compressione veloce LZO. Visita il sito di TuxOnIce per una lista completa delle [http://www.tuxonice.net/features caratteristiche].<br />
<br />
== Preparazione del kernel ==<br />
TuxOnIce consiste in una patch del kernel, più un'interfaccia utente aggiuntiva. Solo la patch è necessaria, l'interfaccia utente fornisce un'interfaccia testuale o grafica durante il ciclo di sospensione/ibernazione. <br />
<br />
È possibile usare il pacchetto {{AUR|linux-ice}} o {{AUR|linux-pf}} presenti su [[AUR (Italiano)|AUR]]. Questo automatizza la procedura di patch, compilazione ed installazione del kernel, e la generazione della initramfs con un hook adeguato. In questo modo si ha un buon controllo del processo di installazione e volendo si può personalizzare apportando i cambiamenti voluti.<br />
<br />
Altrimenti, sarà necessario applicare la patch, configurare e compilare il proprio kernel, visitare le pagine [[Kernel Compilation From Source]] e [[Kernel Compilation with ABS]] per maggiori informazioni. Le patch necessarie possono essere ottenute presso il sito TuxOnIce di cui sopra.<br />
<br />
Ora è necessario installare il pacchetto {{aur|hibernate-script}} da [[AUR (Italiano)|AUR]] che verrà richiamato da TuxOnIce. Questo pacchetto è lo script ufficiale fornito dal team di TuxOnIce.<br />
<br />
I file di configurazione di hibernate-script sono in {{ic|/etc/hibernate}}.<br />
<br />
== Ricreare initramfs ==<br />
<br />
Se si vuole usare un initramfs (cosa che Arch fa di default) è necessario aggiungere "resume" agli HOOKS di [[mkinitcpio (Italiano)|mkinitcpio]]. In più, se si vuole usare la compressione veloce LZO aggiungere "lzo" all'array MODULES dello stesso file.<br />
Un esempio di {{ic|/etc/mkinitpio.conf}}:<br />
MODULES="lzo"<br />
HOOKS="base udev autodetect block resume filesystems"<br />
Ricreare ora l'initramfs:<br />
# mkinitcpio -p linux-ice<br />
o<br />
# mkinitcpio -p linux-pf<br />
<br />
== Configurazione del Boot Loader ==<br />
Prima che si possa usare la funzione di sospensione, bisogna aggiungere il parametro {{ic|resume}} ai parametri passati al kernel nel file di configurazione del boot loader (se si sta usando un sistema con una partizione swap "specificata" nella configurazione del kernel questo passaggio non è necessario). Questo punterà alla partizione di swap o al file di ibernazione.<br />
<br />
=== Ibernazione in una partizione di Swap ===<br />
{{Note|A partire l'ultima versione di TuxOnIce (3.0.99.44), aggiungere il parametro "resume" al kernel non è più necessario, sarà rilevato automaticamente se l'unità di swap contiene un'immagine avviabile. Ci sarà solo bisogno di impostare il metodo di swap adeguatamente. Per maggiori informazioni, visitare [http://www.tuxonice.net/].}}<br />
<br />
Quindi configurare il metodo swap (assicurarsi che sia specificata la partizione giusta) in {{ic| /etc/hibernate/tuxonice.conf}}<br />
<br />
SuspendDevice swap:/dev/sda3<br />
<br />
=== Ibernazione su un file di swap ===<br />
{{Note|L'autorilevamento, come detto in precedenza, non sembra funzionare con i file di swap; sarà dunque necessario impostare manualmente il parametro "resume" del kernel.}}<br />
<br />
Se si utilizza un file di swap invece di una partizione di swap, sarà necessario passare il percorso dei suoi header a TuxOnIce. TuxOnIce è in grado di elencare tutti gli header di swap disponibile.<br />
<br />
cat /sys/power/tuxonice/swap/headerlocations<br />
<br />
Utilizzare la stringa data così com'è in {{ic|/etc/hibernate/tuxonice.conf}} e passarla al kernel come parametro "resume". <br />
<br />
SuspendDevice swap:/dev/sda7:0x1087070<br />
<br />
Aggiungere la seguente riga nei parametri del kernel nel file di configurazione del bootloader:<br />
<br />
resume=swap:/dev/sda7:0x1087070<br />
<br />
{{Note|Specificare il dispositivo di "resume" per mezzo degli UUID dovrebbe funzionare, ma non è del tutto garantito. Questo potrebbe essere un problema di TuxOnIce o di mkinitcpio. Specificando {{ic|/dev/sdxx}} dovrebbe invece funzionare in tutti i casi.}}<br />
<br />
===Sospensione su file===<br />
Per l'allocatore di file, si dovrà preparare un file di ibernazione. Questo è diverso dal file di swap standard dato che questo file viene utilizzato SOLO per l'ibernazione e non come file di swap del sistema generale. Il metodo precedente è raccomandata per essere più efficiente in termini di spazio su disco. Configurare il file {{ic|/etc/hibernate/tuxonice.conf}} e decommentare l'opzione "FilewriterLocation":<br />
<br />
FilewriterLocation /suspend_file 1000<br />
<br />
1000 è la quantità di spazio su disco riservato per il file di ibernazione, in questo caso 1000 megabyte. Di solito un valore pari al 50%-75% della quantità totale di RAM è sufficiente.<br />
<br />
Successivamente, eseguire il seguente comando per creare il file di ibernazione:<br />
<br />
# hibernate --no-suspend<br />
<br />
Dare un'occhiata a {{ic|/sys/power/tuxonice/resume}} per vedere cosa passare al kernel. Si dovrebbe vedere qualche file del genere:{{ic|1=file:/dev/hda7:0x10011f}}, nel qual caso si dovrebbe aggiungere {{ic|1=resume=file:/dev/hda7:0x10011f}} come parametro del kernel nel file {{ic|/etc/lilo.conf}} (per [[LILO]]) o {{ic|/boot/grub/menu.lst}} (per [[GRUB Legacy (Italiano)|GRUB]]) o {{ic|/boot/grub/menu.cfg}} (per [[GRUB2 (Italiano)|GRUB2]]).<br />
<br />
== Sospensione e Resuming == <br />
Con gli hibernate-script, il metodo di ibernazione preferito può essere configurato nel file {{ic|/etc/hibernate/hibernate.conf}}. Se si elencano diversi metodi, il primo sarà quello utilizzato. Notare che ''hibernate'' può essere anche usato con [[Suspend to RAM]] o vanilla swsusp, ma questo non è parte della guida. <br />
<br />
Per TuxOnIce usare:<br />
<br />
TryMethod tuxonice.conf<br />
<br />
Le opzioni specifiche per TuxOnIce sono nel file {{ic|/etc/hibernate/tuxonice.conf}}. Assicurarsi che le seguenti righe siano decommentate e configurate adeguatamente:<br />
<br />
UseTuxOnIce yes<br />
Compressor lzo<br />
<br />
Ci sono altre opzioni aggiuntive e trucchi che possono essere impostati in {{ic|/etc/hibernate/tuxonice.conf}} e {{ic|/etc/hibernate/common.conf}},<br />
informazioni più dettagliate possono essere trovate sul sito ufficiale di [http://www.tuxonice.net/HOWTO-4.html TuxOnIce] o nella pagina [[Suspend to Disk]] di questo wiki.<br />
<br />
Provare quindi l'ibernazione di TuxOnIce con questo comando:<br />
<br />
# hibernate -F /etc/hibernate/tuxonice.conf<br />
<br />
Si può uscire dal ciclo di sospensione premendo il pulsante {{Keypress|Esc}}. Premendo {{keypress|Shift + R}}, si forzerà il sistema a riavviarsi dopo l'ibernazione.<br />
<br />
Se tutto è andato bene, dovresti essere in grado di effettuare il resuming usando la stessa voce del menù di Grub che usi normalmente per avviare il sistema. Se imposti questa opzione come default, effettuerai sempre il resuming se un file di ibernazione è disponibile su disco o sulla swap. È bene testare la sospensione/ibernazione prima da terminale, e dopo essersi assicurati che funziona, provarla da X.<br />
<br />
{{Attenzione | Non usare mai un kernel differente per effettuare il resume da quello che hai usato per l'ibernazione! Se pacman aggiorna il tuo kernel, non ibernare prima che tu abbia riavviato la macchina e avviato il nuovo kernel.}} <br />
<br />
Si può rendere questa pratica più sicura aggiungendo il demone ''hibernate-cleanup'' nella stringa DAEMONS in {{ic| /etc/rc.conf}}. Questo script verifica che qualsiasi vecchia immagine per il resume sia cancellata della partizione di swap durante l'avvio. Questo dovrebbe rendere più sicuro il sistema anche nel caso si scelga il kernel sbagliato dal menù di Grub. Il demone hibernate-cleanup è incluso nel pacchetto hibernate-script.<br />
<br />
== Configurazioni addizionali di pm-utils ==<br />
Se si usa [[GNOME (Italiano)|GNOME]] come [[Desktop Environment (Italiano)|DE]], o un qualunque altro DE che richieda [[pm-utils (Italiano)|pm-utils]] per spegnere e sospendere sono necessarie ulteriori configurazioni per TuxOnIce.<br />
<br />
Tali configurazioni vanno fatte in {{ic|/etc/hibernate/hibernate.conf}} e dovrebbero funzionare. Alcune configurazioni però possono dare problemi con pm-utils. La compressione, per esempio, è di default lzo a meno che si intervenga manualmente. Editare il file sotto {{ic|/etc/pm/sleep.d/}} è un'ottima alternativa per far si che le configurazioni vengano lette correttamente. <br />
<br />
Per cambiare la compressione usata da TuxOnIce, per esempio, editare {{ic|/etc/pm/sleep.d/00doit}} e aggiungere qualcosa del genere:<br />
<br />
#!/bin/bash<br />
case $1 in<br />
hibernate)<br />
#Possible compressors include lzo, lzf, and none<br />
echo none > /sys/power/tuxonice/compression/algorithm<br />
;;<br />
<br />
Linee addizionali possono essere usate per cambiare altre opzioni come ad esempio il logging level di default (in {{ic|/sys/power/tuxonice/user_interface/default_console_level}}).<br />
<br />
== Usare UserUI - Un'Interfaccia Utente per TuxOnIce (Opzionale) == <br />
<br />
È anche possibile utilizzare un'interfaccia utente testuale o grafica ([[fbsplash (Italiano)|fbsplash]]) con una barra di avanzamento. Per fare questo, installare il pacchetto {{aur|tuxonice-userui}} da [[AUR (Italiano)|AUR]]. Questo pacchetto dipende dalla libreria statica freetype2, fornita dal pacchetto {{aur|freetype2-static}} (anche questo da AUR).<br />
<br />
Nel file {{ic| /etc/hibernate/tuxonice.conf}}, imposta l'interfaccia utente desiderata:<br />
<br />
ProcSetting user_interface/program "/usr/sbin/tuxoniceui" #Interfaccia Testuale<br />
<br />
o<br />
<br />
ProcSetting user_interface/program "/usr/sbin/tuxoniceui -f" #Interfaccia Grafica con fbsplash<br />
<br />
L'interfaccia con fbsplash necessita di un symlink al tema fbsplash, in questo modo:<br />
<br />
# ln -s /etc/splash/arch-banner-noicons/ /etc/splash/tuxonice<br />
<br />
Senza questo symlink, non ci saranno indicatori di progresso durante il suspend/resume.<br />
<br />
Probabilmente sarà necessario rigenerare l'initramfs dopo aver cambiato il link simbolico sopra.<br />
<br />
L'interfaccia testuale può essere utile per il debug di TuxOnIce, in quanto visualizza alcuni messaggi.<br />
<br />
Non si vedrà un'interfaccia utente durante i primi secondi del processo di ripristino a meno che non si aggiunga l'hook '''userui''' alla propria configurazione mkinitcpio (prima dell'hook '''resume''') e si rigeneri l'initramfs, ma anche questo è opzionale. <br />
<br />
Generate initramfs:<br />
<br />
# mkinitcpio -p linux-ice<br />
<br />
Per verificare se la userui funziona, da terminale eseguite:<br />
<br />
# tuxoniceui_test --test<br />
<br />
Per l'interfaccia grafica eseguite:<br />
<br />
# tuxoniceui_fbsplash --test<br />
<br />
== Riferimenti == <br />
*Il sito di [http://www.tuxonice.net TuxOnIce] e la sua [http://wiki.tuxonice.net wiki] sono un ottima fonte di informazioni.<br />
*Altre informazioni generali sulla sospensione/ibernazione con gli hibernate-script si possono trovare nella pagina [[Suspend_to_Disk | Suspend to Disk]] di questa wiki. Questa tratta argomenti avanzati come problemi con certe configurazioni hardware.<br />
*Un'altra buona fonte di informazioni è la [http://en.gentoo-wiki.com/wiki/TuxOnIce wiki di Gentoo].</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=TuxOnIce&diff=265406TuxOnIce2013-07-07T21:51:28Z<p>JoshuaBranson: I changed the hooks from 'pata sata scsi' to 'block', which is requested on the Arch wiki requests page.</p>
<hr />
<div>[[Category:Power management]]<br />
[[it:TuxOnIce]]<br />
{{Article summary start}}<br />
{{Article summary text|Describes installing, configuring and using TuxOnIce, an advanced suspend/hibernate framework.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Suspending to RAM with hibernate-script}}<br />
{{Article summary wiki|Suspending to Disk with hibernate-script}}<br />
{{Article summary wiki|Pm-utils}}<br />
{{Article summary wiki|Uswsusp}}<br />
{{Article summary end}}<br />
<br />
This is a quick start guide for installing [http://www.tuxonice.net TuxOnIce] (formerly suspend2), an advanced suspend/hibernate framework which supports suspending to a swap-disk or a regular file with fast LZO-compression. Visit the TuxOnIce website for a full list of [http://www.tuxonice.net/features features].<br />
<br />
==Preparing the kernel==<br />
TuxOnIce consists of a kernel patch, plus an optional user interface. Only the kernel patch is necessary, the user interface merely provides a graphical interface displayed during the hibernation/resume cycle. <br />
<br />
You can use the {{AUR|linux-ice}} or the [[linux-pf]] packages available in the [[Arch User Repository]]. They automate all the patch routines, the compilation and installation of the kernel, and the regeneration of the initramfs with an appropriate hook. You maintain control over the install process, and its easy to make changes if you want to repeat the process. More detailed information at installing [[linux-pf]] and configuring it with TuxOnIce can be found at its wiki page.<br />
<br />
Otherwise, you need to patch, configure and compile your own kernel, visit [[Kernel Compilation From Source]] and [[Kernel Compilation with ABS]] for instructions. The required patch can be obtained from the TuxOnIce website mentioned above.<br />
<br />
Next, install the {{AUR|hibernate-script}} package from the [[AUR]] which we will use to call TuxOnIce. Hibernate-script is the default script developed by the TuxOnIce development team.<br />
<br />
The configuration files for hibernate-script are in {{Ic|/etc/hibernate}}, we will get back to them shortly.<br />
<br />
==Recreating the initramfs==<br />
If you use an initramfs (default Arch systems do), you must add the resume hook in the HOOKS in the configuration of [[mkinitcpio]]. Additionally, if you want to speed things up by using LZO compression, add the lzo module to the MODULES array in the same file.<br />
<br />
{{Ic|/etc/mkinitcpio.conf}} example:<br />
<br />
MODULES="lzo"<br />
HOOKS="base udev autodetect block resume filesystems"<br />
(for [[linux-pf]] you also need tuxonice_compress, tuxonice_swap and optionally tuxonice_userui in MODULES)<br />
<br />
Rebuild the initramfs:<br />
<br />
# mkinitcpio -p linux-ice<br />
or<br />
# mkinitcpio -p linux-pf<br />
<br />
==Setting up the bootloader==<br />
Before your can use the suspend function, you need to add the {{Ic|resume}} parameter in your bootloader (unless you have hard-coded your swap partition during the kernel configuration). The resume parameter points to the swap partition or swap file, below are the steps involved for both methods.<br />
<br />
===Suspend to swap partition===<br />
{{Note|As of the latest version of TuxOnIce (3.0.99.44), adding the kernel resume parameter is no longer necessary, it will auto-detect if your swap drive contains a bootable image. You only need to set the swap method appropriately. For more details, check out [http://www.tuxonice.net/].}}<br />
<br />
Set the swap method (make sure the right partition is indicated) in {{Ic|/etc/hibernate/tuxonice.conf}}:<br />
<br />
SuspendDevice swap:/dev/sda3<br />
<br />
===Suspend to swap file===<br />
{{Note|Auto-detection as mentioned previously doesn't seem to work with swap files, you will still need to manually set the kernel resume parameter.}}<br />
{{Note|The BTRFS filesystem does not currently support swapfiles.}}<br />
If you use a swap file instead of a swap partition, you will need to pass the location of its header to TuxOnIce. TuxOnIce can list all available swap headers.<br />
<br />
cat /sys/power/tuxonice/swap/headerlocations<br />
<br />
Use the given string as-is in both {{Ic|/etc/hibernate/tuxonice.conf}} and passed to your kernel as a resume parameter. <br />
<br />
SuspendDevice swap:/dev/sda7:0x1087070<br />
<br />
Append the following to your kernel parameters in your bootloader's configuration file:<br />
<br />
resume=swap:/dev/sda7:0x1087070<br />
<br />
{{Note|Specifying the resume device by UUID is supposed to work, but I was not able to get it to work. This may be a TuxOnIce or a mkinitcpio issue, YMMV. Specifying {{Ic|/dev/sd'''xx'''}} should work in all cases though.}}<br />
<br />
===Suspend to file===<br />
For the file allocator, you will have to prepare a hibernation file. This is different from the standard swap file in that this file is ONLY used for hibernation and not as a general system swap file. The previous method is recommended as being more efficient in terms of disk space. First configure the {{Ic|/etc/hibernate/tuxonice.conf}} file, uncomment the "FilewriterLocation" option:<br />
<br />
FilewriterLocation /suspend_file 1000<br />
<br />
1000 is the amount of disk space reserved for the hibernation file, in this case 1000 megabytes. Usually an amount of 50% - 75% of your total amount of RAM will suffice.<br />
<br />
Next, we need to create the file, something like [http://en.gentoo-wiki.com/wiki/TuxOnIce#Alternative:_Using_a_Dedicated_File]:<br />
<br />
# echo TuxOnIce > /suspend_file<br />
# dd if=/dev/zero bs=1M count=1000 >> /suspend_file<br />
# echo /suspend_file > /sys/power/tuxonice/file/target<br />
# cat /sys/power/tuxonice/resume<br />
<br />
The output of {{Ic|/sys/power/tuxonice/resume}} is what you need to pass to your kernel. You should see something like {{Ic|file:/dev/sda2:0xdc008}}, in which case you should append {{Ic|1=resume=file:/dev/sda2:0xdc008}} as a kernel parameter in your {{Ic|/etc/[[lilo]].conf}} file (for [[LILO]]), {{Ic|/boot/syslinux/syslinux.cfg}} (for syslinux) or {{Ic|/boot/grub/grub.cfg}} (for [[Grub2]]).<br />
<br />
==Suspending and resuming==<br />
With hibernate-script, your preferred hibernation method can be set in the file {{Ic|/etc/hibernate/hibernate.conf}}. See [[Suspending to Disk with hibernate-script]] for more info.<br />
<br />
==Additional pm-utils setup==<br />
<br />
If using [[GNOME]] as your DE, or using any other environment that uses [[pm-utils]] to shutdown and suspend the system, some additional setup is required for TuxOnIce.<br />
<br />
Configuration made in {{Ic|/etc/hibernate/hibernate.conf}} is still useful, but some options don't seem to be used by pm-utils. Compression, for example, will default to lzo unless more action is taken.<br />
Editing files under {{Ic|/etc/pm/sleep.d/}} is a good way to make sure wanted settings are used.<br />
<br />
To change the compressor used by TuxOnIce, for example, edit {{Ic|/etc/pm/sleep.d/00doit}} and add a line like so:<br />
<br />
#!/bin/bash<br />
case $1 in<br />
hibernate)<br />
#Possible compressors include lzo, lzf, and none<br />
''echo none > /sys/power/tuxonice/compression/algorithm''<br />
;;<br />
<br />
Additional lines can be used to change other options, such as the default logging level (found in {{Ic|/sys/power/tuxonice/user_interface/default_console_level}}).<br />
<br />
==userui - user interface for TuxOnIce (optional)==<br />
<br />
Optionally, you can use a text or graphical ([[Fbsplash]]) interface with a progress bar with TuxOnIce. To do this, install the {{AUR|tuxonice-userui}} package from the AUR.<br />
<br />
In {{Ic|/etc/hibernate/tuxonice.conf}}, set the desired user interface:<br />
<br />
ProcSetting userui_program "/usr/sbin/tuxoniceui" # Text interface<br />
<br />
or<br />
<br />
ProcSetting userui_program "/usr/sbin/tuxoniceui -f" # Graphical fbsplash interface<br />
<br />
The fbsplash interface also needs a symlink to the fbsplash theme, like so:<br />
<br />
# ln -s /etc/splash/arch-banner-noicons/ /etc/splash/tuxonice<br />
<br />
Without this symlink, there will be no progress indicators during suspend/resume.<br />
<br />
It is probably necessary to regenerate the initramfs after changing the symlink above.<br />
<br />
The text interface may be good for debugging TuxOnIce, as it displays some messages.<br />
<br />
You won't see a user interface for the first few seconds of the resume process unless you add the '''userui''' hook to your mkinitcpio (before the '''resume''' hook) configuration and regenerate your initramfs, but this is also optional. <br />
<br />
Generate initramfs:<br />
<br />
# mkinitcpio -p linux-ice<br />
<br />
To test if userui works, switch to a text console and run:<br />
<br />
# tuxoniceui --test<br />
<br />
For the graphical interface run:<br />
<br />
# tuxoniceui -f --test<br />
<br />
==References==<br />
*The [http://www.tuxonice.net TuxOnIce website] and [http://wiki.tuxonice.net/ TuxOnIce wiki] are excellent sources of documentation.<br />
*More general information about suspend/hibernate with hibernate-script can be found on the [[Suspend to Disk]] page of this wiki. This also covers some advanced topics like problems with specific hardware and configurations.<br />
*Another good source of information is the [http://en.gentoo-wiki.com/wiki/TuxOnIce Gentoo wiki]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=User:Menno/Installing_Arch_Linux_with_EVMS&diff=265405User:Menno/Installing Arch Linux with EVMS2013-07-07T21:13:51Z<p>JoshuaBranson: I added a to the Arch LVM page.</p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
[[Category:File systems]]<br />
<br />
This HOWTO describes how to install Arch Linux with all filesytems (including the root-filesystem) managed by [[Wikipedia:Enterprise Volume Management System|Enterprise Volume Management System]] (EVMS).<br />
<br />
<br />
{{Note| EVMS is no longer being developed. The last stable version was released in 2006. An alternative to EVMS is [[LVM|LVM]]. Also many of the features in EVMS were added to LVM. }}<br />
<br />
== Disclaimer==<br />
Following this guide can destroy your data. Backup all your data first or live with it if something goes wrong.<br />
<br />
== Introduction ==<br />
EVMS is a tool that provides easy and unified access to RAID (0,1,4,5,6,10), LVM, expanding and shrinking of volumes and file systems, bad block relocation and more. <br /><br />
EVMS is not supported on the Arch Linux install CDs, so the install requires some extra steps:<br />
# Install a minimal Arch Linux system on a normal partition<br />
# Install the EVMS package and create EVMS-volumes<br />
# Copy all files to the EVMS-volumes<br />
<br />
It's not my intention to explain all ins and outs of EVMS, readers unfamiliar with EVMS should read the [http://evms.sourceforge.net/user_guide/ EVMS User Guide]. <br />
<br />
I've tested EVMS on Arch Linux in a virtual machine ([[VirtualBox]]). I'm relatively new to Arch Linux, but I've used EVMS for about 2 years on Gentoo.<br />
<br />
== Storage plan ==<br />
An important part of setting up a system with EVMS is making a plan that describes how the harddisk space will be used, where you use RAID or LVM and so on. Because the install CD does not support EVMS, you need a partition of a minimum of 500MB for the initial installation. After the installation this partition is available for normal use, for example as Swap-space. Another solution is to use a portable medium (e.g. a flash drive) with Arch installed already, and perform these operations on a mounted hard drive within the target system; however, this method will not be covered in the procedure below.<br />
<br />
In this HOWTO I will use an example setup with 2 disks, 4GB and 2GB. I'll create 5 volumes:<br />
A picture tells more than a thousand words:<br />
<br />
[[Image:Storage-plan-evms.png]]<br />
<br />
You'll need at least one "Compatibility volume" with enough space for a minimal Arch Linux install; 500MB should be enough.<br />
<br />
== Installing Arch Linux on the temporary partition ==<br />
Install Arch Linux using the [[Official Arch Linux Install Guide]].<br />
* Partition the hard drives to match your design from the previous step; for our example, it is as follows:<br />
Disk Drive: /dev/sda<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
------------------------------------------------------------------------------<br />
sda1 Primary Linux 98.71<br />
sda2 Primary Linux 2048.10<br />
sda5 Logical Linux 1497.01<br />
sda6 Logical Linux 649.80<br />
<br />
Disk Drive: /dev/sdb<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
------------------------------------------------------------------------------<br />
sdb1 Primary Linux 98.71<br />
sdb2 Primary Linux 2048.10<br />
<br />
* Install Arch Linux on the compatibility volume (/dev/sda6 in the example)<br />
* Do not mount the other partitions<br />
* The packages for mdadm and LVM are not necessary<br />
* Answer "No" to all questions about RAID or LVM.<br />
<br />
== Install EVMS in Arch Linux ==<br />
Boot your new Arch Linux system and install the EVMS package:<br />
# pacman -S evms glib<br />
Glib is needed for '''evmsn''', the Ncurses interface to EVMS<br />
<br />
Edit {{ic|/etc/mkinicpio.conf}}:<br />
'''-''' HOOKS=“base udev '''autodetect''' block keymap filesystems”<br />
'''+''' HOOKS=“base udev '''evms''' block keymap filesystems”<br />
Edit {{ic|/lib/initcpio/install/evms}} ({{bug|8895}}):<br />
'''-''' MODULES="dm_mod md_mod"<br />
'''+''' MODULES=" $(checked_modules "drivers/md/*") "<br />
Make a new initial RAM disk environment:<br />
# mkinitcpio -p linux<br />
Add the following to {{ic|/etc/rc.sysinit}}, after the LVM block:<br />
if [ "$USEEVMS" = "yes" -o "$USEEVMS" = "YES" ]; then<br />
if [ -x /usr/sbin/evms_activate ]; then<br />
stat_busy "Activating EVMS"<br />
/usr/sbin/evms_activate<br />
if [ $? -ne 0 ]; then<br />
stat_fail<br />
else<br />
stat_done<br />
fi<br />
fi<br />
fi<br />
<br />
Add this line to {{ic|/etc/rc.conf}}:<br />
USEEVMS="yes"<br />
<br />
Change root-device in {{ic|/etc/fstab}} ...<br />
'''-''' /dev/sda6 / ext3 defaults 0 1<br />
'''+''' /dev/evms/sda6 / ext3 defaults 0 1<br />
<br />
... and in {{ic|/boot/grub/menu.lst}}<br />
'''-''' kernel /boot/vmlinuz-linux root=/dev/sda6 ro<br />
'''+''' kernel /boot/vmlinuz-linux root=/dev/evms/sda6 ro<br />
<br />
Reboot.<br />
<br />
== Create EVMS-volumes ==<br />
Start evmsn:<br />
# evmsn<br />
<br />
Remove automagicly created compatibility volumes on partitions you want to use with RAID and/or LVM<br />
<br />
Actions » Delete » Volume...<br />
<br />
+------------------------ Delete Logical Volume -------------------------+<br />
| |<br />
| Logical Volume Size |<br />
| ---------------------------------------------------------------------- |<br />
| '''X''' /dev/evms/sda1 94.1 MB |<br />
| '''X''' /dev/evms/sda2 1.9 GB |<br />
| '''X''' /dev/evms/sda5 1.4 GB |<br />
| '''X''' /dev/evms/sdb1 94.1 MB |<br />
| '''X''' /dev/evms/sdb2 1.9 GB |<br />
| |<br />
| |<br />
| Use the spacebar key to make selections and choose Delete to continue |<br />
| |<br />
| [Help] [Cancel] [Recursive Delete] '''[Delete]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+------------------------------------------------------------------------+<br />
|Engine: Volume "/dev/evms/sda1" does not have a File System Interface Mo|<br />
|dule (FSIM) assigned to it. The volume may have a file system on it, bu|<br />
|t none of the installed FSIM plug-ins recognizes it. Do you want to wri|<br />
|te zeros to the first 1MB of the volume to potentially disable any file |<br />
|system that may be on the volume? |<br />
| |<br />
| '''[Write zeros]''' [Do not write zeros] [Cancel] |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+------------------------------------------------------------------------+<br />
|Engine: Volume "/dev/evms/sda1" is not an EVMS volume. Removing a non-E|<br />
|VMS volume requires writing 1024 bytes of metadata at the end of the vol|<br />
|ume. The metadata will overwrite any data that may be at the end of the |<br />
|volume. Do you want to continue with the delete? |<br />
| |<br />
| '''[Continue]''' [Cancel] |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* Create RAID1 array on sda1 and sdb1<br />
Actions » Create » Region...<br />
<br />
+------------------------ Create Storage Region -------------------------+<br />
| |<br />
| Region Manager |<br />
| ---------------------------------------------------------------------- |<br />
| MD Linear Raid Region Manager |<br />
| '''X''' MD Raid 1 Region Manager |<br />
| MD RAID0 Region Manager |<br />
| MD RAID 4/5 Region Manager |<br />
| MD Multipath Region Manager |<br />
| |<br />
| Use the spacebar key to make selections and choose Next to continue |<br />
| |<br />
| [Help] [Cancel] '''[Next]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+-------------- Create Storage Region - Acceptable Objects --------------+<br />
| |<br />
| Name Size |<br />
| ---------------------------------------------------------------------- |<br />
| '''X''' sda1 94.1 MB |<br />
| sda2 1.9 GB |<br />
| sda5 1.4 GB |<br />
| '''X''' sdb1 94.1 MB |<br />
| sdb2 1.9 GB |<br />
| |<br />
| |<br />
| Use the spacebar key to make selections and choose Next to continue |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Next]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+------------ Create Storage Region - Configuration Options -------------+<br />
| |<br />
| Option Value |<br />
| ---------------------------------------------------------------------- |<br />
| Version 1 Super Block No |<br />
| Degraded array No |<br />
| Spare Disk None |<br />
| |<br />
| Use spacebar to select an option to change. Select Create to finish. |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Create]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* Create RAID1 array on sda2 and sdb2<br />
** repeat the previous step<br />
* Create LVM container 'main' on md/md1 and sda5<br />
Actions » Create » container...<br />
<br />
+----------------------- Create Storage Container -----------------------+<br />
| |<br />
| Plug-in |<br />
| ---------------------------------------------------------------------- |<br />
| LVM Region Manager |<br />
| '''X''' LVM2 Region Manager |<br />
| |<br />
| Use the spacebar key to make selections and choose Next to continue |<br />
| |<br />
| [Help] [Cancel] '''[Next]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+------------ Create Storage Container - Acceptable Objects -------------+<br />
| |<br />
| Name Size |<br />
| ---------------------------------------------------------------------- |<br />
| '''X''' sda5 1.4 GB |<br />
| md/md0 94.0 MB |<br />
| '''X''' md/md1 1.9 GB |<br />
| |<br />
| Use the spacebar key to make selections and choose Next to continue |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Next]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+----------- Create Storage Container - Configuration Options -----------+<br />
| |<br />
| Option Value |<br />
| ---------------------------------------------------------------------- |<br />
| Name for the new LVM2 container. '''main''' |<br />
| Extent-size for the new LVM2 container. 32.0 MB |<br />
| |<br />
| Use spacebar to select an option to change. Select Create to finish. |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Create]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* Create LVM region 'root' on 'lvm2/main/Freespace', mapping to object md/md1<br />
Actions » Create » Region...<br />
<br />
+------------------------ Create Storage Region -------------------------+<br />
| |<br />
| Region Manager |<br />
| ---------------------------------------------------------------------- |<br />
| '''X''' LVM2 Region Manager |<br />
| MD Linear Raid Region Manager |<br />
| MD Raid 1 Region Manager |<br />
| MD RAID0 Region Manager |<br />
| |<br />
| Use the spacebar key to make selections and choose Next to continue |<br />
| |<br />
| [Help] [Cancel] '''[Next]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+-------------- Create Storage Region - Acceptable Objects --------------+<br />
| |<br />
| Name Size |<br />
| ---------------------------------------------------------------------- |<br />
| '''X''' lvm2/main/Freespace 3.3 GB |<br />
| |<br />
| Use the spacebar key to make selections and choose Next to continue |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Next]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+------------ Create Storage Region - Configuration Options -------------+<br />
| |<br />
| Option Value |<br />
| ---------------------------------------------------------------------- |<br />
| Name for the new LVM2 region. '''root''' |<br />
| Size for the new LVM2 region. '''1.0 GB''' |<br />
| Number of stripes for the new LVM2 region. 1 |<br />
| Objects (PVs) to place the new LVM2 region on. '''md/md1''' |<br />
| |<br />
| Use spacebar to select an option to change. Select Create to finish. |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Create]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* Create LVM region 'home' on 'lvm2/main/Freespace', mapping to object md/md1<br />
** Only the last step is different. If you choose Object 'md/md1' the size is automaticly adjusted.<br />
+------------ Create Storage Region - Configuration Options -------------+<br />
| |<br />
| Option Value |<br />
| ---------------------------------------------------------------------- |<br />
| Name for the new LVM2 region. '''home''' |<br />
| Size for the new LVM2 region. '''928.0 MB''' |<br />
| Number of stripes for the new LVM2 region. 1 |<br />
| Objects (PVs) to place the new LVM2 region on. '''md/md1''' |<br />
| |<br />
| Use spacebar to select an option to change. Select Create to finish. |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Create]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* Create LVM region 'var' on 'lvm2/main/Freespace'<br />
** Choosing an object is not necessary<br />
+------------ Create Storage Region - Configuration Options -------------+<br />
| |<br />
| Option Value |<br />
| ---------------------------------------------------------------------- |<br />
| Name for the new LVM2 region. '''var''' |<br />
| Size for the new LVM2 region. '''1.4 GB''' |<br />
| Number of stripes for the new LVM2 region. 1 |<br />
| Objects (PVs) to place the new LVM2 region on. |<br />
| |<br />
| Use spacebar to select an option to change. Select Create to finish. |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Create]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* Create EVMS-volumes on md/md0, lvm2/main/root, lvm2/main/home and lvm2/main/var<br />
Actions » Create » EVMS Volume...<br />
<br />
+-------------------------- Create EVMS Volume --------------------------+<br />
| |<br />
| Storage Object Size |<br />
| ---------------------------------------------------------------------- |<br />
| lvm2/main/home 928.0 MB |<br />
| lvm2/main/root 1.0 GB |<br />
| lvm2/main/var 1.4 GB |<br />
| '''X''' md/md0 94.0 MB |<br />
| |<br />
| Use the spacebar key to make selections and choose Create to continue |<br />
| |<br />
| [Help] [Cancel] '''[Create]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* This is the new situation:<br />
Actions Settings Help<br />
0=Logical Volumes<br />
<br />
Name Size Modified Active R/O Plug-in Mountpoint<br />
------------------------------------------------------------------------------<br />
/dev/evms/boot 94.0 MB X<br />
/dev/evms/home 928.0 MB X<br />
/dev/evms/root 1024.0 MB X<br />
/dev/evms/sda6 619.7 MB X Ext2/3 /<br />
/dev/evms/var 1.4 GB X<br />
<br />
* Save<br />
Actions » Save...<br />
<br />
* Quit<br />
Actions » Quit<br />
<br />
Edit {{ic|/etc/evms.conf}}:<br />
lvm2 {<br />
# Should the LVM2 plugin prompt you for confirmation when it finds<br />
# LVM2 metadata on an object, but the object does not pass the<br />
# necessary size checks? If yes, it will ask you if the object is<br />
# really an LVM2 PV. If no, it will assume the object is not a PV.<br />
#<br />
# If you have used EVMS to create an LVM2 container on top of an<br />
# MD Software-RAID region, you'll most likely want to set this<br />
# parameter to no.<br />
#<br />
# The default is yes.<br />
<br />
'''-''' device_size_prompt = yes<br />
'''+''' device_size_prompt = no<br />
}<br />
<br />
== Copy the installation to the right volumes ==<br />
Make filesystems on the new volumes:<br />
# mkfs.ext3 /dev/evms/root<br />
# mkfs.ext3 /dev/evms/boot<br />
# mkfs.ext3 /dev/evms/home<br />
# mkfs.ext3 /dev/evms/var<br />
<br />
Mount the volumes under {{ic|/new}}:<br />
# mkdir /new<br />
# mount /dev/evms/root /new<br />
# mkdir /new/boot /new/home /new/var<br />
# mount /dev/evms/boot /new/boot<br />
# mount /dev/evms/home /new/home<br />
# mount /dev/evms/var /new/var<br />
<br />
Go to single-user mode:<br />
# telinit 1<br />
<br />
Copy the system to the new volumes:<br />
# cd /<br />
# ls | grep -vE "dev|proc|sys|new" | xargs cp -a -t /new<br />
# mkdir /new/dev /new/proc /new/sys<br />
# cp -a /dev/console /dev/zero /dev/null /new/dev<br />
<br />
Edit {{ic|/new/etc/fstab}}<br />
- /dev/evms/sda6 / ext3 defaults 0 1<br />
+ /dev/evms/root / ext3 defaults 0 1<br />
+ /dev/evms/boot /boot ext3 defaults,noauto 0 2<br />
+ /dev/evms/home /home ext3 defaults 0 2<br />
+ /dev/evms/var /var ext3 defaults 0 2<br />
<br />
If {{ic|/boot}} is on a separate volume, make a symlink to itself:<br />
# cd /new/boot<br />
# ln -s . boot<br />
<br />
Add an entry to {{ic|/new/boot/grub/menu.lst}}:<br />
# (0) Arch Linux EVMS<br />
title Arch Linux EVMS<br />
root (hd0,0)<br />
kernel /boot/vmlinuz-linux root=/dev/evms/root ro quiet<br />
initrd /boot/initramfs-linux.img<br />
<br />
Reinstall GRUB on both disks:<br />
# grub<br />
grub> root (hd0,0)<br />
grub> setup (hd0)<br />
grub> device (hd0) /dev/sdb<br />
grub> root (hd0,0)<br />
grub> setup (hd0)<br />
grub> quit<br />
<br />
Find a new life for {{ic|/dev/evms/sda6}}<br />
<br />
== Links ==<br />
* [http://evms.sourceforge.net/user_guide/ EVMS User Guide]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=User:Menno/Installing_Arch_Linux_with_EVMS&diff=265404User:Menno/Installing Arch Linux with EVMS2013-07-07T21:08:07Z<p>JoshuaBranson: I changed 'pata sata scsi' to 'block', which is on the arch wiki requests page.</p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
[[Category:File systems]]<br />
<br />
This HOWTO describes how to install Arch Linux with all filesytems (including the root-filesystem) managed by [[Wikipedia:Enterprise Volume Management System|Enterprise Volume Management System]] (EVMS).<br />
<br />
<br />
{{Note| EVMS is no longer being developed. The last stable version was released in 2006. An alternative to EVMS is LVM. Also many of the features in EVMS were added to LVM. }}<br />
<br />
== Disclaimer==<br />
Following this guide can destroy your data. Backup all your data first or live with it if something goes wrong.<br />
<br />
== Introduction ==<br />
EVMS is a tool that provides easy and unified access to RAID (0,1,4,5,6,10), LVM, expanding and shrinking of volumes and file systems, bad block relocation and more. <br /><br />
EVMS is not supported on the Arch Linux install CDs, so the install requires some extra steps:<br />
# Install a minimal Arch Linux system on a normal partition<br />
# Install the EVMS package and create EVMS-volumes<br />
# Copy all files to the EVMS-volumes<br />
<br />
It's not my intention to explain all ins and outs of EVMS, readers unfamiliar with EVMS should read the [http://evms.sourceforge.net/user_guide/ EVMS User Guide]. <br />
<br />
I've tested EVMS on Arch Linux in a virtual machine ([[VirtualBox]]). I'm relatively new to Arch Linux, but I've used EVMS for about 2 years on Gentoo.<br />
<br />
== Storage plan ==<br />
An important part of setting up a system with EVMS is making a plan that describes how the harddisk space will be used, where you use RAID or LVM and so on. Because the install CD does not support EVMS, you need a partition of a minimum of 500MB for the initial installation. After the installation this partition is available for normal use, for example as Swap-space. Another solution is to use a portable medium (e.g. a flash drive) with Arch installed already, and perform these operations on a mounted hard drive within the target system; however, this method will not be covered in the procedure below.<br />
<br />
In this HOWTO I will use an example setup with 2 disks, 4GB and 2GB. I'll create 5 volumes:<br />
A picture tells more than a thousand words:<br />
<br />
[[Image:Storage-plan-evms.png]]<br />
<br />
You'll need at least one "Compatibility volume" with enough space for a minimal Arch Linux install; 500MB should be enough.<br />
<br />
== Installing Arch Linux on the temporary partition ==<br />
Install Arch Linux using the [[Official Arch Linux Install Guide]].<br />
* Partition the hard drives to match your design from the previous step; for our example, it is as follows:<br />
Disk Drive: /dev/sda<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
------------------------------------------------------------------------------<br />
sda1 Primary Linux 98.71<br />
sda2 Primary Linux 2048.10<br />
sda5 Logical Linux 1497.01<br />
sda6 Logical Linux 649.80<br />
<br />
Disk Drive: /dev/sdb<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
------------------------------------------------------------------------------<br />
sdb1 Primary Linux 98.71<br />
sdb2 Primary Linux 2048.10<br />
<br />
* Install Arch Linux on the compatibility volume (/dev/sda6 in the example)<br />
* Do not mount the other partitions<br />
* The packages for mdadm and LVM are not necessary<br />
* Answer "No" to all questions about RAID or LVM.<br />
<br />
== Install EVMS in Arch Linux ==<br />
Boot your new Arch Linux system and install the EVMS package:<br />
# pacman -S evms glib<br />
Glib is needed for '''evmsn''', the Ncurses interface to EVMS<br />
<br />
Edit {{ic|/etc/mkinicpio.conf}}:<br />
'''-''' HOOKS=“base udev '''autodetect''' block keymap filesystems”<br />
'''+''' HOOKS=“base udev '''evms''' block keymap filesystems”<br />
Edit {{ic|/lib/initcpio/install/evms}} ({{bug|8895}}):<br />
'''-''' MODULES="dm_mod md_mod"<br />
'''+''' MODULES=" $(checked_modules "drivers/md/*") "<br />
Make a new initial RAM disk environment:<br />
# mkinitcpio -p linux<br />
Add the following to {{ic|/etc/rc.sysinit}}, after the LVM block:<br />
if [ "$USEEVMS" = "yes" -o "$USEEVMS" = "YES" ]; then<br />
if [ -x /usr/sbin/evms_activate ]; then<br />
stat_busy "Activating EVMS"<br />
/usr/sbin/evms_activate<br />
if [ $? -ne 0 ]; then<br />
stat_fail<br />
else<br />
stat_done<br />
fi<br />
fi<br />
fi<br />
<br />
Add this line to {{ic|/etc/rc.conf}}:<br />
USEEVMS="yes"<br />
<br />
Change root-device in {{ic|/etc/fstab}} ...<br />
'''-''' /dev/sda6 / ext3 defaults 0 1<br />
'''+''' /dev/evms/sda6 / ext3 defaults 0 1<br />
<br />
... and in {{ic|/boot/grub/menu.lst}}<br />
'''-''' kernel /boot/vmlinuz-linux root=/dev/sda6 ro<br />
'''+''' kernel /boot/vmlinuz-linux root=/dev/evms/sda6 ro<br />
<br />
Reboot.<br />
<br />
== Create EVMS-volumes ==<br />
Start evmsn:<br />
# evmsn<br />
<br />
Remove automagicly created compatibility volumes on partitions you want to use with RAID and/or LVM<br />
<br />
Actions » Delete » Volume...<br />
<br />
+------------------------ Delete Logical Volume -------------------------+<br />
| |<br />
| Logical Volume Size |<br />
| ---------------------------------------------------------------------- |<br />
| '''X''' /dev/evms/sda1 94.1 MB |<br />
| '''X''' /dev/evms/sda2 1.9 GB |<br />
| '''X''' /dev/evms/sda5 1.4 GB |<br />
| '''X''' /dev/evms/sdb1 94.1 MB |<br />
| '''X''' /dev/evms/sdb2 1.9 GB |<br />
| |<br />
| |<br />
| Use the spacebar key to make selections and choose Delete to continue |<br />
| |<br />
| [Help] [Cancel] [Recursive Delete] '''[Delete]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+------------------------------------------------------------------------+<br />
|Engine: Volume "/dev/evms/sda1" does not have a File System Interface Mo|<br />
|dule (FSIM) assigned to it. The volume may have a file system on it, bu|<br />
|t none of the installed FSIM plug-ins recognizes it. Do you want to wri|<br />
|te zeros to the first 1MB of the volume to potentially disable any file |<br />
|system that may be on the volume? |<br />
| |<br />
| '''[Write zeros]''' [Do not write zeros] [Cancel] |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+------------------------------------------------------------------------+<br />
|Engine: Volume "/dev/evms/sda1" is not an EVMS volume. Removing a non-E|<br />
|VMS volume requires writing 1024 bytes of metadata at the end of the vol|<br />
|ume. The metadata will overwrite any data that may be at the end of the |<br />
|volume. Do you want to continue with the delete? |<br />
| |<br />
| '''[Continue]''' [Cancel] |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* Create RAID1 array on sda1 and sdb1<br />
Actions » Create » Region...<br />
<br />
+------------------------ Create Storage Region -------------------------+<br />
| |<br />
| Region Manager |<br />
| ---------------------------------------------------------------------- |<br />
| MD Linear Raid Region Manager |<br />
| '''X''' MD Raid 1 Region Manager |<br />
| MD RAID0 Region Manager |<br />
| MD RAID 4/5 Region Manager |<br />
| MD Multipath Region Manager |<br />
| |<br />
| Use the spacebar key to make selections and choose Next to continue |<br />
| |<br />
| [Help] [Cancel] '''[Next]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+-------------- Create Storage Region - Acceptable Objects --------------+<br />
| |<br />
| Name Size |<br />
| ---------------------------------------------------------------------- |<br />
| '''X''' sda1 94.1 MB |<br />
| sda2 1.9 GB |<br />
| sda5 1.4 GB |<br />
| '''X''' sdb1 94.1 MB |<br />
| sdb2 1.9 GB |<br />
| |<br />
| |<br />
| Use the spacebar key to make selections and choose Next to continue |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Next]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+------------ Create Storage Region - Configuration Options -------------+<br />
| |<br />
| Option Value |<br />
| ---------------------------------------------------------------------- |<br />
| Version 1 Super Block No |<br />
| Degraded array No |<br />
| Spare Disk None |<br />
| |<br />
| Use spacebar to select an option to change. Select Create to finish. |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Create]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* Create RAID1 array on sda2 and sdb2<br />
** repeat the previous step<br />
* Create LVM container 'main' on md/md1 and sda5<br />
Actions » Create » container...<br />
<br />
+----------------------- Create Storage Container -----------------------+<br />
| |<br />
| Plug-in |<br />
| ---------------------------------------------------------------------- |<br />
| LVM Region Manager |<br />
| '''X''' LVM2 Region Manager |<br />
| |<br />
| Use the spacebar key to make selections and choose Next to continue |<br />
| |<br />
| [Help] [Cancel] '''[Next]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+------------ Create Storage Container - Acceptable Objects -------------+<br />
| |<br />
| Name Size |<br />
| ---------------------------------------------------------------------- |<br />
| '''X''' sda5 1.4 GB |<br />
| md/md0 94.0 MB |<br />
| '''X''' md/md1 1.9 GB |<br />
| |<br />
| Use the spacebar key to make selections and choose Next to continue |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Next]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+----------- Create Storage Container - Configuration Options -----------+<br />
| |<br />
| Option Value |<br />
| ---------------------------------------------------------------------- |<br />
| Name for the new LVM2 container. '''main''' |<br />
| Extent-size for the new LVM2 container. 32.0 MB |<br />
| |<br />
| Use spacebar to select an option to change. Select Create to finish. |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Create]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* Create LVM region 'root' on 'lvm2/main/Freespace', mapping to object md/md1<br />
Actions » Create » Region...<br />
<br />
+------------------------ Create Storage Region -------------------------+<br />
| |<br />
| Region Manager |<br />
| ---------------------------------------------------------------------- |<br />
| '''X''' LVM2 Region Manager |<br />
| MD Linear Raid Region Manager |<br />
| MD Raid 1 Region Manager |<br />
| MD RAID0 Region Manager |<br />
| |<br />
| Use the spacebar key to make selections and choose Next to continue |<br />
| |<br />
| [Help] [Cancel] '''[Next]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+-------------- Create Storage Region - Acceptable Objects --------------+<br />
| |<br />
| Name Size |<br />
| ---------------------------------------------------------------------- |<br />
| '''X''' lvm2/main/Freespace 3.3 GB |<br />
| |<br />
| Use the spacebar key to make selections and choose Next to continue |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Next]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+------------ Create Storage Region - Configuration Options -------------+<br />
| |<br />
| Option Value |<br />
| ---------------------------------------------------------------------- |<br />
| Name for the new LVM2 region. '''root''' |<br />
| Size for the new LVM2 region. '''1.0 GB''' |<br />
| Number of stripes for the new LVM2 region. 1 |<br />
| Objects (PVs) to place the new LVM2 region on. '''md/md1''' |<br />
| |<br />
| Use spacebar to select an option to change. Select Create to finish. |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Create]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* Create LVM region 'home' on 'lvm2/main/Freespace', mapping to object md/md1<br />
** Only the last step is different. If you choose Object 'md/md1' the size is automaticly adjusted.<br />
+------------ Create Storage Region - Configuration Options -------------+<br />
| |<br />
| Option Value |<br />
| ---------------------------------------------------------------------- |<br />
| Name for the new LVM2 region. '''home''' |<br />
| Size for the new LVM2 region. '''928.0 MB''' |<br />
| Number of stripes for the new LVM2 region. 1 |<br />
| Objects (PVs) to place the new LVM2 region on. '''md/md1''' |<br />
| |<br />
| Use spacebar to select an option to change. Select Create to finish. |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Create]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* Create LVM region 'var' on 'lvm2/main/Freespace'<br />
** Choosing an object is not necessary<br />
+------------ Create Storage Region - Configuration Options -------------+<br />
| |<br />
| Option Value |<br />
| ---------------------------------------------------------------------- |<br />
| Name for the new LVM2 region. '''var''' |<br />
| Size for the new LVM2 region. '''1.4 GB''' |<br />
| Number of stripes for the new LVM2 region. 1 |<br />
| Objects (PVs) to place the new LVM2 region on. |<br />
| |<br />
| Use spacebar to select an option to change. Select Create to finish. |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Create]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* Create EVMS-volumes on md/md0, lvm2/main/root, lvm2/main/home and lvm2/main/var<br />
Actions » Create » EVMS Volume...<br />
<br />
+-------------------------- Create EVMS Volume --------------------------+<br />
| |<br />
| Storage Object Size |<br />
| ---------------------------------------------------------------------- |<br />
| lvm2/main/home 928.0 MB |<br />
| lvm2/main/root 1.0 GB |<br />
| lvm2/main/var 1.4 GB |<br />
| '''X''' md/md0 94.0 MB |<br />
| |<br />
| Use the spacebar key to make selections and choose Create to continue |<br />
| |<br />
| [Help] [Cancel] '''[Create]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* This is the new situation:<br />
Actions Settings Help<br />
0=Logical Volumes<br />
<br />
Name Size Modified Active R/O Plug-in Mountpoint<br />
------------------------------------------------------------------------------<br />
/dev/evms/boot 94.0 MB X<br />
/dev/evms/home 928.0 MB X<br />
/dev/evms/root 1024.0 MB X<br />
/dev/evms/sda6 619.7 MB X Ext2/3 /<br />
/dev/evms/var 1.4 GB X<br />
<br />
* Save<br />
Actions » Save...<br />
<br />
* Quit<br />
Actions » Quit<br />
<br />
Edit {{ic|/etc/evms.conf}}:<br />
lvm2 {<br />
# Should the LVM2 plugin prompt you for confirmation when it finds<br />
# LVM2 metadata on an object, but the object does not pass the<br />
# necessary size checks? If yes, it will ask you if the object is<br />
# really an LVM2 PV. If no, it will assume the object is not a PV.<br />
#<br />
# If you have used EVMS to create an LVM2 container on top of an<br />
# MD Software-RAID region, you'll most likely want to set this<br />
# parameter to no.<br />
#<br />
# The default is yes.<br />
<br />
'''-''' device_size_prompt = yes<br />
'''+''' device_size_prompt = no<br />
}<br />
<br />
== Copy the installation to the right volumes ==<br />
Make filesystems on the new volumes:<br />
# mkfs.ext3 /dev/evms/root<br />
# mkfs.ext3 /dev/evms/boot<br />
# mkfs.ext3 /dev/evms/home<br />
# mkfs.ext3 /dev/evms/var<br />
<br />
Mount the volumes under {{ic|/new}}:<br />
# mkdir /new<br />
# mount /dev/evms/root /new<br />
# mkdir /new/boot /new/home /new/var<br />
# mount /dev/evms/boot /new/boot<br />
# mount /dev/evms/home /new/home<br />
# mount /dev/evms/var /new/var<br />
<br />
Go to single-user mode:<br />
# telinit 1<br />
<br />
Copy the system to the new volumes:<br />
# cd /<br />
# ls | grep -vE "dev|proc|sys|new" | xargs cp -a -t /new<br />
# mkdir /new/dev /new/proc /new/sys<br />
# cp -a /dev/console /dev/zero /dev/null /new/dev<br />
<br />
Edit {{ic|/new/etc/fstab}}<br />
- /dev/evms/sda6 / ext3 defaults 0 1<br />
+ /dev/evms/root / ext3 defaults 0 1<br />
+ /dev/evms/boot /boot ext3 defaults,noauto 0 2<br />
+ /dev/evms/home /home ext3 defaults 0 2<br />
+ /dev/evms/var /var ext3 defaults 0 2<br />
<br />
If {{ic|/boot}} is on a separate volume, make a symlink to itself:<br />
# cd /new/boot<br />
# ln -s . boot<br />
<br />
Add an entry to {{ic|/new/boot/grub/menu.lst}}:<br />
# (0) Arch Linux EVMS<br />
title Arch Linux EVMS<br />
root (hd0,0)<br />
kernel /boot/vmlinuz-linux root=/dev/evms/root ro quiet<br />
initrd /boot/initramfs-linux.img<br />
<br />
Reinstall GRUB on both disks:<br />
# grub<br />
grub> root (hd0,0)<br />
grub> setup (hd0)<br />
grub> device (hd0) /dev/sdb<br />
grub> root (hd0,0)<br />
grub> setup (hd0)<br />
grub> quit<br />
<br />
Find a new life for {{ic|/dev/evms/sda6}}<br />
<br />
== Links ==<br />
* [http://evms.sourceforge.net/user_guide/ EVMS User Guide]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=User:Menno/Installing_Arch_Linux_with_EVMS&diff=265402User:Menno/Installing Arch Linux with EVMS2013-07-07T21:06:44Z<p>JoshuaBranson: </p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
[[Category:File systems]]<br />
<br />
This HOWTO describes how to install Arch Linux with all filesytems (including the root-filesystem) managed by [[Wikipedia:Enterprise Volume Management System|Enterprise Volume Management System]] (EVMS).<br />
<br />
<br />
{{Note| EVMS is no longer being developed. The last stable version was released in 2006. An alternative to EVMS is LVM. Also many of the features in EVMS were added to LVM. }}<br />
<br />
== Disclaimer==<br />
Following this guide can destroy your data. Backup all your data first or live with it if something goes wrong.<br />
<br />
== Introduction ==<br />
EVMS is a tool that provides easy and unified access to RAID (0,1,4,5,6,10), LVM, expanding and shrinking of volumes and file systems, bad block relocation and more. <br /><br />
EVMS is not supported on the Arch Linux install CDs, so the install requires some extra steps:<br />
# Install a minimal Arch Linux system on a normal partition<br />
# Install the EVMS package and create EVMS-volumes<br />
# Copy all files to the EVMS-volumes<br />
<br />
It's not my intention to explain all ins and outs of EVMS, readers unfamiliar with EVMS should read the [http://evms.sourceforge.net/user_guide/ EVMS User Guide]. <br />
<br />
I've tested EVMS on Arch Linux in a virtual machine ([[VirtualBox]]). I'm relatively new to Arch Linux, but I've used EVMS for about 2 years on Gentoo.<br />
<br />
== Storage plan ==<br />
An important part of setting up a system with EVMS is making a plan that describes how the harddisk space will be used, where you use RAID or LVM and so on. Because the install CD does not support EVMS, you need a partition of a minimum of 500MB for the initial installation. After the installation this partition is available for normal use, for example as Swap-space. Another solution is to use a portable medium (e.g. a flash drive) with Arch installed already, and perform these operations on a mounted hard drive within the target system; however, this method will not be covered in the procedure below.<br />
<br />
In this HOWTO I will use an example setup with 2 disks, 4GB and 2GB. I'll create 5 volumes:<br />
A picture tells more than a thousand words:<br />
<br />
[[Image:Storage-plan-evms.png]]<br />
<br />
You'll need at least one "Compatibility volume" with enough space for a minimal Arch Linux install; 500MB should be enough.<br />
<br />
== Installing Arch Linux on the temporary partition ==<br />
Install Arch Linux using the [[Official Arch Linux Install Guide]].<br />
* Partition the hard drives to match your design from the previous step; for our example, it is as follows:<br />
Disk Drive: /dev/sda<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
------------------------------------------------------------------------------<br />
sda1 Primary Linux 98.71<br />
sda2 Primary Linux 2048.10<br />
sda5 Logical Linux 1497.01<br />
sda6 Logical Linux 649.80<br />
<br />
Disk Drive: /dev/sdb<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
------------------------------------------------------------------------------<br />
sdb1 Primary Linux 98.71<br />
sdb2 Primary Linux 2048.10<br />
<br />
* Install Arch Linux on the compatibility volume (/dev/sda6 in the example)<br />
* Do not mount the other partitions<br />
* The packages for mdadm and LVM are not necessary<br />
* Answer "No" to all questions about RAID or LVM.<br />
<br />
== Install EVMS in Arch Linux ==<br />
Boot your new Arch Linux system and install the EVMS package:<br />
# pacman -S evms glib<br />
Glib is needed for '''evmsn''', the Ncurses interface to EVMS<br />
<br />
Edit {{ic|/etc/mkinicpio.conf}}:<br />
'''-''' HOOKS=“base udev '''autodetect''' pata scsi sata keymap filesystems”<br />
'''+''' HOOKS=“base udev '''evms''' pata scsi sata keymap filesystems”<br />
Edit {{ic|/lib/initcpio/install/evms}} ({{bug|8895}}):<br />
'''-''' MODULES="dm_mod md_mod"<br />
'''+''' MODULES=" $(checked_modules "drivers/md/*") "<br />
Make a new initial RAM disk environment:<br />
# mkinitcpio -p linux<br />
Add the following to {{ic|/etc/rc.sysinit}}, after the LVM block:<br />
if [ "$USEEVMS" = "yes" -o "$USEEVMS" = "YES" ]; then<br />
if [ -x /usr/sbin/evms_activate ]; then<br />
stat_busy "Activating EVMS"<br />
/usr/sbin/evms_activate<br />
if [ $? -ne 0 ]; then<br />
stat_fail<br />
else<br />
stat_done<br />
fi<br />
fi<br />
fi<br />
<br />
Add this line to {{ic|/etc/rc.conf}}:<br />
USEEVMS="yes"<br />
<br />
Change root-device in {{ic|/etc/fstab}} ...<br />
'''-''' /dev/sda6 / ext3 defaults 0 1<br />
'''+''' /dev/evms/sda6 / ext3 defaults 0 1<br />
<br />
... and in {{ic|/boot/grub/menu.lst}}<br />
'''-''' kernel /boot/vmlinuz-linux root=/dev/sda6 ro<br />
'''+''' kernel /boot/vmlinuz-linux root=/dev/evms/sda6 ro<br />
<br />
Reboot.<br />
<br />
== Create EVMS-volumes ==<br />
Start evmsn:<br />
# evmsn<br />
<br />
Remove automagicly created compatibility volumes on partitions you want to use with RAID and/or LVM<br />
<br />
Actions » Delete » Volume...<br />
<br />
+------------------------ Delete Logical Volume -------------------------+<br />
| |<br />
| Logical Volume Size |<br />
| ---------------------------------------------------------------------- |<br />
| '''X''' /dev/evms/sda1 94.1 MB |<br />
| '''X''' /dev/evms/sda2 1.9 GB |<br />
| '''X''' /dev/evms/sda5 1.4 GB |<br />
| '''X''' /dev/evms/sdb1 94.1 MB |<br />
| '''X''' /dev/evms/sdb2 1.9 GB |<br />
| |<br />
| |<br />
| Use the spacebar key to make selections and choose Delete to continue |<br />
| |<br />
| [Help] [Cancel] [Recursive Delete] '''[Delete]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+------------------------------------------------------------------------+<br />
|Engine: Volume "/dev/evms/sda1" does not have a File System Interface Mo|<br />
|dule (FSIM) assigned to it. The volume may have a file system on it, bu|<br />
|t none of the installed FSIM plug-ins recognizes it. Do you want to wri|<br />
|te zeros to the first 1MB of the volume to potentially disable any file |<br />
|system that may be on the volume? |<br />
| |<br />
| '''[Write zeros]''' [Do not write zeros] [Cancel] |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+------------------------------------------------------------------------+<br />
|Engine: Volume "/dev/evms/sda1" is not an EVMS volume. Removing a non-E|<br />
|VMS volume requires writing 1024 bytes of metadata at the end of the vol|<br />
|ume. The metadata will overwrite any data that may be at the end of the |<br />
|volume. Do you want to continue with the delete? |<br />
| |<br />
| '''[Continue]''' [Cancel] |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* Create RAID1 array on sda1 and sdb1<br />
Actions » Create » Region...<br />
<br />
+------------------------ Create Storage Region -------------------------+<br />
| |<br />
| Region Manager |<br />
| ---------------------------------------------------------------------- |<br />
| MD Linear Raid Region Manager |<br />
| '''X''' MD Raid 1 Region Manager |<br />
| MD RAID0 Region Manager |<br />
| MD RAID 4/5 Region Manager |<br />
| MD Multipath Region Manager |<br />
| |<br />
| Use the spacebar key to make selections and choose Next to continue |<br />
| |<br />
| [Help] [Cancel] '''[Next]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+-------------- Create Storage Region - Acceptable Objects --------------+<br />
| |<br />
| Name Size |<br />
| ---------------------------------------------------------------------- |<br />
| '''X''' sda1 94.1 MB |<br />
| sda2 1.9 GB |<br />
| sda5 1.4 GB |<br />
| '''X''' sdb1 94.1 MB |<br />
| sdb2 1.9 GB |<br />
| |<br />
| |<br />
| Use the spacebar key to make selections and choose Next to continue |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Next]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+------------ Create Storage Region - Configuration Options -------------+<br />
| |<br />
| Option Value |<br />
| ---------------------------------------------------------------------- |<br />
| Version 1 Super Block No |<br />
| Degraded array No |<br />
| Spare Disk None |<br />
| |<br />
| Use spacebar to select an option to change. Select Create to finish. |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Create]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* Create RAID1 array on sda2 and sdb2<br />
** repeat the previous step<br />
* Create LVM container 'main' on md/md1 and sda5<br />
Actions » Create » container...<br />
<br />
+----------------------- Create Storage Container -----------------------+<br />
| |<br />
| Plug-in |<br />
| ---------------------------------------------------------------------- |<br />
| LVM Region Manager |<br />
| '''X''' LVM2 Region Manager |<br />
| |<br />
| Use the spacebar key to make selections and choose Next to continue |<br />
| |<br />
| [Help] [Cancel] '''[Next]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+------------ Create Storage Container - Acceptable Objects -------------+<br />
| |<br />
| Name Size |<br />
| ---------------------------------------------------------------------- |<br />
| '''X''' sda5 1.4 GB |<br />
| md/md0 94.0 MB |<br />
| '''X''' md/md1 1.9 GB |<br />
| |<br />
| Use the spacebar key to make selections and choose Next to continue |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Next]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+----------- Create Storage Container - Configuration Options -----------+<br />
| |<br />
| Option Value |<br />
| ---------------------------------------------------------------------- |<br />
| Name for the new LVM2 container. '''main''' |<br />
| Extent-size for the new LVM2 container. 32.0 MB |<br />
| |<br />
| Use spacebar to select an option to change. Select Create to finish. |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Create]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* Create LVM region 'root' on 'lvm2/main/Freespace', mapping to object md/md1<br />
Actions » Create » Region...<br />
<br />
+------------------------ Create Storage Region -------------------------+<br />
| |<br />
| Region Manager |<br />
| ---------------------------------------------------------------------- |<br />
| '''X''' LVM2 Region Manager |<br />
| MD Linear Raid Region Manager |<br />
| MD Raid 1 Region Manager |<br />
| MD RAID0 Region Manager |<br />
| |<br />
| Use the spacebar key to make selections and choose Next to continue |<br />
| |<br />
| [Help] [Cancel] '''[Next]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+-------------- Create Storage Region - Acceptable Objects --------------+<br />
| |<br />
| Name Size |<br />
| ---------------------------------------------------------------------- |<br />
| '''X''' lvm2/main/Freespace 3.3 GB |<br />
| |<br />
| Use the spacebar key to make selections and choose Next to continue |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Next]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
+------------ Create Storage Region - Configuration Options -------------+<br />
| |<br />
| Option Value |<br />
| ---------------------------------------------------------------------- |<br />
| Name for the new LVM2 region. '''root''' |<br />
| Size for the new LVM2 region. '''1.0 GB''' |<br />
| Number of stripes for the new LVM2 region. 1 |<br />
| Objects (PVs) to place the new LVM2 region on. '''md/md1''' |<br />
| |<br />
| Use spacebar to select an option to change. Select Create to finish. |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Create]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* Create LVM region 'home' on 'lvm2/main/Freespace', mapping to object md/md1<br />
** Only the last step is different. If you choose Object 'md/md1' the size is automaticly adjusted.<br />
+------------ Create Storage Region - Configuration Options -------------+<br />
| |<br />
| Option Value |<br />
| ---------------------------------------------------------------------- |<br />
| Name for the new LVM2 region. '''home''' |<br />
| Size for the new LVM2 region. '''928.0 MB''' |<br />
| Number of stripes for the new LVM2 region. 1 |<br />
| Objects (PVs) to place the new LVM2 region on. '''md/md1''' |<br />
| |<br />
| Use spacebar to select an option to change. Select Create to finish. |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Create]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* Create LVM region 'var' on 'lvm2/main/Freespace'<br />
** Choosing an object is not necessary<br />
+------------ Create Storage Region - Configuration Options -------------+<br />
| |<br />
| Option Value |<br />
| ---------------------------------------------------------------------- |<br />
| Name for the new LVM2 region. '''var''' |<br />
| Size for the new LVM2 region. '''1.4 GB''' |<br />
| Number of stripes for the new LVM2 region. 1 |<br />
| Objects (PVs) to place the new LVM2 region on. |<br />
| |<br />
| Use spacebar to select an option to change. Select Create to finish. |<br />
| |<br />
| [Help] [Cancel] [Previous] '''[Create]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* Create EVMS-volumes on md/md0, lvm2/main/root, lvm2/main/home and lvm2/main/var<br />
Actions » Create » EVMS Volume...<br />
<br />
+-------------------------- Create EVMS Volume --------------------------+<br />
| |<br />
| Storage Object Size |<br />
| ---------------------------------------------------------------------- |<br />
| lvm2/main/home 928.0 MB |<br />
| lvm2/main/root 1.0 GB |<br />
| lvm2/main/var 1.4 GB |<br />
| '''X''' md/md0 94.0 MB |<br />
| |<br />
| Use the spacebar key to make selections and choose Create to continue |<br />
| |<br />
| [Help] [Cancel] '''[Create]''' |<br />
| |<br />
+------------------------------------------------------------------------+<br />
<br />
* This is the new situation:<br />
Actions Settings Help<br />
0=Logical Volumes<br />
<br />
Name Size Modified Active R/O Plug-in Mountpoint<br />
------------------------------------------------------------------------------<br />
/dev/evms/boot 94.0 MB X<br />
/dev/evms/home 928.0 MB X<br />
/dev/evms/root 1024.0 MB X<br />
/dev/evms/sda6 619.7 MB X Ext2/3 /<br />
/dev/evms/var 1.4 GB X<br />
<br />
* Save<br />
Actions » Save...<br />
<br />
* Quit<br />
Actions » Quit<br />
<br />
Edit {{ic|/etc/evms.conf}}:<br />
lvm2 {<br />
# Should the LVM2 plugin prompt you for confirmation when it finds<br />
# LVM2 metadata on an object, but the object does not pass the<br />
# necessary size checks? If yes, it will ask you if the object is<br />
# really an LVM2 PV. If no, it will assume the object is not a PV.<br />
#<br />
# If you have used EVMS to create an LVM2 container on top of an<br />
# MD Software-RAID region, you'll most likely want to set this<br />
# parameter to no.<br />
#<br />
# The default is yes.<br />
<br />
'''-''' device_size_prompt = yes<br />
'''+''' device_size_prompt = no<br />
}<br />
<br />
== Copy the installation to the right volumes ==<br />
Make filesystems on the new volumes:<br />
# mkfs.ext3 /dev/evms/root<br />
# mkfs.ext3 /dev/evms/boot<br />
# mkfs.ext3 /dev/evms/home<br />
# mkfs.ext3 /dev/evms/var<br />
<br />
Mount the volumes under {{ic|/new}}:<br />
# mkdir /new<br />
# mount /dev/evms/root /new<br />
# mkdir /new/boot /new/home /new/var<br />
# mount /dev/evms/boot /new/boot<br />
# mount /dev/evms/home /new/home<br />
# mount /dev/evms/var /new/var<br />
<br />
Go to single-user mode:<br />
# telinit 1<br />
<br />
Copy the system to the new volumes:<br />
# cd /<br />
# ls | grep -vE "dev|proc|sys|new" | xargs cp -a -t /new<br />
# mkdir /new/dev /new/proc /new/sys<br />
# cp -a /dev/console /dev/zero /dev/null /new/dev<br />
<br />
Edit {{ic|/new/etc/fstab}}<br />
- /dev/evms/sda6 / ext3 defaults 0 1<br />
+ /dev/evms/root / ext3 defaults 0 1<br />
+ /dev/evms/boot /boot ext3 defaults,noauto 0 2<br />
+ /dev/evms/home /home ext3 defaults 0 2<br />
+ /dev/evms/var /var ext3 defaults 0 2<br />
<br />
If {{ic|/boot}} is on a separate volume, make a symlink to itself:<br />
# cd /new/boot<br />
# ln -s . boot<br />
<br />
Add an entry to {{ic|/new/boot/grub/menu.lst}}:<br />
# (0) Arch Linux EVMS<br />
title Arch Linux EVMS<br />
root (hd0,0)<br />
kernel /boot/vmlinuz-linux root=/dev/evms/root ro quiet<br />
initrd /boot/initramfs-linux.img<br />
<br />
Reinstall GRUB on both disks:<br />
# grub<br />
grub> root (hd0,0)<br />
grub> setup (hd0)<br />
grub> device (hd0) /dev/sdb<br />
grub> root (hd0,0)<br />
grub> setup (hd0)<br />
grub> quit<br />
<br />
Find a new life for {{ic|/dev/evms/sda6}}<br />
<br />
== Links ==<br />
* [http://evms.sourceforge.net/user_guide/ EVMS User Guide]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Pacman&diff=265117Pacman2013-07-04T17:44:12Z<p>JoshuaBranson: I fulfiled the request from the Arch Wiki request page: " Clearly warn about pacman force option".</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Package management]]<br />
[[ar:Pacman]]<br />
[[cs:Pacman]]<br />
[[da:Pacman]]<br />
[[de:Pacman]]<br />
[[el:Pacman]]<br />
[[es:Pacman]]<br />
[[fr:Pacman]]<br />
[[id:Pacman]]<br />
[[it:Pacman]]<br />
[[ja:Pacman]]<br />
[[ko:Pacman]]<br />
[[lt:Pacman]]<br />
[[nl:Pacman]]<br />
[[pl:Pacman]]<br />
[[pt:Pacman]]<br />
[[ro:Pacman]]<br />
[[ru:Pacman]]<br />
[[sr:Pacman]]<br />
[[sv:Pacman]]<br />
[[tr:pacman]]<br />
[[uk:Pacman]]<br />
[[zh-CN:Pacman]]<br />
[[zh-TW:Pacman]]<br />
{{Article summary start}}<br />
{{Article summary text|Pacman is the Arch Linux [[Wikipedia:Package management system|package manager]]. Package managers are used to install, upgrade, and remove software. This article covers basic usage and troubleshooting tips.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Package management overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Downgrading Packages}}<br />
{{Article summary wiki|Improve Pacman Performance}}<br />
{{Article summary wiki|Pacman GUI Frontends}}<br />
{{Article summary wiki|Pacman Rosetta}}<br />
{{Article summary wiki|Pacman Tips}}<br />
{{Article summary wiki|Pacman package signing}}<br />
{{Article summary wiki|FAQ#Package Management}}<br />
{{Article summary wiki|pacman-key}}<br />
{{Article summary wiki|Pacnew and Pacsave Files}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary link|libalpm(3) Manual Page|https://www.archlinux.org/pacman/libalpm.3.html}}<br />
{{Article summary link|pacman(8) Manual Page|https://www.archlinux.org/pacman/pacman.8.html}}<br />
{{Article summary link|pacman.conf(5) Manual Page|https://www.archlinux.org/pacman/pacman.conf.5.html}}<br />
{{Article summary link|repo-add(8) Manual Page|https://www.archlinux.org/pacman/repo-add.8.html}}<br />
{{Article summary end}}<br />
<br />
The '''[https://www.archlinux.org/pacman/ pacman]''' [[Wikipedia:Package management system|package manager]] is one of the major distinguishing features of Arch Linux. It combines a simple binary package format with an easy-to-use [[Arch Build System|build system]]. The goal of pacman is to make it possible to easily manage packages, whether they are from the [[Official Repositories|official Arch repositories]] or the user's own builds.<br />
<br />
Pacman keeps the system up to date by synchronizing package lists with the master server. This server/client model also allows the user to download/install packages with a simple command, complete with all required dependencies.<br />
<br />
Pacman is written in the C programming language and uses the {{ic|.pkg.tar.xz}} package format.<br />
<br />
{{Tip|The official {{Pkg|pacman}} package also contains other useful tools, such as '''makepkg''', '''pactree''', '''vercmp''' and more: run {{ic|pacman -Ql pacman <nowiki>|</nowiki> grep bin}} to see the full list.}}<br />
<br />
== Configuration ==<br />
<br />
Pacman's settings are located in {{ic|/etc/pacman.conf}}. This is the place where the user configures the program to work in the desired manner. In-depth information about the configuration file can be found in [https://www.archlinux.org/pacman/pacman.conf.5.html man pacman.conf].<br />
<br />
=== General options ===<br />
<br />
General options are in the {{ic|[options]}} section. Read the man page or look in the default {{ic|pacman.conf}} for information on what can be done here.<br />
<br />
==== Skip package from being upgraded ====<br />
<br />
To skip upgrading a specific package, specify it as such:<br />
<br />
IgnorePkg=linux<br />
<br />
For multiple packages use a space-separated list, or use additional {{ic|IgnorePkg}} lines.<br />
<br />
==== Skip package group from being upgraded ====<br />
<br />
As with packages, skipping a whole package group is also possible:<br />
<br />
IgnoreGroup=gnome<br />
<br />
==== Skip files from being installed to system ====<br />
<br />
To always skip installation of specific directories list them under {{Ic|NoExtract}}. For example, to avoid installation of [[systemd]] units use this:<br />
<br />
NoExtract=usr/lib/systemd/system/*<br />
<br />
=== Repositories ===<br />
<br />
This section defines which [[Official Repositories|repositories]] to use, as referred to in {{ic|/etc/pacman.conf}}. They can be stated here directly or included from another file (such as {{ic|/etc/pacman.d/mirrorlist}}), thus making it necessary to maintain only one list. See [[Mirrors|here]] for mirror configuration.<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
#[testing]<br />
#SigLevel = PackageRequired<br />
#Include = /etc/pacman.d/mirrorlist<br />
<br />
[core]<br />
SigLevel = PackageRequired<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
[extra]<br />
SigLevel = PackageRequired<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
#[community-testing]<br />
#SigLevel = PackageRequired<br />
#Include = /etc/pacman.d/mirrorlist<br />
<br />
[community]<br />
SigLevel = PackageRequired<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
# If you want to run 32 bit applications on your x86_64 system,<br />
# enable the multilib repositories as required here.<br />
<br />
#[multilib-testing]<br />
#SigLevel = PackageRequired<br />
#Include = /etc/pacman.d/mirrorlist<br />
<br />
#[multilib]<br />
#SigLevel = PackageRequired<br />
#Include = /etc/pacman.d/mirrorlist<br />
<br />
# An example of a custom package repository. See the pacman manpage for<br />
# tips on creating your own repositories.<br />
#[custom]<br />
#SigLevel = Optional TrustAll<br />
#Server = file:///home/custompkgs}}<br />
<br />
{{Warning|Care should be taken when using the [testing] repository. It is in active development and updating may cause some packages to stop working. People who use the [testing] repository are encouraged to subscribe to the [https://mailman.archlinux.org/mailman/listinfo/arch-dev-public arch-dev-public mailing list] for current information.}}<br />
<br />
=== Package security ===<br />
<br />
Pacman 4 supports package signatures, which add an extra layer of security to the packages. The default configuration, {{ic|1=SigLevel = Required DatabaseOptional}}, enables signature verification for all the packages on a global level: this can be overridden by per-repository {{ic|SigLevel}} lines as shown above. For more details on package signing and signature verification, take a look at [[pacman-key]].<br />
<br />
== Usage ==<br />
<br />
What follows is just a small sample of the operations that pacman can perform. To read more examples, refer to [https://www.archlinux.org/pacman/pacman.8.html man pacman]. For an introduction, see [[pacman - An Introduction]]. <br />
<br />
=== Installing packages ===<br />
<br />
==== Installing specific packages ====<br />
<br />
To install a single package or list of packages (including dependencies), issue the following command:<br />
<br />
# pacman -S ''package_name1'' ''package_name2'' ...<br />
<br />
Sometimes there are multiple versions of a package in different repositories, e.g. [extra] and [testing]. To install the former version, the repository needs to be defined in front:<br />
<br />
# pacman -S extra/''package_name''<br />
<br />
==== Installing package groups ====<br />
<br />
Some packages belong to a group of packages that can all be installed simultaneously. For example, issuing the command:<br />
<br />
# pacman -S gnome<br />
<br />
will prompt you to select the packages from the {{Grp|gnome}} group that you wish to install.<br />
<br />
Sometimes a package group will contain a large amount of packages, and there may be only a few that you do or do not want to install. Instead of having to enter all the numbers except the ones you do not want, it is sometimes more convenient to select or exclude packages or ranges of packages with the following syntax:<br />
<br />
Enter a selection (default=all): 1-10 15<br />
<br />
which will select packages 1 through 10 and 15 for installation, or:<br />
<br />
Enter a selection (default=all): ^5-8 ^2<br />
<br />
which will select all packages except 5 through 8 and 2 for installation.<br />
<br />
To see what packages belong to the gnome group, run:<br />
<br />
# pacman -Sg gnome<br />
<br />
Also visit https://www.archlinux.org/groups/ to see what package groups are available.<br />
<br />
{{Note|If a package in the list is already installed on the system, it will be reinstalled even if it is already up to date. This behavior can be overridden with the {{ic|--needed}} option.}}<br />
<br />
{{Warning|1=When installing packages, do '''not''' refresh the package list without [[#Upgrading packages|upgrading]] the system (i.e. {{ic|pacman -Sy ''package_name''}}); this can lead to dependency issues. See [[#Partial upgrades are unsupported]] and https://bbs.archlinux.org/viewtopic.php?id=89328.}}<br />
<br />
=== Removing packages ===<br />
<br />
To remove a single package, leaving all of its dependencies installed:<br />
<br />
# pacman -R ''package_name''<br />
<br />
To remove a package and its dependencies which are not required by any other installed package:<br />
<br />
# pacman -Rs ''package_name''<br />
<br />
To remove a package, its dependencies and all the packages that depend on the target package:<br />
<br />
{{Warning|This operation is recursive, and must be used with care since it can remove many potentially needed packages.}}<br />
<br />
# pacman -Rsc ''package_name''<br />
<br />
To remove a package, which is required by another package, without removing the dependent package:<br />
<br />
# pacman -Rdd ''package_name''<br />
<br />
Pacman saves important configuration files when removing certain applications and names them with the extension: {{ic|.pacsave}}. To prevent the creation of these backup files use the {{ic|-n}} option:<br />
<br />
# pacman -Rn ''package_name''<br />
<br />
{{Note|Pacman will not remove configurations that the application itself creates (for example "dotfiles" in the home folder).}}<br />
<br />
=== Upgrading packages ===<br />
<br />
Pacman can update all packages on the system with just one command. This could take quite a while depending on how up-to-date the system is. This command can synchronize the repository databases ''and'' update the system's packages (excluding 'local' packages that are not in the configured repositories):<br />
<br />
# pacman -Syu<br />
<br />
{{Warning|Instead of immediately updating as soon as updates are available, users must recognize that due to the nature of Arch's rolling release approach, an update may have unforeseen consequences. This means that it is not wise to update if, for example, one is about to deliver an important presentation. Rather, update during free time and be prepared to deal with any problems that may arise.}}<br />
<br />
Pacman is a powerful package management tool, but it does not attempt to handle all corner cases. Read [[The Arch Way]] if this causes confusion. Users must be vigilant and take responsibility for maintaining their own system. '''When performing a system update, it is essential that users read all information output by pacman and use common sense.''' If a user-modified configuration file needs to be upgraded for a new version of a package, a {{ic|.pacnew}} file will be created to avoid overwriting settings modified by the user. Pacman will prompt the user to merge them. These files require manual intervention from the user and it is good practice to handle them right after every package upgrade or removal. See [[Pacnew and Pacsave Files]] for more info.<br />
<br />
{{Tip|Remember that pacman's output is logged in {{ic|/var/log/pacman.log}}.}}<br />
<br />
Before upgrading, it is advisable to visit the [https://www.archlinux.org/ Arch Linux home page] to check the latest news (alternatively subscribe to the [https://www.archlinux.org/feeds/news/ RSS feed], [https://mailman.archlinux.org/mailman/listinfo/arch-announce/ arch-announce mailing list], or follow [https://twitter.com/archlinux @archlinux] on Twitter), when updates require out-of-the-ordinary user intervention (more than what can be handled simply by following the instructions given by pacman), an appropriate news post will be made.<br />
<br />
If one encounters problems that cannot be solved by these instructions, make sure to search the forum. It is likely that others have encountered the same problem and have posted instructions for solving it.<br />
<br />
=== Querying package databases ===<br />
<br />
Pacman queries the local package database with the {{ic|-Q}} flag; see:<br />
<br />
$ pacman -Q --help<br />
<br />
and queries the sync databases with the {{ic|-S}} flag; see:<br />
<br />
$ pacman -S --help<br />
<br />
Pacman can search for packages in the database, searching both in packages' names and descriptions:<br />
<br />
$ pacman -Ss ''string1'' ''string2'' ...<br />
<br />
To search for already installed packages:<br />
<br />
$ pacman -Qs ''string1'' ''string2'' ...<br />
<br />
To display extensive information about a given package:<br />
<br />
$ pacman -Si ''package_name''<br />
<br />
For locally installed packages:<br />
<br />
$ pacman -Qi ''package_name''<br />
<br />
Passing two {{ic|-i}} flags will also display the list of backup files and their modification states:<br />
<br />
$ pacman -Qii ''package_name''<br />
<br />
To retrieve a list of the files installed by a package:<br />
<br />
$ pacman -Ql ''package_name''<br />
<br />
For packages not installed, use [[pkgfile]].<br />
<br />
One can also query the database to know which package a file in the file system belongs to:<br />
<br />
$ pacman -Qo ''/path/to/file_name''<br />
<br />
To list all packages no longer required as dependencies (orphans):<br />
<br />
$ pacman -Qdt<br />
<br />
To list a dependency tree of a package:<br />
<br />
$ pactree ''package_name''<br />
<br />
To list all the packages depending on an ''installed'' package, use {{ic|whoneeds}} from [[pkgtools]]:<br />
<br />
$ whoneeds ''package_name''<br />
<br />
=== Additional commands ===<br />
<br />
Upgrade the system and install a list of packages (one-liner):<br />
<br />
# pacman -Syu ''package_name1'' ''package_name2'' ...<br />
<br />
Download a package without installing it:<br />
<br />
# pacman -Sw ''package_name''<br />
<br />
Install a 'local' package that is not from a remote repository (e.g. the package is from the [[Arch User Repository|AUR]]):<br />
<br />
# pacman -U /path/to/package/package_name-version.pkg.tar.xz<br />
<br />
{{Tip|To keep a copy of the local package in pacman's cache, use:<br />
# pacman -U file://path/to/package/package_name-version.pkg.tar.xz<br />
}}<br />
<br />
Install a 'remote' package (not from a repository stated in pacman's configuration files):<br />
<br />
# pacman -U <nowiki>http://www.example.com/repo/example.pkg.tar.xz</nowiki><br />
<br />
Clean the package cache of packages that are not currently installed ({{ic|/var/cache/pacman/pkg}}):<br />
<br />
{{Warning|Only do this if certain that the installed packages are stable and that a [[Downgrading Packages|downgrade]] will not be necessary, since it will remove all of the old versions from the cache folder, leaving behind only the versions of the packages that are currently installed. Having older versions of packages comes in handy in case a future upgrade causes breakage.}}<br />
<br />
# pacman -Sc<br />
<br />
Clean the entire package cache:<br />
<br />
{{Warning|This clears out the entire package cache. Doing this is considered a bad practice; it prevents the ability to downgrade something directly from the cache folder. Users will be forced to have to use an alternative source of deprecated packages such as the [[Downgrading Packages#ARM|Arch Rollback Machine]].}}<br />
<br />
# pacman -Scc<br />
<br />
{{Tip|As an alternative to both the {{ic|-Sc}} and {{ic|-Scc}} switches, consider using {{ic|paccache}} from {{pkg|pacman}}. This offers more control over what and how many packages are deleted. Run {{ic|paccache -h}} for instructions.}}<br />
<br />
=== Partial upgrades are unsupported ===<br />
<br />
Arch Linux is a rolling release, and new [[Wikipedia:Library (computing)|library]] versions will be pushed to the repositories. The developers and Trusted Users will rebuild all the packages in the repositories that need to be rebuilt against the libraries. If the system has locally installed packages (such as [[Arch User Repository|AUR]] packages), users will need to rebuild them when their dependencies receive a [[Wikipedia:soname|soname]] bump.<br />
<br />
This means that partial upgrades are '''not supported'''. Do not use {{ic|pacman -Sy package}} or any equivalent such as {{ic|pacman -Sy}} and then {{ic|pacman -S package}}. Always upgrade before installing a package -- particularly if pacman has refreshed the sync repositories. Be very careful when using {{ic|IgnorePkg}} and {{ic|IgnoreGroup}} for the same reason.<br />
<br />
If a partial upgrade scenario has been created, and binaries are broken because they cannot find the libraries they are linked against, '''do not "fix" the problem simply by symlinking'''. Libraries receive [[Wikipedia:soname|soname]] bumps when they are '''not backwards compatible'''. A simple {{ic|pacman -Syu}} to a properly synced mirror will fix the problem as long as pacman is not broken.<br />
<br />
== Troubleshooting ==<br />
<br />
{{FAQ<br />
|question=An update to package XYZ broke my system!<br />
|answer=Arch Linux is a rolling-release cutting-edge distribution. Package updates are available as soon as they are deemed stable enough for general use. However, updates sometimes require user intervention: configuration files may need to be updated, optional dependencies may change, etc.<br />
<br />
The most important tip to remember is to not "blindly" update Arch systems. Always read the list of packages to be updated. Note whether "critical" packages are going to be updated ({{Pkg|linux}}, {{Pkg|xorg-server}}, and so on). If so, it is usually a good idea to check for any news at https://www.archlinux.org/ and scan recent forum posts to see if people are experiencing problems as a result of an update.<br />
<br />
If a package update is expected/known to cause problems, packagers will ensure that pacman displays an appropriate message when the package is updated. If experiencing trouble after an update, double-check pacman's output by looking at the log ({{ic|/var/log/pacman.log}}). <br />
<br />
At this point, '''only after ensuring there is no information available through pacman, there is no relative news on https://www.archlinux.org/, and there are no forum posts regarding the update''', consider seeking help on the forum, over [[IRC Channel|IRC]], or [[Downgrading Packages|downgrading the offending package]].}}<br />
<br />
{{FAQ<br />
|question=I know an update to package ABC was released, but pacman says my system is up to date!<br />
|answer=Pacman mirrors are not synced immediately. It may take over 24 hours before an update is available to you. The only options are be patient or use another mirror. [https://www.archlinux.org/mirrors/status/ MirrorStatus] can help you identify an up-to-date mirror.}}<br />
<br />
{{FAQ<br />
|question=I get an error when updating: "file exists in filesystem"!<br />
|answer=ASIDE: ''Taken from https://bbs.archlinux.org/viewtopic.php?id=56373 by Misfit138.''<br />
<br />
error: could not prepare transaction<br />
error: failed to commit transaction (conflicting files)<br />
package: /path/to/file exists in filesystem<br />
Errors occurred, no packages were upgraded.<br />
<br />
Why this is happening: pacman has detected a file conflict, and by design, will not overwrite files for you. This is a design feature, not a flaw. <br />
<br />
The problem is usually trivial to solve. A safe way is to first check if another package owns the file ({{ic|pacman -Qo /path/to/file}}). If the file is owned by another package, [[Reporting Bug Guidelines|file a bug report]]. If the file is not owned by another package, rename the file which 'exists in filesystem' and re-issue the update command. If all goes well, the file may then be removed.<br />
<br />
If you had installed a program manually without using pacman or a frontend, you have to remove it and all its files and reinstall properly using pacman.<br />
<br />
Every installed package provides {{ic|/var/lib/pacman/local/$package-$version/files}} file that contains metadata about this package. If this file gets corrupted - is empty or missing - it results in "file exists in filesystem" errors when trying to update the package. Such an error usually concerns only one package and instead of manually renaming and later removing all the files that belong to the package in question, you can run {{ic|pacman -S --force $package}} to force pacman to overwrite these files.<br />
<br />
Do '''not''' run {{ic|pacman -Syu --force}}.}}<br />
<br />
{{FAQ<br />
|question=I get an error when installing a package: "not found in sync db"<br />
|answer=Firstly, ensure the package actually exists (and watch out for typos!). If certain the package exists, your package list may be out-of-date or your repositories may be incorrectly configured. Try running {{ic|pacman -Syy}} to force a refresh of all package lists.}}<br />
<br />
{{FAQ<br />
|question=I get an error when installing a package: "target not found"<br />
|answer=Firstly, ensure the package actually exists (and watch out for typos!). If certain the package exists, your package list may be out-of-date or your repositories may be incorrectly configured. Try running {{ic|pacman -Syy}} to force a refresh of all package lists.<br/><br />
It could also be that the repository containing the package is not enabled on your system, e.g. the package could be in the multilib repository, but multilib is not enabled on your system.}}<br />
<br />
{{FAQ<br />
|question=Pacman is repeatedly upgrading the same package!<br />
|answer=This is due to duplicate entries in {{ic|/var/lib/pacman/local/}}, such as two {{ic|linux}} instances. {{ic|pacman -Qi}} outputs the correct version, but {{ic|pacman -Qu}} recognizes the old version and therefore will attempt to upgrade.<br />
<br />
Solution: delete the offending entry in {{ic|/var/lib/pacman/local/}}.<br />
<br />
{{Note|Pacman version 3.4 should display an error in case of duplicate entries, which should make this note obsolete.}}}}<br />
<br />
{{FAQ<br />
|question=Pacman crashes during an upgrade!<br />
|answer=In the case that pacman crashes with a "database write" error whilst removing packages, and reinstalling or upgrading packages fails:<br />
<br />
# Boot using the Arch install media.<br />
# Mount your root filesystem.<br />
# Update the pacman database via {{ic|pacman -Syy}}.<br />
# Reinstall the broken package via {{ic|pacman -r /path/to/root -S package}}.}}<br />
<br />
{{FAQ<br />
|question=I installed software using "make install"; these files do not belong to any package!<br />
|answer=If receiving a "conflicting files" error, note that pacman will overwrite manually-installed software if supplied with the {{ic|--force}} switch ({{ic|pacman -S --force}}). See [[Pacman Tips#Identify files not owned by any package]] for a script that searches the file system for ''disowned'' files.<br />
{{Warning|Take care when using the {{ic|--force}} switch because it can cause major problems if used improperly. It is recommended to only use this option when it is recommended in the Arch news.}}}}<br />
<br />
{{FAQ<br />
|question=I need a package with a specific file. How do I know what provides it?<br />
|answer=Install [[pkgfile]] which uses a separate database with all files and their associated packages.}}<br />
<br />
{{FAQ<br />
|question=Pacman is completely broken! How do I reinstall it?<br />
|answer=In the case that pacman is broken beyond repair, manually download the necessary packages ({{Pkg|openssl}}, {{Pkg|libarchive}}, and {{Pkg|pacman}}) and extract them to root. The pacman binary will be restored along with its default configuration file. Afterwards, reinstall these packages with pacman to maintain package database integrity. Additional information and an example (outdated) script that automates the process is available in [https://bbs.archlinux.org/viewtopic.php?id=95007 this] forum post.}}<br />
<br />
{{FAQ<br />
|question=After updating my system, I get a "unable to find root device" error after rebooting and my system will no longer boot<br />
|answer=Most likely your initramfs got broken during a kernel update (improper use of pacman's {{ic|--force}} option can be a cause). You have two options:<br />
<br />
'''1.''' Try the ''Fallback'' entry.<br />
<br />
: {{Tip|In case you removed this entry for whatever reason, you can always press the {{Keypress|Tab}} key when the bootloader menu shows up (for Syslinux) or {{Keypress|e}} (for GRUB), rename it {{ic|initramfs-linux-fallback.img}} and press {{Keypress|Enter}} or {{Keypress|b}} (depending on your bootloader) to boot with the new parameters.}}<br />
<br />
: Once the system starts, run this command (for the stock {{Pkg|linux}} kernel) either from the console or from a terminal to rebuild the initramfs image:<br />
<br />
: {{bc|# mkinitcpio -p linux}}<br />
<br />
'''2.''' If that does not work, from a 2012 Arch release (CD/DVD or USB stick), run:<br />
<br />
: {{Note|If you do not have a 2012 release or if you only have some other "live" Linux distribution laying around, you can [[chroot]] using the old fashion way. Obviously, there will be more typing than simply running the {{ic|arch-chroot}} script.}}<br />
<br />
: {{bc|<nowiki><br />
# mount /dev/sdxY /mnt #Your root partition.<br />
# mount /dev/sdxZ /mnt/boot #If you use a separate /boot partition.<br />
# arch-chroot /mnt<br />
# pacman -Syu mkinitcpio systemd linux</nowiki>}}<br />
<br />
: Reinstalling the kernel (the {{Pkg|linux}} package) will automatically re-generate the initramfs image with {{ic|mkinitcpio -p linux}}. There is no need to do this separately.<br />
<br />
: Afterwards, it is recommended that you run {{ic|exit}}, {{ic|umount /mnt/{boot,} }} and {{ic|reboot}}.<br />
<br />
: {{Note|If you cannot enter the arch-chroot or chroot environment but need to re-install packages you can use the command {{ic|pacman -r /mnt -Syu foo bar}} to use pacman on your root partition.}}}}<br />
<br />
{{FAQ<br />
|question=Signature from "User <email@gmail.com>" is unknown trust, installation failed<br />
|answer=Follow [[pacman-key#Resetting all the keys]]. Or you can try to manually upgrade {{Pkg|archlinux-keyring}} package first, i.e. {{ic|pacman -S archlinux-keyring}}. }}<br />
<br />
{{FAQ<br />
|question=I keep getting <br />
:error: PackageName: signature from "User <email@archlinux.org>" is invalid<br />
:error: failed to commit transaction (invalid or corrupted package (PGP signature))<br />
:Errors occured, no packages were upgraded. <br />
|answer=It happens when the system clock is wrong. Set the [[time]] and run: {{bc|# hwclock -w}} before to try to install/upgrade a package again.}}<br />
<br />
{{FAQ<br />
|question=I keep getting a "failed to commit transaction (invalid or corrupted package)" error<br />
|answer=Look for {{ic|*.part}} files (partially downloaded packages) in {{ic|/var/cache/pacman/pkg}} and remove them (often caused by usage of custom {{ic|XferCommand}} in {{ic|pacman.conf}}).}}<br />
<br />
{{FAQ<br />
|question=I get an error every time I use pacman saying 'warning: current locale is invalid; using default "C" locale'. What do I do?<br />
|answer=As the error message says, your locale is not correctly configured. See [[Locale]].}}<br />
<br />
{{FAQ<br />
|question=How can I get Pacman to honor my proxy settings?<br />
|answer=Make sure that the relevant environment variables ({{ic|$http_proxy}}, {{ic|$ftp_proxy}} etc.) are set up. If you use Pacman with [[sudo]], you need to configure sudo to [[sudo#Environment variables (Outdated?)|pass these environment variables to Pacman]].<br />
}}<br />
<br />
== See also ==<br />
<br />
* [[Common Applications/Utilities#Package management]]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Firefox/Privacy&diff=265012Firefox/Privacy2013-07-03T12:00:37Z<p>JoshuaBranson: /* Disconnect */ I changed the link to the Disconnect page from "the offocial website" to "offocial website".</p>
<hr />
<div>[[Category:Web Browser]]<br />
{{Article summary start}}<br />
{{Article summary text|Configuration and installation of recommended add-ons to the Firefox browser to improve privacy}}<br />
{{Article summary heading|Required}}<br />
{{Article summary wiki|Firefox}}: Installing and troubleshooting the Firefox browser and plugins<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Tor}}: Anonymous proxy network<br />
{{Article summary wiki|Browser Plugins}}: Acquiring and installing plugins such as [[Flash]]<br />
{{Article summary wiki|Firefox Tweaks}}: Configuration and modifications<br />
{{Article summary wiki|Speed-up Firefox using tmpfs}}: Caching the profile in RAM<br />
{{Article summary end}}<br />
<br />
This article overviews some useful extensions which enhance security and privacy while using the Firefox web browser.<br />
<br />
==HTTPS Everywhere==<br />
<br />
[https://www.eff.org/https-everywhere HTTPS Everywhere] is an extension which encrypts your communication with a website. It forces a connection over HTTPS instead of HTTP wherever possible.<br />
<br />
HTTPS Everywhere will be automatically configured and enabled upon restarting Firefox. For information on how to set up your own rules for different websites please visit [https://www.eff.org/https-everywhere/rulesets the official website].<br />
<br />
{{Note|HTTPS Everywhere does not magically enable HTTPS for every site on the internet. The site needs to support HTTPS and HTTPS Everywhere should have a ruleset configured for that site.}}<br />
<br />
==Adblock Plus==<br />
<br />
[https://adblockplus.org/en/ Adblock Plus] can be used to stop intrusive advertisments but it can also be configured to block websites from tracking you.<br />
<br />
Once installed visit the [https://easylist.adblockplus.org/en/ Easy List website] and add the EasyList and EasyPrivacy lists to your Adblock Plus filter subscriptions. This is done by simply clicking any of the "Add [filter] to Adblock Plus" on the webpage. This will bring up the add filter prompt. Review the details and click "Add Subscription".<br />
<br />
EasyList is the primary subscription that removes adverts from English webpages, including unwanted frames, images and objects.<br />
<br />
EasyPrivacy is a supplementary subscription for EasyList which removes all forms of tracking from the internet, including web bugs, tracking scripts and information collectors.<br />
<br />
==Disconnect==<br />
<br />
Disconnect is a open source project aimed at stopping 2,000 third-party sites from tracking a user. It encrypts data sent to popular sites and claims to loads web pages 27 percent faster. Disconnect shows its users, in real time, how many tracking attempts from Google, Twitter, Facebook, and more are stopped. It categorizes tracking attempts into advertizing, analytical, social, and content, which makes it easy to monitor how one is being tracked.<br />
<br />
Disconnect can also stop side-jacking, which utilizes stolen cookies to steal personal data. It's easy to use and well supported. It can be added to firefox at the [https://disconnect.me/ offocial website].<br />
<br />
==Ghostery==<br />
<br />
[https://www.ghostery.com/ Ghostery] is similiar to Disconnect, but is a proprietary project to track businesses which employ the use of website trackers. From the website:<br />
<br />
''Ghostery tracks over 1,000 trackers and gives you a roll-call of the ad networks, behavioral data providers, web publishers, and other companies interested in your activity.<br />
<br />
Ghostery can be installed from the [https://www.ghostery.com/download official website]. Once installed Ghostery can be configured from:<br />
chrome://ghostery/content/options.html<br />
<br />
Or by selecting preferences from the Add-ons Manager in Firefox which will bring you to the configuration page. <br />
<br />
Alternatively you can configure Ghostery through the included wizard:<br />
chrome://ghostery/content/wizard.html<br />
<br />
From the configuration page you can configure what 3rd party elements(3pes) Ghostery should block. When navigating the categories you can click on the individual profiles for more information about that specific company. You can also choose to clear Flash and Silverlight cookies on exit. Also, you can enable the cookie protection feature which prevents selected websites from setting cookies in your browser.<br />
<br />
==NoScript==<br />
<br />
[http://noscript.net/ NoScript] is an extension which disables JavaScript, Java, Flash and other plugins on any website not specifically whitelisted by the user. This extension will protect you from exploitation of security vulnerabilities by not letting anything but trusted sites (e.g: your bank, webmail) serve you executable content.<br />
<br />
Once installed you can configure settings for NoScript by either clicking its icon on the toolbar or right clicking a page and navigating to NoScript. You will then have the option to enable/disable scripts for the current page, as well as any third party scripts that the page is linking to. Alternatively you can choose to enable scripts temporarily for that session only.<br />
<br />
For more detailed configuration see the [http://noscript.net/faq NoScript FAQ].<br />
<br />
==Cookie Monster==<br />
<br />
[https://addons.mozilla.org/en-US/firefox/addon/cookie-monster/ Cookie Monster] is a similar extension to NoScript but will the goal of managing cookies.<br />
<br />
From the preferences for Cookie Monster select "Block All Cookies". Once this is done, just as with NoScript, you can enable the use of cookies for specific pages from either the Cookie Monster icon on the toolbar or by right clicking the page and navigating to Cookie Monster. You have the option to accept cookies from the website in question or alternatively to only temporarily allow cookies for the current session.<br />
<br />
==RefControl==<br />
<br />
[http://www.stardrifter.org/refcontrol/ RefControl] is an extension to control what gets sent as the HTTP Referer. Once installed RefControl can be configured so that no referer gets sent when navigating to a new webpage. This prevents the server from knowing which website you originated from.<br />
<br />
To do this open RefControl's preferences and change the setting for "Default for sites not listed:" to <Block>.<br />
<br />
== RequestPolicy ==<br />
<br />
[https://www.requestpolicy.com/ RequestPolicy] is an extension for Mozilla browsers which lets you have control over cross-site requests. The latest development version lets you blacklist or whitelist requests by default. Disabling unnecessary cross-site requests leads to better privacy, safety and faster browsing.<br />
<br />
For more information on cross-site requests and RequestPolicy visit [https://www.requestpolicy.com/faq.html here].</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Firefox/Privacy&diff=264976Firefox/Privacy2013-07-02T23:24:46Z<p>JoshuaBranson: I added Disconnect</p>
<hr />
<div>[[Category:Web Browser]]<br />
{{Article summary start}}<br />
{{Article summary text|Configuration and installation of recommended add-ons to the Firefox browser to improve privacy}}<br />
{{Article summary heading|Required}}<br />
{{Article summary wiki|Firefox}}: Installing and troubleshooting the Firefox browser and plugins<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Tor}}: Anonymous proxy network<br />
{{Article summary wiki|Browser Plugins}}: Acquiring and installing plugins such as [[Flash]]<br />
{{Article summary wiki|Firefox Tweaks}}: Configuration and modifications<br />
{{Article summary wiki|Speed-up Firefox using tmpfs}}: Caching the profile in RAM<br />
{{Article summary end}}<br />
<br />
This article overviews some useful extensions which enhance security and privacy while using the Firefox web browser.<br />
<br />
==HTTPS Everywhere==<br />
<br />
[https://www.eff.org/https-everywhere HTTPS Everywhere] is an extension which encrypts your communication with a website. It forces a connection over HTTPS instead of HTTP wherever possible.<br />
<br />
HTTPS Everywhere will be automatically configured and enabled upon restarting Firefox. For information on how to set up your own rules for different websites please visit [https://www.eff.org/https-everywhere/rulesets the official website].<br />
<br />
{{Note|HTTPS Everywhere does not magically enable HTTPS for every site on the internet. The site needs to support HTTPS and HTTPS Everywhere should have a ruleset configured for that site.}}<br />
<br />
==Adblock Plus==<br />
<br />
[https://adblockplus.org/en/ Adblock Plus] can be used to stop intrusive advertisments but it can also be configured to block websites from tracking you.<br />
<br />
Once installed visit the [https://easylist.adblockplus.org/en/ Easy List website] and add the EasyList and EasyPrivacy lists to your Adblock Plus filter subscriptions. This is done by simply clicking any of the "Add [filter] to Adblock Plus" on the webpage. This will bring up the add filter prompt. Review the details and click "Add Subscription".<br />
<br />
EasyList is the primary subscription that removes adverts from English webpages, including unwanted frames, images and objects.<br />
<br />
EasyPrivacy is a supplementary subscription for EasyList which removes all forms of tracking from the internet, including web bugs, tracking scripts and information collectors.<br />
<br />
==Disconnect==<br />
<br />
Disconnect is a open source project aimed at stopping 2,000 third-party sites from tracking a user. It encrypts data sent to popular sites and claims to loads web pages 27 percent faster. Disconnect shows its users, in real time, how many tracking attempts from Google, Twitter, Facebook, and more are stopped. It categorizes tracking attempts into advertizing, analytical, social, and content, which makes it easy to monitor how one is being tracked.<br />
<br />
Disconnect can also stop side-jacking, which utilizes stolen cookies to steal personal data. It's easy to use and well supported. It can be added to firefox at [https://disconnect.me/ the offocial website].<br />
<br />
==Ghostery==<br />
<br />
[https://www.ghostery.com/ Ghostery] is similiar to Disconnect, but is a proprietary project to track businesses which employ the use of website trackers. From the website:<br />
<br />
''Ghostery tracks over 1,000 trackers and gives you a roll-call of the ad networks, behavioral data providers, web publishers, and other companies interested in your activity.<br />
<br />
Ghostery can be installed from the [https://www.ghostery.com/download official website]. Once installed Ghostery can be configured from:<br />
chrome://ghostery/content/options.html<br />
<br />
Or by selecting preferences from the Add-ons Manager in Firefox which will bring you to the configuration page. <br />
<br />
Alternatively you can configure Ghostery through the included wizard:<br />
chrome://ghostery/content/wizard.html<br />
<br />
From the configuration page you can configure what 3rd party elements(3pes) Ghostery should block. When navigating the categories you can click on the individual profiles for more information about that specific company. You can also choose to clear Flash and Silverlight cookies on exit. Also, you can enable the cookie protection feature which prevents selected websites from setting cookies in your browser.<br />
<br />
==NoScript==<br />
<br />
[http://noscript.net/ NoScript] is an extension which disables JavaScript, Java, Flash and other plugins on any website not specifically whitelisted by the user. This extension will protect you from exploitation of security vulnerabilities by not letting anything but trusted sites (e.g: your bank, webmail) serve you executable content.<br />
<br />
Once installed you can configure settings for NoScript by either clicking its icon on the toolbar or right clicking a page and navigating to NoScript. You will then have the option to enable/disable scripts for the current page, as well as any third party scripts that the page is linking to. Alternatively you can choose to enable scripts temporarily for that session only.<br />
<br />
For more detailed configuration see the [http://noscript.net/faq NoScript FAQ].<br />
<br />
==Cookie Monster==<br />
<br />
[https://addons.mozilla.org/en-US/firefox/addon/cookie-monster/ Cookie Monster] is a similar extension to NoScript but will the goal of managing cookies.<br />
<br />
From the preferences for Cookie Monster select "Block All Cookies". Once this is done, just as with NoScript, you can enable the use of cookies for specific pages from either the Cookie Monster icon on the toolbar or by right clicking the page and navigating to Cookie Monster. You have the option to accept cookies from the website in question or alternatively to only temporarily allow cookies for the current session.<br />
<br />
==RefControl==<br />
<br />
[http://www.stardrifter.org/refcontrol/ RefControl] is an extension to control what gets sent as the HTTP Referer. Once installed RefControl can be configured so that no referer gets sent when navigating to a new webpage. This prevents the server from knowing which website you originated from.<br />
<br />
To do this open RefControl's preferences and change the setting for "Default for sites not listed:" to <Block>.<br />
<br />
== RequestPolicy ==<br />
<br />
[https://www.requestpolicy.com/ RequestPolicy] is an extension for Mozilla browsers which lets you have control over cross-site requests. The latest development version lets you blacklist or whitelist requests by default. Disabling unnecessary cross-site requests leads to better privacy, safety and faster browsing.<br />
<br />
For more information on cross-site requests and RequestPolicy visit [https://www.requestpolicy.com/faq.html here].</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=%E0%B9%82%E0%B8%84%E0%B8%A3%E0%B8%87%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87%E0%B8%82%E0%B8%AD%E0%B8%87_ArchWiki_%E0%B8%A0%E0%B8%B2%E0%B8%A9%E0%B8%B2%E0%B9%84%E0%B8%97%E0%B8%A2&diff=264887โครงสร้างของ ArchWiki ภาษาไทย2013-07-02T02:27:24Z<p>JoshuaBranson: Redirected page to Table of Contents (ไทย)</p>
<hr />
<div>#REDIRECT [[Table of Contents (ไทย)]]</div>JoshuaBransonhttps://wiki.archlinux.org/index.php?title=Pkgstats&diff=264884Pkgstats2013-07-02T02:19:47Z<p>JoshuaBranson: Undo revision 264882 by JoshuaBranson (talk)</p>
<hr />
<div>[[Category:Package management]]{{DISPLAYTITLE:pkgstats}}<br />
[[de:Pkgstats]]<br />
pkgstats sends a list of all installed packages, [https://www.archlinux.org/news/pkgstats-now-collects-modules-usage/ kernel modules], the architecture and the mirror you are using to the Arch Linux project.<br />
This information is anonymous and cannot be used to identify the user, but it will help Arch developers prioritize their efforts.<br />
<br />
== Installation ==<br />
You can install {{Pkg|pkgstats}} form the [[Official Repositories]].<br />
<br />
== Usage ==<br />
<br />
pkgstats -h<br />
<br />
usage: /usr/bin/pkgstats [option]<br />
options:<br />
-v show the version of pkgstats<br />
-d enable debug mode<br />
-h show this help<br />
-s show what information would be sent<br />
(but do not send anything)<br />
-q be quiet except on errors<br />
<br />
Statistics are available at https://www.archlinux.de/?page=Statistics<br />
<br />
You can read the official [https://bbs.archlinux.org/viewtopic.php?id=105431 forum thread] for more info.</div>JoshuaBranson