https://wiki.archlinux.org/api.php?action=feedcontributions&user=Sudowoodo&feedformat=atomArchWiki - User contributions [en]2024-03-28T09:09:26ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Talk:Arch_Linux&diff=381599Talk:Arch Linux2015-07-09T18:33:20Z<p>Sudowoodo: /* Big merge? */ re</p>
<hr />
<div>== Accuracy of this page and [[Arch Linux]] ==<br />
<br />
This arch-general post speaks for itself: [https://lists.archlinux.org/pipermail/arch-general/2015-July/039443.html] -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 17:37, 5 July 2015 (UTC)<br />
<br />
:I was wrong about it being unprotected (got that mixed up with the old Arch Way 2.0 page), but I stand by the rest of what I said. This page has never truly been ''official'' and only reflects one interpretation of the development philosophy. I don't think it's in tune with the overall consensus of the developers. It's definitely at odds with how things are actually done.<br />
:<br />
:-- [[User:thestinger|thestinger]] 01:55, 6 July 2015 (UTC)<br />
:Alright, I made an attempt at aligning it more with reality. A lot of this is quite subjective but I think I've made it into a much more honest and useful overview of Arch's philosophy. The goal should be letting people know if Arch is what they're looking for and explaining the basic guidelines used for decision-making in the development process rather than trying to advertise it.<br />
:<br />
: -- [[User:thestinger|thestinger]] 04:20, 6 July 2015 (UTC)<br />
<br />
::Thanks! I've tried to edit [[Arch Linux#Simplicity]] accordingly [https://wiki.archlinux.org/index.php?title=Arch_Linux&curid=2072&diff=381123&oldid=376547]. Unless there are other comments, this can be closed. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 09:51, 6 July 2015 (UTC)<br />
<br />
:::You should merge the [[The_Arch_Way#Code-correctness|"Code-correctness"]] section into "Pragmatism" now. Its current stripped down singular "elegance of design" sentence reads like the design aim is to be "the {{Pkg|enlightenment}} of distros"&#153;. A merge could be to: <br />
:::* Add a clarifying "[Code]" to the start of Bertrand Meyer's quote and let it simply end the "Pragmatism" section or move it to the top of it; removing the "Code correctness" section. <br />
:::* Optionally, you could change "Evidence-based technical analysis and debate are what matter, not politics or popular opinion." into "Evidence-based technical analysis and debate to achieve a clean and robust base implementation are what matter, not politics or popular opinion."<br />
:::--[[User:Indigo|Indigo]] ([[User talk:Indigo|talk]]) 11:59, 6 July 2015 (UTC)<br />
::::Yeah, I thought about getting rid of it but it wasn't entirely redundant so I was unsure. It would also make sense to add make a section covering what 'Freedom' did before, but from a more grounded perspective. The base system is general purpose and everything ''above'' that layer is up to the user. It's more about versatility than choice. The low-level choices are already made for the user and there isn't a desire to change that. -- [[User:thestinger|thestinger]] 13:48, 6 July 2015 (UTC)<br />
:::::If you remove the first sentence from the code-correctness quote, it fits very nicely with the pragmatism section: "If a system does not do what it is supposed to do, then everything else about it matters little." It emphasizes that ideology takes a back seat to functionality with Arch. Then I think it would be safe to ditch the code-correctness section. [[User:Silverhammermba|Silverhammermba]] ([[User talk:Silverhammermba|talk]]) 14:04, 8 July 2015 (UTC)<br />
<br />
::::::Well, we don't need to cut on the quote for it to make sense in Pragmatism. Implemented [https://wiki.archlinux.org/index.php?title=The_Arch_Way&type=revision&diff=381341&oldid=381223], thanks. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 14:31, 8 July 2015 (UTC)<br />
<br />
== Big merge? ==<br />
<br />
I see a lot of overlapping between this article and [[Arch Linux]], both in content and purpose: how much of a blasphemy would it be to merge them, under the "Arch Linux" title? Since "The Arch Way" has become sort of an Arch trademark, a "The Arch Way" 2nd-level section could be created in the unified article, but the merge would allow us to deduplicate a lot of information. Also, if this is agreed upon, we could also merge the short [[History of Arch Linux]] article there.<br />
<br />
A draft ToC could be:<br />
<br />
: Intro from [[Arch Linux]]<br />
# The Arch Way (intro from [[The Arch Way]])<br />
## Simplicity (from [[Arch Linux#Simplicity]], [[Arch Linux#Source integrity]] and [[The Arch Way#Simplicity]])<br />
## Modernity (from [[Arch Linux#Modernity]])<br />
## Pragmatism (from [[The Arch Way#Pragmatism]])<br />
## User-centric (from [[The Arch Way#User-centric]])<br />
## Versatility (from [[The Arch Way#Versatility]])<br />
# Software packaging (from [[Arch Linux#Software packaging]])<br />
# Community (from [[Arch Linux#Community]])<br />
# History (from [[Arch Linux#History]] and [[History of Arch Linux]])<br />
<br />
[[Arch Linux#Summary]] should be merged in a proper section above I suppose.<br />
<br />
Once the content was merged that way, it would be easier to further reduce the remaining redundancies.<br />
<br />
[[The Arch Way]] is linked from [[Main page]], so I'd suggest to replace it with either [[Arch Terminology]], or move the [[FAQ]] link to the left column, and add a link to [[:Category:Getting and installing Arch]] in the right column.<br />
<br />
— [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 13:11, 9 July 2015 (UTC)<br />
<br />
:I agree, I always thought [[The Arch Way]] and [[Arch Linux]] reflect each other too much. -[[User:Sudowoodo|Sudowoodo]] ([[User talk:Sudowoodo|talk]]) 18:33, 9 July 2015 (UTC)</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Tor&diff=373225Tor2015-05-10T16:11:52Z<p>Sudowoodo: </p>
<hr />
<div>[[Category:Internet applications]]<br />
[[Category:Proxy servers]]<br />
[[es:Tor]]<br />
[[ja:Tor]]<br />
[[ru:Tor]]<br />
[[zh-CN:Tor]]<br />
{{Related articles start}}<br />
{{Related|GNUnet}}<br />
{{Related|I2P}}<br />
{{Related|Freenet}}<br />
{{Related articles end}}<br />
[https://www.torproject.org Tor] is an open source implementation of 2nd generation [[Wikipedia:Onion routing|onion routing]] that provides free access to an anonymous proxy network. Its primary goal is to enable [[Wikipedia:Internet anonymity|online anonymity]] by protecting against [[Wikipedia:Traffic analysis|traffic analysis]] attacks.<br />
<br />
== Introduction ==<br />
<br />
Users of the Tor network run an onion proxy on their machine. This software connects out to Tor, periodically negotiating a virtual circuit through the Tor network. Tor employs cryptography in a layered manner (hence the 'onion' analogy), ensuring perfect forward secrecy between routers. At the same time, the onion proxy software presents a SOCKS interface to its clients. SOCKS-aware applications may be pointed at Tor, which then multiplexes the traffic through a Tor virtual circuit.<br />
<br />
{{Warning|Tor by itself is ''not'' all you need to maintain your anonymity. There are several major pitfalls to watch out for (see: [https://www.torproject.org/download/download.html#warning Want Tor to really work?]).}}<br />
<br />
Through this process the onion proxy manages networking traffic for end-user anonymity. It keeps a user anonymous by encrypting traffic, sending it through other nodes of the Tor network, and decrypting it at the last node to receive your traffic before forwarding it to the server you specified. One trade off that has to be made for the anonymity Tor provides is that it can be considerably slower than a regular direct connection, due to the large amount of traffic re-routing. Additionally, although Tor provides protection against traffic analysis it cannot prevent traffic confirmation at the boundaries of the Tor network (i.e. the traffic entering and exiting the network).<br />
<br />
See [[Wikipedia:Tor (anonymity network)]] for more information.<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] {{Pkg|tor}}, available in the [[official repositories]].<br />
<br />
The {{Pkg|arm}} (Anonymizing Relay Monitor) package provides a terminal status monitor for bandwidth usage, connection details and more.<br />
<br />
Additionally, there is a [[Qt]] frontend for Tor in package {{AUR|vidalia}}. In addition to controlling the Tor process, Vidalia allows you to view and configure the status of Tor, monitor bandwidth usage, and view, filter, and search log messages.<br />
<br />
{{Warning|There are projects that [https://www.whonix.org/wiki/Tor_Controller#Vidalia_recommended_against recommend against] using ''vidalia''.}}<br />
<br />
== Configuration ==<br />
<br />
By default Tor reads configurations from the file {{ic|/etc/tor/torrc}}. The configuration options are explained in {{ic|man tor}} and the [https://torproject.org/docs/tor-manual.html.en Tor website]. The default configuration should work fine for most Tor users.<br />
<br />
There are potential conflicts between configurations in {{ic|torrc}} and those in {{ic|tor.service}}.<br />
* In {{ic|torrc}}, {{ic|RunAsDaemon}} should, as by default, be set to {{ic|0}}, since {{ic|Type<nowiki>=</nowiki>simple}} is set in the {{ic|[Service]}} section in {{ic|tor.service}}.<br />
* In {{ic|torrc}}, {{ic|User}} should not be set unless {{ic|User<nowiki>=</nowiki>}} is set to {{ic|root}} in the {{ic|[Service]}} section in {{ic|tor.service}}.<br />
<br />
=== Relay Configuration ===<br />
<br />
The maximum file descriptor number that can be opened by Tor can be set with {{ic|LimitNOFILE}} in {{ic|tor.service}}. Fast relays may want to increase this value.<br />
<br />
If your computer is not running a webserver, and you have not set {{ic|AccountingMax}}, consider changing your {{ic|ORPort}} to {{ic|443}} and/or your {{ic|DirPort}} to {{ic|80}}. Many Tor users are stuck behind firewalls that only let them browse the web, and this change will let them reach your Tor relay. If you are already using ports 80 and 443, other useful ports are 22, 110, and 143.[https://www.torproject.org/docs/tor-relay-debian]<br />
But since these are privileged ports, to do so Tor must be run as root, by setting {{ic|User<nowiki>=</nowiki>root}} in {{ic|tor.service}} and {{ic|User tor}} in {{ic|torrc}}.<br />
<br />
You may wish to review [https://blog.torproject.org/blog/lifecycle-of-a-new-relay Lifecycle of a New Relay] Tor documentation.<br />
<br />
== Running Tor in a Chroot ==<br />
<br />
{{Warning| Connecting with telnet to the local ControlPort seems to be broken while running Tor in a chroot}}<br />
<br />
For security purposes, it may be desirable to run Tor in a [[chroot]]. The following script will create an appropriate chroot in /opt/torchroot:<br />
<br />
{{hc|~/torchroot-setup.sh|2=<nowiki><br />
#!/bin/bash<br />
export TORCHROOT=/opt/torchroot<br />
<br />
mkdir -p $TORCHROOT<br />
mkdir -p $TORCHROOT/etc/tor<br />
mkdir -p $TORCHROOT/dev<br />
mkdir -p $TORCHROOT/usr/bin<br />
mkdir -p $TORCHROOT/usr/lib<br />
mkdir -p $TORCHROOT/usr/share/tor<br />
mkdir -p $TORCHROOT/var/lib<br />
<br />
ln -s /usr/lib $TORCHROOT/lib<br />
cp /etc/hosts $TORCHROOT/etc/<br />
cp /etc/host.conf $TORCHROOT/etc/<br />
cp /etc/localtime $TORCHROOT/etc/<br />
cp /etc/nsswitch.conf $TORCHROOT/etc/<br />
cp /etc/resolv.conf $TORCHROOT/etc/<br />
cp /etc/tor/torrc $TORCHROOT/etc/tor/<br />
<br />
cp /usr/bin/tor $TORCHROOT/usr/bin/<br />
cp /usr/share/tor/geoip* $TORCHROOT/usr/share/tor/<br />
cp /lib/libnss* /lib/libnsl* /lib/ld-linux-*.so* /lib/libresolv* /lib/libgcc_s.so* $TORCHROOT/usr/lib/<br />
cp $(ldd /usr/bin/tor | awk '{print $3}'|grep --color=never "^/") $TORCHROOT/usr/lib/<br />
cp -r /var/lib/tor $TORCHROOT/var/lib/<br />
chown -R tor:tor $TORCHROOT/var/lib/tor<br />
<br />
sh -c "grep --color=never ^tor /etc/passwd > $TORCHROOT/etc/passwd"<br />
sh -c "grep --color=never ^tor /etc/group > $TORCHROOT/etc/group"<br />
<br />
mknod -m 644 $TORCHROOT/dev/random c 1 8<br />
mknod -m 644 $TORCHROOT/dev/urandom c 1 9<br />
mknod -m 666 $TORCHROOT/dev/null c 1 3<br />
<br />
if [[ "$(uname -m)" == "x86_64" ]]; then<br />
cp /usr/lib/ld-linux-x86-64.so* $TORCHROOT/usr/lib/.<br />
ln -sr /usr/lib64 $TORCHROOT/lib64<br />
ln -s $TORCHROOT/usr/lib ${TORCHROOT}/usr/lib64<br />
fi<br />
<br />
</nowiki>}}<br />
<br />
After running the script as root, Tor can be launched in the [[chroot]] with the command:<br />
<br />
# chroot --userspec=tor:tor /opt/torchroot /usr/bin/tor<br />
<br />
or if you use systemd overload the service:<br />
<br />
{{hc|/etc/systemd/system/tor.service.d/chroot.conf|2=<nowiki><br />
[Service]<br />
User=root<br />
ExecStart=<br />
ExecStart=/usr/bin/sh -c "chroot --userspec=tor:tor /opt/torchroot /usr/bin/tor -f /etc/tor/torrc"<br />
KillSignal=SIGINT<br />
</nowiki>}}<br />
<br />
== Running Tor in a systemd-nspawn container with a virtual network interface ==<br />
In this example we will create a [[systemd-nspawn]] container named {{ic|tor-exit}} with a virtual macvlan network interface.<br />
<br />
See [[Systemd-nspawn]] and [[systemd-networkd]] for full documentation.<br />
<br />
=== Host installation and configuration ===<br />
<br />
In this example the container will reside in {{ic|/srv/container}}:<br />
# mkdir /srv/container/tor-exit<br />
<br />
Install the {{Pkg|arch-install-scripts}}:<br />
# pacman -S arch-install-scripts<br />
<br />
Install {{Grp|base}}, {{Pkg|tor}} and {{Pkg|arm}} and deselect {{Pkg|linux}} as per [[Systemd-nspawn#Installation_with_pacstrap]]:<br />
# pacstrap -i -c -d /srv/container/tor-exit base tor arm<br />
<br />
Create directory if it does not exist:<br />
# mkdir /var/lib/container<br />
<br />
Symlink to register the container on the host, as per [[Systemd-nspawn#Boot_your_container_at_your_machine_startup]]:<br />
# ln -s /srv/container/tor-exit /var/lib/container/tor-exit<br />
<br />
==== Virtual network interface ====<br />
<br />
Create a Dropin directory for the container service:<br />
# mkdir /etc/systemd/system/systemd-nspawn@tor-exit.service.d<br />
<br />
{{hc|/etc/systemd/system/systemd-nspawn@tor-exit.service.d/tor-exit.conf|<nowiki><br />
[Service]<br />
ExecStart=<br />
ExecStart=/usr/bin/systemd-nspawn --quiet --keep-unit --boot --link-journal=guest --network-macvlan=$INTERFACE --private-network --directory=/var/lib/container/%i<br />
LimitNOFILE=32768<br />
</nowiki>}}<br />
<br />
{{ic|<nowiki>--network-macvlan=$INTERFACE --private-network</nowiki>}} automagically creates a macvlan named {{ic|mv-$INTERFACE}} inside the container, which is not visible from the host. {{ic|--private-network}} is implied by {{ic|<nowiki>--network-macvlan=</nowiki>}} according to {{ic|man systemd-nspawn}}. <br />
<br />
{{ic|<nowiki>LimitNOFILE=32768</nowiki>}} per [[Tor#Raise_maximum_number_of_open_file_descriptors]].<br />
<br />
Setup [[systemd-networkd]] according to your network in {{ic|/srv/container/tor-exit/etc/systemd/network/mv-$INTERFACE.network}}.<br />
<br />
==== Start and enable systemd-nspawn ====<br />
<br />
[[Start]] and enable {{ic|systemd-nspawn@tor-exit.service}}.<br />
<br />
=== Container configuration ===<br />
{{ic|# machinectl login tor-exit}} login to the container, see [[Systemd-nspawn#machinectl_command]].<br />
<br />
{{ic|# mv /srv/container/tor-exit/etc/securetty /srv/container/tor-exit/etc/securetty.bak}} if you get the error described in [[Systemd-nspawn#Troubleshooting]].<br />
<br />
==== Start and enable systemd-networkd ====<br />
<br />
[[Start]] and enable {{ic|systemd-networkd.service}}. {{ic|networkctl}} displays if {{ic|systemd-networkd}} is correctly configured.<br />
<br />
=== Configure Tor ===<br />
See [[Tor#Running_a_Tor_server]].<br />
{{Tip|It is easier to edit files in the container from the host with your normal editor.}}<br />
<br />
== Usage ==<br />
<br />
Start/enable {{ic|tor.service}} [[systemd#Using units|using systemd]]. Alternatively, launch it from {{ic|vidalia}}, or with {{ic|sudo -u tor /usr/bin/tor}}.<br />
<br />
To use a program over tor, configure it to use 127.0.0.1 or localhost as a SOCKS5 proxy, with port 9050 (plain tor with standard settings) or port 9051 (configuration with '''vidalia''', standard settings).<br />
To check if Tor is functioning properly visit the [https://check.torproject.org/ Tor], [http://serifos.eecs.harvard.edu/cgi-bin/ipaddr.pl?tor=1 Harvard] or [https://torcheck.xenobite.eu/ Xenobite.eu] websites.<br />
<br />
== Web browsing ==<br />
<br />
The Tor Project currently only supports web browsing with tor through the [https://aur.archlinux.org/packages/?K=tor-browser- Tor Browser Bundle], which can be downloaded from the AUR. It is built with a patched version of the Firefox extended support releases. Tor can also be used with regular [[Firefox]], [[Chromium]] and other browsers, but this is [https://www.torproject.org/docs/faq.html.en#TBBOtherBrowser not recommended] by the Tor Project.<br />
<br />
{{Tip|For makepkg to verify the signature on the AUR source tarball download for TBB, [https://www.torproject.org/docs/signing-keys.html.en signing keys from the Tor Project] (currently 0x93298290) must be downloaded from the keyservers and added to the user gpg keyring with:<br />
$ gpg --recv-keys 0x93298290<br />
}}<br />
<br />
=== Firefox ===<br />
<br />
In ''Preferences > Advanced > Network tab > Settings'' manually set Firefox to use the SOCKS proxy {{ic|localhost}} with port {{ic|9050}}. Then you must type {{ic|about:config}} into the address bar and ''void your warranty''. Change {{ic|network.proxy.socks_remote_dns}} to {{ic|true}} and restart the browser. This channels all DNS requests through TOR's socks proxy.<br />
<br />
=== Chromium ===<br />
<br />
You can simply run:<br />
<br />
$ chromium --proxy-server="socks://localhost:9050"<br />
<br />
Just as with Firefox, you can setup a fast switch for example through [https://chrome.google.com/webstore/detail/dpplabbmogkhghncfbfdeeokoefdjegm Proxy SwitchySharp].<br />
<br />
Once installed enter in its configuration page. Under the tab ''Proxy Profiles'' add a new profile ''Tor'', if ticked untick the option ''Use the same proxy server for all protocols'', then add ''localhost'' as SOCKS Host, ''9050'' to the respective port and select ''SOCKS v5''.<br />
<br />
Optionally you can enable the quick switch under the ''General'' tab to be able to switch beetween normal navigation and Tor network just by left-clicking on the Proxy SwitchySharp's icon.<br />
<br />
=== Luakit ===<br />
<br />
{{warning|It will not be hard for an observer to identify you by the rare user-agent string, and there may be further issues with Flash, JavaScript or similar.}}<br />
<br />
You can simply run:<br />
<br />
$ torify luakit<br />
<br />
== HTTP proxy ==<br />
<br />
Tor can be used with an HTTP proxy like [[Polipo]] or [[Privoxy]], however the Tor dev team recommends using the SOCKS5 library since browsers directly support it.<br />
<br />
=== Firefox ===<br />
<br />
The [https://addons.mozilla.org/en-us/firefox/addon/foxyproxy-standard/ FoxyProxy] add-on allows you to specify multiple proxies for different URLs or for all your browsing. After restarting Firefox manually set Firefox to port {{ic|8118}} on {{ic|localhost}}, which is where [[Polipo]] or [[Privoxy]] are running. These settings can be access under ''Add > Standard proxy type''. Select a proxy label (e.g Tor) and enter the port and host into the ''HTTP Proxy'' and ''SSL Proxy'' fields. To check if Tor is functioning properly visit the [https://check.torproject.org/ Tor Check] website and toggle Tor.<br />
<br />
=== Polipo ===<br />
<br />
The Tor Project has created a custom [https://gitweb.torproject.org/torbrowser.git/blob_plain/1ffcd9dafb9dd76c3a29dd686e05a71a95599fb5:/build-scripts/config/polipo.conf Polipo configuration file] to prevent potential problems with Polipo as well to provide better anonymity.<br />
<br />
Keep in mind that Polipo is not required if you can use a SOCKS 5 proxy, which Tor starts automatically on port 9050. If you want to use [[Chromium]] with Tor, you do not need the Polipo package (see: [[#Chromium]]).<br />
<br />
=== Privoxy ===<br />
<br />
You can also use this setup in other applications like messaging (e.g. Jabber, IRC). Applications that support HTTP proxies you can connect to Privoxy (i.e. {{ic|127.0.0.1:8118}}). To use SOCKS proxy directly, you can point your application at Tor (i.e. {{ic|127.0.0.1:9050}}). A problem with this method though is that applications doing DNS resolves by themselves may leak information. Consider using Socks4A (e.g. with Privoxy) instead.<br />
<br />
== Instant messaging ==<br />
<br />
In order to use an IM client with tor, we do not need an http proxy like [[polipo]]/[[privoxy]]. We will be using tor's daemon directly which listens to port 9050 by default.<br />
<br />
=== Pidgin ===<br />
<br />
You can set up Pidgin to use Tor globally, or per account. To use Tor globally, go to Tools -> Preferences -> Proxy. To use Tor for specific accounts, go to ''Accounts > Manage Accounts'', select the desired account, click Modify, then go to the Proxy tab. The proxy settings are as follows:<br />
<br />
Proxy type SOCKS5<br />
Host 127.0.0.1<br />
Port 9150<br />
<br />
Note that [https://trac.torproject.org/projects/tor/ticket/8135 some time in 2013] the Port has changed from 9050 to 9150 if you use the Tor Browser Bundle. Try the other value if you receive a "Connection refused" message.<br />
<br />
== Irssi ==<br />
<br />
{{Out of date|{{ic|cap_sasl.pl}} is broken with ''perl'' 5.20; SSL does also not work with {{ic|torsocks}}}}<br />
<br />
Freenode recommends connecting to {{ic|.onion}} directly. It also requires charybdis and ircd-seven's SASL mechanism for identifying to nickserv during connection; see [[Irssi#Authenticating_with_SASL]]. Start irssi:<br />
<br />
$ torsocks irssi<br />
<br />
Set your identification to nickserv, which will be read when connecting. Supported mechanisms are ECDSA-NIST256P-CHALLENGE (see [https://github.com/atheme/ecdsatool/blob/master/cap_sasl.pl ecdsatool]) and PLAIN. DH-BLOWFISH is [https://freenode.net/sasl/sasl-irssi.shtml no longer supported].<br />
<br />
/sasl set ''network'' ''username'' ''password'' ''mechanism''<br />
<br />
Disable CTCP and DCC and set a different hostname to prevent information disclosure: [https://encrypteverything.ca/IRC_Anonymity_Guide]<br />
<br />
/ignore * CTCPS<br />
/ignore * DCC<br />
/set hostname ''fake_host''<br />
<br />
Connect to Freenode:<br />
<br />
/connect -network ''network'' frxleqtzgvwkv7oz.onion<br />
<br />
For more information check [http://freenode.net/irc_servers.shtml#tor Accessing freenode Via Tor], [http://freenode.net/sasl/README.txt SASL README] or [https://trac.torproject.org/projects/tor/wiki/doc/TorifyHOWTO/IrcSilc IRC/SILC Wiki article].<br />
<br />
== Pacman ==<br />
<br />
Pacman download operations (repository DBs, packages, and public keys) can be done using the Tor network. Though relatively extreme, this measure is useful to prevent an adversary (most likely at one's LAN or the mirror) from knowing a subset of the packages you have installed, at the cost of longer latency, lower throughput, possible suspicion, and possible failure (if Tor is being filtered via the current connection).<br />
<br />
{{Warning|It would be arguably simpler for an adversary, specifically one who desires to indiscriminately disseminate malware, to perform his/her activity by deploying malicious Tor exit node(s). Always use signed packages and verify new public keys by out-of-band means.}}<br />
<br />
{{hc|/etc/pacman.conf|<br />
...<br />
<nowiki>XferCommand = /usr/bin/curl --socks5-hostname localhost:9050 -C - -f %u > %o</nowiki><br />
...}}<br />
<br />
== Running a Tor server ==<br />
<br />
The Tor network is reliant on people contributing bandwidth. There are several ways to contribute to the network.<br />
<br />
=== Running a Tor bridge ===<br />
<br />
A Tor bridge is a Tor relay that is not listed in the public Tor directory, thus making it possible for people to connect to the Tor network when governments or ISPs block all public Tor relays.<br />
<br />
==== Configuration ====<br />
<br />
According to https://www.torproject.org/docs/bridges , make your torrc be just these four lines:<br />
<br />
SocksPort 0<br />
ORPort 443<br />
BridgeRelay 1<br />
Exitpolicy reject *:*<br />
<br />
==== Troubleshooting ====<br />
<br />
If you get "Could not bind to 0.0.0.0:443: Permission denied" errors on startup, you will need to pick a higher ORPort (e.g. 8080), or perhaps [http://www.portforward.com/ forward the port] in your router.<br />
<br />
=== Running a Tor relay ===<br />
<br />
This means that your machine will act as an entry node or forwarding relay (depending on the relay's online time) and - opposing to the bridge relay - it will be listed in the public Tor directory. Your IP address will be publicly visible in the Tor directory but the relay will only forward to other relays or Tor exit nodes, not directly to the internet.<br />
<br />
==== Configuration ====<br />
<br />
You should at least share 20KiB/s:<br />
<br />
Nickname ''tornickname''<br />
ORPort 9001 # This TCP-Port has to be opened/forwarded in your Firewall<br />
BandwidthRate 20 KB # Throttle traffic to 20KB/s<br />
BandwidthBurst 50 KB # But allow bursts up to 50KB/s<br />
<br />
Disallow exits from your relay:<br />
<br />
ExitPolicy reject *:*<br />
<br />
=== Running a Tor exit node ===<br />
<br />
Any requests from a Tor user to the regular internet obviously need to exit the network somewhere, and exit nodes provide this vital service. To the accessed host, the request will appear as having originated from your machine. This means that running an exit node is generally considered more legally onerous than running other forms of Tor relays. Before becoming an exit relay, you may want to read [https://blog.torproject.org/running-exit-node Tips for Running an Exit Node With Minimal Harrasment].<br />
<br />
==== Configuration ====<br />
<br />
Using the torrc, you can configure which services you wish to allow through your exit node.<br />
Allow all traffic:<br />
<br />
ExitPolicy accept *:*<br />
<br />
Allow only irc ports 6660-6667 to exit from node:<br />
<br />
ExitPolicy accept *:6660-6667,reject *:* # Allow irc ports but no more<br />
<br />
By default, Tor will block certain ports. You can use the torrc to overide this.<br />
<br />
ExitPolicy accept *:119 # Accept nntp as well as default exit policy<br />
<br />
==== +100Mbps Exit Relay configuration example ====<br />
<br />
If you run a fast exit relay (+100Mbps) with {{ic|ORPort 443}} and {{ic|DirPort 80}} (as recommended in [http://www.torproject.org/docs/tor-relay-debian.html.en#after Configuring a Tor relay on Debian/Ubuntu]) the following configuration changes might serve as inspiration to setup Tor alongside [[iptables]] firewall, [[Haveged]] to increase system entropy and [[pdnsd]] as DNS cache. It is important to ''first'' read [http://www.torproject.org/docs/tor-relay-debian.html.en#after Configuring a Tor relay on Debian/Ubuntu]. <br />
<br />
{{Note|See [[Tor#Running_Tor_in_a_systemd-nspawn_container_with_a_virtual_network_interface]] for instructions to install Tor in a {{ic|systemd-nspawn}} container. [[Haveged]] should be installed on the container host.}}<br />
<br />
===== Tor =====<br />
====== Raise maximum number of open file descriptors ======<br />
To handle more than 8192 connections {{ic|LimitNOFILE}} can be raised to 32768 as per [https://www.torproject.org/docs/faq.html.en#PackagedTor Tor FAQ].<br />
<br />
{{hc|/etc/systemd/system/tor.service.d/increase-file-limits.conf|<nowiki><br />
[Service]<br />
LimitNOFILE=32768<br />
</nowiki>}}<br />
<br />
To succesfully raise {{ic|nofile}} limit, you may also have to append the following:<br />
<br />
{{hc|/etc/security/limits.conf|<nowiki><br />
...<br />
tor soft nofile 32768<br />
tor hard nofile 32768<br />
@tor soft nofile 32768<br />
@tor hard nofile 32768<br />
</nowiki>}}<br />
<br />
Check if the {{ic|nofile}} (filedescriptor) limit is succesfully raised with {{ic|# sudo -u tor 'ulimit -Hn'}} or {{ic|# sudo -u tor bash}} and {{ic|# ulimit -Hn}}.<br />
<br />
====== Start tor.service as root to bind Tor to privileged ports ======<br />
To bind Tor to privileged ports the service must be started as root. Please specify {{ic|User tor}} option in {{ic|/etc/tor/torrc}}.<br />
<br />
{{hc|/etc/systemd/system/tor.service.d/start-as-root.conf|<nowiki><br />
[Service]<br />
User=root<br />
</nowiki>}}<br />
<br />
====== Tor configuration ======<br />
To listen on Port 80 and 443 the service need to be started as {{ic|root}} as described in [[#Start tor.service as root to bind Tor to privileged ports]].<br />
Use the {{ic|User tor}} option in {{ic|/etc/tor/torrc}} to properly reduce Tor’s privileges.<br />
<br />
{{hc|/etc/tor/torrc|<nowiki><br />
SocksPort 0 ## Pure relay configuration without local socks proxy<br />
<br />
Log notice stdout ## Default Tor behavior<br />
<br />
ControlPort 9051 ## For arm connection<br />
CookieAuthentication 1 ## For arm connection<br />
<br />
ORPort 443 ## Service must be started as root<br />
<br />
Address $IP ## IP or FQDN<br />
Nickname $NICKNAME ## Nickname displayed in </nowiki>[https://onionoo.torproject.org/ Onionoo]<nowiki><br />
<br />
RelayBandwidthRate 500 Mbits ## bytes|KBytes|MBytes|GBytes|KBits|MBits|GBits<br />
RelayBandwidthBurst 1000 MBits ## bytes|KBytes|MBytes|GBytes|KBits|MBits|GBits<br />
<br />
ContactInfo $E-MAIL - $BTC-ADDRESS ## See </nowiki>[https://oniontip.com/ OnionTip]<nowiki><br />
<br />
DirPort 80 ## Service must be started as root<br />
DirPortFrontPage /etc/tor/tor-exit-notice.html ## Original: </nowiki>[https://gitweb.torproject.org/tor.git/plain/contrib/operator-tools/tor-exit-notice.html https://gitweb.torproject.org/tor.git/plain/contrib/operator-tools/tor-exit-notice.html]<nowiki><br />
<br />
MyFamily $($KEYID),$($KEYID)... ## Remember $ in front of keyid(s) ;)<br />
<br />
ExitPolicy reject XXX.XXX.XXX.XXX/XX:* ## Block domain of public IP in addition to std. exit policy<br />
<br />
User tor ## Return to tor user after service started as root to listen on privileged ports<br />
<br />
DisableDebuggerAttachment 0 ## For arm connection<br />
<br />
### Performance related options ###<br />
AvoidDiskWrites 1 ## Reduce wear on SSD<br />
DisableAllSwap 1 ## Service must be started as root<br />
HardwareAccel 1 ## Look for OpenSSL hardware cryptographic support<br />
NumCPUs 2 ## Only start two threads<br />
</nowiki>}}<br />
<br />
This configuration is based on the [https://www.torproject.org/docs/tor-manual.html.en Tor Manual]. <br />
<br />
Tor opens a socks proxy on port 9050 by default -- even if you do not configure one. Set {{ic|SocksPort 0}} if you plan to run Tor only as a relay, and not make any local application connections yourself.<br />
<br />
{{ic|Log notice stdout}} changes logging to stdout, which is also the Tor default.<br />
{{ic|ControlPort 9051}}, {{ic|CookieAuthentication 1}} and {{ic|DisableDebuggerAttachment 0}} enables {{Pkg|arm}} to connect to Tor and display connections.<br />
<br />
{{ic|ORPort 443}} and {{ic|DirPort 80}} lets Tor listen on port 443 and 80 and {{ic|DirPortFrontPage}} displays the [https://gitweb.torproject.org/tor.git/plain/contrib/operator-tools/tor-exit-notice.html tor-exit-notice.html] on port 80.<br />
<br />
{{ic|ExitPolicy reject XXX.XXX.XXX.XXX/XX:*}} should reflect your public IP and netmask, which can be obtained with the command {{ic|# ip addr}}, so exit connections cannot connect to the host or neighboring machines public IP and circumvent firewalls.<br />
<br />
{{ic|AvoidDiskWrites 1}} reduces disk writes and wear on SSD.<br />
{{ic|DisableAllSwap 1}} "will attempt to lock all current and future memory pages, so that memory cannot be paged out". <br />
<br />
If {{ic|<nowiki># cat /proc/cpuinfo | grep aes</nowiki>}} returns that your CPU supports AES instructions and {{ic|<nowiki># lsmod | grep aes</nowiki>}} returns that the module is loaded, you can specify {{ic|HardwareAccel 1}} which tries "to use built-in (static) crypto hardware acceleration when available", see [http://www.torservers.net/wiki/setup/server#aes-ni_crypto_acceleration http://www.torservers.net/wiki/setup/server#aes-ni_crypto_acceleration].<br />
<br />
{{ic|ORPort 443}}, {{ic|DirPort 80}} and {{ic|DisableAllSwap 1}} require that you start the Tor service as {{ic|root}} as described in [[#Start tor.service as root to bind Tor to privileged ports]].<br />
Use the {{ic|User tor}} option to properly reduce Tor’s privileges.<br />
<br />
===== arm =====<br />
If {{ic|ControlPort 9051}} and {{ic|CookieAuthentication 1}} is specified in {{ic|/etc/tor/torrc}}, {{Pkg|arm}} can be started with {{ic|sudo -u tor arm}}.<br />
If you want to watch Tor connections in {{Pkg|arm}} {{ic|DisableDebuggerAttachment 0}} must also be specified.<br />
<br />
===== iptables =====<br />
Setup and learn to use [[iptables]]. Instead of being a [[Simple_stateful_firewall]] where connection tracking would have to track thousands of connections on a tor exit relay this firewall configuration is stateless.<br />
<br />
{{hc|/etc/iptables/iptables.rules|<nowiki><br />
*raw<br />
-A PREROUTING -j NOTRACK<br />
-A OUTPUT -j NOTRACK<br />
COMMIT<br />
<br />
*filter<br />
:INPUT DROP [0:0]<br />
:FORWARD DROP [0:0]<br />
:OUTPUT ACCEPT [0:0]<br />
-A INPUT -p tcp ! --syn -j ACCEPT<br />
-A INPUT -p udp -j ACCEPT<br />
-A INPUT -p icmp -j ACCEPT<br />
-A INPUT -p tcp --dport 443 -j ACCEPT<br />
-A INPUT -p tcp --dport 80 -j ACCEPT<br />
-A INPUT -i lo -j ACCEPT<br />
COMMIT<br />
</nowiki>}}<br />
<br />
{{ic|-A PREROUTING -j NOTRACK}} and {{ic|-A OUTPUT -j NOTRACK}} disables connection tracking in the {{ic|raw}} table.<br />
<br />
{{ic|:INPUT DROP [0:0]}} is the default {{ic|INPUT}} target and drops input traffic we do not specifically {{ic|ACCEPT}}.<br />
<br />
{{ic|:FORWARD DROP [0:0]}} is the default {{ic|FORWARD}} target and only relevant if the host is a normal router, not when the host is an onion router.<br />
<br />
{{ic|:OUTPUT ACCEPT [0:0]}} is the default {{ic|OUTPUT}} target and allows all outgoing connections.<br />
<br />
{{ic|-A INPUT -p tcp ! --syn -j ACCEPT}} allow already established incoming TCP connections per the rules below and TCP connections established from the exit node.<br />
<br />
{{ic|-A INPUT -p udp -j ACCEPT}} allow all incoming UDP connections because we do not use connection tracking.<br />
<br />
{{ic|-A INPUT -p icmp -j ACCEPT}} allow [https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol ICMP].<br />
<br />
{{ic|-A INPUT -p tcp --dport 443 -j ACCEPT}} allow incoming connections to the {{ic|ORPort}}.<br />
<br />
{{ic|-A INPUT -p tcp --dport 80 -j ACCEPT}} allow incoming connections to the {{ic|DirPort}}.<br />
<br />
{{ic|-A INPUT -i lo -j ACCEPT}} allows all connections on the loopback interface.<br />
<br />
===== Haveged =====<br />
See [[Haveged]] to decide if your system generates enough entropy to handle a lot of OpenSSL connections, see [http://www.issihosts.com/haveged/ haveged - A simple entropy daemon] and [http://www.digitalocean.com/community/tutorials/how-to-setup-additional-entropy-for-cloud-servers-using-haveged how-to-setup-additional-entropy-for-cloud-servers-using-haveged] for documentation.<br />
<br />
===== pdnsd =====<br />
<br />
{{Warning|This configuration assumes your network DNS resolver is trusted (uncensored).}}<br />
<br />
You can use [[pdnsd]] to cache DNS queries locally, so the exit relay can resolve DNS faster and the exit relay does not forward all DNS queries to an external DNS recursor.<br />
<br />
{{hc|/etc/pdnsd.conf|<nowiki><br />
...<br />
perm_cache=102400 ## (Default value)*100 = 1MB * 100 = 100MB<br />
...<br />
server {<br />
label= "resolvconf";<br />
file = "/etc/pdnsd-resolv.conf"; ## Preferably do not use /etc/resolv.conf<br />
timeout=4; ## Server timeout, this may be much shorter than the global timeout option.<br />
uptest=query; ## Test availability using empty DNS queries. <br />
query_test_name="."; ## To be used if remote servers ignore empty queries.<br />
interval=10m; ## Test every 10 minutes.<br />
purge_cache=off; ## Ignore TTL.<br />
edns_query=yes; ## Use EDNS for outgoing queries to allow UDP messages larger than 512 bytes. May cause trouble with some legacy systems.<br />
preset=off; ## Assume server is down before uptest.<br />
}<br />
...<br />
</nowiki>}}<br />
<br />
This configuration stub shows how to cache queries to your normal DNS recursor locally and increase pdnsd cache size to 100MB.<br />
<br />
====== Uncensored DNS ======<br />
<br />
If your local DNS recursor is in some way censored or interferes with DNS queries, see [[Resolv.conf#Alternative_DNS_servers]] for alternatives and add them in a seperate server-section in {{ic|/etc/pdnsd.conf}} as per [[Pdnsd#DNS_servers]].<br />
<br />
== TorDNS ==<br />
<br />
The Tor 0.2.x series provides a built-in DNS forwarder. To enable it add the following lines to the Tor configuration file and restart the daemon:<br />
<br />
{{hc|/etc/tor/torrc|<br />
DNSPort 9053<br />
AutomapHostsOnResolve 1<br />
AutomapHostsSuffixes .exit,.onion<br />
}}<br />
<br />
This will allow Tor to accept DNS requests (listening on port 9053 in this example) like a regular DNS server, and resolve the domain via the Tor network. A downside is that it is only able to resolve DNS queries for A-records; MX and NS queries are never answered. For more information see this [https://techstdout.boum.org/TorDns/ Debian-based introduction].<br />
<br />
DNS queries can also be performed through a command line interface by using {{Ic|<nowiki>tor-resolve</nowiki>}}. For example:<br />
<br />
{{bc|<br />
$ tor-resolve archlinux.org<br />
66.211.214.131<br />
}}<br />
<br />
=== Using TorDNS for all DNS queries ===<br />
<br />
It is possible to configure your system, if so desired, to use TorDNS for ''all'' queries your system makes, regardless of whether or not you eventually use Tor to connect to your final destination. To do this, configure your system to use 127.0.0.1 as its DNS server and edit the 'DNSPort' line in {{ic|/etc/tor/torrc}} to show:<br />
<br />
DNSPort 53<br />
<br />
Alternatively, you can use a local caching DNS server, such as [[dnsmasq]] or [[pdnsd]], which will also compensate for TorDNS being a little slower than traditional DNS servers. The following instructions will show how to set up ''dnsmasq'' for this purpose.<br />
<br />
Change the tor setting to listen for the DNS request in port 9053 and install {{Pkg|dnsmasq}}.<br />
<br />
Modify its configuration file so that it contains:<br />
<br />
{{hc|/etc/dnsmasq.conf|<br />
no-resolv<br />
server&#61;127.0.0.1#9053<br />
listen-address&#61;127.0.0.1<br />
}}<br />
<br />
These configurations set dnsmasq to listen only for requests from the local computer, and to use TorDNS at its sole upstream provider. It is now neccessary to edit {{ic|/etc/resolv.conf}} so that your system will query only the dnsmasq server.<br />
<br />
{{hc|/etc/resolv.conf|<br />
nameserver 127.0.0.1<br />
}}<br />
<br />
Start the '''dnsmasq''' daemon.<br />
<br />
Finally if you use ''dhcpd'' you would need to change its settings to that it does not alter the resolv configuration file. Just add this line in the configuration file:<br />
<br />
{{hc|/etc/dhcpcd.conf|<br />
nohook resolv.conf<br />
}}<br />
<br />
If you already have an ''nohook'' line, just add '''resolv.conf''' separated with a comma.<br />
<br />
== Torify ==<br />
<br />
'''torify''' will allow you use an application via the Tor network without the need to make configuration changes to the application involved. From the man page:<br />
<br />
''torify is a simple wrapper that attempts to find the best underlying Tor wrapper available on a system. It calls torsocks with a tor specific configuration file.''<br />
<br />
Usage example:<br />
<br />
$ torify elinks checkip.dyndns.org<br />
<nowiki>$ torify wget -qO- https://check.torproject.org/ | grep -i congratulations</nowiki><br />
<br />
Torify ''will not'', however, perform DNS lookups through the Tor network. A workaround is to use it in conjunction with {{ic|<nowiki>tor-resolve</nowiki>}} (described above). In this case, the procedure for the first of the above examples would look like this:<br />
<br />
{{hc|$ tor-resolve checkip.dyndns.org|<br />
208.78.69.70<br />
}}<br />
<br />
$ torify elinks 208.78.69.70<br />
<br />
== Transparent Torification ==<br />
<br />
In some cases it is more secure and often easier to transparently torify an entire system instead of configuring individual applications to use Tor's socks port, not to mention preventing DNS leaks. Transparent torification can be done with [[iptables]] in such a way that all outbound packets are redirected through Tor's ''TransPort'', except the Tor traffic itself. Once in place, applications do not need to be configured to use Tor, though Tor's ''SocksPort'' will still work. This also works for DNS via Tor's ''DNSPort'', but realize that Tor only supports TCP, thus UDP packets other than DNS cannot be sent through Tor and therefore must be blocked entirely to prevent leaks. Using iptables to transparently torify a system affords comparatively strong leak protection, but it is not a substitute for virtualized torification applications such as Whonix, or TorVM [https://www.whonix.org/wiki/Comparison_with_Others]. Transparent torification also will not protect against fingerprinting attacks on its own, so it is recommended to use it in conjunction with the Tor Browser (search the AUR for the version you want: https://aur.archlinux.org/packages/?K=tor-browser) or to use an amnesic solution like [http://tails.boum.org/ Tails] instead. Applications can still learn your computer's hostname, MAC address, serial number, timezone, etc. and those with root privileges can disable the firewall entirely. In other words, transparent torification with iptables protects against accidental connections and DNS leaks by misconfigured software, it is not sufficient to protect against malware or software with serious security vulnerabilities.<br />
<br />
To enable transparent torification, use the following file for {{ic|iptables-restore}} and {{ic|ip6tables-restore}} (internally used by [[systemd]]'s {{ic|iptables.service}} and {{ic|ip6tables.service}}).<br />
<br />
{{Note|<br />
This file uses the nat table to force outgoing connections through the TransPort or DNSPort, and blocks anything it cannot torrify.<br />
<br />
* Now using {{ic|--ipv6}} and {{ic|--ipv4}} for protocol specific changes. {{ic|iptables-restore}} and {{ic|ip6tables-restore}} can now use the same file.<br />
* Where --ipv6 or --ipv4 is explicitly defined, {{ic|ip*tables-restore}} will ignore the rule if it is not for the correct protocol.<br />
* {{ic|ip6tables}} does not support {{ic|--reject-with}}. Make sure your torrc contains the following lines:<br />
<br />
SocksPort 9050<br />
DNSPort 5353<br />
TransPort 9040<br />
<br />
See {{ic|man iptables}}.<br />
}}<br />
<br />
{{hc|/etc/iptables/iptables.rules|<br />
<br />
*nat<br />
:PREROUTING ACCEPT [6:2126]<br />
:INPUT ACCEPT [0:0]<br />
:OUTPUT ACCEPT [17:6239]<br />
:POSTROUTING ACCEPT [6:408]<br />
<br />
-A PREROUTING ! -i lo -p udp -m udp --dport 53 -j REDIRECT --to-ports 5353<br />
-A PREROUTING ! -i lo -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j REDIRECT --to-ports 9040<br />
-A OUTPUT -o lo -j RETURN<br />
--ipv4 -A OUTPUT -d 192.168.0.0/16 -j RETURN<br />
-A OUTPUT -m owner --uid-owner "tor" -j RETURN<br />
-A OUTPUT -p udp -m udp --dport 53 -j REDIRECT --to-ports 5353<br />
-A OUTPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j REDIRECT --to-ports 9040<br />
COMMIT<br />
<br />
*filter<br />
:INPUT DROP [0:0]<br />
:FORWARD DROP [0:0]<br />
:OUTPUT DROP [0:0]<br />
<br />
-A INPUT -i lo -j ACCEPT<br />
-A INPUT -p icmp -j ACCEPT<br />
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT<br />
--ipv4 -A INPUT -p tcp -j REJECT --reject-with tcp-reset<br />
--ipv4 -A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable<br />
--ipv4 -A INPUT -j REJECT --reject-with icmp-proto-unreachable<br />
--ipv6 -A INPUT -j REJECT<br />
--ipv4 -A OUTPUT -d 127.0.0.0/8 -j ACCEPT<br />
--ipv4 -A OUTPUT -d 192.168.0.0/16 -j ACCEPT<br />
--ipv6 -A OUTPUT -d ::1/8 -j ACCEPT<br />
-A OUTPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT<br />
-A OUTPUT -m owner --uid-owner "tor" -j ACCEPT<br />
--ipv4 -A OUTPUT -j REJECT --reject-with icmp-port-unreachable<br />
--ipv6 -A OUTPUT -j REJECT<br />
COMMIT<br />
}}<br />
<br />
This file also works for ip6tables-restore, so you may symlink it:<br />
<br />
ln -s /etc/iptables/iptables.rules /etc/iptables/ip6tables.rules<br />
<br />
Then make sure Tor is running, and start iptables and ip6tables:<br />
<br />
systemctl {enable,start} tor iptables ip6tables<br />
<br />
You may want to add {{ic|1=Requires=iptables.service}} and {{ic|1=Requires=ip6tables.service}} to whatever systemd unit logs your user in (most likely a [[display manager]]), to prevent any user processes from being started before the firewall up. See [[systemd]].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Problem with user value ===<br />
<br />
If the '''tor''' daemon failed to start, then run the following command as root (or use sudo)<br />
<br />
# tor<br />
<br />
If you get the following error<br />
<br />
May 23 00:27:24.624 [warn] Error setting groups to gid 43: "Operation not permitted".<br />
May 23 00:27:24.624 [warn] If you set the "User" option, you must start Tor as root.<br />
May 23 00:27:24.624 [warn] Failed to parse/validate config: Problem with User value. See logs for details.<br />
May 23 00:27:24.624 [err] Reading config failed--see warnings above.<br />
<br />
Then it means that the problem is with the User value, which likely means that one or more files or directories in your {{ic|/var/lib/tor}} directory is not owned by tor. This can be determined by using the following find command:<br />
<br />
find /var/lib/tor/ ! -user tor<br />
<br />
Any files or directories listed in the output from this command needs to have its ownership changed. This can be done individually for each file like so:<br />
<br />
chown tor:tor /var/lib/tor/filename<br />
<br />
Or to change everything listed by the above find example, modify the command to this:<br />
<br />
find /var/lib/tor/ ! -user tor -exec chown tor:tor {} \;<br />
<br />
Tor should now start up correctly.<br />
<br />
Still if you cannot start the tor service, run the service using root (this will switch back to the tor user). To do this, change the user name in the {{ic|/etc/tor/torrc}} file:<br />
<br />
User tor<br />
<br />
Now modify the systemd's tor service file {{ic|/usr/lib/systemd/system/tor.service}} as follows<br />
<br />
[Service]<br />
User=root<br />
Group=root<br />
Type=simple<br />
<br />
The process will be run as tor user. For this purpose change user and group ID to tor and also make it writable:<br />
<br />
# chown -R tor:tor /var/lib/tor/<br />
# chmod -R 755 /var/lib/tor<br />
<br />
Now save changes and run the daemon:<br />
<br />
# systemctl --system daemon-reload<br />
# systemctl start tor.service<br />
<br />
== See also ==<br />
<br />
* [https://www.torproject.org/docs/tor-doc-unix.html.en Running the Tor client on Linux/BSD/Unix]<br />
* [https://trac.torproject.org/projects/tor/wiki#Unixish Unix-based Tor Articles]<br />
* [https://trac.torproject.org/projects/tor/wiki/doc/SupportPrograms Software commonly integrated with Tor]<br />
* [https://www.torproject.org/docs/tor-hidden-service.html.en How to set up a Tor ''Hidden Service'']<br />
* [https://trac.torproject.org/projects/tor/wiki/doc/PluggableTransports List of tor pluggable transports for obfuscating tor's traffic]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=User_talk:Mathieui&diff=362877User talk:Mathieui2015-02-27T19:01:12Z<p>Sudowoodo: /* My patch */</p>
<hr />
<div>== My patch ==<br />
<br />
Hello, I'm the user who had written that mistaken patch on [[Dolphin emu]]'s page.<br />
<br />
I am sorry for any possible trouble it caused. It was meant to fix a problem I have in Dolphin, where it segfaults randomly. It didn't work for me, but I found it on a forum, and thought I should include it in the page to see if other users benefit or not. Please see [http://forums.fedoraforum.org/showthread.php?t=259904 this Fedora forum post] (not posted by me) for the original source. I think there might be a connection to these bug reports: [https://code.google.com/p/dolphin-emu/issues/detail?id=4357] [https://code.google.com/p/dolphin-emu/issues/detail?id=4073].<br />
<br />
Again, sorry for the trouble. [[User:Sudowoodo|Sudowoodo]] ([[User talk:Sudowoodo|talk]]) 17:10, 1 February 2015 (UTC)<br />
<br />
<br />
<br />
Hi, sorry I took so long to reply.<br />
<br />
I don't think it caused much (or any) trouble, this was just to be on the safe side, in order to avoid some confusion for end-users (and also prevent them from using outdated versions). No big deal, I'm just happy it was fixed.<br />
<br />
On another note, I'm not sure the dolphin-qt warning on top of the page is relevant: the idea of moving from WX to Qt dates from 2011, and even if the guy working on it has not given up yet, I'm guessing it won't happen before a long time after the next version is released. When that happens, updating the page should be natural.<br />
<br />
[[User:Mathieui|Mathieui]] ([[User talk:Mathieui|talk]]) 20:36, 26 February 2015 (UTC)<br />
<br />
:That's a relief. I removed the [[Template:Accuracy|accuracy template]] as you suggested. [[User:Sudowoodo|Sudowoodo]] ([[User talk:Sudowoodo|talk]]) 19:01, 27 February 2015 (UTC)</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Dolphin_emulator&diff=362875Dolphin emulator2015-02-27T18:20:37Z<p>Sudowoodo: Removed Template:Accuracy</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Emulators]]<br />
Dolphin is a Nintendo Gamecube, Wii and Triforce emulator, currently supporting the x86, AMD64 and ARM architectures. Dolphin is available for Linux, MacOSX (intel-based), MS Windows and Android. It is a free and open source, community-developed project.<br />
Dolphin was the first Gamecube and Wii emulator, and currently the only one capable of playing commercial games.<br />
<br />
== Installation ==<br />
<br />
Install one of the following:<br />
<br />
* {{App|[[Dolphin emu]]|A Gamecube / Wii / Triforce emulator|https://dolphin-emu.org/|{{Pkg|dolphin-emu}}}}<br />
* {{App|Dolphin emu (git)|A Gamecube / Wii / Triforce emulator (development version)|https://github.com/dolphin-emu/dolphin|{{AUR|dolphin-emu-git}}}}<br />
<br />
{{Tip|<br />
*Stable releases of Dolphin tend to grow old between releases, and are potentially outclassed by the development versions, which feature many speed improvements and bug fixes in comparison. If low performance or glitches are encountered, consider installing the {{AUR|dolphin-emu-git}} package.<br />
*Reinstalling the {{AUR|dolphin-emu-git}} package will upgrade Dolphin to the latest development version at any time.}}<br />
<br />
== Configuration ==<br />
<br />
{{Tip|Run {{ic|dolphin-emu -h}} for help Dolphin's options.}}<br />
{{Note|Dolphin may override these settings on a per-game basis, such as when a setting is know to break a certain game. If absolutely sure a specific setting will not crash the game, you can disable or change these overrides by right-clicking the game and selecting ''Properties''. Likewise, you can set per-game settings using this method.}}<br />
<br />
While no additional configuration is needed for the emulator to run (it is preconfigured with the default settings), altering the settings can improve performance and graphics alike.<br />
Settings are split to three main sections, ''Config'', ''Graphics'' and ''DSP''.<br />
<br />
=== Config section ===<br />
{{Tip|Recent versions of Dolphin remove the ''Audio'' frameskip option, so ''Auto'' is now reccomended.}}<br />
On the General tab, check ''Enable Dual Core'' and ''Enable Idle Skipping''. Enabling or not the cheats is a personal choice. Keep in mind that a real man never cheats. The frame limit should be set to "Auto", so that it works with games from all regions. The CPU emulation engine should be left as JIT Recompiler. Only check "Force console as NTSC-J" if intending to play imported Japanese discs.<br />
<br />
All options on the "Interface" tab are personal choices.<br />
<br />
The Audio tab is the DSP section's screen; setting it up now means there will be no need to do it later. See the [[#DSP section|DSP settings paragraph]] below.<br />
<br />
The next two tabs are not very important; the Gamecube tab has settings about connected accessories, such as memory cards, and the only remarkable Wii tab option is the "Aspect Ratio" drop-down list. Set it to either 16:9 or 4:3, depending on the display's [[Wikipedia: Aspect ratio|aspect ratio]].<br />
<br />
On the final tab, "Paths", ISO directories can be set. The directory of game ISOs can also be set by clicking browse from the home screen, but here more options are available, such as ''Search Subfolders''.<br />
<br />
=== Graphics section ===<br />
<br />
{{Expansion|New 3D options available.}}<br />
<br />
On the "General" tab, choose OpenGL from the backend drop-down list. Set the "Display" and "Other" settings to the desired configuration. V-sync is useful, but it can lead to slowdowns. The "render to main window" option improves the experience aesthetically.<br />
<br />
On the "Enhancements" tab are the options that can improve graphics. While they result to great output, they can slow the emulation down to the point of making games unplayable. Choose the best settings possible, as long as speed remains 100%.<br />
<br />
{| class="wikitable"<br />
|+ Comparison of options<br />
!Option !!Performance !!Quality<br />
|-<br />
| '''Internal resolution''' || 1x Native || Auto (Window size)<br />
|-<br />
| '''Anti-aliasing''' || None || at least 2x<br />
|-<br />
| '''Anisotropic filtering''' || 1x || at least 2x<br />
|-<br />
| '''Post-Processing Effect''' || (off) || your choice<br>(see tip below)<br />
|-<br />
| '''Scaled EFB copy''' || unchecked || checked<br />
|-<br />
| '''Per-Pixel Lightning''' || unchecked || checked<br />
|-<br />
| '''Force texture filtering,<br>Widescreen Hack,<br>Disable fog''' || off || your option<br>(recommended: off)<br />
|}<br />
<br />
{{Tip|Dolphin is able to render games that were developed for 2D in anaglyph 3D. To enable this, set ''Post-Processing Effect'' to ''stereoscopic'' (default, for red-cyan mode) or ''stereoscopic2'' (blue-yellow). It is also '''necessary''' to uncheck "''Fast Depth Calculation''" on the ''Hacks'' tab (''see below'').}}<br />
<br />
{{Warning|Using filters and other ways to improve graphics might break a few games or cause graphical glitches of any level.}}<br />
<br />
Unless sure, the ''Hacks'' tab is best left untouched.<br />
<br />
{| class="wikitable"<br />
|+ Defaults<br />
!Option !! Value<br />
|-<br />
| Skip EFB access from CPU || unchecked<br />
|-<br />
| Ignore format changes || checked<br />
|-<br />
| EFB copies || texture<br />
|-<br />
| Texture cache/ Accuracy || Fast<br />
|-<br />
| External frame buffer || disable<br />
|-<br />
| Cache display lists || unchecked<br />
|-<br />
| Disable destination alpha || unchecked<br />
|-<br />
| OpenCL texture decoder || unchecked<br />
|-<br />
| OpenMP texture decoder || unchecked<br />
|-<br />
| Fast depth calculation || checked<br>(Should uncheck for anaglyph 3D)<br />
|-<br />
| Vertex streaming hack || unchecked<br />
|}<br />
<br />
Similarly, unless sure, leave '''everything''' in the ''Advanced'' tab unchecked.<br />
<br />
=== DSP section ===<br />
<br />
Set the DSP emulation engine to<br />
<br />
* DSP HLE for speed over accuracy,<br />
* DSP LLE recompiler for better accuracy with the cost of some speed,<br />
* DSP LLE interpreter; accurate but makes '''everything''' unplayable. Too slow.<br />
<br />
''DSP LLE on separate thread'' improves speed on computers with multi-core CPUs, but might cause audio glitches, and is known to break [https://wiki.dolphin-emu.org/index.php?title=Category:Zelda_ucode_games Zelda ucode games]. Audio backend is best set to [[ALSA]]. For {{ic|pulseaudio}}, Dolphin's optional dependency [[PulseAudio]] needs to be installed.<br />
<br />
{{Note|If you came here from the [[#Config section|Config section's]] link, you should go back now.}}<br />
<br />
== Playing ==<br />
{{Note|Dolphin is a resource-heavy application, so expect not all games to run properly. See the reason [https://dolphin-emu.org/docs/faq/#why-do-i-need-such-powerful-computer-emulate-old-c here].}}<br />
{{Warning|Make sure you '''only''' use Dolphin for legally obtained self-made disc dumps of games you legally bought. Dolphin was not developed for unlawful use. Act legally as applying laws define. You are responsible for any usage of the emulator that you make. No links, instructions or tips for obtaining illegal content will be provided on this wiki. No copyright infringement intended.}}<br />
<br />
Click on browse to set a directory of ISOs so that they are shown as a library on Dolphin's default screen. Otherwise just click ''Open'' and select the file.<br />
<br />
=== Dolphin's Wiki ===<br />
<br />
Whenever a game doesn't work properly, try reading its page on [https://wiki.dolphin-emu.org Dolphin's wiki]. Listed there are tips on setting up the emulator for each game, version compatibility charts, testing entries, troubleshooting and video previews. Contributions, such as testing entries and workarounds are welcome and help other users.<br />
<br />
Here's a {{AUR|xfce4-whiskermenu-plugin}} search action command for searching on Dolphin's wiki:<br />
<br />
exo-open --launch WebBrowser https://wiki.dolphin-emu.org/index.php?search=%u<br />
<br />
{{Tip|Setting up keymaps is recommended. Prefer a gamepad with analogue features to a keyboard and a mouse. See this [http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/GCController_Layout.svg/1000px-GCController_Layout.svg.png map of the GameCube gamepad]. Having fun while playing is also recommended.}}<br />
<br />
== Tips ==<br />
=== Scripts for building and installing Dolphin ===<br />
This script downloads or updates Dolphin, and then installs it. Put it under any directory and keep it there, along with the subdirectories and files it generates. <br />
{{Bc|<nowiki><br />
#!/bin/bash<br />
<br />
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"<br />
getdolphin() {<br />
echo 'Downloading Dolphin...'<br />
git clone https://github.com/dolphin-emu/dolphin.git<br />
}<br />
updatedolphin() {<br />
cd $DIR/dolphin<br />
echo 'Updating the local repository...'<br />
git pull origin<br />
}<br />
build() {<br />
cmake $DIR/dolphin<br />
make<br />
}<br />
updatedolphin || getdolphin<br />
mkdir $DIR/build<br />
cd $DIR/build<br />
build && echo 'Compiled succesfully.' || exit<br />
echo 'Proceeding to the installation; press Enter to continue or Ctrl+C to cancel.'<br />
read<br />
if [ $(whoami) == "root" ];<br />
then<br />
make install<br />
else<br />
sudo make install<br />
fi<br />
</nowiki>}}<br />
<br />
==== PKGBUILDs ====<br />
Dolphin's stable branch PKGBUILDs can be found on [https://www.archlinux.org/packages/?sort=&q=dolphin-emu the community repository].<br />
<br />
A PKGBUILD [https://aur.archlinux.org/packages/do/dolphin-emu-git/PKGBUILD for the git version] can be found on the [[AUR]], along with several other ones.<br />
<br />
== Troubleshooting ==<br />
<br />
==== Games play too fast ====<br />
Make sure the framelimit is set to a proper value for the game's region; 60 for NTSC games or 50 for PAL ones. ''Auto'' is recommended. Avoid playing other media simultaneously with Dolphin.<br />
<br />
==== Emulation is too slow ====<br />
<br />
Double-check the [[Cpu_scaling#Scaling_governors|CPU scaling governor]]. If using an nvidia graphics card, on nvidia-settings changing the powermizer setting to "Prefer maximum performance"; check its temperature to make sure the card does not overheat, though. Change Dolphin's priority using ''nice''. Killing unnecessary processes and disabling compositing also helps. Configuring Dolphin correctly, as described above, is the most important part.<br />
<br />
''See also: [[Maximizing Performance]] - most of the advice should be helpful.''<br />
<br />
== See also ==<br />
<br />
{{Note|The Arch Linux wiki and its users are not responsible for any damage, misuse or illegal action caused, directly or not, by following instructions from webpages hyperlinked bellow.}}<br />
<br />
* [https://dolphin-emu.org/docs/guides/performance-guide/ Dolphin's performance guide.]<br />
* [https://dolphin-emu.org/docs/faq/ Dolphin's FAQ]<br />
* [https://wiki.dolphin-emu.org/index.php?title=Ripping_Game_Discs Dolphin's wiki entry for legally obtaining game dumps.]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Dolphin_emulator&diff=362774Dolphin emulator2015-02-26T19:48:24Z<p>Sudowoodo: ce</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Emulators]]<br />
{{Accuracy|As of October 2014, Dolphin is [https://dolphin-emu.org/blog/2014/09/30/dolphin-progress-report-september-2014 moving to Qt]. Parts of this article may need to be rewriten soon.}}<br />
Dolphin is a Nintendo Gamecube, Wii and Triforce emulator, currently supporting the x86, AMD64 and ARM architectures. Dolphin is available for Linux, MacOSX (intel-based), MS Windows and Android. It is a free and open source, community-developed project.<br />
Dolphin was the first Gamecube and Wii emulator, and currently the only one capable of playing commercial games.<br />
<br />
== Installation ==<br />
<br />
Install one of the following:<br />
<br />
* {{App|[[Dolphin emu]]|A Gamecube / Wii / Triforce emulator|https://dolphin-emu.org/|{{Pkg|dolphin-emu}}}}<br />
* {{App|Dolphin emu (git)|A Gamecube / Wii / Triforce emulator (development version)|https://github.com/dolphin-emu/dolphin|{{AUR|dolphin-emu-git}}}}<br />
<br />
{{Tip|<br />
*Stable releases of Dolphin tend to grow old between releases, and are potentially outclassed by the development versions, which feature many speed improvements and bug fixes in comparison. If low performance or glitches are encountered, consider installing the {{AUR|dolphin-emu-git}} package.<br />
*Reinstalling the {{AUR|dolphin-emu-git}} package will upgrade Dolphin to the latest development version at any time.}}<br />
<br />
== Configuration ==<br />
<br />
{{Tip|Run {{ic|dolphin-emu -h}} for help Dolphin's options.}}<br />
{{Note|Dolphin may override these settings on a per-game basis, such as when a setting is know to break a certain game. If absolutely sure a specific setting will not crash the game, you can disable or change these overrides by right-clicking the game and selecting ''Properties''. Likewise, you can set per-game settings using this method.}}<br />
<br />
While no additional configuration is needed for the emulator to run (it is preconfigured with the default settings), altering the settings can improve performance and graphics alike.<br />
Settings are split to three main sections, ''Config'', ''Graphics'' and ''DSP''.<br />
<br />
=== Config section ===<br />
{{Tip|Recent versions of Dolphin remove the ''Audio'' frameskip option, so ''Auto'' is now reccomended.}}<br />
On the General tab, check ''Enable Dual Core'' and ''Enable Idle Skipping''. Enabling or not the cheats is a personal choice. Keep in mind that a real man never cheats. The frame limit should be set to "Auto", so that it works with games from all regions. The CPU emulation engine should be left as JIT Recompiler. Only check "Force console as NTSC-J" if intending to play imported Japanese discs.<br />
<br />
All options on the "Interface" tab are personal choices.<br />
<br />
The Audio tab is the DSP section's screen; setting it up now means there will be no need to do it later. See the [[#DSP section|DSP settings paragraph]] below.<br />
<br />
The next two tabs are not very important; the Gamecube tab has settings about connected accessories, such as memory cards, and the only remarkable Wii tab option is the "Aspect Ratio" drop-down list. Set it to either 16:9 or 4:3, depending on the display's [[Wikipedia: Aspect ratio|aspect ratio]].<br />
<br />
On the final tab, "Paths", ISO directories can be set. The directory of game ISOs can also be set by clicking browse from the home screen, but here more options are available, such as ''Search Subfolders''.<br />
<br />
=== Graphics section ===<br />
<br />
{{Expansion|New 3D options available.}}<br />
<br />
On the "General" tab, choose OpenGL from the backend drop-down list. Set the "Display" and "Other" settings to the desired configuration. V-sync is useful, but it can lead to slowdowns. The "render to main window" option improves the experience aesthetically.<br />
<br />
On the "Enhancements" tab are the options that can improve graphics. While they result to great output, they can slow the emulation down to the point of making games unplayable. Choose the best settings possible, as long as speed remains 100%.<br />
<br />
{| class="wikitable"<br />
|+ Comparison of options<br />
!Option !!Performance !!Quality<br />
|-<br />
| '''Internal resolution''' || 1x Native || Auto (Window size)<br />
|-<br />
| '''Anti-aliasing''' || None || at least 2x<br />
|-<br />
| '''Anisotropic filtering''' || 1x || at least 2x<br />
|-<br />
| '''Post-Processing Effect''' || (off) || your choice<br>(see tip below)<br />
|-<br />
| '''Scaled EFB copy''' || unchecked || checked<br />
|-<br />
| '''Per-Pixel Lightning''' || unchecked || checked<br />
|-<br />
| '''Force texture filtering,<br>Widescreen Hack,<br>Disable fog''' || off || your option<br>(recommended: off)<br />
|}<br />
<br />
{{Tip|Dolphin is able to render games that were developed for 2D in anaglyph 3D. To enable this, set ''Post-Processing Effect'' to ''stereoscopic'' (default, for red-cyan mode) or ''stereoscopic2'' (blue-yellow). It is also '''necessary''' to uncheck "''Fast Depth Calculation''" on the ''Hacks'' tab (''see below'').}}<br />
<br />
{{Warning|Using filters and other ways to improve graphics might break a few games or cause graphical glitches of any level.}}<br />
<br />
Unless sure, the ''Hacks'' tab is best left untouched.<br />
<br />
{| class="wikitable"<br />
|+ Defaults<br />
!Option !! Value<br />
|-<br />
| Skip EFB access from CPU || unchecked<br />
|-<br />
| Ignore format changes || checked<br />
|-<br />
| EFB copies || texture<br />
|-<br />
| Texture cache/ Accuracy || Fast<br />
|-<br />
| External frame buffer || disable<br />
|-<br />
| Cache display lists || unchecked<br />
|-<br />
| Disable destination alpha || unchecked<br />
|-<br />
| OpenCL texture decoder || unchecked<br />
|-<br />
| OpenMP texture decoder || unchecked<br />
|-<br />
| Fast depth calculation || checked<br>(Should uncheck for anaglyph 3D)<br />
|-<br />
| Vertex streaming hack || unchecked<br />
|}<br />
<br />
Similarly, unless sure, leave '''everything''' in the ''Advanced'' tab unchecked.<br />
<br />
=== DSP section ===<br />
<br />
Set the DSP emulation engine to<br />
<br />
* DSP HLE for speed over accuracy,<br />
* DSP LLE recompiler for better accuracy with the cost of some speed,<br />
* DSP LLE interpreter; accurate but makes '''everything''' unplayable. Too slow.<br />
<br />
''DSP LLE on separate thread'' improves speed on computers with multi-core CPUs, but might cause audio glitches, and is known to break [https://wiki.dolphin-emu.org/index.php?title=Category:Zelda_ucode_games Zelda ucode games]. Audio backend is best set to [[ALSA]]. For {{ic|pulseaudio}}, Dolphin's optional dependency [[PulseAudio]] needs to be installed.<br />
<br />
{{Note|If you came here from the [[#Config section|Config section's]] link, you should go back now.}}<br />
<br />
== Playing ==<br />
{{Note|Dolphin is a resource-heavy application, so expect not all games to run properly. See the reason [https://dolphin-emu.org/docs/faq/#why-do-i-need-such-powerful-computer-emulate-old-c here].}}<br />
{{Warning|Make sure you '''only''' use Dolphin for legally obtained self-made disc dumps of games you legally bought. Dolphin was not developed for unlawful use. Act legally as applying laws define. You are responsible for any usage of the emulator that you make. No links, instructions or tips for obtaining illegal content will be provided on this wiki. No copyright infringement intended.}}<br />
<br />
Click on browse to set a directory of ISOs so that they are shown as a library on Dolphin's default screen. Otherwise just click ''Open'' and select the file.<br />
<br />
=== Dolphin's Wiki ===<br />
<br />
Whenever a game doesn't work properly, try reading its page on [https://wiki.dolphin-emu.org Dolphin's wiki]. Listed there are tips on setting up the emulator for each game, version compatibility charts, testing entries, troubleshooting and video previews. Contributions, such as testing entries and workarounds are welcome and help other users.<br />
<br />
Here's a {{AUR|xfce4-whiskermenu-plugin}} search action command for searching on Dolphin's wiki:<br />
<br />
exo-open --launch WebBrowser https://wiki.dolphin-emu.org/index.php?search=%u<br />
<br />
{{Tip|Setting up keymaps is recommended. Prefer a gamepad with analogue features to a keyboard and a mouse. See this [http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/GCController_Layout.svg/1000px-GCController_Layout.svg.png map of the GameCube gamepad]. Having fun while playing is also recommended.}}<br />
<br />
== Tips ==<br />
=== Scripts for building and installing Dolphin ===<br />
This script downloads or updates Dolphin, and then installs it. Put it under any directory and keep it there, along with the subdirectories and files it generates. <br />
{{Bc|<nowiki><br />
#!/bin/bash<br />
<br />
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"<br />
getdolphin() {<br />
echo 'Downloading Dolphin...'<br />
git clone https://github.com/dolphin-emu/dolphin.git<br />
}<br />
updatedolphin() {<br />
cd $DIR/dolphin<br />
echo 'Updating the local repository...'<br />
git pull origin<br />
}<br />
build() {<br />
cmake $DIR/dolphin<br />
make<br />
}<br />
updatedolphin || getdolphin<br />
mkdir $DIR/build<br />
cd $DIR/build<br />
build && echo 'Compiled succesfully.' || exit<br />
echo 'Proceeding to the installation; press Enter to continue or Ctrl+C to cancel.'<br />
read<br />
if [ $(whoami) == "root" ];<br />
then<br />
make install<br />
else<br />
sudo make install<br />
fi<br />
</nowiki>}}<br />
<br />
==== PKGBUILDs ====<br />
Dolphin's stable branch PKGBUILDs can be found on [https://www.archlinux.org/packages/?sort=&q=dolphin-emu the community repository].<br />
<br />
A PKGBUILD [https://aur.archlinux.org/packages/do/dolphin-emu-git/PKGBUILD for the git version] can be found on the [[AUR]], along with several other ones.<br />
<br />
== Troubleshooting ==<br />
<br />
==== Games play too fast ====<br />
Make sure the framelimit is set to a proper value for the game's region; 60 for NTSC games or 50 for PAL ones. ''Auto'' is recommended. Avoid playing other media simultaneously with Dolphin.<br />
<br />
==== Emulation is too slow ====<br />
<br />
Double-check the [[Cpu_scaling#Scaling_governors|CPU scaling governor]]. If using an nvidia graphics card, on nvidia-settings changing the powermizer setting to "Prefer maximum performance"; check its temperature to make sure the card does not overheat, though. Change Dolphin's priority using ''nice''. Killing unnecessary processes and disabling compositing also helps. Configuring Dolphin correctly, as described above, is the most important part.<br />
<br />
''See also: [[Maximizing Performance]] - most of the advice should be helpful.''<br />
<br />
== See also ==<br />
<br />
{{Note|The Arch Linux wiki and its users are not responsible for any damage, misuse or illegal action caused, directly or not, by following instructions from webpages hyperlinked bellow.}}<br />
<br />
* [https://dolphin-emu.org/docs/guides/performance-guide/ Dolphin's performance guide.]<br />
* [https://dolphin-emu.org/docs/faq/ Dolphin's FAQ]<br />
* [https://wiki.dolphin-emu.org/index.php?title=Ripping_Game_Discs Dolphin's wiki entry for legally obtaining game dumps.]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=ECryptfs&diff=362767ECryptfs2015-02-26T18:28:43Z<p>Sudowoodo: /* Using ecryptfs-simple */</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Security]]<br />
[[Category:File systems]]<br />
[[fr:Encryption avec eCryptfs]]<br />
[[it:System Encryption with eCryptfs]]<br />
[[ru:eCryptfs]]<br />
{{Related articles start}}<br />
{{Related|Disk encryption}}<br />
{{Related articles end}}<br />
This article describes basic usage of [https://launchpad.net/ecryptfs eCryptfs]. It guides you through the process of creating a private and secure encrypted directory within your {{ic|$HOME}} directory to store sensitive files and private data.<br />
<br />
In implementation eCryptfs differs from dm-crypt, which provides a ''block device encryption layer'', while eCryptfs is an actual file-system &ndash; a [http://en.wikipedia.org/wiki/Cryptographic_filesystems stacked cryptographic file system]. For comparison of the two you can refer to [http://ksouedu.com/doc/ecryptfs-utils/ecryptfs-faq.html#compare this table] and the [[Disk encryption#Comparison table]]. One distinguished feature is that the encryption is stacked on an existing filesystem; eCryptfs can be mounted onto any single existing directory and does not require a separate partition (or size pre-allocation). <br />
<br />
{{Note|The article is in the process of being re-structured. If you need to find information that might not be in its place yet again, the revision before the restructuring is [https://wiki.archlinux.org/index.php?title&#61;ECryptfs&oldid&#61;291214 here].}}<br />
<br />
== Basics ==<br />
<br />
As mentioned in the summary eCryptfs does not require special on-disk storage allocation effort, such as a separate partition or pre-allocated space. Instead, you can mount eCryptfs on top of any single directory to protect it. That includes, for example, a user's entire {{ic|$HOME}} directory or single dedicated directories within it. All cryptographic metadata is stored in the headers of files, so encrypted data can be easily moved, stored for backup and recovered. There are other advantages, but there are also drawbacks, for instance eCryptfs is not suitable for encrypting complete partitions which also means you cannot protect swap space with it (but you can, of course, combine it with [[Dm-crypt/Swap_encryption]]). If you are just starting to set up disk encryption, swap encryption and other points to consider are covered in [[Disk encryption#Preparation]].<br />
<br />
To familiarize with eCryptfs a few points: <br />
* As a stacked filesystem, a mounting of an eCryptfs directory refers to mounting a (stacked) encrypted directory to another '''un'''encrypted mount point (directory) at Linux kernel runtime. <br />
* It is possible to share an encrypted directory between users. However, the encryption is linked to one passphrase so this must be shared as well. It is also possible to share a directory with differently encrypted files (different passphrases). <br />
* A number of eCryptfs acronyms are used throughout the documentation: <br />
** The encrypted directory is referred to as the '''lower''' and the unencrypted as the '''upper''' directory throughout the eCryptfs documentation and this article. While not relevant for this article, the "overlay" filesystem introduced with Linux 3.18 uses (and [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/filesystems/overlayfs.txt explains]) the same upper/lower nomenclatura for the stacking of filesystems. <br />
** the '''mount''' passphrase (or key) is what gives access to the encrypted files, i.e. unlocks the encryption. eCryptfs uses the term '''wrapped''' passphrase to refer to the cryptographically secured mount passphrase.<br />
** a {{ic|FEKEK}} refers to a '''F'''ile's '''E'''ncryption key '''E'''ncryption '''Key''' (see [https://www.kernel.org/doc/Documentation/security/keys-ecryptfs.txt kernel documentation]). <br />
** a {{ic|FNEK}} refers to a '''F'''ile '''N'''ame '''E'''ncryption '''K'''ey, a key to (optionally) encrypt the filenames stored in the encrypted directory.<br />
<br />
Before using eCryptfs, the following disadvantages should be checked for applicability. <br />
<br />
=== Deficiencies ===<br />
<br />
* Hard-coded variables <br />
:The best usability of eCryptfs is achieved by relying on the so-called "Ubuntu tools" of the {{Pkg|ecryptfs-utils}} package. A considerable downside is that a lot of variables (encryption options, lower directory path) are hard-coded into the tools. Changing them infers considerable manual configuration to achieve similar integration. <br />
* Network storage mounts<br />
:eCryptfs has long-standing [https://bugs.launchpad.net/ecryptfs/+bug/277578 bugs] and/or feature requests relating to networked storage. Replicating a content backup of an encrypted directory to a network backup storage is always possible. However, if you want to employ ecryptfs to store the encrypted directory directly on a network storage and mount it locally, you should search for working solutions of the respective network tools (NFS, Samba, etc.) first. If in doubt, [[Encfs]] may be a better choice for such application.<br />
<br />
* Sparse files<br />
:eCryptfs does not handle [https://en.wikipedia.org/wiki/Sparse_file sparse files]. This is sometimes referred to as a bug, but likewise is a consequence of the design as a [[Disk encryption#Stacked filesystem encryption|stacked filesystem encryption]]. For example, in an eCryptfs directory a {{ic|truncate -s 1G file.img}} creates 1GB encrypted data and passes it to the underlying filesystem to store; with the corresponding resource (disk space, data throughput) requirements. Unencrypted, the same file can be allocated efficiently as sparse file space by the filesystem; with a [[Disk_encryption#Block device encryption|block device encryption]] only the respective filesystem output would be encrypted. <br />
<br />
:This should be considered before encrypting large portions of the directory structure. For most intents and purposes this deficiency does not pose a problem. One workaround is to place sparse files in an unencrypted {{ic|.Public}} directory (as opposed to the standard eCryptfs {{ic|.Private}} directory, explained below). Another method is to use a ''dm-crypt'' [[Dm-crypt/Encrypting_a_non-root_file_system#Loop_device|container]] in {{ic|.Public}} for such.<br />
<br />
== Setup example overview ==<br />
<br />
The following [[#Setup_.26_Mounting|#Setup & mounting]] section describes alternatives using eCryptfs to encrypt a data directory. The alternatives start with [[#Using the Ubuntu tools]], which make eCryptfs usage particularly easy and also safe against user errors. This also applies to [[#Encrypting a home directory]] with the tools. During setup, instructions are given on the console by the scripts. The [[#Using_ecryptfs-simple]] section then introduces an alternative package to aide using eCryptfs. The [[#Manual setup]] section then describes the setup using the {{ic|ecryptfs}} filesystem directly. The first subsection ([[#With ecryptfs-utils]]) still uses one more script and is suggested to read to familiarize with the setup of the manual options before using them [[#Without ecryptfs-utils]]. <br />
<br />
The alternatives include <br />
# the setup step for the encrypted directory structures <br />
# the setup to mount, unmount the directory at runtime manually and/or automatically at user login<br />
Each of the described alternative examples can be removed after setup very easily, so do not refrain from testing which suits your needs best.<br />
<br />
== Setup & mounting ==<br />
<br />
eCryptfs is a part of Linux since version 2.6.19. But to work with it you will need the userspace tools provided by the package {{pkg|ecryptfs-utils}} available in the [[Official repositories]].<br />
<br />
Once you have installed that package you can load the {{ic|ecryptfs}} module and continue with the setup:<br />
# modprobe ecryptfs<br />
<br />
Before starting, check the eCryptfs documentation. It is distributed with a very good and complete set of [http://ecryptfs.org/documentation.html manual pages].<br />
<br />
{{Tip|If you use {{Pkg|linux-grsec}}, auto-loading of cryptographic modules may fail when executing the {{ic|ecryptfs-mount-private}} wrapper (as of November 2014). As a work-around, load the mentioned module manually; for example {{ic|modprobe md5}} as root and [[Modprobe.d#Loading|configure]] the system to load it at next boot.}}<br />
<br />
=== Using the Ubuntu tools ===<br />
<br />
Most of the user-friendly convenience tools installed by the ''ecryptfs-utils'' package assume a very specific eCryptfs setup, namely the one that is officially used by Ubuntu (where it can be selected as an option during distro installation). Unfortunately, these choices are not just default options but are actually hard-coded in the tools. If this set-up does not suit your needs, then you can not use the convenience tools and will have to follow the steps at [[#Manual_setup]] instead.<br />
<br />
The set-up used by these tools is as follows:<br />
{| class="wikitable" style="margin-left: 2em; margin-right: 2em; margin-bottom: 0.8em;"<br />
|<br />
* each user can have '''only one encrypted directory''' that is managed by these tools:<br />
** either full {{ic|$HOME}} directory encryption, or <br />
** a single encrypted data directory (by default {{ic|~/Private/}}, but this can be customized).<br />
* the '''lower directory''' for each user is always {{ic|~/.Private/}}<br><small>(in the case of full home dir encryption, this will be a symlink to the actual location at {{ic|/home/.ecryptfs/$USER/.Private/}})</small><br />
* the '''encryption options''' used are:<br />
** ''cipher:'' AES<br />
** ''key length:'' 16 bytes (128 bits)<br />
** ''key management scheme:'' passphrase<br />
** ''plaintext passthrough:'' enabled<br />
* the '''configuration / control info''' for the encrypted directory is stored in a bunch of files at {{ic|~/.ecryptfs/}}:<br><small>(in the case of full home dir encryption, this will be a symlink to the actual location at {{ic|/home/.ecryptfs/$USER/.ecryptfs/}})</small><br />
** {{ic|Private.mnt}} ''[plain text file]'' - contains the path where the upper directory should be mounted (e.g. {{ic|/home/lucy}} or {{ic|/home/lucy/Private}})<br />
** {{ic|Private.sig}} ''[plain text file]'' - contains the signature used to identify the mount passphrase in the kernel keyring<br />
** {{ic|wrapped-passphrase}} ''[binary file]'' - the mount passphrase, encrypted with the login passphrase<br />
** {{ic|auto-mount}}, {{ic|auto-umount}} ''[empty files]'' - if they exist, the {{ic|pam_ecryptfs.so}} module will (assuming it is loaded) automatically mount/unmount this encrypted directory when the user logs in/out<br />
|}<br />
<br />
==== Encrypting a data directory ====<br />
For a full {{ic|$HOME}} directory encryption see [[#Encrypting a home directory]]<br />
<br />
Before the data directory encryption is setup, decide whether it should later be mounted manually or automatically with the user log-in. <br />
<br />
To encrypt a single data directory as a user and mount it manually later, run:<br />
$ ecryptfs-setup-private --nopwcheck --noautomount <br />
<br />
and follow the instructions. The option {{ic|--nopwcheck}} enables you to choose a passphrase different to the user login passphrase and the option {{ic|--noautomount}} is self-explanatory. So, if you want to setup the encrypted directory automatically on log-in later, just ''leave out'' both options right away. <br />
<br />
The script will automatically create the {{ic|~/.Private/}} and {{ic|~/.ecryptfs/}} directory structures as described in the box above. It will also ask for two passphrases:<br />
<br />
;'''login passphrase''': This is the password you will have to enter each time you want to mount the encrypted directory. If you want auto-mounting on login to work, it has to be the same password you use to login to your user account. <br />
<br />
;'''mount passphrase''': This is used to derive the actual file encryption master key. Thus, you should not enter a custom one unless you know what you are doing - instead press Enter to let it auto-generate a secure random one. It will be encrypted using the login passphrase and stored in this encrypted form in {{ic|~/.ecryptfs/wrapped-passphrase}}. Later it will automatically be decrypted ("unwrapped") again in RAM when needed, so you never have to enter it manually. Make sure this file does not get lost, otherwise you can never access your encrypted folder again! You may want to run {{ic|ecryptfs-unwrap-passphrase}} to see the mount passphrase in unencrypted form, write it down on a piece of paper, and keep it in a safe (or similar), so you can use it to recover your encrypted data in case the ''wrapped-passphrase'' file is accidentally lost/corrupted or in case you forget the login passphrase.<br />
<br />
The mount point ("upper directory") for the encrypted folder will be at {{ic|~/Private}} by default, however you can manually change this right after the setup command has finished running, by doing:<br />
<br />
$ mv ~/Private /path/to/new/folder<br />
$ echo /path/to/new/folder > ~/.ecryptfs/Private.mnt<br />
<br />
To actually use your encrypted folder, you will have to mount it - see [[#Mounting]] below.<br />
<br />
==== Encrypting a home directory ====<br />
<br />
The following wrapper script will set up an encrypted {{ic|$HOME}} directory for a user and take care of migrating any existing files they have in their not yet encrypted home directory. Ensure that the user in question ''owns no processes'' and is ''logged out''. You also need to ensure that you have {{pkg|rsync}} and {{pkg|lsof}} installed. Once the prerequisites have been met, run:<br />
<br />
# ecryptfs-migrate-home -u ''username''<br />
<br />
and follow the instructions. After the wrapper script is complete, follow the instructions for auto-mounting - see [[#Auto-mounting]] below. It is imperative that the user logs in ''before'' the next reboot, to complete the process.<br />
<br />
==== Mounting ====<br />
<br />
===== Manually =====<br />
<br />
Executing the wrapper <br />
$ ecryptfs-mount-private <br />
and entering the passphrase is all needed to mount the encrypted directory to the [[#Using_the_Ubuntu_tools|above]] described ''upper directory'' {{ic|~/Private}}. <br />
<br />
Likewise, executing<br />
$ ecryptfs-umount-private<br />
will unmount it again. <br />
<br />
{{Tip|If it is not required to access the private data permanently during a user session, maybe define an [[Bash#Aliases|alias]] to speed the manual step up.}}<br />
<br />
The tools include another script that can be very handy to access an encrypted {{ic|.Private}} data or home directory. Executing {{ic|ecryptfs-recover-private}} as root will search the system (or an optional specific path) for the directory, interactively query the passphrase for it and mount the directory. It can, for example, be used from a live-CD or different system to access the encrypted data in case of a recovery. Note that if booting from an Arch Linux ISO you must first install the {{pkg|ecryptfs-utils}} to it. Further, it will only be able to mount {{ic|.Private}} directories created with the Ubuntu tools.<br />
<br />
===== Auto-mounting ===== <br />
<br />
The default way to auto-mount an encrypted directory is via [[Pam_mount|PAM]]. See {{ic|man pam_ecryptfs}} and - for more details - 'PAM MODULE' in:<br />
/usr/share/doc/ecryptfs-utils/README<br />
<br />
For auto-mounting it is required that the passphrase to access the encrypted directory is synchronised with the user log-in. <br />
<br />
The following steps set it up: <br />
<br />
1. Check if {{ic|~/.ecryptfs/auto-mount}} and {{ic|~/.ecryptfs/wrapped-passphrase}} exist (these are automatically created by ''ecryptfs-setup-private'').<br />
<br />
2. Add ''ecryptfs'' to the pam-stack exactly as following to allow transparent unwrapping of the passphrase on login:<br />
<br />
Open {{ic|/etc/pam.d/system-auth}} and ''after'' the line containing {{ic|auth required pam_unix.so}} add:<br />
auth required pam_ecryptfs.so unwrap<br />
Next, ''above'' the line containing {{ic|password required pam_unix.so}} insert:<br />
password optional pam_ecryptfs.so<br />
And finally, ''after'' the line {{ic|session required pam_unix.so}} add:<br />
session optional pam_ecryptfs.so<br />
<br />
3. Re-login and check output of ''mount'' which should now contain a mountpoint, e.g.:<br />
/home/$USER/.Private on /home/$USER/Private type ecryptfs (...)<br />
for the user's encrypted directory. It should be perfectly readable at {{ic|~$HOME/Private/}}. <br />
<br />
Note that the latter will be automatically unmounted and made unavailable when the user logs off.<br />
<br />
=== Using ecryptfs-simple ===<br />
<br />
Use [http://xyne.archlinux.ca/projects/ecryptfs-simple/ ecryptfs-simple] if you just want to use eCryptfs to mount arbitrary directories the way you can with [[EncFS]]. ecryptfs-simple does not require root privileges or entries in {{ic|/etc/fstab}}, nor is it limited to hard-coded directories such as {{ic|~/.Private}}. The package is available in the [[AUR]] as {{AUR|ecryptfs-simple}} and in [http://xyne.archlinux.ca/repos/ Xyne's repos].<br />
<br />
As the name implies, usage is simple:<br />
# simple mounting<br />
ecryptfs-simple /path/to/foo /path/to/bar<br />
<br />
# automatic mounting: prompts for options on the first mount of a directory then reloads them next time<br />
ecryptfs-simple -a /path/to/foo /path/to/bar<br />
<br />
# unmounting by source directory<br />
ecryptfs-simple -u /path/to/foo<br />
<br />
# unmounting by mountpoint<br />
ecryptfs-simple -u /path/to/bar<br />
<br />
=== Manual setup ===<br />
<br />
The following details instructions to set up eCryptfs encrypted directories manually. The first section still relies on one extra script from the {{Pkg|ecryptfs-utils}} package. It may be an easier start and can be tried without any root rights. The [[#Without ecryptfs-utils|second]] then sets up an encrypted directory with other encryption options than the default tools. <br />
<br />
{{Tip|The following examples use an encrypted directory ({{ic|.secret}}) different to the default, hard-coded {{ic|.Private}} in the Ubuntu tools. This is on purpose to avoid problems of erroneous [[#Auto-mounting]] when the system has PAM setup for it, as well as problems with other tools using the hard-coded defaults.}} <br />
<br />
==== With ecryptfs-utils ====<br />
<br />
Alternatively to using the scripts {{ic|ecryptfs-setup-private}} and {{ic|ecryptfs-mount-private}} to setup and mount eCryptfs, the same can be done directly with the binaries (which those scripts use) {{ic|ecryptfs-add-passphrase}} and {{ic|mount.ecryptfs_private}} from the {{Pkg|ecryptfs-utils}} package. Those binaries require no root privileges to work by default.<br />
<br />
First choose an ALIAS as you like. Through this section, ALIAS will be {{ic|secret}}. Create the required directories/files:<br />
$ mkdir ~/.secret ~/secret ~/.ecryptfs<br />
$ touch ~/.ecryptfs/secret.conf ~/.ecryptfs/secret.sig<br />
<br />
The {{ic|~/.secret}} directory will hold the encrypted data. The {{ic|~/secret}} directory is the mount point where {{ic|~/.secret}} will be mounted as an ecryptfs filesystem.<br />
<br />
In the next command, replace USER with the name of the current user's home directory. Note that you should write full paths to {{ic|~/.ecryptfs/secret.conf}}. Its format looks like the one in {{ic|/etc/fstab}} without the mount options:<br />
$ echo "/home/USER/.secret /home/USER/secret ecryptfs" > ~/.ecryptfs/secret.conf<br />
<br />
A mount passphrase must be added to the keyring:<br />
$ ecryptfs-add-passphrase<br />
Passphrase: <br />
Inserted auth tok with sig [78c6f0645fe62da0] into the user session keyring<br />
<br />
Write the output signature ({{ic|ecryptfs_sig}}) from the previous command to {{ic|~/.ecryptfs/secret.sig}}:<br />
$ echo 78c6f0645fe62da0 > ~/.ecryptfs/secret.sig<br />
<br />
A second passphrase for filename encryption may be used. If you choose so, add it to the keyring:<br />
$ ecryptfs-add-passphrase<br />
Passphrase: <br />
Inserted auth tok with sig [326a6d3e2a5d444a] into the user session keyring<br />
<br />
If you run the command above, '''append''' its output signature ({{ic|ecryptfs_fnek_sig}}) to {{ic|~/.ecryptfs/secret.sig}}:<br />
$ echo 326a6d3e2a5d444a >> ~/.ecryptfs/secret.sig<br />
<br />
Finally, to mount {{ic|~/.secret}} on {{ic|~/secret}}:<br />
$ mount.ecryptfs_private secret<br />
<br />
An eCryptfs filesystem will be mounted with the following options:<br />
rw,nosuid,nodev,relatime,ecryptfs_fnek_sig=326a6d3e2a5d444a,ecryptfs_sig=78c6f0645fe62da0,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs<br />
<br />
Except for {{ic|ecryptfs_sig}} and {{ic|ecryptfs_fnek_sig}}, the options are hard-coded. {{ic|ecryptfs_fnek_sig}} will exist only if you choose filename encryption.<br />
<br />
To unmount {{ic|~/.secret}}:<br />
$ umount.ecryptfs_private secret<br />
<br />
==== Without ecryptfs-utils ====<br />
<br />
The ecryptfs-utils package is distributed with a few helper scripts which will help you with key management and similar tasks. If one wants, for example, make a choice about the encryption cipher, some of those scripts cannot be used. In this section we setup an encrypted data directory diverting from those defaults. <br />
<br />
First create your private directories, in this example we will call them analogous to the previous section: {{ic|secret}}<br />
$ mkdir -m 700 /home/username/{.secret,.ecryptfs}<br />
$ mkdir -m 500 /home/username/secret<br />
<br />
To summarize:<br />
* Actual encrypted data will be stored in the lower {{ic|~/.secret}} directory <br />
* While mounted, decrypted data will be available in {{ic|~/secret}} directory <br />
** While not mounted nothing can be written to this directory<br />
** While mounted it has the same permissions as the lower directory<br />
<br />
Second we create the mount-passphrase ("file encryption key, encryption key", or '''fekek''') for the directory. It has to be very secure and cannot be changed easily. The ''ecryptfs-setup-private'' script offers the option to generate it from {{ic|/dev/urandom}}. In the following we do a generation similar to the [http://bazaar.launchpad.net/~ecryptfs/ecryptfs/trunk/view/head:/src/utils/ecryptfs-setup-private#L96 source] and then use ''ecryptfs-wrap-passphrase'' to wrap it with an extra password ("Arch"): <br />
<br />
$ printf "%s\n%s" $(od -x -N 100 --width=30 /dev/random | head -n 1 | sed "s/^0000000//" | sed "s/\s*//g") "Arch" | ecryptfs-wrap-passphrase /home/username/.ecryptfs/wrapped-passphrase<br />
<br />
The advantages of the above step are: the mount passphrase is generated from a random source and secured by extra hashing before it is stored on disk. Further, the wrap-passphrase can be changed later. <br />
<br />
Next, we test the passphrase by loading it into the kernel keyring: <br />
<br />
$ printf "%s" "Arch" | ecryptfs-insert-wrapped-passphrase-into-keyring /home/username/.ecryptfs/wrapped-passphrase -<br />
Inserted auth tok with sig [7c5d3dd8a1b49db0] into the user session keyring<br />
and manually copy the signature into the configuration: <br />
$ echo "7c5d3dd8a1b49db0" > ~/.ecryptfs/secret.sig<br />
<br />
Now we continue to setup the encryption options for the directory and prepare an user-mountable entry for {{ic|/etc/fstab}}. If you already know the eCryptfs options to use in it, you can skip the following ''mount'' and create an entry with the above signature already. <br />
<br />
The ''mount.ecryptfs'' command needs root and does not allow for piping the passphrase unfortunately. The mount helper will ask questions about the options we want to choose ("Key type": passphrase - choose any, we only do this to generate the options to use), but let it mount: <br />
<br />
# mount -t ecryptfs /home/username/.secret /home/username/secret<br />
Passphrase: yes<br />
Cipher: aes<br />
Key byte: 32<br />
Plaintext passtrough: no<br />
Filename encryption: no<br />
Add signature to cache: yes <br />
<br />
To summarize the parameters: <br />
* The above chosen {{ic|32}} "key bytes" result in a 256 bit AES encryption (the helper scripts are hard-coded to AES with 128 bit).<br />
* Plaintext passtrough enables to store and work with '''un-encrypted''' files stored in the lower directory.<br />
* In eCryptfs terms the key used to protect filenames is known as "filename encryption key", or '''fnek'''<br />
* '''fekek''' and '''fnek''' can be the same key or different ones at choice <br />
<br />
To create the mount point for the user in [[fstab]], find the current mount and copy it. For example ({{ic|XY}} are placeholders here): <br />
<br />
{{hc|# mount|2=/home/username/.secret on /home/username/secret type ecryptfs (... ecryptfs_fnek_sig=XY,ecryptfs_sig=XY,ecryptfs_cipher=aes,ecryptfs_key_bytes=32,ecryptfs_unlink_sigs, user)}}<br />
<br />
Or, alternatively, append it into {{ic|/etc/fstab}} to edit it: <br />
<br />
# mount | grep secret >> /etc/fstab <br />
<br />
Before continuing, we can already un-mount the temporary mount we used to generate the options: <br />
# umount /home/username/secret<br />
<br />
Now the mount line has to be edited into the correct format, the mount options {{ic|nosuid,nodev,noexec,relatime}} before the first ''ecryptfs'' option are default and can be left out. But what we need to add is the correct signatures for the passphrases to replace the ones of the current mount: <br />
# cat /home/username/.ecryptfs/secret.sig <br />
7c5d3dd8a1b49db0 <br />
<br />
We also need to add the options {{ic|user}} and {{ic|noauto}}. After the edit, the entry will look similar to (bold entries added): <br />
<br />
{{hc|/etc/fstab|2=/home/username/.secret /home/username/secret ecryptfs '''noauto''','''user''',ecryptfs_fnek_sig='''7c5d3dd8a1b49db0''',ecryptfs_sig='''7c5d3dd8a1b49db0''',ecryptfs_cipher=aes,ecryptfs_key_bytes=32,ecryptfs_unlink_sigs '''0 0'''}}<br />
<br />
Some options to note: <br />
* The {{ic|ecryptfs_fnek_sig}} option will be only listed if you enabled filename encryption <br />
* The second last option {{ic|ecryptfs_unlink_sigs}} ensures that the keyring is cleared every time the directory is un-mounted<br />
* The bold options have been added: <br />
** The {{ic|user}} option enables to mount the directory as a user <br />
** The {{ic|noauto}} option is important, because otherwise systemd will error trying to mount the entry directly on boot. <br />
* The user mount will default to option {{ic|noexec}}. If you want to have at least executable files in your private directory, you can add {{ic|exec}} to the fstab options.<br />
<br />
The setup is now complete and directory should be mountable by the user. <br />
<br />
===== Mounting =====<br />
<br />
To mount the encrypted directory as the user, the passphrase must be unwrapped and made available in the user's keyring. Following above section example: <br />
<br />
$ ecryptfs-insert-wrapped-passphrase-into-keyring /home/username/.ecryptfs/wrapped-passphrase<br />
Passphrase: <br />
Inserted auth tok with sig [7c5d3dd8a1b49db0] into the user session keyring <br />
<br />
Now the directory can be mounted without the mount helper questions: <br />
$ mount -i /home/username/secret<br />
<br />
and files be placed into the {{ic|secret}} directory. The above two steps are necessary every time to mount the directory manually. <br />
<br />
To unmount it again: <br />
<br />
$ umount /home/username/secret<br />
<br />
To finalize, the preliminary passphrase to wrap the encryption passphrase may be changed: <br />
$ ecryptfs-rewrap-passphrase /home/username/.ecryptfs/wrapped-passphrase<br />
Old wrapping passphrase: <br />
New wrapping passphrase: <br />
New wrapping passphrase (again):<br />
<br />
The un-mounting should also clear the keyring, to check the user's keyring or clear it manually: <br />
$ keyctl list @u<br />
$ keyctl clear @u<br />
<br />
{{Note|One should remember that {{ic|/etc/fstab}} is for system-wide partitions only and should not generally be used for user-specific mounts}}<br />
<br />
===== Auto-mounting =====<br />
<br />
{{Expansion|<br>- this section should be more generic & comprehensive than it is now<br><br />
- make sure it properly fits in with the article structure|section=Major_restructuring/rewrite}}<br />
<br />
An automount of an eCryptfs directory on usr login can be configured using [[pam mount]] with the added benefit that the directory is un-mounted when all sessions are logged out. Add the following lines to {{ic|/etc/security/pam_mount.conf.xml}}:<br />
<br />
<luserconf name=".pam_mount.conf.xml" /><br />
<mntoptions require="" /> <!-- Default required mount options are ; this clears them --><br />
<lclmount>mount -i %(VOLUME) "%(before=\"-o\" OPTIONS)"</lclmount> <!-- --><br />
<br />
Please prefer writing manually these lines instead of simply copy/pasting them (especially the lclmount line), otherwise you might get some corrupted characters.<br />
Explanation:<br />
* the first line indicates where the user-based configuration file is located (here {{ic|~/.pam_mount.conf.xml}}) ;<br />
* the second line overwrites the default required mount options which are unnecessary ("nosuid,nodev") ;<br />
* the last line indicates which mount command to run (eCryptfs needs the {{Ic|-i}} switch).<br />
<br />
Then set the volume definition, preferably to {{ic|~/.pam_mount.conf.xml}}:<br />
<pam_mount><br />
<volume noroot="1" fstype="ecryptfs" path="/home/user/.secret/" mountpoint="/home/user/secret/"/><br />
</pam_mount><br />
<br />
"noroot" is needed because the encryption key will be added to the user's keyring<br />
<br />
Finally, edit {{ic|/etc/pam.d/login}} as described in [[pam_mount]]'s article.<br />
<br />
====== Optional step ======<br />
<br />
To avoid wasting time needlessly unwrapping the passphrase you can create a script that will check ''pmvarrun'' to see the number of open sessions:<br />
#!/bin/sh<br />
#<br />
# /usr/local/bin/doecryptfs<br />
<br />
exit $(/usr/sbin/pmvarrun -u$PAM_USER -o0)<br />
<br />
With the following line added before the eCryptfs unwrap module in your PAM stack:<br />
auth [success=ignore default=1] pam_exec.so quiet /usr/local/bin/doecryptfs<br />
auth required pam_ecryptfs.so unwrap<br />
The article suggests adding these to {{ic|/etc/pam.d/login}}, but the changes will need to be added to all other places you login, such as {{ic|/etc/pam.d/kde}}.<br />
<br />
== Usage ==<br />
<br />
{{Expansion|Content that still needs to be covered:<br />
- point to the above "Setup & Mounting" section for how to mount and unmount [this section here will cover all other (i.e. setup-independent) usage info]<br><br />
- reference ecryptfs tools not used/mentioned in the prior sections (e.g. with a short link to the online manpages and mention of the other tools usage, as it seems useful (not covered yet are, e.g. ecryptfs-stat, ecryptfs-find, ecryptfs-rewrite-file.) <br><br />
- mention the options to share an encrypted folder between users and to place non-encrypted files or folders in the encrypted container ("pass-through")<br />
|section=Major_restructuring/rewrite}}<br />
<br />
=== Symlinking into the encrypted directory ===<br />
<br />
Besides using your private directory as storage for sensitive files, and private data, you can also use it to protect application data. [[Firefox]] for example has an internal password manager, but the browsing history and cache can also be sensitive. Protecting it is easy:<br />
$ mv ~/.mozilla ~/Private/mozilla<br />
$ ln -s ~/Private/mozilla ~/.mozilla<br />
<br />
=== Removal of encryption ===<br />
<br />
There are no special steps involved, if you want to remove your private directory. Make sure it is un-mounted and delete the respective lower directory (e.g. {{ic|~/.Private}}), along with all the encrypted files. After also removing the related encryption signatures and configuration in {{ic|~/.ecryptfs}}, all is gone. <br />
<br />
If you were [[#Using the Ubuntu tools]] to setup a single directory encryption, you can directly follow the steps detailed by: <br />
<br />
$ ecryptfs-setup-private --undo<br />
<br />
and follow the instructions.<br />
<br />
=== Backup ===<br />
<br />
If you want to move a file out of the private directory just move it to the new destination while {{ic|~/Private}} is mounted. <br />
<br />
With eCryptfs the cryptographic metadata is stored in the header of the files. Setup variants explained in this article separate the directory with encrypted data from the mount point. The unencrypted mount point is fully transparent and available for a backup. Obviously this has to be considered for automated backups, if one has to avoid leaking sensitive unencrypted data into a backup. <br />
<br />
You can do backups, or incremental backups, of the encrypted (e.g. {{ic|~/.Private}}) directory, treating it like any other directory. <br />
<br />
Further points to note: <br />
<br />
* If you used the Ubuntu tools for [[#Encrypting a home directory]], be aware the location of the lower directory with the encrypted files is ''outside'' the regular user's {{ic|$HOME}} at {{ic|/home/.ecryptfs/$USER/.Private}}. <br />
<br />
* It should be ensured to include the eCryptfs setup files (located in {{ic|~/.ecryptfs}} usually) into the regular or a separate backup.<br />
<br />
* If you use special filesystem mount options, for example {{ic|ecryptfs_xattr}}, do extra checks on restore integrity.<br />
<br />
== See Also ==<br />
<br />
* [http://ecryptfs.org/documentation.html eCryptfs] - Manpages and project home <br />
* [https://defuse.ca/audits/ecryptfs.htm Security audit] of eCryptfs by Taylor Hornby (January 22, 2014).<br />
* [http://sysphere.org/~anrxc/j/articles/ecryptfs/index.html eCryptfs and $HOME] by Adrian C. (anrxc) - Article with installation instructions and discussion of eCryptfs usage <br />
* [http://www.chromium.org/chromium-os/chromiumos-design-docs/protecting-cached-user-data Chromium data protection] (November 2009) - Design document detailing encryption options for Chromium OS, including explanation on its eCryptfs usage<br />
* [http://ecryptfs.sourceforge.net/ecryptfs.pdf eCryptfs design] by Michael Halcrow (May 2005) - Original design document detailing and discussing eCryptfs</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Beginners%27_guide&diff=360014Beginners' guide2015-02-08T08:14:39Z<p>Sudowoodo: /* Hardware clock */ copyedit</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 />
== System requirements ==<br />
<br />
Arch Linux should run on any [[Wikipedia:P6 (microarchitecture)|i686]] compatible machine with a minimum of 256 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 />
{{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 />
The installation media can be acquired from [https://archlinux.org/download/ Download] page. The single ISO image supports both 32bit and 64bit. Always use the latest ISO image where possible.<br />
<br />
{{Note|<br />
Install images are signed and it is highly recommended to verify their signature before use. Download the ''PGP signature'' to the ISO directory, and run:<br />
$ gpg --verify archlinux-''version''-dual.iso.sig<br />
If the public key is not found, import it with {{ic|gpg --recv-keys}}. [http://sparewotw.wordpress.com/2012/10/31/how-to-verify-signature-using-sig-file/]<br />
<br />
Alternatively, run from an existing Arch Linux installation:<br />
$ pacman-key -v archlinux-2015.01.01-dual.iso.sig<br />
{{ic|md5}} and {{ic|sha1}} sums can be checked with ''md5sum'' and ''sha256sum'' respectively.<br />
}}<br />
<br />
=== USB and optical drives ===<br />
<br />
See [[Optical disc drive#Burning]] (CD/DVD) or [[USB flash installation media]] (USB).<br />
<br />
=== Installing over the network ===<br />
<br />
See [[PXE]].<br />
<br />
=== Install from an existing Linux system ===<br />
<br />
See [[Install from existing Linux]]. This is particularly useful when installing Arch remotely via [[VNC]] or [[SSH]]. See also [[Install from SSH]].<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 />
See [[:Category:Hypervisors]] for examples.<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]]<br />
* [[VirtualBox#Install a native Arch Linux system from VirtualBox]]<br />
* [[Virtualbox#Run a native Arch Linux installation inside VirtualBox]]<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 the screen goes blank with an [[Intel]] video chipset, the problem may be due to [[KMS]]. See [[Intel#Blank screen during boot, when "Loading modules"]] and [[KMS#Disabling modesetting]].<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 />
== Change the language ==<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#Usage]].<br />
If you have (or plan on having) a dual boot setup with Windows, see [[Windows and Arch Dual Boot]].<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 ''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 />
The ''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 devices]].<br />
<br />
=== Wired ===<br />
<br />
Follow this procedure if you need to set up a wired connection via a static IP address.<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 />
See [[Network_configuration#Static_IP_address]] for required settings. Configure a static profile for ''dhcpcd'' in {{ic|/etc/dhcpcd.conf}} with these settings:<br />
<br />
interface enp2s0f0<br />
static ip_address=192.168.0.10/24<br />
static routers=192.168.0.1<br />
static domain_name_servers=192.168.0.1 8.8.8.8<br />
<br />
Restart {{ic|dhcpcd.service}}:<br />
<br />
# systemctl restart dhcpcd.service<br />
<br />
You should now have a working network connection. If you do not, see [[Network configuration]] page.<br />
<br />
=== Wireless ===<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 />
Use [[netctl]]'s ''wifi-menu'' to connect to a wireless network:<br />
<br />
# wifi-menu<br />
<br />
This should bring you a menu of wifi networks if your computer has only one Wi-Fi device (mostly the case in laptops).<br />
<br />
If your computer has more than one Wi-Fi device, you need to choose one and pass its interface name to ''wifi-menu''. First, identify the name of the needed 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 />
This example shows {{ic|wlp3s0}} as the only available wireless interface, for simplicity. If you are unsure, wireless interfaces are likely to start with the letter "w", and unlikely to be "lo" or start with the letter "e".<br />
<br />
Now try ''wifi-menu'' again by passing it the interface name:<br />
<br />
# wifi-menu wlp3s0<br />
<br />
See the sample configuration in [[WPA2 Enterprise#netctl]] for networks that require both a username and password.<br />
<br />
You should now have a working wireless network connection. If you do not or even failed to identify the wireless interface, see [[#Without wifi-menu]] below or 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 ''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 />
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 {{ic|''ssid''}} with the name of your network and {{ic|''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''" "''psk''" >> /etc/wpa_supplicant.conf<br />
# ip link set ''interface'' up<br />
# wpa_supplicant -B -D nl80211,wext -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 />
=== 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 devices ==<br />
<br />
In this step, the storage devices that will be used by the new system will be prepared. Read [[Partitioning]] for a more general overview.<br />
<br />
{{Warning|Partitioning will destroy existing data. Before proceeding, you '''must''' backup all data that needs to be preserved.}}<br />
<br />
{{Tip|<br />
* Users intending to create stacked block devices for [[LVM]], [[disk encryption]] or [[RAID]], should keep those instructions into consideration when preparing the partitions.<br />
* If intending to install to a USB flash key, see [[Installing Arch Linux on a USB key]].}}<br />
<br />
=== Identify the devices ===<br />
<br />
The first step is identify the devices where the new system will be installed. The following command will show all the available devices:<br />
<br />
# lsblk<br />
<br />
This will list all devices connected to your system along with their partition schemes, including that used to host and boot live Arch installation media (e.g. a USB drive). Not all devices listed will therefore be viable or appropriate mediums for installation. To filter out inappropriate results, the command can optionally be amended as follows:<br />
<br />
# lsblk | grep -v "rom\|loop\|airoot"<br />
<br />
Devices (e.g. hard disks) will be listed as {{ic|sd''x''}}, where {{ic|''x''}} is a lower-case letter starting from {{ic|a}} for the first device ({{ic|sda}}), {{ic|b}} for the second device ({{ic|sdb}}), and so on. Existing partitions on those devices will be listed as {{ic|sd''xY''}}, where {{ic|''Y''}} is a number starting from {{ic|1}} for the first partition, {{ic|2}} for the second, and so on. In the example below, only one device is available ({{ic|sda}}), and that device uses only one partition ({{ic|sda1}}):<br />
<br />
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT<br />
sda 8:0 0 80G 0 disk<br />
└─sda1 8:1 0 80G 0 part<br />
<br />
The {{ic|sd''xY''}} convention will be used in the examples provided below for partition tables, partitions, and file systems. As they are just examples, it is important to ensure that any necessary changes to device names, partition numbers, and/or partition sizes (etc.) are made. Do not just blindly copy and paste the commands.<br />
<br />
If the existing partition scheme needs not be changed, skip to [[#Create filesystems]], otherwise continue reading the following section.<br />
<br />
=== Partition table types ===<br />
<br />
If you are installing alongside an existing installation (i.e. dual-booting), a partition table will already be in use. If the devices are not partitioned, or the current partitions table or scheme needs to be changed, you will first have to determine the partition tables (one for each device) in use or to be used.<br />
<br />
{{Warning|If Arch and Windows are dual-booting from same device, then Arch '''must''' follow the same firmware boot mode and partitioning combination already used, or Windows will fail to boot. See [[Windows and Arch Dual Boot#Important information]] for more details.}}<br />
<br />
There are two types of partition table:<br />
<br />
* [[Master Boot Record| MBR]]: Intended for BIOS systems (also referred to as "msdos")<br />
* [[GUID Partition Table| GPT]]: Intended for UEFI systems<br />
<br />
Any existing partition table can be identified with the following command for each device:<br />
<br />
# parted /dev/sd''x'' print<br />
<br />
=== Partitioning tools ===<br />
<br />
For each device to be partitioned, a proper tool must be chosen according to the partition table to be used. Several partitioning tools are provided by the Arch installation medium, including:<br />
<br />
* [[parted]]: MBR and GPT<br />
* [[Partitioning#Fdisk usage summary|fdisk]], '''cfdisk''', '''sfdisk''': MBR and GPT<br />
* [[Partitioning#Gdisk usage summary|gdisk]], '''cgdisk''', '''sgdisk''': GPT<br />
<br />
{{Warning|Using a partitioning tool that is incompatible with your partition table type will likely result in the destruction of that table, along with any existing partitions/data.}}<br />
<br />
{{Tip|The devices may also be partitioned before booting the Arch installation media, possibly using alternative live systems with other partitioning tools. For example beginners might find it easier to use a graphical partitioning tool such as [[GParted]], which is also provided as a [http://gparted.sourceforge.net/livecd.php live CD] and works with both MBR and GPT partition tables.}}<br />
<br />
==== Using parted in interactive mode ====<br />
<br />
All the examples provided below make use of ''parted'', as it can be used for both BIOS/MBR and UEFI/GPT. It will be launched in ''interactive mode'', which simplifies the partitioning process and reduces unnecessary repetition by automatically applying all partitioning commands to the specified device.<br />
<br />
In order to start operating on a device, execute:<br />
<br />
# parted /dev/sd''x''<br />
<br />
You will notice that the command-line prompt changes from a hash ({{ic|#}}) to {{ic|(parted)}}: this also means that the new prompt is not a command to be manually entered when running the commands in the examples.<br />
<br />
To see a list of the available commands, enter:<br />
<br />
(parted) help<br />
<br />
When finished, or if wishing to implement a partition table or scheme for another device, exit from parted with:<br />
<br />
(parted) quit<br />
<br />
After exiting, the command-line prompt will change back to {{ic|#}}.<br />
<br />
=== Create new partition table ===<br />
<br />
You need to (re)create the partition table of a device when it has never been partitioned before, or when you want to change the type of its partition table. Recreating the partition table of a device is also useful when the partition scheme needs to be restructured from scratch.<br />
<br />
{{Warning|<br />
* If dual-booting with an existing installation of Windows on a UEFI/GPT system, do not erase the partition table. Doing so will destroy all existing data on the device, including the UEFI partition with the Windows ''.efi'' file required to boot it.<br />
* MBR is designed specifically for use with BIOS systems, and GPT is designed for UEFI. It is not recommended for less experienced users to break this convention as both have features and/or limitations that may be incompatible with your hardware (e.g. MBR cannot cope with devices larger than 2 TiB). [https://www.happyassassin.net/2014/01/25/uefi-boot-how-does-that-actually-work-then/] If for any reason you do not wish to follow this convention, see [http://mjg59.dreamwidth.org/8035.html] and [http://rodsbooks.com/gdisk/bios.html] for more information and possible workarounds.}}<br />
<br />
Open each device whose partition table must be (re)created with:<br />
<br />
# parted /dev/sd''x''<br />
<br />
To then create a new MBR/msdos partition table for BIOS systems, use the following command:<br />
<br />
(parted) mklabel msdos<br />
<br />
To create a new GPT partition table for UEFI systems instead, use:<br />
<br />
(parted) mklabel gpt<br />
<br />
=== Partition schemes ===<br />
<br />
You can decide the number and size of the partitions the devices should be split into, and which directories will be used to mount the partitions in the installed system (also known as ''mount points''). The mapping from partitions to directories is the [[Partitioning#Partition scheme|partition scheme]], which must comply with the following requirements:<br />
<br />
* At least a partition for the {{ic|/}} (''root'') directory '''must''' be created.<br />
* Depending on the motherboard's firmware interface, the chosen [[#Partition table types]], and in some cases also the chosen [[boot loader]], the following additional partitions '''must''' be created:<br />
** '''BIOS/MBR''': no additional partition required.<br />
** '''BIOS/GPT''':<br />
*** If using [[syslinux]]: no additional partition required.<br />
*** If using [[GRUB]]: one 1MiB or 2MiB [[GRUB#GUID Partition Table (GPT) specific instructions|BIOS Boot Partition]] of type {{ic|EF02}}.<br />
** '''UEFI/GPT''': one [[Unified Extensible Firmware Interface#EFI System Partition|EFI System Partition]].<br />
** '''UEFI/MBR''': one [[Unified Extensible Firmware Interface#EFI System Partition|EFI System Partition]].<br />
<br />
In the examples below it is assumed that a new and contiguous partitioning scheme is applied to a single device. Some optional partitions will also be created for the {{ic|/boot}} and {{ic|/home}} directories: see also [[Arch filesystem hierarchy]] for an explanation of the purpose of the various directories; if separate partitions for directories like {{ic|/boot}} or {{ic|/home}} are not created, these will simply be contained in the {{ic|/}} partition. Also the creation of an optional partiton for [[swap space]] will be illustrated.<br />
<br />
If not already open in a ''parted'' interactive session, open each device to be partitioned with:<br />
<br />
# parted /dev/sd''x''<br />
<br />
The following command will be used to create partitions:<br />
<br />
(parted) mkpart ''part-type'' ''fs-type'' ''start'' ''end''<br />
<br />
* {{ic|''part-type''}} is one of {{ic|primary}}, {{ic|extended}} or {{ic|logical}}, and is meaningful only for MBR partition tables.<br />
* {{ic|''fs-type''}} is one of the supported file systems listed in the [http://www.gnu.org/software/parted/manual/parted.html#mkpart manual]. The partition will be properly formatted in [[#Create filesystems]].<br />
* {{ic|''start''}} is the beginning of the partition from the start of the device. It consists of a number followed by a [http://www.gnu.org/software/parted/manual/parted.html#unit unit], for example {{ic|1M}} means start at 1MiB.<br />
* {{ic|''end''}} is the end of the partition from the start of the device (''not'' from the {{ic|''start''}} value). It has the same syntax as {{ic|''start''}}, for example {{ic|100%}} means end at the end of the device (use all the remaining space).<br />
<br />
{{Warning|It is important that the partitions do not overlap each other: if you do not want to leave unused space in the device, make sure that each partition starts where the previous one ends.}}<br />
<br />
{{Note|''parted'' may issue a warning like:<br />
<br />
Warning: The resulting partition is not properly aligned for best performance.<br />
Ignore/Cancel?<br />
<br />
In this case, read [[Partitioning#Partition alignment]] and follow [[GNU Parted#Alignment]] to fix it.}}<br />
<br />
The following command will be used to flag the partition that contains the {{ic|/boot}} directory as bootable:<br />
<br />
(parted) set ''partition'' boot on<br />
<br />
* {{ic|''partition''}} is the number of the partition to be flagged (see the output of the {{ic|print}} command).<br />
<br />
==== UEFI/GPT examples ====<br />
<br />
In every instance, a special bootable [[Unified Extensible Firmware Interface#EFI System Partition|EFI System Partition]] is required.<br />
<br />
{{Warning|If dual-booting with an existing installation of Windows on a UEFI/GPT system, the existing UEFI partition must not be deleted. Doing so will destroy the ''.efi'' file required to boot Windows.}}<br />
<br />
If creating a new EFI System Partition, use the following commands (the recommended size is 512MiB):<br />
<br />
(parted) mkpart ESP fat32 1M 513M<br />
(parted) set 1 boot on<br />
<br />
The remaining partition scheme is entirely up to you. For one other partition using 100% of remaining space:<br />
<br />
(parted) mkpart primary ext3 513M 100%<br />
<br />
For separate {{ic|/}} (20GiB) and {{ic|/home}} (all remaining space) partitions:<br />
<br />
(parted) mkpart primary ext3 513M 20.5G<br />
(parted) mkpart primary ext3 20.5G 100%<br />
<br />
And for separate {{ic|/}} (20GiB), swap (4Gib), and {{ic|/home}} (all remaining space) partitions:<br />
<br />
(parted) mkpart primary ext3 513M 20.5G<br />
(parted) mkpart primary linux-swap 20.5G 24.5G<br />
(parted) mkpart primary ext3 24.5G 100%<br />
<br />
==== BIOS/MBR examples ====<br />
<br />
For a minimum single primary partition using all available disk space, the following command would be used:<br />
<br />
(parted) mkpart primary ext3 1M 100%<br />
(parted) set 1 boot on<br />
<br />
In the following instance, a 20Gib {{ic|/}} partition will be created, followed by a {{ic|/home}} partition using all the remaining space:<br />
<br />
(parted) mkpart primary ext3 1M 20G<br />
(parted) set 1 boot on<br />
(parted) mkpart primary ext3 20G 100%<br />
<br />
In the final example below, separate {{ic|/boot}} (100MiB), {{ic|/}} (20Gib), swap (4GiB), and {{ic|/home}} (all remaining space) partitions will be created:<br />
<br />
(parted) mkpart primary ext3 1M 100M<br />
(parted) set 1 boot on<br />
(parted) mkpart primary ext3 100M 20G<br />
(parted) mkpart primary linux-swap 20G 24G<br />
(parted) mkpart primary ext3 24G 100%<br />
<br />
=== Create filesystems ===<br />
<br />
Once the partitions have been created, each must be formatted with an appropriate [[file system]], ''except'' for swap partitions. All available partitions on the intended installation device can be listed with the following command:<br />
<br />
# lsblk /dev/sd''x''<br />
<br />
With the exceptions noted below, it is recommended to use the {{ic|ext4}} file system:<br />
<br />
# mkfs.ext4 /dev/sd''xY''<br />
<br />
{{Warning|If dual-booting with an existing installation of Windows on a UEFI/GPT system, do not re-format the UEFI partition. Doing so will destroy all existing data on that partition, including the Windows ''.efi'' file required to boot it.}}<br />
<br />
{{Note|<br />
* If a new UEFI system partition has been created on a UEFI/GPT system, it must be formatted with a {{ic|fat32}} or {{ic|vfat32}} file system. Failure to do so will result in an unbootable installation:<br />
:{{bc|# mkfs.vfat -F32 /dev/sd''xY''}}<br />
* If you plan to use [[GRUB]] on a BIOS/GPT system, 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.}}<br />
<br />
=== Activate swap ===<br />
<br />
If a swap partition has been created, it must be set up and activated with:<br />
<br />
# mkswap /dev/sd''xY''<br />
# swapon /dev/sd''xY''<br />
<br />
=== Mount the partitions ===<br />
<br />
{{Note|Swap partitions must '''not''' be mounted here.}}<br />
<br />
The {{ic|/}} (root) partition must be mounted '''first''': this is because any directories such as {{ic|/boot}} or {{ic|/home}} that have separate partitions will have to be created in the root file system. The {{ic|/mnt}} directory of the live system will be used to mount the root partition, and consequently all the other partitions will stem from there. If the root partition's name is {{ic|sd''xR''}}, do:<br />
<br />
# mount /dev/sd''xR'' /mnt<br />
<br />
Once the {{ic|/}} partition has been mounted, any remaining partitions may be mounted in any order. The general procedure is to first create the mount point, and then mount the partition to it. If using a separate {{ic|/boot}} partition:<br />
<br />
# mkdir -p /mnt/boot<br />
# mount /dev/sd''xB'' /mnt/boot<br />
<br />
{{Note|Using {{ic|/boot}} is recommended also for mounting the EFI System Partition on UEFI/GPT system. See [[EFISTUB]] and related articles for alternatives.}}<br />
<br />
If using a separate {{ic|/home}} partition:<br />
<br />
# mkdir -p /mnt/home<br />
# mount /dev/sd''xH'' /mnt/home<br />
<br />
Once all the remaining partitions, if any, have been mounted, the devices are ready to install Arch.<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 ''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:HTTP persistent connection|persistent HTTP connection]]: with FTP, ''pacman'' has to establish a new connection to server each time it requests to download next 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 -Syyu}}, 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 />
}}<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. To build packages from the [[AUR]] or with [[ABS]], you will also need the {{Grp|base-devel}} group.<br />
<br />
# pacstrap -i /mnt base base-devel<br />
<br />
Other packages can be installed later using [[pacman]].<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 />
<br />
See [[Pacman#Troubleshooting]] and [[Pacman-key#Troubleshooting]] for more information.<br />
}}<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 />
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]]). 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 />
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 />
{{Warning|Do not assume that the tools you used from the ISO are automatically installed. For example, if you used ''wifi-menu'' to gain network access during the installation and want to continue so after the first boot, you will have to install ''dialog'' to use it. The following section specifies such cases, do follow it closely to avoid a hick-up in your fresh install.}}<br />
<br />
=== Locale ===<br />
<br />
Locales define which language the system uses and other regional considerations like currency denomination, numerology and character sets. Possible values are listed in {{ic|/etc/locale.gen}}, the active locale is defined in {{ic|locale.conf}} files.<br />
<br />
All entries in {{ic|locale.gen}} are commented out (or preceded by {{ic|#}}) by default. Uncomment {{ic|en_US.UTF-8 UTF-8}}, as well as other needed localisations. {{ic|UTF-8}} is highly recommended over other options.<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 />
Before locales can be enabled, they must be ''generated'':<br />
<br />
# locale-gen<br />
<br />
The {{ic|/etc/locale.conf}} file does not exist by default. Create it, where {{ic|LANG}} refers to the first column of an uncommented entry in {{ic|/etc/locale.gen}}:<br />
<br />
# echo LANG=''en_US.UTF-8'' > /etc/locale.conf<br />
<br />
Export the chosen locale:<br />
<br />
# export LANG=''en_US.UTF-8''<br />
<br />
{{Tip|<br />
* 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 described in [[Locale#Setting the locale]].<br />
* {{ic|LANG}} acts as the default value for the locale-related {{ic|LC_*}} variables. To use other locales for these variables, run ''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 />
<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, and listed with the ''ls'' command. Create a symbolic link {{ic|/etc/localtime}} to your subzone file {{ic|/usr/share/zoneinfo/''Zone''/''SubZone''}}:<br />
<br />
# ln -s /usr/share/zoneinfo/''Zone''/''SubZone'' /etc/localtime<br />
<br />
{{Tip|Use [http://tldp.org/LDP/abs/html/tabexpansion.html tab completion] to show available zones and subzones.}}<br />
<br />
Example:<br />
<br />
# ln -s /usr/share/zoneinfo/Europe/Minsk /etc/localtime<br />
<br />
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 />
If you have multiple operating systems installed in the same machine, they will all derive the current time from the same hardware clock, which must be set to either UTC or ''localtime''. For this reason you must make sure that all the operating systems see the hardware clock as providing time in the same chosen [[Time#Time standard|standard]], otherwise some of them will perform the time zone adjustement for the system clock, while others will not.<br />
<br />
In particular, it is strongly recommended to set the hardware clock to UTC, in order to avoid conflicts between the installed operating systems. For example, if the hardware clock was set to ''localtime'', more than one operating system may adjust it after a [[Wikipedia:Daylight_saving_time|DST]] change, thus resulting in an overcorrection; more problems may arise when travelling between different time zones and using one of the operating systems to reset the system/hardware clock.<br />
<br />
To set the hardware clock to UTC in Linux, run:<br />
<br />
# hwclock --systohc --utc<br />
<br />
The ''hwclock'' command also generates the {{ic|/etc/adjtime}} file.<br />
<br />
{{Note|Using UTC for the hardware clock does not mean that software will display time in UTC. However, the system setup/BIOS interface will instead. This should be neither surprising or treated as a bug.}}<br />
<br />
{{Warning|Windows systems use ''localtime'' by default. Using ''localtime'' on Arch systems may lead to several known and unfixable bugs, but there are no plans to drop support for ''localtime''. It is, though, recommended to set Windows to use UTC instead, and prevent it from synchronising time. See [[Time#UTC in Windows]].}}<br />
<br />
=== Kernel modules ===<br />
<br />
Needed kernel modules are automatically loaded by ''udev'', so you will rarely need to load modules manually. See [[Kernel modules]] for details.<br />
<br />
=== Hostname ===<br />
<br />
Set the [[Network_configuration#Set_the_hostname|hostname]] to your liking:<br />
<br />
# echo ''myhostname'' > /etc/hostname<br />
<br />
Add the same hostname to {{ic|/etc/hosts}}:<br />
<br />
#<ip-address> <hostname.domain.org> <hostname><br />
127.0.0.1 localhost.localdomain localhost ''myhostname''<br />
::1 localhost.localdomain localhost ''myhostname''<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 configuration, visit [[Network configuration]] and [[Wireless network configuration]].<br />
* If you would like to use the old interface naming scheme (i.e. {{ic|eth''X''}} and {{ic|wlan''X''}}) 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 ''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 wireless 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 ''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|Do not use ''wifi-menu'' now, instead wait until you have finished this guide and have rebooted. It will not work now because a 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 ''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|This method cannot be used with explicitely enabled [[Netctl#Configuration|profiles]], i.e. through {{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 />
=== Set the root password ===<br />
<br />
Set the root password with:<br />
<br />
# passwd<br />
<br />
=== Install and configure a bootloader ===<br />
<br />
==== For BIOS motherboards ====<br />
<br />
For BIOS systems, several boot loaders are available, see [[Boot loaders]] for a complete list. Choose one as per your convenience. Possible choices include:<br />
<br />
* [[Syslinux#Installation]] 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 [[Syslinux#Examples]].<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 />
Here, installation with '''GRUB''' and '''MBR''' is demonstrated. Install the {{Pkg|grub}} package and then run ''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 />
* 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 />
Automatically generate {{ic|grub.cfg}}:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} ({{ic|pacman -S os-prober}}) before running the next command.}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
==== For UEFI motherboards ====<br />
<br />
For UEFI systems, several boot loaders are available, see [[Boot loaders]] for a complete list. Choose one as per your convenience. Possible choices include:<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#UEFI_systems|GRUB]] is a more complete bootloader, useful if you run into problems with Gummiboot.<br />
<br />
Here, installation with ''gummiboot'' is demonstrated. First install {{Pkg|dosfstools}} to manipulate the EFI System Partition post-installation, and {{Pkg|efibootmgr}} to create a UEFI boot entry (used by bootmanager installation scripts):<br />
<br />
# pacman -S dosfstools efibootmgr<br />
<br />
{{Note|<br />
* 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 />
* It is strongly recommended to have the EFI System Partition mounted at {{ic|/boot}} as this is required to automatically update Gummiboot.<br />
}}<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 ''.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 />
See [[gummiboot]] for more information.<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 />
Remove the installation media, or you may boot back into it. You can log into your new installation as ''root'', using the password you specified with ''passwd''.<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>Sudowoodohttps://wiki.archlinux.org/index.php?title=ECryptfs&diff=360013ECryptfs2015-02-08T08:08:59Z<p>Sudowoodo: /* Basics */ typo</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Security]]<br />
[[Category:File systems]]<br />
[[fr:Encryption avec eCryptfs]]<br />
[[it:System Encryption with eCryptfs]]<br />
[[ru:eCryptfs]]<br />
{{Related articles start}}<br />
{{Related|Disk encryption}}<br />
{{Related articles end}}<br />
This article describes basic usage of [https://launchpad.net/ecryptfs eCryptfs]. It guides you through the process of creating a private and secure encrypted directory within your {{ic|$HOME}} directory to store sensitive files and private data.<br />
<br />
In implementation eCryptfs differs from dm-crypt, which provides a ''block device encryption layer'', while eCryptfs is an actual file-system &ndash; a [http://en.wikipedia.org/wiki/Cryptographic_filesystems stacked cryptographic file system]. For comparison of the two you can refer to [http://ksouedu.com/doc/ecryptfs-utils/ecryptfs-faq.html#compare this table] and the [[Disk encryption#Comparison table]]. One distinguished feature is that the encryption is stacked on an existing filesystem; eCryptfs can be mounted onto any single existing directory and does not require a separate partition (or size pre-allocation). <br />
<br />
{{Note|The article is in the process of being re-structured. If you need to find information that might not be in its place yet again, the revision before the restructuring is [https://wiki.archlinux.org/index.php?title&#61;ECryptfs&oldid&#61;291214 here].}}<br />
<br />
== Basics ==<br />
<br />
As mentioned in the summary eCryptfs does not require special on-disk storage allocation effort, such as a separate partition or pre-allocated space. Instead, you can mount eCryptfs on top of any single directory to protect it. That includes, for example, a user's entire {{ic|$HOME}} directory or single dedicated directories within it. All cryptographic metadata is stored in the headers of files, so encrypted data can be easily moved, stored for backup and recovered. There are other advantages, but there are also drawbacks, for instance eCryptfs is not suitable for encrypting complete partitions which also means you cannot protect swap space with it (but you can, of course, combine it with [[Dm-crypt/Swap_encryption]]). If you are just starting to set up disk encryption, swap encryption and other points to consider are covered in [[Disk encryption#Preparation]].<br />
<br />
To familiarize with eCryptfs a few points: <br />
* As a stacked filesystem, a mounting of an eCryptfs directory refers to mounting a (stacked) encrypted directory to another '''un'''encrypted mount point (directory) at Linux kernel runtime. <br />
* It is possible to share an encrypted directory between users. However, the encryption is linked to one passphrase so this must be shared as well. It is also possible to share a directory with differently encrypted files (different passphrases). <br />
* A number of eCryptfs acronyms are used throughout the documentation: <br />
** The encrypted directory is referred to as the '''lower''' and the unencrypted as the '''upper''' directory throughout the eCryptfs documentation and this article. While not relevant for this article, the "overlay" filesystem introduced with Linux 3.18 uses (and [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/filesystems/overlayfs.txt explains]) the same upper/lower nomenclatura for the stacking of filesystems. <br />
** the '''mount''' passphrase (or key) is what gives access to the encrypted files, i.e. unlocks the encryption. eCryptfs uses the term '''wrapped''' passphrase to refer to the cryptographically secured mount passphrase.<br />
** a {{ic|FEKEK}} refers to a '''F'''ile's '''E'''ncryption key '''E'''ncryption '''Key''' (see [https://www.kernel.org/doc/Documentation/security/keys-ecryptfs.txt kernel documentation]). <br />
** a {{ic|FNEK}} refers to a '''F'''ile '''N'''ame '''E'''ncryption '''K'''ey, a key to (optionally) encrypt the filenames stored in the encrypted directory.<br />
<br />
Before using eCryptfs, the following disadvantages should be checked for applicability. <br />
<br />
=== Deficiencies ===<br />
<br />
* Hard-coded variables <br />
:The best usability of eCryptfs is achieved by relying on the so-called "Ubuntu tools" of the {{Pkg|ecryptfs-utils}} package. A considerable downside is that a lot of variables (encryption options, lower directory path) are hard-coded into the tools. Changing them infers considerable manual configuration to achieve similar integration. <br />
* Network storage mounts<br />
:eCryptfs has long-standing [https://bugs.launchpad.net/ecryptfs/+bug/277578 bugs] and/or feature requests relating to networked storage. Replicating a content backup of an encrypted directory to a network backup storage is always possible. However, if you want to employ ecryptfs to store the encrypted directory directly on a network storage and mount it locally, you should search for working solutions of the respective network tools (NFS, Samba, etc.) first. If in doubt, [[Encfs]] may be a better choice for such application.<br />
<br />
* Sparse files<br />
:eCryptfs does not handle [https://en.wikipedia.org/wiki/Sparse_file sparse files]. This is sometimes referred to as a bug, but likewise is a consequence of the design as a [[Disk encryption#Stacked filesystem encryption|stacked filesystem encryption]]. For example, in an eCryptfs directory a {{ic|truncate -s 1G file.img}} creates 1GB encrypted data and passes it to the underlying filesystem to store; with the corresponding resource (disk space, data throughput) requirements. Unencrypted, the same file can be allocated efficiently as sparse file space by the filesystem; with a [[Disk_encryption#Block device encryption|block device encryption]] only the respective filesystem output would be encrypted. <br />
<br />
:This should be considered before encrypting large portions of the directory structure. For most intents and purposes this deficiency does not pose a problem. One workaround is to place sparse files in an unencrypted {{ic|.Public}} directory (as opposed to the standard eCryptfs {{ic|.Private}} directory, explained below). Another method is to use a ''dm-crypt'' [[Dm-crypt/Encrypting_a_non-root_file_system#Loop_device|container]] in {{ic|.Public}} for such.<br />
<br />
== Setup example overview ==<br />
<br />
The following [[#Setup_.26_Mounting|#Setup & mounting]] section describes alternatives using eCryptfs to encrypt a data directory. The alternatives start with [[#Using the Ubuntu tools]], which make eCryptfs usage particularly easy and also safe against user errors. This also applies to [[#Encrypting a home directory]] with the tools. During setup, instructions are given on the console by the scripts. The [[#Using_ecryptfs-simple]] section then introduces an alternative package to aide using eCryptfs. The [[#Manual setup]] section then describes the setup using the {{ic|ecryptfs}} filesystem directly. The first subsection ([[#With ecryptfs-utils]]) still uses one more script and is suggested to read to familiarize with the setup of the manual options before using them [[#Without ecryptfs-utils]]. <br />
<br />
The alternatives include <br />
# the setup step for the encrypted directory structures <br />
# the setup to mount, unmount the directory at runtime manually and/or automatically at user login<br />
Each of the described alternative examples can be removed after setup very easily, so do not refrain from testing which suits your needs best.<br />
<br />
== Setup & mounting ==<br />
<br />
eCryptfs is a part of Linux since version 2.6.19. But to work with it you will need the userspace tools provided by the package {{pkg|ecryptfs-utils}} available in the [[Official repositories]].<br />
<br />
Once you have installed that package you can load the {{ic|ecryptfs}} module and continue with the setup:<br />
# modprobe ecryptfs<br />
<br />
Before starting, check the eCryptfs documentation. It is distributed with a very good and complete set of [http://ecryptfs.org/documentation.html manual pages].<br />
<br />
{{Tip|If you use {{Pkg|linux-grsec}}, auto-loading of cryptographic modules may fail when executing the {{ic|ecryptfs-mount-private}} wrapper (as of November 2014). As a work-around, load the mentioned module manually; for example {{ic|modprobe md5}} as root and [[Modprobe.d#Loading|configure]] the system to load it at next boot.}}<br />
<br />
=== Using the Ubuntu tools ===<br />
<br />
Most of the user-friendly convenience tools installed by the ''ecryptfs-utils'' package assume a very specific eCryptfs setup, namely the one that is officially used by Ubuntu (where it can be selected as an option during distro installation). Unfortunately, these choices are not just default options but are actually hard-coded in the tools. If this set-up does not suit your needs, then you can not use the convenience tools and will have to follow the steps at [[#Manual_setup]] instead.<br />
<br />
The set-up used by these tools is as follows:<br />
{| class="wikitable" style="margin-left: 2em; margin-right: 2em; margin-bottom: 0.8em;"<br />
|<br />
* each user can have '''only one encrypted directory''' that is managed by these tools:<br />
** either full {{ic|$HOME}} directory encryption, or <br />
** a single encrypted data directory (by default {{ic|~/Private/}}, but this can be customized).<br />
* the '''lower directory''' for each user is always {{ic|~/.Private/}}<br><small>(in the case of full home dir encryption, this will be a symlink to the actual location at {{ic|/home/.ecryptfs/$USER/.Private/}})</small><br />
* the '''encryption options''' used are:<br />
** ''cipher:'' AES<br />
** ''key length:'' 16 bytes (128 bits)<br />
** ''key management scheme:'' passphrase<br />
** ''plaintext passthrough:'' enabled<br />
* the '''configuration / control info''' for the encrypted directory is stored in a bunch of files at {{ic|~/.ecryptfs/}}:<br><small>(in the case of full home dir encryption, this will be a symlink to the actual location at {{ic|/home/.ecryptfs/$USER/.ecryptfs/}})</small><br />
** {{ic|Private.mnt}} ''[plain text file]'' - contains the path where the upper directory should be mounted (e.g. {{ic|/home/lucy}} or {{ic|/home/lucy/Private}})<br />
** {{ic|Private.sig}} ''[plain text file]'' - contains the signature used to identify the mount passphrase in the kernel keyring<br />
** {{ic|wrapped-passphrase}} ''[binary file]'' - the mount passphrase, encrypted with the login passphrase<br />
** {{ic|auto-mount}}, {{ic|auto-umount}} ''[empty files]'' - if they exist, the {{ic|pam_ecryptfs.so}} module will (assuming it is loaded) automatically mount/unmount this encrypted directory when the user logs in/out<br />
|}<br />
<br />
==== Encrypting a data directory ====<br />
For a full {{ic|$HOME}} directory encryption see [[#Encrypting a home directory]]<br />
<br />
Before the data directory encryption is setup, decide whether it should later be mounted manually or automatically with the user log-in. <br />
<br />
To encrypt a single data directory as a user and mount it manually later, run:<br />
$ ecryptfs-setup-private --nopwcheck --noautomount <br />
<br />
and follow the instructions. The option {{ic|--nopwcheck}} enables you to choose a passphrase different to the user login passphrase and the option {{ic|--noautomount}} is self-explanatory. So, if you want to setup the encrypted directory automatically on log-in later, just ''leave out'' both options right away. <br />
<br />
The script will automatically create the {{ic|~/.Private/}} and {{ic|~/.ecryptfs/}} directory structures as described in the box above. It will also ask for two passphrases:<br />
<br />
;'''login passphrase''': This is the password you will have to enter each time you want to mount the encrypted directory. If you want auto-mounting on login to work, it has to be the same password you use to login to your user account. <br />
<br />
;'''mount passphrase''': This is used to derive the actual file encryption master key. Thus, you should not enter a custom one unless you know what you are doing - instead press Enter to let it auto-generate a secure random one. It will be encrypted using the login passphrase and stored in this encrypted form in {{ic|~/.ecryptfs/wrapped-passphrase}}. Later it will automatically be decrypted ("unwrapped") again in RAM when needed, so you never have to enter it manually. Make sure this file does not get lost, otherwise you can never access your encrypted folder again! You may want to run {{ic|ecryptfs-unwrap-passphrase}} to see the mount passphrase in unencrypted form, write it down on a piece of paper, and keep it in a safe (or similar), so you can use it to recover your encrypted data in case the ''wrapped-passphrase'' file is accidentally lost/corrupted or in case you forget the login passphrase.<br />
<br />
The mount point ("upper directory") for the encrypted folder will be at {{ic|~/Private}} by default, however you can manually change this right after the setup command has finished running, by doing:<br />
<br />
$ mv ~/Private /path/to/new/folder<br />
$ echo /path/to/new/folder > ~/.ecryptfs/Private.mnt<br />
<br />
To actually use your encrypted folder, you will have to mount it - see [[#Mounting]] below.<br />
<br />
==== Encrypting a home directory ====<br />
<br />
The following wrapper script will set up an encrypted {{ic|$HOME}} directory for a user and take care of migrating any existing files they have in their not yet encrypted home directory. Ensure that the user in question ''owns no processes'' and is ''logged out''. You also need to ensure that you have {{pkg|rsync}} installed. Once the prerequisites have been met, run:<br />
<br />
# ecryptfs-migrate-home -u ''username''<br />
<br />
and follow the instructions. After the wrapper script is complete, follow the instructions for auto-mounting - see [[#Auto-mounting]] below. It is imperative that the user logs in ''before'' the next reboot, to complete the process.<br />
<br />
==== Mounting ====<br />
<br />
===== Manually =====<br />
<br />
Executing the wrapper <br />
$ ecryptfs-mount-private <br />
and entering the passphrase is all needed to mount the encrypted directory to the [[#Using_the_Ubuntu_tools|above]] described ''upper directory'' {{ic|~/Private}}. <br />
<br />
Likewise, executing<br />
$ ecryptfs-umount-private<br />
will unmount it again. <br />
<br />
{{Tip|If it is not required to access the private data permanently during a user session, maybe define an [[Bash#Aliases|alias]] to speed the manual step up.}}<br />
<br />
The tools include another script that can be very handy to access an encrypted {{ic|.Private}} data or home directory. Executing {{ic|ecryptfs-recover-private}} as root will search the system (or an optional specific path) for the directory, interactively query the passphrase for it and mount the directory. It can, for example, be used from a live-CD or different system to access the encrypted data in case of a recovery. Note that if booting from an Arch Linux ISO you must first install the {{pkg|ecryptfs-utils}} to it. Further, it will only be able to mount {{ic|.Private}} directories created with the Ubuntu tools.<br />
<br />
===== Auto-mounting ===== <br />
<br />
The default way to auto-mount an encrypted directory is via [[Pam_mount|PAM]]. See {{ic|man pam_ecryptfs}} and - for more details - 'PAM MODULE' in:<br />
/usr/share/doc/ecryptfs-utils/README<br />
<br />
For auto-mounting it is required that the passphrase to access the encrypted directory is synchronised with the user log-in. <br />
<br />
The following steps set it up: <br />
<br />
1. Check if {{ic|~/.ecryptfs/auto-mount}} and {{ic|~/.ecryptfs/wrapped-passphrase}} exist (these are automatically created by ''ecryptfs-setup-private'').<br />
<br />
2. Add ''ecryptfs'' to the pam-stack exactly as following to allow transparent unwrapping of the passphrase on login:<br />
<br />
Open {{ic|/etc/pam.d/system-auth}} and ''after'' the line containing {{ic|auth required pam_unix.so}} add:<br />
auth required pam_ecryptfs.so unwrap<br />
Next, ''above'' the line containing {{ic|password required pam_unix.so}} insert:<br />
password optional pam_ecryptfs.so<br />
And finally, ''after'' the line {{ic|session required pam_unix.so}} add:<br />
session optional pam_ecryptfs.so<br />
<br />
3. Re-login and check output of ''mount'' which should now contain a mountpoint, e.g.:<br />
/home/$USER/.Private on /home/$USER/Private type ecryptfs (...)<br />
for the user's encrypted directory. It should be perfectly readable at {{ic|~$HOME/Private/}}. <br />
<br />
Note that the latter will be automatically unmounted and made unavailable when the user logs off.<br />
<br />
=== Using ecryptfs-simple ===<br />
<br />
Use [http://xyne.archlinux.ca/projects/ecryptfs-simple/ ecryptfs-simple] if you just want to use eCryptfs to mount arbitrary directories the way you can with [[EncFS]]. ecryptfs-simple does not require root privileges or entries in {{ic|/etc/fstab}}, nor is it limited to hard-coded directories such as {{ic|~/.Private}}. The package is available in the [https://aur.archlinux.org/packages.php?ID=59612 AUR] and in [http://xyne.archlinux.ca/repos/ Xyne's repos].<br />
<br />
As the name implies, usage is simple:<br />
# simple mounting<br />
ecryptfs-simple /path/to/foo /path/to/bar<br />
<br />
# automatic mounting: prompts for options on the first mount of a directory then reloads them next time<br />
ecryptfs-simple -a /path/to/foo /path/to/bar<br />
<br />
# unmounting by source directory<br />
ecryptfs-simple -u /path/to/foo<br />
<br />
# unmounting by mountpoint<br />
ecryptfs-simple -u /path/to/bar<br />
<br />
=== Manual setup ===<br />
<br />
The following details instructions to set up eCryptfs encrypted directories manually. The first section still relies on one extra script from the {{Pkg|ecryptfs-utils}} package. It may be an easier start and can be tried without any root rights. The [[#Without ecryptfs-utils|second]] then sets up an encrypted directory with other encryption options than the default tools. <br />
<br />
{{Tip|The following examples use an encrypted directory ({{ic|.secret}}) different to the default, hard-coded {{ic|.Private}} in the Ubuntu tools. This is on purpose to avoid problems of erroneous [[#Auto-mounting]] when the system has PAM setup for it, as well as problems with other tools using the hard-coded defaults.}} <br />
<br />
==== With ecryptfs-utils ====<br />
<br />
Alternatively to using the scripts {{ic|ecryptfs-setup-private}} and {{ic|ecryptfs-mount-private}} to setup and mount eCryptfs, the same can be done directly with the binaries (which those scripts use) {{ic|ecryptfs-add-passphrase}} and {{ic|mount.ecryptfs_private}} from the {{Pkg|ecryptfs-utils}} package. Those binaries require no root privileges to work by default.<br />
<br />
First choose an ALIAS as you like. Through this section, ALIAS will be {{ic|secret}}. Create the required directories/files:<br />
$ mkdir ~/.secret ~/secret ~/.ecryptfs<br />
$ touch ~/.ecryptfs/secret.conf ~/.ecryptfs/secret.sig<br />
<br />
The {{ic|~/.secret}} directory will hold the encrypted data. The {{ic|~/secret}} directory is the mount point where {{ic|~/.secret}} will be mounted as an ecryptfs filesystem.<br />
<br />
In the next command, replace USER with the name of the current user's home directory. Note that you should write full paths to {{ic|~/.ecryptfs/secret.conf}}. Its format looks like the one in {{ic|/etc/fstab}} without the mount options:<br />
$ echo "/home/USER/.secret /home/USER/secret ecryptfs" > ~/.ecryptfs/secret.conf<br />
<br />
A mount passphrase must be added to the keyring:<br />
$ ecryptfs-add-passphrase<br />
Passphrase: <br />
Inserted auth tok with sig [78c6f0645fe62da0] into the user session keyring<br />
<br />
Write the output signature ({{ic|ecryptfs_sig}}) from the previous command to {{ic|~/.ecryptfs/secret.sig}}:<br />
$ echo 78c6f0645fe62da0 > ~/.ecryptfs/secret.sig<br />
<br />
A second passphrase for filename encryption may be used. If you choose so, add it to the keyring:<br />
$ ecryptfs-add-passphrase<br />
Passphrase: <br />
Inserted auth tok with sig [326a6d3e2a5d444a] into the user session keyring<br />
<br />
If you run the command above, '''append''' its output signature ({{ic|ecryptfs_fnek_sig}}) to {{ic|~/.ecryptfs/secret.sig}}:<br />
$ echo 326a6d3e2a5d444a >> ~/.ecryptfs/secret.sig<br />
<br />
Finally, to mount {{ic|~/.secret}} on {{ic|~/secret}}:<br />
$ mount.ecryptfs_private secret<br />
<br />
An eCryptfs filesystem will be mounted with the following options:<br />
rw,nosuid,nodev,relatime,ecryptfs_fnek_sig=326a6d3e2a5d444a,ecryptfs_sig=78c6f0645fe62da0,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs<br />
<br />
Except for {{ic|ecryptfs_sig}} and {{ic|ecryptfs_fnek_sig}}, the options are hard-coded. {{ic|ecryptfs_fnek_sig}} will exist only if you choose filename encryption.<br />
<br />
To unmount {{ic|~/.secret}}:<br />
$ umount.ecryptfs_private secret<br />
<br />
==== Without ecryptfs-utils ====<br />
<br />
The ecryptfs-utils package is distributed with a few helper scripts which will help you with key management and similar tasks. If one wants, for example, make a choice about the encryption cipher, some of those scripts cannot be used. In this section we setup an encrypted data directory diverting from those defaults. <br />
<br />
First create your private directories, in this example we will call them analogous to the previous section: {{ic|secret}}<br />
$ mkdir -m 700 /home/username/{.secret,.ecryptfs}<br />
$ mkdir -m 500 /home/username/secret<br />
<br />
To summarize:<br />
* Actual encrypted data will be stored in the lower {{ic|~/.secret}} directory <br />
* While mounted, decrypted data will be available in {{ic|~/secret}} directory <br />
** While not mounted nothing can be written to this directory<br />
** While mounted it has the same permissions as the lower directory<br />
<br />
Second we create the mount-passphrase ("file encryption key, encryption key", or '''fekek''') for the directory. It has to be very secure and cannot be changed easily. The ''ecryptfs-setup-private'' script offers the option to generate it from {{ic|/dev/urandom}}. In the following we do a generation similar to the [http://bazaar.launchpad.net/~ecryptfs/ecryptfs/trunk/view/head:/src/utils/ecryptfs-setup-private#L96 source] and then use ''ecryptfs-wrap-passphrase'' to wrap it with an extra password ("Arch"): <br />
<br />
$ printf "%s\n%s" $(od -x -N 100 --width=30 /dev/random | head -n 1 | sed "s/^0000000//" | sed "s/\s*//g") "Arch" | ecryptfs-wrap-passphrase /home/username/.ecryptfs/wrapped-passphrase<br />
<br />
The advantages of the above step are: the mount passphrase is generated from a random source and secured by extra hashing before it is stored on disk. Further, the wrap-passphrase can be changed later. <br />
<br />
Next, we test the passphrase by loading it into the kernel keyring: <br />
<br />
$ printf "%s" "Arch" | ecryptfs-insert-wrapped-passphrase-into-keyring /home/username/.ecryptfs/wrapped-passphrase -<br />
Inserted auth tok with sig [7c5d3dd8a1b49db0] into the user session keyring<br />
and manually copy the signature into the configuration: <br />
$ echo "7c5d3dd8a1b49db0" > ~/.ecryptfs/secret.sig<br />
<br />
Now we continue to setup the encryption options for the directory and prepare an user-mountable entry for {{ic|/etc/fstab}}. If you already know the eCryptfs options to use in it, you can skip the following ''mount'' and create an entry with the above signature already. <br />
<br />
The ''mount.ecryptfs'' command needs root and does not allow for piping the passphrase unfortunately. The mount helper will ask questions about the options we want to choose ("Key type": passphrase - choose any, we only do this to generate the options to use), but let it mount: <br />
<br />
# mount -t ecryptfs /home/username/.secret /home/username/secret<br />
Passphrase: yes<br />
Cipher: aes<br />
Key byte: 32<br />
Plaintext passtrough: no<br />
Filename encryption: no<br />
Add signature to cache: yes <br />
<br />
To summarize the parameters: <br />
* The above chosen {{ic|32}} "key bytes" result in a 256 bit AES encryption (the helper scripts are hard-coded to AES with 128 bit).<br />
* Plaintext passtrough enables to store and work with '''un-encrypted''' files stored in the lower directory.<br />
* In eCryptfs terms the key used to protect filenames is known as "filename encryption key", or '''fnek'''<br />
* '''fekek''' and '''fnek''' can be the same key or different ones at choice <br />
<br />
To create the mount point for the user in [[fstab]], find the current mount and copy it. For example ({{ic|XY}} are placeholders here): <br />
<br />
{{hc|# mount|2=/home/username/.secret on /home/username/secret type ecryptfs (... ecryptfs_fnek_sig=XY,ecryptfs_sig=XY,ecryptfs_cipher=aes,ecryptfs_key_bytes=32,ecryptfs_unlink_sigs, user)}}<br />
<br />
Or, alternatively, append it into {{ic|/etc/fstab}} to edit it: <br />
<br />
# mount | grep secret >> /etc/fstab <br />
<br />
Before continuing, we can already un-mount the temporary mount we used to generate the options: <br />
# umount /home/username/secret<br />
<br />
Now the mount line has to be edited into the correct format, the mount options {{ic|nosuid,nodev,noexec,relatime}} before the first ''ecryptfs'' option are default and can be left out. But what we need to add is the correct signatures for the passphrases to replace the ones of the current mount: <br />
# cat /home/username/.ecryptfs/secret.sig <br />
7c5d3dd8a1b49db0 <br />
<br />
We also need to add the options {{ic|user}} and {{ic|noauto}}. After the edit, the entry will look similar to (bold entries added): <br />
<br />
{{hc|/etc/fstab|2=/home/username/.secret /home/username/secret ecryptfs '''noauto''','''user''',ecryptfs_fnek_sig='''7c5d3dd8a1b49db0''',ecryptfs_sig='''7c5d3dd8a1b49db0''',ecryptfs_cipher=aes,ecryptfs_key_bytes=32,ecryptfs_unlink_sigs '''0 0'''}}<br />
<br />
Some options to note: <br />
* The {{ic|ecryptfs_fnek_sig}} option will be only listed if you enabled filename encryption <br />
* The second last option {{ic|ecryptfs_unlink_sigs}} ensures that the keyring is cleared every time the directory is un-mounted<br />
* The bold options have been added: <br />
** The {{ic|user}} option enables to mount the directory as a user <br />
** The {{ic|noauto}} option is important, because otherwise systemd will error trying to mount the entry directly on boot. <br />
* The user mount will default to option {{ic|noexec}}. If you want to have at least executable files in your private directory, you can add {{ic|exec}} to the fstab options.<br />
<br />
The setup is now complete and directory should be mountable by the user. <br />
<br />
===== Mounting =====<br />
<br />
To mount the encrypted directory as the user, the passphrase must be unwrapped and made available in the user's keyring. Following above section example: <br />
<br />
$ ecryptfs-insert-wrapped-passphrase-into-keyring /home/username/.ecryptfs/wrapped-passphrase<br />
Passphrase: <br />
Inserted auth tok with sig [7c5d3dd8a1b49db0] into the user session keyring <br />
<br />
Now the directory can be mounted without the mount helper questions: <br />
$ mount -i /home/username/secret<br />
<br />
and files be placed into the {{ic|secret}} directory. The above two steps are necessary every time to mount the directory manually. <br />
<br />
To unmount it again: <br />
<br />
$ umount /home/username/secret<br />
<br />
To finalize, the preliminary passphrase to wrap the encryption passphrase may be changed: <br />
$ ecryptfs-rewrap-passphrase /home/username/.ecryptfs/wrapped-passphrase<br />
Old wrapping passphrase: <br />
New wrapping passphrase: <br />
New wrapping passphrase (again):<br />
<br />
The un-mounting should also clear the keyring, to check the user's keyring or clear it manually: <br />
$ keyctl list @u<br />
$ keyctl clear @u<br />
<br />
{{Note|One should remember that {{ic|/etc/fstab}} is for system-wide partitions only and should not generally be used for user-specific mounts}}<br />
<br />
===== Auto-mounting =====<br />
<br />
{{Expansion|<br>- this section should be more generic & comprehensive than it is now<br><br />
- make sure it properly fits in with the article structure|section=Major_restructuring/rewrite}}<br />
<br />
An automount of an eCryptfs directory on usr login can be configured using [[pam mount]] with the added benefit that the directory is un-mounted when all sessions are logged out. Add the following lines to {{ic|/etc/security/pam_mount.conf.xml}}:<br />
<br />
<luserconf name=".pam_mount.conf.xml" /><br />
<mntoptions require="" /> <!-- Default required mount options are ; this clears them --><br />
<lclmount>mount -i %(VOLUME) "%(before=\"-o\" OPTIONS)"</lclmount> <!-- --><br />
<br />
Please prefer writing manually these lines instead of simply copy/pasting them (especially the lclmount line), otherwise you might get some corrupted characters.<br />
Explanation:<br />
* the first line indicates where the user-based configuration file is located (here {{ic|~/.pam_mount.conf.xml}}) ;<br />
* the second line overwrites the default required mount options which are unnecessary ("nosuid,nodev") ;<br />
* the last line indicates which mount command to run (eCryptfs needs the {{Ic|-i}} switch).<br />
<br />
Then set the volume definition, preferably to {{ic|~/.pam_mount.conf.xml}}:<br />
<pam_mount><br />
<volume noroot="1" fstype="ecryptfs" path="/home/user/.secret/" mountpoint="/home/user/secret/"/><br />
</pam_mount><br />
<br />
"noroot" is needed because the encryption key will be added to the user's keyring<br />
<br />
Finally, edit {{ic|/etc/pam.d/login}} as described in [[pam_mount]]'s article.<br />
<br />
====== Optional step ======<br />
<br />
To avoid wasting time needlessly unwrapping the passphrase you can create a script that will check ''pmvarrun'' to see the number of open sessions:<br />
#!/bin/sh<br />
#<br />
# /usr/local/bin/doecryptfs<br />
<br />
exit $(/usr/sbin/pmvarrun -u$PAM_USER -o0)<br />
<br />
With the following line added before the eCryptfs unwrap module in your PAM stack:<br />
auth [success=ignore default=1] pam_exec.so quiet /usr/local/bin/doecryptfs<br />
auth required pam_ecryptfs.so unwrap<br />
The article suggests adding these to {{ic|/etc/pam.d/login}}, but the changes will need to be added to all other places you login, such as {{ic|/etc/pam.d/kde}}.<br />
<br />
== Usage ==<br />
<br />
{{Expansion|Content that still needs to be covered:<br />
- point to the above "Setup & Mounting" section for how to mount and unmount [this section here will cover all other (i.e. setup-independent) usage info]<br><br />
- reference ecryptfs tools not used/mentioned in the prior sections (e.g. with a short link to the online manpages and mention of the other tools usage, as it seems useful (not covered yet are, e.g. ecryptfs-stat, ecryptfs-find, ecryptfs-rewrite-file.) <br><br />
- mention the options to share an encrypted folder between users and to place non-encrypted files or folders in the encrypted container ("pass-through")<br />
|section=Major_restructuring/rewrite}}<br />
<br />
=== Symlinking into the encrypted directory ===<br />
<br />
Besides using your private directory as storage for sensitive files, and private data, you can also use it to protect application data. [[Firefox]] for example has an internal password manager, but the browsing history and cache can also be sensitive. Protecting it is easy:<br />
$ mv ~/.mozilla ~/Private/mozilla<br />
$ ln -s ~/Private/mozilla ~/.mozilla<br />
<br />
=== Removal of encryption ===<br />
<br />
There are no special steps involved, if you want to remove your private directory. Make sure it is un-mounted and delete the respective lower directory (e.g. {{ic|~/.Private}}), along with all the encrypted files. After also removing the related encryption signatures and configuration in {{ic|~/.ecryptfs}}, all is gone. <br />
<br />
If you were [[#Using the Ubuntu tools]] to setup a single directory encryption, you can directly follow the steps detailed by: <br />
<br />
$ ecryptfs-setup-private --undo<br />
<br />
and follow the instructions.<br />
<br />
=== Backup ===<br />
<br />
If you want to move a file out of the private directory just move it to the new destination while {{ic|~/Private}} is mounted. <br />
<br />
With eCryptfs the cryptographic metadata is stored in the header of the files. Setup variants explained in this article separate the directory with encrypted data from the mount point. The unencrypted mount point is fully transparent and available for a backup. Obviously this has to be considered for automated backups, if one has to avoid leaking sensitive unencrypted data into a backup. <br />
<br />
You can do backups, or incremental backups, of the encrypted (e.g. {{ic|~/.Private}}) directory, treating it like any other directory. <br />
<br />
Further points to note: <br />
<br />
* If you used the Ubuntu tools for [[#Encrypting a home directory]], be aware the location of the lower directory with the encrypted files is ''outside'' the regular user's {{ic|$HOME}} at {{ic|/home/.ecryptfs/$USER/.Private}}. <br />
<br />
* It should be ensured to include the eCryptfs setup files (located in {{ic|~/.ecryptfs}} usually) into the regular or a separate backup.<br />
<br />
* If you use special filesystem mount options, for example {{ic|ecryptfs_xattr}}, do extra checks on restore integrity.<br />
<br />
== See Also ==<br />
<br />
* [http://ecryptfs.org/documentation.html eCryptfs] - Manpages and project home <br />
* [https://defuse.ca/audits/ecryptfs.htm Security audit] of eCryptfs by Taylor Hornby (January 22, 2014).<br />
* [http://sysphere.org/~anrxc/j/articles/ecryptfs/index.html eCryptfs and $HOME] by Adrian C. (anrxc) - Article with installation instructions and discussion of eCryptfs usage <br />
* [http://www.chromium.org/chromium-os/chromiumos-design-docs/protecting-cached-user-data Chromium data protection] (November 2009) - Design document detailing encryption options for Chromium OS, including explanation on its eCryptfs usage<br />
* [http://ecryptfs.sourceforge.net/ecryptfs.pdf eCryptfs design] by Michael Halcrow (May 2005) - Original design document detailing and discussing eCryptfs</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=User_talk:Mathieui&diff=359052User talk:Mathieui2015-02-01T17:10:33Z<p>Sudowoodo: /* My patch */ new section</p>
<hr />
<div>== My patch ==<br />
<br />
Hello, I'm the user who had written that mistaken patch on [[Dolphin emu]]'s page.<br />
<br />
I am sorry for any possible trouble it caused. It was meant to fix a problem I have in Dolphin, where it segfaults randomly. It didn't work for me, but I found it on a forum, and thought I should include it in the page to see if other users benefit or not. Please see [http://forums.fedoraforum.org/showthread.php?t=259904 this Fedora forum post] (not posted by me) for the original source. I think there might be a connection to these bug reports: [https://code.google.com/p/dolphin-emu/issues/detail?id=4357] [https://code.google.com/p/dolphin-emu/issues/detail?id=4073].<br />
<br />
Again, sorry for the trouble. [[User:Sudowoodo|Sudowoodo]] ([[User talk:Sudowoodo|talk]]) 17:10, 1 February 2015 (UTC)</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=User_talk:Junrrein&diff=359051User talk:Junrrein2015-02-01T17:08:39Z<p>Sudowoodo: /* My patch */ removed, sorry</p>
<hr />
<div>== <s>My patch</s> ==<br />
Oh, sorry, wrong user page...<!--I am such an idiot.--> [[User:Sudowoodo|Sudowoodo]] ([[User talk:Sudowoodo|talk]]) 17:08, 1 February 2015 (UTC)</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=User_talk:Junrrein&diff=359050User talk:Junrrein2015-02-01T17:04:47Z<p>Sudowoodo: /* My patch */ new section</p>
<hr />
<div>== My patch ==<br />
<br />
Hello, I'm the user who had written that mistaken patch on [[Dolphin emu]]'s page.<br />
<br />
I am sorry for any possible trouble it caused. It was meant to fix a problem I have in Dolphin, where it segfaults randomly. It didn't work for me, but I found it on a forum, and thought I should include it in the page to see if other users benefit or not. Please see [http://forums.fedoraforum.org/showthread.php?t=259904 this Fedora forum post] (not posted by me) for the original source. I think there might be a connection to these bug reports: [https://code.google.com/p/dolphin-emu/issues/detail?id=4357] [https://code.google.com/p/dolphin-emu/issues/detail?id=4073].<br />
<br />
Again, sorry for the trouble. [[User:Sudowoodo|Sudowoodo]] ([[User talk:Sudowoodo|talk]]) 17:04, 1 February 2015 (UTC)</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Talk:Arch_is_the_best&diff=357706Talk:Arch is the best2015-01-23T09:29:09Z<p>Sudowoodo: /* Greek translations */ new section</p>
<hr />
<div>== pygtk implementation ==<br />
<br />
Do you think a GTK implementation in Python would be a bit long to add to the article? Here it is:<br />
<br />
#!/usr/bin/python<br />
<br />
import pygtk<br />
pygtk.require('2.0')<br />
import gtk<br />
import random<br />
<br />
class ArchIsTheBest:<br />
def __init__(self):<br />
window = gtk.Window(gtk.WINDOW_TOPLEVEL)<br />
window.set_title("Arch is the best!")<br />
window.set_size_request(500,250)<br />
window.connect("delete_event", self.delete_event)<br />
window.connect("destroy", self.destroy)<br />
<br />
vbox = gtk.VBox(False, 0)<br />
window.add(vbox)<br />
vbox.show()<br />
<br />
textview = gtk.TextView(buffer=None)<br />
textviewb = textview.get_buffer()<br />
textviewt = "Arch is the best"<br />
textviewb.set_text(textviewt)<br />
textview.set_editable(False)<br />
textview.set_cursor_visible(False)<br />
textview.set_wrap_mode(True)<br />
vbox.pack_start(textview, True, True, 0)<br />
textview.show()<br />
<br />
button = gtk.Button(stock=gtk.STOCK_CLOSE)<br />
button.connect("clicked", lambda w: gtk.main_quit())<br />
vbox.pack_start(button, False, False, 0)<br />
button.set_flags(gtk.CAN_DEFAULT)<br />
button.grab_default()<br />
button.show()<br />
<br />
window.show()<br />
<br />
def delete_event(self, widget, event, data=None):<br />
return False<br />
<br />
def destroy(self, widget, data=None):<br />
gtk.main_quit()<br />
<br />
def main(self):<br />
gtk.main()<br />
<br />
if __name__ == "__main__":<br />
archisthebest = ArchIsTheBest()<br />
archisthebest.main()<br />
<br />
Also, is it possibly violating The Arch Way by providing a GUI to this application? I think it may just entice those Ubuntu users to jump ship to Arch if we provide this as a GUI, however it is definitely not 'simple'.<br />
[[User:Barrucadu|Barrucadu]] 19:25, 13 May 2008 (EDT)<br />
<br />
Whilst the [https://bbs.archlinux.org/viewtopic.php?id=47306&p=1/ forum thread] relating to this is fun, this page does not add anything meaningful to the Arch wiki, and I don't see how this page adheres to the wiki philosophy or Arch principles (KISS minimalism). Have flagged this page for deletion.<br />
[[User:Joetotale|Joetotale]] 05:42, 9 January 2011 (EST)<br />
<br />
:I agree. I marked it for deletion some time ago, and didn't really feel like pursuing the subject because it would've been an exchange involving a grand total of 2 people.<br />
:There's always some truth to irony, and 'Arch is the best' is implicit enough to survive undetected under the reach of armchair psychology! [[User:Lavandero|Lavandero]] 18:32, 10 January 2011 (EST)<br />
<br />
::I DISagree ^_^. This is an interesting and fun project, and causes no harm for being here. Not only was the page created by an Arch developer, deletion has been removed before by a WIKI ADMIN "(unmarking for deletion (no rationale -- I think this is clever); marked for expansion; categorized)" I should probably put back on the expansion template. Enjoy life, have fun, don't hate on fun. [[User:Jmad980|Jmad980]] 21:27, 2 February 2011 (EST)<br />
<br />
:::^_________^ [[User:Lavandero|Lavandero]] 22:06, 2 February 2011 (EST)<br />
<br />
== Klingon ==<br />
We need it in klingon language!!<br />
<br />
::Done, maybe I writting incorrectly but in theory I use: Arch + Perfection + augmentative, aka 'Arch is more than perfect'--[[user:Jristz|Jristz]] 06:12, 21 September 2013 (UTC)<br />
<br />
== Brithenig ==<br />
Iso code brz, We need brithenig to e perfect--[[user:Jristz|Jristz]] 06:12, 21 September 2013 (UTC)<br />
<br />
== New heading ==<br />
<br />
Sounds lovely. --'''<span style="text-shadow:grey 0.1em 0.1em 0.1em; font-size:110%">[[User:Det|<span style="color:gold">D</span><span style="color:orange">e</span><span style="color:red">t</span>]][[User talk:Det|<sup><font color="white">talk</font></sup>]]</span>''' 22:22, 20 March 2014 (UTC)<br />
<br />
== Greek translations ==<br />
<br />
We currently have [[wikipedia:Attic Greek|Attic]] and [[wikipedia:Demotic Greek|Demotic]].<br />
<br />
I think more translations should be added, such as [[wikipedia:Katharevousa|Katharevousa]], [[wikipedia:Pontic Greek|Pontic]] or any local dialect. Speakers are few nowadays, so if anyone can contribute, please do. [[User:Sudowoodo|Sudowoodo]] ([[User talk:Sudowoodo|talk]]) 09:29, 23 January 2015 (UTC)</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Arch_is_the_best&diff=357705Arch is the best2015-01-23T09:15:55Z<p>Sudowoodo: /* Translations */</p>
<hr />
<div>[[Category:About Arch]]<br />
[[Category:Programming language]]<br />
[[ja:Arch_is_the_best]]<br />
[[ru:Arch_is_the_best]]<br />
The '''Arch is the best''' project is a very sophisticated and exquisite, ego-boosting and mind-blowing (albeit perhaps a bit over-engineered) project which gives proof of Arch's superiority.<br />
<br />
== History ==<br />
<br />
The visionary project was originally devised in April 2008 by long time Arch community member [https://bbs.archlinux.org/profile.php?id=2529 lucke] as a simple shell script which provided irrefutable proof that "Arch is the best". It was announced to the world with a [https://bbs.archlinux.org/viewtopic.php?id=47306 forum post], thus illuminating other people's minds, who immediately started porting it to multiple different languages, both programming and verbal, so that every human being on the planet could fully appreciate and benefit from this revolutionary discovery.<br />
<br />
== Installation ==<br />
<br />
A sample PKGBUILD called {{AUR|archbest-mod1}} has been uploaded to [[AUR]].<br />
<br />
== The code ==<br />
<br />
The "Arch is the best" project is ported to many programming languages.<br />
<br />
'''Ada''' - A systems critical programming language.<br />
with Ada.Text_IO;<br />
use Ada.Text_IO;<br />
procedure ArchIsTheBest is<br />
begin<br />
Put_Line("Arch is the best!");<br />
end HelloWorld;<br />
<br />
'''APL''' - A Programming Language.<br />
'Arch is the best!'<br />
<br />
'''ATS''' - A functional programming language that uses dependent types to improve programs' reliability.<br />
implement main () = println! "Arch is the best!"<br />
<br />
'''Awk''' - A data-driven programming language designed for processing text-based data.<br />
BEGIN {<br />
print "Arch is the best!"<br />
}<br />
<br />
'''Befunge''' - Believed to be the first two-dimensional, ASCII-based, general-purpose (in the sense of "you could plausibly write Hunt the Wumpus in it") programming language.<br />
<v"Arch is the best!"0<br />
<,_@#:<br />
<br />
'''Boo''' - A stablished object oriented statically typed programming language for .NET and Mono with a python inspired syntax and a special focus on metaprogramming through language and compiler extensibility features such as macros and custom compilation pipelines.<br />
print "Arch is the best!"<br />
<br />
'''Bourne shell''' - The original program, should be compatible with any shell.<br />
#!/bin/sh<br />
echo "Arch is the best!"<br />
<br />
<br />
'''Bourne shell (Alternate)''' - Handy for piping the output to your favourite IRC/email/IM client. Should work with any shell.<br />
#!/bin/sh<br />
yes Arch is the best!<br />
<br />
<br />
'''Bourne shell (Dynamically updated)'''<br />
<pre style='overflow:auto'><br />
#!/bin/bash<br />
wget http://wiki.archlinux.org/index.php/Arch_is_the_best -qO-| sed -n ':b;n;s/id="Translations"//;Tb;:d;n;s/id="Encodings"//;t;p;bd'|sed '/<i>.*<\/i>/d;s/<[^>]*>//g'|sed 'N;s/\n/: /;N;N;s/\n//g'<br />
</pre><br />
<br />
or<br />
<br />
<pre style='overflow:auto'><br />
#!/bin/bash<br />
curl -s "https://wiki.archlinux.org/index.php?title=Arch_is_the_best&action=raw" | sed -n '/==Translations==/,$p' | sed "s/^'''\(.*\)'''$/* \1:/;t;s/^[^=]/ &/"<br />
</pre><br />
<br />
'''brainfuck''' - Doesn't the language name explain it?<br />
++>++++++>+++++<+[>[->+<]<->++++++++++<]>>.<[-]>[-<++>]<br />
<----------------.---------------.+++++.<+++[-<++++++++++>]<.<br />
>>+.++++++++++.<<.>>+.------------.---.<<.>>---.<br />
+++.++++++++++++++.+.<<+.[-]++++++++++.<br />
<br />
<br />
'''C''' - Note the three space indenting used in this project, much like that used by other superior beings.<br />
#include <stdio.h><br />
#include <stdlib.h><br />
int main(void) <br />
{<br />
puts("Arch is the best!");<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
<br />
'''C#''' - Intended to be a simple, modern, general-purpose, object-oriented programming language.<br />
using System;<br />
public class ArchIsTheBest<br />
{<br />
static public void Main ()<br />
{<br />
Console.WriteLine ("Arch is the best!");<br />
}<br />
}<br />
<br />
<br />
'''C++''' - Arch == Linux++<br />
#include <iostream><br />
#include <cstdlib><br />
int main ()<br />
{<br />
std::cout << "Arch is the best!" << std::endl;<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
<br />
'''COBOL''' - A simple, lightweight programming language.<br />
IDENTIFICATION DIVISION.<br />
PROGRAM-ID. TheBest.<br />
<br />
PROCEDURE DIVISION.<br />
DISPLAY "Arch is the best!".<br />
STOP RUN.<br />
<br />
<br />
'''CoffeeScript''' - A programming language that transcompiles to JavaScript.<br />
alert 'Arch is the best!'<br />
<br />
<br />
'''Clojure''' - A Lisp dialect that runs on the JVM.<br />
(def translations {"english" "Arch is the best!",<br />
"german" "Arch ist das Beste!",<br />
"australian" "Arch is fair dinkum, mate!",<br />
"h4x0r" "arhc 51 7he be57!",<br />
"spanish" "¡Arch es el mejor!"})<br />
<br />
(defn read-choice []<br />
(println "\nAvailable languages: ")<br />
(doall (map #(println (key %)) translations))<br />
(print "Enter language or Ctrl-c: ") (flush)<br />
(translations (read-line) :badinput))<br />
<br />
(defn arch-is-the-best []<br />
(loop [choice (read-choice)]<br />
(case choice<br />
:badinput (do (print "\nBad input!\n")<br />
(recur (read-choice)))<br />
(do (print "\n" choice "\n")<br />
(recur (read-choice))))))<br />
or<br />
(def translations {"english" "Arch is the best!",<br />
"german" "Arch ist das Beste!",<br />
"australian" "Arch is fair dinkum, mate!",<br />
"h4x0r" "arhc 51 7he be57!",<br />
"spanish" "¡Arch es el mejor!"<br />
"street" "Arch iz da shizzle ma nizzle"})<br />
(while 1<br />
(println "\nPick a language:\n" (map #(key %) translations) "\n language: ")<br />
(println (translations (read-line) "Not a valid language")))<br />
<br />
<br />
or<br />
(prn "Arch is the best!")<br />
<br />
'''Common Lisp''' - Tested on SBCL, feel free to add more of the translations.<br />
#!/usr/bin/sbcl --script<br />
(defparameter *best-list* '((English "Arch is the best!")<br />
(Chinese "Arch, 她出类拔萃!")<br />
(German "Arch ist das Beste!")<br />
(Greek "Το Arch είναι το καλύτερο!")))<br />
(defun aitb ()<br />
(format t "Available languages: ~{~{~@(~a~)~*~}~^, ~}.~%" *best-list*)<br />
(loop for input = (progn (format t "~&Input the desired language, (or 'quit'): ~%")<br />
(force-output)<br />
(read-line))<br />
if (string-equal input "quit")<br />
do (loop-finish)<br />
else<br />
do (let ((language-def<br />
(assoc input *best-list*<br />
:key (lambda (lang) (symbol-name lang))<br />
:test #'string-equal)))<br />
(if language-def<br />
(format t "~&~A~%" (second language-def))<br />
(format t "~&Invalid language.~%"))))<br />
(format t "~&May the Arch be with you!~%"))<br />
(aitb)<br />
<br />
<br />
'''Common Lisp (Alternate)''' - Should run on any implementation (Clisp, Allegro, SBCL...)<br />
(princ "Arch is the best!")<br />
<br />
<br />
'''D''' - A C-style language. The benefits of hindsight, with modern conveniences.<br />
import std.stdio : writeln;<br />
void main()<br />
{<br />
writeln("Arch is the best");<br />
}<br />
<br />
<br />
'''Dart''' - Google's javascript killer<br />
main(){<br />
print('Arch is the best');<br />
}<br />
<br />
'''Emacs Lisp''' - A dialect of the Lisp programming language used by the GNU Emacs and XEmacs text editors <br />
(message "Arch is the best!")<br />
<br />
<br />
'''Erlang''' - A concurrent, garbage-collected programming language and runtime system.<br />
-module(arch).<br />
-export([is_the_best/0]).<br />
is_the_best() -> io:fwrite("Arch is the best!\n").<br />
<br />
Or using message passing between processes<br />
<br />
-module(arch).<br />
-export([ultimate_question/0,the_answer/0]).<br />
the_answer() -><br />
receive<br />
{Client,who_is_the_best} -><br />
Client ! {self(),"Arch is the best!"};<br />
{Client,_} -><br />
Client ! {self(),"Taco Taco Taco!"}<br />
end,<br />
the_answer().<br />
ultimate_question() -><br />
Pid = spawn(arch,the_answer,[]),<br />
Pid ! {self(),who_is_the_best},<br />
receive<br />
{Pid,Response} -> io:format("~s~n",[Response])<br />
end.<br />
<br />
'''F#''' - A strongly-typed, functional-first programming language for writing simple code to solve complex problems.<br />
printfn "Arch is the best!"<br />
<br />
'''Factor''' - High-level stack-based language.<br />
"Arch is the best" print<br />
<br />
'''FIM++''' - A wordy, imperative, dynamically-typed, and interpreted language that can use Java classes.<br />
Dear Princess Celestia: Letter About Arch Linux.<br />
Today I learned:<br />
I wrote "Arch is the best!".<br />
Your faithful student, Twilight Sparkle<br />
<br />
'''Forth''' - Stack-based language.<br />
." Arch is the best" cr -- kiss way<br />
<br />
'''Fortran95'''<br />
program arch<br />
print *,"Arch is the best!"<br />
end program arch<br />
<br />
'''Genie''' - A new programming language, that allows for a more modern programming style while being able to effortlessly create and use GObjects natively. <br />
init<br />
print "Arch is the best"<br />
<br />
<br />
'''Gjs''' - A Javascript binding for GNOME. It's mainly based on Spidermonkey javascript engine and the GObject introspection framework.<br />
#!/usr/bin/env gjs<br />
print ('Arch is the best');<br />
<br />
<br />
'''Go''' - A language created by Google that's a love child between C, C++ and Python.<br />
package main<br />
<br />
import "fmt"<br />
<br />
func main() {<br />
fmt.Println("Arch is the best!")<br />
}<br />
<br />
<br />
'''Haskell''' - The language where IO is easy and unproblematic.<br />
main = putStrLn "Arch is the best!"<br />
<br />
<br />
'''HTML''' - A markup language used to create and define web pages and their content.<br />
<pre><br />
<!DOCTYPE html><br />
<html lang='en'><br />
<head><br />
<title>Arch is the best!</title><br />
</head><br />
<body><br />
<p>Arch is the best!</p><br />
</body><br />
</html><br />
</pre><br />
<br />
'''Io''' - A pure object-oriented programming language inspired by Smalltalk, Self, Lua, Lisp, Act1, and NewtonScript.<br />
"Arch is the best!" println<br />
<br />
<br />
'''Java''' - An extremely portable language, this will run on pretty much anything, it might even run on your toaster!<br />
public class ArchIsTheBest {<br />
public static void main(String[] args) {<br />
System.out.println("Arch is the best!");<br />
}<br />
}<br />
<br />
<br />
'''JavaScript''' - Also known as ECMAScript, a prototype-based object-oriented scripting language. <br />
console.log('Arch is the best!');<br />
<br />
<br />
'''JavaScript (in a web browser)'''<br />
alert('Arch is the best!');<br />
<br />
<br />
'''LilyPond''' - A powerful music engraving program with an intuitive LaTeX-like input language.<br />
\version "2.12.3"<br />
\include "english.ly"<br />
\header { title = "Arch is the best!" }<br />
\score<br />
{<br />
<<<br />
\relative c' { c4 e g c \bar "||" }<br />
\addlyrics { Arch is the best! }<br />
>><br />
}<br />
<br />
<br />
'''LOLCODE''' - Why not?<br />
HAI<br />
CAN HAS STDIO?<br />
VISIBLE "ARCH IS TEH PWNZ LOL!"<br />
KTHXBYE<br />
<br />
<br />
'''Lua''' - A lightweight, extensible programming language.<br />
print "Arch is the best!"<br />
<br />
'''Morpho''' - Morpho is a multi-paradigm programming language that supports procedural, object-oriented and functional programming. <br />
<br />
writeln("Arch is the best!");<br />
<br />
<br />
'''Nasm(x86_64) (or yasm)''' - Notice that the string is in the .text section, which feels superior<br />
<br />
;nasm -f elf64 arch.asm<br />
;ld -o arch arch.o<br />
;./arch<br />
<br />
section .text<br />
global _start<br />
_start:<br />
mov edx,len<br />
mov ecx,msg<br />
mov ebx,1<br />
mov eax,4<br />
int 0x80<br />
xor ebx,ebx<br />
mov eax,1<br />
int 0x80<br />
msg: db "Arch is the best!",10<br />
len equ $-msg<br />
<br />
<br />
'''Nimrod''' - Portable lightweight programming language.<br />
echo "Arch is the best!"<br />
<br />
<br />
'''node.js''' - a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications, using an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.<br />
console.log('Arch is the best!');<br />
<br />
<br />
'''Objective-C''' - A reflective, object-oriented programming language that adds Smalltalk-style messaging to the C programming language.<br />
NSLog(@"Arch is the best!");<br />
<br />
<br />
'''OCaml''' - The main implementation of the Caml programming language.<br />
print_endline "Arch is the best!"<br />
<br />
'''Octave''' - High-level interpreted language, primarily intended for numerical computations.<br />
printf("Arch is the best!\n")<br />
<br />
'''Ook!''' - brainfuck, translated to Orangutan<br />
Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook! Ook? Ook. Ook? Ook! Ook? Ook! Ook! Ook. Ook? Ook. Ook. Ook? Ook. Ook? Ook! Ook? Ook. Ook! Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook? Ook! Ook. Ook? Ook. Ook? Ook! Ook. Ook? Ook. Ook! Ook? Ook! Ook! Ook? Ook! Ook. Ook? Ook! Ook? Ook! Ook! Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook! Ook! Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook? Ook! Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook! Ook. Ook! Ook? Ook! Ook! Ook? Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook.<br />
<br />
<br />
'''Pascal''' - An influential imperative and procedural programming language.<br />
program ArchIsTheBest;<br />
begin<br />
writeln('Arch is the best!');<br />
end.<br />
<br />
<br />
'''Perl''' - A high-level, general-purpose, interpreted, dynamic programming language.<br />
#!/usr/bin/perl<br />
print "Arch is the best!\n";<br />
<br />
<br />
'''PHP''' - A general-purpose scripting language.<br />
<?php<br />
echo "Arch is the best!\n";<br />
?> <br />
<br />
<br />
'''Pixilang''' - Make me pixels.<br />
print("Arch is the best!",0,0,#1897D1)<br />
frame<br />
<br />
<br />
'''Portable GNU assembler''' - as -o arch.o arch.s && ld -o arch -O0 arch.o<br />
<br />
.section .data<br />
archIsBest: <br />
.ascii "Arch is the best!\n"<br />
archIsBest_len:<br />
.long . - archIsBest<br />
.section .text<br />
.globl _start<br />
_start:<br />
xorl %ebx, %ebx<br />
movl $4, %eax <br />
xorl %ebx, %ebx<br />
incl %ebx <br />
leal archIsBest, %ecx<br />
movl archIsBest_len, %edx <br />
int $0x80 <br />
xorl %eax, %eax<br />
incl %eax<br />
xorl %ebx, %ebx <br />
int $0x80<br />
<br />
<br />
'''Processing''' - An open source programming language and IDE built for the electronic arts and visual design.<br />
println("Arch is the best!");<br />
<br />
<br />
'''Prolog''' - A general purpose logic programming language associated with artificial intelligence and computational linguistics.<br />
format('Arch is the best~n',[]).<br />
<br />
<br />
'''Python''' - A general-purpose high-level programming language.<br />
#!/usr/bin/env python3<br />
print('Arch is the best!')<br />
<br />
<br />
'''QBASIC''' - An interpreter for a variant of the BASIC programming language which is based on QuickBASIC.<br />
PRINT "Arch is the best!"<br />
<br />
<br />
'''R''' - A language for statistical computing (and much more!).<br />
archIsBest <- function() { cat("Arch is the best!\n") }<br />
archIsBest()<br />
<br />
<br />
'''Ruby''' - A dynamic, reflective, general purpose object-oriented programming language.<br />
#!/usr/bin/ruby -w<br />
puts 'Arch is the best!'<br />
<br />
<br />
'''Rust''' - Rust is a systems programming language that runs blazingly fast, prevents almost all crashes, and eliminates data races. <br />
fn main() {<br />
println!("Arch is the best!");<br />
}<br />
<br />
<br />
'''Scala''' - A multi paradigm language that runs on the JVM<br />
object ArchIsBest extends App {<br />
println("Arch is the best!")<br />
} <br />
<br />
<br />
<br />
'''Scheme''' - A dialect of Lisp.<br />
(display "Arch is the best!\n")<br />
or in XunDu style<br />
#!/usr/bin/guile1.8 -s<br />
!#<br />
(define 节 or)<br />
(define 哀 #t)<br />
(define (xi) (display "Arch is the best!\n"))<br />
(节 (xi) 哀 (wen) 顺 (le) 变 (jian) )<br />
<br />
<br />
'''Seed''' - A library and interpreter, dynamically bridging the WebKit JavaScriptCore engine, with the GNOME platform.<br />
#!/usr/bin/env seed<br />
print ('Arch is the best');<br />
<br />
<br />
'''Shoes''' - A Ruby version using Shoes for a GUI<br />
Shoes.app :width => 135, :height => 30 do <br />
para "Arch is the Best!"<br />
end<br />
<br />
<br />
'''SQL''' - Structured Query Language, the query language for relational databases<br />
SELECT 'Arch is the best!';<br />
SELECT 'Arch is the best!' from dual; -- for Oracle DB<br />
<br />
<br />
'''Standard ML''' - A general-purpose, modular, functional programming language with compile-time type checking and type inference.<br />
print "Arch is the best!\n"<br />
<br />
<br />
'''Tcl/Tk''' - A scripting language that is commonly used for rapid prototyping, scripted applications, GUIs and testing.<br />
#!/usr/bin/env tclsh<br />
puts "Arch is the best!"<br />
<br />
<br />
'''Vala''' - Vala is a new programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C<br />
void main(string[] args) {<br />
stdout.printf("\nArch is the best!\n\n");<br />
}<br />
<br />
<br />
''' Wiring (Arduino)''' - Built on Processing, the open source programming language developed at the Massachusetts Institute of Technology.<br />
void setup() <br />
{<br />
Serial.begin(9600); <br />
}<br />
void loop() <br />
{ <br />
Serial.print("Arch is the best!");<br />
}<br />
<br />
<br />
''' X11 ''' - X11 is an architecture independent system for display of graphical user interfaces.<br />
#include <stdio.h><br />
#include <stdlib.h><br />
#include <string.h><br />
<br />
#include <X11/Xlib.h><br />
<br />
int main()<br />
{<br />
Display *d;<br />
Window w;<br />
XEvent e;<br />
int s;<br />
<br />
if (!(d = XOpenDisplay(NULL))) {<br />
fprintf(stderr, "Couldn't open display, but Arch is the best!\n");<br />
exit(1);<br />
}<br />
<br />
s = DefaultScreen(d);<br />
w = XCreateSimpleWindow(d, RootWindow(d,s), 0, 0, 110, 20, 0, <br />
0, WhitePixel(d,s));<br />
XSelectInput(d, w, ExposureMask | KeyPressMask);<br />
XMapWindow(d,w);<br />
<br />
while (1) {<br />
XNextEvent(d, &e);<br />
if (e.type == Expose) {<br />
XDrawString(d, w, DefaultGC(d, s), 5, 15, "Arch is the best!", 17);<br />
}<br />
}<br />
<br />
XCloseDisplay(d);<br />
return 0;<br />
}<br />
<br />
==Translations==<br />
<br />
'''Ancient Chinese'''<br />
阿祺,盡善矣。<br />
<br />
'''Ancient Greek (Attic)'''<br />
Ἡ Ἀψίς ἄριστην ἐστί!<br />
<br />
'''Arabic'''<br />
ارتش هو الأفضل<br />
<br />
'''Australian'''<br />
Arch is fair dinkum, mate!<br />
<br />
'''Bahasa Indonesia'''<br />
Arch terbaik!<br />
<br />
'''Basque'''<br />
Arch onena da!<br />
<br />
'''Belarusian'''<br />
Арч - самы лепшы!<br />
<br />
'''Bengali'''<br />
আর্চ সবচেয়ে ভালো!<br />
<br />
'''British'''<br />
Arch is simply spiffing.<br />
<br />
'''Bulgarian'''<br />
Арч е най-добрият!<br />
<br />
'''Catalan'''<br />
Arch és el millor!<br />
<br />
'''Chinese (Simplified)'''<br />
Arch 最棒了!<br />
<br />
'''Chinese (Traditional)'''<br />
Arch 好棒棒!<br />
<br />
'''Chinese (Taobao Style - 淘宝体)'''<br />
Arch,好评哦,亲!<br />
<br />
'''Czech'''<br />
Arch je nejlepší!<br />
<br />
'''Croatian'''<br />
Arch je najbolji!<br />
<br />
'''Danish'''<br />
Arch er bedst!<br />
<br />
'''Dutch'''<br />
Arch is de beste!<br />
<br />
'''Esperanto'''<br />
Arch plejbonas!<br />
<br />
'''Estonian'''<br />
Arch on parim!<br />
<br />
'''Fikonspråket'''<br />
Firch Arkon fir äkon fist bäkon<br />
<br />
'''Filipino'''<br />
Mabuhay ang Arch!<br />
<br />
'''Finnish'''<br />
Arch on paras!<br />
<br />
'''French'''<br />
Arch est le meilleur!<br />
<br />
'''Galician'''<br />
Arch é o mellor!<br />
<br />
'''German'''<br />
Arch ist das Beste!<br />
<br />
'''Greek (Modern)'''<br />
Το Αρτς είναι το καλύτερο!<br />
<br />
'''Haitian Creole'''<br />
Arch se meye bagay!<br />
<br />
'''Hantec'''<br />
Arch je nejbetélnější!<br />
<br />
'''Hebrew'''<br />
ארצ' זה הכי אחי!<br />
<br />
'''Hindi'''<br />
आर्च सर्वोत्तम है ।<br />
<br />
'''Hungarian'''<br />
Az Arch a legjobb!<br />
<br />
'''Irish'''<br />
Arch é is fearr!<br />
<br />
'''Italian'''<br />
Arch è il migliore!<br />
<br />
'''Japanese'''<br />
Archが一番ですよ!<br />
<br />
'''Kazakh'''<br />
Арч - ең жақсы!<br />
<br />
'''Klingon'''<br />
Arch'pu'ta' 'a'<br />
<br />
'''Latin'''<br />
Arch optimus est!<br />
<br />
'''Latvian'''<br />
Arch ir labākais!<br />
<br />
'''Lithuanian'''<br />
Arch yra geriausias!<br />
<br />
'''Lojban'''<br />
la .artc. xagrai<br />
<br />
'''Malayalam'''<br />
ആർച് ആണ് ഏറ്റവും നല്ലത് <br />
<br />
'''Marathi'''<br />
आर्च सगळ्यात भारी आहे!<br />
<br />
'''Nepali'''<br />
आर्च सबैभन्दा राम्रो हो!<br />
<br />
'''Norwegian'''<br />
Arch er best!<br />
<br />
'''Old English'''<br />
Arch biþ betst!<br />
<br />
'''Persian'''<br />
آرچ بهترین است<br />
<br />
'''Pig Latin'''<br />
Archway isway ethay estbay!<br />
<br />
'''Polish'''<br />
Arch jest najlepszy!<br />
<br />
'''Portuguese'''<br />
Arch é o melhor!<br />
<br />
'''Québécois'''<br />
Arch est le plus meilleure du monde!<br />
<br />
'''Romanian'''<br />
Аrch e cel mai bun!<br />
<br />
'''Russian'''<br />
Арч — лучший!<br />
<br />
'''Serbian'''<br />
Arch je najbolji!<br />
<br />
'''Singaporean'''<br />
Arch the best lah!<br />
<br />
'''Slovenian'''<br />
Arch je najboljši!<br />
<br />
'''Spanish (Standard)'''<br />
¡Arch es el mejor!<br />
<br />
'''Spanish (Argentina)'''<br />
Arch es una mazza!!<br />
<br />
'''Spanish (Chile)'''<br />
Arch es bacán<br />
<br />
'''Spanish (Chile, alternative)'''<br />
Arch es la raja<br />
<br />
'''Spanish (Chile, marginal)'''<br />
(written in IPA because standard Spanish doesn't have these sounds)<br />
ˈæɹʃ ɛːʰ tɜ.rˈiː.u.lɛ la rˈa.χa ʃʊ.ɹʊ<br />
<br />
'''Spanish (Uruguay)'''<br />
Arch la rompe!<br />
<br />
'''Swedish'''<br />
Arch är bäst!<br />
<br />
'''Turkish'''<br />
Arch en iyisidir!<br />
<br />
'''Tamil'''<br />
ஆர்ச்சே சிறந்தது!<br />
<br />
'''Telugu'''<br />
ఆర్చ్ ఉత్తమమైనది!<br />
<br />
'''Toki Pona'''<br />
Arch li pona mute!<br />
<br />
'''Ukrainian'''<br />
Arch є найкращий!<br />
<br />
'''Urdu'''<br />
آرچ سب سے بہتر ہے! <br />
<br />
'''Vietnamese'''<br />
Arch là tốt nhất!<br />
<br />
'''Welsh (Cymraeg)'''<br />
<br />
Emphasis on Arch:<br />
Arch sydd yr orau un!<br />
Arch sydd y gorau un!<br />
<br />
Emphasis on being the best (one):<br />
Yr orau un yw Arch!<br />
Y gorau un yw Arch!<br />
<br />
== Encodings ==<br />
<br />
'''ASCII Banner'''<br />
_ _ _ _ _ _ _ <br />
/\ | | (_) | | | | | | | | | |<br />
/ \ _ __ ___| |__ _ ___ | |_| |__ ___ | |__ ___ ___| |_| |<br />
/ /\ \ | '__/ __| '_ \ | / __| | __| '_ \ / _ \ | '_ \ / _ \/ __| __| |<br />
/ ____ \| | | (__| | | | | \__ \ | |_| | | | __/ | |_) | __/\__ \ |_|_|<br />
/_/ \_\_| \___|_| |_| |_|___/ \__|_| |_|\___| |_.__/ \___||___/\__(_)<br />
<br />
<br />
'''Base64'''<br />
QXJjaCBpcyB0aGUgYmVzdCEK<br />
<br />
'''Binary ASCII'''<br />
0100000101110010011000110110100000100000011010010111001100100000011101000110100001100101001000000110001001100101011100110111010000100001<br />
<br />
'''Braille'''<br />
⠁⠗⠉⠓⠀⠊⠎⠀⠮⠀⠃⠑⠎⠞⠲<br />
<br />
'''Desrever (Reversed)'''<br />
!tseb eht si hcrA<br />
<br />
'''h4x0r'''<br />
4rch 15 7h3 b357!<br />
<br />
'''Hexadecimal ASCII'''<br />
4172636820697320746865206265737421<br />
<br />
'''md5sum'''<br />
2d9092e089d77a8e23f47ba3dfe77027<br />
<br />
'''Morse Code'''<br />
.- .-. -.-. .... .. ... - .... . -... . ... -<br />
<br />
'''ROT13'''<br />
Nepu vf gur orfg!<br />
<br />
'''Upside Down'''<br />
¡ʇsǝq ǝɥʇ s! ɥɔɹ∀<br />
<br />
'''URL Encoded'''<br />
Arch%20is%20the%20best!</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=USB_flash_installation_medium&diff=356741USB flash installation medium2015-01-16T15:06:41Z<p>Sudowoodo: I'm a bit late this month. Happy New Year :</p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
[[ar:USB Installation Media]]<br />
[[bg:USB Installation Media]]<br />
[[de:Installation von einem USB-Stick]]<br />
[[es:USB Flash Installation Media]]<br />
[[fr: Créer une clef USB avec l'ISO Arch Linux]]<br />
[[it:USB Installation Media]]<br />
[[ja:USB Installation Media]]<br />
[[ro:Instalare prin USB]]<br />
[[ru:USB flash installation media]]<br />
[[tr:USB_ile_kurulum]]<br />
[[zh-CN:USB flash installation media]]<br />
[[zh-TW:USB Installation Media]]<br />
{{Related articles start}}<br />
{{Related|CD Burning}}<br />
{{Related|Archiso}}<br />
{{Related|Multiboot USB drive}}<br />
{{Related articles end}}<br />
<br />
This page discusses various multi-platform methods on how to create a Arch Linux Installer USB drive (also referred to as ''"flash drive", "USB stick", "USB key"'', etc) for booting in BIOS and UEFI systems. The result will be a LiveUSB (LiveCD-like) system that can be used for installing Arch Linux, system maintenance or for recovery purposes, and that, because of the nature of [[Wikipedia:SquashFS|SquashFS]], will discard all changes once the computer shuts down.<br />
<br />
If you would like to run a full install of Arch Linux from a USB drive (i.e. with persistent settings), see [[Installing Arch Linux on a USB key]]. If you would like to use your bootable Arch Linux USB stick as a rescue USB, see [[Change root]].<br />
<br />
== BIOS and UEFI Bootable USB ==<br />
<br />
=== Using dd ===<br />
{{Note|This method is recommended due to its simplicity. If it does not work, switch to the alternative method [[#Using manual formatting ]] below.}}<br />
<br />
{{Warning|This will irrevocably destroy all data on {{ic|/dev/sd'''x'''}}.}}<br />
<br />
==== In GNU/Linux ====<br />
<br />
{{Tip|Find out the name of your USB drive with {{ic|lsblk}}. Make sure that it is '''not''' mounted.}}<br />
<br />
Run the following command, replacing {{ic|/dev/'''sdx'''}} with your drive, e.g. {{ic|/dev/sdb}}. (do '''not''' append a partition number, so do '''not''' use something like {{ic|/dev/sdb'''1'''}})<br />
<br />
# dd bs=4M if=/path/to/archlinux.iso of=/dev/'''sdx''' && sync<br />
<br />
==== In Windows ====<br />
<br />
===== Using USBwriter =====<br />
<br />
This method does not require any workaround and is as straightforward as {{ic|dd}} under Linux. Just download the Arch Linux ISO, and with local administrator rights use the [http://sourceforge.net/p/usbwriter/wiki/Documentation/ USBwriter] utility to write to your USB flash memory.<br />
<br />
===== Using Universal USB Installer =====<br />
This is probably the most straightforward way to create a bootable Arch Linux USB stick from Windows. Download [http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/ Universal USB Installer], which runs on Windows XP/Vista/7/8. There's no installation involved; you directly download a single executable. Download the Arch ISO file and run Universal-USB-Installer-1.9.5.2.exe (the version numbers will vary). The use of the program is fairly self-explanatory. You select the distribution you'd like to create a bootable USB for (Arch Linux), the ISO file you downloaded, and the USB flash drive you want to install to.<br />
<br />
{{Note|1= As of UUI 1.9.5.2, this does not work out-of-the-box because of a [https://bbs.archlinux.org/viewtopic.php?pid=1344629 discrepancy in syslinux versions]. However, if you have a UEFI motherboard you can UEFI boot the USB disk and don't need to worry about this. You must still follow the tip below.}}<br />
<br />
{{Tip|The Arch syslinux installer uses the USB disk label to facilitate mounting the correct drive. The current version of UUI (1.9.5.2) sets the disk label to UUI, when Arch is expecting something else. You can easily fix this by right-clicking the USB drive icon, and clicking on ''Properties'' to change the label. For archlinux-2015.01.01-dual.iso, the label should be {{ic|ARCH_201501}}. It should be clear what the label should be for other versions of the ISO, but in any case, Arch will tell you what the label needs to be if you attempt to boot from the USB with an incorrect label.}}<br />
<br />
{{Warning|Make sure you don't accidentally click on one of the ads on the pendrivelinux.com page which feature prominent ''Download'' buttons—these are likely to carry virus/spyware/trojan payloads. The Pendrive download button is small and near the middle of the page.}}<br />
<br />
===== Using Cygwin =====<br />
<br />
Make sure your [http://www.cygwin.com/ Cygwin] installation contains the {{ic|dd}} package.<br />
<br />
{{Tip|If you do not want to install Cygwin, you can download {{ic|dd}} for Windows from [http://www.chrysocome.net/dd here]. See the next section for more information.}}<br />
<br />
Place your image file in your home directory:<br />
<br />
C:\cygwin\home\John\<br />
<br />
Run cygwin as administrator (required for cygwin to access hardware). To write to your USB drive use the following command:<br />
<br />
dd if=image.iso of=\\.\'''x''': bs=4M<br />
<br />
where image.iso is the path to the iso image file within the {{ic|cygwin}} directory and {{ic|\\.\'''x''':}} is your USB flash drive where {{ic|'''x'''}} is the windows designated letter, e.g. {{ic|\\.\d:}}.<br />
<br />
On Cygwin 6.0, find out the correct partition with:<br />
<br />
cat /proc/partitions<br />
<br />
and write the ISO image with the information from the output. Example:<br />
<br />
{{Warning|This will irrevocably delete all files on your USB flash drive, so make sure you do not have any important files on the flash drive before doing this.}}<br />
<br />
dd if=image.iso of=/dev/sdb bs=4M<br />
<br />
===== dd for Windows =====<br />
<br />
{{Note|Some users have an "isolinux.bin missing or corrupt" problem when booting the media with this method.}}<br />
<br />
A GPL licensed dd version for Windows is available at http://www.chrysocome.net/dd. The advantage of this over Cygwin is a smaller download. Use it as shown in instructions for Cygwin above.<br />
<br />
To begin, download the latest version of dd for Windows. Once downloaded, extract the archive's contents into Downloads or elsewhere.<br />
<br />
Now, launch your {{ic|command prompt}} as an administrator. Next, change directory ({{ic|cd}}) into the Downloads directory.<br />
<br />
If your Arch Linux ISO is elsewhere you may need to state the full path, for convenience you may wish to put the Arch Linux ISO into the same folder as the dd executable. The basic format of the command will look like this.<br />
<br />
# dd if=''archlinux-2015-XX-YY-dual.iso'' od=\\.\''x'': bs=4M<br />
<br />
{{Note|The Windows drive letters are linked to a partition. To allow selecting the entire disk, ''dd for Windows'' provides the {{ic|od}} parameter, which is used in the commands above. Note however that this parameter is specific to ''dd for Windows'' and cannot be found in other implementations of ''dd''.}}<br />
<br />
{{Warning|Because the {{ic|od}} is used, all partitions on the selected disk will be destroyed. Be absolutely sure that you are directing dd to the correct drive before executing.}}<br />
<br />
Simply replace the various null spots (indicated by an "x") with the correct date and correct drive letter. Here is a complete example.<br />
<br />
# dd if=ISOs\archlinux-2015.01.01-dual.iso od=\\.\d: bs=4M<br />
<br />
{{Accuracy|The following note may be invalid, the [http://www.chrysocome.net/dd upstream documentation] does not mention anything related to ''PhysicalDrive''.}}<br />
<br />
{{Note|Alternatively, replace the drive letter with {{ic|\\.\PhysicalDrive''X''}}, where {{ic|''X''}} is the physical drive number (starts from 0). Example:<br />
{{bc|1=# dd if=ISOs\archlinux-2015.01.01-dual.iso of=\\.\PhysicalDrive1 bs=4M}}<br />
You can find out the physical drive number by typing {{ic|wmic diskdrive list brief}} at the command prompt or with {{ic|dd --list}}<br />
Any Explorer window must be closed or dd will report an error.}}<br />
<br />
==== In Mac OS X ====<br />
<br />
To be able to use {{ic|dd}} on your USB device on a Mac you have to do some special maneuvers. First of all insert your usb device, OS X will automount it, and in {{ic|Terminal.app}} run:<br />
<br />
$ diskutil list<br />
<br />
Figure out what your USB device is called with {{ic|mount}} or {{ic|<nowiki>sudo dmesg | tail</nowiki>}} (e.g. {{ic|/dev/disk1}}) and unmount the partitions on the device (i.e., /dev/disk1s1) while keeping the device proper (i.e., /dev/disk1):<br />
<br />
$ diskutil unmountDisk /dev/disk1<br />
<br />
Now we can continue in accordance with the instructions above (but, if you are using the OS X {{ic|dd}}, use {{ic|/dev/rdisk}} instead of {{ic|/dev/disk}}, and use {{ic|1=bs=1m}}. {{ic|rdisk}} means "raw disk" and is much faster on OS X, and {{ic|1=bs=1m}} indicates a 1 MB block size).<br />
<br />
{{hc|<nowiki># dd if=image.iso of=/dev/rdisk1 bs=1m</nowiki>|<br />
20480+0 records in<br />
20480+0 records out<br />
167772160 bytes transferred in 220.016918 secs (762542 bytes/sec)<br />
}}<br />
<br />
It is probably a good idea to eject your drive before physical removal at this point:<br />
<br />
$ diskutil eject /dev/disk1<br />
<br />
==== How to restore the USB drive ====<br />
<br />
Because the ISO image is a hybrid which can either be burned to a disc or directly written to a USB drive, it does not include a standard partition table.<br />
<br />
After you install Arch Linux and you are done with the USB drive, you should zero out its first 512 bytes ''(meaning the boot code from the MBR and the non-standard partition table)'' if you want to restore it to full capacity:<br />
<br />
# dd count=1 bs=512 if=/dev/zero of=/dev/sd'''x''' && sync<br />
<br />
Then create a new partition table (e.g. "msdos") and filesystem (e.g. EXT4, FAT32) using {{Pkg|gparted}}, or from a terminal:<br />
<br />
* For EXT2/3/4 (adjust accordingly), it would be:<br />
<br />
# cfdisk /dev/sd'''x'''<br />
# mkfs.ext4 /dev/sd'''x1'''<br />
# e2label /dev/sd'''x1''' USB_STICK<br />
<br />
* For FAT32, install the {{Pkg|dosfstools}} package and run:<br />
<br />
# cfdisk /dev/sd'''x'''<br />
# mkfs.vfat -F32 /dev/sd'''x1'''<br />
# dosfslabel /dev/sd'''x1''' USB_STICK<br />
<br />
=== Using manual formatting===<br />
<br />
==== In GNU/Linux ====<br />
<br />
This method is more complicated than writing the image directly with {{ic|dd}}, but it does keep the flash drive usable for data storage (that is, the ISO is installed in a specific partition within the already [[Partitioning|partitioned device]] without altering other partitions).<br />
<br />
{{Note|Here, we will denote the targeted partition as {{ic|/dev/sd'''Xn'''}}. In any of the following commands, adjust '''X''' and '''n''' according to your system.}}<br />
<br />
* Make sure that the latest ''syslinux'' package (version 6.02 or newer) is installed on the system. <br />
<br />
* If not done yet, create the partition table and/or partition on the device before continuing. The partition {{ic|/dev/sd'''Xn'''}} must be formatted to FAT32.<br />
<br />
* Mount the ISO image, the FAT32 filesystem located in the USB flash device, and copy the contents of the ISO image to it. Unmount the ISO image, but keep the FAT32 partition mounted for following steps:<br />
# mkdir -p /mnt/{iso,usb}<br />
# mount -o loop archlinux-2015.01.01-dual.iso /mnt/iso<br />
# mount /dev/sd'''Xn''' /mnt/usb<br />
# cp -a /mnt/iso/* /mnt/usb<br />
# sync<br />
# umount /mnt/iso<br />
<br />
* {{Note|The following step is not required when using [[Archboot]] instead of [[Archiso]].}} To boot either a label or an [[UUID]] to select the partition to boot from is required. By default the label {{ic|ARCH_2015'''XX'''}} (with the appropriate release month) is used. Thus, the partition’s label has to be set accordingly, for example using ''gparted''. Alternatively, you can change this behaviour by altering the lines ending by {{ic|1=archisolabel=ARCH_2015'''XX'''}} in files ''/mnt/usb/arch/boot/syslinux/archiso_sys32.cfg'' and ''archiso_sys64.cfg'', as well as ''/mnt/usb/loader/entries/archiso-x86_64.conf'' or similar for a 32-bit ISO (the last being useful only, if you want to boot the USB flash device from an EFI system). To use an UUID instead, replace those portions of lines with {{ic|1=archiso''device''=/dev/disk/by-uuid/'''YOUR-UUID'''}}. The UUID can be retrieved with {{ic|1=blkid -o value -s UUID /dev/sd'''Xn'''}}.<br />
<br />
{{Warning|Mismatching labels or wrong UUID prevents booting from the created medium.}}<br />
<br />
* Syslinux is already preinstalled in ''/mnt/usb/arch/boot/syslinux''. Install it completely to that folder by following [[Syslinux#Manual_install]]. Instructions are reproduced here for convenience.<br />
** Overwrite the existing syslinux modules ({{ic|*.c32}} files) present in the USB (from the ISO) with the ones from the syslinux package. This is necessary to avoid boot failure because of a possible version mismatch.<br />
** Run:<br />
# extlinux --install /mnt/usb/arch/boot/syslinux<br />
** Unmount the partition ({{ic|umount /mnt/usb}}) and install the MBR or GPT partition table to the USB device as described in the page mentioned.<br />
<br />
* Mark the partition as active (or “bootable”).<br />
<br />
==== In Windows ====<br />
<br />
{{Note|<br />
* For manual formatting, do not use any '''Bootable USB Creator utility''' for creating the UEFI bootable USB. For manual formatting, do not use ''dd for Windows'' to dd the ISO to the USB drive either.<br />
<br />
* In the below commands, '''X:''' is assumed to be the USB flash drive in Windows.<br />
<br />
* Windows uses backward slash {{ic|\}} as path-separator, so the same is used in the below commands.<br />
<br />
* All commands should be run in Windows command prompt '''as administrator'''.<br />
<br />
* {{ic|>}} denotes the Windows command prompt.<br />
}}<br />
<br />
* Partition and format the USB drive using [http://rufus.akeo.ie/ Rufus USB partitioner]. Select partition scheme option as '''MBR for BIOS and UEFI''' and File system as '''FAT32'''. Uncheck "Create a bootable disk using ISO image" and "Create extended label and icon files" options.<br />
<br />
* Change the '''Volume Label''' of the USB flash drive {{ic|X:}} to match the LABEL mentioned in the {{ic|1=archisolabel=}} part in {{ic|<ISO>\loader\entries\archiso-x86_64.conf}}. This step is required for Official ISO ([[Archiso]]) but not required for [[Archboot]]. This step can be also performed using Rufus, during the prior "partition and format" step.<br />
<br />
* Extract the ISO (similar to extracting ZIP archive) to the USB flash drive (using [http://7-zip.org/ 7-Zip]. <br />
<br />
* Download official syslinux 6.xx binaries (zip file) from https://www.kernel.org/pub/linux/utils/boot/syslinux/ and extract it. The version of Syslinux should be the same version used in the ISO image.<br />
<br />
* Run the following command (in Windows cmd prompt, as admin):<br />
<br />
{{Note|Use {{ic|X:\boot\syslinux\}} for Archboot iso.}}<br />
<br />
> cd bios\<br />
> for /r %Y in (*.c32) do copy "%Y" "X:\arch\boot\syslinux\" /y<br />
> copy mbr\*.bin X:\arch\boot\syslinux\ /y<br />
<br />
* Install Syslinux to the USB by running (use {{ic|win64\syslinux64.exe}} for x64 Windows):<br />
<br />
{{Note|Use {{ic|-d /boot/syslinux}} for Archboot iso.}}<br />
<br />
> cd bios\<br />
> win32\syslinux.exe -d /arch/boot/syslinux -i -a -m X:<br />
<br />
{{Note|<br />
* The above step installs Syslinux's {{ic|ldlinux.sys}} to the VBR of the USB partition, sets the partition as "active/boot" in the MBR partition table and writes the MBR boot code to the 1st 440-byte boot code region of the USB.<br />
<br />
* The {{ic|-d}} switch expects a path with forward slash path-separator like in *unix systems.<br />
}}<br />
<br />
== Other Methods for BIOS systems ==<br />
<br />
=== In GNU/Linux ===<br />
<br />
==== Using a multiboot USB drive ====<br />
This allows booting multiple ISOs from a single USB device, including the archiso. Updating an existing USB drive to a more recent ISO is simpler than for most other methods. See [[Multiboot USB drive]].<br />
<br />
==== Using UNetbootin ====<br />
<br />
UNetbootin can be used on any Linux distribution or Windows to copy your iso to a USB device. However, Unetbootin overwrites syslinux.cfg, so it creates a USB device that does not boot properly. For this reason, '''Unetbootin is not recommended''' -- please use {{ic|dd}} or one of the other methods discussed in this topic.<br />
{{Warning|UNetbootin writes over the default {{ic|syslinux.cfg}}; this must be restored before the USB device will boot properly.}}<br />
<br />
Edit {{ic|syslinux.cfg}}:<br />
<br />
{{hc|sysconfig.cfg|2=<br />
default menu.c32<br />
prompt 0<br />
menu title Archlinux Installer<br />
timeout 100<br />
<br />
label unetbootindefault<br />
menu label Archlinux_x86_64<br />
kernel /arch/boot/x86_64/vmlinuz<br />
append initrd=/arch/boot/x86_64/archiso.img archisodevice=/dev/sd'''x1''' ../../<br />
<br />
label ubnentry0<br />
menu label Archlinux_i686<br />
kernel /arch/boot/i686/vmlinuz<br />
append initrd=/arch/boot/i686/archiso.img archisodevice=/dev/sd'''x1''' ../../<br />
}}<br />
<br />
In {{ic|/dev/sd'''x1'''}} you must replace '''x''' with the first free letter after the last letter in use on the system where you are installing Arch Linux (e.g. if you have two hard drives, use {{ic|c}}.). You can make this change during the first phase of boot by pressing {{ic|Tab}} when the menu is shown.<br />
<br />
=== In Windows ===<br />
<br />
==== Win32 Disk Imager ====<br />
<br />
{{Warning|This will destroy all information on your USB flash drive!}}<br />
First, download the program from [http://sourceforge.net/projects/win32diskimager/ here]. Next, extract the archive and run the executable. Now, select the Arch Linux ISO under the {{ic|Image File}} section and the USB flash device letter (for example, [D:\]) under the {{ic|Device}} section. Finally, click {{ic|Write}} when ready.<br />
{{Note|After installation, you may need to restore the USB flash drive following a process as outlined [[USB_Installation_Media#How_to_restore_the_USB_drive|here]].}}<br />
<br />
==== USBWriter for Windows ====<br />
<br />
Download the program from http://sourceforge.net/projects/usbwriter/ and run it. Select the arch image file, the target USB stick, and click on the {{ic|write}} button. Now you should be able to boot from the usb stick and install Arch Linux from it.<br />
<br />
==== The Flashnul way ====<br />
<br />
[https://translate.google.com/translate?hl=&sl=ru&tl=en&u=http%3A%2F%2Fshounen.ru%2Fsoft%2Fflashnul%2Freadme.rus.html&sandbox=1 flashnul] is an utility to verify the functionality and maintenance of Flash-Memory (USB-Flash, IDE-Flash, SecureDigital, MMC, MemoryStick, SmartMedia, XD, CompactFlash etc).<br />
<br />
From a command prompt, invoke flashnul with {{ic|-p}}, and determine which device index is your USB drive, e.g.:<br />
<br />
{{hc|C:\>flashnul -p|<br />
Avaible physical drives:<br />
Avaible logical disks:<br />
C:\<br />
D:\<br />
E:\<br />
}}<br />
<br />
When you have determined which device is the correct one, you can write the image to your drive, by invoking flashnul with the device index, {{ic|-L}}, and the path to your image, e.g:<br />
<br />
C:\>flashnul '''E:''' -L ''path\to\arch.iso''<br />
<br />
As long as you are really sure you want to write the data, type yes, then wait a bit for it to write. If you get an access denied error, close any Explorer windows you have open.<br />
<br />
If under Vista or Win7, you should open the console as administrator, or else flashnul will fail to open the stick as a block device and will only be able to write via the drive handle windows provides<br />
<br />
{{Note|Confirmed that you need to use drive letter as opposed to number. flashnul 1rc1, Windows 7 x64.}}<br />
<br />
==== Loading the installation media from RAM ====<br />
<br />
{{Merge|Multiboot USB drive#Using Syslinux and memdisk|This is the same method, only Syslinux is installed from Windows. Considering that [[multiboot USB drive]] can be used to boot an installation media and it is already linked from the Related articles box at the top, maybe this section should be merged there?}}<br />
<br />
This method uses [[Syslinux]] and a [[Ramdisk]] ([http://www.syslinux.org/wiki/index.php/MEMDISK MEMDISK]) to load the entire Arch Linux ISO image into RAM. Since this will be running entirely from system memory, you will need to make sure the system you will be installing this on has an adequate amount. A minimum amount of RAM between 500 MB and 1 GB should suffice for a MEMDISK based, Arch Linux install.<br />
<br />
For more information on Arch Linux system requirements as well as those for MEMDISK see the [[Beginners' guide]] and [http://www.etherboot.org/wiki/bootingmemdisk#preliminaries here]{{Dead link|2014|12|01}}. For reference, here is the [https://bbs.archlinux.org/viewtopic.php?id=135266 preceding forum thread].<br />
<br />
{{Tip|Once the installer has completed loading you can simply remove the USB stick and even use it on a different machine to start the process all over again. Utilizing MEMDISK also allows booting and installing Arch Linux to and from the same USB flash drive.}}<br />
<br />
===== Preparing the USB flash drive =====<br />
<br />
Begin by formatting the USB flash drive as '''FAT32'''. Then create the following folders on the newly formatted drive.<br />
* {{ic|Boot}}<br />
** {{ic|Boot/ISOs}}<br />
** {{ic|Boot/Settings}}<br />
<br />
===== Copy the needed files to the USB flash drive =====<br />
<br />
Next copy the ISO that you would like to boot to the {{ic|Boot/ISOs}} folder. After that, extract from the following files from the latest release of {{pkg|syslinux}} from [http://www.kernel.org/pub/linux/utils/boot/syslinux/ here] and copy them into the following folders.<br />
* {{ic|./win32/syslinux.exe}} to the Desktop or Downloads folder on your system.<br />
* {{ic|./memdisk/memdisk}} to the {{ic|Settings}} folder on your USB flash drive.<br />
<br />
===== Create the configuration file =====<br />
<br />
After copying the needed files, navigate to the USB flash drive, /boot/Settings and create a {{ic|syslinux.cfg}} file.<br />
{{Warning|On the {{ic|INITRD}} line, be sure to use the name of the ISO file that you copied to your {{ic|ISOs}} folder!}}<br />
{{hc|/Boot/Settings/syslinux.cfg|2=<br />
DEFAULT arch_iso<br />
<br />
LABEL arch_iso<br />
MENU LABEL Arch Setup<br />
LINUX memdisk<br />
INITRD /Boot/ISOs/archlinux-2015.01.01-dual.iso<br />
APPEND iso}}<br />
For more information on Syslinux see the [[Syslinux|Arch Wiki article]].<br />
<br />
===== Final steps =====<br />
<br />
Finally, create a {{ic|*.bat}} file where {{ic|syslinux.exe}} is located and run it ("Run as administrator" if you are on Vista or Windows 7):<br />
{{hc|C:\Documents and Settings\username\Desktop\install.bat|<br />
@echo off<br />
syslinux.exe -m -a -d /Boot/Settings X:}}<br />
<br />
== Troubleshooting ==<br />
<br />
* For the [[#Loading the installation media from RAM|MEMDISK Method]], if you get the famous "30 seconds" error trying to boot the i686 version, press the {{ic|Tab}} key over the {{ic|Boot Arch Linux (i686)}} entry and add {{ic|vmalloc&#61;448M}} at the end. For reference: ''If your image is bigger than 128MiB and you have a 32-bit OS, then you have to increase the maximum memory usage of vmalloc''. [http://www.syslinux.org/wiki/index.php/MEMDISK#-_memdiskfind_in_combination_with_phram_and_mtdblock]<br />
<br />
* If you get the "30 seconds" error due to the {{ic|/dev/disk/by-label/ARCH_XXXXYY}} not mounting, try renaming your USB media to {{ic|ARCH_XXXXYY}} (e.g. {{ic|ARCH_201501}}).<br />
<br />
== See Also ==<br />
<br />
* [https://wiki.gentoo.org/wiki/LiveUSB/HOWTO Gentoo wiki - LiveUSB/HOWTO]<br />
* [https://fedoraproject.org/wiki/How_to_create_and_use_Live_USB Fedora wiki - How to create and use Live USB]<br />
* [http://en.opensuse.org/SDB:Live_USB_stick openSUSE wiki - SDB:Live USB stick]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=RetroArch&diff=355017RetroArch2015-01-02T20:54:01Z<p>Sudowoodo: /* Installation */ Website moved.</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Emulators]]<br />
{{Note|RetroArch is not affiliated with [[Arch Linux]].}}<br />
<br />
RetroArch is a modular, command-line driven, multi-system emulator that is designed to be fast, lightweight, and portable. Some of its features can be found on few other emulators, such as real-time rewinding and game-aware shading based on the libretro API.<br />
<br />
== Installation ==<br />
{{App|RetroArch|Stable version.|http://www.libretro.com/|{{AUR|retroarch}}}}<br />
{{App|RetroArch (git)|Development version.|http://www.libretro.com/|{{AUR|retroarch-git}}}}<br />
{{App|RetroArch-Phoenix (git)|GTK+ front-end, development version.|https://github.com/Themaister/RetroArch-Phoenix|{{AUR|retroarch-phoenix-git}}, or {{AUR|retroarch-phoenix-qt-git}} (qt build)}}<br />
<br />
== Usage ==<br />
RetroArch uses separate libraries, called ''emulator cores'' or ''emulator implementations'', available from both the [https://aur.archlinux.org/packages/?O=0&K=libretro AUR] and the [http://github.com/libretro libretro github repository].<br />
<br />
Each package from the [[AUR]] will install a library to {{ic|/usr/lib/libretro/}}. The syntax to choose one when executing ''retroarch'' is:<br />
$ retroarch -L /usr/lib/libretro/libretro-(emulation core).so ~/path/to/foo<br />
<br />
{{Tip|RetroArch can work with {{ic|*.zip}} files using the [https://github.com/ToadKing/RetroArch-Rpi/blob/master/retroarch-zip retroarch-zip] shell wrapper, although this method is not properly implemented and can be unstable.}}<br />
<br />
A default emulation core can be defined in {{ic|retroarch.cfg}}, obviating the need to specify it on every run.<br />
<br />
Example:<br />
{{hc|/etc/retroarch.cfg or ~/.retroarch.cfg|2=<br />
libretro_path = "/usr/lib/libretro/libretro-foo.so"}}<br />
<br />
== Configuration ==<br />
RetroArch provides a very well commented skeleton configuration file located at {{ic|/etc/retroarch.cfg}}.<br />
<br />
It supports split configuration files using the {{ic|#include "foo.cfg"}} directive within the main configuration file, {{ic|retroarch.cfg}}. This can be overridden using the {{ic|--appendconfig /path/to/config}} parameter and is beneficial if different keybinds, video configurations or audio settings are required for the various implementations.<br />
<br />
{{Tip|RetroArch is capable of loading ''[https://gitorious.org/bsnes/xml-shaders bsnes xml filters]'' and ''[https://github.com/libretro/common-shaders cg shaders]'' that can be defined in {{ic|retroarch.cfg}} as {{ic|video_bsnes_shader}} and {{ic|video_cg_shader}} respectively.}}<br />
{{Note|{{AUR|retroarch-git}} requires {{pkg|nvidia-cg-toolkit}} in order to use the ''cg shaders''.}}<br />
{{Warning|When using ''[[ALSA]]'' it is necessary for the {{ic|audio_out_rate}} to be equal to the system's default output rate, usually 48000.}}<br />
<br />
== Troubleshooting ==<br />
=== Input devices do not operate ===<br />
It is likely to encounter problems if running on a CLI or a display server other than [[Xorg]], because /dev/input nodes are limited to root-only access. This is solved by manually adding a rule in {{ic|/etc/udev/rules.d/99-evdev.rules}}, with {{ic|<nowiki>KERNEL=="event*", NAME="input/%k", MODE="666"</nowiki>}} as its contents. Reload udev rules by running:<br />
# udevadm control --reload-rules<br />
<br />
If rebooting the system or replugging the devices are not options, permissions may be forced using:<br />
# chmod 666 /dev/input/event*<br />
<br />
=== Poor video performance ===<br />
If poor video performance is met, RetroArch may be run on a separate thread by setting {{ic|<nowiki>video_threaded = true</nowiki>}} in {{ic|~/.config/retroarch/retroarch.cfg}}.<br />
<br />
This is, however, a solution that should be not be used if tweaking RetroArch's video resolution/refresh rate fixes the problem, as it makes perfect V-Sync impossible, and slightly increases latency.<br />
<br />
== See also ==<br />
* [https://github.com/libretro/RetroArch/wiki RetroArch wiki on Github]<br />
* [http://github.com/libretro/libretro.github.com/wiki/Documentation-devs Documentation for developers]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Dolphin_emulator&diff=354699Dolphin emulator2014-12-31T13:16:12Z<p>Sudowoodo: /* Graphics section */</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Emulators]]<br />
{{Accuracy|As of October 2014, Dolphin is [https://dolphin-emu.org/blog/2014/09/30/dolphin-progress-report-september-2014 moving to Qt]. Parts of this article may need to be rewriten soon.}}<br />
Dolphin is a Nintendo Gamecube, Wii and Triforce emulator, currently supporting the x86, AMD64 and ARM architectures. Dolphin is available for Linux, MacOSX (intel-based), MS Windows and Android. It is a free and open source, community-developed project.<br />
Dolphin was the first Gamecube and Wii emulator, and currently the only one capable of playing commercial games.<br />
<br />
== Installation ==<br />
<br />
Install one of the following:<br />
<br />
* {{App|[[Dolphin emu]]|A Gamecube / Wii / Triforce emulator|https://dolphin-emu.org/|{{Pkg|dolphin-emu}}}}<br />
* {{App|Dolphin emu (git)|A Gamecube / Wii / Triforce emulator (development version)|https://github.com/dolphin-emu/dolphin|{{AUR|dolphin-emu-git}}}}<br />
<br />
{{Tip|The latest stable release of Dolphin (4.0.2 at the time of writing) is very old and is generally a lot slower than the development versions. Many speed improvements and game fixes have been added since the last stable version and the latest development version. If you are getting low performance or glitches in some games, consider using the {{AUR|dolphin-emu-git}} package.}}<br />
{{Tip|If you want to update to the latest development version, you can reinstall the {{AUR|dolphin-emu-git}} package at any time. It will automatically grab the latest development version.}}<br />
<br />
== Configuration ==<br />
<br />
{{Tip|Run {{ic|dolphin-emu -h}} for help Dolphin's options.}}<br />
{{Note|Dolphin may override these settings on a per-game basis, e.g. when it is known a setting breaks the game. If you are absolutely sure a specific setting will not crash the game, you can disable or change these overrides by right-clicking the game and selecting ''Properties''. Likewise, you can set per-game settings using this method.}}<br />
<br />
While no additional configuration is needed for the emulator to run (it is preconfigured with the default settings), altering the settings can improve performance and graphics alike.<br />
Settings are split to three main sections, ''Config'', ''Graphics'' and ''DSP''.<br />
<br />
=== Config section ===<br />
{{Tip|Recent versions of Dolphin remove the ''Audio'' frameskip option, so ''Auto'' is now reccomended.}}<br />
On the General tab, check ''Enable Dual Core'' and ''Enable Idle Skipping''. Enabling or not the cheats is a personal choice. Keep in mind that a real man never cheats. The frame limit should be set to "Auto", so that it works with games from all regions. The CPU emulation engine should be left as JIT Recompiler. Only check "Force console as NTSC-J" if intending to play imported Japanese discs.<br />
<br />
All options on the "Interface" tab are personal choices.<br />
<br />
The Audio tab is the DSP section's screen; setting it up now means there will be no need to do it later. See the [[#DSP section|DSP settings paragraph]] below.<br />
<br />
The next two tabs are not very important; the Gamecube tab has settings about connected accessories, such as memory cards, and the only remarkable Wii tab option is the "Aspect Ratio" drop-down list. Set it to either 16:9 or 4:3, depending on the display's [[Wikipedia: Aspect ratio|aspect ratio]].<br />
<br />
On the final tab, "Paths", ISO directories can be set. The directory of game ISOs can also be set by clicking browse from the home screen, but here more options are available, such as ''Search Subfolders''.<br />
<br />
=== Graphics section ===<br />
{{accuracy|New 3D options available.}}<br />
On the "General" tab, choose OpenGL from the backend drop-down list. Set the "Display" and "Other" settings to the desired configuration. V-sync is useful, but it can lead to slowdowns. The "render to main window" option improves the experience aesthetically.<br />
<br />
On the "Enhancements" tab are the options that can improve graphics. While they result to great output, they can slow the emulation down to the point of making games unplayable. Choose the best settings possible, as long as speed remains 100%.<br />
<br />
{| class="wikitable"<br />
|+ Comparison of options<br />
!Option !!Performance !!Quality<br />
|-<br />
| '''Internal resolution''' || 1x Native || Auto (Window size)<br />
|-<br />
| '''Anti-aliasing''' || None || at least 2x<br />
|-<br />
| '''Anisotropic filtering''' || 1x || at least 2x<br />
|-<br />
| '''Post-Processing Effect''' || (off) || your choice<br>(see tip below)<br />
|-<br />
| '''Scaled EFB copy''' || unchecked || checked<br />
|-<br />
| '''Per-Pixel Lightning''' || unchecked || checked<br />
|-<br />
| '''Force texture filtering,<br>Widescreen Hack,<br>Disable fog''' || off || your option<br>(recommended: off)<br />
|}<br />
<br />
{{Tip|Dolphin is able to render games that were developed for 2D in anaglyph 3D. To enable this, set ''Post-Processing Effect'' to ''stereoscopic'' (default, for red-cyan mode) or ''stereoscopic2'' (blue-yellow). It is also '''necessary''' to uncheck "''Fast Depth Calculation''" on the ''Hacks'' tab (''see below'').}}<br />
<br />
{{Warning|Using filters and other ways to improve graphics might break a few games or cause graphical glitches of any level.}}<br />
<br />
Unless sure, the ''Hacks'' tab is best left untouched.<br />
<br />
{| class="wikitable"<br />
|+ Defaults<br />
!Option !! Value<br />
|-<br />
| Skip EFB access from CPU || unchecked<br />
|-<br />
| Ignore format changes || checked<br />
|-<br />
| EFB copies || texture<br />
|-<br />
| Texture cache/ Accuracy || Fast<br />
|-<br />
| External frame buffer || disable<br />
|-<br />
| Cache display lists || unchecked<br />
|-<br />
| Disable destination alpha || unchecked<br />
|-<br />
| OpenCL texture decoder || unchecked<br />
|-<br />
| OpenMP texture decoder || unchecked<br />
|-<br />
| Fast depth calculation || checked<br>(Should uncheck for anaglyph 3D)<br />
|-<br />
| Vertex streaming hack || unchecked<br />
|}<br />
<br />
Similarly, unless sure, leave '''everything''' in the ''Advanced'' tab unchecked.<br />
<br />
=== DSP section ===<br />
<br />
Set the DSP emulation engine to<br />
<br />
* DSP HLE for speed over accuracy,<br />
* DSP LLE recompiler for better accuracy with the cost of some speed,<br />
* DSP LLE interpreter; accurate but makes '''everything''' unplayable. Too slow.<br />
<br />
''DSP LLE on separate thread'' improves speed on computers with multi-core CPUs, but might cause audio glitches, and is known to break [https://wiki.dolphin-emu.org/index.php?title=Category:Zelda_ucode_games Zelda ucode games]. Audio backend is best set to [[ALSA]]. For {{ic|pulseaudio}}, Dolphin's optional dependency [[PulseAudio]] needs to be installed.<br />
<br />
{{Note|If you came here from the [[#Config section|Config section's]] link, you should go back now.}}<br />
<br />
== Playing ==<br />
{{Note|Dolphin is a resource-heavy application, so expect not all games to run properly. See the reason [https://dolphin-emu.org/docs/faq/#why-do-i-need-such-powerful-computer-emulate-old-c here].}}<br />
{{Warning|Make sure you '''only''' use Dolphin for legally obtained self-made disc dumps of games you legally bought. Dolphin was not designed for illegal actions. Act legally as applying laws define. You are responsible for any usage of the emulator that you make. No links, instructions or tips for obtaining illegal content will be provided on this wiki. No copyright infringement intended.}}<br />
<br />
Click on browse to set a directory of ISOs so that they are shown as a library on Dolphin's default screen. Otherwise just click ''Open'' and select the file.<br />
<br />
=== Dolphin's Wiki ===<br />
<br />
Whenever a game doesn't work properly, try reading its page on [https://wiki.dolphin-emu.org Dolphin's wiki]. Listed there are tips on setting up the emulator for each game, version compatibility charts, testing entries, troubleshooting and video previews. Contributions, such as testing entries and workarounds are welcome and help other users.<br />
<br />
Here's a [https://aur.archlinux.org/packages/xfce4-whiskermenu-plugin/ Whisker Menu] search action command for searching on Dolphin's wiki:<br />
<br />
exo-open --launch WebBrowser https://wiki.dolphin-emu.org/index.php?search=%u<br />
<br />
{{Tip|Setting up keymaps is recommended. Prefer a gamepad with analogue features to a keyboard and a mouse. See this [http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/GCController_Layout.svg/1000px-GCController_Layout.svg.png map of the GameCube gamepad]. Having fun while playing is also recommended.}}<br />
<br />
== Tips ==<br />
=== Scripts for building and installing Dolphin ===<br />
This script downloads or updates Dolphin, and then installs it. Put it under any directory and keep it there, along with the subdirectories and files it generates. <br />
{{Bc|<nowiki><br />
#!/bin/bash<br />
<br />
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"<br />
getdolphin() {<br />
echo 'Downloading Dolphin...'<br />
git clone https://github.com/dolphin-emu/dolphin.git<br />
}<br />
updatedolphin() {<br />
cd $DIR/dolphin-emu<br />
echo 'Updating the local repository...'<br />
git pull origin<br />
}<br />
build() {<br />
cmake $DIR/dolphin-emu<br />
make<br />
}<br />
updatedolphin || getdolphin<br />
mkdir $DIR/build<br />
cd $DIR/build<br />
build && echo 'Compiled succesfully.' || exit<br />
echo 'Proceeding to the installation; press Enter to continue or Ctrl+C to cancel.'<br />
read<br />
if [ $(whoami) == "root" ];<br />
then<br />
make install<br />
else<br />
sudo make install<br />
fi<br />
</nowiki>}}<br />
<br />
==== PKGBUILDs ====<br />
Dolphin's stable branch PKGBUILDs can be found on [https://www.archlinux.org/packages/?sort=&q=dolphin-emu the community repository].<br />
<br />
A PKGBUILD [https://aur.archlinux.org/packages/do/dolphin-emu-git/PKGBUILD for the git version] can be found on the [[AUR]], along with several other ones.<br />
<br />
== Troubleshooting ==<br />
<br />
==== Games play too fast ====<br />
Make sure the framelimit is set to a proper value for the game's region; 60 for NTSC games or 50 for PAL ones. ''Auto'' is recommended. Avoid playing other media simultaneously with Dolphin.<br />
<br />
==== Emulation is too slow ====<br />
<br />
Double-check the [[Cpu_scaling#Scaling_governors|CPU scaling governor]]. If using an nvidia graphics card, on nvidia-settings changing the powermizer setting to "Prefer maximum performance"; check its temperature to make sure the card does not overheat, though. Change Dolphin's priority using ''nice''. Killing unnecessary processes and disabling compositing also helps. Configuring Dolphin correctly, as described above, is the most important part.<br />
<br />
''See also: [[Maximizing Performance]] - most of the advice should be helpful.''<br />
<br />
==== Dolphin occasionally crashes on 64-bit CPUs ====<br />
{{Note|This solution is not guarranted to work on all systems.}}<br />
On 64bit processors, Dolphin crashes when loading a game after having played another. This also randomly happens on menus.<br />
<br />
Dolphin must be built manually, with a minor modification. Once the source code has been downloaded ({{ic|$ git clone http://www.github.com/dolphin-emu/dolphin.git}}), navigate to {{ic|(path to source)/dolphin/Source/Core/Core/}} , or, for older versions, in {{ic|(path to source)/dolphin-emu/src/dolphin/Source/Core/Core/Src/}} and edit ''CoreParameter.cpp''.<br />
<br />
Change line 98 from {{ic|<nowiki>bJITLoadStorePairedOff = false;</nowiki>}} to {{ic|<nowiki>bJITLoadStorePairedOff = true;</nowiki>}}.<br />
Notice the comment saying {{ic|// XXX not 64-bit clean}}.<br />
<br />
Upon saving the file, the package is ready to be compiled.<br />
<br />
== See also ==<br />
<br />
{{Note|The Arch Linux wiki and its users are not responsible for any damage, misuse or illegal action caused, directly or not, by following instructions from webpages hyperlinked bellow.}}<br />
<br />
* [https://dolphin-emu.org/docs/guides/performance-guide/ Dolphin's performance guide.]<br />
* [https://dolphin-emu.org/docs/faq/ Dolphin's FAQ]<br />
* [https://wiki.dolphin-emu.org/index.php?title=Ripping_Game_Discs Dolphin's wiki entry for legally obtaining game dumps.]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=LibreOffice&diff=350720LibreOffice2014-12-18T18:05:24Z<p>Sudowoodo: /* Theme */</p>
<hr />
<div>[[Category:Office]]<br />
[[ar:LibreOffice]]<br />
[[de:LibreOffice]]<br />
[[es:LibreOffice]]<br />
[[fr:LibreOffice]]<br />
[[it:LibreOffice]]<br />
[[ja:LibreOffice]]<br />
[[ru:LibreOffice]]<br />
[[zh-CN:LibreOffice]]<br />
{{Related articles start}}<br />
{{Related|Apache OpenOffice}}<br />
{{Related articles end}}<br />
<br />
From [http://www.libreoffice.org/ Home - LibreOffice]:<br />
<br />
:''LibreOffice is the free power-packed Open Source personal productivity suite for Windows, Macintosh and Linux, that gives you six feature-rich applications for all your document production and data processing needs: Writer, Calc, Impress, Draw, Math and Base. [http://www.libreoffice.org/get-help/ Support] and [http://www.libreoffice.org/get-help/documentation/ documentation] is free from our large, dedicated community of users, contributors and developers. [http://www.libreoffice.org/get-involved/ You, too, can also get involved!]''<br />
<br />
== LibreOffice in Arch Linux ==<br />
<br />
Official support for [[OpenOffice.org]] was dropped in favor of LibreOffice, the "Document Foundation" fork of the project, which also includes enhancements and additional features. See [https://mailman.archlinux.org/pipermail/arch-general/2011-March/018819.html Dropping Oracle OpenOffice (arch-general)].<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] one of the following groups from the [[official repositories]]: <br />
<br />
* {{Pkg|libreoffice-fresh}} is the feature branch, with new program enhancements.<br />
* {{Grp|libreoffice-still}} is the maintenance branch.<br />
<br />
{{Note|<br />
* In the past, the installation of at least 1 language pack was required. Currently, LibreOffice detects your system defaults; manual installation of a language pack is no longer mandatory. See [https://help.libreoffice.org/Scalc/cui/ui/optlanguagespage/ignorelanguagechange#User_interface help.libreoffice.org] for additional information.<br />
* If you want the UK-English language pack, install {{Pkg|libreoffice-en-GB}}, not {{Pkg|libreoffice-uk}} (Ukrainian) or {{Pkg|libreoffice-br}} (Breton)!<br />
* The packages {{Pkg|libreoffice-still-kde4}} and {{Pkg|libreoffice-still-gnome}} are required for Qt and GTK+ visual integration respectively. See the [[#Theme|Theme]] section.<br />
* For SDK - use {{Pkg|libreoffice-fresh-sdk}} OR {{Pkg|libreoffice-still-sdk}} accordingly<br />
}}<br />
<br />
Check the optional dependencies pacman displays. A Java Runtime Environment is not required unless you want to use Libreoffice Base: see [[Java]]. You may need {{AUR|hsqldb2-java}} to use [https://wiki.documentfoundation.org/Base#Java_and_HSQLDB some modules] in LibreOffice Base.<br />
<br />
== Theme ==<br />
<br />
For [[Qt]] integration, install {{Pkg|libreoffice-still-kde4}}, for [[GTK+]] integration {{Pkg|libreoffice-still-gnome}}. See also [[Uniform Look for Qt and GTK Applications]].<br />
<br />
As of LibreOffice v3.5.x toolkit libraries are checked in the following order:<br />
<br />
gtk > kde4 > generic<br />
<br />
{{Merge|Uniform_Look_for_Qt_and_GTK_Applications|Instructions not exclusive to LibreOffice.}}<br />
<br />
To force the use of a certain VCL UI interface use one of this:<br />
<br />
SAL_USE_VCLPLUGIN=gen lowriter<br />
SAL_USE_VCLPLUGIN=kde4 lowriter<br />
SAL_USE_VCLPLUGIN=gtk lowriter<br />
SAL_USE_VCLPLUGIN=gtk3 lowriter<br />
<br />
It is convenient to save {{ic|SAL_USE_VCLPLUGIN}} variable in your shell configuration file, e.g.{{ic|/etc/bash.bashrc}} or {{ic|~/.bashrc}} if using Bash.<br />
<br />
{{Note|The new GTK3 UI is experimental and will only be available if you enable "experimental features" in LibreOffice main configuration dialog.}}<br />
<br />
However, if it looks like it is using Windows 95/98 icons, go to ''Tools > Options...'' in the menus (which presents the Options Dialog), then select ''LibreOffice > Accessibility'' and uncheck "Automatically detect high-contrast mode of operating system".<br />
<br />
If that does not work immediately, you may need to change the icon set that is in use; this is also in the Options Dialog, under ''LibreOffice > View'' with two pop-up boxes for "Icon size and style" (the latter pop-up box should be changed to something other than "High-contrast").<br />
<br />
=== Firefox themes ===<br />
<br />
LibreOffice 4.x series is able to use Firefox themes. Enter LibreOffice options and choose ''Personalization > Select Theme'', then paste the URL of your favourite one. A convenient button in the dialog box lets you open the browser.<br />
<br />
Themes can be found on [https://addons.mozilla.org/en-US/firefox/themes/ Mozilla's theme repository].<br />
<br />
=== Disable startup logo ===<br />
<br />
If you prefer to disable the startup logo, open {{ic|/etc/libreoffice/sofficerc}}, find the {{ic|1=Logo=}} line and set {{ic|1=Logo=0}}.<br />
<br />
{{Note|This variable is unrelated with the Logo scripting support.}}<br />
<br />
== Extension management ==<br />
<br />
The following additional extensions are available in the [[official repositories]]:<br />
<br />
*{{Pkg|libreoffice-still-extension-nlpsolver}}<br />
*{{Pkg|libreoffice-still-extension-wiki-publisher}}<br />
<br />
For more extensions, check the [[AUR]], the built-in LibreOffice Extension manager, or [http://libreplanet.org/wiki/Group:OpenOfficeExtensions/List libreplanet].<br />
<br />
== Language aids ==<br />
<br />
=== Spell checking ===<br />
<br />
For spell checking, you will need {{Pkg|hunspell}} and a language dictionary for hunspell (like {{Pkg|hunspell-en}} for English, {{Pkg|hunspell-de}} for German, etc).<br />
<br />
=== Hyphenation rules ===<br />
<br />
For hyphenation rules, you will need {{Pkg|hyphen}} and a language hyphen rule set ({{Pkg|hyphen-en}} for English, {{Pkg|hyphen-de}} for German, etc).<br />
<br />
=== Thesaurus ===<br />
<br />
For the thesaurus option, you will need {{Pkg|libmythes}} and a mythes language thesaurus (like {{Pkg|mythes-en}} for English, {{Pkg|mythes-de}} for German, etc).<br />
<br />
=== Grammar checking ===<br />
<br />
For grammar checking, you will need to install an extension such as LanguageTool, which can be found in the [[AUR]]: {{AUR|libreoffice-extension-languagetool}} or the [http://www.languagetool.org/ LanguageTool Website].<br />
<br />
Other grammar tools can also be found on the [http://libreplanet.org/wiki/Group:OpenOfficeExtensions/List LibreOffice Extension Page] or [http://lingucomponent.openoffice.org/grammar.html OpenOffice's Website]. Not all OpenOffice extensions are guaranteed to work with LibreOffice.<br />
<br />
{{Note|Languagetool uses Java and may slow down or briefly hang LibreOffice, particularly while opening documents. Fortunately this is usually only when initially opening a document and is usually not apparent otherwise.}}<br />
<br />
=== Finnish spell checking ===<br />
<br />
For Finnish users, there are four packages to be installed. Install them in this order: {{AUR|malaga}}, {{AUR|suomi-malaga-voikko}}, {{AUR|libvoikko}} and {{AUR|voikko-libreoffice}}.<br />
<br />
=== Offline help for en-US ===<br />
<br />
The US English packages in the official repositories do not include the offline help files. Users who desire offline help for en-US can install the {{AUR|libreoffice-still-en-us-help}} or {{AUR|libreoffice-fresh-en-us-help}} packages from the [[AUR]].<br />
<br />
== Installing macros ==<br />
<br />
If you intend to use macros, you must have a Java Runtime Environment enabled. A Java Runtime Environment is enabled by default, but disabling it [[#Speed up LibreOffice|speeds up the program]].<br />
<br />
The default path for macros in Arch Linux is different from most Linux distributions. Its location is:<br />
~/.config/libreoffice/4/user/Scripts/<br />
<br />
== Speed up LibreOffice ==<br />
<br />
Some settings may improve LibreOffice's loading time and responsiveness. However, some also increase RAM usage, so use them carefully. They can all be accessed under ''Tools > Options''.<br />
* Under ''Memory'':<br />
** Reduce the number of Undo steps to a figure lower than 100, to something like 20 or 30 steps<br />
** Under ''Graphics cache'', set Use for LibreOffice to 128&nbsp;MB (up from the original 20&nbsp;MB)<br />
** Set ''Memory per object'' to 20&nbsp;MB (up from the default 5&nbsp;MB).<br />
** If LibreOffice is used often, check ''Enable systray Quickstarter''<br />
{{Note|The package {{Pkg|libreoffice-still-gnome}} must be installed for the quickstarter option to be available.}}<br />
* Under ''Advanced'', uncheck ''Use a Java runtime environment''<br />
{{Note|For a list of functionality written in Java only, see: https://wiki.documentfoundation.org/Development/Java.}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Font substitution ===<br />
<br />
These settings can be changed in the LibreOffice options. From the drop-down menu, select ''Tools > Options > LibreOffice > Fonts''. Check the box that says ''Apply Replacement Table''. Type {{ic|Andale Sans UI}} in the font box and choose your desired font for the ''Replace with'' option. When done, click the ''checkmark''. Then choose the ''Always'' and ''Screen only'' options in the box below. Click OK.<br />
You will then need to go to ''Tools > Options > LibreOffice > View'', and uncheck "Use system font for user interface". If you use a non-antialised font, such as Arial, you will also need to uncheck "Screen font antialiasing" before menu fonts render correctly.<br />
<br />
=== Anti-aliasing ===<br />
<br />
Execute:<br />
$ echo "Xft.lcdfilter: lcddefault" | xrdb -merge<br />
<br />
To make the change persistent, add {{ic|Xft.lcdfilter: lcddefault}} to your {{ic|~/.Xresources}} file, and make sure to run {{ic|$ xrdb -merge ~/.Xresources}} ([https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/271283/comments/19 source]. See [[X resources]] for more details.<br />
<br />
If this does not work, you can also try adding {{ic|Xft.lcdfilter: lcddefault}} to your {{ic|~/.Xdefaults}}. If you do not have this file, you will have to create it.<br />
<br />
=== Hanging when using NFSv3 shares ===<br />
<br />
If LibreOffice hangs when trying to open or save a document located on a NFSv3 share, try prepending the following lines with a {{ic|#}} in {{ic|/usr/lib/libreoffice/program/soffice}}:<br />
# file locking now enabled by default<br />
SAL_ENABLE_FILE_LOCKING=1<br />
export SAL_ENABLE_FILE_LOCKING<br />
<br />
To avoid overwriting on update you can copy {{ic|/usr/lib/libreoffice/program/soffice}} in {{ic|/usr/local/bin}}. Original post [http://www.crazysquirrel.com/computing/debian/bugs/openoffice-over-nfs.jspx here].<br />
<br />
=== Fixing Java framework error ===<br />
<br />
You may get the following error when you try to run LibreOffice.<br />
<br />
[Java framework] Error in function createSettingsDocument (elements.cxx).<br />
javaldx failed!<br />
<br />
If so, give yourself ownership of {{ic|~/.config/}} like so:<br />
# chown -vR username:users ~/.config<br />
<br />
[https://bbs.archlinux.org/viewtopic.php?id=93168 Post on Arch Linux forums].<br />
<br />
=== LibreOffice does not detect my certificates ===<br />
<br />
If you cannot see the certificates when trying to sign a document, you will need to have the certificates configured in Mozilla Firefox (or Thunderbird). If after that LibreOffice still does not show them, set the {{ic|MOZILLA_CERTIFICATE_FOLDER}} environment variable to point to your Mozilla Firefox (or Thunderbird) folder:<br />
export MOZILLA_CERTIFICATE_FOLDER=$HOME/.mozilla/firefox/XXXXXX.default/<br />
<br />
[http://wiki.openoffice.org/wiki/Certificate_Detection Certificate detection].<br />
<br />
=== Run .pps files in edit mode (without slideshow) ===<br />
<br />
The only solution is to rename the {{ic|.pps}} file to {{ic|.ppt}}.<br />
<br />
Add the following script to your home directory and use it to open every .pps file. Very useful to open {{ic|.pps}} files received by email without the need to save them.<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
<br />
f=$(mktemp)<br />
cp "$1" "${f}.ppt" && libreoffice "${f}.ppt" && rm -f "${f}.ppt"<br />
</nowiki>}}<br />
<br />
=== Bibliography problems ===<br />
<br />
If Writer crashes on attempting to access ''Tools > Bibliography Database'', with the following error:<br />
com::sun::star::loader::CannotActivateFactoryException<br />
Install {{Pkg|libreoffice-base}} as this is a workaround to a known bug, purportedly [http://cgit.freedesktop.org/libreoffice/core/commit/?id=1889c1af41650576a29c587a0b2cdeaf0d297587 fixed].<br />
<br />
=== Media support ===<br />
<br />
If embedded videos are just gray boxes, make sure to have installed the [[GStreamer#Current version plugins|GStreamer plugins]] required.<br />
<br />
=== Content not resizing with windows on Xfwm4 ===<br />
<br />
If you do not get the content of the LibreOffice window resize along with it under Xfce (or just using Xfwm4), like in this post: [https://bbs.archlinux.org/viewtopic.php?id=133137]. Install {{Pkg|libreoffice-still-gnome}} to solve the issue.<br />
<br />
=== gvfs mounts ===<br />
<br />
If you need to open/save documents on gvfs mounts, you will need to install {{Pkg|libreoffice-still-gnome}} package.</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=USB_flash_installation_medium&diff=347929USB flash installation medium2014-12-03T14:55:31Z<p>Sudowoodo: Happy December :</p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
[[ar:USB Installation Media]]<br />
[[bg:USB Installation Media]]<br />
[[de:Installation von einem USB-Stick]]<br />
[[es:USB Flash Installation Media]]<br />
[[fr: Créer une clef USB avec l'ISO Arch Linux]]<br />
[[it:USB Installation Media]]<br />
[[ja:USB Installation Media]]<br />
[[ro:Instalare prin USB]]<br />
[[ru:USB flash installation media]]<br />
[[tr:USB_ile_kurulum]]<br />
[[zh-CN:USB flash installation media]]<br />
[[zh-TW:USB Installation Media]]<br />
{{Related articles start}}<br />
{{Related|CD Burning}}<br />
{{Related|Archiso}}<br />
{{Related|Multiboot USB drive}}<br />
{{Related articles end}}<br />
<br />
This page discusses various multi-platform methods on how to create a Arch Linux Installer USB drive (also referred to as ''"flash drive", "USB stick", "USB key"'', etc) for booting in BIOS and UEFI systems. The result will be a LiveUSB (LiveCD-like) system that can be used for installing Arch Linux, system maintenance or for recovery purposes, and that, because of the nature of [[Wikipedia:SquashFS|SquashFS]], will discard all changes once the computer shuts down.<br />
<br />
If you would like to run a full install of Arch Linux from a USB drive (i.e. with persistent settings), see [[Installing Arch Linux on a USB key]]. If you would like to use your bootable Arch Linux USB stick as a rescue USB, see [[Change root]].<br />
<br />
== BIOS and UEFI Bootable USB ==<br />
<br />
=== Using dd ===<br />
{{Note|This method is recommended due to its simplicity. If it does not work, switch to the alternative method [[#Using manual formatting ]] below.}}<br />
<br />
{{Warning|This will irrevocably destroy all data on {{ic|/dev/sd'''x'''}}.}}<br />
<br />
==== In GNU/Linux ====<br />
<br />
{{Tip|Find out the name of your USB drive with {{ic|lsblk}}. Make sure that it is '''not''' mounted.}}<br />
<br />
Run the following command, replacing {{ic|/dev/'''sdx'''}} with your drive, e.g. {{ic|/dev/sdb}}. (do '''not''' append a partition number, so do '''not''' use something like {{ic|/dev/sdb'''1'''}})<br />
<br />
# dd bs=4M if=/path/to/archlinux.iso of=/dev/'''sdx''' && sync<br />
<br />
==== In Windows ====<br />
<br />
===== Using USBwriter =====<br />
<br />
This method does not require any workaround and is as straightforward as {{ic|dd}} under Linux. Just download the Arch Linux ISO, and with local administrator rights use the [http://sourceforge.net/p/usbwriter/wiki/Documentation/ USBwriter] utility to write to your USB flash memory.<br />
<br />
===== Using Universal USB Installer =====<br />
{{Accuracy|UUI is for BIOS only|section=Using Universal USB Installer}}<br />
This is probably the most straightforward way to create a bootable Arch Linux USB stick from Windows. Download [http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/ Universal USB Installer], which runs on Windows XP/Vista/7/8. There's no installation involved; you directly download a single executable. Download the Arch ISO file and run Universal-USB-Installer-1.9.5.2.exe (the version numbers will vary). The use of the program is fairly self-explanatory. You select the distribution you'd like to create a bootable USB for (Arch Linux), the ISO file you downloaded, and the USB flash drive you want to install to.<br />
<br />
{{Note|1= As of UUI 1.9.5.2, this does not work out-of-the-box because of a [https://bbs.archlinux.org/viewtopic.php?pid=1344629 discrepancy in syslinux versions]. However, if you have a UEFI motherboard you can UEFI boot the USB disk and don't need to worry about this. You must still follow the tip below.}}<br />
<br />
{{Tip|The Arch syslinux installer uses the USB disk label to facilitate mounting the correct drive. The current version of UUI (1.9.5.2) sets the disk label to UUI, when Arch is expecting something else. You can easily fix this by right-clicking the USB drive icon, and clicking on ''Properties'' to change the label. For archlinux-2014.12.01-dual.iso, the label should be {{ic|ARCH_201412}}. It should be clear what the label should be for other versions of the ISO, but in any case, Arch will tell you what the label needs to be if you attempt to boot from the USB with an incorrect label.}}<br />
<br />
{{Warning|Make sure you don't accidentally click on one of the ads on the pendrivelinux.com page which feature prominent ''Download'' buttons—these are likely to carry virus/spyware/trojan payloads. The Pendrive download button is small and near the middle of the page.}}<br />
<br />
===== Using Cygwin =====<br />
<br />
Make sure your [http://www.cygwin.com/ Cygwin] installation contains the {{ic|dd}} package.<br />
<br />
{{Tip|If you do not want to install Cygwin, you can download {{ic|dd}} for Windows from [http://www.chrysocome.net/dd here]. See the next section for more information.}}<br />
<br />
Place your image file in your home directory:<br />
<br />
C:\cygwin\home\John\<br />
<br />
Run cygwin as administrator (required for cygwin to access hardware). To write to your USB drive use the following command:<br />
<br />
dd if=image.iso of=\\.\'''x''': bs=4M<br />
<br />
where image.iso is the path to the iso image file within the {{ic|cygwin}} directory and {{ic|\\.\'''x''':}} is your USB flash drive where {{ic|'''x'''}} is the windows designated letter, e.g. {{ic|\\.\d:}}.<br />
<br />
On Cygwin 6.0, find out the correct partition with:<br />
<br />
cat /proc/partitions<br />
<br />
and write the ISO image with the information from the output. Example:<br />
<br />
{{Warning|This will irrevocably delete all files on your USB flash drive, so make sure you do not have any important files on the flash drive before doing this.}}<br />
<br />
dd if=image.iso of=/dev/sdb bs=4M<br />
<br />
===== dd for Windows =====<br />
<br />
{{Note|Some users have an "isolinux.bin missing or corrupt" problem when booting the media with this method.}}<br />
<br />
A GPL licensed dd version for Windows is available at http://www.chrysocome.net/dd. The advantage of this over Cygwin is a smaller download. Use it as shown in instructions for Cygwin above.<br />
<br />
To begin, download the latest version of dd for Windows. Once downloaded, extract the archive's contents into Downloads or elsewhere.<br />
<br />
Now, launch your {{ic|command prompt}} as an administrator. Next, change directory ({{ic|cd}}) into the Downloads directory.<br />
<br />
If your Arch Linux ISO is elsewhere you may need to state the full path, for convenience you may wish to put the Arch Linux ISO into the same folder as the dd executable. The basic format of the command will look like this.<br />
<br />
# dd if=archlinux-2014-XX-YY-dual.iso of=\\.\x: bs=4M<br />
<br />
{{Warning|This command will replace the drive's contents and its formatting with the ISO's. You will likely be unable to recover its contents in the event of an accidental copy. Be absolutely sure that you are directing dd to the correct drive before executing!}}<br />
Simply replace the various null spots (indicated by an "x") with the correct date and correct drive letter.<br />
<br />
Here is a complete example.<br />
<br />
# dd if=ISOs\archlinux-2014.12.01-dual.iso of=\\.\d: bs=4M<br />
<br />
{{Note|This may not work because the drive letter indicates a volume, not a disk. Try replacing the drive letter with {{ic|\\.\PhysicalDrive''X''}}, where {{ic|''X''}} is the physical drive number (starts from 0). Example:<br />
{{bc|1=# dd if=ISOs\archlinux-2014.12.01-dual.iso of=\\.\PhysicalDrive1 bs=4M}}<br />
You can find out the physical drive letter by typing {{ic|wmic diskdrive list brief}} at the command prompt.<br />
Any Explorer window must be closed or dd will report an error.}}<br />
<br />
==== In Mac OS X ====<br />
<br />
To be able to use {{ic|dd}} on your USB device on a Mac you have to do some special maneuvers. First of all insert your usb device, OS X will automount it, and in {{ic|Terminal.app}} run:<br />
<br />
$ diskutil list<br />
<br />
Figure out what your USB device is called with {{ic|mount}} or {{ic|<nowiki>sudo dmesg | tail</nowiki>}} (e.g. {{ic|/dev/disk1}}) and unmount the partitions on the device (i.e., /dev/disk1s1) while keeping the device proper (i.e., /dev/disk1):<br />
<br />
$ diskutil unmountDisk /dev/disk1<br />
<br />
Now we can continue in accordance with the instructions above (but, if you are using the OS X {{ic|dd}}, use {{ic|/dev/rdisk}} instead of {{ic|/dev/disk}}, and use {{ic|1=bs=1m}}. {{ic|rdisk}} means "raw disk" and is much faster on OS X, and {{ic|1=bs=1m}} indicates a 1 MB block size).<br />
<br />
{{hc|<nowiki># dd if=image.iso of=/dev/rdisk1 bs=1m</nowiki>|<br />
20480+0 records in<br />
20480+0 records out<br />
167772160 bytes transferred in 220.016918 secs (762542 bytes/sec)<br />
}}<br />
<br />
It is probably a good idea to eject your drive before physical removal at this point:<br />
<br />
$ diskutil eject /dev/disk1<br />
<br />
==== How to restore the USB drive ====<br />
<br />
Because the ISO image is a hybrid which can either be burned to a disc or directly written to a USB drive, it does not include a standard partition table.<br />
<br />
After you install Arch Linux and you are done with the USB drive, you should zero out its first 512 bytes ''(meaning the boot code from the MBR and the non-standard partition table)'' if you want to restore it to full capacity:<br />
<br />
# dd count=1 bs=512 if=/dev/zero of=/dev/sd'''x''' && sync<br />
<br />
Then create a new partition table (e.g. "msdos") and filesystem (e.g. EXT4, FAT32) using {{Pkg|gparted}}, or from a terminal:<br />
<br />
* For EXT2/3/4 (adjust accordingly), it would be:<br />
<br />
# cfdisk /dev/sd'''x'''<br />
# mkfs.ext4 /dev/sd'''x1'''<br />
# e2label /dev/sd'''x1''' USB_STICK<br />
<br />
* For FAT32, install the {{Pkg|dosfstools}} package and run:<br />
<br />
# cfdisk /dev/sd'''x'''<br />
# mkfs.vfat -F32 /dev/sd'''x1'''<br />
# dosfslabel /dev/sd'''x1''' USB_STICK<br />
<br />
=== Using manual formatting===<br />
<br />
==== In GNU/Linux ====<br />
<br />
This method is more complicated than writing the image directly with {{ic|dd}}, but it does keep the flash drive usable for data storage (that is, the ISO is installed in a specific partition within the already [[Partitioning|partitioned device]] without altering other partitions).<br />
<br />
{{Note|Here, we will denote the targeted partition as {{ic|/dev/sd'''Xn'''}}. In any of the following commands, adjust '''X''' and '''n''' according to your system.}}<br />
<br />
* Make sure that the latest ''syslinux'' package (version 6.02 or newer) is installed on the system. <br />
<br />
* If not done yet, create the partition table and/or partition on the device before continuing. The partition {{ic|/dev/sd'''Xn'''}} must be formatted to FAT32.<br />
<br />
* Mount the ISO image, the FAT32 filesystem located in the USB flash device, and copy the contents of the ISO image to it. Unmount the ISO image, but keep the FAT32 partition mounted for following steps:<br />
# mkdir -p /mnt/{iso,usb}<br />
# mount -o loop archlinux-2014.12.01-dual.iso /mnt/iso<br />
# mount /dev/sd'''Xn''' /mnt/usb<br />
# cp -a /mnt/iso/* /mnt/usb<br />
# sync<br />
# umount /mnt/iso<br />
<br />
* {{Note|The following step is not required when using [[Archboot]] instead of [[Archiso]].}} To boot either a label or an [[UUID]] to select the partition to boot from is required. By default the label {{ic|ARCH_2014'''XX'''}} (with the appropriate release month) is used. Thus, the partition’s label has to be set accordingly, for example using ''gparted''. Alternatively, you can change this behaviour by altering the lines ending by {{ic|1=archisolabel=ARCH_2014'''XX'''}} in files ''/mnt/usb/arch/boot/syslinux/archiso_sys32.cfg'' and ''archiso_sys64.cfg'', as well as ''/mnt/usb/loader/entries/archiso-x86_64.conf'' or similar for a 32-bit ISO (the last being useful only, if you want to boot the USB flash device from an EFI system). To use an UUID instead, replace those portions of lines with {{ic|1=archiso''device''=/dev/disk/by-uuid/'''YOUR-UUID'''}}. The UUID can be retrieved with {{ic|1=blkid -o value -s UUID /dev/sd'''Xn'''}}.<br />
<br />
{{Warning|Mismatching labels or wrong UUID prevents booting from the created medium.}}<br />
<br />
* Syslinux is already preinstalled in ''/mnt/usb/arch/boot/syslinux''. Install it completely to that folder by following [[Syslinux#Manual_install]]. Instructions are reproduced here for convenience.<br />
** Overwrite the existing syslinux modules ({{ic|*.c32}} files) present in the USB (from the ISO) with the ones from the syslinux package. This is necessary to avoid boot failure because of a possible version mismatch.<br />
** Run:<br />
# extlinux --install /mnt/usb/arch/boot/syslinux<br />
** Unmount the partition ({{ic|umount /mnt/usb}}) and install the MBR or GPT partition table to the USB device as described in the page mentioned.<br />
<br />
* Mark the partition as active (or “bootable”).<br />
<br />
==== In Windows ====<br />
<br />
{{Note|<br />
* For manual formatting, do not use any '''Bootable USB Creator utility''' for creating the UEFI bootable USB. For manual formatting, do not use ''dd for Windows'' to dd the ISO to the USB drive either.<br />
<br />
* In the below commands, '''X:''' is assumed to be the USB flash drive in Windows.<br />
<br />
* Windows uses backward slash {{ic|\}} as path-separator, so the same is used in the below commands.<br />
<br />
* All commands should be run in Windows command prompt '''as administrator'''.<br />
<br />
* {{ic|>}} denotes the Windows command prompt.<br />
}}<br />
<br />
* Partition and format the USB drive using [http://rufus.akeo.ie/ Rufus USB partitioner]. Select partition scheme option as '''MBR for BIOS and UEFI''' and File system as '''FAT32'''. Uncheck "Create a bootable disk using ISO image" and "Create extended label and icon files" options.<br />
<br />
* Change the '''Volume Label''' of the USB flash drive {{ic|X:}} to match the LABEL mentioned in the {{ic|1=archisolabel=}} part in {{ic|<ISO>\loader\entries\archiso-x86_64.conf}}. This step is required for Official ISO ([[Archiso]]) but not required for [[Archboot]]. This step can be also performed using Rufus, during the prior "partition and format" step.<br />
<br />
* Extract the ISO (similar to extracting ZIP archive) to the USB flash drive (using [http://7-zip.org/ 7-Zip]. <br />
<br />
* Download official syslinux 6.xx binaries (zip file) from https://www.kernel.org/pub/linux/utils/boot/syslinux/ and extract it. The version of Syslinux should be the same version used in the ISO image.<br />
<br />
* Run the following command (in Windows cmd prompt, as admin):<br />
<br />
{{Note|Use {{ic|X:\boot\syslinux\}} for Archboot iso.}}<br />
<br />
> cd bios\<br />
> for /r %Y in (*.c32) do copy "%Y" "X:\arch\boot\syslinux\" /y<br />
> copy mbr\*.bin X:\arch\boot\syslinux\ /y<br />
<br />
* Install Syslinux to the USB by running (use {{ic|win64\syslinux64.exe}} for x64 Windows):<br />
<br />
{{Note|Use {{ic|-d /boot/syslinux}} for Archboot iso.}}<br />
<br />
> cd bios\<br />
> win32\syslinux.exe -d /arch/boot/syslinux -i -a -m X:<br />
<br />
{{Note|<br />
* The above step installs Syslinux's {{ic|ldlinux.sys}} to the VBR of the USB partition, sets the partition as "active/boot" in the MBR partition table and writes the MBR boot code to the 1st 440-byte boot code region of the USB.<br />
<br />
* The {{ic|-d}} switch expects a path with forward slash path-separator like in *unix systems.<br />
}}<br />
<br />
== Other Methods for BIOS systems ==<br />
<br />
=== In GNU/Linux ===<br />
<br />
==== Using a multiboot USB drive ====<br />
This allows booting multiple ISOs from a single USB device, including the archiso. Updating an existing USB drive to a more recent ISO is simpler than for most other methods. See [[Multiboot USB drive]].<br />
<br />
==== Using UNetbootin ====<br />
<br />
UNetbootin can be used on any Linux distribution or Windows to copy your iso to a USB device. However, Unetbootin overwrites syslinux.cfg, so it creates a USB device that does not boot properly. For this reason, '''Unetbootin is not recommended''' -- please use {{ic|dd}} or one of the other methods discussed in this topic.<br />
{{Warning|UNetbootin writes over the default {{ic|syslinux.cfg}}; this must be restored before the USB device will boot properly.}}<br />
<br />
Edit {{ic|syslinux.cfg}}:<br />
<br />
{{hc|sysconfig.cfg|2=<br />
default menu.c32<br />
prompt 0<br />
menu title Archlinux Installer<br />
timeout 100<br />
<br />
label unetbootindefault<br />
menu label Archlinux_x86_64<br />
kernel /arch/boot/x86_64/vmlinuz<br />
append initrd=/arch/boot/x86_64/archiso.img archisodevice=/dev/sd'''x1''' ../../<br />
<br />
label ubnentry0<br />
menu label Archlinux_i686<br />
kernel /arch/boot/i686/vmlinuz<br />
append initrd=/arch/boot/i686/archiso.img archisodevice=/dev/sd'''x1''' ../../<br />
}}<br />
<br />
In {{ic|/dev/sd'''x1'''}} you must replace '''x''' with the first free letter after the last letter in use on the system where you are installing Arch Linux (e.g. if you have two hard drives, use {{ic|c}}.). You can make this change during the first phase of boot by pressing {{ic|Tab}} when the menu is shown.<br />
<br />
=== In Windows ===<br />
<br />
==== Win32 Disk Imager ====<br />
<br />
{{Warning|This will destroy all information on your USB flash drive!}}<br />
First, download the program from [http://sourceforge.net/projects/win32diskimager/ here]. Next, extract the archive and run the executable. Now, select the Arch Linux ISO under the {{ic|Image File}} section and the USB flash device letter (for example, [D:\]) under the {{ic|Device}} section. Finally, click {{ic|Write}} when ready.<br />
{{Note|After installation, you may need to restore the USB flash drive following a process as outlined [[USB_Installation_Media#How_to_restore_the_USB_drive|here]].}}<br />
<br />
==== USBWriter for Windows ====<br />
<br />
Download the program from http://sourceforge.net/projects/usbwriter/ and run it. Select the arch image file, the target USB stick, and click on the {{ic|write}} button. Now you should be able to boot from the usb stick and install Arch Linux from it.<br />
<br />
==== The Flashnul way ====<br />
<br />
[https://translate.google.com/translate?hl=&sl=ru&tl=en&u=http%3A%2F%2Fshounen.ru%2Fsoft%2Fflashnul%2Freadme.rus.html&sandbox=1 flashnul] is an utility to verify the functionality and maintenance of Flash-Memory (USB-Flash, IDE-Flash, SecureDigital, MMC, MemoryStick, SmartMedia, XD, CompactFlash etc).<br />
<br />
From a command prompt, invoke flashnul with {{ic|-p}}, and determine which device index is your USB drive, e.g.:<br />
<br />
{{hc|C:\>flashnul -p|<br />
Avaible physical drives:<br />
Avaible logical disks:<br />
C:\<br />
D:\<br />
E:\<br />
}}<br />
<br />
When you have determined which device is the correct one, you can write the image to your drive, by invoking flashnul with the device index, {{ic|-L}}, and the path to your image, e.g:<br />
<br />
C:\>flashnul '''E:''' -L ''path\to\arch.iso''<br />
<br />
As long as you are really sure you want to write the data, type yes, then wait a bit for it to write. If you get an access denied error, close any Explorer windows you have open.<br />
<br />
If under Vista or Win7, you should open the console as administrator, or else flashnul will fail to open the stick as a block device and will only be able to write via the drive handle windows provides<br />
<br />
{{Note|Confirmed that you need to use drive letter as opposed to number. flashnul 1rc1, Windows 7 x64.}}<br />
<br />
==== Loading the installation media from RAM ====<br />
<br />
{{Merge|Multiboot USB drive#Using Syslinux and memdisk|This is the same method, only Syslinux is installed from Windows. Considering that [[multiboot USB drive]] can be used to boot an installation media and it is already linked from the Related articles box at the top, maybe this section should be merged there?}}<br />
<br />
This method uses [[Syslinux]] and a [[Ramdisk]] ([http://www.syslinux.org/wiki/index.php/MEMDISK MEMDISK]) to load the entire Arch Linux ISO image into RAM. Since this will be running entirely from system memory, you will need to make sure the system you will be installing this on has an adequate amount. A minimum amount of RAM between 500 MB and 1 GB should suffice for a MEMDISK based, Arch Linux install.<br />
<br />
For more information on Arch Linux system requirements as well as those for MEMDISK see the [[Beginners' guide]] and [http://www.etherboot.org/wiki/bootingmemdisk#preliminaries here]{{Dead link|2014|12|01}}. For reference, here is the [https://bbs.archlinux.org/viewtopic.php?id=135266 preceding forum thread].<br />
<br />
{{Tip|Once the installer has completed loading you can simply remove the USB stick and even use it on a different machine to start the process all over again. Utilizing MEMDISK also allows booting and installing Arch Linux to and from the same USB flash drive.}}<br />
<br />
===== Preparing the USB flash drive =====<br />
<br />
Begin by formatting the USB flash drive as '''FAT32'''. Then create the following folders on the newly formatted drive.<br />
* {{ic|Boot}}<br />
** {{ic|Boot/ISOs}}<br />
** {{ic|Boot/Settings}}<br />
<br />
===== Copy the needed files to the USB flash drive =====<br />
<br />
Next copy the ISO that you would like to boot to the {{ic|Boot/ISOs}} folder. After that, extract from the following files from the latest release of {{pkg|syslinux}} from [http://www.kernel.org/pub/linux/utils/boot/syslinux/ here] and copy them into the following folders.<br />
* {{ic|./win32/syslinux.exe}} to the Desktop or Downloads folder on your system.<br />
* {{ic|./memdisk/memdisk}} to the {{ic|Settings}} folder on your USB flash drive.<br />
<br />
===== Create the configuration file =====<br />
<br />
After copying the needed files, navigate to the USB flash drive, /boot/Settings and create a {{ic|syslinux.cfg}} file.<br />
{{Warning|On the {{ic|INITRD}} line, be sure to use the name of the ISO file that you copied to your {{ic|ISOs}} folder!}}<br />
{{hc|/Boot/Settings/syslinux.cfg|2=<br />
DEFAULT arch_iso<br />
<br />
LABEL arch_iso<br />
MENU LABEL Arch Setup<br />
LINUX memdisk<br />
INITRD /Boot/ISOs/archlinux-2014.12.01-dual.iso<br />
APPEND iso}}<br />
For more information on Syslinux see the [[Syslinux|Arch Wiki article]].<br />
<br />
===== Final steps =====<br />
<br />
Finally, create a {{ic|*.bat}} file where {{ic|syslinux.exe}} is located and run it ("Run as administrator" if you are on Vista or Windows 7):<br />
{{hc|C:\Documents and Settings\username\Desktop\install.bat|<br />
@echo off<br />
syslinux.exe -m -a -d /Boot/Settings X:}}<br />
<br />
== Troubleshooting ==<br />
<br />
* For the [[#Loading the installation media from RAM|MEMDISK Method]], if you get the famous "30 seconds" error trying to boot the i686 version, press the {{ic|Tab}} key over the {{ic|Boot Arch Linux (i686)}} entry and add {{ic|vmalloc&#61;448M}} at the end. For reference: ''If your image is bigger than 128MiB and you have a 32-bit OS, then you have to increase the maximum memory usage of vmalloc''. [http://www.syslinux.org/wiki/index.php/MEMDISK#-_memdiskfind_in_combination_with_phram_and_mtdblock]<br />
<br />
* If you get the "30 seconds" error due to the {{ic|/dev/disk/by-label/ARCH_XXXXYY}} not mounting, try renaming your USB media to {{ic|ARCH_XXXXYY}} (e.g. {{ic|ARCH_201412}}).<br />
<br />
== See Also ==<br />
<br />
* [https://wiki.gentoo.org/wiki/LiveUSB/HOWTO Gentoo wiki - LiveUSB/HOWTO]<br />
* [https://fedoraproject.org/wiki/How_to_create_and_use_Live_USB Fedora wiki - How to create and use Live USB]<br />
* [http://en.opensuse.org/SDB:Live_USB_stick openSUSE wiki - SDB:Live USB stick]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Openbox&diff=347372Openbox2014-11-30T18:11:00Z<p>Sudowoodo: /* Using obxprop for faster configuration */</p>
<hr />
<div>[[Category:Stacking WMs]]<br />
[[cs:Openbox]]<br />
[[de:Openbox]]<br />
[[es:Openbox]]<br />
[[fr:Openbox]]<br />
[[it:Openbox]]<br />
[[ja:Openbox]]<br />
[[ko:Openbox]]<br />
[[lt:Openbox]]<br />
[[nl:Openbox]]<br />
[[pl:Openbox]]<br />
[[ru:Openbox]]<br />
[[sk:Openbox]]<br />
[[sr:Openbox]]<br />
[[tr:Openbox]]<br />
[[zh-CN:Openbox]]<br />
[[zh-TW:Openbox]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|File manager functionality}}<br />
{{Related|Window manager}}<br />
{{Related|Oblogout}}<br />
{{Related articles end}}<br />
<br />
Openbox is a lightweight, powerful, and highly configurable ''stacking'' [[Window manager|window manager]] with extensive standards support. It may be built upon and run independently as the basis of a unique [[desktop environment]], or within other integrated desktop environments such as [[KDE]] and [[Xfce]], as an alternative to the window managers they provide. The [[LXDE]] desktop environment is itself built around Openbox.<br />
<br />
A comprehensive list of features are documented at the [http://openbox.org/ official Openbox website]. This article pertains to specifically installing Openbox under Arch Linux.<br />
<br />
== Installation ==<br />
<br />
Install {{Pkg|openbox}} from the [[official repositories]].<br />
<br />
=== Standalone ===<br />
<br />
[[Display manager|display managers]] will automatically detect Openbox, allowing for it to be run as a standalone session.<br />
<br />
When using [[Xinitrc]] or [[SLiM]], add the following line:<br />
<br />
exec openbox-session<br />
<br />
{{Note|Specifying {{ic|openbox}} instead of {{ic|openbox-session}} will prevent [[#autostart|autostart]] in {{ic|/etc/xdg/autostart}}.}}<br />
<br />
=== Other desktop environments ===<br />
<br />
When replacing the native window manager of a [[desktop environment]] with Openbox, keep in mind that Openbox does not provide any compositing effects (such as transparency). See [[#Compositing effects]].<br />
<br />
==== GNOME ====<br />
<br />
{{ic|GNOME Shell}} is plugin for {{Pkg|mutter}}, so can not be used with Openbox. Openbox does work with GNOME applications (but see [[GTK+#Client-side decorations]]). [http://comments.gmane.org/gmane.comp.window-managers.openbox/6595]<br />
<br />
==== KDE ====<br />
<br />
See [[KDE#KDE/Openbox Session]].<br />
<br />
==== Xfce ====<br />
<br />
See [[Xfce#Default window manager]].<br />
<br />
== Configuration==<br />
<br />
{{Note|Local configuration files will always override global equivalents.}}<br />
<br />
Four key files form the basis of the openbox configuration, each serving a unique role. They are: {{ic|rc.xml}}, {{ic|menu.xml}}, {{ic|autostart}}, and {{ic|environment}}. Although these files are discussed in more detail below, to start configuring Openbox, it will first be necessary to create a '''local''' Openbox profile (i.e for your specific user account) based on them. This can be done by copying them from the '''global''' {{ic|/etc/xdg/openbox}} profile (applicable to any and all users) as a template:<br />
<br />
$ mkdir -p ~/.config/openbox<br />
$ cp -R /etc/xdg/openbox/* ~/.config/openbox<br />
<br />
=== rc.xml ===<br />
<br />
{{Tip|Custom keyboard shortcuts (keybindings) must be added to the {{ic|<keyboard>}} section of this file, and underneath the {{ic|<nowiki><!-- Keybindings for running aplications --></nowiki>}} heading.}}<br />
<br />
{{ic|~/.config/openbox/rc.xml}} is the main configuration file, responsible for determining the behaviour and settings of the overall session, including:<br />
<br />
* Keyboard shortcuts (e.g. starting applications; controlling the volume)<br />
* Theming<br />
* Desktop and Virtual desktop settings, and<br />
* Application Window settings<br />
<br />
This file is also pre-configured, meaning that it will only be necessary to amend existing content in order to customise behaviour to suit personal preference.<br />
<br />
=== menu.xml ===<br />
<br />
{{ic|~/.config/openbox/menu.xml}} defines the type and behaviour of the desktop menu, accessable by right-clicking the background. Although the default provided is a '''static menu''' (meaning that it will not automatically update when new applications are installed), it is possible to employ the use of '''dynamic menus''' that will automatically update as well. <br />
<br />
The available options are discussed extensively below in the [[#Menus|Menus]] section.<br />
<br />
=== autostart ===<br />
<br />
{{Note|In addition to sourcing the '''local''' {{ic|~/.config/openbox/autostart}} file to autostart applications, Openbox will also source {{ic|.desktop}} files automatically installed by some packages in the '''global''' {{ic|/etc/xdg/autostart}} directory. The package responsible for allowing Openbox to additionally source the {{ic|/etc/xdg/autostart}} directory is {{Pkg|python2-xdg}}.}}<br />
<br />
{{Poor writing|Simplify this paragraph and merge it to the note above}}<br />
<br />
For example, where initially autostarting a package such as the [[NetworkManager|Network Manager]] applet ('''nm-applet''') locally, should {{Pkg|python2-xdg}} be installed at a later time - either explicitly or as a dependency for another package - its global XDG {{ic|.desktop}} file will then also be sourced as a consequence, resulting in seeing two icons running in the system tray. It is therefore recommended to install {{Pkg|python2-xdg}} explicitly, as this will ensure that applications that should automatically autostart when installed will do so.<br />
<br />
Where expected {{ic|Home}} folders such as {{ic|Downloads}}, {{ic|Documents}}, etc., are not present, then please review the [[Xdg user directories]] article.<br />
<br />
Each and every command in {{ic|~/.config/openbox/autostart}} '''must''' be terminated with an ampersand ({{ic|&}}). Where a command does not end with an ampersand, then no further commands listed below it will be executed.<br />
<br />
It is also recommended to add delays to the execution of some or all commands in the autostart file, even if only by a single second. The consequence of not doing so is that all commands will be executed simultaneously, potentially resulting in the mis- or non-starting of items. The syntax of the command to delay the execution of commands (in seconds) is:<br />
<br />
(sleep <number of seconds>s && <command>) &<br />
<br />
For example, to delay the execution of [[Conky]] by 3 seconds, the command would be (and note the termination of it with an ampersand):<br />
<br />
(sleep 3s && conky) &<br />
<br />
=== environment ===<br />
<br />
{{ic|~/.config/openbox/environment}} can be used to export and set relevant environmental variables such as to:<br />
<br />
* Define new pathways (e.g. execute commands that would otherwise require the entire pathway to be listed with them)<br />
* Change language settings, and<br />
* Define other variables to be used (e.g. the fix for GTK theming could be listed here)<br />
<br />
=== GUI configuration ===<br />
<br />
{{Poor writing|Use Template:App}}<br />
<br />
Several GUIs are available to quickly and easily configure your Openbox desktop. From the official repositories these include:<br />
<br />
* {{Pkg|obconf}}: Basic Openbox configuration manager<br />
* {{Pkg|lxappearance-obconf}}: LXDE configuration manager (provides additional options)<br />
* {{Pkg|lxinput}}: LXDE keyboard and mouse configuration<br />
* {{Pkg|lxrandr}}: LXDE monitor configuration<br />
<br />
Others, such as {{AUR|obkey}} (configure keyboard shortcuts via the {{ic|rc.xml}} file) and {{AUR|ob-autostart}} (configure the Openbox {{ic|autostart}} file) are available from the [[AUR]]. Programs and applications relating to the configuration of Openbox's desktop menu are discussed in the [[#Menus|Menus]] section.<br />
<br />
== Openbox reconfiguration ==<br />
<br />
{{Tip|where not already present, it would be worthwhile adding this command to a menu and/or as a keybind for convenience.}}<br />
<br />
Openbox will not always automatically reflect any changes made to its configuration files within a session. As a consequence, it will be necessary to manually reload those files after they have been edited. To do so, enter the following command:<br />
<br />
$ openbox --reconfigure<br />
<br />
Where intending to add this command as a keybinnd to {{ic|~/.config/openbox/rc.xml}}, it will only be necessary to list the command as {{ic|reconfigure}}. An example has been provided below, using the {{ic|Super}}+{{ic|F11}} keybind:<br />
<br />
<keybind key="W-F11"><br />
<action name="Reconfigure"/><br />
</keybind><br />
<br />
== Keybinds ==<br />
<br />
All keybinds must be added to the {{ic|~/.config/openbox/rc.xml}} file, and below the {{ic|<nowiki><!-- Keybindings for running aplications --></nowiki>}} heading. Although a brief overview has been provided here, a more in-depth explanation of keybindings can be found at [http://openbox.org/wiki/Help:Bindings openbox.org]. There is a utility 'obkey' in AUR for adjust key-binding. Before use obkey, you should use obconf to create {{ic|~/.config/openbox/rc.xml}}.<br />
<br />
=== Special keys ===<br />
<br />
While the use of standard alpha-numeric keys for keybindings is self-explanatory, special names are assigned to other types of keys, such as {{ic|modifers}}, {{ic|multimedia}} keys and {{ic|navigation}} keys.<br />
<br />
==== Modifiers ====<br />
<br />
{{ic|Modifer}} keys play an important role in keybindings (e.g. holding down the {{ic|shift}} or {{ic|CTRL / control}} key in combination with another key to undertake an action). Using modifers helps to prevent conflicting keybinds, whereby two or more actions are linked to the same key or combination of keys. The syntax to use a modifer with another key is:<br />
<br />
"<modifier>-<key>"<br />
<br />
The modifer codes are as follows:<br />
<br />
* {{ic|S}}: Shift<br />
* {{ic|C}}: Control / CTRL<br />
* {{ic|A}}: Alt<br />
* {{ic|W}}: Super / Windows<br />
* {{ic|M}}: Meta<br />
* {{ic|H}}: Hyper (If it is bound to something) <br />
<br />
For example, the code below would use {{ic|super}} and {{ic|t}} to launch {{Pkg|lxterminal}}<br />
<br />
<keybind key="W-t"><br />
<action name="Execute"><br />
<command>lxterminal</command><br />
</action><br />
</keybind><br />
<br />
==== Multimedia keys ====<br />
<br />
{{Merge|Extra keyboard keys in Xorg}}<br />
<br />
Where available, it is possible to set the appropriate {{ic|multimedia}} keys to perform their intended functions, such as to control the volume and/or the screen brightness. These will usually be integrated into the {{ic|function}} keys, and are identified by their appropriate symbols. See [[Extra keyboard keys]] for details.<br />
<br />
The volume and brightness multimedia codes are as follows (note that commands will still have to be assigned to them to actually function):<br />
<br />
* {{ic|XF86AudioRaiseVolume}}: Increase volume<br />
* {{ic|XF86AudioLowerVolume}}: Decrease volume<br />
* {{ic|XF86AudioMute}}: Mute / unmute volume<br />
* {{ic|XF86MonBrightnessUp}}: Increase screen brightess<br />
* {{ic|XF86MonBrightnessDown}}: Decrease screen brightness<br />
<br />
Examples of how these may be used in {{ic|~/.config/openbox/rc.xml}} have been provided below.<br />
<br />
==== Navigation keys ====<br />
<br />
These are the directional / arrow keys, usually used to move the cursor up, down, left, or right. The (self-explanatory) navigation codes are as follows:<br />
<br />
* {{ic|Up}}: Up<br />
* {{ic|Down}}: Down<br />
* {{ic|Left}}: Left<br />
* {{ic|Right}}: Right<br />
<br />
=== Volume Control ===<br />
<br />
What commands should be used for controlling the volume will depend on whether [[ALSA]], [[PulseAudio]], or [[OSS]] is used for sound.<br />
<br />
==== ALSA ====<br />
<br />
If [[ALSA]] is used for sound, the {{ic|amixer}} program can be used to adjust the volume, which is part of the {{Pkg|alsa-utils}} package. The following example - using the {{ic|multimedia}} keys intended to control the volume - will adjust the volume by +/- 5% (which may be changed, as desired):<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
==== Pulseaudio ====<br />
<br />
Where using [[PulseAudio]] with [[ALSA]] as a backend, the {{ic|amixer}} program commands will have to be modifed, as illustrated below in comparison to the ALSA example:<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
==== OSS ====<br />
<br />
{{Note|This option may be suitable for more experienced users.}}<br />
<br />
Where using [[OSS]], it is possible to create keybindings to raise or lower specific mixers. This allows, for example, the volume of a specific application (such as an audio player) to be changed without changing the overall system volume settings in turn. In this instance, the application must first have been [[OSS#Configuring_Applications_for_OSS|configured]] to use its own mixer. <br />
<br />
In the following example, [[MPD]] has been configured to use its own mixer - also named {{ic|mpd}} - to increase and decrease the volume by a single decibel at a time. The {{ic|--}} that appears after the {{ic|ossmix}} command has been added to prevent a negative value from being treated as an argument: <br />
<br />
<keybind key="[chosen keybind]"><br />
<action name="Execute"><br />
<command>ossmix -- mpd +1</command><br />
</action><br />
</keybind><br />
<keybind key="[chosen keybind]"><br />
<action name="Execute"><br />
<command>ossmix -- mpd -1</command><br />
</action><br />
</keybind><br />
<br />
=== Media player control ===<br />
<br />
The {{AUR|playerctl}} command-line utility can be used to bind multimedia keys to player actions. It should work with most media players.<br />
<br />
<keybind key="XF86AudioPlay"><br />
<action name="Execute"><br />
<command>playerctl play</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioPause"><br />
<action name="Execute"><br />
<command>playerctl pause</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioNext"><br />
<action name="Execute"><br />
<command>playerctl next</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioPrev"><br />
<action name="Execute"><br />
<command>playerctl previous</command><br />
</action><br />
</keybind><br />
<br />
=== Brightness control ===<br />
<br />
The {{ic|xbacklight}} program is used to control screen brightness, which is part of the [[Xorg]] X-Window system. In the example below, the {{ic|multimedia}} keys intended to control the screen brightness will adjust the settings by +/- 10%:<br />
<br />
<keybind key="XF86MonBrightnessUp"><br />
<action name="Execute"><br />
<command>xbacklight +10</command><br />
</action><br />
</keybind><br />
<keybind key="XF86MonBrightnessDown"><br />
<action name="Execute"><br />
<command>xbacklight -10</command><br />
</action><br />
</keybind><br />
<br />
=== Window snapping ===<br />
<br />
Many desktop environments and window managers support ''window snapping'' (e.g. Windows 7 Aero snap), whereby they will automatically snap into place when moved to the edge of the screen. This effect can also be simulated in Openbox through the use of keybinds on focused windows. <br />
<br />
As illustrated in the example below, percentages must be used to determine window sizes (see [http://openbox.org/wiki/Help:Actions openbox.org] for further information). In this instance, The {{ic|super}} key is used in conjunction with the {{ic|navigation}} keys:<br />
<br />
<keybind key="W-Left"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>west</direction></action><br />
</keybind><br />
<keybind key="W-Right"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>east</direction></action><br />
</keybind><br />
<br />
However, it should be noted that once a window has been 'snapped' to an edge, it will remain vertically maximised unless subsequently maximised and then restored. The solution is to implement additional keybinds - in this instance using the {{ic|down}} and {{ic|up}} keys - to do so. This will also make pulling 'snapped' windows from screen edges faster as well:<br />
<br />
<keybind key="W-Down"><br />
<action name="Unmaximize"/><br />
</keybind><br />
<keybind key="W-Up"><br />
<action name="Maximize"/><br />
</keybind><br />
<br />
This [http://ubuntuforums.org/showthread.php?t=1796793 Ubuntu forum thread] provides more information. Applications such as {{AUR|opensnap-git}} are also available from the AUR to automatically simulate window snapping behaviour without the use of keybinds.<br />
<br />
=== Desktop menu ===<br />
<br />
It is also possible to create a keybind to access the desktop menu. For example, the following code will bring up the menu by pressing {{ic|CTRL}} + {{ic|m}}:<br />
<br />
<keybind key="C-m"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
<br />
== Menus ==<br />
<br />
It is possible to employ three types of menu in Openbox: {{ic|static}}, {{ic|pipes}} (dynamic), and {{ic|generators}} (static or dynamic). They may also be used alone or in any combination.<br />
<br />
=== Static ===<br />
<br />
As the name would suggest, this default type of menu does not change in any way, and may be manually edited and/or (re)generated automatically through the use on an appropriate software package.<br />
<br />
Fast and efficient, while this type of menu can be used to select applications, it can also be useful to access specific functions and/or perform specific tasks (e.g. desktop configuration), leaving the access of applications to another process (e.g. the {{Pkg|synapse}} or {{Pkg|xfce4-appfinder}} applications).<br />
<br />
The {{ic|~/.config/openbox/menu.xml}} file will be the sole source of static desktop menu content.<br />
<br />
==== menumaker ====<br />
<br />
{{Warning|A root terminal '''must''' be installed in order to use MenuMaker, even though a standard user terminal may be used to run it. {{Pkg|xterm}} is a good choice.}}<br />
<br />
{{Pkg|menumaker}} automatically generates {{ic|xml}} menus for several window managers, including Openbox, [[Fluxbox]], [[IceWM]] and [[Xfce]]. It will search for all installed executable programs and consequently create a menu file for them. It is also possible to configure MenuMaker to exclude certain application types (e.g. relating to [[GNOME]] or [[KDE]]), if desired.<br />
<br />
Once installed and executed, it will automatically generate a new {{ic|~/.config/openbox/menu.xml}} file. To avoid overwriting an existing file, enter:<br />
<br />
$ mmaker -v OpenBox3<br />
<br />
Otherwise, to overwrite an existing file, add the {{ic|force}} argument ({{ic|f}}):<br />
<br />
$ mmaker -vf OpenBox3<br />
<br />
Once a new {{ic|~/.config/openbox/menu.xml}} file has been generated it may then be manually edited, or configured using a GUI menu editor, such as {{Pkg|obmenu}}.<br />
<br />
==== obmenu ====<br />
<br />
{{Warning|{{ic|obm-xdg}} - a pipe menu to generate a list of [[GTK+]] and [[GNOME]] applications - is also provided with obmenu. However, it has long-running bugs whereby it may produce an invalid output, or even not function at all. Consequently it has been omitted from discussion.}}<br />
<br />
{{Pkg|obmenu}} is a "user-friendly" GUI application to edit {{ic|~/.config/openbox/menu.xml}}, without the need to code in {{ic|xml}}.<br />
<br />
==== xdg-menu ====<br />
<br />
{{Pkg|archlinux-xdg-menu}} will automatically generate a menu based on {{ic|xdg}} files contained within the {{ic|/etc/xdg/}} directory for numerous Window Managers, including Openbox. Review the [[Xdg-menu#OpenBox]] article for further information.<br />
<br />
==== logout menu options ====<br />
<br />
{{Tip|The commands provided can also be attached to [[#Keybinds|keybinds]].}}<br />
<br />
The {{ic|~/.config/openbox/menu.xml}} file can be edited in order to provide a sub-menu with the same options as provided by [[#oblogout|oblogout]]. The sample script below will provide all of these options, with the exception of the ability to lock the screen:<br />
<br />
<menu id="exit-menu" label="Exit"><br />
<item label="Log Out"><br />
<action name="Execute"><br />
<command>openbox --exit</command><br />
</action><br />
</item><br />
<item label="Shutdown"><br />
<action name="Execute"><br />
<command>systemctl poweroff</command><br />
</action><br />
</item><br />
<item label="Restart"><br />
<action name="Execute"><br />
<command>systemctl reboot</command><br />
</action><br />
</item><br />
<item label="Suspend"><br />
<action name="Execute"><br />
<command>systemctl suspend</command><br />
</action><br />
</item><br />
<item label="Hibernate"><br />
<action name="Execute"><br />
<command>systemctl hibernate</command><br />
</action><br />
</item><br />
</menu><br />
<br />
Once the entries have been composed, add the following line to present the sub-menu where desired within the main desktop menu (usually as the last entry):<br />
<br />
<menu id="exit-menu"/><br />
<br />
=== Pipes ===<br />
<br />
{{Tip|It is entirely feasible for a static menu to contain one or more pipe sub-menus. The functionality of some pipe menus may also rely on the installation of relevant software packages.}}<br />
<br />
This type of menu is in essence a script that provides dynamic, refreshed lists on-the-fly as and when run. These lists may be used for multiple purposes, including to list applications, to provide information, and to provide control functions. Pre-configured pipe menus can be installed, although not from the [[official repositories]]. More experienced users can also modify and/or create their own custom scripts. Again, {{ic|~/.config/openbox/menu.xml}} may and commonly will contain several pipe menus.<br />
<br />
==== Examples ====<br />
<br />
* {{AUR|openbox-xdgmenu}}: fast xdg-menu converter to xml-pipe-menu<br />
* {{AUR|obfilebrowser}}: Application and file browser<br />
* {{AUR|obdevicemenu}}: Management of removable media with [[Udisks]]<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=1345031 wifi pipe menu]: Wireless networking using [[Netctl]]<br />
<br />
[http://openbox.org/download-pipemenus.php Openbox.org] also provides a further list of pipe menus.<br />
<br />
=== Generators ===<br />
<br />
This type of menu is akin to those provided by the taskbars of desktop environments such as [[Xfce]] or [[LXDE]]. Automatically updating on-the-fly, this type of menu can be powerful and very convenient. It may also be possible to add custom categories and menu entries; read the documentation for your intended dynamic menu to determine if and how this can be done.<br />
<br />
A menu generator will have to be executed from the {{ic|~/.config/openbox/menu.xml}} file.<br />
<br />
==== obmenu-generator ====<br />
<br />
{{Tip|icons can still be disabled in {{AUR|obmenu-generator}}, even where enabled in {{ic|~/.config/openbox/rc.xml}}.}}<br />
<br />
{{AUR|obmenu-generator}} is currently only available from the [[AUR]], although it is still highly recommended. With the ability to be used as a static or dynamic menu, it is highly configurable, powerful, and versatile. Menu categories and individual entries may also be easily hidden, customised, and/or added with ease. The [http://trizenx.blogspot.co.uk/2012/02/obmenu-generator.html official homepage] provides further information and screenshots.<br />
<br />
Below is an example of how obmenu-generator would be dynamically executed without icons in {{ic|~/.config/openbox/menu.xml}}:<br />
<br />
<?xml version="1.0" encoding="utf-8"?><br />
<openbox_menu><br />
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator"><br />
</menu><br />
</openbox_menu><br />
<br />
To automatically iconify entries, the {{ic|-i}} option would be added:<br />
<br />
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator -i"><br />
<br />
==== openbox-menu ====<br />
<br />
{{Tip|If this menu produces an error, it may be solved by enabling icons in {{ic|~/.config/openbox/rc.xml}}.}}<br />
<br />
{{AUR|openbox-menu}} uses the [[LXDE]] [http://sourceforge.net/projects/lxde/files/menu-cache/ menu-cache] to create dynamic menus. The [http://mimasgpc.free.fr/openbox-menu_en.html official homepage] provides further information and screenshots.<br />
<br />
==== obmenugen ====<br />
<br />
{{AUR|Obmenugen}} is currently only available from the [[AUR]], and can be used to a generate static or dynamic application menu based on {{ic|.desktop}} files. The [http://obmenugen.sourceforge.net/ official homepage] provides further information.<br />
<br />
=== Menu icons ===<br />
<br />
To show icons next to menu entries, it will be necessary to ensure they are enabled in the {{ic|<menu>}} section of the {{ic|~/.config/openbox/rc.xml}} file:<br />
<br />
<applicationIcons>yes</applicationIcons><br />
<br />
Where using a static menu, it will then be necessary to edit the {{ic|~/.config/openbox/menu.xml}} file to provide both the {{ic|icon <nowiki>=</nowiki>}} command, along with the full path and icon name for each entry. An example of the syntax used to provide an icon for a category is:<br />
<br />
<menu id="apps-menu" label="[label name]" icon="[pathway to icon]/[icon name]"><br />
<br />
=== Desktop menu as a panel menu ===<br />
<br />
{{Tip|XDoTool can simulate any keybind for any action, and as such, it may therefore be used for many other purposes...}}<br />
<br />
{{Pkg|xdotool}} is a package that can issue commands to simulate key presses / keybinds, meaning that it is possible to use it to invoke keybind-related actions without having to actually press their assigned keys. As this includes the ability to invoke an assigned keybind for the Openbox desktop menu, it is therefore possible to use XDoTool to turn the Openbox desktop menu into a panel menu. Especially where the desktop menu is heavily customised and feature-rich, this may prove very useful to:<br />
<br />
* Replace an existing panel menu<br />
* Implement a panel menu where otherwise not provided or possible (e.g. for {{AUR|tint2-svn}})<br />
* Compensate where losing access to the desktop menu due to the use of an application like [[#xfdesktop|xfdesktop]] to [[#Desktop icons and wallpapers|manage the desktop]].<br />
<br />
Once XDoTool has been installed - if not already present - it will be necessary to create a keybind to access the root menu in {{ic|~/.config/openbox/rc.xml}}, and again below the {{ic|<nowiki><</nowiki>!-- Keybindings for running aplications --<nowiki>></nowiki>}} heading. For example, the following code will bring up the menu by pressing {{ic|CTRL}} + {{ic|m}}:<br />
<br />
<keybind key="C-m"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
<br />
Openbox must then be [[#Openbox reconfiguration|re-configured]]. In this instance, XDoTool will be used to simulate the {{ic|CTRL}} + {{ic|m}} keypress to access the desktop menu with the following command (note the use of {{ic|+}} in place of {{ic|-}}):<br />
<br />
xdotool key control+m<br />
<br />
How this command may be used as a panel launcher / icon is largely dependent on the features of panel used. While some panels will allow the above command to be executed directly in the process of creating a new launcher, others may require the use of an executable script. As an example, a custom executable script called {{ic|obpanelmenu.sh}} will be created in the {{ic|~/.config}} folder:<br />
<br />
$ ''text editor'' ~/.config/obpanelmenu.sh<br />
<br />
Once the empty file has been opened, the appropriate XDoTool command must be added to the empty file (i.e. to simulate the {{ic|CTRL}} + {{ic|m}} keypress for this example):<br />
<br />
xdotool key control+m<br />
<br />
After the file has been saved and closed, it may then be made into an executable script with the following command:<br />
<br />
$ chmod +x ~/.config/obpanelmenu.sh<br />
<br />
Executing it will bring up the Openbox desktop menu. Consequently, where using a panel that supports drag-and-drop functionality to add new launchers, simply drag the executable script onto it before changing the icon to suit personal taste. For instructions on how to use this executable script with {{AUR|tint2-svn}} - a derivative of the popular {{Pkg|tint2}} panel that allows launchers to be added - see [[Tint2#Application_Launchers_in_tint2-svn_.28AUR.29|Tint2-Svn launchers]].<br />
<br />
== GTK+ desktop theming ==<br />
<br />
{{Tip|It is '''strongly advised''' to install the {{Pkg|obconf}} and {{Pkg|lxappearance-obconf}} GUI applications to configure visual settings and theming. The latter is particularly important as it is responsible for generating the {{ic|~/.gtkrc-2.0}} file (see the [[Openbox#GTK+ 2|GTK fix]]{{Dead link|2014-11-28}} section).}}<br />
<br />
It is important to note that a substantial range of both '''Openbox-specific''' and generalised, '''Openbox-compatible''' [[GTK]] themes are available to change the look of window decorations and the desktop menu. ''Generalised'' themes are designed to be simultaneously compatible with a range of popular desktop environments and/or window managers, commonly including Openbox. See these [https://aur.archlinux.org/packages/?O=0&C=0&SeB=n&K=gtk-theme-&outdated=&SB=n&SO=a&PP=50&do_Search=Go package descriptions] for examples. <br />
<br />
=== Configuration ===<br />
<br />
{{Pkg|obconf}} and/or {{Pkg|lxappearance-obconf}} should be used to select and configure available GTK themes. See [[Uniform Look for Qt and GTK Applications]] for information about theming Qt based applications like [[VirtualBox]] or [[Skype]].<br />
<br />
=== Installation: official and AUR ===<br />
<br />
A good selection of {{Pkg|openbox-themes}} are available from the official repositories.<br />
<br />
Both Openbox-specific and Openbox-compatible themes installed from the [[Official_repositories|official repositories]] and/or the [[AUR]] will be automatically installed to the {{ic|/usr/share/themes}} directory. Both will also be immediately available for selection.<br />
<br />
=== Installation: other sources ===<br />
<br />
[http://www.box-look.org/index.php?xcontentmode=7402 box-look.org] is an excellent and well-established source of themes. [http://www.deviantart.com/ deviantART.com] is another excellent resource. Many more can be found through the utilisation of a search engine.<br />
<br />
=== Troubleshooting ===<br />
<br />
There are two particular problems that may be encountered on rare occasions, especially where downloading themes from unsupported websites. These have been addressed below.<br />
<br />
==== Theme cannot be used ====<br />
<br />
If for any reason the newly extracted theme cannot be selected, open the theme directory to first ensure that it is indeed compatible with Openbox by determining that an {{ic|openbox-3}} directory is present, and that within this directory a {{ic|themerc}} file is also present. An {{ic|.obt}} ('''O'''pen'''B'''ox '''T'''heme) file may also be present in some instances, which can then be manually loaded in {{Pkg|obconf}}.<br />
<br />
Where expected files and directories are present and correct, then on occasion it is possible that the theme author has not correctly set permission to access the file (e.g. permission may still be for the account of the author, rather than for '''root'''). To eliminate this possibility, ensure the folder and file permissions are for '''root''':<br />
<br />
# chown -R root /user/share/themes<br />
<br />
==== Theme looks broken ====<br />
<br />
Of course, the first line of enquiry would be to check that it is not just a badly made, broken theme! Otherwise, ensure that the [[Openbox#GTK+ 2|Openbox GTK fix]]{{Dead link|2014-11-28}} has been implemented, and then re-start the session. Unfortunately some older themes can simply break if not maintained sufficiently to keep pace with the changes incurred by [[GTK]] updates. To avoid such occurrences, it is best to check that desired themes have recently been created or at least updated / patched.<br />
<br />
=== Edit or create new themes ===<br />
<br />
{{Tip|Where deciding to modify an existing theme (e.g. the colour scheme), it would be best to work on a copy of it, rather than the original. This will retain the original should anything go wrong, and ensure that your changes are not over-written through an update.}}<br />
<br />
The process of creating new or modifying existing themes is covered extensively at the official [http://openbox.org/wiki/Help:Themes openbox.org] website. A user-friendly GUI to do so - {{AUR|obtheme}} - is also available from the [[AUR]].<br />
<br />
== Compositing effects ==<br />
<br />
Openbox does not provide native support for [[Wikipedia:Compositing window manager|compositing]], and thus requires an external compositor for this purpose.<br />
<br />
Although compositing is not a necessary component, it may specifically avoid issues such as screen distortion with [[#oblogout|oblogout]], and visual glitches with terminal window transparency. See [[Xorg#Composite]] for common choices.<br />
<br />
== Mouse cursor and application icon themes ==<br />
<br />
See [[Cursor themes]] and [[Icons]] for details.<br />
<br />
== Desktop icons and wallpapers ==<br />
<br />
{{Merge||This section is applicable to most [[window manager]]s when used without [[Desktop environment]]}}<br />
<br />
Openbox does not natively support the use of desktop icons or wallpapers. As a consequence, it will be necessary to install additional applications for this purpose, where desired.<br />
<br />
=== Desktop management using file managers ===<br />
<br />
Some file managers have the capacity to fully '''manage the desktop''', meaning that they may be used to provide wallpapers and enable the use of icons on the desktop. The [[LXDE]] desktop environment itself uses PCManFM for this purpose.<br />
<br />
See [[PCManFM#Desktop_management]] and [[SpaceFM#Desktop_management]].<br />
<br />
=== Wallpaper ===<br />
<br />
See [[List_of_applications#Wallpaper_setters]]<br />
<br />
=== Icon programs ===<br />
<br />
While there are programs dedicated to enabling desktop icons alone, it would seem that they have greater drawbacks than the utilisation of file managers for the task. These programs are discussed briefly, below.<br />
<br />
==== idesk ====<br />
<br />
[[idesk]] is a simple program that can enable icons in addition to managing wallpaper. It will be necessary to create an {{ic|~/.idesktop}} directory, and desktop icons must also be manually created. To use idesk to provide icons, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
idesk &<br />
<br />
==== xfdesktop ====<br />
<br />
{{Pkg|xfdesktop}} is the desktop manager for [[Xfce]]. The [[Thunar]] file manager will also be downloaded as a dependency. Where this is used, the Openbox desktop menu will no longer be accessible by right-clicking the background. <br />
<br />
As such, it will consequently be necessary to access it by other means, such as by [[#Desktop menu|creating a keybind]], and/or by - where permitted - re-configuring an installed panel to use the [[#Desktop menu as a panel menu|desktop menu as a panel menu]]. To use xfdesktop to provide icons, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
xfdesktop &<br />
<br />
=== conky reconfiguration ===<br />
<br />
Particularly where using a file manager to manage the desktop, it will be necessary to edit {{ic|~/.conkyrc}} to change the {{ic|own_window_type}} command in order for [[conky]] to continue to be displayed (where used). The revised command that should be used is:<br />
<br />
own_window_type normal<br />
<br />
== oblogout ==<br />
<br />
See the [[Oblogout]] article for an overview on how to use this useful, graphical logout script.<br />
<br />
== Openbox for multihead users ==<br />
<br />
While Openbox provides better than average multihead support on its own, the {{AUR|openbox-multihead-git}} package from the [[AUR]] provides a development branch called '''Openbox Multihead''' that gives multihead users per-monitor desktops. This model is not commonly found in floating window managers, but exists mainly in tiling window managers. It is explained well on the [http://xmonad.org/tour.html#workspace Xmonad web site]. Also, please see [https://github.com/BurntSushi/openbox-multihead/blob/multihead/README.MULTIHEAD README.MULTIHEAD] for a more comprehensive description of the new features and configuration options found in Openbox Multihead.<br />
<br />
Openbox Multihead will function like normal Openbox when only a single head is available.<br />
<br />
A downside to using Openbox Multihead is that it breaks the EWMH assumption that one and only one desktop is visible at any time. Thus, existing pagers will not work well with it. To remedy this, {{AUR|pager-multihead-git}} can be found in the [[AUR]] and is compatible with Openbox Multihead. [http://imgur.com/a/cnZeq#y04nk Screenshots].<br />
<br />
Finally, a new version of [[PyTyle]] that will work with Openbox Multihead can also be found in the [[AUR]]: {{AUR|pytyle3-git}}.<br />
<br />
Both ''pytyle3'' and ''pager-multihead-git'' will work without Openbox Multihead if only one monitor is active.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Switch desktops using the mouse ===<br />
<br />
It is possible to switch desktop by moving the mouse cursor to the edges of the screen. First install {{Pkg|xdotool}} and add the following two lines to your {{ic|~/.xinitrc}}:<br />
<br />
xdotool behave_screen_edge --delay 500 left set_desktop --relative -- -1 &<br />
xdotool behave_screen_edge --delay 500 right set_desktop --relative -- +1 &<br />
<br />
=== Set default applications / file associations ===<br />
<br />
See the [[Default applications]] article.<br />
<br />
=== Stop continous mouse wheel desktop switching ===<br />
<br />
By default Openbox switches from the last desktop back to the first desktop on mouse wheel scroll. Use {{ic|<wrap>no</wrap>}} in the {{ic|mousebind}} section to disable this behaviour.<br />
<br />
<context name="Desktop"><br />
<mousebind button="Up" action="Click"><br />
<action name="GoToDesktop"><br />
<to>previous</to><br />
<wrap>no</wrap><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name="GoToDesktop"><br />
<to>next</to><br />
<wrap>no</wrap><br />
</action><br />
</mousebind><br />
</context><br />
<br />
=== Ad-hoc window transparency ===<br />
<br />
{{Warning|This may not work where other actions are defined within the action group.}}<br />
The program {{Pkg|transset-df}} is available in the official repositories, and can enable window transparency on-the-fly.<br />
<br />
For example, using the following code in the {{ic|<mouse>}} section of the {{ic|~/.config/openbox/rc.xml}} file will enable control of application window transparency by hovering the mouse-pointer over the title bar and scrolling with the middle button:<br />
<br />
<context name="Titlebar"><br />
...<br />
<mousebind button="Up" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --inc </execute><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --dec </execute><br />
</action><br />
</mousebind><br />
...<br />
</context><br />
<br />
=== Using obxprop for faster configuration ===<br />
<br />
The {{Pkg|openbox}} package provides a {{ic|obxprop}} binary that can parse relevant values for applications settings in {{ic|rc.xml}}. Officially {{ic|<nowiki>obxprop | grep "^_OB_APP"</nowiki>}} is recommended for this task. Doing so for multiple applications and its windows can be very inefficient however. The following script {{ic|obxprop2obrc}} makes it much easier to configure even a large number of applications.<br />
<br />
{{Accuracy|Full of [http://shellcheck.net quoting errors], do '''not''' follow any of the instructions bellow!}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
##Script: obxprop-to-openbox-rc.sh<br />
##Recommended executable name: obxprop2obrc<br />
<br />
while [ $# -ne 0 ]; do<br />
case $1 in<br />
-f*)<br />
shift;<br />
FILE="$1";<br />
shift;<br />
;;<br />
-t*)<br />
shift;<br />
TIME="$1";<br />
shift;<br />
;;<br />
*)<br />
echo Usage: $0 [-f FILE_TEMPLATE] [-t WAIT_TO_KILL_TIME] <br />
exit 1;<br />
;;<br />
esac<br />
done<br />
<br />
if [ $TIME ]; then<br />
OBXPROPS=( $(obxprop | cat & (sleep $TIME && pkill -13 cat) | awk -F \" '/_OB_APP/{ print "\x22"$2"\x22" }' ) );<br />
else<br />
OBXPROPS=( $(obxprop | awk -F \" '/_OB_APP/{ print "\x22"$2"\x22" }' ) );<br />
fi<br />
OBPROPS=(TYPE TITLE GROUP_CLASS GROUP_NAME CLASS NAME ROLE);<br />
j=0;<br />
for i in $( seq 2 2 14 ); do<br />
OBPROP="$( echo ${OBXPROPS[@]} | awk -F \" '{ print $'$i'}' )";<br />
if [[ -z $OBPROP ]]; then <br />
declare ${OBPROPS[$j]}='"*"';<br />
else <br />
declare ${OBPROPS[$j]}="\"$OBPROP\"";<br />
fi<br />
j=$(($j+1));<br />
done;<br />
<br />
echo " <application type="$TYPE" title="$TITLE" class="$CLASS" name="$NAME" role="$ROLE">"<br />
if [ -f "$FILE" ]; then cat "$FILE" && exit; fi<br />
cat << EOF<br />
<desktop>1</desktop><br />
<desktop>all</desktop><br />
<decor>yes</decor><br />
<decor>no</decor><br />
<focus>yes</focus><br />
<focus>no</focus><br />
<fullscreen>yes</fullscreen><br />
<fullscreen>no</fullscreen><br />
<iconic>yes</iconic><br />
<iconic>no</iconic><br />
<maximized>yes</maximized><br />
<maximized>no</maximized><br />
<maximized>both</maximized><br />
<maximized>horizontal</maximized><br />
<maximized>vertical</maximized><br />
<monitor>0</monitor><br />
<monitor>1</monitor><br />
<position force="no"><br />
<position force="yes"><br />
<width>40%</width><br />
<height>30%</height><br />
<x>-1</x><br />
<y>-1</y><br />
<x>center</x><br />
<y>center</y><br />
</position><br />
<layer>above</layer><br />
<layer>normal</layer><br />
<layer>below</layer><br />
<shade>yes</shade><br />
<shade>no</shade><br />
<skip_pager>yes</skip_pager><br />
<skip_pager>no</skip_pager><br />
<skip_taskbar>yes</skip_taskbar><br />
<skip_taskbar>no</skip_taskbar><br />
</application><br />
EOF<br />
</nowiki>}}<br />
<br />
If no further options are used default configuration, that can be edited by deleting unnecessary lines, is printed out. This script can use templates with default values when using {{ic|-f}} switch:<br />
{{hc|<br />
$ obxprop2obrc -f templates-rc-inkscape-dialogs.sc > part-rc-applications-inkscape.xml<br />
$ cat part-rc-applications-inkscape.xml|<nowiki><br />
<application type="normal" title="Align and Distribute (Shift+Ctrl+A)" class="Inkscape" name="inkscape" role="*"><br />
<desktop>3</desktop><br />
<decor>yes</decor><br />
<maximized>no</maximized><br />
<position force="yes"><br />
<width>20%</width><br />
<height>30%</height><br />
<x>-1</x><br />
<y>-1</y><br />
</position><br />
<layer>normal</layer><br />
<shade>yes</shade><br />
</application><br />
</nowiki>}}<br />
<br />
It also has a time switch {{ic|-t}} which kills obxprop and thus can reduce time significantly in certain situations, although it may not work perfectly.<br />
<br />
=== Xprop values for applications ===<br />
<br />
{{Pkg|xorg-xprop}} is available in the official repositories, and can be used to relay property values for selected applications. Where frequently using per-application settings, the following [[Bash#Aliases|Bash Alias]] may be useful:<br />
dy:<br />
<br />
alias xp='xprop | grep "WM_WINDOW_ROLE\|WM_CLASS" && echo "WM_CLASS(STRING) = \"NAME\", \"CLASS\""'<br />
<br />
To use Xorg-XProp, run using the alias given {{ic|xp}}, and click on the active program desired to define with per-application settins. The results displayed will only be the information that Openbox itself requires, namely the {{ic|WM_WINDOW_ROLE}} and {{ic|WM_CLASS}} (name and class) values:<br />
<br />
WM_WINDOW_ROLE(STRING) = "roster"<br />
WM_CLASS(STRING) = "gajim.py", "Gajim.py"<br />
WM_CLASS(STRING) = "NAME", "CLASS"<br />
<br />
==== Firefox ====<br />
<br />
For whatever reason, Firefox and like-minded equivalents ignore application rules (e.g. ''<desktop>'') unless {{ic|class&#61;"Firefox*"}} is used. This applies irrespective of whatever values '''xprop''' may report for the program's {{ic|WM_CLASS}}.<br />
<br />
=== Switching between keyboard layouts ===<br />
<br />
See the article section [[Keyboard configuration in Xorg#Switching between keyboard layouts|switching between keyboard layouts]] for instructions.<br />
<br />
=== Set grid layout for virtual desktops ===<br />
<br />
Install {{AUR|obsetlayout}}. To set a 2x2 grid for example:<br />
<br />
obsetlayout 0 2 2 0<br />
<br />
Run it without arguments to know what the arguments mean.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Windows load behind the active window ===<br />
<br />
Some application windows (such as Firefox windows) may load behind the currently active window, causing you to need to switch to the window you just created to focus it. To fix this behavior add this to your {{ic|~/.config/openbox/rc.xml}} file, inbetween the {{ic|1=<openbox_config>}} and {{ic|1=</openbox_config>}} tags:<br />
<br />
{{bc|1=<br />
<applications><br />
<application class="*"><br />
<focus>yes</focus><br />
</application><br />
</applications><br />
}}<br />
<br />
== See also ==<br />
<br />
* [http://openbox.org/ Openbox Website] - Official website<br />
* [http://planetob.openmonkey.com/ Planet Openbox] - Openbox news portal<br />
* [http://www.box-look.org/ Box-Look.org] - A good resource for themes and related artwork<br />
* [https://bbs.archlinux.org/viewtopic.php?id=93126 Openbox Hacks and Configs Thread] @ Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=45692 Openbox Screenshots Thread] @ Arch Linux Forums<br />
* [http://urukrama.wordpress.com/openbox-guide/ An Openbox guide]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Openbox_(%CE%95%CE%BB%CE%BB%CE%B7%CE%BD%CE%B9%CE%BA%CE%AC)&diff=347298Openbox (Ελληνικά)2014-11-30T10:44:53Z<p>Sudowoodo: Template:accuracy</p>
<hr />
<div>{{Translateme (Ελληνικά)|Η σελίδα βρίσκεται σε διαδικασία μετάφρασης}}<br />
{{Accuracy|The original page has been recently revamped. <small>(December 2014)</small>}}<br />
<br />
[[Category:Stacking WMs (Ελληνικά)]]<br />
[[cs:Openbox]]<br />
[[de:Openbox]]<br />
[[es:Openbox]]<br />
[[fr:Openbox]]<br />
[[it:Openbox]]<br />
[[ja:Openbox]]<br />
[[ko:Openbox]]<br />
[[lt:Openbox]]<br />
[[nl:Openbox]]<br />
[[pl:Openbox]]<br />
[[ru:Openbox]]<br />
[[sk:Openbox]]<br />
[[sr:Openbox]]<br />
[[tr:Openbox]]<br />
[[zh-CN:Openbox]]<br />
[[zh-TW:Openbox]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|File manager functionality}}<br />
{{Related|Window manager}}<br />
{{Related|Oblogout}}<br />
{{Related articles end}}<br />
<br />
Ο Openbox είναι ένας ελαφρύς, ισχυρός και πλήρως παραμετροποιήσιμος ''stacking'' [[Window manager|διαχειριστής παραθύρων (αγγλικά)]] με εκτεταμένη υποστήριξη προτύπων. Μπορεί να χτιστεί και να τρέξει ανεξάρτητα ως βάση για κάποιο [[desktop environment|περιβάλλον εργασίας (αγγλικά)]], ή να ενσωματωθεί σε άλλα περιβάλλοντα εργασίας όπως το [[KDE]] ή το [[Xfce]], ως μια εναλλακτική έναντι των διαχειριστών παραθύρων που αυτά παρέχουν. Το περιβάλλον εργασίας [[LXDE]] είναι το ίδιο χτισμένο γυρώ από τον Οpenbox.<br />
Μια περιεκτική λίστα των χαρακτηριστικών του καταγράφεται στο [http://openbox.org/ επίσημο site του Openbox]. Το συγκεκριμένο άρθρο αναφέρεται ειδικά στον τρόπο εγκατάστασης του Openbox στο Arch Linux.<br />
<br />
== Εγκατάσταση ==<br />
<br />
Εγκατάστησε το πακέτο {{Pkg|openbox}}, το οποίο είναι διαθέσιμο στα [[official repositories|επίσημα αποθετήρια (αγγλικά)]].<br />
<br />
== Openbox Sessions ==<br />
<br />
Όπως ειπώθηκε, ο Openbox μπορεί να τρέξει ανεξάρτητα ως ένας αυτόνομος διαχειριστής παραθύρων ή ενσωματωμένος σε άλλα περιβάλλοντα εργασίας όπως το [[KDE]] ή το [[XFCE]] ως μια εναλλακτική έναντι των διαχειριστών παραθύρων που αυτά παρέχουν.<br />
<br />
=== Αυτόνομα ===<br />
<br />
Πολλοί δημοφιλείς [[Display manager|display managers]] όπως ο [[LXDM]], ο [[SLiM]], και ο [[LightDM]] θα ανιχνεύσουν αυτόματα τον Openbox, δίνοντας τη δυνατότητα να τον τρέξουμε ως μια αυτόνομη συνεδρία. <br />
<br />
Ωστόσο, μπορεί να φανεί αναγκαίο να ορίσει κανείς "με το χέρι" την εντολή για την εκκίνηση μιας συνεδρίας openbox αν θέλει να τη θέσει ως προεπιλεγμένη συνεδρία στον [[SLiM]], ή αν δεν χρησιμοποιεί κανέναν display manager (π.χ. είσοδος-login στην γραμμή εντολών, και εκτέλεση της εντολής {{ic|startx}} στη συνέχεια). Σε αυτή την περίπτωση, θα είναι αναγκαίο να τροποποιήσουμε το αρχείο [[Xinitrc]] και να προσθέσουμε την ακόλουθη εντολή:<br />
<br />
exec openbox-session<br />
<br />
=== Στο εσωτερικό άλλων περιβαλλόντων εργασίας ===<br />
<br />
Όταν ο Openbox αντικαθιστά το διαχειριστή παραθύρων που παρέχεται από το περιβάλλον εργασίας, όλα τα εφέ του του στοιχειοθέτη (compositor) - όπως η διαφάνεια - που παρέχονταν από το προηγούμενο διαχειριστή παραθύρων χάνονται. Αυτό συμβαίνει επειδή ο Openbox δεν παρέχει ανάλογη λειτουργία ο ίδιος. Ωστόσο είναι εύκολο να χρησιμοποιήσει κανείς ένα ξεχωριστό πρόγραμμα στοιχειοθέτησης ώστε να [[Openbox#Compositing effects|τα επαναενεργοποιήσει]]. <br />
<br />
==== GNOME ====<br />
<br />
Ο Openbox δεν φαίνεται να λειτουργεί με το [[GNOME|GNOME 3]]. Το γραφικό περιβάλλον {{ic|Gnome-Shell}} απαιτεί τον δικό του προεπιλεγμένο διαχειριστή παραθύρων και τα δικά του πακέτα για τη διακόσμηση των παραθύρων ώστε να λειτουργήσει. Επιπλέον το να προσπαθήσει κανείς να τρέξει το openbox μέσα στο γραφικό περιβάλλον {{ic|Classic-Gnome-Shell}} οδηγεί στην απώλεια του {{ic|gnome-panel}}. H διακοπή του Openbox και η προσπάθεια επαναφοράς του προεπιλεγμένου διαχειριστή παραθύρων θα οδηγήσει σε σοβαρό σφάλμα στην επιφάνεια εργασίας. To Gnome 3 είναι σφιχτά ενοποιημένο, και ως εκ τούτου είναι ηθελημένα σχεδιασμένο να μην επιτρέπει να αλλάξουν τα συστατικά του στοιχεία εκ φύσεως.<br />
<br />
==== KDE ====<br />
Δες το κόμματι [[KDE#Using Openbox in KDE|χρησιμοποιώντας τον Openbox στο KDE]] από το κύριο άρθρο για το [[KDE]].<br />
<br />
==== Xfce ====<br />
<br />
Δες το κόμματι [[Xfce#Replacing_the_native_window_manager|αντικαθιστώντας τον προεπιλεγμένο διαχειριστή παραθύρων]] από το κύριο άρθρο για το [[Xfce]].<br />
<br />
== Ρύθμιση συστήματος ==<br />
<br />
Όσοι εγκαθιστούν το Openbox - ιδίως ως αυτόνομο διαχειριστή παραθύρων θα έχουν παρατηρήσει ότι αρκετά στοιχεία μπορεί να μην λειτουργούν σωστά ή ακόμα να μην λειτουργούν καθόλου.. Παραδείγματα από τα προβλήματα που συναντώνται συχνά είναι:<br />
<br />
* '''Διαχειριστές Αρχείων''': Τα υπόλοιπα partitions δεν φαίνονται ή δεν είναι προσβάσιμα. H λειτουργία των απορρριμάτων (trash) -όπου παρέχεται- δεν λειτουργεί. <br />
* '''Ταυτοποίηση''': Οι κωδικοί δεν αποθηκεύονται ή/και ανακαλούνται κατά τη διάρκεια της συνεδρίας<br />
* '''Άσύρματη Σύνδεση''': Άμεση αποτυχία όταν προσπαθεί κανείς να συνδεθεί με ασύρματο δίκτυο (σχετίζεται με την ταυτοποίηση) <br />
* '''Θέματα''': Η διακόσμηση των παραθύρων των εφαρμογών δεν δείχνει όπως θα έπρεπε<br />
* '''Φάκελοι''': Φάκελοι που κανείς θα περίμενε να υπάρχουν, όπως {{ic|Αρχεία}}, {{ic|Λήψεις}} και τα λοιπά λείπουν από τον φάκελο {{ic|Home}}<br />
* '''Tray Συστήματος''': Εκγαταστημένα πακέτα αποτυχγάνουν να ξεκινήσουν αυτόματα κατά την εκκίνηση ή φαίνονται διπλά.<br />
<br />
Τα περισσότερα από αυτά είναι αποτέλεσμα ζητημάτων που σχετίζονται με το [[Dbus]] ή το [[GTK]]. Και τα δύο μπορούν να λυθούν ταυτόχρονα μέσω της επεξεργασίας του αρχείου [[xprofile|~/.xprofile]] - ή από την άλλη αν χρησιμοποιεί κανείς το[[SLiM]] ως [[display manager]] με την επεξεργασία του αρχείου [[xinitrc|~/.xinitrc]]. Είναι επίσης αναγκαίο να εγκατασταθούν μερικά πακέτα για να διασφαλίσουν πλήρη λειτουργικότητα. <br />
<br />
=== D-Bus ===<br />
<br />
Προβλήματα σχετικά με το Διαχειριστή Αρχείων, την ταυτοποίηση, το SSH agent και την ασύρματη σύνδεση στο διαδίκτυο πιθανόν σχετίζονται στο γεγονός πως ο [[D-Bus]] δεν λειτουργεί σωστά. Οι περισσότεροι [[display manager|diplay managers]] όπως οι [[GDM]], [[KDM]], [[LightDM]] και [[LXDM]] θα χειριστούν αυτό το ζήτημα για σένα.<br />
<br />
Αν χρησιμοποιείς το [[xinit]] ή ορισμένους άλλους display managers (όπως [[XDM]] και [[SLiM]]), διασφάλισε πως το {{ic|~/.xinitrc}} βασίζεται στο {{ic|/etc/skel/.xinitrc}} (ώστε να it sources {{ic|/etc/X11/xinit/xinitrc.d/}}, δες εδώ [[xinitrc]] για περισσότερες πληφορείες).<br />
<br />
=== GTK+ 2 ===<br />
<br />
Τυχόν προβλήματα με το θέμα και την εμφάνιση πιθανότατα οφείλονται στην απουσία της κατάλληλης εντολής ώστε να διασφαλιστεί πως μια ενιαία εμφάνιση χρησιμοποιείται στις εφαρμογές που χρησιμοποιούν το GTK 2. Τροποποίησε το {{ic|~/.xinitrc}} και/ή το {{ic|~/.xprofile}} προσθέτοντας την ακόλουθη εντολή:<br />
<br />
export GTK2_RC_FILES="$HOME/.gtkrc-2.0" <br />
<br />
Το αρχείο {{ic|~/.gtkrc-2.0}} θα δημιουργηθεί αυτόματα αν χρησιμοποιεί κανείς το [[LXDE|lxappearance]] για να ορίσει τα θέματα.<br />
<br />
Είναι επίσης αναγκαίο να εγκατασταθεί το {{Pkg|libgnomeui}} για να διασφαλιστεί ότι το [[Qt]] μπορεί επίσης να εντοπίσει τα GTK θέματα.<br />
<br />
Δες το [[GTK+#GTK+ 2.x]] για μια εισαγωγή σχετικά με το πώς να τροποποιεί κανείς το {{ic|~/.gtkrc-2.0}} με το χέρι.<br />
<br />
=== XDG ===<br />
<br />
Πέρα από τη χρήση του τοπικού ('''local''') αρχείου για την αυτόματη εκκίνηση εφαρμογών κατά την έναρξη {{ic|~/.config/openbox/autostart}}, ο Openbox επίσης θα χρησιμοποιήσει τα αρχεία {{ic|.desktop}} που αυτόματα εγκαθίστανται από μερικά πακέτα στον καθολικό ('''global''') κατάλογο {{ic|/etc/xdg/autostart}}. Το πακέτο που είναι υπεύθυνο να επιτρέπει στον Openbox να χρησιμοποιεί τον κατάλογο {{ic|/etc/xdg/autostart}} για την αυτόματη εκκίνηση εφαρμογών είναι το {{Pkg|python2-xdg}}. <br />
<br />
Για παράδειγμα, ας υποθέσουμε πως αρχικά ένα πακέτο όπως το εφαρμογίδιο [[NetworkManager|Network Manager]] '''nm-applet''' ξεκινά αυτόματα κατά την εκκίνηση μέσω τοπικής ρύθμισης (στο {{ic|~/.config/openbox/autostart}}). Αν αργότερα εγκατασταθεί το {{Pkg|python2-xdg}} - είτε μόνο του είτε ως εξάρτηση από άλλο πακέτο - το καθολικό του (global) XDG αρχείο {{ic|.desktop}} θα χρησιμοποιηθεί επίσης, και ως αποτέλεσμα θα οδηγήσει στην εμφάνιση δύο εικονιδίων στο tray συστήματος. Είναι λοιπόν προτιμότερο και συστήνεται να εγκαταστήσει κανείς το πακέτο {{Pkg|python2-xdg}}, αφού αυτό θα διασφαλίσει πως οι εφαρμογές που θα έπρεπε να εκκινούν αυτόματα θα έχουν την αναμενόμενη συμπεριφορά.<br />
<br />
=== Φάκελος home ===<br />
<br />
{{Tip|Το παρακάτω είναι βοηθητικό ιδίως για εκείνους που επιθυμούν να χρησιμοποιήσουν ένα διαχειριστή αρχείων που δύναται να διαχειρίζεται και την επιφάνεια εργασίας αφού θα δημιουργήσει αυτόματα ένα ξεχωριστό φάκελο με όνομα {{ic|~/Επιφάνεια Εργασίας}}, ο οποίος θα περιλαμβάνει όλα τα αρχεία και τις συντομεύσεις εφαρμογών που θα εμφανίζονται στην Επιφάνεια Εργασίας.}}<br />
<br />
Αν φάκελοι όπως οι {{ic|Λήψεις}}, {{ic|Έγγραφα}} δεν είναι παρόντες στον κατάλογο {{ic|home}} παρακαλείστε να ελέγξετε το εξής άρθρο: [[Xdg user directories]]<br />
<br />
=== Ταυτοποίηση και κωδικοί πρόσβασης ===<br />
<br />
Για την ταυτοποίηση (π.χ κωδικοί WiFi κτλ.), είναι αναγκαίο να εγκατασταθούν τα κατάλληλα πακέτα. Αυτά είναι:<br />
<br />
* {{Pkg|polkit}}: Εργαλείο για τον έλεγχο δικαιωμάτων σε όλο το σύστημα· δες [[polkit]]<br />
* {{Pkg|lxpolkit}}: Απλό εργαλείο για ταυτοποίηση για το περιβάλλον εργασίας LXDE ({{Pkg|polkit-gnome}} αυτή τη στιγμή δεν λειτουργεί όπως θα έπρεπε)<br />
* {{Pkg|gnome-keyring}}: αποθήκευση / ανάκληση κωδικών· δες [[GNOME Keyring]]<br />
<br />
== Ρύμθμιση ==<br />
<br />
{{Προειδοποίηση|Επεξεργάσου αυτά τα αρχεία χρησιμοποιώντας το λογαριασμό χρήστη με τον οποίο θα χρησιμοποιείς το openbox, όχι με το λογαριασμό root!!}}<br />
{{Συμβουλή|Τα τοπικά αρχεία ρυθμίσεων πάντα θα παρακάμπτουν τα αντίστοιχα καθολικά (δηλ. τα πρώτα θα λαμβάνονται υπόψιν όταν υπάρχουν). Αυτά τα αρχεία μπορούν επίσης να τροποποιηθούν "με το χέρι" χρησιμοποιώντας έναν κατάλληλο επεξεργαστή κειμένου όπως ο Leafpad ή ο Geany· Δεν υπάρχει ανάγκη να χρησιμοποιήσει κανείς τις εντολές [[sudo]] ή '''gksu''' για να τα τροποποιήσει.}}<br />
<br />
Τέσσερα αρχεία-κλειδιά σχηματίζουν τη βάση για την παραμετροποίηση του openbox. Κάθε ένα από αυτά έχει ένα ιδιαίτερο ρόλο. Αυτά είναι τα εξής: {{ic|rc.xml}}, {{ic|menu.xml}}, {{ic|autostart}}, και {{ic|environment}}. Αν και γίνεται διεξοδικός λόγος για αυτά τα αρχεία παρακάτω, για να αρχίσει κανείς να παραμετροποιεί Openbox, είναι αναγκαίο να δημιουργηθεί ένα τοπικό ('''local''') προφίλ Openbox (δηλ. για το συγκεκριμένο λογαριασμό χρήστη) με βάση αυτά. Αυτό μπορεί να γίνει αντιγράφοντάς και χρησιμοποιώντας ως πρότυπο το καθολικό ('''global''') προφίλ {{ic|/etc/xdg/openbox}} (που αφορά τον καθένα και όλους τους χρήστες):<br />
<br />
$ mkdir -p ~/.config/openbox<br />
$ cp -R /etc/xdg/openbox/* ~/.config/openbox<br />
<br />
=== rc.xml ===<br />
<br />
{{Tip|Επιπλέον συντομεύσεις πληκτρολογίου (keybindings) πρέπει να προστεθούν στο κομμάτι {{ic|<keyboard>}} αυτού του αρχείου, κάτω από την κεφαλίδα (heading): {{ic|<nowiki><!-- Keybindings for running aplications --></nowiki>}}}}<br />
<br />
Το {{ic|~/.config/openbox/rc.xml}} είναι το βασικό αρχείο ρυθμίσεων, το οποίο είναι υπεύθυνο για τον καθορισμό της συμπεριφοράς και των ρυθμίσεων ολόκληρης της συνεδρίας, συμπεριλαμβανομένων:<br />
<br />
* των συντομεύσεων πληκτρολογίου (π.χ για την έναρξη εφαρμογών; τον έλεγχο έντασης του ήχου κτλ)<br />
* των θεμάτων<br />
* των ρυθμίσεων επιφάνειας εργασίας και εικονικών επιφανειών εργασίας και<br />
* των ρυθμίσεων σχετικά με τα παράθυρα των εφαρμογών<br />
<br />
Αυτό το αρχείο είναι επίσης προ-ρυθμισμένο, με την έννοια πως το μόνο που χρειάζεται είναι να τροποποιήσεις το ήδη υπάρχον περιεχόμενο για να επιτύχεις τη συμπεριφορά που ταιριάζει με τις προσωπικές σου προτιμήσεις.<br />
<br />
=== menu.xml ===<br />
<br />
Το αρχείο {{ic|~/.config/openbox/menu.xml}} καθορίζει το είδος και τη συμπεριφορά του μενού της επιφάνειας εργασίας, το οποίο είναι προσβάσιμο με δεξί κλικ στο φόντο. Αν και το προεπιλεγμένο μενού το οποίο παρέχεται είναι '''στατικό μενού''' (δηλαδή δεν ανανενώνεται αυτόματα όταν εγκαθίστανται νέες εφαρμογές), υπάρχει δυνατότητα να χρησιμοποιηθούν '''δυναμικά μενού'''τα οποία θα ανανεώνονται αυτόματα.<br />
Οι διαθέσιμες επιλογές αναπτύσσονται παρακάτω στο κομμάτι [[Openbox#Μενού|Μενού]]του άρθρου.<br />
<br />
=== autostart ===<br />
<br />
{{Συμβουλή|Λάβε υπόψιν πως μερικές εφαρμογές θα εκκινούν αυτόματα μέσω αρχείων {{ic|.desktop}} που εγκαθίστανται στους καταλόγους {{ic|/etc/xdg/autostart/}} ή {{ic|~/.config/autostart/}}.}}<br />
<br />
Το {{ic|~/.config/openbox/autostart}} καθορίζει ποιες εφαρμογές θα εκκινήσουν αυτόματα στην αρχή κάθε συνεδρίας Openbox. Αυτές μπορεί να περιλαμβάνουν:<br />
* Μπάρες (panels) και/ή docks<br />
* Στοιχειοθέτες (compositors)<br />
* Εφαρμογές που παρέχουν φόντο για την επιφάνεια εργασίας<br />
* Εφαρμογές για προφύλαξη οθόνης (screensavers)<br />
* Άλλες εφαρμογές που φορτώνονται ή εκκινούν αυτόματα (π.χ [[Conky]])<br />
* [[Daemon]] διαδικασίες (π.χ Διαχειριστές αρχείων για αυτόματη προσάρτηση τόμων και άλλες λειτουργίες)<br />
* Άλλες κατάλληλες εντολές (π.χ απενεργοποίηση του [[DPMS]])<br />
<br />
==== Πώς προστίθενται εντολές ====<br />
<br />
Πρέεπει να δωθεί έμφαση σε δύο πολύ σημαντικά πράγματα όταν προσθέτει κανείς εντολές στο αρχείο {{ic|~/.config/openbox/autostart}}:<br />
<br />
* Κάθε μια εντολή '''πρέπει''' να τελειώνει με το λογόγραμμα του 'και' ({{ic|&}}). Αν μια εντολή δεν τελειώνει με αυτόν τον τρόπο , τότε δεν θα εκτελεστεί καμία από τις εντολές που βρίσκονται κάτω από αυτή.<br />
* Προτείνεται να προστεθεί κάποια καθυστέρηση για την εκτέλεσεη κάποιων ή όλων των εντολών στο αρχείο αυτόματης εκκίνησης, ακόμα και για μόλις ένα δευτερόλεπτο. Αν δεν γίνει αυτό όλες οι εντολές θα εκτελεούνται ταυτόχρονα με συνέπεια να παρατηρούνται λάθη στην εκκίνηση εφαρμογών. O τροπος σύνταξης της εντολής για καθυστέρηση (σε δευτερόλεπτα) της εκτέλεσης εντολών είναι:<br />
<br />
(sleep <number of seconds>s && <command>) &<br />
<br />
Για παράδειγμα, για να καθυστερήσει η εκτέλεση της εντολής για το [[Conky]] κατά 3 δευτερόλεπτα, η εντολή είναι (και πρόσεξε το {{ic|&}} στο τέλος της εντολής):<br />
<br />
(sleep 3s && conky) &<br />
<br />
Εδώ είναι ένα πιο ολοκληρωμένο παράδειγμα ενός πιθανού αρχείου {{ic|~/.config/openbox/autostart}}:<br />
<br />
## Autostart File ##<br />
<br />
##Disable DPMS<br />
xset -dpms; xset s off &<br />
<br />
##Compositor<br />
compton -CGb &<br />
<br />
##Background<br />
(sleep 1s && nitrogen --restore) &<br />
<br />
##tint2 panel<br />
(sleep 1s && tint2) &<br />
<br />
##Sound Icon<br />
(sleep 1s && volumeicon) &<br />
<br />
##Screensaver<br />
(sleep 1s && xscreensaver -no-splash) &<br />
<br />
##Conky<br />
(sleep 3s && conky) &<br />
<br />
##Disable touchpad<br />
/usr/bin/synclient TouchpadOff=1 &<br />
<br />
=== environment ===<br />
<br />
{{Σημείωση|Aυτό είναι το λιγότερο σημαντικό αρχείο, και πολλοί χρήστες μπορεί να μην χρειαστεί να το τροποποιήσουν καθόλου}}<br />
<br />
Το αρχείο {{ic|~/.config/openbox/environment}} μπορεί να χρησιμοποιηθεί για την εξαγωγή και τον καθορισμό σχετικών περιβαλλοντικών μεταβλητών όπως:<br />
<br />
* Ο ορισμός νέων pathways (π.χ εκτέλεση εντολών που διαφορετικά θα απαιτούσαν ολόκληρο το pathway να καταγράφεται μαζί με αυτές)<br />
* Αλλαγή των ρυθμίσεων γλώσσας, και<br />
* Ορισμός νέων μεταβλητών για χρήση (π.χ η ρύθμιση για τα θέματα GTK μπορεί να γίνει εδώ)<br />
<br />
=== Προαιρετικά πακέτα για ρυθμίσεις Εμφάνισης του γραφικού περιβάλλοντος ===<br />
<br />
Μια σειρά από προγράμματα με γραφικό περιβάλλον είναι διαθέσιμα για να ρυθμίσεις εύκολα και γρήγορα την επιφάνεια εργασίας του Openbox. Από τα επίσημα αποθετήρια αυτά περιλαμβάνουν:<br />
<br />
* {{Pkg|obconf}}: Βασικός διαχειριστής ρυθμίσεων Openbox<br />
* {{Pkg|lxappearance-obconf}}: Διαχειριστής ρυθμίσεων του LXDE (παρέχει πρόσθετες ρυθμίσεις)<br />
* {{Pkg|lxinput}}: Ρυθμίσεις πληκτρολογίου και ποντικιού του LXDE<br />
* {{Pkg|lxrandr}}: Ρυθμίσεις οθόνης του LXDE<br />
<br />
Άλλα πακέτα, όπως το {{AUR|obkey}} (ρυθμίζει τις συντομεύσεις πληκτρολογίου μέσω του αρχείου {{ic|rc.xml}}) και το {{AUR|ob-autostart}} (τροποποιεί το αρχείο {{ic|autostart}} του Openbox) είναι διαθέσιμα στο [[AUR]]. Προγράμματα και εφαρμογές που σχετίζονται με την τροποποίηση του μενού εφαρμογών του Openbox συζητούνται στο τμήμα [[Openbox#Μενού|Μενού]] του άρθρου.<br />
<br />
== Επανναρρύθμιση του Openbox ==<br />
<br />
{{Συμβουλή| ΑΝ δεν είναι ήδη παρούσα θα άξιζε να προσθέσεις αυτήν την εντολή στο μενού ή/και σε συντόμευση πληκτρολογίου για ευκολία.}}<br />
<br />
Ο Openbox δεν θα εφαρμόζει πάντα αυτόματα οποιεσδήποτε αλλαγές γίνονται στα αρχεία ρυθμίσεών του κατά τη διάρκεια μιας συνεδρίας. Επομένως, συχνά θα είναι αναγκαίο να ξαναφορτώθουν αφού έχουν τροποποιηθεί. Για να γίνει αυτό, πληκτρολόγησε την ακόλουθη εντολή:<br />
<br />
$ openbox --reconfigure<br />
<br />
Αν επιθυμείς να προσθέσεις αυτήν την εντολή ως συντόμευση πληκτρολογίου στο αρχείο {{ic|~/.config/openbox/rc.xml}}, είναι αρκετό να προσθέσεις την εντολή ως {{ic|reconfigure}}. Ένα παράδειγμα παρέχεται παρακάτω, χρησιμοποιώντας τη συντόμευση {{ic|Super}}+{{ic|F11}}:<br />
<br />
<keybind key="W-F11"><br />
<action name="Reconfigure"/><br />
</keybind><br />
<br />
== Συντομεύσεις πληκτρολογίου ==<br />
<br />
Όλες οι συντομεύσεις πληκτρολογίου πρέπει να προστεθούν στο αρχείο {{ic|~/.config/openbox/rc.xml}}, κάτω από την κεφαλίδα {{ic|<nowiki><!-- Keybindings for running aplications --></nowiki>}}. Μια σύντομη επισκόπηση παρέχεται εδώ, αλλά μια σε βάθος εξήγηση των συντομεύσεων πληκτρολογίου μπορεί να βρεθεί στη σελίδα [http://openbox.org/wiki/Help:Bindings openbox.org]. Yπάρχει ένα βοηθητικό πρόγραμμα που ονομάζεται'obkey' στο AUR για την τροποποίηση των συντομεύσεων πληκτρολογίου. Πριν χρησιμοποιήσει κανείς το obkey, πρέπει να χρησιμοποιήσει το obconf για να δημιουργήσει το αρχείο {{ic|~/.config/openbox/rc.xml}}.<br />
<br />
=== Ειδικά πλήκτρα ===<br />
<br />
Ενώ η χρήση των καθιερωμένων αλφαριθμητικών πλήκτρων είναι αυτονόητη, συγκεκριμένα ειδικά ονόματα χρησιμοποιούνται για άλλους τύπους πλήκτρων όπως οι {{ic|τροποποιητές}} (modifers), τα πλήκτρα {{ic|πολυμέσων}} και τα πλήκτρα {{ic|πλοήγησης}}.<br />
<br />
==== Τροποποιητές (modifiers) ====<br />
<br />
Oι {{ic|τροποποιητές}} έχουν ένα σημαντικό ρόλο στις συντομεύσεις πληκτρολογίου (π.χ κρατώντας πατημένο το πλήκτρο {{ic|Shift}} ή το {{ic|Ctrl / control}} σε συνδυασμό με ένα άλλο πλήκτρο). Η χρήση των τροποποιητών βοηθά στην αποτροπή ύπαρξης συγκρουόμενων συντομεύσεων πληκτρολογίου, όταν δύο ή περισσότερες ενέργειες συνδέονται με το ίδο πλήκτρο ή τον ίδιο συνδυασμό πλήκτρων. Ο τρόπος σύνταξης για τη χρήση ενός τροποποιητή μαζί με ένα άλλο πλήκτρο είναι:<br />
<br />
"<modifier>-<key>"<br />
<br />
Οι κώδικες των τροποποιητών είναι οι εξής:<br />
<br />
* {{ic|S}}: Shift<br />
* {{ic|C}}: Control / CTRL<br />
* {{ic|A}}: Alt<br />
* {{ic|W}}: Super / Windows<br />
* {{ic|M}}: Meta<br />
* {{ic|H}}: Hyper (Αν αυτό αντιστοιχεί σε κάτι) <br />
<br />
Για παράδειγμα, ο κώδικας παρακάτω κάνει χρήση του πλήκτρου {{ic|super}} (το οποίο είναι γνωστό και ως πλήκτρο Windows) και του {{ic|t}} για την εκκίνηση του {{Pkg|lxterminal}}<br />
<br />
<keybind key="W-t"><br />
<action name="Execute"><br />
<command>lxterminal</command><br />
</action><br />
</keybind><br />
<br />
==== Πλήκτρα Πολυμέσων ====<br />
<br />
Where available, it is possible to set the appropriate {{ic|multimedia}} keys to perform their intended functions, such as to control the volume and/or the screen brightness. These will usually be integrated into the {{ic|function}} keys, and are identified by their appropriate symbols. See the [[Multimedia Keys]] article for further information.<br />
<br />
The volume and brightness multimedia codes are as follows (note that commands will still have to be assigned to them to actually function):<br />
<br />
* {{ic|XF86AudioRaiseVolume}}: Increase volume<br />
* {{ic|XF86AudioLowerVolume}}: Decrease volume<br />
* {{ic|XF86AudioMute}}: Mute / unmute volume<br />
* {{ic|XF86MonBrightnessUp}}: Increase screen brightess<br />
* {{ic|XF86MonBrightnessDown}}: Decrease screen brightness<br />
<br />
Examples of how these may be used in {{ic|~/.config/openbox/rc.xml}} have been provided below.<br />
<br />
==== Πλήκτρα Πλοήσησης ====<br />
<br />
These are the directional / arrow keys, usually used to move the cursor up, down, left, or right. The (self-explanatory) navigation codes are as follows:<br />
<br />
* {{ic|Up}}: Up<br />
* {{ic|Down}}: Down<br />
* {{ic|Left}}: Left<br />
* {{ic|Right}}: Right<br />
<br />
=== Έλεγχος Έντασης Ήχου ===<br />
<br />
What commands should be used for controlling the volume will depend on whether [[ALSA]], [[PulseAudio]], or [[OSS]] is used for sound.<br />
<br />
==== ALSA ====<br />
<br />
If [[ALSA]] is used for sound, the {{ic|amixer}} program can be used to adjust the volume, which is part of the {{Pkg|alsa-utils}} package. The following example - using the {{ic|multimedia}} keys intended to control the volume - will adjust the volume by +/- 5% (which may be changed, as desired):<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
==== Pulseaudio ====<br />
<br />
Where using [[PulseAudio]] with [[ALSA]] as a backend, the {{ic|amixer}} program commands will have to be modifed, as illustrated below in comparison to the ALSA example:<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
==== OSS ====<br />
<br />
{{Note|This option may be suitable for more experienced users.}}<br />
<br />
Where using [[OSS]], it is possible to create keybindings to raise or lower specific mixers. This allows, for example, the volume of a specific application (such as an audio player) to be changed without changing the overall system volume settings in turn. In this instance, the application must first have been [[OSS#Configuring_Applications_for_OSS|configured]] to use its own mixer. <br />
<br />
In the following example, [[MPD]] has been configured to use its own mixer - also named {{ic|mpd}} - to increase and decrease the volume by a single decibel at a time. The {{ic|--}} that appears after the {{ic|ossmix}} command has been added to prevent a negative value from being treated as an argument: <br />
<br />
<keybind key="[chosen keybind]"><br />
<action name="Execute"><br />
<command>ossmix -- mpd +1</command><br />
</action><br />
</keybind><br />
<keybind key="[chosen keybind]"><br />
<action name="Execute"><br />
<command>ossmix -- mpd -1</command><br />
</action><br />
</keybind><br />
<br />
=== Media player control ===<br />
<br />
The {{AUR|playerctl}} command-line utility can be used to bind multimedia keys to player actions. It should work with most media players.<br />
<br />
<keybind key="XF86AudioPlay"><br />
<action name="Execute"><br />
<command>playerctl play</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioPause"><br />
<action name="Execute"><br />
<command>playerctl pause</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioNext"><br />
<action name="Execute"><br />
<command>playerctl next</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioPrev"><br />
<action name="Execute"><br />
<command>playerctl previous</command><br />
</action><br />
</keybind><br />
<br />
=== Ρύθμιση Φωτεινότητας ===<br />
<br />
The {{ic|xbacklight}} program is used to control screen brightness, which is part of the [[Xorg]] X-Window system. In the example below, the {{ic|multimedia}} keys intended to control the screen brightness will adjust the settings by +/- 10%:<br />
<br />
<keybind key="XF86MonBrightnessUp"><br />
<action name="Execute"><br />
<command>xbacklight +10</command><br />
</action><br />
</keybind><br />
<keybind key="XF86MonBrightnessDown"><br />
<action name="Execute"><br />
<command>xbacklight -10</command><br />
</action><br />
</keybind><br />
<br />
=== Window snapping ===<br />
<br />
Many desktop environments and window managers support ''window snapping'' (e.g. Windows 7 Aero snap), whereby they will automatically snap into place when moved to the edge of the screen. This effect can also be simulated in Openbox through the use of keybinds on focused windows. <br />
<br />
As illustrated in the example below, percentages must be used to determine window sizes (see [http://openbox.org/wiki/Help:Actions openbox.org] for further information). In this instance, The {{ic|super}} key is used in conjunction with the {{ic|navigation}} keys:<br />
<br />
<keybind key="W-Left"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>west</direction></action><br />
</keybind><br />
<keybind key="W-Right"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>east</direction></action><br />
</keybind><br />
<br />
However, it should be noted that once a window has been 'snapped' to an edge, it will remain vertically maximised unless subsequently maximised and then restored. The solution is to implement additional keybinds - in this instance using the {{ic|down}} and {{ic|up}} keys - to do so. This will also make pulling 'snapped' windows from screen edges faster as well:<br />
<br />
<keybind key="W-Down"><br />
<action name="Unmaximize"/><br />
</keybind><br />
<keybind key="W-Up"><br />
<action name="Maximize"/><br />
</keybind><br />
<br />
This [http://ubuntuforums.org/showthread.php?t=1796793 Ubuntu forum thread] provides more information. Applications such as {{AUR|opensnap-git}} are also available from the AUR to automatically simulate window snapping behaviour without the use of keybinds.<br />
<br />
=== Μενού Επιφάνειας Εργασίας ===<br />
<br />
It is also possible to create a keybind to access the desktop menu. For example, the following code will bring up the menu by pressing {{ic|CTRL}} + {{ic|m}}:<br />
<br />
<keybind key="C-m"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
<br />
== Menus ==<br />
<br />
It is possible to employ three types of menu in Openbox: {{ic|static}}, {{ic|pipes}} (dynamic), and {{ic|generators}} (static or dynamic). They may also be used alone or in any combination.<br />
<br />
=== Static ===<br />
<br />
As the name would suggest, this default type of menu does not change in any way, and may be manually edited and/or (re)generated automatically through the use on an appropriate software package.<br />
<br />
Fast and efficient, while this type of menu can be used to select applications, it can also be useful to access specific functions and/or perform specific tasks (e.g. desktop configuration), leaving the access of applications to another process (e.g. the {{Pkg|synapse}} or {{Pkg|xfce4-appfinder}} applications).<br />
<br />
The {{ic|~/.config/openbox/menu.xml}} file will be the sole source of static desktop menu content.<br />
<br />
==== menumaker ====<br />
<br />
{{Warning|A root terminal '''must''' be installed in order to use MenuMaker, even though a standard user terminal may be used to run it. {{Pkg|xterm}} is a good choice.}}<br />
<br />
{{Pkg|menumaker}} automatically generates {{ic|xml}} menus for several window managers, including Openbox, [[Fluxbox]], [[IceWM]] and [[XFCE]]. It will search for all installed executable programs and consequently create a menu file for them. It is also possible to configure MenuMaker to exclude certain application types (e.g. relating to [[Gnome]] or [[KDE]]), if desired.<br />
<br />
Once installed and executed, it will automatically generate a new {{ic|~/.config/openbox/menu.xml}} file. To avoid overwriting an existing file, enter:<br />
<br />
$ mmaker -v OpenBox3<br />
<br />
Otherwise, to overwrite an existing file, add the {{ic|force}} argument ({{ic|f}}):<br />
<br />
$ mmaker -vf OpenBox3<br />
<br />
Once a new {{ic|~/.config/openbox/menu.xml}} file has been generated it may then be manually edited, or configured using a GUI menu editor, such as {{Pkg|obmenu}}.<br />
<br />
==== obmenu ====<br />
<br />
{{Warning|{{ic|obm-xdg}} - a pipe menu to generate a list of [[GTK+]] and [[Gnome]] applications - is also provided with obmenu. However, it has long-running bugs whereby it may produce an invalid output, or even not function at all. Consequently it has been omitted from discussion.}}<br />
<br />
{{Pkg|obmenu}} is a "user-friendly" GUI application to edit {{ic|~/.config/openbox/menu.xml}}, without the need to code in {{ic|xml}}.<br />
<br />
==== xdg-menu ====<br />
<br />
{{Pkg|archlinux-xdg-menu}} will automatically generate a menu based on {{ic|xdg}} files contained within the {{ic|/etc/xdg/}} directory for numerous Window Managers, including Openbox. Review the [[Xdg-menu#OpenBox]] article for further information.<br />
<br />
==== logout menu options ====<br />
<br />
{{Tip|The commands provided can also be attached to [[Openbox#Keybinds|keybinds]].}}<br />
<br />
The {{ic|~/.config/openbox/menu.xml}} file can be edited in order to provide a sub-menu with the same options as provided by [[Openbox#oblogout|oblogout]]. The sample script below will provide all of these options, with the exception of the ability to lock the screen:<br />
<br />
<menu id="exit-menu" label="Exit"><br />
<item label="Log Out"><br />
<action name="Execute"><br />
<command>openbox --exit</command><br />
</action><br />
</item><br />
<item label="Shutdown"><br />
<action name="Execute"><br />
<command>systemctl poweroff</command><br />
</action><br />
</item><br />
<item label="Restart"><br />
<action name="Execute"><br />
<command>systemctl reboot</command><br />
</action><br />
</item><br />
<item label="Suspend"><br />
<action name="Execute"><br />
<command>systemctl suspend</command><br />
</action><br />
</item><br />
<item label="Hibernate"><br />
<action name="Execute"><br />
<command>systemctl hibernate</command><br />
</action><br />
</item><br />
</menu><br />
<br />
Once the entries have been composed, add the following line to present the sub-menu where desired within the main desktop menu (usually as the last entry):<br />
<br />
<menu id="exit-menu"/><br />
<br />
=== Pipes ===<br />
<br />
{{Tip|It is entirely feasible for a static menu to contain one or more pipe sub-menus. The functionality of some pipe menus may also rely on the installation of relevant software packages.}}<br />
<br />
This type of menu is in essence a script that provides dynamic, refreshed lists on-the-fly as and when run. These lists may be used for multiple purposes, including to list applications, to provide information, and to provide control functions. Pre-configured pipe menus can be installed, although not from the [[official repositories]]. More experienced users can also modify and/or create their own custom scripts. Again, {{ic|~/.config/openbox/menu.xml}} may and commonly will contain several pipe menus.<br />
<br />
==== Examples ====<br />
<br />
* {{AUR|openbox-xdgmenu}}: fast xdg-menu converter to xml-pipe-menu<br />
* {{AUR|obfilebrowser}}: Application and file browser<br />
* {{AUR|obdevicemenu}}: Management of removable media with [[Udisks#Udisks|Udisks]]<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=1345031 wifi pipe menu]: Wireless networking using [[Netctl]]<br />
<br />
[http://openbox.org/download-pipemenus.php Openbox.org] also provides a further list of pipe menus.<br />
<br />
=== Generators ===<br />
<br />
This type of menu is akin to those provided by the taskbars of desktop environments such as [[XFCE]] or [[LXDE]]. Automatically updating on-the-fly, this type of menu can be powerful and very convenient. It may also be possible to add custom categories and menu entries; read the documentation for your intended dynamic menu to determine if and how this can be done.<br />
<br />
A menu generator will have to be executed from the {{ic|~/.config/openbox/menu.xml}} file.<br />
<br />
==== obmenu-generator ====<br />
<br />
{{Tip|icons can still be disabled in {{AUR|obmenu-generator}}, even where enabled in {{ic|~/.config/openbox/rc.xml}}.}}<br />
<br />
{{AUR|obmenu-generator}} is currently only available from the [[AUR]], although it is still highly recommended. With the ability to be used as a static or dynamic menu, it is highly configurable, powerful, and versatile. Menu categories and individual entries may also be easily hidden, customised, and/or added with ease. The [http://trizenx.blogspot.co.uk/2012/02/obmenu-generator.html official homepage] provides further information and screenshots.<br />
<br />
Below is an example of how obmenu-generator would be dynamically executed without icons in {{ic|~/.config/openbox/menu.xml}}:<br />
<br />
<?xml version="1.0" encoding="utf-8"?><br />
<openbox_menu><br />
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator"><br />
</menu><br />
</openbox_menu><br />
<br />
To automatically iconify entries, the {{ic|-i}} option would be added:<br />
<br />
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator -i"><br />
<br />
==== openbox-menu ====<br />
<br />
{{Tip|If this menu produces an error, it may be solved by enabling icons in {{ic|~/.config/openbox/rc.xml}}.}}<br />
<br />
{{AUR|openbox-menu}} uses the [[LXDE]] [http://sourceforge.net/projects/lxde/files/menu-cache/ menu-cache] to create dynamic menus. The [http://mimasgpc.free.fr/openbox-menu_en.html official homepage] provides further information and screenshots.<br />
<br />
==== obmenugen ==== <br />
<br />
{{AUR|Obmenugen}} is currently only available from the [[AUR]], and can be used to a generate static or dynamic application menu based on {{ic|.desktop}} files. The [http://obmenugen.sourceforge.net/ official homepage] provides further information.<br />
<br />
=== Menu icons ===<br />
<br />
To show icons next to menu entries, it will be necessary to ensure they are enabled in the {{ic|<menu>}} section of the {{ic|~/.config/openbox/rc.xml}} file:<br />
<br />
<applicationIcons>yes</applicationIcons><br />
<br />
Where using a static menu, it will then be necessary to edit the {{ic|~/.config/openbox/menu.xml}} file to provide both the {{ic|icon <nowiki>=</nowiki>}} command, along with the full path and icon name for each entry. An example of the syntax used to provide an icon for a category is:<br />
<br />
<menu id="apps-menu" label="[label name]" icon="[pathway to icon]/[icon name]"><br />
<br />
=== Desktop menu as a panel menu ===<br />
<br />
{{Tip|XDoTool can simulate any keybind for any action, and as such, it may therefore be used for many other purposes...}}<br />
<br />
{{Pkg|xdotool}} is a package that can issue commands to simulate key presses / keybinds, meaning that it is possible to use it to invoke keybind-related actions without having to actually press their assigned keys. As this includes the ability to invoke an assigned keybind for the Openbox desktop menu, it is therefore possible to use XDoTool to turn the Openbox desktop menu into a panel menu. Especially where the desktop menu is heavily customised and feature-rich, this may prove very useful to:<br />
<br />
* Replace an existing panel menu<br />
* Implement a panel menu where otherwise not provided or possible (e.g. for {{AUR|tint2-svn}})<br />
* Compensate where losing access to the desktop menu due to the use of an application like [[Openbox#xfdesktop|xfdesktop]] to [[Openbox#Desktop icons and wallpapers|manage the desktop]].<br />
<br />
Once XDoTool has been installed - if not already present - it will be necessary to create a keybind to access the root menu in {{ic|~/.config/openbox/rc.xml}}, and again below the {{ic|<nowiki><</nowiki>!-- Keybindings for running aplications --<nowiki>></nowiki>}} heading. For example, the following code will bring up the menu by pressing {{ic|CTRL}} + {{ic|m}}:<br />
<br />
<keybind key="C-m"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
<br />
Openbox must then be [[Openbox#Openbox reconfiguration|re-configured]]. In this instance, XDoTool will be used to simulate the {{ic|CTRL}} + {{ic|m}} keypress to access the desktop menu with the following command (note the use of {{ic|+}} in place of {{ic|-}}):<br />
<br />
xdotool key control+m<br />
<br />
How this command may be used as a panel launcher / icon is largely dependent on the features of panel used. While some panels will allow the above command to be executed directly in the process of creating a new launcher, others may require the use of an executable script. As an example, a custom executable script called {{ic|obpanelmenu.sh}} will be created in the {{ic|~/.config}} folder:<br />
<br />
$ ''text editor'' ~/.config/obpanelmenu.sh<br />
<br />
Once the empty file has been opened, the appropriate XDoTool command must be added to the empty file (i.e. to simulate the {{ic|CTRL}} + {{ic|m}} keypress for this example):<br />
<br />
xdotool key control+m<br />
<br />
After the file has been saved and closed, it may then be made into an executable script with the following command:<br />
<br />
$ chmod +x ~/.config/obpanelmenu.sh<br />
<br />
Executing it will bring up the Openbox desktop menu. Consequently, where using a panel that supports drag-and-drop functionality to add new launchers, simply drag the executable script onto it before changing the icon to suit personal taste. For instructions on how to use this executable script with {{AUR|tint2-svn}} - a derivative of the popular {{Pkg|tint2}} panel that allows launchers to be added - see [[Tint2#Application_Launchers_in_tint2-svn_.28AUR.29|Tint2-Svn launchers]].<br />
<br />
== GTK+ desktop theming ==<br />
<br />
{{Tip|It is '''strongly advised''' to install the {{Pkg|obconf}} and {{Pkg|lxappearance-obconf}} GUI applications to configure visual settings and theming. The latter is particularly important as it is responsible for generating the {{ic|~/.gtkrc-2.0}} file (see the [[Openbox#GTK+ 2|GTK fix]] section).}}<br />
<br />
It is important to note that a substantial range of both '''Openbox-specific''' and generalised, '''Openbox-compatible''' [[GTK]] themes are available to change the look of window decorations and the desktop menu. ''Generalised'' themes are designed to be simultaneously compatible with a range of popular desktop environments and/or window managers, commonly including Openbox. For example, {{AUR|gtk-theme-numix-blue}} supports both Openbox and [[XFCE]].<br />
<br />
=== Configuration ===<br />
<br />
{{Pkg|obconf}} and/or {{Pkg|lxappearance-obconf}} should be used to select and configure available GTK themes. See [[Uniform Look for Qt and GTK Applications]] for information about theming Qt based applications like [[Virtualbox]] or [[Skype]].<br />
<br />
=== Installation: official and AUR ===<br />
<br />
A good selection of {{Pkg|openbox-themes}} are available from the official repositories.<br />
<br />
Both Openbox-specific and Openbox-compatible themes installed from the [[Official_repositories|official repositories]] and/or the [[AUR]] will be automatically installed to the {{ic|/usr/share/themes}} directory. Both will also be immediately available for selection.<br />
<br />
=== Installation: other sources ===<br />
<br />
[http://www.box-look.org/index.php?xcontentmode=7402 box-look.org] is an excellent and well-established source of themes. [http://www.deviantart.com/ deviantART.com] is another excellent resource. Many more can be found through the utilisation of a search engine.<br />
<br />
==== Zip and tar files ====<br />
<br />
Themes downloaded from other sources such as [http://box-look.org/ box-look.org] will usually be compressed in a {{ic|.tar.gz}} or {{ic|.zip}} format. Although [[tar]] will have been installed as part of the base arch installation to extract {{ic|.tar.gz}} files, it will be necessary to install a program such as {{Pkg|unzip}} to extract {{ic|.zip}} files in the terminal. user-friendly GUI archivers are also available; see [[List of applications#Compression_tools]] for further information.<br />
<br />
Extracted theme files should also be placed in the {{ic|/usr/share/themes}} directory. For example, assuming downloaded content is automatically stored in the {{ic|~/Downloads}} folder, to simultaneously extract and move a {{ic|.tar.gz}} theme file, the syntax of the command would be:<br />
<br />
# tar xvf ~/Downloads/<theme file name>.tar.gz -C /usr/share/themes/<br />
<br />
To use {{Pkg|unzip}} in the same scenario for a {{ic|.zip}} theme file, the syntax of the command would be:<br />
<br />
# unzip ~/Downloads/<theme file name>.zip -d /usr/share/themes/<br />
<br />
Alternatively, it is also possible to simply move / copy and paste the extracted files to the {{ic|/usr/share/themes}} directory using an installed file manager as '''root'''.<br />
<br />
=== Troubleshooting ===<br />
<br />
There are two particular problems that may be encountered on rare occasions, especially where downloading themes from unsupported websites. These have been addressed below.<br />
<br />
==== Theme cannot be used ====<br />
<br />
If for any reason the newly extracted theme cannot be selected, open the theme directory to first ensure that it is indeed compatible with Openbox by determining that an {{ic|openbox-3}} directory is present, and that within this directory a {{ic|themerc}} file is also present. An {{ic|.obt}} ('''O'''pen'''B'''ox '''T'''heme) file may also be present in some instances, which can then be manually loaded in {{Pkg|obconf}}.<br />
<br />
Where expected files and directories are present and correct, then on occasion it is possible that the theme author has not correctly set permission to access the file (e.g. permission may still be for the account of the author, rather than for '''root'''). To eliminate this possibility, ensure the folder and file permissions are for '''root''':<br />
<br />
# chown -R root /user/share/themes<br />
<br />
==== Theme looks broken ====<br />
<br />
Of course, the first line of enquiry would be to check that it is not just a badly made, broken theme! Otherwise, ensure that the [[Openbox#GTK+ 2|Openbox GTK fix]] has been implemented, and then re-start the session. Unfortunately some older themes can simply break if not maintained sufficiently to keep pace with the changes incurred by [[GTK]] updates. To avoid such occurrences, it is best to check that desired themes have recently been created or at least updated / patched.<br />
<br />
=== Edit or create new themes ===<br />
<br />
{{Tip|Where deciding to modify an existing theme (e.g. the colour scheme), it would be best to work on a copy of it, rather than the original. This will retain the original should anything go wrong, and ensure that your changes are not over-written through an update.}}<br />
<br />
The process of creating new or modifying existing themes is covered extensively at the official [http://openbox.org/wiki/Help:Themes openbox.org] website. A user-friendly GUI to do so - {{AUR|obtheme}} - is also available from the [[AUR]].<br />
<br />
== Compositing effects ==<br />
<br />
Openbox does not natively provide support for compositing, and it will therefore be necessary to install a compositor for this purpose. The use of compositing enables various desktop visual effects, including transparency, fading, and shadows. Although compositing is not a necessary component, it can help to provide a more pleasant-looking environment, and avoid common issues such as screen distortion when [[Openbox#oblogout|oblogout]] is used, and visual glitches when terminal window transparency has been enabled. Three of the most common choices are:<br />
<br />
* [[Compton]]: Powerful and reliable, with extensive options<br />
* [[Xcompmgr]]: Older and simpler version of compton<br />
* [[Cairo Compmgr]]: Advanced compositing effects, plugin support, and a user-friendly GUI. Also more buggy and far heavier use of system resources.<br />
<br />
== Mouse cursor and application icon themes ==<br />
<br />
Any mouse cursor and/or application icon theme may be used with Openbox. Numerous themes are available from both the [[official repositories]] and the [[AUR]].<br />
<br />
=== xcursor themes (mouse) === <br />
<br />
{{Tip|Review the [[Xcursor]] article for an in-depth explanation.}}<br />
<br />
Standard xcursor theme packages available from the official repositories include {{Pkg|xcursor-themes}}, {{Pkg|xcursor-bluecurve}}, {{Pkg|xcursor-vanilla-dmz}}, and {{Pkg|xcursor-pinux}}. To search the official repositories for all available xcursor themes, enter the following command:<br />
<br />
$ pacman -Ss xcursor<br />
<br />
Installed x-cursor themes may then be set though using the {{Pkg|obconf}} and {{Pkg|lxappearance-obconf}} GUI applications. It may then be necessary to either log out and back in again to implement the change, or to [[Openbox#Openbox reconfiguration|reconfigure Openbox]].<br />
<br />
=== Application icon themes ===<br />
<br />
Standard xcursor theme packages available from the official repositories include the {{Pkg|gnome-icon-theme}} and {{Pkg|lxde-icon-theme}}. A nice icon theme currently available from the AUR is {{AUR|numix-icon-theme-git}}. To search the official repositories for all available icon themes, enter the following command:<br />
<br />
$ pacman -Ss icon-theme<br />
<br />
Again, installed icon themes may then be set though using the {{Pkg|obconf}} and {{Pkg|lxappearance-obconf}} GUI applications. It may then be necessary to either log out and back in again to implement the change, or to [[Openbox#Openbox reconfiguration|reconfigure Openbox]].<br />
<br />
== Desktop icons and wallpapers ==<br />
<br />
Openbox does not natively support the use of desktop icons or wallpapers. As a consequence, it will be necessary to install additional applications for this purpose, where desired.<br />
<br />
=== Desktop management using file managers ===<br />
<br />
Some file managers have the capacity to fully '''manage the desktop''', meaning that they may be used to provide wallpapers and enable the use of icons on the desktop. The [[LXDE]] desktop environment itself uses PCManFM for this purpose.<br />
<br />
* [[PCManFM]]: See the [[PCManFM#Desktop_management|PCManFM desktop management]] article.<br />
* [[SpaceFM]]: See the [[SpaceFM#Desktop_management|SpaceFM desktop management]] article.<br />
<br />
=== Wallpaper / background programs ===<br />
<br />
{{Tip|The wallpaper programs listed here will have many more options than shown in this brief overview, including the ability to use solid colours for backgrounds. Review their documentation and man pages for more information.}}<br />
<br />
There are numerous packages available to set desktop backgrounds in Openbox, each of which will need to be autostarted in the {{ic|~/.config/openbox/autostart}} file. A few of the most well known have been listed.<br />
<br />
==== nitrogen ====<br />
<br />
{{Tip|If nitrogen does not show in the desktop menu, then it can be manually added.}}<br />
<br />
[[nitrogen]] is a user-friendly choice, as it also provides a GUI window to browse and set installed images. To access the GUI, enter the following command in a terminal:<br />
<br />
$ nitrogen<br />
<br />
To use nitrogen as the background provider, add the following command to the {{ic|~/.config/openbox/autostart}} file so that it will restore the last set wallpaper:<br />
<br />
nitrogen --restore &<br />
<br />
==== feh ====<br />
<br />
[[Feh]] is a popular image viewer that may also be used to set wallpapers. In this instance, it will be necessary to add the full directory path and name of the image to be used as the wallpaper. To use Feh as the background provider, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
feh --bg-scale ''/path/to/image.file'' &<br />
<br />
==== hsetroot ====<br />
<br />
{{Pkg|hsetroot}} is a command-line tool specifically designed to set wallpapers. As with Feh, it will be necessary to add the full directory path and name of the image to be used as the wallpaper. To use HSetRoot as the background provider, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
hsetroot -fill ''/path/to/image.file'' &<br />
<br />
==== xsetroot ====<br />
<br />
{{ic|xsetroot}} is installed as part of the [[Xorg]] X-Windows system, and may be used to set simple background colours. For example, to use XSetRoot to set a black background, the following would be added to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
xsetroot -solid "#000000" &<br />
<br />
=== Icon programs ===<br />
<br />
While there are programs dedicated to enabling desktop icons alone, it would seem that they have greater drawbacks than the utilisation of file managers for the task. These programs are discussed briefly, below.<br />
<br />
==== idesk ====<br />
<br />
[[idesk]] is a simple program that can enable icons in addition to managing wallpaper. It will be necessary to create an {{ic|~/.idesktop}} directory, and desktop icons must also be manually created. To use idesk to provide icons, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
idesk &<br />
<br />
==== xfdesktop ====<br />
<br />
{{Pkg|xfdesktop}} is the desktop manager for [[XFCE]]. The [[Thunar]] file manager will also be downloaded as a dependency. Where this is used, the Openbox desktop menu will no longer be accessible by right-clicking the background. <br />
<br />
As such, it will consequently be necessary to access it by other means, such as by [[Openbox#Desktop menu|creating a keybind]], and/or by - where permitted - re-configuring an installed panel to use the [[Openbox#Desktop_menu_as_a_panel_menu|desktop menu as a panel menu]]. To use xfdesktop to provide icons, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
xfdesktop &<br />
<br />
=== conky reconfiguration ===<br />
<br />
Particularly where using a file manager to manage the desktop, it will be necessary to edit {{ic|~/.conkyrc}} to change the {{ic|own_window_type}} command in order for [[conky]] to continue to be displayed (where used). The revised command that should be used is:<br />
<br />
own_window_type normal<br />
<br />
== File managers ==<br />
<br />
Multiple [[List of applications#File managers|file managers]] may be used with Openbox, including [[PCManFM]], [[SpaceFM]], [[Thunar]], {{Pkg|xfe}}, and {{Pkg|qtfm}}. Thunar is the native file manager for [[Xfce]], and if installing be aware that some Xfce-related dependencies will also be installed, including {{Pkg|exo}} (set default applications) and '''xfce4-about''' (provide information about the Xfce deskop environment). The menu entries for these may consequently have to be hidden.<br />
<br />
A file manager alone will not provide the same features and functionality as provided by default in full desktop environments like [[Xfce]] and [[KDE]]. For example, it may not be initially possible to view or access other partitions or access removable media. See [[File manager functionality]] for further information.<br />
<br />
== oblogout ==<br />
<br />
See the [[Oblogout]] article for an overview on how to use this useful, graphical logout script.<br />
<br />
== Openbox for multihead users ==<br />
<br />
While Openbox provides better than average multihead support on its own, the {{AUR|openbox-multihead-git}} package from the [[AUR]] provides a development branch called '''Openbox Multihead''' that gives multihead users per-monitor desktops. This model is not commonly found in floating window managers, but exists mainly in tiling window managers. It is explained well on the [http://xmonad.org/tour.html#workspace Xmonad web site]. Also, please see [https://github.com/BurntSushi/openbox-multihead/blob/multihead/README.MULTIHEAD README.MULTIHEAD] for a more comprehensive description of the new features and configuration options found in Openbox Multihead.<br />
<br />
Openbox Multihead will function like normal Openbox when only a single head is available.<br />
<br />
A downside to using Openbox Multihead is that it breaks the EWMH assumption that one and only one desktop is visible at any time. Thus, existing pagers will not work well with it. To remedy this, {{AUR|pager-multihead-git}} can be found in the [[AUR]] and is compatible with Openbox Multihead. [http://imgur.com/a/cnZeq#y04nk Screenshots].<br />
<br />
Finally, a new version of [[PyTyle]] that will work with Openbox Multihead can also be found in the [[AUR]]: {{AUR|pytyle3-git}}.<br />
<br />
Both ''pytyle3'' and ''pager-multihead-git'' will work without Openbox Multihead if only one monitor is active.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Packages for beginners ===<br />
<br />
{{Tip|See the [[List of applications]] article for many more possibilities.}}<br />
<br />
The packages listed below have been listed to aid newer users:<br />
<br />
* Display Manager: [[LXDM]] or [[LightDM]]<br />
* Audio: [[ALSA]]<br />
* Volume: {{Pkg|volumeicon}} or {{AUR|pnmixer}} with {{Pkg|gnome-alsamixer}}<br />
* Network: [[Network manager]] with {{Pkg|network-manager-applet}}<br />
* Panel: [[Tint2]] or [[Tint2#Application_Launchers_in_tint2-svn_.28AUR.29|Tint2-svn]]<br />
* Background: [[Nitrogen]] or [[Feh]]<br />
* Menu: [[Openbox#obmenu-generator|OBMenu-Generator]]<br />
* Compositor: [[Compton]]<br />
* Desktp Notifications: {{Pkg|xfce4-notifyd}}<br />
* Logout script: [[Oblogout]]<br />
* File Manager: [[PCManFM]], [[SpaceFM]], or [[Thunar]]<br />
* Clipboard Manager: {{Pkg|parcellite}}<br />
* Configuration GUIs: {{Pkg|obconf}}, {{Pkg|lxappearance-obconf}}, {{Pkg|lxrandr}}, {{Pkg|lxinput}}, {{AUR|tintwizard}} or {{AUR|tintwizard-svn}}<br />
<br />
=== Set default applications / file associations ===<br />
<br />
See the [[Default applications]] article.<br />
<br />
=== Terminal content copy and paste ===<br />
<br />
Within a terminal, either:<br />
<br />
* {{ic|Ctrl+Ins}} will copy and {{ic|Shift+Ins}} will paste. <br />
* {{ic|Ctrl+Shift+c}} will copy and '''mouse middle-click''' will paste.<br />
<br />
=== Ad-hoc window transparency ===<br />
<br />
{{Warning|This may not work where other actions are defined within the action group.}}<br />
The program {{Pkg|transset-df}} is available in the official repositories, and can enable window transparency on-the-fly.<br />
<br />
For example, using the following code in the {{ic|<mouse>}} section of the {{ic|~/.config/openbox/rc.xml}} file will enable control of application window transparency by hovering the mouse-pointer over the title bar and scrolling with the middle button:<br />
<br />
<context name="Titlebar"><br />
...<br />
<mousebind button="Up" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --inc </execute><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --dec </execute><br />
</action><br />
</mousebind><br />
...<br />
</context><br />
<br />
=== Using obxprop for faster configuration ===<br />
<br />
{{Pkg|openbox}} package provides a {{ic|obxprop}} binary that can parse relevant values for applications settings in {{ic|rc.xml}}. Officially {{ic|<nowiki>obxprop | grep "^_OB_APP"</nowiki>}} is recommended for this task. Doing so for multiple applications and its windows can be very inefficient however. The following script {{ic|obxprop2obrc}} makes it much easier to configure even a large number of applications.<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
##Script: obxprop-to-openbox-rc.sh<br />
##Recommended executable name: obxprop2obrc<br />
<br />
while [ $# -ne 0 ]; do<br />
case $1 in<br />
-f*)<br />
shift;<br />
FILE="$1";<br />
shift;<br />
;;<br />
-t*)<br />
shift;<br />
TIME="$1";<br />
shift;<br />
;;<br />
*)<br />
echo Usage: $0 [-f FILE_TEMPLATE] [-t WAIT_TO_KILL_TIME] <br />
exit 1;<br />
;;<br />
esac<br />
done<br />
<br />
if [ $TIME ]; then<br />
OBXPROPS=( $(obxprop | cat & (sleep $TIME && pkill -13 cat) | awk -F \" '/_OB_APP/{ print "\x22"$2"\x22" }' ) );<br />
else<br />
OBXPROPS=( $(obxprop | awk -F \" '/_OB_APP/{ print "\x22"$2"\x22" }' ) );<br />
fi<br />
OBPROPS=(TYPE TITLE GROUP_CLASS GROUP_NAME CLASS NAME ROLE);<br />
j=0;<br />
for i in $( seq 2 2 14 ); do<br />
OBPROP="$( echo ${OBXPROPS[@]} | awk -F \" '{ print $'$i'}' )";<br />
if [[ -z $OBPROP ]]; then <br />
declare ${OBPROPS[$j]}='"*"';<br />
else <br />
declare ${OBPROPS[$j]}="\"$OBPROP\"";<br />
fi<br />
j=$(($j+1));<br />
done;<br />
<br />
echo " <application type="$TYPE" title="$TITLE" class="$CLASS" name="$NAME" role="$ROLE">"<br />
if [ -f "$FILE" ]; then cat "$FILE" && exit; fi<br />
cat << EOF<br />
<desktop>1</desktop><br />
<desktop>all</desktop><br />
<decor>yes</decor><br />
<decor>no</decor><br />
<focus>yes</focus><br />
<focus>no</focus><br />
<fullscreen>yes</fullscreen><br />
<fullscreen>no</fullscreen><br />
<iconic>yes</iconic><br />
<iconic>no</iconic><br />
<maximized>yes</maximized><br />
<maximized>no</maximized><br />
<maximized>both</maximized><br />
<maximized>horizontal</maximized><br />
<maximized>vertical</maximized><br />
<monitor>0</monitor><br />
<monitor>1</monitor><br />
<position force="no"><br />
<position force="yes"><br />
<width>40%</width><br />
<height>30%</height><br />
<x>-1</x><br />
<y>-1</y><br />
<x>center</x><br />
<y>center</y><br />
</position><br />
<layer>above</layer><br />
<layer>normal</layer><br />
<layer>below</layer><br />
<shade>yes</shade><br />
<shade>no</shade><br />
<skip_pager>yes</skip_pager><br />
<skip_pager>no</skip_pager><br />
<skip_taskbar>yes</skip_taskbar><br />
<skip_taskbar>no</skip_taskbar><br />
</application><br />
EOF<br />
</nowiki>}}<br />
<br />
If no further options are used default configuration, that can be edited by deleting unnecessary lines, is printed out. This script can use templates with default values when using {{ic|-f}} switch:<br />
{{hc|<br />
$ obxprop2obrc -f templates-rc-inkscape-dialogs.sc > part-rc-applications-inkscape.xml<br />
$ cat part-rc-applications-inkscape.xml|<nowiki><br />
<application type="normal" title="Align and Distribute (Shift+Ctrl+A)" class="Inkscape" name="inkscape" role="*"><br />
<desktop>3</desktop><br />
<decor>yes</decor><br />
<maximized>no</maximized><br />
<position force="yes"><br />
<width>20%</width><br />
<height>30%</height><br />
<x>-1</x><br />
<y>-1</y><br />
</position><br />
<layer>normal</layer><br />
<shade>yes</shade><br />
</application><br />
</nowiki>}}<br />
<br />
It also has a time switch {{ic|-t}} which kills obxprop and thus can reduce time significantly in certain situations, although it may not work perfectly.<br />
<br />
=== Xprop values for applications ===<br />
<br />
{{Pkg|xorg-xprop}} is available in the official repositories, and can be used to relay property values for selected applications. Where frequently using per-application settings, the following [[Bash#Aliases|Bash Alias]] may be useful:<br />
dy:<br />
<br />
alias xp='xprop | grep "WM_WINDOW_ROLE\|WM_CLASS" && echo "WM_CLASS(STRING) = \"NAME\", \"CLASS\""'<br />
<br />
To use Xorg-XProp, run using the alias given {{ic|xp}}, and click on the active program desired to define with per-application settins. The results displayed will only be the information that Openbox itself requires, namely the {{ic|WM_WINDOW_ROLE}} and {{ic|WM_CLASS}} (name and class) values:<br />
<br />
WM_WINDOW_ROLE(STRING) = "roster"<br />
WM_CLASS(STRING) = "gajim.py", "Gajim.py"<br />
WM_CLASS(STRING) = "NAME", "CLASS"<br />
<br />
==== Firefox ====<br />
<br />
For whatever reason, Firefox and like-minded equivalents ignore application rules (e.g. ''<desktop>'') unless {{ic|class&#61;"Firefox*"}} is used. This applies irrespective of whatever values '''xprop''' may report for the program's {{ic|WM_CLASS}}.<br />
<br />
=== Switching between keyboard layouts ===<br />
<br />
See the article section [[Keyboard configuration in Xorg#Switching between keyboard layouts|switching between keyboard layouts]] for instructions.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Windows load behind the active window ===<br />
<br />
Some application windows (such as Firefox windows) may load behind the currently active window, causing you to need to switch to the window you just created to focus it. To fix this behavior add this to your {{ic|~/.config/openbox/rc.xml}} file, inbetween the {{ic|1=<openbox_config>}} and {{ic|1=</openbox_config>}} tags:<br />
<br />
{{bc|1=<br />
<applications><br />
<application class="*"><br />
<focus>yes</focus><br />
</application><br />
</applications><br />
}}<br />
<br />
== See also ==<br />
<br />
* [http://openbox.org/ Openbox Website] - Official website<br />
* [http://planetob.openmonkey.com/ Planet Openbox] - Openbox news portal<br />
* [http://www.box-look.org/ Box-Look.org] - A good resource for themes and related artwork<br />
* [https://bbs.archlinux.org/viewtopic.php?id=93126 Openbox Hacks and Configs Thread] @ Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=45692 Openbox Screenshots Thread] @ Arch Linux Forums<br />
* [http://urukrama.wordpress.com/openbox-guide/ An Openbox guide]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Dolphin_emulator&diff=346007Dolphin emulator2014-11-23T14:41:55Z<p>Sudowoodo: /* Emulation is too slow */</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Emulators]]<br />
{{Accuracy|As of October 2014, Dolphin is [https://dolphin-emu.org/blog/2014/09/30/dolphin-progress-report-september-2014 moving to Qt]. Parts of this article may need to be rewriten soon.}}<br />
Dolphin is a Nintendo Gamecube, Wii and Triforce emulator, currently supporting the x86, AMD64 and ARM architectures. Dolphin is available for Linux, MacOSX (intel-based), MS Windows and Android. It is a free and open source, community-developed project.<br />
Dolphin was the first Gamecube and Wii emulator, and currently the only one capable of playing commercial games.<br />
<br />
== Installation ==<br />
<br />
Install one of the following:<br />
<br />
* {{App|[[Dolphin emu]]|A Gamecube / Wii / Triforce emulator (Recommended)|https://dolphin-emu.org/|{{Pkg|dolphin-emu}}}}<br />
* {{App|Dolphin emu (git)|A Gamecube / Wii / Triforce emulator (development version)|https://github.com/dolphin-emu/dolphin|{{AUR|dolphin-emu-git}}}}<br />
* {{App|Dolphin emu Wayland (git)|A Gamecube / Wii / Triforce emulator with [[Wayland]] support.|https://dolphin-emu.org/|{{AUR|dolphin-emu-wayland-git}}}}<br />
<br />
== Configuration ==<br />
<br />
{{Note|Dolphin is a resource-heavy application, so expect not all games to run properly. See the reason [https://dolphin-emu.org/docs/faq/#why-do-i-need-such-powerful-computer-emulate-old-c here].}}<br />
{{Tip|Run {{ic|dolphin-emu -h}} for help Dolphin's options.}}<br />
<br />
While no additional configuration is needed for the emulator to run (it is preconfigured with the default settings), altering the settings can improve performance and graphics alike.<br />
Settings are split to three main sections, ''Config'', ''Graphics'' and ''DSP''.<br />
<br />
=== Config section ===<br />
{{Tip|Recent versions of Dolphin remove the ''Audio'' frameskip option, so ''Auto'' is now reccomended.}}<br />
On the General tab, check ''Enable Dual Core'' and ''Enable Idle Skipping''. Enabling or not the cheats is a personal choice. Keep in mind that a real man never cheats. The frame limit should be set to "Auto", so that it works with games from all regions. The CPU emulation engine should be left as JIT Recompiler. Only check "Force console as NTSC-J" if intending to play imported Japanese discs.<br />
<br />
All options on the "Interface" tab are personal choices.<br />
<br />
The Audio tab is the DSP section's screen; setting it up now means there will be no need to do it later. See the [[#DSP section|DSP settings paragraph]] below.<br />
<br />
The next two tabs are not very important; the Gamecube tab has settings about connected accessories, such as memory cards, and the only remarkable Wii tab option is the "Aspect Ratio" drop-down list. Set it to either 16:9 or 4:3, depending on the display's [[Wikipedia: Aspect ratio|aspect ratio]].<br />
<br />
On the final tab, "Paths", ISO directories can be set. The directory of game ISOs can also be set by clicking browse from the home screen, but here more options are available, such as ''Search Subfolders''.<br />
<br />
=== Graphics section ===<br />
<br />
On the "General" tab, choose OpenGL from the backend drop-down list. Set the "Display" and "Other" settings to the desired configuration. V-sync is useful, but it can lead to slowdowns. The "render to main window" option improves the experience aesthetically.<br />
<br />
On the "Enhancements" tab are the options that can improve graphics. While they result to great output, they can slow the emulation down to the point of making games unplayable. Choose the best settings possible, as long as speed remains 100%.<br />
<br />
{| class="wikitable"<br />
|+ Comparison of options<br />
!Option !!Performance !!Quality<br />
|-<br />
| '''Internal resolution''' || 1x Native || Auto (Window size)<br />
|-<br />
| '''Anti-aliasing''' || None || at least 2x<br />
|-<br />
| '''Anisotropic filtering''' || 1x || at least 2x<br />
|-<br />
| '''Post-Processing Effect''' || (off) || your choice<br>(see tip below)<br />
|-<br />
| '''Scaled EFB copy''' || unchecked || checked<br />
|-<br />
| '''Per-Pixel Lightning''' || unchecked || checked<br />
|-<br />
| '''Force texture filtering,<br>Widescreen Hack,<br>Disable fog''' || off || your option<br>(recommended: off)<br />
|}<br />
<br />
{{Tip|Dolphin is able to render games that were developed for 2D in anaglyph 3D. To enable this, set ''Post-Processing Effect'' to ''stereoscopic'' (default, for red-cyan mode) or ''stereoscopic2'' (blue-yellow). It is also '''necessary''' to uncheck "''Fast Depth Calculation''" on the ''Hacks'' tab (''see below'').}}<br />
<br />
{{Warning|Using filters and other ways to improve graphics might break a few games or cause graphical glitches of any level.}}<br />
<br />
Unless sure, the ''Hacks'' tab is best left untouched.<br />
<br />
{| class="wikitable"<br />
|+ Defaults<br />
!Option !! Value<br />
|-<br />
| Skip EFB access from CPU || unchecked<br />
|-<br />
| Ignore format changes || checked<br />
|-<br />
| EFB copies || texture<br />
|-<br />
| Texture cache/ Accuracy || Fast<br />
|-<br />
| External frame buffer || disable<br />
|-<br />
| Cache display lists || unchecked<br />
|-<br />
| Disable destination alpha || unchecked<br />
|-<br />
| OpenCL texture decoder || unchecked<br />
|-<br />
| OpenMP texture decoder || unchecked<br />
|-<br />
| Fast depth calculation || checked<br>(Should uncheck for anaglyph 3D)<br />
|-<br />
| Vertex streaming hack || unchecked<br />
|}<br />
<br />
Similarly, unless sure, leave '''everything''' in the ''Advanced'' tab unchecked.<br />
<br />
=== DSP section ===<br />
<br />
Set the DSP emulation engine to<br />
<br />
* DSP HLE for speed over accuracy,<br />
* DSP LLE recompiler for better accuracy with the cost of some speed,<br />
* DSP LLE interpreter; accurate but makes '''everything''' unplayable. Too slow.<br />
<br />
''DSP LLE on separate thread'' improves speed on computers with multi-core CPUs, but might cause audio glitches, and is known to break [https://wiki.dolphin-emu.org/index.php?title=Category:Zelda_ucode_games Zelda ucode games]. Audio backend is best set to [[ALSA]]. For {{ic|pulseaudio}}, Dolphin's optional dependency [[PulseAudio]] needs to be installed.<br />
<br />
{{Note|If you came here from the [[#Config section|Config section's]] link, you should go back now.}}<br />
<br />
== Playing ==<br />
<br />
{{Warning|Make sure you '''only''' use Dolphin for legally obtained self-made disc dumps of games you legally bought. Dolphin was not designed for illegal actions. Act legally as applying laws define. You are responsible for any usage of the emulator that you make.}}<br />
<br />
{{Note|No links, instructions or tips for obtaining illegal content will be provided on this wiki. No copyright infringement intended.}}<br />
<br />
Click on browse to set a directory of ISOs so that they are shown as a library on Dolphin's default screen. Otherwise just click ''Open'' and select the file.<br />
<br />
=== Dolphin's Wiki ===<br />
<br />
Whenever a game doesn't work properly, try reading its page on [https://wiki.dolphin-emu.org Dolphin's wiki]. Listed there are tips on setting up the emulator for each game, version compatibility charts, testing entries, troubleshooting and video previews. Contributions, such as testing entries and workarounds are welcome and help other users.<br />
<br />
Here's a [https://aur.archlinux.org/packages/xfce4-whiskermenu-plugin/ Whisker Menu] search action command for searching on Dolphin's wiki:<br />
<br />
exo-open --launch WebBrowser https://wiki.dolphin-emu.org/index.php?search=%u<br />
<br />
{{Tip|Setting up keymaps is recommended. Prefer a gamepad with analogue features to a keyboard and a mouse. See this [http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/GCController_Layout.svg/1000px-GCController_Layout.svg.png map of the GameCube gamepad]. Having fun while playing is also recommended.}}<br />
<br />
== Tips ==<br />
=== Scripts for building and installing Dolphin ===<br />
This script downloads or updates Dolphin, and then installs it. Put it under any directory and keep it there, along with the subdirectories and files it generates. <br />
{{Bc|<nowiki><br />
#!/bin/bash<br />
<br />
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"<br />
getdolphin() {<br />
echo 'Downloading Dolphin...'<br />
git clone https://github.com/dolphin-emu/dolphin.git<br />
}<br />
updatedolphin() {<br />
cd $DIR/dolphin-emu<br />
echo 'Updating the local repository...'<br />
git pull origin<br />
}<br />
build() {<br />
cmake $DIR/dolphin-emu<br />
make<br />
}<br />
updatedolphin || getdolphin<br />
mkdir $DIR/build<br />
cd $DIR/build<br />
build && echo 'Compiled succesfully.' || exit<br />
echo 'Proceeding to the installation; press Enter to continue or Ctrl+C to cancel.'<br />
read<br />
if [ $(whoami) == "root" ];<br />
then<br />
make install<br />
else<br />
sudo make install<br />
fi<br />
</nowiki>}}<br />
<br />
==== PKGBUILDs ====<br />
Dolphin's stable branch PKGBUILDs can be found on [https://www.archlinux.org/packages/?sort=&q=dolphin-emu the community repository].<br />
<br />
A PKGBUILD [https://aur.archlinux.org/packages/do/dolphin-emu-git/PKGBUILD for the git version] can be found on the [[AUR]], along with several other ones.<br />
<br />
== Troubleshooting ==<br />
<br />
==== Games play too fast ====<br />
Make sure the framelimit is set to a proper value for the game's region; 60 for NTSC games or 50 for PAL ones. ''Auto'' is recommended. Avoid playing other media simultaneously with Dolphin.<br />
<br />
==== Emulation is too slow ====<br />
<br />
Double-check the [[Cpu_scaling#Scaling_governors|CPU scaling governor]]. If using an nvidia graphics card, on nvidia-settings changing the powermizer setting to "Prefer maximum performance"; check its temperature to make sure the card does not overheat, though. Change Dolphin's priority using ''nice''. Killing unnecessary processes and disabling compositing also helps. Configuring Dolphin correctly, as described above, is the most important part.<br />
<br />
''See also: [[Maximizing Performance]] - most of the advice should be helpful.''<br />
<br />
==== Dolphin occasionally crashes on 64-bit CPUs ====<br />
{{Note|This solution is not guarranted to work on all systems.}}<br />
On 64bit processors, Dolphin crashes when loading a game after having played another. This also randomly happens on menus.<br />
<br />
Dolphin must be built manually, with a minor modification. Once the source code has been downloaded ({{ic|$ git clone http://www.github.com/dolphin-emu/dolphin.git}}), navigate to {{ic|(path to source)/dolphin/Source/Core/Core/}} , or, for older versions, in {{ic|(path to source)/dolphin-emu/src/dolphin/Source/Core/Core/Src/}} and edit ''CoreParameter.cpp''.<br />
<br />
Change line 98 from {{ic|<nowiki>bJITLoadStorePairedOff = false;</nowiki>}} to {{ic|<nowiki>bJITLoadStorePairedOff = true;</nowiki>}}.<br />
Notice the comment saying {{ic|// XXX not 64-bit clean}}.<br />
<br />
Upon saving the file, the package is ready to be compiled.<br />
<br />
== See also ==<br />
<br />
{{Note|The Arch Linux wiki and its users are not responsible for any damage, misuse or illegal action caused, directly or not, by following instructions from webpages hyperlinked bellow.}}<br />
<br />
* [https://dolphin-emu.org/docs/guides/performance-guide/ Dolphin's performance guide.]<br />
* [https://dolphin-emu.org/docs/faq/ Dolphin's FAQ]<br />
* [https://wiki.dolphin-emu.org/index.php?title=Ripping_Game_Discs Dolphin's wiki entry for legally obtaining game dumps.]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Nftables&diff=342602Nftables2014-11-01T08:45:46Z<p>Sudowoodo: "Elsewhere" does not matter.</p>
<hr />
<div>{{DISPLAYTITLE:nftables}}<br />
[[Category:Firewalls]]<br />
[[ja:Nftables]]<br />
{{Related articles start}}<br />
{{Related|Firewalls}}<br />
{{Related|iptables}}<br />
{{Related articles end}}<br />
{{Expansion|nftables is an entirely new utility, and lacks sufficient documentation on this wiki.}}<br />
[http://netfilter.org/projects/nftables/ nftables] is a netfilter project that aims to replace the existing ip-, ip6-, arp-, and ebtables framework. It provides a new packet filtering framework, a new user-space utility (nft), and a compatibility layer for ip- and ip6tables. It uses the existing hooks, connection tracking system, user-space queueing component, and logging subsystem of netfilter.<br />
<br />
The first release is available in Linux 3.13, which is in the ''core'' repository ({{Pkg|linux}}), and nftables (the user-space components) is available in the ''extra'' repository ({{Pkg|nftables}}), and on the [[AUR]] in package {{AUR|nftables-git}}.<br />
<br />
==Overview==<br />
nftables consists of three main components: a kernel implementation, the libnl netlink communication and the nftables user-space front-end. The kernel provides a netlink configuration interface, as well as run-time rule-set evaluation using a small classification language interpreter. libnl contains the low-level functions for communicating with the kernel; the nftables front-end is what the user interacts with.<br />
<br />
==nft==<br />
nftables' user-space utility {{ic|nft}} now performs most of the rule-set evaluation before handing rule-sets to the kernel. Because of this, nftables provides no default tables or chains; although, a user can emulate an iptables-like setup.<br />
<br />
It works in a fashion similar to ifconfig or iproute2. The commands are a long, structured sequence rather than using argument switches like in iptables. For example:<br />
nft add rule ip6 filter input ip6 saddr ::1 accept<br />
{{ic|add}} is the command. {{ic|rule}} is a subcommand of {{ic|add}}. {{ic|ip6}} is an argument of {{ic|rule}}, telling it to use the ip6 family. {{ic|filter}} and {{ic|input}} are arguments of {{ic|rule}} specifying the table and chain to use, respectively. The rest that follows is a rule definition, which includes matches ({{ic|ip}}), their parameters ({{ic|saddr}}), parameter arguments ({{ic|::1}}), and jumps ({{ic|accept}}).<br />
<br />
The following is an incomplete list of the commands available in nft:<br />
<nowiki><br />
list<br />
tables [family]<br />
table [family] <name><br />
chain [family] <table> <name><br />
<br />
add<br />
table [family] <name><br />
chain [family] <table> <name> [chain definitions]<br />
rule [family] <table> <chain> <rule definition><br />
<br />
table [family] <name> (shortcut for `add table`)<br />
<br />
insert<br />
rule [family] <table> <chain> <rule definition><br />
<br />
delete<br />
table [family] <name><br />
chain [family] <table> <name><br />
rule [family] <table> <handle><br />
<br />
flush<br />
table [family] <name><br />
chain [family] <table> <name></nowiki><br />
{{ic|family}} is optional, but it will default to {{ic|ip}}.<br />
<br />
==Tables==<br />
The purpose of tables is to hold chains. Unlike tables in iptables, there are no built-in tables in nftables. Tables can have one of four families specified, which unifies the various iptables utilities into one:<br />
<br />
{| class="wikitable"<br />
! nftables family || iptables utility<br />
|-<br />
| ip || iptables<br />
|-<br />
| ip6 || ip6tables<br />
|- <br />
| inet || iptables and ip6tables<br />
|-<br />
| arp || arptables<br />
|-<br />
| bridge || ebtables<br />
|-<br />
|}<br />
<br />
{{ic|ip}} is the default family.<br />
{{ic|inet}} requires Linux >=3.15 and allows for the unification of the ip and ip6 families to make defining rules for both easier.<br />
<br />
===Listing===<br />
You can list the current tables in a family with the {{ic|nft list}} command.<br />
# nft list tables<br />
# nft list tables ip6<br />
<br />
You can list a full table definition by specifying a table name:<br />
# nft list table foo<br />
# nft list table ip6 foo<br />
<br />
===Creation===<br />
Tables can be added via two commands — one just being a shortcut for the other. Here is an example of how to add an ip table called foo and an ip6 table called foo:<br />
# nft add table foo<br />
# nft table ip6 foo<br />
You can have two tables with the same name as long as they are in different families.<br />
<br />
===Deletion===<br />
Tables can only be deleted if there are no chains in them.<br />
# nft delete table foo<br />
# nft delete table ip6 foo<br />
<br />
==Chains==<br />
The purpose of chains is to hold rules. Unlike chains in iptables, there are no built-in chains in nftables. This means that if no chain uses any types or hooks in the netfilter framework, packets that would flow through those chains will not be touched by nftables, unlike iptables.<br />
<br />
===Listing===<br />
The {{ic|nft list table foo}} command will list all the chains in the foo table. You can also list rules from an individual chain.<br />
# nft list chain foo bar<br />
# nft list chain ip6 foo bar<br />
These commands will list the {{ic|bar}} chains in the ip and ip6 {{ic|foo}} tables.<br />
<br />
===Creation===<br />
Chains can be added when a table is created in a file definition or one at time via the {{ic|nft add chain}} command.<br />
# nft add chain foo bar<br />
# nft add chain ip6 foo bar<br />
These commands will add a chain called {{ic|bar}} to the ip and ip6 {{ic|foo}} tables.<br />
<br />
====Properties====<br />
Because nftables has no built-in chains, it allows chains to access certain features of the netfilter framework.<br />
# nft add chain filter input { type filter hook input priority 0\; }<br />
This command tells nftables to add a chain called {{ic|input}} to the {{ic|filter}} table and defines its type, hook, and priority. These properties essentially replace the built-in tables and chains in iptables.<br />
<br />
=====Types=====<br />
There are three types a chain can have and they correspond to the tables used in iptables:<br />
*filter<br />
*nat<br />
*route (mangle)<br />
<br />
=====Hooks=====<br />
There are five hooks a chain can use and they correspond to the chains used in iptables:<br />
*input<br />
*output<br />
*forward<br />
*prerouting<br />
*postrouting<br />
<br />
=====Priorities=====<br />
{{Note|Priorities do not currently appear to have any effect on which chain sees packets first.}}<br />
{{Note|Since the priority seems to be an unsigned integer, negative priorities will be converted into very high priorities.}}<br />
Priorities tell nftables which chains packets should pass through first. They are integers, and the higher the integer, the higher the priority.<br />
<br />
===Deletion===<br />
Chains can only be deleted if there are no rules in them.<br />
# nft delete chain foo bar<br />
# nft delete chain ip6 foo bar<br />
These commands delete the {{ic|bar}} chains from the ip and ip6 {{ic|foo}} tables.<br />
<br />
==Rules==<br />
The purpose of rules is to identify packets (match) and carry out tasks (jump). Like in iptables, there are various matches and jumps available, though not all of them are feature-complete in nftables.<br />
<br />
===Listing===<br />
You can list the current rules in a table with the {{ic|nft list}} command, using the same method as listing a table. You can also list rules from an individual chain.<br />
# nft list chain foo bar<br />
# nft list chain ip6 foo bar<br />
These commands will list the rules in the {{ic|bar}} chains in the ip and ip6 {{ic|foo}} tables.<br />
<br />
===Creation===<br />
Rules can be added when a table is created in a file definition or one at time via the {{ic|nft add rule}} command.<br />
# nft add rule foo bar ip saddr 127.0.0.1 accept<br />
# nft add rule ip6 foo bar ip saddr ::1 accept<br />
These commands will add a rule to the {{ic|bar}} chains in the ip and ip6 {{ic|foo}} tables that matches an {{ic|ip}} packet when its {{ic|saddr}} (source address) is 127.0.0.1 (IPv4) or ::1 (IPv6) and accepts those packets.<br />
<br />
====Matches====<br />
There are various matches available in nftables and, for the most part, coincide with their iptables counterparts. The most noticeable difference is that there are no generic or implicit matches anymore. A generic match was one that was always available, such as {{ic|--protocol}} or {{ic|--source}}. Implicit matches were protocol-specific, such as {{ic|--sport}} when a packet was determined to be TCP.<br />
<br />
The following is an incomplete list of the matches available:<br />
*meta (meta properties, e.g. interfaces)<br />
*icmp (ICMP protocol)<br />
*icmpv6 (ICMPv6 protocol)<br />
*ip (IP protocol)<br />
*ip6 (IPv6 protocol)<br />
*tcp (TCP protocol)<br />
*udp (UDP protocol)<br />
*sctp (SCTP protocol)<br />
*ct (connection tracking)<br />
<br />
The following is an incomplete list of match arguments:<br />
<nowiki><br />
meta:<br />
oif <output interface INDEX><br />
iif <input interface INDEX><br />
oifname <output interface NAME><br />
iifname <input interface NAME><br />
<br />
(oif and iif accept string arguments and are converted to interface indexes)<br />
(oifname and iifname are more dynamic, but slower because of string matching)<br />
<br />
icmp:<br />
type <icmp type><br />
<br />
icmpv6:<br />
type <icmpv6 type><br />
<br />
ip:<br />
protocol <protocol><br />
daddr <destination address><br />
saddr <source address><br />
<br />
ip6:<br />
daddr <destination address><br />
saddr <source address><br />
<br />
tcp:<br />
dport <destination port><br />
sport <source port><br />
<br />
udp:<br />
dport <destination port><br />
sport <source port><br />
<br />
sctp:<br />
dport <destination port><br />
sport <source port><br />
<br />
ct:<br />
state <new | established | related | invalid></nowiki><br />
<br />
====Jumps====<br />
Jumps work the same as they do in iptables, except multiple jumps can now be used in one rule.<br />
# nft add rule filter input tcp dport 22 log accept<br />
<br />
The following is an incomplete list of jumps:<br />
*accept (accept a packet)<br />
*reject (reject a packet)<br />
*drop (drop a packet)<br />
*snat (perform source NAT on a packet)<br />
*dnat (perform destination NAT on a packet)<br />
*log (log a packet)<br />
*counter (keep a counter on a packet; counters are optional in nftables)<br />
*return (stop traversing the chain)<br />
<br />
===Insertion===<br />
Rules can be prepended to chains with the {{ic|nft insert rule}} command.<br />
# nft insert rule filter input ct state established,related accept<br />
<br />
===Deletion===<br />
Individual rules can only be deleted by their handles. The {{ic|nft --handle list}} command must be used to determine rule handles. Note the {{ic|--handle}} switch, which tells {{ic|nft}} to list handles in its output.<br />
<br />
The following determines the handle for a rule and then deletes it. The {{ic|--number}} argument is useful for viewing some numeric output, like unresolved IP addresses.<br />
{{hc|# nft --handle --numeric list chain filter input|2=<br />
<nowiki><br />
table ip filter {<br />
chain input {<br />
type filter hook input priority 0;<br />
ip saddr 127.0.0.1 accept # handle 10<br />
}<br />
}<br />
</nowiki><br />
}}<br />
# nft delete rule filter input handle 10<br />
<br />
All the chains in a table can be flushed with the {{ic|nft flush table}} command. Individual chains can be flushed using either the {{ic|nft flush chain}} or {{ic|nft delete rule}} commands.<br />
# nft flush table foo<br />
# nft flush chain foo bar<br />
# nft delete rule ip6 foo bar<br />
The first command flushes all of the chains in the ip {{ic|foo}} table. The second flushes the {{ic|bar}} chain in the ip {{ic|foo}} table. The third deletes all of the rules in {{ic|bar}} chain in the ip6 {{ic|foo}} table.<br />
<br />
==File Definitions==<br />
{{Warning|The {{ic|nft -f}} command, despite what the [http://people.netfilter.org/wiki-nftables/index.php/Atomic_rule_replacement netfilter wiki] says, is '''NOT''' atomic. This means you will have a small window between deleting the old tables and when the new ruleset is loaded where all packets will be accepted.}}<br />
{{Note|You must delete all conflicting tables before using the {{ic|nft -f}} command.}}<br />
File definitions can be used by the {{ic|nft -f}} command, which acts like the {{ic|iptables-restore}} command.<br />
{{hc|/etc/nftables/filter.rules|2=<br />
<nowiki><br />
table ip filter {<br />
chain input {<br />
type filter hook input priority 0;<br />
ct state established,related accept<br />
ip saddr 127.0.0.1 accept<br />
tcp dport 22 log accept<br />
reject<br />
}<br />
}<br />
</nowiki><br />
}}<br />
<br />
==Getting Started==<br />
To get an [[iptables]]-like chain set up, you will first need to use the provided IPv4 filter file:<br />
<br />
# nft -f /etc/nftables/ipv4-filter<br />
<br />
To list the resulting chain:<br />
<br />
# nft list table filter<br />
<br />
Drop output to a destination:<br />
<br />
# nft add rule ip filter output ip daddr 1.2.3.4 drop<br />
<br />
Drop packets destined for local port 80:<br />
<br />
# nft add rule ip filter input tcp dport 80 drop<br />
<br />
Delete all rules in a chain:<br />
<br />
# nft delete rule filter output<br />
<br />
==Samples==<br />
===Simple IP/IPv6 Firewall===<br />
{{hc|firewall.rules|2=<br />
<nowiki><br />
# A simple firewall<br />
<br />
table firewall {<br />
chain incoming {<br />
type filter hook input priority 0;<br />
<br />
# established/related connections<br />
ct state {established, related} accept<br />
<br />
# invalid connections<br />
ct state invalid drop<br />
<br />
# loopback interface<br />
iifname lo accept<br />
<br />
# icmp<br />
ip protocol icmp accept<br />
<br />
# open tcp ports: sshd (22), httpd (80)<br />
tcp dport {ssh, http} accept<br />
<br />
# everything else<br />
reject<br />
}<br />
}<br />
<br />
table ip6 firewall {<br />
chain incoming {<br />
type filter hook input priority 0;<br />
<br />
# established/related connections<br />
ct state {established, related} accept<br />
<br />
# invalid connections<br />
ct state invalid drop<br />
<br />
# loopback interface<br />
iifname lo accept<br />
<br />
# icmp<br />
ip6 nexthdr icmpv6 accept<br />
<br />
# open tcp ports: sshd (22), httpd (80)<br />
tcp dport {ssh, http} accept<br />
<br />
# everything else<br />
reject<br />
}<br />
}<br />
</nowiki><br />
}}<br />
<br />
===Limit rate and tcp flags IP/IPv6 Firewall===<br />
{{hc|firewall.2.rules|2=<br />
<nowiki><br />
table firewall {<br />
chain incoming {<br />
type filter hook input priority 0;<br />
<br />
# bad tcp -> avoid network scanning:<br />
tcp flags & (fin|syn) == (fin|syn) drop<br />
tcp flags & (syn|rst) == (syn|rst) drop<br />
tcp flags & (fin|syn|rst|psh|ack|urg) < (fin) drop # == 0 would be better, not supported yet.<br />
tcp flags & (fin|syn|rst|psh|ack|urg) == (fin|psh|urg) drop<br />
<br />
# no ping floods:<br />
ip protocol icmp limit rate 10/second accept<br />
ip protocol icmp drop<br />
<br />
ct state {established, related} accept<br />
ct state invalid drop<br />
<br />
iifname lo accept<br />
<br />
# avoid brute force on ssh:<br />
tcp dport {ssh} limit rate 15/minute accept<br />
<br />
reject<br />
}<br />
}<br />
<br />
table ip6 firewall {<br />
chain incoming {<br />
type filter hook input priority 0;<br />
<br />
# bad tcp:<br />
tcp flags & (fin|syn) == (fin|syn) drop<br />
tcp flags & (syn|rst) == (syn|rst) drop<br />
tcp flags & (fin|syn|rst|psh|ack|urg) < (fin) drop # == 0 would be better, not supported yet.<br />
tcp flags & (fin|syn|rst|psh|ack|urg) == (fin|psh|urg) drop<br />
<br />
# no ping floods:<br />
ip6 nexthdr icmpv6 limit rate 10/second accept<br />
ip6 nexthdr icmpv6 drop<br />
<br />
ct state {established, related} accept<br />
ct state invalid drop<br />
<br />
# loopback interface<br />
iifname lo accept<br />
<br />
# avoid brute force on ssh:<br />
tcp dport {ssh} limit rate 15/minute accept<br />
<br />
reject<br />
}<br />
}<br />
</nowiki><br />
}}<br />
<br />
===Priority-based Atomic Fix===<br />
If priorities ever actually take effect, this may be a workaround for {{ic|nft -f}}'s lack of true atomicness (being able to replace all the current rules with new ones in one go):<br />
{{hc|atomic.rules|2=<br />
table atomic {<br />
chain incoming {<br />
type filter hook input priority 0;<br />
ct state new reject<br />
}<br />
}<br />
<br />
table ip6 atomic {<br />
chain incoming {<br />
type filter hook input priority 0;<br />
ct state new reject<br />
}<br />
}<br />
}}<br />
Set the priority of other chains that hook input to higher than 0. This should block new connections while no other input chains are loaded.<br />
<br />
===Rules Script with Atomic Fix===<br />
Because using {{ic|nft -f}} to reload rulesets is time consuming, it's far easier to script it. This will include an atomic fix not based on priorities. It uses the two rules files from above.<br />
{{hc|firewall.sh|2=<br />
#!/bin/sh<br />
<br />
# Load atomic rules first<br />
nft -f atomic.rules<br />
<br />
# New incoming traffic should now be stopped<br />
<br />
# Get rid of both the ip and ip6 firewall tables<br />
<br />
nft flush table firewall 2>/dev/null<br />
nft delete chain firewall incoming 2>/dev/null<br />
nft delete table firewall 2>/dev/null<br />
<br />
nft flush table ip6 firewall 2>/dev/null<br />
nft delete chain ip6 firewall incoming 2>/dev/null<br />
nft delete table ip6 firewall 2>/dev/null<br />
<br />
# Reload the firewall rules<br />
nft -f firewall.rules<br />
<br />
# Get rid of both the ip and ip6 atomic tables<br />
<br />
nft flush table atomic 2>/dev/null<br />
nft delete chain atomic incoming 2>/dev/null<br />
nft delete table atomic 2>/dev/null<br />
<br />
# New incoming IP traffic should be working<br />
<br />
nft flush table ip6 atomic 2>/dev/null<br />
nft delete chain ip6 atomic incoming 2>/dev/null<br />
nft delete table ip6 atomic 2>/dev/null<br />
<br />
# New incoming IPv6 traffic should be working<br />
}}<br />
This should take anywhere from 100ms to 400ms, which is clearly unacceptable, but the only apparent solution.<br />
<br />
==Loading rules at boot==<br />
<br />
To automatically load rules on system boot, simply enable the nftables systemd service by executing {{ic|systemctl enable nftables}}<br />
<br />
{{Note|You may have to create {{ic|/etc/modules-load.d/nftables.conf}} with all of the nftables related modules you require as entries for the systemd service to work correctly. You can get a list of modules using this command: {{bc|<nowiki>lsmod | grep nf</nowiki>}} <br />
<br />
Otheriwse, you could end up with the dreaded {{ic|Error: Could not process rule: No such file or directory}} error.}}<br />
<br />
==Logging to Syslog==<br />
<br />
For logging to Syslog, the {{ic|xt_LOG}} module needs to be loaded.<br />
<br />
==See also==<br />
* [http://people.netfilter.org/wiki-nftables/index.php/ netfilter nftables wiki]<br />
* [https://lwn.net/Articles/324251/ First release of nftables]<br />
* [https://home.regit.org/netfilter-en/nftables-quick-howto/ nftables quick howto]<br />
* [https://lwn.net/Articles/564095/ The return of nftables]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Dolphin_emulator&diff=342601Dolphin emulator2014-11-01T08:39:36Z<p>Sudowoodo: /* Scripts for building and installing Dolphin */</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Emulators]]<br />
{{Accuracy|As of October 2014, Dolphin is [https://dolphin-emu.org/blog/2014/09/30/dolphin-progress-report-september-2014 moving to Qt]. Parts of this article may need to be rewriten soon.}}<br />
Dolphin is a Nintendo Gamecube, Wii and Triforce emulator, currently supporting the x86, AMD64 and ARM architectures. Dolphin is available for Linux, MacOSX (intel-based), MS Windows and Android. It is a free and open source, community-developed project.<br />
Dolphin was the first Gamecube and Wii emulator, and currently the only one capable of playing commercial games.<br />
<br />
== Installation ==<br />
<br />
Install one of the following:<br />
<br />
* {{App|[[Dolphin emu]]|A Gamecube / Wii / Triforce emulator (Recommended)|https://dolphin-emu.org/|{{Pkg|dolphin-emu}}}}<br />
* {{App|Dolphin emu (git)|A Gamecube / Wii / Triforce emulator (development version)|https://github.com/dolphin-emu/dolphin|{{AUR|dolphin-emu-git}}}}<br />
* {{App|Dolphin emu Wayland (git)|A Gamecube / Wii / Triforce emulator with [[Wayland]] support.|https://dolphin-emu.org/|{{AUR|dolphin-emu-wayland-git}}}}<br />
<br />
== Configuration ==<br />
<br />
{{Note|Dolphin is a resource-heavy application, so expect not all games to run properly. See the reason [https://dolphin-emu.org/docs/faq/#why-do-i-need-such-powerful-computer-emulate-old-c here].}}<br />
{{Tip|Run {{ic|dolphin-emu -h}} for help Dolphin's options.}}<br />
<br />
While no additional configuration is needed for the emulator to run (it is preconfigured with the default settings), altering the settings can improve performance and graphics alike.<br />
Settings are split to three main sections, ''Config'', ''Graphics'' and ''DSP''.<br />
<br />
=== Config section ===<br />
{{Tip|Recent versions of Dolphin remove the ''Audio'' frameskip option, so ''Auto'' is now reccomended.}}<br />
On the General tab, check ''Enable Dual Core'' and ''Enable Idle Skipping''. Enabling or not the cheats is a personal choice. Keep in mind that a real man never cheats. The frame limit should be set to "Auto", so that it works with games from all regions. The CPU emulation engine should be left as JIT Recompiler. Only check "Force console as NTSC-J" if intending to play imported Japanese discs.<br />
<br />
All options on the "Interface" tab are personal choices.<br />
<br />
The Audio tab is the DSP section's screen; setting it up now means there will be no need to do it later. See the [[#DSP section|DSP settings paragraph]] below.<br />
<br />
The next two tabs are not very important; the Gamecube tab has settings about connected accessories, such as memory cards, and the only remarkable Wii tab option is the "Aspect Ratio" drop-down list. Set it to either 16:9 or 4:3, depending on the display's [[Wikipedia: Aspect ratio|aspect ratio]].<br />
<br />
On the final tab, "Paths", ISO directories can be set. The directory of game ISOs can also be set by clicking browse from the home screen, but here more options are available, such as ''Search Subfolders''.<br />
<br />
=== Graphics section ===<br />
<br />
On the "General" tab, choose OpenGL from the backend drop-down list. Set the "Display" and "Other" settings to the desired configuration. V-sync is useful, but it can lead to slowdowns. The "render to main window" option improves the experience aesthetically.<br />
<br />
On the "Enhancements" tab are the options that can improve graphics. While they result to great output, they can slow the emulation down to the point of making games unplayable. Choose the best settings possible, as long as speed remains 100%.<br />
<br />
{| class="wikitable"<br />
|+ Comparison of options<br />
!Option !!Performance !!Quality<br />
|-<br />
| '''Internal resolution''' || 1x Native || Auto (Window size)<br />
|-<br />
| '''Anti-aliasing''' || None || at least 2x<br />
|-<br />
| '''Anisotropic filtering''' || 1x || at least 2x<br />
|-<br />
| '''Post-Processing Effect''' || (off) || your choice<br>(see tip below)<br />
|-<br />
| '''Scaled EFB copy''' || unchecked || checked<br />
|-<br />
| '''Per-Pixel Lightning''' || unchecked || checked<br />
|-<br />
| '''Force texture filtering,<br>Widescreen Hack,<br>Disable fog''' || off || your option<br>(recommended: off)<br />
|}<br />
<br />
{{Tip|Dolphin is able to render games that were developed for 2D in anaglyph 3D. To enable this, set ''Post-Processing Effect'' to ''stereoscopic'' (default, for red-cyan mode) or ''stereoscopic2'' (blue-yellow). It is also '''necessary''' to uncheck "''Fast Depth Calculation''" on the ''Hacks'' tab (''see below'').}}<br />
<br />
{{Warning|Using filters and other ways to improve graphics might break a few games or cause graphical glitches of any level.}}<br />
<br />
Unless sure, the ''Hacks'' tab is best left untouched.<br />
<br />
{| class="wikitable"<br />
|+ Defaults<br />
!Option !! Value<br />
|-<br />
| Skip EFB access from CPU || unchecked<br />
|-<br />
| Ignore format changes || checked<br />
|-<br />
| EFB copies || texture<br />
|-<br />
| Texture cache/ Accuracy || Fast<br />
|-<br />
| External frame buffer || disable<br />
|-<br />
| Cache display lists || unchecked<br />
|-<br />
| Disable destination alpha || unchecked<br />
|-<br />
| OpenCL texture decoder || unchecked<br />
|-<br />
| OpenMP texture decoder || unchecked<br />
|-<br />
| Fast depth calculation || checked<br>(Should uncheck for anaglyph 3D)<br />
|-<br />
| Vertex streaming hack || unchecked<br />
|}<br />
<br />
Similarly, unless sure, leave '''everything''' in the ''Advanced'' tab unchecked.<br />
<br />
=== DSP section ===<br />
<br />
Set the DSP emulation engine to<br />
<br />
* DSP HLE for speed over accuracy,<br />
* DSP LLE recompiler for better accuracy with the cost of some speed,<br />
* DSP LLE interpreter; accurate but makes '''everything''' unplayable. Too slow.<br />
<br />
''DSP LLE on separate thread'' improves speed on computers with multi-core CPUs, but might cause audio glitches, and is known to break [https://wiki.dolphin-emu.org/index.php?title=Category:Zelda_ucode_games Zelda ucode games]. Audio backend is best set to [[ALSA]]. For {{ic|pulseaudio}}, Dolphin's optional dependency [[PulseAudio]] needs to be installed.<br />
<br />
{{Note|If you came here from the [[#Config section|Config section's]] link, you should go back now.}}<br />
<br />
== Playing ==<br />
<br />
{{Warning|Make sure you '''only''' use Dolphin for legally obtained self-made disc dumps of games you legally bought. Dolphin was not designed for illegal actions. Act legally as applying laws define. You are responsible for any usage of the emulator that you make.}}<br />
<br />
{{Note|No links, instructions or tips for obtaining illegal content will be provided on this wiki. No copyright infringement intended.}}<br />
<br />
Click on browse to set a directory of ISOs so that they are shown as a library on Dolphin's default screen. Otherwise just click ''Open'' and select the file.<br />
<br />
=== Dolphin's Wiki ===<br />
<br />
Whenever a game doesn't work properly, try reading its page on [https://wiki.dolphin-emu.org Dolphin's wiki]. Listed there are tips on setting up the emulator for each game, version compatibility charts, testing entries, troubleshooting and video previews. Contributions, such as testing entries and workarounds are welcome and help other users.<br />
<br />
Here's a [https://aur.archlinux.org/packages/xfce4-whiskermenu-plugin/ Whisker Menu] search action command for searching on Dolphin's wiki:<br />
<br />
exo-open --launch WebBrowser https://wiki.dolphin-emu.org/index.php?search=%u<br />
<br />
{{Tip|Setting up keymaps is recommended. Prefer a gamepad with analogue features to a keyboard and a mouse. See this [http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/GCController_Layout.svg/1000px-GCController_Layout.svg.png map of the GameCube gamepad]. Having fun while playing is also recommended.}}<br />
<br />
== Tips ==<br />
=== Scripts for building and installing Dolphin ===<br />
This script downloads or updates Dolphin, and then installs it. Put it under any directory and keep it there, along with the subdirectories and files it generates. <br />
{{Bc|<nowiki><br />
#!/bin/bash<br />
<br />
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"<br />
getdolphin() {<br />
echo 'Downloading Dolphin...'<br />
git clone https://github.com/dolphin-emu/dolphin.git<br />
}<br />
updatedolphin() {<br />
cd $DIR/dolphin-emu<br />
echo 'Updating the local repository...'<br />
git pull origin<br />
}<br />
build() {<br />
cmake $DIR/dolphin-emu<br />
make<br />
}<br />
updatedolphin || getdolphin<br />
mkdir $DIR/build<br />
cd $DIR/build<br />
build && echo 'Compiled succesfully.' || exit<br />
echo 'Proceeding to the installation; press Enter to continue or Ctrl+C to cancel.'<br />
read<br />
if [ $(whoami) == "root" ];<br />
then<br />
make install<br />
else<br />
sudo make install<br />
fi<br />
</nowiki>}}<br />
<br />
==== PKGBUILDs ====<br />
Dolphin's stable branch PKGBUILDs can be found on [https://www.archlinux.org/packages/?sort=&q=dolphin-emu the community repository].<br />
<br />
A PKGBUILD [https://aur.archlinux.org/packages/do/dolphin-emu-git/PKGBUILD for the git version] can be found on the [[AUR]], along with several other ones.<br />
<br />
== Troubleshooting ==<br />
<br />
==== Games play too fast ====<br />
Make sure the framelimit is set to a proper value for the game's region; 60 for NTSC games or 50 for PAL ones. ''Auto'' is recommended. Avoid playing other media simultaneously with Dolphin.<br />
<br />
==== Emulation is too slow ====<br />
<br />
Double-check the [[Cpu_scaling#Scaling_governors|CPU scaling governor]]. If using an nvidia graphics card, on nvidia-settings changing the powermizer setting to "Prefer maximum performance". Killing unnecessary processes and disabling compositing also helps. Configuring Dolphin correctly, as described above, is the most important part.<br />
<br />
''See also: [[Maximizing Performance]] - most of the advice should be helpful.''<br />
<br />
==== Dolphin occasionally crashes on 64-bit CPUs ====<br />
{{Note|This solution is not guarranted to work on all systems.}}<br />
On 64bit processors, Dolphin crashes when loading a game after having played another. This also randomly happens on menus.<br />
<br />
Dolphin must be built manually, with a minor modification. Once the source code has been downloaded ({{ic|$ git clone http://www.github.com/dolphin-emu/dolphin.git}}), navigate to {{ic|(path to source)/dolphin/Source/Core/Core/}} , or, for older versions, in {{ic|(path to source)/dolphin-emu/src/dolphin/Source/Core/Core/Src/}} and edit ''CoreParameter.cpp''.<br />
<br />
Change line 98 from {{ic|<nowiki>bJITLoadStorePairedOff = false;</nowiki>}} to {{ic|<nowiki>bJITLoadStorePairedOff = true;</nowiki>}}.<br />
Notice the comment saying {{ic|// XXX not 64-bit clean}}.<br />
<br />
Upon saving the file, the package is ready to be compiled.<br />
<br />
== See also ==<br />
<br />
{{Note|The Arch Linux wiki and its users are not responsible for any damage, misuse or illegal action caused, directly or not, by following instructions from webpages hyperlinked bellow.}}<br />
<br />
* [https://dolphin-emu.org/docs/guides/performance-guide/ Dolphin's performance guide.]<br />
* [https://dolphin-emu.org/docs/faq/ Dolphin's FAQ]<br />
* [https://wiki.dolphin-emu.org/index.php?title=Ripping_Game_Discs Dolphin's wiki entry for legally obtaining game dumps.]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Dolphin_emulator&diff=342600Dolphin emulator2014-11-01T08:35:14Z<p>Sudowoodo: /* Dolphin occasionally crashes on 64-bit CPUs */</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Emulators]]<br />
{{Accuracy|As of October 2014, Dolphin is [https://dolphin-emu.org/blog/2014/09/30/dolphin-progress-report-september-2014 moving to Qt]. Parts of this article may need to be rewriten soon.}}<br />
Dolphin is a Nintendo Gamecube, Wii and Triforce emulator, currently supporting the x86, AMD64 and ARM architectures. Dolphin is available for Linux, MacOSX (intel-based), MS Windows and Android. It is a free and open source, community-developed project.<br />
Dolphin was the first Gamecube and Wii emulator, and currently the only one capable of playing commercial games.<br />
<br />
== Installation ==<br />
<br />
Install one of the following:<br />
<br />
* {{App|[[Dolphin emu]]|A Gamecube / Wii / Triforce emulator (Recommended)|https://dolphin-emu.org/|{{Pkg|dolphin-emu}}}}<br />
* {{App|Dolphin emu (git)|A Gamecube / Wii / Triforce emulator (development version)|https://github.com/dolphin-emu/dolphin|{{AUR|dolphin-emu-git}}}}<br />
* {{App|Dolphin emu Wayland (git)|A Gamecube / Wii / Triforce emulator with [[Wayland]] support.|https://dolphin-emu.org/|{{AUR|dolphin-emu-wayland-git}}}}<br />
<br />
== Configuration ==<br />
<br />
{{Note|Dolphin is a resource-heavy application, so expect not all games to run properly. See the reason [https://dolphin-emu.org/docs/faq/#why-do-i-need-such-powerful-computer-emulate-old-c here].}}<br />
{{Tip|Run {{ic|dolphin-emu -h}} for help Dolphin's options.}}<br />
<br />
While no additional configuration is needed for the emulator to run (it is preconfigured with the default settings), altering the settings can improve performance and graphics alike.<br />
Settings are split to three main sections, ''Config'', ''Graphics'' and ''DSP''.<br />
<br />
=== Config section ===<br />
{{Tip|Recent versions of Dolphin remove the ''Audio'' frameskip option, so ''Auto'' is now reccomended.}}<br />
On the General tab, check ''Enable Dual Core'' and ''Enable Idle Skipping''. Enabling or not the cheats is a personal choice. Keep in mind that a real man never cheats. The frame limit should be set to "Auto", so that it works with games from all regions. The CPU emulation engine should be left as JIT Recompiler. Only check "Force console as NTSC-J" if intending to play imported Japanese discs.<br />
<br />
All options on the "Interface" tab are personal choices.<br />
<br />
The Audio tab is the DSP section's screen; setting it up now means there will be no need to do it later. See the [[#DSP section|DSP settings paragraph]] below.<br />
<br />
The next two tabs are not very important; the Gamecube tab has settings about connected accessories, such as memory cards, and the only remarkable Wii tab option is the "Aspect Ratio" drop-down list. Set it to either 16:9 or 4:3, depending on the display's [[Wikipedia: Aspect ratio|aspect ratio]].<br />
<br />
On the final tab, "Paths", ISO directories can be set. The directory of game ISOs can also be set by clicking browse from the home screen, but here more options are available, such as ''Search Subfolders''.<br />
<br />
=== Graphics section ===<br />
<br />
On the "General" tab, choose OpenGL from the backend drop-down list. Set the "Display" and "Other" settings to the desired configuration. V-sync is useful, but it can lead to slowdowns. The "render to main window" option improves the experience aesthetically.<br />
<br />
On the "Enhancements" tab are the options that can improve graphics. While they result to great output, they can slow the emulation down to the point of making games unplayable. Choose the best settings possible, as long as speed remains 100%.<br />
<br />
{| class="wikitable"<br />
|+ Comparison of options<br />
!Option !!Performance !!Quality<br />
|-<br />
| '''Internal resolution''' || 1x Native || Auto (Window size)<br />
|-<br />
| '''Anti-aliasing''' || None || at least 2x<br />
|-<br />
| '''Anisotropic filtering''' || 1x || at least 2x<br />
|-<br />
| '''Post-Processing Effect''' || (off) || your choice<br>(see tip below)<br />
|-<br />
| '''Scaled EFB copy''' || unchecked || checked<br />
|-<br />
| '''Per-Pixel Lightning''' || unchecked || checked<br />
|-<br />
| '''Force texture filtering,<br>Widescreen Hack,<br>Disable fog''' || off || your option<br>(recommended: off)<br />
|}<br />
<br />
{{Tip|Dolphin is able to render games that were developed for 2D in anaglyph 3D. To enable this, set ''Post-Processing Effect'' to ''stereoscopic'' (default, for red-cyan mode) or ''stereoscopic2'' (blue-yellow). It is also '''necessary''' to uncheck "''Fast Depth Calculation''" on the ''Hacks'' tab (''see below'').}}<br />
<br />
{{Warning|Using filters and other ways to improve graphics might break a few games or cause graphical glitches of any level.}}<br />
<br />
Unless sure, the ''Hacks'' tab is best left untouched.<br />
<br />
{| class="wikitable"<br />
|+ Defaults<br />
!Option !! Value<br />
|-<br />
| Skip EFB access from CPU || unchecked<br />
|-<br />
| Ignore format changes || checked<br />
|-<br />
| EFB copies || texture<br />
|-<br />
| Texture cache/ Accuracy || Fast<br />
|-<br />
| External frame buffer || disable<br />
|-<br />
| Cache display lists || unchecked<br />
|-<br />
| Disable destination alpha || unchecked<br />
|-<br />
| OpenCL texture decoder || unchecked<br />
|-<br />
| OpenMP texture decoder || unchecked<br />
|-<br />
| Fast depth calculation || checked<br>(Should uncheck for anaglyph 3D)<br />
|-<br />
| Vertex streaming hack || unchecked<br />
|}<br />
<br />
Similarly, unless sure, leave '''everything''' in the ''Advanced'' tab unchecked.<br />
<br />
=== DSP section ===<br />
<br />
Set the DSP emulation engine to<br />
<br />
* DSP HLE for speed over accuracy,<br />
* DSP LLE recompiler for better accuracy with the cost of some speed,<br />
* DSP LLE interpreter; accurate but makes '''everything''' unplayable. Too slow.<br />
<br />
''DSP LLE on separate thread'' improves speed on computers with multi-core CPUs, but might cause audio glitches, and is known to break [https://wiki.dolphin-emu.org/index.php?title=Category:Zelda_ucode_games Zelda ucode games]. Audio backend is best set to [[ALSA]]. For {{ic|pulseaudio}}, Dolphin's optional dependency [[PulseAudio]] needs to be installed.<br />
<br />
{{Note|If you came here from the [[#Config section|Config section's]] link, you should go back now.}}<br />
<br />
== Playing ==<br />
<br />
{{Warning|Make sure you '''only''' use Dolphin for legally obtained self-made disc dumps of games you legally bought. Dolphin was not designed for illegal actions. Act legally as applying laws define. You are responsible for any usage of the emulator that you make.}}<br />
<br />
{{Note|No links, instructions or tips for obtaining illegal content will be provided on this wiki. No copyright infringement intended.}}<br />
<br />
Click on browse to set a directory of ISOs so that they are shown as a library on Dolphin's default screen. Otherwise just click ''Open'' and select the file.<br />
<br />
=== Dolphin's Wiki ===<br />
<br />
Whenever a game doesn't work properly, try reading its page on [https://wiki.dolphin-emu.org Dolphin's wiki]. Listed there are tips on setting up the emulator for each game, version compatibility charts, testing entries, troubleshooting and video previews. Contributions, such as testing entries and workarounds are welcome and help other users.<br />
<br />
Here's a [https://aur.archlinux.org/packages/xfce4-whiskermenu-plugin/ Whisker Menu] search action command for searching on Dolphin's wiki:<br />
<br />
exo-open --launch WebBrowser https://wiki.dolphin-emu.org/index.php?search=%u<br />
<br />
{{Tip|Setting up keymaps is recommended. Prefer a gamepad with analogue features to a keyboard and a mouse. See this [http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/GCController_Layout.svg/1000px-GCController_Layout.svg.png map of the GameCube gamepad]. Having fun while playing is also recommended.}}<br />
<br />
== Tips ==<br />
=== Scripts for building and installing Dolphin ===<br />
This script downloads or updates Dolphin, and then installs it. Put it under any directory and keep it there, along with the subdirectories and files it generates. <br />
{{Bc|<nowiki><br />
#!/bin/bash<br />
<br />
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"<br />
getdolphin() {<br />
echo 'Downloading Dolphin...'<br />
git clone https://github.com/dolphin-emu/dolphin.git<br />
}<br />
updatedolphin() {<br />
cd $DIR/dolphin-emu<br />
echo 'Updating the local repository...'<br />
git pull origin<br />
}<br />
build() {<br />
cmake $DIR/dolphin-emu<br />
make<br />
}<br />
updatedolphin || getdolphin<br />
mkdir $DIR/build<br />
cd $DIR/build<br />
build && echo 'Compiled succesfully.' || exit<br />
echo 'Proceeding to the installation; press Enter to continue or Ctrl+C to cancel.'<br />
read<br />
if [ $(whoami) == "root" ];<br />
then<br />
make install<br />
else<br />
sudo make install<br />
fi<br />
</nowiki>}}<br />
<br />
== Troubleshooting ==<br />
<br />
==== Games play too fast ====<br />
Make sure the framelimit is set to a proper value for the game's region; 60 for NTSC games or 50 for PAL ones. ''Auto'' is recommended. Avoid playing other media simultaneously with Dolphin.<br />
<br />
==== Emulation is too slow ====<br />
<br />
Double-check the [[Cpu_scaling#Scaling_governors|CPU scaling governor]]. If using an nvidia graphics card, on nvidia-settings changing the powermizer setting to "Prefer maximum performance". Killing unnecessary processes and disabling compositing also helps. Configuring Dolphin correctly, as described above, is the most important part.<br />
<br />
''See also: [[Maximizing Performance]] - most of the advice should be helpful.''<br />
<br />
==== Dolphin occasionally crashes on 64-bit CPUs ====<br />
{{Note|This solution is not guarranted to work on all systems.}}<br />
On 64bit processors, Dolphin crashes when loading a game after having played another. This also randomly happens on menus.<br />
<br />
Dolphin must be built manually, with a minor modification. Once the source code has been downloaded ({{ic|$ git clone http://www.github.com/dolphin-emu/dolphin.git}}), navigate to {{ic|(path to source)/dolphin/Source/Core/Core/}} , or, for older versions, in {{ic|(path to source)/dolphin-emu/src/dolphin/Source/Core/Core/Src/}} and edit ''CoreParameter.cpp''.<br />
<br />
Change line 98 from {{ic|<nowiki>bJITLoadStorePairedOff = false;</nowiki>}} to {{ic|<nowiki>bJITLoadStorePairedOff = true;</nowiki>}}.<br />
Notice the comment saying {{ic|// XXX not 64-bit clean}}.<br />
<br />
Upon saving the file, the package is ready to be compiled.<br />
<br />
== See also ==<br />
<br />
{{Note|The Arch Linux wiki and its users are not responsible for any damage, misuse or illegal action caused, directly or not, by following instructions from webpages hyperlinked bellow.}}<br />
<br />
* [https://dolphin-emu.org/docs/guides/performance-guide/ Dolphin's performance guide.]<br />
* [https://dolphin-emu.org/docs/faq/ Dolphin's FAQ]<br />
* [https://wiki.dolphin-emu.org/index.php?title=Ripping_Game_Discs Dolphin's wiki entry for legally obtaining game dumps.]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Dolphin_emulator&diff=342599Dolphin emulator2014-11-01T08:33:25Z<p>Sudowoodo: /* See also */</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Emulators]]<br />
{{Accuracy|As of October 2014, Dolphin is [https://dolphin-emu.org/blog/2014/09/30/dolphin-progress-report-september-2014 moving to Qt]. Parts of this article may need to be rewriten soon.}}<br />
Dolphin is a Nintendo Gamecube, Wii and Triforce emulator, currently supporting the x86, AMD64 and ARM architectures. Dolphin is available for Linux, MacOSX (intel-based), MS Windows and Android. It is a free and open source, community-developed project.<br />
Dolphin was the first Gamecube and Wii emulator, and currently the only one capable of playing commercial games.<br />
<br />
== Installation ==<br />
<br />
Install one of the following:<br />
<br />
* {{App|[[Dolphin emu]]|A Gamecube / Wii / Triforce emulator (Recommended)|https://dolphin-emu.org/|{{Pkg|dolphin-emu}}}}<br />
* {{App|Dolphin emu (git)|A Gamecube / Wii / Triforce emulator (development version)|https://github.com/dolphin-emu/dolphin|{{AUR|dolphin-emu-git}}}}<br />
* {{App|Dolphin emu Wayland (git)|A Gamecube / Wii / Triforce emulator with [[Wayland]] support.|https://dolphin-emu.org/|{{AUR|dolphin-emu-wayland-git}}}}<br />
<br />
== Configuration ==<br />
<br />
{{Note|Dolphin is a resource-heavy application, so expect not all games to run properly. See the reason [https://dolphin-emu.org/docs/faq/#why-do-i-need-such-powerful-computer-emulate-old-c here].}}<br />
{{Tip|Run {{ic|dolphin-emu -h}} for help Dolphin's options.}}<br />
<br />
While no additional configuration is needed for the emulator to run (it is preconfigured with the default settings), altering the settings can improve performance and graphics alike.<br />
Settings are split to three main sections, ''Config'', ''Graphics'' and ''DSP''.<br />
<br />
=== Config section ===<br />
{{Tip|Recent versions of Dolphin remove the ''Audio'' frameskip option, so ''Auto'' is now reccomended.}}<br />
On the General tab, check ''Enable Dual Core'' and ''Enable Idle Skipping''. Enabling or not the cheats is a personal choice. Keep in mind that a real man never cheats. The frame limit should be set to "Auto", so that it works with games from all regions. The CPU emulation engine should be left as JIT Recompiler. Only check "Force console as NTSC-J" if intending to play imported Japanese discs.<br />
<br />
All options on the "Interface" tab are personal choices.<br />
<br />
The Audio tab is the DSP section's screen; setting it up now means there will be no need to do it later. See the [[#DSP section|DSP settings paragraph]] below.<br />
<br />
The next two tabs are not very important; the Gamecube tab has settings about connected accessories, such as memory cards, and the only remarkable Wii tab option is the "Aspect Ratio" drop-down list. Set it to either 16:9 or 4:3, depending on the display's [[Wikipedia: Aspect ratio|aspect ratio]].<br />
<br />
On the final tab, "Paths", ISO directories can be set. The directory of game ISOs can also be set by clicking browse from the home screen, but here more options are available, such as ''Search Subfolders''.<br />
<br />
=== Graphics section ===<br />
<br />
On the "General" tab, choose OpenGL from the backend drop-down list. Set the "Display" and "Other" settings to the desired configuration. V-sync is useful, but it can lead to slowdowns. The "render to main window" option improves the experience aesthetically.<br />
<br />
On the "Enhancements" tab are the options that can improve graphics. While they result to great output, they can slow the emulation down to the point of making games unplayable. Choose the best settings possible, as long as speed remains 100%.<br />
<br />
{| class="wikitable"<br />
|+ Comparison of options<br />
!Option !!Performance !!Quality<br />
|-<br />
| '''Internal resolution''' || 1x Native || Auto (Window size)<br />
|-<br />
| '''Anti-aliasing''' || None || at least 2x<br />
|-<br />
| '''Anisotropic filtering''' || 1x || at least 2x<br />
|-<br />
| '''Post-Processing Effect''' || (off) || your choice<br>(see tip below)<br />
|-<br />
| '''Scaled EFB copy''' || unchecked || checked<br />
|-<br />
| '''Per-Pixel Lightning''' || unchecked || checked<br />
|-<br />
| '''Force texture filtering,<br>Widescreen Hack,<br>Disable fog''' || off || your option<br>(recommended: off)<br />
|}<br />
<br />
{{Tip|Dolphin is able to render games that were developed for 2D in anaglyph 3D. To enable this, set ''Post-Processing Effect'' to ''stereoscopic'' (default, for red-cyan mode) or ''stereoscopic2'' (blue-yellow). It is also '''necessary''' to uncheck "''Fast Depth Calculation''" on the ''Hacks'' tab (''see below'').}}<br />
<br />
{{Warning|Using filters and other ways to improve graphics might break a few games or cause graphical glitches of any level.}}<br />
<br />
Unless sure, the ''Hacks'' tab is best left untouched.<br />
<br />
{| class="wikitable"<br />
|+ Defaults<br />
!Option !! Value<br />
|-<br />
| Skip EFB access from CPU || unchecked<br />
|-<br />
| Ignore format changes || checked<br />
|-<br />
| EFB copies || texture<br />
|-<br />
| Texture cache/ Accuracy || Fast<br />
|-<br />
| External frame buffer || disable<br />
|-<br />
| Cache display lists || unchecked<br />
|-<br />
| Disable destination alpha || unchecked<br />
|-<br />
| OpenCL texture decoder || unchecked<br />
|-<br />
| OpenMP texture decoder || unchecked<br />
|-<br />
| Fast depth calculation || checked<br>(Should uncheck for anaglyph 3D)<br />
|-<br />
| Vertex streaming hack || unchecked<br />
|}<br />
<br />
Similarly, unless sure, leave '''everything''' in the ''Advanced'' tab unchecked.<br />
<br />
=== DSP section ===<br />
<br />
Set the DSP emulation engine to<br />
<br />
* DSP HLE for speed over accuracy,<br />
* DSP LLE recompiler for better accuracy with the cost of some speed,<br />
* DSP LLE interpreter; accurate but makes '''everything''' unplayable. Too slow.<br />
<br />
''DSP LLE on separate thread'' improves speed on computers with multi-core CPUs, but might cause audio glitches, and is known to break [https://wiki.dolphin-emu.org/index.php?title=Category:Zelda_ucode_games Zelda ucode games]. Audio backend is best set to [[ALSA]]. For {{ic|pulseaudio}}, Dolphin's optional dependency [[PulseAudio]] needs to be installed.<br />
<br />
{{Note|If you came here from the [[#Config section|Config section's]] link, you should go back now.}}<br />
<br />
== Playing ==<br />
<br />
{{Warning|Make sure you '''only''' use Dolphin for legally obtained self-made disc dumps of games you legally bought. Dolphin was not designed for illegal actions. Act legally as applying laws define. You are responsible for any usage of the emulator that you make.}}<br />
<br />
{{Note|No links, instructions or tips for obtaining illegal content will be provided on this wiki. No copyright infringement intended.}}<br />
<br />
Click on browse to set a directory of ISOs so that they are shown as a library on Dolphin's default screen. Otherwise just click ''Open'' and select the file.<br />
<br />
=== Dolphin's Wiki ===<br />
<br />
Whenever a game doesn't work properly, try reading its page on [https://wiki.dolphin-emu.org Dolphin's wiki]. Listed there are tips on setting up the emulator for each game, version compatibility charts, testing entries, troubleshooting and video previews. Contributions, such as testing entries and workarounds are welcome and help other users.<br />
<br />
Here's a [https://aur.archlinux.org/packages/xfce4-whiskermenu-plugin/ Whisker Menu] search action command for searching on Dolphin's wiki:<br />
<br />
exo-open --launch WebBrowser https://wiki.dolphin-emu.org/index.php?search=%u<br />
<br />
{{Tip|Setting up keymaps is recommended. Prefer a gamepad with analogue features to a keyboard and a mouse. See this [http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/GCController_Layout.svg/1000px-GCController_Layout.svg.png map of the GameCube gamepad]. Having fun while playing is also recommended.}}<br />
<br />
== Tips ==<br />
=== Scripts for building and installing Dolphin ===<br />
This script downloads or updates Dolphin, and then installs it. Put it under any directory and keep it there, along with the subdirectories and files it generates. <br />
{{Bc|<nowiki><br />
#!/bin/bash<br />
<br />
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"<br />
getdolphin() {<br />
echo 'Downloading Dolphin...'<br />
git clone https://github.com/dolphin-emu/dolphin.git<br />
}<br />
updatedolphin() {<br />
cd $DIR/dolphin-emu<br />
echo 'Updating the local repository...'<br />
git pull origin<br />
}<br />
build() {<br />
cmake $DIR/dolphin-emu<br />
make<br />
}<br />
updatedolphin || getdolphin<br />
mkdir $DIR/build<br />
cd $DIR/build<br />
build && echo 'Compiled succesfully.' || exit<br />
echo 'Proceeding to the installation; press Enter to continue or Ctrl+C to cancel.'<br />
read<br />
if [ $(whoami) == "root" ];<br />
then<br />
make install<br />
else<br />
sudo make install<br />
fi<br />
</nowiki>}}<br />
<br />
== Troubleshooting ==<br />
<br />
==== Games play too fast ====<br />
Make sure the framelimit is set to a proper value for the game's region; 60 for NTSC games or 50 for PAL ones. ''Auto'' is recommended. Avoid playing other media simultaneously with Dolphin.<br />
<br />
==== Emulation is too slow ====<br />
<br />
Double-check the [[Cpu_scaling#Scaling_governors|CPU scaling governor]]. If using an nvidia graphics card, on nvidia-settings changing the powermizer setting to "Prefer maximum performance". Killing unnecessary processes and disabling compositing also helps. Configuring Dolphin correctly, as described above, is the most important part.<br />
<br />
''See also: [[Maximizing Performance]] - most of the advice should be helpful.''<br />
<br />
==== Dolphin occasionally crashes on 64-bit CPUs ====<br />
{{Note|This solution is not guarranted to work on all systems.}}<br />
On 64bit processors, Dolphin crashes when loading a game after having played another. This also randomly happens on menus.<br />
<br />
Dolphin must be built manually, with a minor modification. Once the source code has been downloaded ({{ic|$ git clone http://www.github.com/dolphin-emu/dolphin}}), navigate to {{ic|(path to source)/dolphin/Source/Core/Core/}} , or, for older versions, in {{ic|(path to source)/dolphin-emu/src/dolphin/Source/Core/Core/Src/}} and edit ''CoreParameter.cpp''.<br />
<br />
Change line 98 from {{ic|<nowiki>bJITLoadStorePairedOff = false;</nowiki>}} to {{ic|<nowiki>bJITLoadStorePairedOff = true;</nowiki>}}.<br />
Notice the comment saying {{ic|// XXX not 64-bit clean}}.<br />
<br />
Upon saving the file, the package is ready to be compiled.<br />
<br />
''See also: [https://aur.archlinux.org/packages/do/dolphin-emu-git/PKGBUILD a PKGBUILD for Dolphin (git)]''<br />
<br />
== See also ==<br />
<br />
{{Note|The Arch Linux wiki and its users are not responsible for any damage, misuse or illegal action caused, directly or not, by following instructions from webpages hyperlinked bellow.}}<br />
<br />
* [https://dolphin-emu.org/docs/guides/performance-guide/ Dolphin's performance guide.]<br />
* [https://dolphin-emu.org/docs/faq/ Dolphin's FAQ]<br />
* [https://wiki.dolphin-emu.org/index.php?title=Ripping_Game_Discs Dolphin's wiki entry for legally obtaining game dumps.]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Dolphin_emulator&diff=342598Dolphin emulator2014-11-01T08:32:44Z<p>Sudowoodo: /* Games play too fast */</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Emulators]]<br />
{{Accuracy|As of October 2014, Dolphin is [https://dolphin-emu.org/blog/2014/09/30/dolphin-progress-report-september-2014 moving to Qt]. Parts of this article may need to be rewriten soon.}}<br />
Dolphin is a Nintendo Gamecube, Wii and Triforce emulator, currently supporting the x86, AMD64 and ARM architectures. Dolphin is available for Linux, MacOSX (intel-based), MS Windows and Android. It is a free and open source, community-developed project.<br />
Dolphin was the first Gamecube and Wii emulator, and currently the only one capable of playing commercial games.<br />
<br />
== Installation ==<br />
<br />
Install one of the following:<br />
<br />
* {{App|[[Dolphin emu]]|A Gamecube / Wii / Triforce emulator (Recommended)|https://dolphin-emu.org/|{{Pkg|dolphin-emu}}}}<br />
* {{App|Dolphin emu (git)|A Gamecube / Wii / Triforce emulator (development version)|https://github.com/dolphin-emu/dolphin|{{AUR|dolphin-emu-git}}}}<br />
* {{App|Dolphin emu Wayland (git)|A Gamecube / Wii / Triforce emulator with [[Wayland]] support.|https://dolphin-emu.org/|{{AUR|dolphin-emu-wayland-git}}}}<br />
<br />
== Configuration ==<br />
<br />
{{Note|Dolphin is a resource-heavy application, so expect not all games to run properly. See the reason [https://dolphin-emu.org/docs/faq/#why-do-i-need-such-powerful-computer-emulate-old-c here].}}<br />
{{Tip|Run {{ic|dolphin-emu -h}} for help Dolphin's options.}}<br />
<br />
While no additional configuration is needed for the emulator to run (it is preconfigured with the default settings), altering the settings can improve performance and graphics alike.<br />
Settings are split to three main sections, ''Config'', ''Graphics'' and ''DSP''.<br />
<br />
=== Config section ===<br />
{{Tip|Recent versions of Dolphin remove the ''Audio'' frameskip option, so ''Auto'' is now reccomended.}}<br />
On the General tab, check ''Enable Dual Core'' and ''Enable Idle Skipping''. Enabling or not the cheats is a personal choice. Keep in mind that a real man never cheats. The frame limit should be set to "Auto", so that it works with games from all regions. The CPU emulation engine should be left as JIT Recompiler. Only check "Force console as NTSC-J" if intending to play imported Japanese discs.<br />
<br />
All options on the "Interface" tab are personal choices.<br />
<br />
The Audio tab is the DSP section's screen; setting it up now means there will be no need to do it later. See the [[#DSP section|DSP settings paragraph]] below.<br />
<br />
The next two tabs are not very important; the Gamecube tab has settings about connected accessories, such as memory cards, and the only remarkable Wii tab option is the "Aspect Ratio" drop-down list. Set it to either 16:9 or 4:3, depending on the display's [[Wikipedia: Aspect ratio|aspect ratio]].<br />
<br />
On the final tab, "Paths", ISO directories can be set. The directory of game ISOs can also be set by clicking browse from the home screen, but here more options are available, such as ''Search Subfolders''.<br />
<br />
=== Graphics section ===<br />
<br />
On the "General" tab, choose OpenGL from the backend drop-down list. Set the "Display" and "Other" settings to the desired configuration. V-sync is useful, but it can lead to slowdowns. The "render to main window" option improves the experience aesthetically.<br />
<br />
On the "Enhancements" tab are the options that can improve graphics. While they result to great output, they can slow the emulation down to the point of making games unplayable. Choose the best settings possible, as long as speed remains 100%.<br />
<br />
{| class="wikitable"<br />
|+ Comparison of options<br />
!Option !!Performance !!Quality<br />
|-<br />
| '''Internal resolution''' || 1x Native || Auto (Window size)<br />
|-<br />
| '''Anti-aliasing''' || None || at least 2x<br />
|-<br />
| '''Anisotropic filtering''' || 1x || at least 2x<br />
|-<br />
| '''Post-Processing Effect''' || (off) || your choice<br>(see tip below)<br />
|-<br />
| '''Scaled EFB copy''' || unchecked || checked<br />
|-<br />
| '''Per-Pixel Lightning''' || unchecked || checked<br />
|-<br />
| '''Force texture filtering,<br>Widescreen Hack,<br>Disable fog''' || off || your option<br>(recommended: off)<br />
|}<br />
<br />
{{Tip|Dolphin is able to render games that were developed for 2D in anaglyph 3D. To enable this, set ''Post-Processing Effect'' to ''stereoscopic'' (default, for red-cyan mode) or ''stereoscopic2'' (blue-yellow). It is also '''necessary''' to uncheck "''Fast Depth Calculation''" on the ''Hacks'' tab (''see below'').}}<br />
<br />
{{Warning|Using filters and other ways to improve graphics might break a few games or cause graphical glitches of any level.}}<br />
<br />
Unless sure, the ''Hacks'' tab is best left untouched.<br />
<br />
{| class="wikitable"<br />
|+ Defaults<br />
!Option !! Value<br />
|-<br />
| Skip EFB access from CPU || unchecked<br />
|-<br />
| Ignore format changes || checked<br />
|-<br />
| EFB copies || texture<br />
|-<br />
| Texture cache/ Accuracy || Fast<br />
|-<br />
| External frame buffer || disable<br />
|-<br />
| Cache display lists || unchecked<br />
|-<br />
| Disable destination alpha || unchecked<br />
|-<br />
| OpenCL texture decoder || unchecked<br />
|-<br />
| OpenMP texture decoder || unchecked<br />
|-<br />
| Fast depth calculation || checked<br>(Should uncheck for anaglyph 3D)<br />
|-<br />
| Vertex streaming hack || unchecked<br />
|}<br />
<br />
Similarly, unless sure, leave '''everything''' in the ''Advanced'' tab unchecked.<br />
<br />
=== DSP section ===<br />
<br />
Set the DSP emulation engine to<br />
<br />
* DSP HLE for speed over accuracy,<br />
* DSP LLE recompiler for better accuracy with the cost of some speed,<br />
* DSP LLE interpreter; accurate but makes '''everything''' unplayable. Too slow.<br />
<br />
''DSP LLE on separate thread'' improves speed on computers with multi-core CPUs, but might cause audio glitches, and is known to break [https://wiki.dolphin-emu.org/index.php?title=Category:Zelda_ucode_games Zelda ucode games]. Audio backend is best set to [[ALSA]]. For {{ic|pulseaudio}}, Dolphin's optional dependency [[PulseAudio]] needs to be installed.<br />
<br />
{{Note|If you came here from the [[#Config section|Config section's]] link, you should go back now.}}<br />
<br />
== Playing ==<br />
<br />
{{Warning|Make sure you '''only''' use Dolphin for legally obtained self-made disc dumps of games you legally bought. Dolphin was not designed for illegal actions. Act legally as applying laws define. You are responsible for any usage of the emulator that you make.}}<br />
<br />
{{Note|No links, instructions or tips for obtaining illegal content will be provided on this wiki. No copyright infringement intended.}}<br />
<br />
Click on browse to set a directory of ISOs so that they are shown as a library on Dolphin's default screen. Otherwise just click ''Open'' and select the file.<br />
<br />
=== Dolphin's Wiki ===<br />
<br />
Whenever a game doesn't work properly, try reading its page on [https://wiki.dolphin-emu.org Dolphin's wiki]. Listed there are tips on setting up the emulator for each game, version compatibility charts, testing entries, troubleshooting and video previews. Contributions, such as testing entries and workarounds are welcome and help other users.<br />
<br />
Here's a [https://aur.archlinux.org/packages/xfce4-whiskermenu-plugin/ Whisker Menu] search action command for searching on Dolphin's wiki:<br />
<br />
exo-open --launch WebBrowser https://wiki.dolphin-emu.org/index.php?search=%u<br />
<br />
{{Tip|Setting up keymaps is recommended. Prefer a gamepad with analogue features to a keyboard and a mouse. See this [http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/GCController_Layout.svg/1000px-GCController_Layout.svg.png map of the GameCube gamepad]. Having fun while playing is also recommended.}}<br />
<br />
== Tips ==<br />
=== Scripts for building and installing Dolphin ===<br />
This script downloads or updates Dolphin, and then installs it. Put it under any directory and keep it there, along with the subdirectories and files it generates. <br />
{{Bc|<nowiki><br />
#!/bin/bash<br />
<br />
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"<br />
getdolphin() {<br />
echo 'Downloading Dolphin...'<br />
git clone https://github.com/dolphin-emu/dolphin.git<br />
}<br />
updatedolphin() {<br />
cd $DIR/dolphin-emu<br />
echo 'Updating the local repository...'<br />
git pull origin<br />
}<br />
build() {<br />
cmake $DIR/dolphin-emu<br />
make<br />
}<br />
updatedolphin || getdolphin<br />
mkdir $DIR/build<br />
cd $DIR/build<br />
build && echo 'Compiled succesfully.' || exit<br />
echo 'Proceeding to the installation; press Enter to continue or Ctrl+C to cancel.'<br />
read<br />
if [ $(whoami) == "root" ];<br />
then<br />
make install<br />
else<br />
sudo make install<br />
fi<br />
</nowiki>}}<br />
<br />
== Troubleshooting ==<br />
<br />
==== Games play too fast ====<br />
Make sure the framelimit is set to a proper value for the game's region; 60 for NTSC games or 50 for PAL ones. ''Auto'' is recommended. Avoid playing other media simultaneously with Dolphin.<br />
<br />
==== Emulation is too slow ====<br />
<br />
Double-check the [[Cpu_scaling#Scaling_governors|CPU scaling governor]]. If using an nvidia graphics card, on nvidia-settings changing the powermizer setting to "Prefer maximum performance". Killing unnecessary processes and disabling compositing also helps. Configuring Dolphin correctly, as described above, is the most important part.<br />
<br />
''See also: [[Maximizing Performance]] - most of the advice should be helpful.''<br />
<br />
==== Dolphin occasionally crashes on 64-bit CPUs ====<br />
{{Note|This solution is not guarranted to work on all systems.}}<br />
On 64bit processors, Dolphin crashes when loading a game after having played another. This also randomly happens on menus.<br />
<br />
Dolphin must be built manually, with a minor modification. Once the source code has been downloaded ({{ic|$ git clone http://www.github.com/dolphin-emu/dolphin}}), navigate to {{ic|(path to source)/dolphin/Source/Core/Core/}} , or, for older versions, in {{ic|(path to source)/dolphin-emu/src/dolphin/Source/Core/Core/Src/}} and edit ''CoreParameter.cpp''.<br />
<br />
Change line 98 from {{ic|<nowiki>bJITLoadStorePairedOff = false;</nowiki>}} to {{ic|<nowiki>bJITLoadStorePairedOff = true;</nowiki>}}.<br />
Notice the comment saying {{ic|// XXX not 64-bit clean}}.<br />
<br />
Upon saving the file, the package is ready to be compiled.<br />
<br />
''See also: [https://aur.archlinux.org/packages/do/dolphin-emu-git/PKGBUILD a PKGBUILD for Dolphin (git)]''<br />
<br />
== See also ==<br />
<br />
{{Note|The Arch Linux wiki and its users are not responsible for any damage, misuse or illegal action caused by following instructions from webpages hyperlinked bellow.}}<br />
<br />
* [https://dolphin-emu.org/docs/guides/performance-guide/ Dolphin's performance guide.]<br />
* [https://dolphin-emu.org/docs/faq/ Dolphin's FAQ]<br />
* [https://wiki.dolphin-emu.org/index.php?title=Ripping_Game_Discs Dolphin's wiki entry for legally obtaining game dumps.]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Dolphin_emulator&diff=342597Dolphin emulator2014-11-01T08:29:48Z<p>Sudowoodo: /* Config section */</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Emulators]]<br />
{{Accuracy|As of October 2014, Dolphin is [https://dolphin-emu.org/blog/2014/09/30/dolphin-progress-report-september-2014 moving to Qt]. Parts of this article may need to be rewriten soon.}}<br />
Dolphin is a Nintendo Gamecube, Wii and Triforce emulator, currently supporting the x86, AMD64 and ARM architectures. Dolphin is available for Linux, MacOSX (intel-based), MS Windows and Android. It is a free and open source, community-developed project.<br />
Dolphin was the first Gamecube and Wii emulator, and currently the only one capable of playing commercial games.<br />
<br />
== Installation ==<br />
<br />
Install one of the following:<br />
<br />
* {{App|[[Dolphin emu]]|A Gamecube / Wii / Triforce emulator (Recommended)|https://dolphin-emu.org/|{{Pkg|dolphin-emu}}}}<br />
* {{App|Dolphin emu (git)|A Gamecube / Wii / Triforce emulator (development version)|https://github.com/dolphin-emu/dolphin|{{AUR|dolphin-emu-git}}}}<br />
* {{App|Dolphin emu Wayland (git)|A Gamecube / Wii / Triforce emulator with [[Wayland]] support.|https://dolphin-emu.org/|{{AUR|dolphin-emu-wayland-git}}}}<br />
<br />
== Configuration ==<br />
<br />
{{Note|Dolphin is a resource-heavy application, so expect not all games to run properly. See the reason [https://dolphin-emu.org/docs/faq/#why-do-i-need-such-powerful-computer-emulate-old-c here].}}<br />
{{Tip|Run {{ic|dolphin-emu -h}} for help Dolphin's options.}}<br />
<br />
While no additional configuration is needed for the emulator to run (it is preconfigured with the default settings), altering the settings can improve performance and graphics alike.<br />
Settings are split to three main sections, ''Config'', ''Graphics'' and ''DSP''.<br />
<br />
=== Config section ===<br />
{{Tip|Recent versions of Dolphin remove the ''Audio'' frameskip option, so ''Auto'' is now reccomended.}}<br />
On the General tab, check ''Enable Dual Core'' and ''Enable Idle Skipping''. Enabling or not the cheats is a personal choice. Keep in mind that a real man never cheats. The frame limit should be set to "Auto", so that it works with games from all regions. The CPU emulation engine should be left as JIT Recompiler. Only check "Force console as NTSC-J" if intending to play imported Japanese discs.<br />
<br />
All options on the "Interface" tab are personal choices.<br />
<br />
The Audio tab is the DSP section's screen; setting it up now means there will be no need to do it later. See the [[#DSP section|DSP settings paragraph]] below.<br />
<br />
The next two tabs are not very important; the Gamecube tab has settings about connected accessories, such as memory cards, and the only remarkable Wii tab option is the "Aspect Ratio" drop-down list. Set it to either 16:9 or 4:3, depending on the display's [[Wikipedia: Aspect ratio|aspect ratio]].<br />
<br />
On the final tab, "Paths", ISO directories can be set. The directory of game ISOs can also be set by clicking browse from the home screen, but here more options are available, such as ''Search Subfolders''.<br />
<br />
=== Graphics section ===<br />
<br />
On the "General" tab, choose OpenGL from the backend drop-down list. Set the "Display" and "Other" settings to the desired configuration. V-sync is useful, but it can lead to slowdowns. The "render to main window" option improves the experience aesthetically.<br />
<br />
On the "Enhancements" tab are the options that can improve graphics. While they result to great output, they can slow the emulation down to the point of making games unplayable. Choose the best settings possible, as long as speed remains 100%.<br />
<br />
{| class="wikitable"<br />
|+ Comparison of options<br />
!Option !!Performance !!Quality<br />
|-<br />
| '''Internal resolution''' || 1x Native || Auto (Window size)<br />
|-<br />
| '''Anti-aliasing''' || None || at least 2x<br />
|-<br />
| '''Anisotropic filtering''' || 1x || at least 2x<br />
|-<br />
| '''Post-Processing Effect''' || (off) || your choice<br>(see tip below)<br />
|-<br />
| '''Scaled EFB copy''' || unchecked || checked<br />
|-<br />
| '''Per-Pixel Lightning''' || unchecked || checked<br />
|-<br />
| '''Force texture filtering,<br>Widescreen Hack,<br>Disable fog''' || off || your option<br>(recommended: off)<br />
|}<br />
<br />
{{Tip|Dolphin is able to render games that were developed for 2D in anaglyph 3D. To enable this, set ''Post-Processing Effect'' to ''stereoscopic'' (default, for red-cyan mode) or ''stereoscopic2'' (blue-yellow). It is also '''necessary''' to uncheck "''Fast Depth Calculation''" on the ''Hacks'' tab (''see below'').}}<br />
<br />
{{Warning|Using filters and other ways to improve graphics might break a few games or cause graphical glitches of any level.}}<br />
<br />
Unless sure, the ''Hacks'' tab is best left untouched.<br />
<br />
{| class="wikitable"<br />
|+ Defaults<br />
!Option !! Value<br />
|-<br />
| Skip EFB access from CPU || unchecked<br />
|-<br />
| Ignore format changes || checked<br />
|-<br />
| EFB copies || texture<br />
|-<br />
| Texture cache/ Accuracy || Fast<br />
|-<br />
| External frame buffer || disable<br />
|-<br />
| Cache display lists || unchecked<br />
|-<br />
| Disable destination alpha || unchecked<br />
|-<br />
| OpenCL texture decoder || unchecked<br />
|-<br />
| OpenMP texture decoder || unchecked<br />
|-<br />
| Fast depth calculation || checked<br>(Should uncheck for anaglyph 3D)<br />
|-<br />
| Vertex streaming hack || unchecked<br />
|}<br />
<br />
Similarly, unless sure, leave '''everything''' in the ''Advanced'' tab unchecked.<br />
<br />
=== DSP section ===<br />
<br />
Set the DSP emulation engine to<br />
<br />
* DSP HLE for speed over accuracy,<br />
* DSP LLE recompiler for better accuracy with the cost of some speed,<br />
* DSP LLE interpreter; accurate but makes '''everything''' unplayable. Too slow.<br />
<br />
''DSP LLE on separate thread'' improves speed on computers with multi-core CPUs, but might cause audio glitches, and is known to break [https://wiki.dolphin-emu.org/index.php?title=Category:Zelda_ucode_games Zelda ucode games]. Audio backend is best set to [[ALSA]]. For {{ic|pulseaudio}}, Dolphin's optional dependency [[PulseAudio]] needs to be installed.<br />
<br />
{{Note|If you came here from the [[#Config section|Config section's]] link, you should go back now.}}<br />
<br />
== Playing ==<br />
<br />
{{Warning|Make sure you '''only''' use Dolphin for legally obtained self-made disc dumps of games you legally bought. Dolphin was not designed for illegal actions. Act legally as applying laws define. You are responsible for any usage of the emulator that you make.}}<br />
<br />
{{Note|No links, instructions or tips for obtaining illegal content will be provided on this wiki. No copyright infringement intended.}}<br />
<br />
Click on browse to set a directory of ISOs so that they are shown as a library on Dolphin's default screen. Otherwise just click ''Open'' and select the file.<br />
<br />
=== Dolphin's Wiki ===<br />
<br />
Whenever a game doesn't work properly, try reading its page on [https://wiki.dolphin-emu.org Dolphin's wiki]. Listed there are tips on setting up the emulator for each game, version compatibility charts, testing entries, troubleshooting and video previews. Contributions, such as testing entries and workarounds are welcome and help other users.<br />
<br />
Here's a [https://aur.archlinux.org/packages/xfce4-whiskermenu-plugin/ Whisker Menu] search action command for searching on Dolphin's wiki:<br />
<br />
exo-open --launch WebBrowser https://wiki.dolphin-emu.org/index.php?search=%u<br />
<br />
{{Tip|Setting up keymaps is recommended. Prefer a gamepad with analogue features to a keyboard and a mouse. See this [http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/GCController_Layout.svg/1000px-GCController_Layout.svg.png map of the GameCube gamepad]. Having fun while playing is also recommended.}}<br />
<br />
== Tips ==<br />
=== Scripts for building and installing Dolphin ===<br />
This script downloads or updates Dolphin, and then installs it. Put it under any directory and keep it there, along with the subdirectories and files it generates. <br />
{{Bc|<nowiki><br />
#!/bin/bash<br />
<br />
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"<br />
getdolphin() {<br />
echo 'Downloading Dolphin...'<br />
git clone https://github.com/dolphin-emu/dolphin.git<br />
}<br />
updatedolphin() {<br />
cd $DIR/dolphin-emu<br />
echo 'Updating the local repository...'<br />
git pull origin<br />
}<br />
build() {<br />
cmake $DIR/dolphin-emu<br />
make<br />
}<br />
updatedolphin || getdolphin<br />
mkdir $DIR/build<br />
cd $DIR/build<br />
build && echo 'Compiled succesfully.' || exit<br />
echo 'Proceeding to the installation; press Enter to continue or Ctrl+C to cancel.'<br />
read<br />
if [ $(whoami) == "root" ];<br />
then<br />
make install<br />
else<br />
sudo make install<br />
fi<br />
</nowiki>}}<br />
<br />
== Troubleshooting ==<br />
<br />
==== Games play too fast ====<br />
<br />
Make sure to set framelimit to Audio and have properly configure the [[#DSP section|DPS settings]]. If it doesn't work with your sound system, try setting it to 60 for NTSC games or 50 for PAL ones. Also, note that playback of other audio media while frameskip is set to audio breaks the game.<br />
{{Note|Certain software, such as {{Pkg|flashplugin}}, crash the "Audio" feature and make games unstable, if used at the same time as Dolphin.}}<br />
<br />
''See also: [[Sound system]] - one needs to be properly configured for the "Audio" frameskip option to work.''<br />
<br />
==== Emulation is too slow ====<br />
<br />
Double-check the [[Cpu_scaling#Scaling_governors|CPU scaling governor]]. If using an nvidia graphics card, on nvidia-settings changing the powermizer setting to "Prefer maximum performance". Killing unnecessary processes and disabling compositing also helps. Configuring Dolphin correctly, as described above, is the most important part.<br />
<br />
''See also: [[Maximizing Performance]] - most of the advice should be helpful.''<br />
<br />
==== Dolphin occasionally crashes on 64-bit CPUs ====<br />
{{Note|This solution is not guarranted to work on all systems.}}<br />
On 64bit processors, Dolphin crashes when loading a game after having played another. This also randomly happens on menus.<br />
<br />
Dolphin must be built manually, with a minor modification. Once the source code has been downloaded ({{ic|$ git clone http://www.github.com/dolphin-emu/dolphin}}), navigate to {{ic|(path to source)/dolphin/Source/Core/Core/}} , or, for older versions, in {{ic|(path to source)/dolphin-emu/src/dolphin/Source/Core/Core/Src/}} and edit ''CoreParameter.cpp''.<br />
<br />
Change line 98 from {{ic|<nowiki>bJITLoadStorePairedOff = false;</nowiki>}} to {{ic|<nowiki>bJITLoadStorePairedOff = true;</nowiki>}}.<br />
Notice the comment saying {{ic|// XXX not 64-bit clean}}.<br />
<br />
Upon saving the file, the package is ready to be compiled.<br />
<br />
''See also: [https://aur.archlinux.org/packages/do/dolphin-emu-git/PKGBUILD a PKGBUILD for Dolphin (git)]''<br />
<br />
== See also ==<br />
<br />
{{Note|The Arch Linux wiki and its users are not responsible for any damage, misuse or illegal action caused by following instructions from webpages hyperlinked bellow.}}<br />
<br />
* [https://dolphin-emu.org/docs/guides/performance-guide/ Dolphin's performance guide.]<br />
* [https://dolphin-emu.org/docs/faq/ Dolphin's FAQ]<br />
* [https://wiki.dolphin-emu.org/index.php?title=Ripping_Game_Discs Dolphin's wiki entry for legally obtaining game dumps.]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=USB_flash_installation_medium&diff=342596USB flash installation medium2014-11-01T08:25:12Z<p>Sudowoodo: Happy November! :</p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
[[ar:USB Installation Media]]<br />
[[bg:USB Installation Media]]<br />
[[de:Installation von einem USB-Stick]]<br />
[[es:USB Installation Media]]<br />
[[fr: Créer une clef USB avec l'ISO Arch Linux]]<br />
[[it:USB Installation Media]]<br />
[[ja:USB Installation Media]]<br />
[[ro:Instalare prin USB]]<br />
[[ru:USB Installation Media]]<br />
[[tr:USB_ile_kurulum]]<br />
[[zh-CN:USB Installation Media]]<br />
[[zh-TW:USB Installation Media]]<br />
{{Related articles start}}<br />
{{Related|CD Burning}}<br />
{{Related|Archiso}}<br />
{{Related|Multiboot USB drive}}<br />
{{Related articles end}}<br />
<br />
This page discusses various multi-platform methods on how to create a Arch Linux Installer USB drive (also referred to as ''"flash drive", "USB stick", "USB key"'', etc) for booting in BIOS and UEFI systems. The result will be a LiveUSB (LiveCD-like) system that can be used for installing Arch Linux, system maintenance or for recovery purposes, and that, because of the nature of [[Wikipedia:SquashFS|SquashFS]], will discard all changes once the computer shuts down.<br />
<br />
If you would like to run a full install of Arch Linux from a USB drive (i.e. with persistent settings), see [[Installing Arch Linux on a USB key]]. If you would like to use your bootable Arch Linux USB stick as a rescue USB, see [[Change root]].<br />
<br />
== BIOS and UEFI Bootable USB ==<br />
<br />
=== Using dd ===<br />
{{Note|This method is recommended due to its simplicity. If it does not work, switch to the alternative method [[#Using manual formatting ]] below.}}<br />
<br />
{{Warning|This will irrevocably destroy all data on {{ic|/dev/sd'''x'''}}.}}<br />
<br />
==== In GNU/Linux ====<br />
<br />
{{Tip|Find out the name of your USB drive with {{ic|lsblk}}. Make sure that it is '''not''' mounted.}}<br />
<br />
Run the following command, replacing {{ic|/dev/'''sdx'''}} with your drive, e.g. {{ic|/dev/sdb}}. (do '''not''' append a partition number, so do '''not''' use something like {{ic|/dev/sdb'''1'''}})<br />
<br />
# dd bs=4M if=/path/to/archlinux.iso of=/dev/'''sdx''' && sync<br />
<br />
==== In Windows ====<br />
<br />
===== Using USBwriter =====<br />
<br />
This method does not require any workaround and is as straightforward as {{ic|dd}} under Linux. Just download the Arch Linux ISO, and with local administrator rights use the [http://sourceforge.net/p/usbwriter/wiki/Documentation/ USBwriter] utility to write to your USB flash memory.<br />
<br />
===== Using Universal USB Installer =====<br />
{{Accuracy|UUI is for BIOS only|section=Using Universal USB Installer}}<br />
This is probably the most straightforward way to create a bootable Arch Linux USB stick from Windows. Download [http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/ Universal USB Installer], which runs on Windows XP/Vista/7/8. There's no installation involved; you directly download a single executable. Download the Arch ISO file and run Universal-USB-Installer-1.9.5.2.exe (the version numbers will vary). The use of the program is fairly self-explanatory. You select the distribution you'd like to create a bootable USB for (Arch Linux), the ISO file you downloaded, and the USB flash drive you want to install to.<br />
<br />
{{Note|1= As of UUI 1.9.5.2, this does not work out-of-the-box because of a [https://bbs.archlinux.org/viewtopic.php?pid=1344629 discrepancy in syslinux versions]. However, if you have a UEFI motherboard you can UEFI boot the USB disk and don't need to worry about this. You must still follow the tip below.}}<br />
<br />
{{Tip|The Arch syslinux installer uses the USB disk label to facilitate mounting the correct drive. The current version of UUI (1.9.5.2) sets the disk label to UUI, when Arch is expecting something else. You can easily fix this by right-clicking the USB drive icon, and clicking on ''Properties'' to change the label. For archlinux-2014.11.01-dual.iso, the label should be {{ic|ARCH_201411}}. It should be clear what the label should be for other versions of the ISO, but in any case, Arch will tell you what the label needs to be if you attempt to boot from the USB with an incorrect label.}}<br />
<br />
{{Warning|Make sure you don't accidentally click on one of the ads on the pendrivelinux.com page which feature prominent ''Download'' buttons—these are likely to carry virus/spyware/trojan payloads. The Pendrive download button is small and near the middle of the page.}}<br />
<br />
===== Using Cygwin =====<br />
<br />
Make sure your [http://www.cygwin.com/ Cygwin] installation contains the {{ic|dd}} package.<br />
<br />
{{Tip|If you do not want to install Cygwin, you can download {{ic|dd}} for Windows from [http://www.chrysocome.net/dd here]. See the next section for more information.}}<br />
<br />
Place your image file in your home directory:<br />
<br />
C:\cygwin\home\John\<br />
<br />
Run cygwin as administrator (required for cygwin to access hardware). To write to your USB drive use the following command:<br />
<br />
dd if=image.iso of=\\.\'''x''': bs=4M<br />
<br />
where image.iso is the path to the iso image file within the {{ic|cygwin}} directory and {{ic|\\.\'''x''':}} is your USB flash drive where {{ic|'''x'''}} is the windows designated letter, e.g. {{ic|\\.\d:}}.<br />
<br />
On Cygwin 6.0, find out the correct partition with:<br />
<br />
cat /proc/partitions<br />
<br />
and write the ISO image with the information from the output. Example:<br />
<br />
{{Warning|This will irrevocably delete all files on your USB flash drive, so make sure you do not have any important files on the flash drive before doing this.}}<br />
<br />
dd if=image.iso of=/dev/sdb bs=4M<br />
<br />
===== dd for Windows =====<br />
<br />
{{Note|Some users have an "isolinux.bin missing or corrupt" problem when booting the media with this method.}}<br />
<br />
A GPL licensed dd version for Windows is available at http://www.chrysocome.net/dd. The advantage of this over Cygwin is a smaller download. Use it as shown in instructions for Cygwin above.<br />
<br />
To begin, download the latest version of dd for Windows. Once downloaded, extract the archive's contents into Downloads or elsewhere.<br />
<br />
Now, launch your {{ic|command prompt}} as an administrator. Next, change directory ({{ic|cd}}) into the Downloads directory.<br />
<br />
If your Arch Linux ISO is elsewhere you may need to state the full path, for convenience you may wish to put the Arch Linux ISO into the same folder as the dd executable. The basic format of the command will look like this.<br />
<br />
# dd if=archlinux-2014-XX-xx-dual.iso of=\\.\x: bs=4M<br />
<br />
{{Warning|This command will replace the drive's contents and its formatting with the ISO's. You will likely be unable to recover its contents in the event of an accidental copy. Be absolutely sure that you are directing dd to the correct drive before executing!}}<br />
Simply replace the various null spots (indicated by an "x") with the correct date and correct drive letter.<br />
<br />
Here is a complete example.<br />
<br />
# dd if=ISOs\archlinux-2014.11.01-dual.iso of=\\.\d: bs=4M<br />
<br />
{{Note|This may not work because the drive letter indicates a volume, not a disk. Try replacing the drive letter with {{ic|\\.\PhysicalDrive''X''}}, where {{ic|''X''}} is the physical drive number (starts from 0). Example:<br />
{{bc|1=# dd if=ISOs\archlinux-2014.11.01-dual.iso of=\\.\PhysicalDrive1 bs=4M}}<br />
You can find out the physical drive letter by typing {{ic|wmic diskdrive list brief}} at the command prompt.<br />
Any Explorer window must be closed or dd will report an error.}}<br />
<br />
==== In Mac OS X ====<br />
<br />
To be able to use {{ic|dd}} on your USB device on a Mac you have to do some special maneuvers. First of all insert your usb device, OS X will automount it, and in {{ic|Terminal.app}} run:<br />
<br />
$ diskutil list<br />
<br />
Figure out what your USB device is called with {{ic|mount}} or {{ic|<nowiki>sudo dmesg | tail</nowiki>}} (e.g. {{ic|/dev/disk1}}) and unmount the partitions on the device (i.e., /dev/disk1s1) while keeping the device proper (i.e., /dev/disk1):<br />
<br />
$ diskutil unmountDisk /dev/disk1<br />
<br />
Now we can continue in accordance with the instructions above (but, if you are using the OS X {{ic|dd}}, use {{ic|/dev/rdisk}} instead of {{ic|/dev/disk}}, and use {{ic|1=bs=1m}}. {{ic|rdisk}} means "raw disk" and is much faster on OS X, and {{ic|1=bs=1m}} indicates a 1 MB block size).<br />
<br />
{{hc|<nowiki># dd if=image.iso of=/dev/rdisk1 bs=1m</nowiki>|<br />
20480+0 records in<br />
20480+0 records out<br />
167772160 bytes transferred in 220.016918 secs (762542 bytes/sec)<br />
}}<br />
<br />
It is probably a good idea to eject your drive before physical removal at this point:<br />
<br />
$ diskutil eject /dev/disk1<br />
<br />
==== How to restore the USB drive ====<br />
<br />
Because the ISO image is a hybrid which can either be burned to a disc or directly written to a USB drive, it does not include a standard partition table.<br />
<br />
After you install Arch Linux and you are done with the USB drive, you should zero out its first 512 bytes ''(meaning the boot code from the MBR and the non-standard partition table)'' if you want to restore it to full capacity:<br />
<br />
# dd count=1 bs=512 if=/dev/zero of=/dev/sd'''x''' && sync<br />
<br />
Then create a new partition table (e.g. "msdos") and filesystem (e.g. EXT4, FAT32) using {{Pkg|gparted}}, or from a terminal:<br />
<br />
* For EXT2/3/4 (adjust accordingly), it would be:<br />
<br />
# cfdisk /dev/sd'''x'''<br />
# mkfs.ext4 /dev/sd'''x1'''<br />
# e2label /dev/sd'''x1''' USB_STICK<br />
<br />
* For FAT32, install the {{Pkg|dosfstools}} package and run:<br />
<br />
# cfdisk /dev/sd'''x'''<br />
# mkfs.vfat -F32 /dev/sd'''x1'''<br />
# dosfslabel /dev/sd'''x1''' USB_STICK<br />
<br />
=== Using manual formatting===<br />
<br />
==== In GNU/Linux ====<br />
<br />
This method is more complicated than writing the image directly with {{ic|dd}}, but it does keep the flash drive usable for data storage (that is, the ISO is installed in a specific partition within the already [[Partitioning|partitioned device]] without altering other partitions).<br />
<br />
{{Note|Here, we will denote the targeted partition as {{ic|/dev/sd'''Xn'''}}. In any of the following commands, adjust '''X''' and '''n''' according to your system.}}<br />
<br />
* Make sure that the latest ''syslinux'' package (version 6.02 or newer) is installed on the system. <br />
<br />
* If not done yet, create the partition table and/or partition on the device before continuing. The partition {{ic|/dev/sd'''Xn'''}} must be formatted to FAT32.<br />
<br />
* Mount the ISO image, the FAT32 filesystem located in the USB flash device, and copy the contents of the ISO image to it. Unmount the ISO image, but keep the FAT32 partition mounted for following steps:<br />
# mkdir -p /mnt/{iso,usb}<br />
# mount -o loop archlinux-2014.11.01-dual.iso /mnt/iso<br />
# mount /dev/sd'''Xn''' /mnt/usb<br />
# cp -a /mnt/iso/* /mnt/usb<br />
# sync<br />
# umount /mnt/iso<br />
<br />
* {{Note|The following step is not required when using [[Archboot]] instead of [[Archiso]].}} To boot either a label or an [[UUID]] to select the partition to boot from is required. By default the label {{ic|ARCH_2014'''XX'''}} (with the appropriate release month) is used. Thus, the partition’s label has to be set accordingly, for example using ''gparted''. Alternatively, you can change this behaviour by altering the lines ending by {{ic|1=archisolabel=ARCH_2014'''XX'''}} in files ''/mnt/usb/arch/boot/syslinux/archiso_sys32.cfg'' and ''archiso_sys64.cfg'', as well as ''/mnt/usb/loader/entries/archiso-x86_64.conf'' or similar for a 32-bit ISO (the last being useful only, if you want to boot the USB flash device from an EFI system). To use an UUID instead, replace those portions of lines with {{ic|1=archiso''device''=/dev/disk/by-uuid/'''YOUR-UUID'''}}. The UUID can be retrieved with {{ic|1=blkid -o value -s UUID /dev/sd'''Xn'''}}.<br />
<br />
{{Warning|Mismatching labels or wrong UUID prevents booting from the created medium.}}<br />
<br />
* Syslinux is already preinstalled in ''/mnt/usb/arch/boot/syslinux''. Install it completely to that folder by following [[Syslinux#Manual_install]]. Instructions are reproduced here for convenience.<br />
** Overwrite the existing syslinux modules ({{ic|*.c32}} files) present in the USB (from the ISO) with the ones from the syslinux package. This is necessary to avoid boot failure because of a possible version mismatch.<br />
** Run:<br />
# extlinux --install /mnt/usb/arch/boot/syslinux<br />
** Unmount the partition ({{ic|umount /mnt/usb}}) and install the MBR or GPT partition table to the USB device as described in the page mentioned.<br />
<br />
* Mark the partition as active (or “bootable”).<br />
<br />
==== In Windows ====<br />
<br />
{{Note|<br />
* For manual formatting, do not use any '''Bootable USB Creator utility''' for creating the UEFI bootable USB. For manual formatting, do not use ''dd for Windows'' to dd the ISO to the USB drive either.<br />
<br />
* In the below commands, '''X:''' is assumed to be the USB flash drive in Windows.<br />
<br />
* Windows uses backward slash {{ic|\}} as path-separator, so the same is used in the below commands.<br />
<br />
* All commands should be run in Windows command prompt '''as administrator'''.<br />
<br />
* {{ic|>}} denotes the Windows command prompt.<br />
}}<br />
<br />
* Partition and format the USB drive using [http://rufus.akeo.ie/ Rufus USB partitioner]. Select partition scheme option as '''MBR for BIOS and UEFI''' and File system as '''FAT32'''. Uncheck "Create a bootable disk using ISO image" and "Create extended label and icon files" options.<br />
<br />
* Change the '''Volume Label''' of the USB flash drive {{ic|X:}} to match the LABEL mentioned in the {{ic|1=archisolabel=}} part in {{ic|<ISO>\loader\entries\archiso-x86_64.conf}}. This step is required for Official ISO ([[Archiso]]) but not required for [[Archboot]]. This step can be also performed using Rufus, during the prior "partition and format" step.<br />
<br />
* Extract the ISO (similar to extracting ZIP archive) to the USB flash drive (using [http://7-zip.org/ 7-Zip]. <br />
<br />
* Download official syslinux 6.xx binaries (zip file) from https://www.kernel.org/pub/linux/utils/boot/syslinux/ and extract it. The version of Syslinux should be the same version used in the ISO image.<br />
<br />
* Run the following command (in Windows cmd prompt, as admin):<br />
<br />
{{Note|Use {{ic|X:\boot\syslinux\}} for Archboot iso.}}<br />
<br />
> cd bios\<br />
> for /r %Y in (*.c32) do copy "%Y" "X:\arch\boot\syslinux\" /y<br />
> copy mbr\*.bin X:\arch\boot\syslinux\ /y<br />
<br />
* Install Syslinux to the USB by running (use {{ic|win64\syslinux64.exe}} for x64 Windows):<br />
<br />
{{Note|Use {{ic|-d /boot/syslinux}} for Archboot iso.}}<br />
<br />
> cd bios\<br />
> win32\syslinux.exe -d /arch/boot/syslinux -i -a -m X:<br />
<br />
{{Note|<br />
* The above step installs Syslinux's {{ic|ldlinux.sys}} to the VBR of the USB partition, sets the partition as "active/boot" in the MBR partition table and writes the MBR boot code to the 1st 440-byte boot code region of the USB.<br />
<br />
* The {{ic|-d}} switch expects a path with forward slash path-separator like in *unix systems.<br />
}}<br />
<br />
== Other Methods for BIOS systems ==<br />
<br />
=== In GNU/Linux ===<br />
<br />
==== Using a multiboot USB drive ====<br />
This allows booting multiple ISOs from a single USB device, including the archiso. Updating an existing USB drive to a more recent ISO is simpler than for most other methods. See [[Multiboot USB drive]].<br />
<br />
==== Using UNetbootin ====<br />
<br />
UNetbootin can be used on any Linux distribution or Windows to copy your iso to a USB device. However, Unetbootin overwrites syslinux.cfg, so it creates a USB device that does not boot properly. For this reason, '''Unetbootin is not recommended''' -- please use {{ic|dd}} or one of the other methods discussed in this topic.<br />
{{Warning|UNetbootin writes over the default {{ic|syslinux.cfg}}; this must be restored before the USB device will boot properly.}}<br />
<br />
Edit {{ic|syslinux.cfg}}:<br />
<br />
{{hc|sysconfig.cfg|2=<br />
default menu.c32<br />
prompt 0<br />
menu title Archlinux Installer<br />
timeout 100<br />
<br />
label unetbootindefault<br />
menu label Archlinux_x86_64<br />
kernel /arch/boot/x86_64/vmlinuz<br />
append initrd=/arch/boot/x86_64/archiso.img archisodevice=/dev/sd'''x1''' ../../<br />
<br />
label ubnentry0<br />
menu label Archlinux_i686<br />
kernel /arch/boot/i686/vmlinuz<br />
append initrd=/arch/boot/i686/archiso.img archisodevice=/dev/sd'''x1''' ../../<br />
}}<br />
<br />
In {{ic|/dev/sd'''x1'''}} you must replace '''x''' with the first free letter after the last letter in use on the system where you are installing Arch Linux (e.g. if you have two hard drives, use {{ic|c}}.). You can make this change during the first phase of boot by pressing {{ic|Tab}} when the menu is shown.<br />
<br />
=== In Windows ===<br />
<br />
==== Win32 Disk Imager ====<br />
<br />
{{Warning|This will destroy all information on your USB flash drive!}}<br />
First, download the program from [http://sourceforge.net/projects/win32diskimager/ here]. Next, extract the archive and run the executable. Now, select the Arch Linux ISO under the {{ic|Image File}} section and the USB flash device letter (for example, [D:\]) under the {{ic|Device}} section. Finally, click {{ic|Write}} when ready.<br />
{{Note|After installation, you may need to restore the USB flash drive following a process as outlined [[USB_Installation_Media#How_to_restore_the_USB_drive|here]].}}<br />
<br />
==== USBWriter for Windows ====<br />
<br />
Download the program from http://sourceforge.net/projects/usbwriter/ and run it. Select the arch image file, the target USB stick, and click on the {{ic|write}} button. Now you should be able to boot from the usb stick and install Arch Linux from it.<br />
<br />
==== The Flashnul way ====<br />
<br />
[https://translate.google.com/translate?hl=&sl=ru&tl=en&u=http%3A%2F%2Fshounen.ru%2Fsoft%2Fflashnul%2Freadme.rus.html&sandbox=1 flashnul] is an utility to verify the functionality and maintenance of Flash-Memory (USB-Flash, IDE-Flash, SecureDigital, MMC, MemoryStick, SmartMedia, XD, CompactFlash etc).<br />
<br />
From a command prompt, invoke flashnul with {{ic|-p}}, and determine which device index is your USB drive, e.g.:<br />
<br />
{{hc|C:\>flashnul -p|<br />
Avaible physical drives:<br />
Avaible logical disks:<br />
C:\<br />
D:\<br />
E:\<br />
}}<br />
<br />
When you have determined which device is the correct one, you can write the image to your drive, by invoking flashnul with the device index, {{ic|-L}}, and the path to your image, e.g:<br />
<br />
C:\>flashnul '''E:''' -L ''path\to\arch.iso''<br />
<br />
As long as you are really sure you want to write the data, type yes, then wait a bit for it to write. If you get an access denied error, close any Explorer windows you have open.<br />
<br />
If under Vista or Win7, you should open the console as administrator, or else flashnul will fail to open the stick as a block device and will only be able to write via the drive handle windows provides<br />
<br />
{{Note|Confirmed that you need to use drive letter as opposed to number. flashnul 1rc1, Windows 7 x64.}}<br />
<br />
==== Loading the installation media from RAM ====<br />
<br />
{{Merge|Multiboot USB drive#Using Syslinux and memdisk|This is the same method, only Syslinux is installed from Windows. Considering that [[multiboot USB drive]] can be used to boot an installation media and it is already linked from the Related articles box at the top, maybe this section should be merged there?}}<br />
<br />
This method uses [[Syslinux]] and a [[Ramdisk]] ([http://www.syslinux.org/wiki/index.php/MEMDISK MEMDISK]) to load the entire Arch Linux ISO image into RAM. Since this will be running entirely from system memory, you will need to make sure the system you will be installing this on has an adequate amount. A minimum amount of RAM between 500 MB and 1 GB should suffice for a MEMDISK based, Arch Linux install.<br />
<br />
For more information on Arch Linux system requirements as well as those for MEMDISK see the [[Beginners' guide]] and [http://www.etherboot.org/wiki/bootingmemdisk#preliminaries here]{{Dead link|2014|09|14}}. For reference, here is the [https://bbs.archlinux.org/viewtopic.php?id=135266 preceding forum thread].<br />
<br />
{{Tip|Once the installer has completed loading you can simply remove the USB stick and even use it on a different machine to start the process all over again. Utilizing MEMDISK also allows booting and installing Arch Linux to and from the same USB flash drive.}}<br />
<br />
===== Preparing the USB flash drive =====<br />
<br />
Begin by formatting the USB flash drive as '''FAT32'''. Then create the following folders on the newly formatted drive.<br />
* {{ic|Boot}}<br />
** {{ic|Boot/ISOs}}<br />
** {{ic|Boot/Settings}}<br />
<br />
===== Copy the needed files to the USB flash drive =====<br />
<br />
Next copy the ISO that you would like to boot to the {{ic|Boot/ISOs}} folder. After that, extract from the following files from the latest release of {{pkg|syslinux}} from [http://www.kernel.org/pub/linux/utils/boot/syslinux/ here] and copy them into the following folders.<br />
* {{ic|./win32/syslinux.exe}} to the Desktop or Downloads folder on your system.<br />
* {{ic|./memdisk/memdisk}} to the {{ic|Settings}} folder on your USB flash drive.<br />
<br />
===== Create the configuration file =====<br />
<br />
After copying the needed files, navigate to the USB flash drive, /boot/Settings and create a {{ic|syslinux.cfg}} file.<br />
{{Warning|On the {{ic|INITRD}} line, be sure to use the name of the ISO file that you copied to your {{ic|ISOs}} folder!}}<br />
{{hc|/Boot/Settings/syslinux.cfg|2=<br />
DEFAULT arch_iso<br />
<br />
LABEL arch_iso<br />
MENU LABEL Arch Setup<br />
LINUX memdisk<br />
INITRD /Boot/ISOs/archlinux-2014.11.01-dual.iso<br />
APPEND iso}}<br />
For more information on Syslinux see the [[Syslinux|Arch Wiki article]].<br />
<br />
===== Final steps =====<br />
<br />
Finally, create a {{ic|*.bat}} file where {{ic|syslinux.exe}} is located and run it ("Run as administrator" if you are on Vista or Windows 7):<br />
{{hc|C:\Documents and Settings\username\Desktop\install.bat|<br />
@echo off<br />
syslinux.exe -m -a -d /Boot/Settings X:}}<br />
<br />
== Troubleshooting ==<br />
<br />
* For the [[#Loading the installation media from RAM|MEMDISK Method]], if you get the famous "30 seconds" error trying to boot the i686 version, press the {{ic|Tab}} key over the {{ic|Boot Arch Linux (i686)}} entry and add {{ic|vmalloc&#61;448M}} at the end. For reference: ''If your image is bigger than 128MiB and you have a 32-bit OS, then you have to increase the maximum memory usage of vmalloc''. [http://www.syslinux.org/wiki/index.php/MEMDISK#-_memdiskfind_in_combination_with_phram_and_mtdblock]<br />
<br />
* If you get the "30 seconds" error due to the {{ic|/dev/disk/by-label/ARCH_XXXXYY}} not mounting, try renaming your USB media to {{ic|ARCH_XXXXYY}} (e.g. {{ic|ARCH_201411}}).<br />
<br />
== See Also ==<br />
<br />
* [https://wiki.gentoo.org/wiki/LiveUSB/HOWTO Gentoo wiki - LiveUSB/HOWTO]<br />
* [https://fedoraproject.org/wiki/How_to_create_and_use_Live_USB Fedora wiki - How to create and use Live USB]<br />
* [http://en.opensuse.org/SDB:Live_USB_stick openSUSE wiki - SDB:Live USB stick]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=MATE&diff=342472MATE2014-10-30T17:38:29Z<p>Sudowoodo: /* Enable panel shadow */ copyedit</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[es:MATE]]<br />
[[it:MATE]]<br />
[[ja:MATE]]<br />
[[ko:MATE]]<br />
[[ru:MATE]]<br />
[[zh-CN:MATE]]<br />
{{Related articles start}}<br />
{{Related|GNOME}}<br />
{{Related|Cinnamon}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related articles end}}<br />
<br />
From [http://mate-desktop.org/ MATE homepage]:<br />
<br />
:''The MATE Desktop Environment is the continuation of GNOME 2. It provides an intuitive and attractive desktop environment using traditional metaphors for Linux and other Unix-like operating systems. MATE is [https://github.com/mate-desktop under active development] to add support for new technologies while preserving a traditional desktop experience.''<br />
<br />
== MATE Applications ==<br />
<br />
MATE is largely composed of GNOME 2 applications and utilities, forked and renamed to avoid conflicting with their GNOME 3 counterparts. Below is a list of common GNOME applications which have been renamed in MATE.<br />
<br />
* Alacarte is renamed '''Mozo''';<br />
* Nautilus is renamed '''Caja''';<br />
* Metacity is renamed '''Marco''';<br />
* Gedit is renamed '''Pluma''';<br />
* Eye of GNOME is renamed '''Eye of MATE''';<br />
* Evince is renamed '''Atril''';<br />
* File Roller is renamed '''Engrampa'''.<br />
<br />
Other applications and core components prefixed with GNOME (such as GNOME Terminal, GNOME Panel, GNOME Menus, etc.) have had the prefix changed to MATE so they become MATE Panel, MATE Menus etc.<br />
<br />
== Installation ==<br />
<br />
MATE is available in the [[official repositories]] and can be [[pacman|installed]] with one of the following:<br />
<br />
*The {{Pkg|mate-panel}} package provides a minimal desktop shell.<br />
*The {{Grp|mate}} group contains the core desktop environment required for the standard MATE experience.<br />
*The {{Grp|mate-extra}} group contains additional utilities and applications that integrate well with the MATE desktop. Installing just the {{Grp|mate-extra}} group will not pull in the whole {{Grp|mate}} group via dependencies. If you want to install all MATE packages then you will need to explicitly install both groups.<br />
<br />
=== Additional MATE packages ===<br />
<br />
There are additional official packages not included in the {{Grp|mate}} or {{Grp|mate-extra}} because it is not necessarily useful to everyone.<br />
<br />
* {{Pkg|gnome-main-menu}} - A MATE panel applet similar to the traditional main-menu, but with a few additions.<br />
* {{Pkg|mate-netbook}} - A MATE panel applet that might be useful to owners of small screen devices, such as a Netbook. The applet will automatically maximize all windows and provides an application switcher applet.<br />
<br />
There are also a number of other unofficial MATE applications that are contributed and maintained by the MATE community and therefore not included in the {{Grp|mate}} or {{Grp|mate-extra}} groups.<br />
<br />
* {{Pkg|mate-accountsdialog}} - An application to view and modify user accounts information for MATE.<br />
* {{Pkg|mate-applet-lockkeys}} - A MATE panel applet that shows which of the CapsLock, NumLock and ScrollLock keys are on and which are off.<br />
* {{Pkg|mate-applet-softupd}} - A MATE panel applet to notify when software updates become available.<br />
* {{Pkg|mate-applet-streamer}} - A MATE panel applet to let you play your favourite online radio station with a single click.<br />
* {{Pkg|mate-color-manager}} - Color management application for MATE.<br />
* {{Pkg|mate-disk-utility}} - Disk management application for MATE.<br />
* {{Pkg|mate-screensaver-hacks}} - Enable screensavers from xscreensaver for MATE.<br />
* {{Pkg|mate-themes-extras}} - Collection of GTK2/3 desktop themes for MATE.<br />
* {{Pkg|variety}} - Variety changes the wallpaper on a regular interval using user-specified or automatically downloaded images.<br />
<br />
The following is also available via the AUR and integrates with MATE but the package is not maintained by the MATE team.<br />
<br />
* {{AUR|mintmenu}} - Linux Mint Menu for MATE.<br />
<br />
== Starting MATE ==<br />
<br />
MATE can be started via a display manager or manually.<br />
<br />
=== Graphical log-in ===<br />
<br />
Choose ''MATE'' from the menu in a [[display manager]] of choice. The MATE team recommends [[LightDM]] as the display manager with the GTK+ (2) greeter, which can be installed with the {{Pkg|lightdm-gtk2-greeter}} package.<br />
<br />
=== Manually ===<br />
<br />
If you prefer to start MATE manually from the console, add the following line to your {{ic|~/.xinitrc}} file:<br />
{{hc|~/.xinitrc|<nowiki><br />
exec mate-session<br />
</nowiki>}}<br />
<br />
Then MATE can be launched by typing {{ic|startx}}.<br />
<br />
See [[xinitrc]] for details, such as preserving the logind session.<br />
<br />
== Accessibility ==<br />
<br />
MATE is well suited for use by individuals with sight or mobility impairment. First install {{Pkg|orca}} and {{Pkg|espeak}} (Screen reader for individuals who are blind or visually impaired) and {{Pkg|onboard}} (On-screen keyboard useful for mobility impaired users) <br />
<br />
pacman -Syyu orca espeak onboard <br />
<br />
Now, before starting MATE for the first time, enter the following command as the user who needs accessibility features:<br />
<br />
gsettings set org.mate.interface accessibility true<br />
<br />
Once you start MATE, you can configure the accessibility applications via {{ic|System -> Preferences -> Assistive Technologies}}, although if you need Orca, you will need to run it from the {{ic|Alt-F2}} run window in order to start getting speech.<br />
<br />
== Network Management ==<br />
<br />
It is recommended that you use [[Network Manager]] for managing networks in MATE. Please see the wiki page for more details on installing and configuring it.<br />
<br />
== Bluetooth ==<br />
<br />
Since version 1.8, [[Bluetooth]] support in MATE is provided by [[Blueman]].<br />
<br />
== PulseAudio and GStreamer ==<br />
<br />
MATE supports two audio backends, [http://www.pulseaudio.org PulseAudio] and [http://www.gstreamer.net GStreamer]. By default, the PulseAudio backend is installed but if you want to switch to the GStreamer backend, do the following:<br />
<br />
# pacman -S mate-settings-daemon-gstreamer mate-media-gstreamer<br />
<br />
== Tips and tricks ==<br />
<br />
=== Enabling compositing ===<br />
<br />
Compositing is not be enabled by default. To enable it navigate to run {{ic|System -> Preferences -> Windows}} and click the tick box alongside '''Enable software compositing window manager''' in the {{ic|General}} tab. Alternatively, you can run the following from the terminal:<br />
<br />
$ dconf write /org/mate/marco/general/compositing-manager true<br />
<br />
=== Toggling compositing ===<br />
<br />
Some software may have issues rendering graphics when working on an environment using the nvidia proprietary drivers and a compositing window manager.<br />
<br />
To easily toggle the compositing feature, save the following script somewhere within the Home directory, e.g. {{ic|~/.scripts/compositing.sh}}:<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
if $(dconf read /org/mate/marco/general/compositing-manager) == "true"<br />
then<br />
dconf write /org/mate/marco/general/compositing-manager false<br />
else<br />
dconf write /org/mate/marco/general/compositing-manager true<br />
fi<br />
</nowiki>}}<br />
<br />
and then create a custom keyboard shortcut that executes the file, e.g. {{ic|Ctrl+Alt+C}}, to {{ic|sh ~/.scripts/compositing.sh}}.<br />
<br />
=== Enabling new window centering ===<br />
<br />
By default, new windows are placed in the top-left corner. To center new windows on creation navigate to run {{ic|System -> Preferences -> Windows}} and click the tick box alongside '''Center new windows''' in the {{ic|Placement}} tab. Alternatively, you can run the following from the terminal:<br />
<br />
$ dconf write /org/mate/marco/general/center-new-windows true<br />
<br />
=== Enabling window snapping ===<br />
<br />
Window snapping is not be enabled by default, to enable it navigate to run {{ic|System -> Preferences -> Windows}} and click the tick box alongside '''Enable side by side tiling''' in the {{ic|Placement}} tab. <br />
<br />
=== Show or hide desktop icons ===<br />
<br />
By default, MATE shows multiple icons on the desktop: The content of your desktop directory, computer, home and network directories, the trash and mounted drives. You can show or hide them individually or all at once using {{ic|dconf}}.<br />
<br />
==== Hide all desktop icons ====<br />
<br />
$ dconf write /org/mate/desktop/background/show-desktop-icons false<br />
<br />
==== Hide individual icons ====<br />
<br />
Hide computer icon:<br />
<br />
$ dconf write /org/mate/caja/desktop/computer-icon-visible false<br />
<br />
Hide user directory icon:<br />
<br />
$ dconf write /org/mate/caja/desktop/home-icon-visible false<br />
<br />
Hide network icon:<br />
<br />
$ dconf write /org/mate/caja/desktop/network-icon-visible false<br />
<br />
Hide trash icon:<br />
<br />
$ dconf write /org/mate/caja/desktop/trash-icon-visible false<br />
<br />
Hide mounted volumes:<br />
<br />
$ dconf write /org/mate/caja/desktop/volumes-visible false<br />
<br />
Replace {{ic|false}} with {{ic|true}} for the icons to reappear.<br />
<br />
=== Use a different window manager with MATE ===<br />
<br />
The default window manager in MATE is called ''marco'', a fork of the GNOME 2 window manager {{pkg|metacity}}. You can replace ''marco'' with another window manager via a number of different methods:<br />
<br />
* The easiest way to change the window manager is to autostart it using {{ic|mate-session-properties}}. Open the ''System'' menu, navigate to the ''Preferences'' menu and click on '''Startup Applications'''. In the dialog click '''Add.''' Enter a name and comment in the name and comment sections and in the command section add a command of the following syntax: ''"name of window manager"'' ''"--replace"''<br />
<br />
For example: for openbox you would use the command {{ic|openbox --replace}}.<br />
<br />
Log out and log in again and ''marco'' should be replaced by the window manager of your choice. To revert to ''marco'' simply delete the entry you created in '''Startup Applications'''.<br />
<br />
* Alternatively you can specify the desired window manager in dconf:<br />
<br />
$ dconf write /org/mate/desktop/session/required-components/windowmanager "'mywindowmanager'"<br />
<br />
replace "mywindowmanager" with the name of the window manager of your choice e.g. ''openbox'' or ''metacity''.<br />
<br />
=== Change window decoration button order ===<br />
<br />
You can change the button using dconf. The key is in org.mate.marco.general.button-layout. Use the graphical dconf-editor or the dconf command line tool to change it:<br />
<br />
$ dconf write /org/mate/marco/general/button-layout "'close,maximize,minimize:'"<br />
<br />
and put '''menu''', '''close''', '''minimize''' and '''maximize''' in your desired order, separated by commas. The colon is the window title (it is necessary for the changes to apply).<br />
<br />
=== Auto open file manager after drive mount ===<br />
<br />
By default, MATE automatically opens a new file manager window when a drive is mounted. To disable this, change the following key in dconf:<br />
<br />
$ dconf write /org/mate/desktop/media-handling/automount-open false<br />
<br />
=== Screensaver ===<br />
<br />
MATE uses {{pkg|mate-screensaver}} to lock your session. By default there are a limited number of lock-screens available. To make more lock-screens available, install the {{Pkg|mate-screensaver-hacks}} package. This will allow you to use [[Xscreensaver]] lock-screens with {{pkg|mate-screensaver}}.<br />
<br />
=== Lock screen & default background image ===<br />
<br />
The full list of configuration options can be found in <code>/usr/share/glib-2.0/schemas/org.mate.background.gschema.xml</code>, they are overridden by creating the file <code>/usr/share/glib-2.0/schemas/mate-background.gschema.override</code>.<br />
<br />
{{note|The values on the right must be enclosed in single quotes (<nowiki>''</nowiki>) otherwise an error will occur during re-compile.}}<br />
<br />
Example #1: Change the background image of the lock screen:<br />
{{hc|/usr/share/glib-2.0/schemas/mate-background.gschema.override|2=<br />
<br />
[org.mate.background]<br />
picture-filename='/path/to/the/background.jpg'}}<br />
<br />
Example #2: Change the lock screen to use a gradient:<br />
{{hc|/usr/share/glib-2.0/schemas/mate-background.gschema.override|2=<br />
<br />
[org.mate.background]<br />
color-shading-type='vertical-gradient'<br />
picture-options='scaled'<br />
picture-filename=<nowiki>''</nowiki><br />
primary-color='#152233'<br />
secondary-color='#000000'}}<br />
<br />
Re-compile the schemas:<br />
# glib-compile-schemas /usr/share/glib-2.0/schemas/<br />
<br />
Finally, restart your X session for the change to effect.<br />
<br />
=== Styling Qt applications ===<br />
<br />
To make Qt4 applications inherit the MATE theme, do the following:<br />
<br />
* Navigate to ''System -> Preferences -> Qt4 Config'' or execute {{ic|qtconfig-qt4}} from a shell.<br />
* Change '''GUI Style''' to {{ic|GTK+}}.<br />
* ''File --> Save''.<br />
<br />
See [[Uniform Look for Qt and GTK Applications]] for more details.<br />
<br />
=== Consistent cursor theme ===<br />
<br />
You may find that the cursor theme used in MATE is not consistent. For example, it may change when moving the cursor across different application windows. To fix this problem, set the cursor theme by creating an {{ic|index.theme}} file which defines the cursor theme according to the XDG icon theme specification. See the following section of the [[Cursor Themes]] article: [[Cursor_Themes#Using_an_index.theme_file_.28recommended.29]].<br />
<br />
=== Use of gradient backgrounds with LightDM ===<br />
<br />
If you wish to use the default MATE (1.8) ''Stripes'' background as the LightDM background as well so as to make for seamless transition from LightDM to MATE, you will find that it is runtime-constructed from a grayscale PNG upon which MATE layers a vertical blue-to-green gradient, something which LightDM does not currently support. If insistent, you can work around this by temporarily setting {{ic|/org/mate/desktop/background/show-desktop-icons}} to {{ic|false}}, either through the {{ic|dconf Editor}} tool available from the {{ic|System Tools}} menu or by running<br />
dconf write /org/mate/desktop/background/show-desktop-icons false<br />
from the Alt-F2 {{ic|Run Application}} dialog, then running {{ic|killall mate-panel}} from said dialog and hitting {{ic|Print Screen}} before the panel reappears. You are then presented with a {{ic|Save As}} dialog for exactly that fully rendered, screen-sized PNG that you need for LightDM. Run<br />
dconf reset /org/mate/desktop/background/show-desktop-icons<br />
to have your desktop icons reappear.<br />
<br />
=== Enabling panel shadow ===<br />
<br />
To enable panel shadow, edit {{ic|/usr/share/applications/marco.desktop}} to add a second's autostart delay, and change the value of {{ic|X-MATE-Autostart-Phase}} from ''WindowManager'' to ''Applications'', because the autostart delay is only allowed in the applications phase. The issue was [https://github.com/mate-desktop/mate-panel/issues/193 discussed on MATE's github page].<br />
<br />
{{Note|An example of the file after being modified (changes in bold):}}<br />
{{hc|/usr/share/applications/marco.desktop|2=<br />
...<br />
X-MATE-Autostart-Phase='''Applications'''<br />
'''X-MATE-Autostart-Delay=1'''<br />
X-MATE-Provides=windowmanager<br />
X-MATE-Autostart-Notify=true<br />
}}<br />
<br />
== See also ==<br />
<br />
* [http://mate-desktop.org MATE homepage]<br />
* [http://wiki.mate-desktop.org/archlinux_custom_repo MATE wiki for Arch Linux]<br />
* [http://mate-desktop.org/gallery/1.8/ ''MATE desktop screenshots'']<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=1018647 ''The MATE Desktop Environment''] - Arch Linux forum discussion about MATE</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=MATE&diff=342470MATE2014-10-30T17:26:35Z<p>Sudowoodo: /* Toggling compositing */ ce</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[es:MATE]]<br />
[[it:MATE]]<br />
[[ja:MATE]]<br />
[[ko:MATE]]<br />
[[ru:MATE]]<br />
[[zh-CN:MATE]]<br />
{{Related articles start}}<br />
{{Related|GNOME}}<br />
{{Related|Cinnamon}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related articles end}}<br />
<br />
From [http://mate-desktop.org/ MATE homepage]:<br />
<br />
:''The MATE Desktop Environment is the continuation of GNOME 2. It provides an intuitive and attractive desktop environment using traditional metaphors for Linux and other Unix-like operating systems. MATE is [https://github.com/mate-desktop under active development] to add support for new technologies while preserving a traditional desktop experience.''<br />
<br />
== MATE Applications ==<br />
<br />
MATE is largely composed of GNOME 2 applications and utilities, forked and renamed to avoid conflicting with their GNOME 3 counterparts. Below is a list of common GNOME applications which have been renamed in MATE.<br />
<br />
* Alacarte is renamed '''Mozo''';<br />
* Nautilus is renamed '''Caja''';<br />
* Metacity is renamed '''Marco''';<br />
* Gedit is renamed '''Pluma''';<br />
* Eye of GNOME is renamed '''Eye of MATE''';<br />
* Evince is renamed '''Atril''';<br />
* File Roller is renamed '''Engrampa'''.<br />
<br />
Other applications and core components prefixed with GNOME (such as GNOME Terminal, GNOME Panel, GNOME Menus, etc.) have had the prefix changed to MATE so they become MATE Panel, MATE Menus etc.<br />
<br />
== Installation ==<br />
<br />
MATE is available in the [[official repositories]] and can be [[pacman|installed]] with one of the following:<br />
<br />
*The {{Pkg|mate-panel}} package provides a minimal desktop shell.<br />
*The {{Grp|mate}} group contains the core desktop environment required for the standard MATE experience.<br />
*The {{Grp|mate-extra}} group contains additional utilities and applications that integrate well with the MATE desktop. Installing just the {{Grp|mate-extra}} group will not pull in the whole {{Grp|mate}} group via dependencies. If you want to install all MATE packages then you will need to explicitly install both groups.<br />
<br />
=== Additional MATE packages ===<br />
<br />
There are additional official packages not included in the {{Grp|mate}} or {{Grp|mate-extra}} because it is not necessarily useful to everyone.<br />
<br />
* {{Pkg|gnome-main-menu}} - A MATE panel applet similar to the traditional main-menu, but with a few additions.<br />
* {{Pkg|mate-netbook}} - A MATE panel applet that might be useful to owners of small screen devices, such as a Netbook. The applet will automatically maximize all windows and provides an application switcher applet.<br />
<br />
There are also a number of other unofficial MATE applications that are contributed and maintained by the MATE community and therefore not included in the {{Grp|mate}} or {{Grp|mate-extra}} groups.<br />
<br />
* {{Pkg|mate-accountsdialog}} - An application to view and modify user accounts information for MATE.<br />
* {{Pkg|mate-applet-lockkeys}} - A MATE panel applet that shows which of the CapsLock, NumLock and ScrollLock keys are on and which are off.<br />
* {{Pkg|mate-applet-softupd}} - A MATE panel applet to notify when software updates become available.<br />
* {{Pkg|mate-applet-streamer}} - A MATE panel applet to let you play your favourite online radio station with a single click.<br />
* {{Pkg|mate-color-manager}} - Color management application for MATE.<br />
* {{Pkg|mate-disk-utility}} - Disk management application for MATE.<br />
* {{Pkg|mate-screensaver-hacks}} - Enable screensavers from xscreensaver for MATE.<br />
* {{Pkg|mate-themes-extras}} - Collection of GTK2/3 desktop themes for MATE.<br />
* {{Pkg|variety}} - Variety changes the wallpaper on a regular interval using user-specified or automatically downloaded images.<br />
<br />
The following is also available via the AUR and integrates with MATE but the package is not maintained by the MATE team.<br />
<br />
* {{AUR|mintmenu}} - Linux Mint Menu for MATE.<br />
<br />
== Starting MATE ==<br />
<br />
MATE can be started via a display manager or manually.<br />
<br />
=== Graphical log-in ===<br />
<br />
Choose ''MATE'' from the menu in a [[display manager]] of choice. The MATE team recommends [[LightDM]] as the display manager with the GTK+ (2) greeter, which can be installed with the {{Pkg|lightdm-gtk2-greeter}} package.<br />
<br />
=== Manually ===<br />
<br />
If you prefer to start MATE manually from the console, add the following line to your {{ic|~/.xinitrc}} file:<br />
{{hc|~/.xinitrc|<nowiki><br />
exec mate-session<br />
</nowiki>}}<br />
<br />
Then MATE can be launched by typing {{ic|startx}}.<br />
<br />
See [[xinitrc]] for details, such as preserving the logind session.<br />
<br />
== Accessibility ==<br />
<br />
MATE is well suited for use by individuals with sight or mobility impairment. First install {{Pkg|orca}} and {{Pkg|espeak}} (Screen reader for individuals who are blind or visually impaired) and {{Pkg|onboard}} (On-screen keyboard useful for mobility impaired users) <br />
<br />
pacman -Syyu orca espeak onboard <br />
<br />
Now, before starting MATE for the first time, enter the following command as the user who needs accessibility features:<br />
<br />
gsettings set org.mate.interface accessibility true<br />
<br />
Once you start MATE, you can configure the accessibility applications via {{ic|System -> Preferences -> Assistive Technologies}}, although if you need Orca, you will need to run it from the {{ic|Alt-F2}} run window in order to start getting speech.<br />
<br />
== Network Management ==<br />
<br />
It is recommended that you use [[Network Manager]] for managing networks in MATE. Please see the wiki page for more details on installing and configuring it.<br />
<br />
== Bluetooth ==<br />
<br />
Since version 1.8, [[Bluetooth]] support in MATE is provided by [[Blueman]].<br />
<br />
== PulseAudio and GStreamer ==<br />
<br />
MATE supports two audio backends, [http://www.pulseaudio.org PulseAudio] and [http://www.gstreamer.net GStreamer]. By default, the PulseAudio backend is installed but if you want to switch to the GStreamer backend, do the following:<br />
<br />
# pacman -S mate-settings-daemon-gstreamer mate-media-gstreamer<br />
<br />
== Tips and tricks ==<br />
<br />
=== Enabling compositing ===<br />
<br />
Compositing is not be enabled by default. To enable it navigate to run {{ic|System -> Preferences -> Windows}} and click the tick box alongside '''Enable software compositing window manager''' in the {{ic|General}} tab. Alternatively, you can run the following from the terminal:<br />
<br />
$ dconf write /org/mate/marco/general/compositing-manager true<br />
<br />
=== Toggling compositing ===<br />
<br />
Some software may have issues rendering graphics when working on an environment using the nvidia proprietary drivers and a compositing window manager.<br />
<br />
To easily toggle the compositing feature, save the following script somewhere within the Home directory, e.g. {{ic|~/.scripts/compositing.sh}}:<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
if $(dconf read /org/mate/marco/general/compositing-manager) == "true"<br />
then<br />
dconf write /org/mate/marco/general/compositing-manager false<br />
else<br />
dconf write /org/mate/marco/general/compositing-manager true<br />
fi<br />
</nowiki>}}<br />
<br />
and then create a custom keyboard shortcut that executes the file, e.g. {{ic|Ctrl+Alt+C}}, to {{ic|sh ~/.scripts/compositing.sh}}.<br />
<br />
=== Enabling new window centering ===<br />
<br />
By default, new windows are placed in the top-left corner. To center new windows on creation navigate to run {{ic|System -> Preferences -> Windows}} and click the tick box alongside '''Center new windows''' in the {{ic|Placement}} tab. Alternatively, you can run the following from the terminal:<br />
<br />
$ dconf write /org/mate/marco/general/center-new-windows true<br />
<br />
=== Enabling window snapping ===<br />
<br />
Window snapping is not be enabled by default, to enable it navigate to run {{ic|System -> Preferences -> Windows}} and click the tick box alongside '''Enable side by side tiling''' in the {{ic|Placement}} tab. <br />
<br />
=== Show or hide desktop icons ===<br />
<br />
By default, MATE shows multiple icons on the desktop: The content of your desktop directory, computer, home and network directories, the trash and mounted drives. You can show or hide them individually or all at once using {{ic|dconf}}.<br />
<br />
==== Hide all desktop icons ====<br />
<br />
$ dconf write /org/mate/desktop/background/show-desktop-icons false<br />
<br />
==== Hide individual icons ====<br />
<br />
Hide computer icon:<br />
<br />
$ dconf write /org/mate/caja/desktop/computer-icon-visible false<br />
<br />
Hide user directory icon:<br />
<br />
$ dconf write /org/mate/caja/desktop/home-icon-visible false<br />
<br />
Hide network icon:<br />
<br />
$ dconf write /org/mate/caja/desktop/network-icon-visible false<br />
<br />
Hide trash icon:<br />
<br />
$ dconf write /org/mate/caja/desktop/trash-icon-visible false<br />
<br />
Hide mounted volumes:<br />
<br />
$ dconf write /org/mate/caja/desktop/volumes-visible false<br />
<br />
Replace {{ic|false}} with {{ic|true}} for the icons to reappear.<br />
<br />
=== Use a different window manager with MATE ===<br />
<br />
The default window manager in MATE is called ''marco'', a fork of the GNOME 2 window manager {{pkg|metacity}}. You can replace ''marco'' with another window manager via a number of different methods:<br />
<br />
* The easiest way to change the window manager is to autostart it using {{ic|mate-session-properties}}. Open the ''System'' menu, navigate to the ''Preferences'' menu and click on '''Startup Applications'''. In the dialog click '''Add.''' Enter a name and comment in the name and comment sections and in the command section add a command of the following syntax: ''"name of window manager"'' ''"--replace"''<br />
<br />
For example: for openbox you would use the command {{ic|openbox --replace}}.<br />
<br />
Log out and log in again and ''marco'' should be replaced by the window manager of your choice. To revert to ''marco'' simply delete the entry you created in '''Startup Applications'''.<br />
<br />
* Alternatively you can specify the desired window manager in dconf:<br />
<br />
$ dconf write /org/mate/desktop/session/required-components/windowmanager "'mywindowmanager'"<br />
<br />
replace "mywindowmanager" with the name of the window manager of your choice e.g. ''openbox'' or ''metacity''.<br />
<br />
=== Change window decoration button order ===<br />
<br />
You can change the button using dconf. The key is in org.mate.marco.general.button-layout. Use the graphical dconf-editor or the dconf command line tool to change it:<br />
<br />
$ dconf write /org/mate/marco/general/button-layout "'close,maximize,minimize:'"<br />
<br />
and put '''menu''', '''close''', '''minimize''' and '''maximize''' in your desired order, separated by commas. The colon is the window title (it is necessary for the changes to apply).<br />
<br />
=== Auto open file manager after drive mount ===<br />
<br />
By default, MATE automatically opens a new file manager window when a drive is mounted. To disable this, change the following key in dconf:<br />
<br />
$ dconf write /org/mate/desktop/media-handling/automount-open false<br />
<br />
=== Screensaver ===<br />
<br />
MATE uses {{pkg|mate-screensaver}} to lock your session. By default there are a limited number of lock-screens available. To make more lock-screens available, install the {{Pkg|mate-screensaver-hacks}} package. This will allow you to use [[Xscreensaver]] lock-screens with {{pkg|mate-screensaver}}.<br />
<br />
=== Lock screen & default background image ===<br />
<br />
The full list of configuration options can be found in <code>/usr/share/glib-2.0/schemas/org.mate.background.gschema.xml</code>, they are overridden by creating the file <code>/usr/share/glib-2.0/schemas/mate-background.gschema.override</code>.<br />
<br />
{{note|The values on the right must be enclosed in single quotes (<nowiki>''</nowiki>) otherwise an error will occur during re-compile.}}<br />
<br />
Example #1: Change the background image of the lock screen:<br />
{{hc|/usr/share/glib-2.0/schemas/mate-background.gschema.override|2=<br />
<br />
[org.mate.background]<br />
picture-filename='/path/to/the/background.jpg'}}<br />
<br />
Example #2: Change the lock screen to use a gradient:<br />
{{hc|/usr/share/glib-2.0/schemas/mate-background.gschema.override|2=<br />
<br />
[org.mate.background]<br />
color-shading-type='vertical-gradient'<br />
picture-options='scaled'<br />
picture-filename=<nowiki>''</nowiki><br />
primary-color='#152233'<br />
secondary-color='#000000'}}<br />
<br />
Re-compile the schemas:<br />
# glib-compile-schemas /usr/share/glib-2.0/schemas/<br />
<br />
Finally, restart your X session for the change to effect.<br />
<br />
=== Styling Qt applications ===<br />
<br />
To make Qt4 applications inherit the MATE theme, do the following:<br />
<br />
* Navigate to ''System -> Preferences -> Qt4 Config'' or execute {{ic|qtconfig-qt4}} from a shell.<br />
* Change '''GUI Style''' to {{ic|GTK+}}.<br />
* ''File --> Save''.<br />
<br />
See [[Uniform Look for Qt and GTK Applications]] for more details.<br />
<br />
=== Consistent cursor theme ===<br />
<br />
You may find that the cursor theme used in MATE is not consistent. For example, it may change when moving the cursor across different application windows. To fix this problem, set the cursor theme by creating an {{ic|index.theme}} file which defines the cursor theme according to the XDG icon theme specification. See the following section of the [[Cursor Themes]] article: [[Cursor_Themes#Using_an_index.theme_file_.28recommended.29]].<br />
<br />
=== Use of gradient backgrounds with LightDM ===<br />
<br />
If you wish to use the default MATE (1.8) ''Stripes'' background as the LightDM background as well so as to make for seamless transition from LightDM to MATE, you will find that it is runtime-constructed from a grayscale PNG upon which MATE layers a vertical blue-to-green gradient, something which LightDM does not currently support. If insistent, you can work around this by temporarily setting {{ic|/org/mate/desktop/background/show-desktop-icons}} to {{ic|false}}, either through the {{ic|dconf Editor}} tool available from the {{ic|System Tools}} menu or by running<br />
dconf write /org/mate/desktop/background/show-desktop-icons false<br />
from the Alt-F2 {{ic|Run Application}} dialog, then running {{ic|killall mate-panel}} from said dialog and hitting {{ic|Print Screen}} before the panel reappears. You are then presented with a {{ic|Save As}} dialog for exactly that fully rendered, screen-sized PNG that you need for LightDM. Run<br />
dconf reset /org/mate/desktop/background/show-desktop-icons<br />
to have your desktop icons reappear.<br />
<br />
=== Enable panel shadow ===<br />
<br />
To enable panel shadow you should edit /usr/share/applications/marco.desktop file and add autostart delay for a second and change the value of ''X-MATE-Autostart-Phase'' from ''WindowManager'' to ''Applications'' because the autostart delay is only allowed in the applications phase. [https://github.com/mate-desktop/mate-panel/issues/193 The problem was discussed here].<br />
<br />
{{hc|/usr/share/applications/marco.desktop|2=<br />
...<br />
X-MATE-Autostart-Phase='''Applications'''<br />
'''X-MATE-Autostart-Delay=1'''<br />
X-MATE-Provides=windowmanager<br />
X-MATE-Autostart-Notify=true<br />
}}<br />
<br />
== See also ==<br />
<br />
* [http://mate-desktop.org MATE homepage]<br />
* [http://wiki.mate-desktop.org/archlinux_custom_repo MATE wiki for Arch Linux]<br />
* [http://mate-desktop.org/gallery/1.8/ ''MATE desktop screenshots'']<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=1018647 ''The MATE Desktop Environment''] - Arch Linux forum discussion about MATE</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Dolphin_emulator&diff=341673Dolphin emulator2014-10-25T10:41:09Z<p>Sudowoodo: </p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Emulators]]<br />
{{Accuracy|As of October 2014, Dolphin is [https://dolphin-emu.org/blog/2014/09/30/dolphin-progress-report-september-2014 moving to Qt]. Parts of this article may need to be rewriten soon.}}<br />
Dolphin is a Nintendo Gamecube, Wii and Triforce emulator, currently supporting the x86, AMD64 and ARM architectures. Dolphin is available for Linux, MacOSX (intel-based), MS Windows and Android. It is a free and open source, community-developed project.<br />
Dolphin was the first Gamecube and Wii emulator, and currently the only one capable of playing commercial games.<br />
<br />
== Installation ==<br />
<br />
Install one of the following:<br />
<br />
* {{App|[[Dolphin emu]]|A Gamecube / Wii / Triforce emulator (Recommended)|https://dolphin-emu.org/|{{Pkg|dolphin-emu}}}}<br />
* {{App|Dolphin emu (git)|A Gamecube / Wii / Triforce emulator (development version)|https://github.com/dolphin-emu/dolphin|{{AUR|dolphin-emu-git}}}}<br />
* {{App|Dolphin emu Wayland (git)|A Gamecube / Wii / Triforce emulator with [[Wayland]] support.|https://dolphin-emu.org/|{{AUR|dolphin-emu-wayland-git}}}}<br />
<br />
== Configuration ==<br />
<br />
{{Note|Dolphin is a resource-heavy application, so expect not all games to run properly. See the reason [https://dolphin-emu.org/docs/faq/#why-do-i-need-such-powerful-computer-emulate-old-c here].}}<br />
{{Tip|Run {{ic|dolphin-emu -h}} for help Dolphin's options.}}<br />
<br />
While no additional configuration is needed for the emulator to run (it is preconfigured with the default settings), altering the settings can improve performance and graphics alike.<br />
Settings are split to three main sections, ''Config'', ''Graphics'' and ''DSP''.<br />
<br />
=== Config section ===<br />
<br />
On the General tab, check ''Enable Dual Core'' and ''Enable Idle Skipping''. Enabling or not the cheats is a personal choice. Keep in mind that a real man never cheats. The frame limit should be set to "Audio", so that it works with games from all regions. The CPU emulation engine should be left as JIT Recompiler. Only check "Force console as NTSC-J" if intending to play imported Japanese discs.<br />
<br />
All options on the "Interface" tab are personal choices.<br />
<br />
The Audio tab is the DSP section's screen; setting it up now means there will be no need to do it later. See the [[#DSP section|DSP settings paragraph]] below.<br />
<br />
The next two tabs are not very important; the Gamecube tab has settings about connected accessories, such as memory cards, and the only remarkable Wii tab option is the "Aspect Ratio" drop-down list. Set it to either 16:9 or 4:3, depending on the display's [[Wikipedia: Aspect ratio|aspect ratio]].<br />
<br />
On the final tab, "Paths", ISO directories can be set. The directory of game ISOs can also be set by clicking browse from the home screen, but here more options are available, such as ''Search Subfolders''.<br />
<br />
=== Graphics section ===<br />
<br />
On the "General" tab, choose OpenGL from the backend drop-down list. Set the "Display" and "Other" settings to the desired configuration. V-sync is useful, but it can lead to slowdowns. The "render to main window" option improves the experience aesthetically.<br />
<br />
On the "Enhancements" tab are the options that can improve graphics. While they result to great output, they can slow the emulation down to the point of making games unplayable. Choose the best settings possible, as long as speed remains 100%.<br />
<br />
{| class="wikitable"<br />
|+ Comparison of options<br />
!Option !!Performance !!Quality<br />
|-<br />
| '''Internal resolution''' || 1x Native || Auto (Window size)<br />
|-<br />
| '''Anti-aliasing''' || None || at least 2x<br />
|-<br />
| '''Anisotropic filtering''' || 1x || at least 2x<br />
|-<br />
| '''Post-Processing Effect''' || (off) || your choice<br>(see tip below)<br />
|-<br />
| '''Scaled EFB copy''' || unchecked || checked<br />
|-<br />
| '''Per-Pixel Lightning''' || unchecked || checked<br />
|-<br />
| '''Force texture filtering,<br>Widescreen Hack,<br>Disable fog''' || off || your option<br>(recommended: off)<br />
|}<br />
<br />
{{Tip|Dolphin is able to render games that were developed for 2D in anaglyph 3D. To enable this, set ''Post-Processing Effect'' to ''stereoscopic'' (default, for red-cyan mode) or ''stereoscopic2'' (blue-yellow). It is also '''necessary''' to uncheck "''Fast Depth Calculation''" on the ''Hacks'' tab (''see below'').}}<br />
<br />
{{Warning|Using filters and other ways to improve graphics might break a few games or cause graphical glitches of any level.}}<br />
<br />
Unless sure, the ''Hacks'' tab is best left untouched.<br />
<br />
{| class="wikitable"<br />
|+ Defaults<br />
!Option !! Value<br />
|-<br />
| Skip EFB access from CPU || unchecked<br />
|-<br />
| Ignore format changes || checked<br />
|-<br />
| EFB copies || texture<br />
|-<br />
| Texture cache/ Accuracy || Fast<br />
|-<br />
| External frame buffer || disable<br />
|-<br />
| Cache display lists || unchecked<br />
|-<br />
| Disable destination alpha || unchecked<br />
|-<br />
| OpenCL texture decoder || unchecked<br />
|-<br />
| OpenMP texture decoder || unchecked<br />
|-<br />
| Fast depth calculation || checked<br>(Should uncheck for anaglyph 3D)<br />
|-<br />
| Vertex streaming hack || unchecked<br />
|}<br />
<br />
Similarly, unless sure, leave '''everything''' in the ''Advanced'' tab unchecked.<br />
<br />
=== DSP section ===<br />
<br />
Set the DSP emulation engine to<br />
<br />
* DSP HLE for speed over accuracy,<br />
* DSP LLE recompiler for better accuracy with the cost of some speed,<br />
* DSP LLE interpreter; accurate but makes '''everything''' unplayable. Too slow.<br />
<br />
''DSP LLE on separate thread'' improves speed on computers with multi-core CPUs, but might cause audio glitches, and is known to break [https://wiki.dolphin-emu.org/index.php?title=Category:Zelda_ucode_games Zelda ucode games]. Audio backend is best set to [[ALSA]]. For {{ic|pulseaudio}}, Dolphin's optional dependency [[PulseAudio]] needs to be installed.<br />
<br />
{{Note|If you came here from the [[#Config section|Config section's]] link, you should go back now.}}<br />
<br />
== Playing ==<br />
<br />
{{Warning|Make sure you '''only''' use Dolphin for legally obtained self-made disc dumps of games you legally bought. Dolphin was not designed for illegal actions. Act legally as applying laws define. You are responsible for any usage of the emulator that you make.}}<br />
<br />
{{Note|No links, instructions or tips for obtaining illegal content will be provided on this wiki. No copyright infringement intended.}}<br />
<br />
Click on browse to set a directory of ISOs so that they are shown as a library on Dolphin's default screen. Otherwise just click ''Open'' and select the file.<br />
<br />
=== Dolphin's Wiki ===<br />
<br />
Whenever a game doesn't work properly, try reading its page on [https://wiki.dolphin-emu.org Dolphin's wiki]. Listed there are tips on setting up the emulator for each game, version compatibility charts, testing entries, troubleshooting and video previews. Contributions, such as testing entries and workarounds are welcome and help other users.<br />
<br />
Here's a [https://aur.archlinux.org/packages/xfce4-whiskermenu-plugin/ Whisker Menu] search action command for searching on Dolphin's wiki:<br />
<br />
exo-open --launch WebBrowser https://wiki.dolphin-emu.org/index.php?search=%u<br />
<br />
{{Tip|Setting up keymaps is recommended. Prefer a gamepad with analogue features to a keyboard and a mouse. See this [http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/GCController_Layout.svg/1000px-GCController_Layout.svg.png map of the GameCube gamepad]. Having fun while playing is also recommended.}}<br />
<br />
== Tips ==<br />
=== Scripts for building and installing Dolphin ===<br />
This script downloads or updates Dolphin, and then installs it. Put it under any directory and keep it there, along with the subdirectories and files it generates. <br />
{{Bc|<nowiki><br />
#!/bin/bash<br />
<br />
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"<br />
getdolphin() {<br />
echo 'Downloading Dolphin...'<br />
git clone https://github.com/dolphin-emu/dolphin.git<br />
}<br />
updatedolphin() {<br />
cd $DIR/dolphin-emu<br />
echo 'Updating the local repository...'<br />
git pull origin<br />
}<br />
build() {<br />
cmake $DIR/dolphin-emu<br />
make<br />
}<br />
updatedolphin || getdolphin<br />
mkdir $DIR/build<br />
cd $DIR/build<br />
build && echo 'Compiled succesfully.' || exit<br />
echo 'Proceeding to the installation; press Enter to continue or Ctrl+C to cancel.'<br />
read<br />
if [ $(whoami) == "root" ];<br />
then<br />
make install<br />
else<br />
sudo make install<br />
fi<br />
</nowiki>}}<br />
<br />
== Troubleshooting ==<br />
<br />
==== Games play too fast ====<br />
<br />
Make sure to set framelimit to Audio and have properly configure the [[#DSP section|DPS settings]]. If it doesn't work with your sound system, try setting it to 60 for NTSC games or 50 for PAL ones. Also, note that playback of other audio media while frameskip is set to audio breaks the game.<br />
{{Note|Certain software, such as {{Pkg|flashplugin}}, crash the "Audio" feature and make games unstable, if used at the same time as Dolphin.}}<br />
<br />
''See also: [[Sound system]] - one needs to be properly configured for the "Audio" frameskip option to work.''<br />
<br />
==== Emulation is too slow ====<br />
<br />
Double-check the [[Cpu_scaling#Scaling_governors|CPU scaling governor]]. If using an nvidia graphics card, on nvidia-settings changing the powermizer setting to "Prefer maximum performance". Killing unnecessary processes and disabling compositing also helps. Configuring Dolphin correctly, as described above, is the most important part.<br />
<br />
''See also: [[Maximizing Performance]] - most of the advice should be helpful.''<br />
<br />
==== Dolphin occasionally crashes on 64-bit CPUs ====<br />
{{Note|This solution is not guarranted to work on all systems.}}<br />
On 64bit processors, Dolphin crashes when loading a game after having played another. This also randomly happens on menus.<br />
<br />
Dolphin must be built manually, with a minor modification. Once the source code has been downloaded ({{ic|$ git clone http://www.github.com/dolphin-emu/dolphin}}), navigate to {{ic|(path to source)/dolphin/Source/Core/Core/}} , or, for older versions, in {{ic|(path to source)/dolphin-emu/src/dolphin/Source/Core/Core/Src/}} and edit ''CoreParameter.cpp''.<br />
<br />
Change line 98 from {{ic|<nowiki>bJITLoadStorePairedOff = false;</nowiki>}} to {{ic|<nowiki>bJITLoadStorePairedOff = true;</nowiki>}}.<br />
Notice the comment saying {{ic|// XXX not 64-bit clean}}.<br />
<br />
Upon saving the file, the package is ready to be compiled.<br />
<br />
''See also: [https://aur.archlinux.org/packages/do/dolphin-emu-git/PKGBUILD a PKGBUILD for Dolphin (git)]''<br />
<br />
== See also ==<br />
<br />
{{Note|The Arch Linux wiki and its users are not responsible for any damage, misuse or illegal action caused by following instructions from webpages hyperlinked bellow.}}<br />
<br />
* [https://dolphin-emu.org/docs/guides/performance-guide/ Dolphin's performance guide.]<br />
* [https://dolphin-emu.org/docs/faq/ Dolphin's FAQ]<br />
* [https://wiki.dolphin-emu.org/index.php?title=Ripping_Game_Discs Dolphin's wiki entry for legally obtaining game dumps.]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=User_talk:Maevius&diff=341533User talk:Maevius2014-10-24T17:57:01Z<p>Sudowoodo: /* iptables */ new section</p>
<hr />
<div>== iptables ==<br />
<br />
Καλησπέρα, πήρα την πρωτοβουλία να μεταφράσω δύο τμήματα στο [[iptables (Ελληνικά)]], ελπίζω να μην σας πειράζει. [[User:Sudowoodo|Sudowoodo]] ([[User talk:Sudowoodo|talk]]) 17:57, 24 October 2014 (UTC)</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Iptables_(%CE%95%CE%BB%CE%BB%CE%B7%CE%BD%CE%B9%CE%BA%CE%AC)&diff=341532Iptables (Ελληνικά)2014-10-24T17:50:00Z<p>Sudowoodo: /* Κανόνες */ Ολοκλήρωση τομέα.</p>
<hr />
<div>{{Translateme (Ελληνικά)|Η σελίδα βρίσκεται σε διαδικασία μετάφρασης}}<br />
{{Lowercase title}}<br />
[[Category:Firewalls]]<br />
[[en:Iptables]]<br />
[[es:Iptables]]<br />
[[fr:Iptables]]<br />
[[it:Iptables]]<br />
[[ja:Iptables]]<br />
[[ru:Iptables]]<br />
[[sr:Iptables]]<br />
[[zh-CN:Iptables]]<br />
{{Related articles start (Ελληνικά)}}<br />
{{Related|Firewalls}}<br />
{{Related|Simple stateful firewall}}<br />
{{Related|Sysctl#TCP/IP stack hardening}}<br />
{{Related|Sshguard}}<br />
{{Related|Fail2ban}}<br />
{{Related|Nftables}}<br />
{{Related articles end}}<br />
<br />
Το ''iptables'' είναι ένα εργαλείο γραμμής εντολών για τη ρύθμιση του [[firewall]] του Linux kernel, υλοποιημένο μέσα στο [[Wikipedia:Netfilter|Netfilter]] project. Ο όρος ''iptables'' χρησιμοποιείται επίσης συχνά όταν αναφερόμαστε στο firewall σε επίπεδο kernel. Μπορεί να παραμετροποιηθεί κατ' ευθείαν με το ''iptables'', ή χρησιμοποιώντας ένα από τα πολλά [[Firewalls#Console frontends|frontends]] και [[Firewalls#Graphic frontends|GUIs]]. Το ''iptables'' χρησιμοποιείται για το [[Wikipedia:IPv4|IPv4]] και το ''ip6tables'' για το [[IPv6]].<br />
<br />
Το [[nftables]] βγήκε με [http://www.phoronix.com/scan.php?page=news_item&px=MTQ5MDU την έκδοση του Linux kernel 3.13], και θα αντικαταστήσει μια μέρα το iptables ως το κύριο εργαλείο του Linux firewall.<br />
<br />
== Εγκατάσταση ==<br />
<br />
Ο stock πυρήνας του Arch Linux είναι compiled με την υποστήριξη του iptables. Θα χρειαστείτε μόνο να [[pacman|εγκαταστήσετε]] τα userland εργαλεία, τα οποία παρέχονται με το πακέτο {{Pkg|iptables}} στα [[official repositories]]. (Το πακέτο {{Pkg|iproute2}} από το {{Grp|base}} group έχει ως εξάρτηση το iptables, οπότε το πακέτο iptables θα πρέπει να είναι εγκατεστημένο στο σύστημά σας by default.)<br />
<br />
== Βασικές έννοιες ==<br />
<br />
Το iptables χρησιμοποιείται για να επιθεωρήσει, τρποποποιήσει, προωθήσει, ανακατευθύνει και/ή απορρίψει IPv4 πακέτα. Ο κώδικας για το φιλτράρισμα των IPv4 πακέτων είναι ήδη ενσωματωμένος στον πυρήνα και οργανώνεται σε μία συλλογή από πίνακες(''tables''), ο καθένας με ένα συγκεκριμένο σκοπό. Οι πίνακες είναι φτιαγμένοι από ένα σύνολο προκαθορισμένων αλυσίδων(''chains''), και οι αλυσίδες περιέχουν κανόνες οι οποίοι διασχίζονται κατά σειρά. Κάθε κανόνας αποτελείται από ένα κατηγόρημα με πιθανά matches και μία αντίστοιχη δράση (που ονομάζεται στόχος(''target'')) η οποία εκτελείται αν το κατηγόρημα είναι αληθές, πχ. οι καταστάσεις ταιριάζουν. Το iptables είναι το εργαλείο του χρήστη που σου επιτρέπει να δουλέψεις με αυτές τις αλυσίδες/κανόνες. Οι περισσότεροι νέοι χρήστες βρίσκουν την πολυπλοκότητα του linux IP routing αρκετά τρομακτική, αλλά στην εφαρμογή, οι πιο συχνές περιπτώσεις χρήσης (NAT και/ή βασικό Internet firewall) είναι πολύ λιγότερο περίπλοκες.<br />
<br />
Το κλειδί για να καταλάβει κανείς πως δουλέυει το iptables, είναι [http://www.frozentux.net/iptables-tutorial/images/tables_traverse.jpg αυτό το διάγραμμα]. Η λέξη με πεζά στην κορυφή είναι ο πίνακας και η λέξη με κεφαλαία από κάτω είναι η αλυσίδα. Κάθε IP πακέτο το οποίο εισέρχεται ''σε οποιοδήποτε network interface'' περνάει μέσω αυτού του διαγράμματος από πάνω προς τα κάτω. Μία συχνή πηγή σύγχυσης είναι ότι τα πακέτα τα οποία εισέρχονται, πχ. από ένα internal interface, διαχειρίζονται διαφορετικά από αυτά τα οποία εισέρχονται από ένα interface που βγαίνει στο Internet. Όλα τα interfaces διαχειρίζονται το ίδιο. Εξαρτάται από το χρήστη να ορίσει κανόνες που συμπεριφέρονται διαφορετικά. Φυσικά, κάποια πακέτα προορίζονται για τοπκικές διεργασίες (local processes), ως εκ τούτου έρχονται από την κορυφή του διαγράμματος και σταματούν στο <Local Process>, ενώ άλλα πακέτα δημιουργούνται από τοπικές διεργασίες τα οποία ξεκινούν από το <Local Process> και προχωρούν προς τα κάτω δια μέσου του διαγράμματος. Μία λεπτομερής εξήγηση του πώς δουλεύει αυτό το διάγραμμα μπορεί να βρεθεί [http://www.frozentux.net/iptables-tutorial/iptables-tutorial.html#TRAVERSINGOFTABLES εδώ].<br />
<br />
Στην πλειοψηφία των περιπτώσεων δε θα χρειαστεί να χρησιμοποιήσετε τους πίνακες '''raw''', '''mangle''', ή '''security''' καθόλου. Έτσι, το ακόλουθο διάγραμμα απεικονίζει μία απλοποιημένη ροή πακέτων του δικτύου μέσω του ''iptables'':<br />
<br />
{{bc|<nowiki><br />
XXXXXXXXXXXXXXXXXX<br />
XXX Network XXX<br />
XXXXXXXXXXXXXXXXXX<br />
+<br />
|<br />
v<br />
+-------------+ +------------------+<br />
|table: filter| <---+ | table: nat |<br />
|chain: INPUT | | | chain: PREROUTING|<br />
+-----+-------+ | +--------+---------+<br />
| | |<br />
v | v<br />
[local process] | **************** +--------------+<br />
| +---------+ Routing decision +------> |table: filter |<br />
v **************** |chain: FORWARD|<br />
**************** +------+-------+<br />
Routing decision |<br />
**************** |<br />
| |<br />
v **************** |<br />
+-------------+ +------> Routing decision <---------------+<br />
|table: nat | | ****************<br />
|chain: OUTPUT| | +<br />
+-----+-------+ | |<br />
| | v<br />
v | +-------------------+<br />
+--------------+ | | table: nat |<br />
|table: filter | +----+ | chain: POSTROUTING|<br />
|chain: OUTPUT | +--------+----------+<br />
+--------------+ |<br />
v<br />
XXXXXXXXXXXXXXXXXX<br />
XXX Network XXX<br />
XXXXXXXXXXXXXXXXXX<br />
</nowiki>}}<br />
<br />
=== Πίνακες ===<br />
<br />
Το iptables περιέχει πεντε πίνακες:<br />
<br />
# {{ic|raw}} χρησιμοποιείται μόνο για τη ρύθμιση πακέτων έτσι ώστε να εξαιρούνται από την παρακολούθηση της σύνδεσης.<br />
# {{ic|filter}} είναι ο default πίνακας, και είναι εκεί όπου λαμβάνουν μέρος όλες οι δράσεις που συνήθως συνδέονται με ένα firewall.<br />
# {{ic|nat}} χρησιμοποιείται για το [[Wikipedia:Network address translation|network address translation]] (πχ. port forwarding).<br />
# {{ic|mangle}} χρησιμοποιείται για ειδικές μετατροπές πακέτων (δείτε το [[Wikipedia:Mangled packet|Mangled packet]]).<br />
# {{ic|security}} χρησιμοποιείται για [[Security#Mandatory access control|Mandatory Access Control]] κανόνες δικτύου (πχ. SELinux -- δείτε [http://lwn.net/Articles/267140/ αυτό το άρθρο] για περισσότερες λεπτομέρειες).<br />
<br />
Στις περισσότερες περιπτώσεις θα χρησιμοποιήσετε μόνο δύο από αυτούς: '''filter''' και '''nat'''. Οι άλλοι πίνακες στοχεύουν σε πολύπλοκες ρυθμίσεις που περιλαμβάνουν πολλαπλά routers και routing αποφάσεις και είναι είναι πέρα από το πεδίο αυτών των εισαγωγικών παρατηρήσεων.<br />
<br />
=== Αλυσίδες ===<br />
<br />
Οι πίνακες αποτελούνται από ''αλυσίδες'', λίστες κανόνων που ακολουθούνται διαδοχικά. O προεπιλεγμένος πίνακας, ο {{ic|filter}}, περιέχει τρεις ενσωματομένες αλυσίδες: τη {{ic|INPUT}}, τη {{ic|OUTPUT}} και τη {{ic|FORWARD}}, που ενεργοποιούνται κατά διαφορετικές στιγμές της διαδικασίας φιλτραρίσματος πακέτων, όπως υποδικνύει το [http://www.frozentux.net/iptables-tutorial/chunkyhtml/images/tables_traverse.jpg διάγραμμα]. Ο πίνακας {{ic|nat}} περιέχει τις αλυσίδες {{ic|PREROUTING}}, {{ic|POSTROUTING}}, και {{ic|OUTPUT}}.<br />
<br />
Δείτε μια περιγραφή των ενσωματομένων αλυσιδών σε άλλους πίνακες στο {{ic|man 8 iptables}}.<br />
<br />
Αρχικά, καμία αλυσίδα δεν περιέχει κανόνες. Ο χρήστης γράφει κανόνες στις επιθυμιτές του αλυσίδες, οι οποίες ''έχουν'' μια προεπιλεγμένη πολιτική, συνήθως ρυθμισμένη στο {{ic|ACCEPT}}, η οποία μπορεί να επαναφερθεί στο {{ic|DROP}} ώστε να εξασφαλιστεί ότι τίποτα δεν ξεφέυγει από το σύνολο κανόνων. Η προεπιλεγμένη πολιτική πάντοτε εφαρμόζεται στο τέλος, μόνο, της κάθε αλυσίδας, και έτσι το πακέτο πρέπει να περάσει από όλους τους υπάρχοντες κανόνες στην αλυσίδα προτού αυτή να εφαρμοστεί.<br />
<br />
Προσθέτοντας αλυσίδες που καθορίζονται απο το χρήστη, τα σύνολα κανόνων είναι πιο αποτελεσματικά ή τροποποιούνται ευκολότερα. Δείτε το [[Simple stateful firewall]] για ένα παράδειγμα της χρήσης τους.<br />
<br />
=== Κανόνες ===<br />
<br />
Το φιλτράρισμα των πακέτων βασίζεται σε ''κανόνες''', που καθορίζονται από πολλαπλές ''ζεύξεις'', προϋποθέσεις που πρέπει να τηρεί το πακέτο για να εφαρμοστεί ο κανόνας, και έναν ''στόχο'', τη δράση που λαμβάνεται όταν το πακέτο ταιριάζει όλες τις προϋποθέσεις. Τυπικές περιπτώσεις ζεύξης κανόνα είναι η εύρεση της επιφάνειας απ' όπου προέρχεται το πακέτο (όπως eth0 η eth1), τί τύπου πακέτο είναι (ICMP, TCP ή UDP) ή η θύρα για την οποία προορίζεται το πακέτο.<br />
<br />
Οι στόχοι καθορίζονται με την επιλογή {{ic|-j}} ή {{ic|--jump}}. Μπορούν να είναι είτε αλυσίδες που ορίζει ο χρήστης (π.χ. "εάν αυτές οι προϋποθέσεις τηρούνται, πήδηξε στην επόμενη χειροκίνητα καθορισμένη αλυσίδα και συνέχισε εκεί την επεξεργασία), είτε ένας από τους ενσωματωμένους στόχους, η κάποια επέκταση αυτών. Οι ενσωματωμένοι στόχοι είναι: {{ic|ACCEPT}}, {{ic|DROP}}, {{ic|QUEUE}} και {{ic|RETURN}}. Παραδείγματα επεκτάσεων στόχων είναι οι {{ic|REJECT}} και {{ic|LOG}}. Εάν ο στόχος είναι ανοίκει στους ενσωματωμένους, η μοίρα του πακέτου αποφασίζεται άμεσα και η επεξεργασία του στον τρέχον πίνακα σταματά. Εάν ο στόχος είναι αλυσίδα που ορίστηκε από τον χρήστη και το πακέτο περάσει επιτυχώς από τη δεύτερη αλυσίδα, θα προχωρήσει στον επόμενο κανόνα της αυθεντικής αλυσίδας. Οι επεκτάσεις στόχων χωρίζονται "τερματικές" (ως ενσωματωμένοι στόχοι) και "μη-τερματικές" (ως αλυσίδες που ορίστηκαν από τον χρήστη), δείτε το {{ic|man 8 iptables-extensions}} για λεπτομέριες.<br />
<br />
=== Traversing Chains ===<br />
<br />
A network packet received on any interface traverses the traffic control chains of tables in the order shown in the [http://www.frozentux.net/iptables-tutorial/chunkyhtml/images/tables_traverse.jpg flow chart]. The first routing decision involves deciding if the final destination of the packet is the local machine (in which case the packet traverses through the {{ic|INPUT}} chains) or elsewhere (in which case the packet traverses through the {{ic|FORWARD}} chains). Subsequent routing decisions involve deciding what interface to assign to an outgoing packet. At each chain in the path, every rule in that chain is evaluated in order and whenever a rule matches, the corresponding target/jump action is executed. The 3 most commonly used targets are {{ic|ACCEPT}}, {{ic|DROP}}, and jump to a user-defined chain. While built-in chains can have default policies, user-defined chains can not. If every rule in a chain that you jumped fails to provide a complete match, the packet is dropped back into the calling chain as illustrated [http://www.frozentux.net/iptables-tutorial/images/table_subtraverse.jpg here]. If at any time a complete match is achieved for a rule with a {{ic|DROP}} target, the packet is dropped and no further processing is done. If a packet is {{ic|ACCEPT}}ed within a chain, it will be {{ic|ACCEPT}}ed in all superset chains also and it will not traverse any of the superset chains any further. However, be aware that the packet will continue to traverse all other chains in other tables in the normal fashion.<br />
<br />
=== Modules ===<br />
<br />
There are many modules which can be used to extend iptables such as connlimit, conntrack, limit and recent. These modules add extra functionality to allow complex filtering rules.<br />
<br />
== Configuring and Running iptables ==<br />
<br />
iptables is a [[Systemd]] service and is started accordingly:<br />
<br />
# systemctl start iptables<br />
<br />
However, the service won't start unless it finds an {{ic|/etc/iptables/iptables.rules}} file, and the Arch {{Pkg|iptables}} package does not come with a default iptables.rule file. So to start the service for the first time:<br />
<br />
# touch /etc/iptables/iptables.rules<br />
# systemctl start iptables<br />
<br />
or<br />
<br />
# cp /etc/iptables/empty.rules /etc/iptables/iptables.rules<br />
# systemctl start iptables<br />
<br />
As with other services, if you want iptables to be loaded automatically on boot, you must enable it:<br />
<br />
# systemctl enable iptables<br />
<br />
=== From the command line ===<br />
<br />
<br />
==== Showing the current rules ====<br />
<br />
You can check the current ruleset and the number of hits per rule by using the command:<br />
<br />
{{hc|# iptables -nvL|Chain INPUT (policy ACCEPT 0 packets, 0 bytes)<br />
pkts bytes target prot opt in out source destination<br />
<br />
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)<br />
pkts bytes target prot opt in out source destination<br />
<br />
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)<br />
pkts bytes target prot opt in out source destination}}<br />
<br />
If the output looks like the above, then there are no rules. Nothing is blocked.<br />
<br />
To show the line numbers when listing rules, append {{ic|--line-numbers}} to that input. This is useful when deleting and adding individual rules.<br />
<br />
==== Resetting rules ====<br />
<br />
You can flush and reset iptables to default using these commands:<br />
<br />
# iptables -F<br />
# iptables -X<br />
# iptables -t nat -F<br />
# iptables -t nat -X<br />
# iptables -t mangle -F<br />
# iptables -t mangle -X<br />
# iptables -t raw -F<br />
# iptables -t raw -X<br />
# iptables -t security -F<br />
# iptables -t security -X<br />
# iptables -P INPUT ACCEPT<br />
# iptables -P FORWARD ACCEPT<br />
# iptables -P OUTPUT ACCEPT<br />
<br />
The {{ic|-F}} command with no arguments flushes all the chains in its current table. Similarly, {{ic|-X}} deletes all empty non-default chains in a table.<br />
<br />
Individual chains may be flushed or deleted by following {{ic|-F}} and {{ic|-X}} with a {{ic|[chain]}} argument.<br />
<br />
==== Editing rules ====<br />
<br />
Rules can be added either by appending a rule to a chain or inserting them at a specific position on the chain. We will explore both methods here.<br />
<br />
First of all, our computer is not a router (unless, of course, it [[Router|is a router]]). We want to change the default policy on the {{ic|FORWARD}} chain from {{ic|ACCEPT}} to {{ic|DROP}}.<br />
<br />
{{bc|<br />
# iptables -P FORWARD DROP<br />
}}<br />
<br />
{{warning|The rest of this section is meant to teach the syntax and concepts behind iptables rules. It is not intended as a means for securing servers. For improving the security of your system, see [[Simple stateful firewall]] for a minimally secure iptables configuration and [[Security]] for hardening Arch Linux in general.}}<br />
<br />
The [[Wikipedia:Dropbox (service)|Dropbox]] LAN sync feature [https://isc.sans.edu/port.html?port=17500 broadcasts packets every 30 seconds] to all computers it can see. If we happen to be on a LAN with Dropbox clients and do not use this feature, then we might wish to reject those packets.<br />
<br />
{{bc|<br />
# iptables -A INPUT -p tcp --dport 17500 -j REJECT --reject-with icmp-port-unreachable<br />
}}<br />
<br />
{{hc|<br />
# iptables -nvL --line-numbers<br />
|<br />
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
1 0 0 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:17500 reject-with icmp-port-unreachable<br />
<br />
Chain FORWARD (policy DROP 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
<br />
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
<br />
}}<br />
{{note|We use {{ic|REJECT}} rather than {{ic|DROP}} here, because [https://tools.ietf.org/html/rfc1122#page-69 RFC 1122 3.3.8] requires hosts return ICMP errors whenever possible, instead of dropping packets. In reality, it is best to {{ic|REJECT}} packets from hosts who should know about your server's existence, and {{ic|DROP}} packets from hosts who should not even know your server exists, or those who appear "up to something".}}<br />
<br />
Now, say we change our mind about Dropbox and decide to install it on our computer. We also want to LAN sync, but only with one particular IP on our network. So we should use {{ic|-R}} to replace our old rule. Where {{ic|10.0.0.85}} is our other IP:<br />
<br />
{{bc|<br />
# iptables -R INPUT 1 -p tcp --dport 17500 ! -s 10.0.0.85 -j REJECT --reject-with icmp-port-unreachable<br />
}}<br />
<br />
{{hc|<br />
# iptables -nvL --line-numbers<br />
|<br />
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
1 0 0 REJECT tcp -- * * !10.0.0.85 0.0.0.0/0 tcp dpt:17500 reject-with icmp-port-unreachable<br />
<br />
Chain FORWARD (policy DROP 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
<br />
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
}}<br />
<br />
We have now replaced our original rule with one that allows {{ic|10.0.0.85}} to access port {{ic|17500}} on our computer. But now we realize that this is not scalable. If our friendly Dropbox user is attempting to access port {{ic|17500}} on our device, we should allow him immediately, not test him against any firewall rules that might come afterwards!<br />
<br />
So we write a new rule to allow our trusted user immediately. Using {{ic|-I}} to insert the new rule before our old one:<br />
<br />
{{bc|<br />
# iptables -I INPUT -p tcp --dport 17500 -s 10.0.0.85 -j ACCEPT -m comment --comment "Friendly Dropbox"<br />
}}<br />
<br />
{{hc|<br />
# iptables -nvL --line-numbers<br />
|<br />
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
1 0 0 ACCEPT tcp -- * * 10.0.0.85 0.0.0.0/0 tcp dpt:17500 /* Friendly Dropbox */<br />
2 0 0 REJECT tcp -- * * !10.0.0.85 0.0.0.0/0 tcp dpt:17500 reject-with icmp-port-unreachable<br />
<br />
Chain FORWARD (policy DROP 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
<br />
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
}}<br />
<br />
And replace our second rule with one that rejects everything on port {{ic|17500}}:<br />
<br />
# iptables -R INPUT 2 -p tcp --dport 17500 -j REJECT --reject-with icmp-port-unreachable<br />
<br />
Our final rule list now looks like this:<br />
<br />
{{hc|<br />
# iptables -nvL --line-numbers<br />
|<br />
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
1 0 0 ACCEPT tcp -- * * 10.0.0.85 0.0.0.0/0 tcp dpt:17500 /* Friendly Dropbox */<br />
2 0 0 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:17500 reject-with icmp-port-unreachable<br />
<br />
Chain FORWARD (policy DROP 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
<br />
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
}}<br />
<br />
=== Configuration file ===<br />
<br />
Iptables rules are, by default in Arch Linux, stored in {{ic|/etc/iptables/iptables.rules}}. They are, however, not loaded automatically, instead you can enable the {{ic|iptables.service}} which reads this file and loads the rules at boot or when started:<br />
<br />
# systemctl enable iptables<br />
# systemctl start iptables<br />
<br />
Iptables rules for IPv6 are, by default, stored in {{ic|/etc/iptables/ip6tables.rules}}, this file is read by {{ic|ip6tables.service}}. You can start it the same way as above.<br />
<br />
After adding rules via command-line, the configuration file is not changed automatically &mdash; you have to save it manually:<br />
<br />
# iptables-save > /etc/iptables/iptables.rules<br />
<br />
If you edit the configuration file manually, you have to reload it:<br />
<br />
# systemctl reload iptables<br />
<br />
Or you can load it directly through iptables:<br />
<br />
# iptables-restore < /etc/iptables/iptables.rules<br />
<br />
=== Guides ===<br />
<br />
* [[Simple stateful firewall]]<br />
* [[Router]]<br />
<br />
== Logging ==<br />
<br />
The {{ic|LOG}} target can be used to log packets that hit a rule. Unlike other targets like {{ic|ACCEPT}} or {{ic|DROP}}, the packet will continue moving through the chain after hitting a {{ic|LOG}} target. This means that in order to enable logging for all dropped packets, you would have to add a duplicate {{ic|LOG}} rule before each DROP rule. Since this reduces efficiency and makes things less simple, a {{ic|logdrop}} chain can be created instead.<br />
<br />
Create the chain with:<br />
<br />
# iptables -N logdrop<br />
<br />
And add the following rules to the newly created chain:<br />
<br />
# iptables -A logdrop -m limit --limit 5/m --limit-burst 10 -j LOG<br />
# iptables -A logdrop -j DROP<br />
<br />
Explanation for {{ic|limit}} and {{ic|limit-burst}} options is given [[#Limiting log rate|below]].<br />
<br />
Now whenever we want to drop a packet and log this event, we just jump to the {{ic|logdrop}} chain, for example:<br />
<br />
# iptables -A INPUT -m conntrack --ctstate INVALID -j logdrop<br />
<br />
=== Limiting log rate ===<br />
<br />
The above {{ic|logdrop}} chain uses the limit module to prevent the ''iptables'' log from growing too large or causing needless hard drive writes. Without limiting an erroneously configured service trying to connect, or an attacker, could fill the drive (or at least the {{ic|/var}} partition) by causing writes to the iptables log.<br />
<br />
The limit module is called with {{ic|-m limit}}. You can then use {{ic|--limit}} to set an average rate and {{ic|--limit-burst}} to set an initial burst rate. In the {{ic|logdrop}} example above:<br />
<br />
iptables -A logdrop -m limit --limit 5/m --limit-burst 10 -j LOG<br />
<br />
appends a rule which will log all packets that pass through it. The first 10 consecutive packets will be logged, and from then on only 5 packets per minute will be logged. The "limit burst" count is reset every time the "limit rate" is not broken, i.e. logging activity returns to normal automatically.<br />
<br />
=== Viewing logged packets ===<br />
<br />
Logged packets are visible as kernel messages in the [[systemd#Journal|systemd journal]].<br />
<br />
To view all packets that were logged since the machine was last booted:<br />
# journalctl -k | grep "IN=.*OUT=.*" | less<br />
<br />
=== syslog-ng ===<br />
<br />
Assuming you are using [[syslog-ng]], you can control where iptables' log output goes this way:<br />
filter f_everything { level(debug..emerg) and not facility(auth, authpriv); };<br />
to<br />
filter f_everything { level(debug..emerg) and not facility(auth, authpriv) and not filter(f_iptables); };<br />
<br />
This will stop logging iptables output to {{ic|/var/log/everything.log}}.<br />
<br />
If you also want iptables to log to a different file than {{ic|/var/log/iptables.log}}, you can simply change the file value of destination {{ic|d_iptables}} here (still in {{ic|syslog-ng.conf}})<br />
destination d_iptables { file("/var/log/iptables.log"); };<br />
<br />
=== ulogd ===<br />
<br />
[http://www.netfilter.org/projects/ulogd/index.html ulogd] is a specialized userspace packet logging daemon for netfilter that can replace the default {{ic|LOG}} target. The package {{Pkg|ulogd}} is available in the {{ic|[community]}} repository.<br />
<br />
== See also ==<br />
* [[Wikipedia:iptables|Wikipedia article]]<br />
* [[Port Knocking]]<br />
* [http://www.netfilter.org/projects/iptables/index.html Official iptables web site]<br />
* [http://www.frozentux.net/iptables-tutorial/iptables-tutorial.html iptables Tutorial 1.2.2] by Oskar Andreasson<br />
* [http://wiki.debian.org/iptables iptables Debian] Debian wiki</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Iptables_(%CE%95%CE%BB%CE%BB%CE%B7%CE%BD%CE%B9%CE%BA%CE%AC)&diff=341448Iptables (Ελληνικά)2014-10-24T08:46:55Z<p>Sudowoodo: /* Rules */ Μετάφραση τμήματος.</p>
<hr />
<div>{{Translateme (Ελληνικά)|Η σελίδα βρίσκεται σε διαδικασία μετάφρασης}}<br />
{{Lowercase title}}<br />
[[Category:Firewalls]]<br />
[[en:Iptables]]<br />
[[es:Iptables]]<br />
[[fr:Iptables]]<br />
[[it:Iptables]]<br />
[[ja:Iptables]]<br />
[[ru:Iptables]]<br />
[[sr:Iptables]]<br />
[[zh-CN:Iptables]]<br />
{{Related articles start (Ελληνικά)}}<br />
{{Related|Firewalls}}<br />
{{Related|Simple stateful firewall}}<br />
{{Related|Sysctl#TCP/IP stack hardening}}<br />
{{Related|Sshguard}}<br />
{{Related|Fail2ban}}<br />
{{Related|Nftables}}<br />
{{Related articles end}}<br />
<br />
Το ''iptables'' είναι ένα εργαλείο γραμμής εντολών για τη ρύθμιση του [[firewall]] του Linux kernel, υλοποιημένο μέσα στο [[Wikipedia:Netfilter|Netfilter]] project. Ο όρος ''iptables'' χρησιμοποιείται επίσης συχνά όταν αναφερόμαστε στο firewall σε επίπεδο kernel. Μπορεί να παραμετροποιηθεί κατ' ευθείαν με το ''iptables'', ή χρησιμοποιώντας ένα από τα πολλά [[Firewalls#Console frontends|frontends]] και [[Firewalls#Graphic frontends|GUIs]]. Το ''iptables'' χρησιμοποιείται για το [[Wikipedia:IPv4|IPv4]] και το ''ip6tables'' για το [[IPv6]].<br />
<br />
Το [[nftables]] βγήκε με [http://www.phoronix.com/scan.php?page=news_item&px=MTQ5MDU την έκδοση του Linux kernel 3.13], και θα αντικαταστήσει μια μέρα το iptables ως το κύριο εργαλείο του Linux firewall.<br />
<br />
== Εγκατάσταση ==<br />
<br />
Ο stock πυρήνας του Arch Linux είναι compiled με την υποστήριξη του iptables. Θα χρειαστείτε μόνο να [[pacman|εγκαταστήσετε]] τα userland εργαλεία, τα οποία παρέχονται με το πακέτο {{Pkg|iptables}} στα [[official repositories]]. (Το πακέτο {{Pkg|iproute2}} από το {{Grp|base}} group έχει ως εξάρτηση το iptables, οπότε το πακέτο iptables θα πρέπει να είναι εγκατεστημένο στο σύστημά σας by default.)<br />
<br />
== Βασικές έννοιες ==<br />
<br />
Το iptables χρησιμοποιείται για να επιθεωρήσει, τρποποποιήσει, προωθήσει, ανακατευθύνει και/ή απορρίψει IPv4 πακέτα. Ο κώδικας για το φιλτράρισμα των IPv4 πακέτων είναι ήδη ενσωματωμένος στον πυρήνα και οργανώνεται σε μία συλλογή από πίνακες(''tables''), ο καθένας με ένα συγκεκριμένο σκοπό. Οι πίνακες είναι φτιαγμένοι από ένα σύνολο προκαθορισμένων αλυσίδων(''chains''), και οι αλυσίδες περιέχουν κανόνες οι οποίοι διασχίζονται κατά σειρά. Κάθε κανόνας αποτελείται από ένα κατηγόρημα με πιθανά matches και μία αντίστοιχη δράση (που ονομάζεται στόχος(''target'')) η οποία εκτελείται αν το κατηγόρημα είναι αληθές, πχ. οι καταστάσεις ταιριάζουν. Το iptables είναι το εργαλείο του χρήστη που σου επιτρέπει να δουλέψεις με αυτές τις αλυσίδες/κανόνες. Οι περισσότεροι νέοι χρήστες βρίσκουν την πολυπλοκότητα του linux IP routing αρκετά τρομακτική, αλλά στην εφαρμογή, οι πιο συχνές περιπτώσεις χρήσης (NAT και/ή βασικό Internet firewall) είναι πολύ λιγότερο περίπλοκες.<br />
<br />
Το κλειδί για να καταλάβει κανείς πως δουλέυει το iptables, είναι [http://www.frozentux.net/iptables-tutorial/images/tables_traverse.jpg αυτό το διάγραμμα]. Η λέξη με πεζά στην κορυφή είναι ο πίνακας και η λέξη με κεφαλαία από κάτω είναι η αλυσίδα. Κάθε IP πακέτο το οποίο εισέρχεται ''σε οποιοδήποτε network interface'' περνάει μέσω αυτού του διαγράμματος από πάνω προς τα κάτω. Μία συχνή πηγή σύγχυσης είναι ότι τα πακέτα τα οποία εισέρχονται, πχ. από ένα internal interface, διαχειρίζονται διαφορετικά από αυτά τα οποία εισέρχονται από ένα interface που βγαίνει στο Internet. Όλα τα interfaces διαχειρίζονται το ίδιο. Εξαρτάται από το χρήστη να ορίσει κανόνες που συμπεριφέρονται διαφορετικά. Φυσικά, κάποια πακέτα προορίζονται για τοπκικές διεργασίες (local processes), ως εκ τούτου έρχονται από την κορυφή του διαγράμματος και σταματούν στο <Local Process>, ενώ άλλα πακέτα δημιουργούνται από τοπικές διεργασίες τα οποία ξεκινούν από το <Local Process> και προχωρούν προς τα κάτω δια μέσου του διαγράμματος. Μία λεπτομερής εξήγηση του πώς δουλεύει αυτό το διάγραμμα μπορεί να βρεθεί [http://www.frozentux.net/iptables-tutorial/iptables-tutorial.html#TRAVERSINGOFTABLES εδώ].<br />
<br />
Στην πλειοψηφία των περιπτώσεων δε θα χρειαστεί να χρησιμοποιήσετε τους πίνακες '''raw''', '''mangle''', ή '''security''' καθόλου. Έτσι, το ακόλουθο διάγραμμα απεικονίζει μία απλοποιημένη ροή πακέτων του δικτύου μέσω του ''iptables'':<br />
<br />
{{bc|<nowiki><br />
XXXXXXXXXXXXXXXXXX<br />
XXX Network XXX<br />
XXXXXXXXXXXXXXXXXX<br />
+<br />
|<br />
v<br />
+-------------+ +------------------+<br />
|table: filter| <---+ | table: nat |<br />
|chain: INPUT | | | chain: PREROUTING|<br />
+-----+-------+ | +--------+---------+<br />
| | |<br />
v | v<br />
[local process] | **************** +--------------+<br />
| +---------+ Routing decision +------> |table: filter |<br />
v **************** |chain: FORWARD|<br />
**************** +------+-------+<br />
Routing decision |<br />
**************** |<br />
| |<br />
v **************** |<br />
+-------------+ +------> Routing decision <---------------+<br />
|table: nat | | ****************<br />
|chain: OUTPUT| | +<br />
+-----+-------+ | |<br />
| | v<br />
v | +-------------------+<br />
+--------------+ | | table: nat |<br />
|table: filter | +----+ | chain: POSTROUTING|<br />
|chain: OUTPUT | +--------+----------+<br />
+--------------+ |<br />
v<br />
XXXXXXXXXXXXXXXXXX<br />
XXX Network XXX<br />
XXXXXXXXXXXXXXXXXX<br />
</nowiki>}}<br />
<br />
=== Πίνακες ===<br />
<br />
Το iptables περιέχει πεντε πίνακες:<br />
<br />
# {{ic|raw}} χρησιμοποιείται μόνο για τη ρύθμιση πακέτων έτσι ώστε να εξαιρούνται από την παρακολούθηση της σύνδεσης.<br />
# {{ic|filter}} είναι ο default πίνακας, και είναι εκεί όπου λαμβάνουν μέρος όλες οι δράσεις που συνήθως συνδέονται με ένα firewall.<br />
# {{ic|nat}} χρησιμοποιείται για το [[Wikipedia:Network address translation|network address translation]] (πχ. port forwarding).<br />
# {{ic|mangle}} χρησιμοποιείται για ειδικές μετατροπές πακέτων (δείτε το [[Wikipedia:Mangled packet|Mangled packet]]).<br />
# {{ic|security}} χρησιμοποιείται για [[Security#Mandatory access control|Mandatory Access Control]] κανόνες δικτύου (πχ. SELinux -- δείτε [http://lwn.net/Articles/267140/ αυτό το άρθρο] για περισσότερες λεπτομέρειες).<br />
<br />
Στις περισσότερες περιπτώσεις θα χρησιμοποιήσετε μόνο δύο από αυτούς: '''filter''' και '''nat'''. Οι άλλοι πίνακες στοχεύουν σε πολύπλοκες ρυθμίσεις που περιλαμβάνουν πολλαπλά routers και routing αποφάσεις και είναι είναι πέρα από το πεδίο αυτών των εισαγωγικών παρατηρήσεων.<br />
<br />
=== Αλυσίδες ===<br />
<br />
Οι πίνακες αποτελούνται από ''αλυσίδες'', λίστες κανόνων που ακολουθούνται διαδοχικά. O προεπιλεγμένος πίνακας, ο {{ic|filter}}, περιέχει τρεις ενσωματομένες αλυσίδες: τη {{ic|INPUT}}, τη {{ic|OUTPUT}} και τη {{ic|FORWARD}}, που ενεργοποιούνται κατά διαφορετικές στιγμές της διαδικασίας φιλτραρίσματος πακέτων, όπως υποδικνύει το [http://www.frozentux.net/iptables-tutorial/chunkyhtml/images/tables_traverse.jpg διάγραμμα]. Ο πίνακας {{ic|nat}} περιέχει τις αλυσίδες {{ic|PREROUTING}}, {{ic|POSTROUTING}}, και {{ic|OUTPUT}}.<br />
<br />
Δείτε μια περιγραφή των ενσωματομένων αλυσιδών σε άλλους πίνακες στο {{ic|man 8 iptables}}.<br />
<br />
Αρχικά, καμία αλυσίδα δεν περιέχει κανόνες. Ο χρήστης γράφει κανόνες στις επιθυμιτές του αλυσίδες, οι οποίες ''έχουν'' μια προεπιλεγμένη πολιτική, συνήθως ρυθμισμένη στο {{ic|ACCEPT}}, η οποία μπορεί να επαναφερθεί στο {{ic|DROP}} ώστε να εξασφαλιστεί ότι τίποτα δεν ξεφέυγει από το σύνολο κανόνων. Η προεπιλεγμένη πολιτική πάντοτε εφαρμόζεται στο τέλος, μόνο, της κάθε αλυσίδας, και έτσι το πακέτο πρέπει να περάσει από όλους τους υπάρχοντες κανόνες στην αλυσίδα προτού αυτή να εφαρμοστεί.<br />
<br />
Προσθέτοντας αλυσίδες που καθορίζονται απο το χρήστη, τα σύνολα κανόνων είναι πιο αποτελεσματικά ή τροποποιούνται ευκολότερα. Δείτε το [[Simple stateful firewall]] για ένα παράδειγμα της χρήσης τους.<br />
<br />
=== Κανόνες ===<br />
<br />
Το φιλτράρισμα των πακέτων βασίζεται σε ''κανόνες''', που καθορίζονται από πολλαπλές ''ζεύξεις'', προϋποθέσεις που πρέπει να τηρεί το πακέτο για να εφαρμοστεί ο κανόνας, και έναν ''στόχο'', τη δράση που λαμβάνεται όταν το πακέτο ταιριάζει όλες τις προϋποθέσεις. Τυπικές περιπτώσεις ζεύξης κανόνα είναι η εύρεση της επιφάνειας απ' όπου προέρχεται το πακέτο (όπως eth0 η eth1), τί τύπου πακέτο είναι (ICMP, TCP ή UDP) ή η θύρα για την οποία προορίζεται το πακέτο.<br />
<br />
Targets are specified using the {{ic|-j}} or {{ic|--jump}} option. Targets can be either user-defined chains (i.e. if these conditions are matched, jump to the following user-defined chain and continue processing there), one of the special built-in targets, or a target extension. Built-in targets are {{ic|ACCEPT}}, {{ic|DROP}}, {{ic|QUEUE}} and {{ic|RETURN}}, target extensions are, for example, {{ic|REJECT}} and {{ic|LOG}}. If the target is a built-in target, the fate of the packet is decided immediately and processing of the packet in current table is stopped. If the target is a user-defined chain and the packet passes successfully through this second chain, it will move to the next rule in the original chain. Target extensions can be either ''terminating'' (as built-in targets) or ''non-terminating'' (as user-defined chains), see {{ic|man 8 iptables-extensions}} for details.<br />
<br />
=== Traversing Chains ===<br />
<br />
A network packet received on any interface traverses the traffic control chains of tables in the order shown in the [http://www.frozentux.net/iptables-tutorial/chunkyhtml/images/tables_traverse.jpg flow chart]. The first routing decision involves deciding if the final destination of the packet is the local machine (in which case the packet traverses through the {{ic|INPUT}} chains) or elsewhere (in which case the packet traverses through the {{ic|FORWARD}} chains). Subsequent routing decisions involve deciding what interface to assign to an outgoing packet. At each chain in the path, every rule in that chain is evaluated in order and whenever a rule matches, the corresponding target/jump action is executed. The 3 most commonly used targets are {{ic|ACCEPT}}, {{ic|DROP}}, and jump to a user-defined chain. While built-in chains can have default policies, user-defined chains can not. If every rule in a chain that you jumped fails to provide a complete match, the packet is dropped back into the calling chain as illustrated [http://www.frozentux.net/iptables-tutorial/images/table_subtraverse.jpg here]. If at any time a complete match is achieved for a rule with a {{ic|DROP}} target, the packet is dropped and no further processing is done. If a packet is {{ic|ACCEPT}}ed within a chain, it will be {{ic|ACCEPT}}ed in all superset chains also and it will not traverse any of the superset chains any further. However, be aware that the packet will continue to traverse all other chains in other tables in the normal fashion.<br />
<br />
=== Modules ===<br />
<br />
There are many modules which can be used to extend iptables such as connlimit, conntrack, limit and recent. These modules add extra functionality to allow complex filtering rules.<br />
<br />
== Configuring and Running iptables ==<br />
<br />
iptables is a [[Systemd]] service and is started accordingly:<br />
<br />
# systemctl start iptables<br />
<br />
However, the service won't start unless it finds an {{ic|/etc/iptables/iptables.rules}} file, and the Arch {{Pkg|iptables}} package does not come with a default iptables.rule file. So to start the service for the first time:<br />
<br />
# touch /etc/iptables/iptables.rules<br />
# systemctl start iptables<br />
<br />
or<br />
<br />
# cp /etc/iptables/empty.rules /etc/iptables/iptables.rules<br />
# systemctl start iptables<br />
<br />
As with other services, if you want iptables to be loaded automatically on boot, you must enable it:<br />
<br />
# systemctl enable iptables<br />
<br />
=== From the command line ===<br />
<br />
<br />
==== Showing the current rules ====<br />
<br />
You can check the current ruleset and the number of hits per rule by using the command:<br />
<br />
{{hc|# iptables -nvL|Chain INPUT (policy ACCEPT 0 packets, 0 bytes)<br />
pkts bytes target prot opt in out source destination<br />
<br />
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)<br />
pkts bytes target prot opt in out source destination<br />
<br />
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)<br />
pkts bytes target prot opt in out source destination}}<br />
<br />
If the output looks like the above, then there are no rules. Nothing is blocked.<br />
<br />
To show the line numbers when listing rules, append {{ic|--line-numbers}} to that input. This is useful when deleting and adding individual rules.<br />
<br />
==== Resetting rules ====<br />
<br />
You can flush and reset iptables to default using these commands:<br />
<br />
# iptables -F<br />
# iptables -X<br />
# iptables -t nat -F<br />
# iptables -t nat -X<br />
# iptables -t mangle -F<br />
# iptables -t mangle -X<br />
# iptables -t raw -F<br />
# iptables -t raw -X<br />
# iptables -t security -F<br />
# iptables -t security -X<br />
# iptables -P INPUT ACCEPT<br />
# iptables -P FORWARD ACCEPT<br />
# iptables -P OUTPUT ACCEPT<br />
<br />
The {{ic|-F}} command with no arguments flushes all the chains in its current table. Similarly, {{ic|-X}} deletes all empty non-default chains in a table.<br />
<br />
Individual chains may be flushed or deleted by following {{ic|-F}} and {{ic|-X}} with a {{ic|[chain]}} argument.<br />
<br />
==== Editing rules ====<br />
<br />
Rules can be added either by appending a rule to a chain or inserting them at a specific position on the chain. We will explore both methods here.<br />
<br />
First of all, our computer is not a router (unless, of course, it [[Router|is a router]]). We want to change the default policy on the {{ic|FORWARD}} chain from {{ic|ACCEPT}} to {{ic|DROP}}.<br />
<br />
{{bc|<br />
# iptables -P FORWARD DROP<br />
}}<br />
<br />
{{warning|The rest of this section is meant to teach the syntax and concepts behind iptables rules. It is not intended as a means for securing servers. For improving the security of your system, see [[Simple stateful firewall]] for a minimally secure iptables configuration and [[Security]] for hardening Arch Linux in general.}}<br />
<br />
The [[Wikipedia:Dropbox (service)|Dropbox]] LAN sync feature [https://isc.sans.edu/port.html?port=17500 broadcasts packets every 30 seconds] to all computers it can see. If we happen to be on a LAN with Dropbox clients and do not use this feature, then we might wish to reject those packets.<br />
<br />
{{bc|<br />
# iptables -A INPUT -p tcp --dport 17500 -j REJECT --reject-with icmp-port-unreachable<br />
}}<br />
<br />
{{hc|<br />
# iptables -nvL --line-numbers<br />
|<br />
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
1 0 0 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:17500 reject-with icmp-port-unreachable<br />
<br />
Chain FORWARD (policy DROP 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
<br />
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
<br />
}}<br />
{{note|We use {{ic|REJECT}} rather than {{ic|DROP}} here, because [https://tools.ietf.org/html/rfc1122#page-69 RFC 1122 3.3.8] requires hosts return ICMP errors whenever possible, instead of dropping packets. In reality, it is best to {{ic|REJECT}} packets from hosts who should know about your server's existence, and {{ic|DROP}} packets from hosts who should not even know your server exists, or those who appear "up to something".}}<br />
<br />
Now, say we change our mind about Dropbox and decide to install it on our computer. We also want to LAN sync, but only with one particular IP on our network. So we should use {{ic|-R}} to replace our old rule. Where {{ic|10.0.0.85}} is our other IP:<br />
<br />
{{bc|<br />
# iptables -R INPUT 1 -p tcp --dport 17500 ! -s 10.0.0.85 -j REJECT --reject-with icmp-port-unreachable<br />
}}<br />
<br />
{{hc|<br />
# iptables -nvL --line-numbers<br />
|<br />
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
1 0 0 REJECT tcp -- * * !10.0.0.85 0.0.0.0/0 tcp dpt:17500 reject-with icmp-port-unreachable<br />
<br />
Chain FORWARD (policy DROP 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
<br />
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
}}<br />
<br />
We have now replaced our original rule with one that allows {{ic|10.0.0.85}} to access port {{ic|17500}} on our computer. But now we realize that this is not scalable. If our friendly Dropbox user is attempting to access port {{ic|17500}} on our device, we should allow him immediately, not test him against any firewall rules that might come afterwards!<br />
<br />
So we write a new rule to allow our trusted user immediately. Using {{ic|-I}} to insert the new rule before our old one:<br />
<br />
{{bc|<br />
# iptables -I INPUT -p tcp --dport 17500 -s 10.0.0.85 -j ACCEPT -m comment --comment "Friendly Dropbox"<br />
}}<br />
<br />
{{hc|<br />
# iptables -nvL --line-numbers<br />
|<br />
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
1 0 0 ACCEPT tcp -- * * 10.0.0.85 0.0.0.0/0 tcp dpt:17500 /* Friendly Dropbox */<br />
2 0 0 REJECT tcp -- * * !10.0.0.85 0.0.0.0/0 tcp dpt:17500 reject-with icmp-port-unreachable<br />
<br />
Chain FORWARD (policy DROP 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
<br />
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
}}<br />
<br />
And replace our second rule with one that rejects everything on port {{ic|17500}}:<br />
<br />
# iptables -R INPUT 2 -p tcp --dport 17500 -j REJECT --reject-with icmp-port-unreachable<br />
<br />
Our final rule list now looks like this:<br />
<br />
{{hc|<br />
# iptables -nvL --line-numbers<br />
|<br />
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
1 0 0 ACCEPT tcp -- * * 10.0.0.85 0.0.0.0/0 tcp dpt:17500 /* Friendly Dropbox */<br />
2 0 0 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:17500 reject-with icmp-port-unreachable<br />
<br />
Chain FORWARD (policy DROP 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
<br />
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
}}<br />
<br />
=== Configuration file ===<br />
<br />
Iptables rules are, by default in Arch Linux, stored in {{ic|/etc/iptables/iptables.rules}}. They are, however, not loaded automatically, instead you can enable the {{ic|iptables.service}} which reads this file and loads the rules at boot or when started:<br />
<br />
# systemctl enable iptables<br />
# systemctl start iptables<br />
<br />
Iptables rules for IPv6 are, by default, stored in {{ic|/etc/iptables/ip6tables.rules}}, this file is read by {{ic|ip6tables.service}}. You can start it the same way as above.<br />
<br />
After adding rules via command-line, the configuration file is not changed automatically &mdash; you have to save it manually:<br />
<br />
# iptables-save > /etc/iptables/iptables.rules<br />
<br />
If you edit the configuration file manually, you have to reload it:<br />
<br />
# systemctl reload iptables<br />
<br />
Or you can load it directly through iptables:<br />
<br />
# iptables-restore < /etc/iptables/iptables.rules<br />
<br />
=== Guides ===<br />
<br />
* [[Simple stateful firewall]]<br />
* [[Router]]<br />
<br />
== Logging ==<br />
<br />
The {{ic|LOG}} target can be used to log packets that hit a rule. Unlike other targets like {{ic|ACCEPT}} or {{ic|DROP}}, the packet will continue moving through the chain after hitting a {{ic|LOG}} target. This means that in order to enable logging for all dropped packets, you would have to add a duplicate {{ic|LOG}} rule before each DROP rule. Since this reduces efficiency and makes things less simple, a {{ic|logdrop}} chain can be created instead.<br />
<br />
Create the chain with:<br />
<br />
# iptables -N logdrop<br />
<br />
And add the following rules to the newly created chain:<br />
<br />
# iptables -A logdrop -m limit --limit 5/m --limit-burst 10 -j LOG<br />
# iptables -A logdrop -j DROP<br />
<br />
Explanation for {{ic|limit}} and {{ic|limit-burst}} options is given [[#Limiting log rate|below]].<br />
<br />
Now whenever we want to drop a packet and log this event, we just jump to the {{ic|logdrop}} chain, for example:<br />
<br />
# iptables -A INPUT -m conntrack --ctstate INVALID -j logdrop<br />
<br />
=== Limiting log rate ===<br />
<br />
The above {{ic|logdrop}} chain uses the limit module to prevent the ''iptables'' log from growing too large or causing needless hard drive writes. Without limiting an erroneously configured service trying to connect, or an attacker, could fill the drive (or at least the {{ic|/var}} partition) by causing writes to the iptables log.<br />
<br />
The limit module is called with {{ic|-m limit}}. You can then use {{ic|--limit}} to set an average rate and {{ic|--limit-burst}} to set an initial burst rate. In the {{ic|logdrop}} example above:<br />
<br />
iptables -A logdrop -m limit --limit 5/m --limit-burst 10 -j LOG<br />
<br />
appends a rule which will log all packets that pass through it. The first 10 consecutive packets will be logged, and from then on only 5 packets per minute will be logged. The "limit burst" count is reset every time the "limit rate" is not broken, i.e. logging activity returns to normal automatically.<br />
<br />
=== Viewing logged packets ===<br />
<br />
Logged packets are visible as kernel messages in the [[systemd#Journal|systemd journal]].<br />
<br />
To view all packets that were logged since the machine was last booted:<br />
# journalctl -k | grep "IN=.*OUT=.*" | less<br />
<br />
=== syslog-ng ===<br />
<br />
Assuming you are using [[syslog-ng]], you can control where iptables' log output goes this way:<br />
filter f_everything { level(debug..emerg) and not facility(auth, authpriv); };<br />
to<br />
filter f_everything { level(debug..emerg) and not facility(auth, authpriv) and not filter(f_iptables); };<br />
<br />
This will stop logging iptables output to {{ic|/var/log/everything.log}}.<br />
<br />
If you also want iptables to log to a different file than {{ic|/var/log/iptables.log}}, you can simply change the file value of destination {{ic|d_iptables}} here (still in {{ic|syslog-ng.conf}})<br />
destination d_iptables { file("/var/log/iptables.log"); };<br />
<br />
=== ulogd ===<br />
<br />
[http://www.netfilter.org/projects/ulogd/index.html ulogd] is a specialized userspace packet logging daemon for netfilter that can replace the default {{ic|LOG}} target. The package {{Pkg|ulogd}} is available in the {{ic|[community]}} repository.<br />
<br />
== See also ==<br />
* [[Wikipedia:iptables|Wikipedia article]]<br />
* [[Port Knocking]]<br />
* [http://www.netfilter.org/projects/iptables/index.html Official iptables web site]<br />
* [http://www.frozentux.net/iptables-tutorial/iptables-tutorial.html iptables Tutorial 1.2.2] by Oskar Andreasson<br />
* [http://wiki.debian.org/iptables iptables Debian] Debian wiki</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Iptables_(%CE%95%CE%BB%CE%BB%CE%B7%CE%BD%CE%B9%CE%BA%CE%AC)&diff=341439Iptables (Ελληνικά)2014-10-24T08:32:47Z<p>Sudowoodo: /* Chains */ Μεταφραση.</p>
<hr />
<div>{{Translateme (Ελληνικά)|Η σελίδα βρίσκεται σε διαδικασία μετάφρασης}}<br />
{{Lowercase title}}<br />
[[Category:Firewalls]]<br />
[[en:Iptables]]<br />
[[es:Iptables]]<br />
[[fr:Iptables]]<br />
[[it:Iptables]]<br />
[[ja:Iptables]]<br />
[[ru:Iptables]]<br />
[[sr:Iptables]]<br />
[[zh-CN:Iptables]]<br />
{{Related articles start (Ελληνικά)}}<br />
{{Related|Firewalls}}<br />
{{Related|Simple stateful firewall}}<br />
{{Related|Sysctl#TCP/IP stack hardening}}<br />
{{Related|Sshguard}}<br />
{{Related|Fail2ban}}<br />
{{Related|Nftables}}<br />
{{Related articles end}}<br />
<br />
Το ''iptables'' είναι ένα εργαλείο γραμμής εντολών για τη ρύθμιση του [[firewall]] του Linux kernel, υλοποιημένο μέσα στο [[Wikipedia:Netfilter|Netfilter]] project. Ο όρος ''iptables'' χρησιμοποιείται επίσης συχνά όταν αναφερόμαστε στο firewall σε επίπεδο kernel. Μπορεί να παραμετροποιηθεί κατ' ευθείαν με το ''iptables'', ή χρησιμοποιώντας ένα από τα πολλά [[Firewalls#Console frontends|frontends]] και [[Firewalls#Graphic frontends|GUIs]]. Το ''iptables'' χρησιμοποιείται για το [[Wikipedia:IPv4|IPv4]] και το ''ip6tables'' για το [[IPv6]].<br />
<br />
Το [[nftables]] βγήκε με [http://www.phoronix.com/scan.php?page=news_item&px=MTQ5MDU την έκδοση του Linux kernel 3.13], και θα αντικαταστήσει μια μέρα το iptables ως το κύριο εργαλείο του Linux firewall.<br />
<br />
== Εγκατάσταση ==<br />
<br />
Ο stock πυρήνας του Arch Linux είναι compiled με την υποστήριξη του iptables. Θα χρειαστείτε μόνο να [[pacman|εγκαταστήσετε]] τα userland εργαλεία, τα οποία παρέχονται με το πακέτο {{Pkg|iptables}} στα [[official repositories]]. (Το πακέτο {{Pkg|iproute2}} από το {{Grp|base}} group έχει ως εξάρτηση το iptables, οπότε το πακέτο iptables θα πρέπει να είναι εγκατεστημένο στο σύστημά σας by default.)<br />
<br />
== Βασικές έννοιες ==<br />
<br />
Το iptables χρησιμοποιείται για να επιθεωρήσει, τρποποποιήσει, προωθήσει, ανακατευθύνει και/ή απορρίψει IPv4 πακέτα. Ο κώδικας για το φιλτράρισμα των IPv4 πακέτων είναι ήδη ενσωματωμένος στον πυρήνα και οργανώνεται σε μία συλλογή από πίνακες(''tables''), ο καθένας με ένα συγκεκριμένο σκοπό. Οι πίνακες είναι φτιαγμένοι από ένα σύνολο προκαθορισμένων αλυσίδων(''chains''), και οι αλυσίδες περιέχουν κανόνες οι οποίοι διασχίζονται κατά σειρά. Κάθε κανόνας αποτελείται από ένα κατηγόρημα με πιθανά matches και μία αντίστοιχη δράση (που ονομάζεται στόχος(''target'')) η οποία εκτελείται αν το κατηγόρημα είναι αληθές, πχ. οι καταστάσεις ταιριάζουν. Το iptables είναι το εργαλείο του χρήστη που σου επιτρέπει να δουλέψεις με αυτές τις αλυσίδες/κανόνες. Οι περισσότεροι νέοι χρήστες βρίσκουν την πολυπλοκότητα του linux IP routing αρκετά τρομακτική, αλλά στην εφαρμογή, οι πιο συχνές περιπτώσεις χρήσης (NAT και/ή βασικό Internet firewall) είναι πολύ λιγότερο περίπλοκες.<br />
<br />
Το κλειδί για να καταλάβει κανείς πως δουλέυει το iptables, είναι [http://www.frozentux.net/iptables-tutorial/images/tables_traverse.jpg αυτό το διάγραμμα]. Η λέξη με πεζά στην κορυφή είναι ο πίνακας και η λέξη με κεφαλαία από κάτω είναι η αλυσίδα. Κάθε IP πακέτο το οποίο εισέρχεται ''σε οποιοδήποτε network interface'' περνάει μέσω αυτού του διαγράμματος από πάνω προς τα κάτω. Μία συχνή πηγή σύγχυσης είναι ότι τα πακέτα τα οποία εισέρχονται, πχ. από ένα internal interface, διαχειρίζονται διαφορετικά από αυτά τα οποία εισέρχονται από ένα interface που βγαίνει στο Internet. Όλα τα interfaces διαχειρίζονται το ίδιο. Εξαρτάται από το χρήστη να ορίσει κανόνες που συμπεριφέρονται διαφορετικά. Φυσικά, κάποια πακέτα προορίζονται για τοπκικές διεργασίες (local processes), ως εκ τούτου έρχονται από την κορυφή του διαγράμματος και σταματούν στο <Local Process>, ενώ άλλα πακέτα δημιουργούνται από τοπικές διεργασίες τα οποία ξεκινούν από το <Local Process> και προχωρούν προς τα κάτω δια μέσου του διαγράμματος. Μία λεπτομερής εξήγηση του πώς δουλεύει αυτό το διάγραμμα μπορεί να βρεθεί [http://www.frozentux.net/iptables-tutorial/iptables-tutorial.html#TRAVERSINGOFTABLES εδώ].<br />
<br />
Στην πλειοψηφία των περιπτώσεων δε θα χρειαστεί να χρησιμοποιήσετε τους πίνακες '''raw''', '''mangle''', ή '''security''' καθόλου. Έτσι, το ακόλουθο διάγραμμα απεικονίζει μία απλοποιημένη ροή πακέτων του δικτύου μέσω του ''iptables'':<br />
<br />
{{bc|<nowiki><br />
XXXXXXXXXXXXXXXXXX<br />
XXX Network XXX<br />
XXXXXXXXXXXXXXXXXX<br />
+<br />
|<br />
v<br />
+-------------+ +------------------+<br />
|table: filter| <---+ | table: nat |<br />
|chain: INPUT | | | chain: PREROUTING|<br />
+-----+-------+ | +--------+---------+<br />
| | |<br />
v | v<br />
[local process] | **************** +--------------+<br />
| +---------+ Routing decision +------> |table: filter |<br />
v **************** |chain: FORWARD|<br />
**************** +------+-------+<br />
Routing decision |<br />
**************** |<br />
| |<br />
v **************** |<br />
+-------------+ +------> Routing decision <---------------+<br />
|table: nat | | ****************<br />
|chain: OUTPUT| | +<br />
+-----+-------+ | |<br />
| | v<br />
v | +-------------------+<br />
+--------------+ | | table: nat |<br />
|table: filter | +----+ | chain: POSTROUTING|<br />
|chain: OUTPUT | +--------+----------+<br />
+--------------+ |<br />
v<br />
XXXXXXXXXXXXXXXXXX<br />
XXX Network XXX<br />
XXXXXXXXXXXXXXXXXX<br />
</nowiki>}}<br />
<br />
=== Πίνακες ===<br />
<br />
Το iptables περιέχει πεντε πίνακες:<br />
<br />
# {{ic|raw}} χρησιμοποιείται μόνο για τη ρύθμιση πακέτων έτσι ώστε να εξαιρούνται από την παρακολούθηση της σύνδεσης.<br />
# {{ic|filter}} είναι ο default πίνακας, και είναι εκεί όπου λαμβάνουν μέρος όλες οι δράσεις που συνήθως συνδέονται με ένα firewall.<br />
# {{ic|nat}} χρησιμοποιείται για το [[Wikipedia:Network address translation|network address translation]] (πχ. port forwarding).<br />
# {{ic|mangle}} χρησιμοποιείται για ειδικές μετατροπές πακέτων (δείτε το [[Wikipedia:Mangled packet|Mangled packet]]).<br />
# {{ic|security}} χρησιμοποιείται για [[Security#Mandatory access control|Mandatory Access Control]] κανόνες δικτύου (πχ. SELinux -- δείτε [http://lwn.net/Articles/267140/ αυτό το άρθρο] για περισσότερες λεπτομέρειες).<br />
<br />
Στις περισσότερες περιπτώσεις θα χρησιμοποιήσετε μόνο δύο από αυτούς: '''filter''' και '''nat'''. Οι άλλοι πίνακες στοχεύουν σε πολύπλοκες ρυθμίσεις που περιλαμβάνουν πολλαπλά routers και routing αποφάσεις και είναι είναι πέρα από το πεδίο αυτών των εισαγωγικών παρατηρήσεων.<br />
<br />
=== Αλυσίδες ===<br />
<br />
Οι πίνακες αποτελούνται από ''αλυσίδες'', λίστες κανόνων που ακολουθούνται διαδοχικά. O προεπιλεγμένος πίνακας, ο {{ic|filter}}, περιέχει τρεις ενσωματομένες αλυσίδες: τη {{ic|INPUT}}, τη {{ic|OUTPUT}} και τη {{ic|FORWARD}}, που ενεργοποιούνται κατά διαφορετικές στιγμές της διαδικασίας φιλτραρίσματος πακέτων, όπως υποδικνύει το [http://www.frozentux.net/iptables-tutorial/chunkyhtml/images/tables_traverse.jpg διάγραμμα]. Ο πίνακας {{ic|nat}} περιέχει τις αλυσίδες {{ic|PREROUTING}}, {{ic|POSTROUTING}}, και {{ic|OUTPUT}}.<br />
<br />
Δείτε μια περιγραφή των ενσωματομένων αλυσιδών σε άλλους πίνακες στο {{ic|man 8 iptables}}.<br />
<br />
Αρχικά, καμία αλυσίδα δεν περιέχει κανόνες. Ο χρήστης γράφει κανόνες στις επιθυμιτές του αλυσίδες, οι οποίες ''έχουν'' μια προεπιλεγμένη πολιτική, συνήθως ρυθμισμένη στο {{ic|ACCEPT}}, η οποία μπορεί να επαναφερθεί στο {{ic|DROP}} ώστε να εξασφαλιστεί ότι τίποτα δεν ξεφέυγει από το σύνολο κανόνων. Η προεπιλεγμένη πολιτική πάντοτε εφαρμόζεται στο τέλος, μόνο, της κάθε αλυσίδας, και έτσι το πακέτο πρέπει να περάσει από όλους τους υπάρχοντες κανόνες στην αλυσίδα προτού αυτή να εφαρμοστεί.<br />
<br />
Προσθέτοντας αλυσίδες που καθορίζονται απο το χρήστη, τα σύνολα κανόνων είναι πιο αποτελεσματικά ή τροποποιούνται ευκολότερα. Δείτε το [[Simple stateful firewall]] για ένα παράδειγμα της χρήσης τους.<br />
<br />
=== Rules ===<br />
<br />
Packet filtering is based on ''rules'', which are specified by multiple ''matches'' (conditions the packet must satisfy so that the rule can be applied), and one ''target'' (action taken when the packet matches all conditions). The typical things a rule might match on are what interface the packet came in on (e.g eth0 or eth1), what type of packet it is (ICMP, TCP, or UDP), or the destination port of the packet.<br />
<br />
Targets are specified using the {{ic|-j}} or {{ic|--jump}} option. Targets can be either user-defined chains (i.e. if these conditions are matched, jump to the following user-defined chain and continue processing there), one of the special built-in targets, or a target extension. Built-in targets are {{ic|ACCEPT}}, {{ic|DROP}}, {{ic|QUEUE}} and {{ic|RETURN}}, target extensions are, for example, {{ic|REJECT}} and {{ic|LOG}}. If the target is a built-in target, the fate of the packet is decided immediately and processing of the packet in current table is stopped. If the target is a user-defined chain and the packet passes successfully through this second chain, it will move to the next rule in the original chain. Target extensions can be either ''terminating'' (as built-in targets) or ''non-terminating'' (as user-defined chains), see {{ic|man 8 iptables-extensions}} for details.<br />
<br />
=== Traversing Chains ===<br />
<br />
A network packet received on any interface traverses the traffic control chains of tables in the order shown in the [http://www.frozentux.net/iptables-tutorial/chunkyhtml/images/tables_traverse.jpg flow chart]. The first routing decision involves deciding if the final destination of the packet is the local machine (in which case the packet traverses through the {{ic|INPUT}} chains) or elsewhere (in which case the packet traverses through the {{ic|FORWARD}} chains). Subsequent routing decisions involve deciding what interface to assign to an outgoing packet. At each chain in the path, every rule in that chain is evaluated in order and whenever a rule matches, the corresponding target/jump action is executed. The 3 most commonly used targets are {{ic|ACCEPT}}, {{ic|DROP}}, and jump to a user-defined chain. While built-in chains can have default policies, user-defined chains can not. If every rule in a chain that you jumped fails to provide a complete match, the packet is dropped back into the calling chain as illustrated [http://www.frozentux.net/iptables-tutorial/images/table_subtraverse.jpg here]. If at any time a complete match is achieved for a rule with a {{ic|DROP}} target, the packet is dropped and no further processing is done. If a packet is {{ic|ACCEPT}}ed within a chain, it will be {{ic|ACCEPT}}ed in all superset chains also and it will not traverse any of the superset chains any further. However, be aware that the packet will continue to traverse all other chains in other tables in the normal fashion.<br />
<br />
=== Modules ===<br />
<br />
There are many modules which can be used to extend iptables such as connlimit, conntrack, limit and recent. These modules add extra functionality to allow complex filtering rules.<br />
<br />
== Configuring and Running iptables ==<br />
<br />
iptables is a [[Systemd]] service and is started accordingly:<br />
<br />
# systemctl start iptables<br />
<br />
However, the service won't start unless it finds an {{ic|/etc/iptables/iptables.rules}} file, and the Arch {{Pkg|iptables}} package does not come with a default iptables.rule file. So to start the service for the first time:<br />
<br />
# touch /etc/iptables/iptables.rules<br />
# systemctl start iptables<br />
<br />
or<br />
<br />
# cp /etc/iptables/empty.rules /etc/iptables/iptables.rules<br />
# systemctl start iptables<br />
<br />
As with other services, if you want iptables to be loaded automatically on boot, you must enable it:<br />
<br />
# systemctl enable iptables<br />
<br />
=== From the command line ===<br />
<br />
<br />
==== Showing the current rules ====<br />
<br />
You can check the current ruleset and the number of hits per rule by using the command:<br />
<br />
{{hc|# iptables -nvL|Chain INPUT (policy ACCEPT 0 packets, 0 bytes)<br />
pkts bytes target prot opt in out source destination<br />
<br />
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)<br />
pkts bytes target prot opt in out source destination<br />
<br />
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)<br />
pkts bytes target prot opt in out source destination}}<br />
<br />
If the output looks like the above, then there are no rules. Nothing is blocked.<br />
<br />
To show the line numbers when listing rules, append {{ic|--line-numbers}} to that input. This is useful when deleting and adding individual rules.<br />
<br />
==== Resetting rules ====<br />
<br />
You can flush and reset iptables to default using these commands:<br />
<br />
# iptables -F<br />
# iptables -X<br />
# iptables -t nat -F<br />
# iptables -t nat -X<br />
# iptables -t mangle -F<br />
# iptables -t mangle -X<br />
# iptables -t raw -F<br />
# iptables -t raw -X<br />
# iptables -t security -F<br />
# iptables -t security -X<br />
# iptables -P INPUT ACCEPT<br />
# iptables -P FORWARD ACCEPT<br />
# iptables -P OUTPUT ACCEPT<br />
<br />
The {{ic|-F}} command with no arguments flushes all the chains in its current table. Similarly, {{ic|-X}} deletes all empty non-default chains in a table.<br />
<br />
Individual chains may be flushed or deleted by following {{ic|-F}} and {{ic|-X}} with a {{ic|[chain]}} argument.<br />
<br />
==== Editing rules ====<br />
<br />
Rules can be added either by appending a rule to a chain or inserting them at a specific position on the chain. We will explore both methods here.<br />
<br />
First of all, our computer is not a router (unless, of course, it [[Router|is a router]]). We want to change the default policy on the {{ic|FORWARD}} chain from {{ic|ACCEPT}} to {{ic|DROP}}.<br />
<br />
{{bc|<br />
# iptables -P FORWARD DROP<br />
}}<br />
<br />
{{warning|The rest of this section is meant to teach the syntax and concepts behind iptables rules. It is not intended as a means for securing servers. For improving the security of your system, see [[Simple stateful firewall]] for a minimally secure iptables configuration and [[Security]] for hardening Arch Linux in general.}}<br />
<br />
The [[Wikipedia:Dropbox (service)|Dropbox]] LAN sync feature [https://isc.sans.edu/port.html?port=17500 broadcasts packets every 30 seconds] to all computers it can see. If we happen to be on a LAN with Dropbox clients and do not use this feature, then we might wish to reject those packets.<br />
<br />
{{bc|<br />
# iptables -A INPUT -p tcp --dport 17500 -j REJECT --reject-with icmp-port-unreachable<br />
}}<br />
<br />
{{hc|<br />
# iptables -nvL --line-numbers<br />
|<br />
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
1 0 0 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:17500 reject-with icmp-port-unreachable<br />
<br />
Chain FORWARD (policy DROP 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
<br />
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
<br />
}}<br />
{{note|We use {{ic|REJECT}} rather than {{ic|DROP}} here, because [https://tools.ietf.org/html/rfc1122#page-69 RFC 1122 3.3.8] requires hosts return ICMP errors whenever possible, instead of dropping packets. In reality, it is best to {{ic|REJECT}} packets from hosts who should know about your server's existence, and {{ic|DROP}} packets from hosts who should not even know your server exists, or those who appear "up to something".}}<br />
<br />
Now, say we change our mind about Dropbox and decide to install it on our computer. We also want to LAN sync, but only with one particular IP on our network. So we should use {{ic|-R}} to replace our old rule. Where {{ic|10.0.0.85}} is our other IP:<br />
<br />
{{bc|<br />
# iptables -R INPUT 1 -p tcp --dport 17500 ! -s 10.0.0.85 -j REJECT --reject-with icmp-port-unreachable<br />
}}<br />
<br />
{{hc|<br />
# iptables -nvL --line-numbers<br />
|<br />
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
1 0 0 REJECT tcp -- * * !10.0.0.85 0.0.0.0/0 tcp dpt:17500 reject-with icmp-port-unreachable<br />
<br />
Chain FORWARD (policy DROP 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
<br />
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
}}<br />
<br />
We have now replaced our original rule with one that allows {{ic|10.0.0.85}} to access port {{ic|17500}} on our computer. But now we realize that this is not scalable. If our friendly Dropbox user is attempting to access port {{ic|17500}} on our device, we should allow him immediately, not test him against any firewall rules that might come afterwards!<br />
<br />
So we write a new rule to allow our trusted user immediately. Using {{ic|-I}} to insert the new rule before our old one:<br />
<br />
{{bc|<br />
# iptables -I INPUT -p tcp --dport 17500 -s 10.0.0.85 -j ACCEPT -m comment --comment "Friendly Dropbox"<br />
}}<br />
<br />
{{hc|<br />
# iptables -nvL --line-numbers<br />
|<br />
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
1 0 0 ACCEPT tcp -- * * 10.0.0.85 0.0.0.0/0 tcp dpt:17500 /* Friendly Dropbox */<br />
2 0 0 REJECT tcp -- * * !10.0.0.85 0.0.0.0/0 tcp dpt:17500 reject-with icmp-port-unreachable<br />
<br />
Chain FORWARD (policy DROP 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
<br />
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
}}<br />
<br />
And replace our second rule with one that rejects everything on port {{ic|17500}}:<br />
<br />
# iptables -R INPUT 2 -p tcp --dport 17500 -j REJECT --reject-with icmp-port-unreachable<br />
<br />
Our final rule list now looks like this:<br />
<br />
{{hc|<br />
# iptables -nvL --line-numbers<br />
|<br />
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
1 0 0 ACCEPT tcp -- * * 10.0.0.85 0.0.0.0/0 tcp dpt:17500 /* Friendly Dropbox */<br />
2 0 0 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:17500 reject-with icmp-port-unreachable<br />
<br />
Chain FORWARD (policy DROP 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
<br />
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)<br />
num pkts bytes target prot opt in out source destination<br />
}}<br />
<br />
=== Configuration file ===<br />
<br />
Iptables rules are, by default in Arch Linux, stored in {{ic|/etc/iptables/iptables.rules}}. They are, however, not loaded automatically, instead you can enable the {{ic|iptables.service}} which reads this file and loads the rules at boot or when started:<br />
<br />
# systemctl enable iptables<br />
# systemctl start iptables<br />
<br />
Iptables rules for IPv6 are, by default, stored in {{ic|/etc/iptables/ip6tables.rules}}, this file is read by {{ic|ip6tables.service}}. You can start it the same way as above.<br />
<br />
After adding rules via command-line, the configuration file is not changed automatically &mdash; you have to save it manually:<br />
<br />
# iptables-save > /etc/iptables/iptables.rules<br />
<br />
If you edit the configuration file manually, you have to reload it:<br />
<br />
# systemctl reload iptables<br />
<br />
Or you can load it directly through iptables:<br />
<br />
# iptables-restore < /etc/iptables/iptables.rules<br />
<br />
=== Guides ===<br />
<br />
* [[Simple stateful firewall]]<br />
* [[Router]]<br />
<br />
== Logging ==<br />
<br />
The {{ic|LOG}} target can be used to log packets that hit a rule. Unlike other targets like {{ic|ACCEPT}} or {{ic|DROP}}, the packet will continue moving through the chain after hitting a {{ic|LOG}} target. This means that in order to enable logging for all dropped packets, you would have to add a duplicate {{ic|LOG}} rule before each DROP rule. Since this reduces efficiency and makes things less simple, a {{ic|logdrop}} chain can be created instead.<br />
<br />
Create the chain with:<br />
<br />
# iptables -N logdrop<br />
<br />
And add the following rules to the newly created chain:<br />
<br />
# iptables -A logdrop -m limit --limit 5/m --limit-burst 10 -j LOG<br />
# iptables -A logdrop -j DROP<br />
<br />
Explanation for {{ic|limit}} and {{ic|limit-burst}} options is given [[#Limiting log rate|below]].<br />
<br />
Now whenever we want to drop a packet and log this event, we just jump to the {{ic|logdrop}} chain, for example:<br />
<br />
# iptables -A INPUT -m conntrack --ctstate INVALID -j logdrop<br />
<br />
=== Limiting log rate ===<br />
<br />
The above {{ic|logdrop}} chain uses the limit module to prevent the ''iptables'' log from growing too large or causing needless hard drive writes. Without limiting an erroneously configured service trying to connect, or an attacker, could fill the drive (or at least the {{ic|/var}} partition) by causing writes to the iptables log.<br />
<br />
The limit module is called with {{ic|-m limit}}. You can then use {{ic|--limit}} to set an average rate and {{ic|--limit-burst}} to set an initial burst rate. In the {{ic|logdrop}} example above:<br />
<br />
iptables -A logdrop -m limit --limit 5/m --limit-burst 10 -j LOG<br />
<br />
appends a rule which will log all packets that pass through it. The first 10 consecutive packets will be logged, and from then on only 5 packets per minute will be logged. The "limit burst" count is reset every time the "limit rate" is not broken, i.e. logging activity returns to normal automatically.<br />
<br />
=== Viewing logged packets ===<br />
<br />
Logged packets are visible as kernel messages in the [[systemd#Journal|systemd journal]].<br />
<br />
To view all packets that were logged since the machine was last booted:<br />
# journalctl -k | grep "IN=.*OUT=.*" | less<br />
<br />
=== syslog-ng ===<br />
<br />
Assuming you are using [[syslog-ng]], you can control where iptables' log output goes this way:<br />
filter f_everything { level(debug..emerg) and not facility(auth, authpriv); };<br />
to<br />
filter f_everything { level(debug..emerg) and not facility(auth, authpriv) and not filter(f_iptables); };<br />
<br />
This will stop logging iptables output to {{ic|/var/log/everything.log}}.<br />
<br />
If you also want iptables to log to a different file than {{ic|/var/log/iptables.log}}, you can simply change the file value of destination {{ic|d_iptables}} here (still in {{ic|syslog-ng.conf}})<br />
destination d_iptables { file("/var/log/iptables.log"); };<br />
<br />
=== ulogd ===<br />
<br />
[http://www.netfilter.org/projects/ulogd/index.html ulogd] is a specialized userspace packet logging daemon for netfilter that can replace the default {{ic|LOG}} target. The package {{Pkg|ulogd}} is available in the {{ic|[community]}} repository.<br />
<br />
== See also ==<br />
* [[Wikipedia:iptables|Wikipedia article]]<br />
* [[Port Knocking]]<br />
* [http://www.netfilter.org/projects/iptables/index.html Official iptables web site]<br />
* [http://www.frozentux.net/iptables-tutorial/iptables-tutorial.html iptables Tutorial 1.2.2] by Oskar Andreasson<br />
* [http://wiki.debian.org/iptables iptables Debian] Debian wiki</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=User:Sudowoodo&diff=341044User:Sudowoodo2014-10-21T13:41:31Z<p>Sudowoodo: That package was deleted ages ago.</p>
<hr />
<div>{{Note|I will be studying a lot, from now on, so I won't be very active.}}<br />
♨ Member of the [[ArchWiki Translation Team (Ελληνικά)|Greek Arch Wiki Translation Team]] :-)<br />
----<br />
Pages I created:<br />
*[[Dolphin emulator]]<br />
*[https://wiki.archlinux.org/index.php/Template:Poor_writing_%28%CE%95%CE%BB%CE%BB%CE%B7%CE%BD%CE%B9%CE%BA%CE%AC%29 Poor writing (Ελληνικά)] (External link)<br />
----<br />
Pages I have contributed to:<br />
*[[RetroArch]]<br />
*[[VBA-M]]<br />
----<br />
Some pages I like:<br />
*[[Arch compared to other distributions]]<br />
*[[The Arch Way]]<br />
*[[Arch is the best]]<br />
*[[Time]]<br />
*[[USB flash installation media]]<br />
----<br />
My current target(s):<br />
*Nothing particular for now.<br />
----<br />
[https://aur.archlinux.org/packages/?SeB=m&K=Sudowoodo AUR Packages I maintain:]<br />
*{{AUR|m64py}}<br />
*{{AUR|iptux}}<br />
*{{AUR|gnome-paint}}<br />
----<br />
Contact:<br />
*[[Special:EmailUser/Sudowoodo|Email]]<br />
----<br />
<br />
{{ic|- - - - - C o o o o}}</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Timidity%2B%2B&diff=340764Timidity++2014-10-19T14:51:05Z<p>Sudowoodo: /* SoundFonts */ copyedit</p>
<hr />
<div>[[Category:Audio/Video]]<br />
[[ja:Timidity]]<br />
TiMidity++ is a [[Wikipedia:software synthesizer|software synthesizer]] that can play MIDI files without a hardware synthesizer. It can either render to the sound card in real time, or it can save the result to a file, such as a PCM .wav file.<br />
<br />
== Installation ==<br />
<br />
[[Pacman|Install]] the {{Pkg|timidity++}} package from the [[official repositories]].<br />
<br />
You should also install a [[Wikipedia:SoundFont|SoundFont]] to be able to produce sound. Here is a list of SoundFonts:<br />
* {{Pkg|timidity-freepats}} from the [[official repositories]].<br />
* {{AUR|soundfont-fluid}} from the [[AUR]]<br />
<br />
== Configuration ==<br />
<br />
First you should add yourself to the audio group.<br />
<br />
# gpasswd -a <user> audio<br />
<br />
=== SoundFonts ===<br />
<br />
Configure your preffered SoundFont.<br />
<br />
==== Freepats ====<br />
<br />
The [http://freepats.zenvoid.org/ Freepats] project provides a set of instrument samples which are compatible with TiMidity++. <br />
<br />
To use Freepats with TiMidity, add the following lines to {{ic|timidity.cfg}}:<br />
<br />
{{hc|/etc/timidity++/timidity.cfg|<br />
dir /usr/share/timidity/freepats<br />
source /etc/timidity++/freepats/freepats.cfg<br />
}}<br />
<br />
==== Fluidr3 ====<br />
<br />
There are other SoundFonts available. To install the {{AUR|soundfont-fluid}} SoundFont, append its path to the TiMidity++ configuration file:<br />
<br />
{{hc|/etc/timidity++/timidity.cfg|<br />
soundfont /usr/share/soundfonts/FluidR3_GM2-2.sf2<br />
}}<br />
<br />
=== Daemon ===<br />
<br />
Start and configure to autostart the {{ic|timidity.service}}. Read [[Daemons]] for more details.<br />
<br />
If you are using [[PulseAudio]], that may not work. You may want to add the following command as an auto start program in your desktop environment. Or, if you just want to start TiMidity++ in daemon mode once, you can use the following command which will make console output viewable:<br />
<br />
$ timidity -iA<br />
<br />
You can also use [[Systemd/User]] to write an user TiMidity++ service. To do so, write a {{ic|timidity.service}} file in {{ic|/etc/systemd/user/}} like that one :<br />
<br />
{{hc|/etc/systemd/user/timidity.service|<nowiki>[Unit]<br />
Description=TiMidity++ Daemon<br />
After=sound.target<br />
<br />
[Service]<br />
ExecStart=/usr/bin/timidity -iA -Os<br />
<br />
[Install]<br />
WantedBy=default.target</nowiki><br />
}}<br />
<br />
And enable the service for any user with {{ic|sudo systemctl --global enable timidity.service}}.<br />
<br />
Timidity++ will be executed automatically on a per-user basis when the users log in.<br />
<br />
== Usage ==<br />
<br />
=== Play files ===<br />
<br />
There are two ways to use TiMidity++. Either as MIDI player or as daemon adding MIDI support to [[ALSA]].<br />
<br />
==== Standalone mode ====<br />
<br />
You can simply use TiMidity++ to play MIDI files:<br />
$ timidity example.midi<br />
<br />
Add option {{ic|-in}} or {{ic|-ig}} for a text-based/gtk+ interface. E.g. as a Xfce/GNOME user you may want to set MIDI files to open with the custom command {{ic|timidity -ig}}. There are many other options to TiMidity++. See {{ic|man timidity}} or use {{ic|-h}} to get help.<br />
<br />
The GTK+ interface offers such features as a playlist, track length estimates, volume control, a file load dialog box, play and pause buttons, rewind and fast forward buttons, as well as options to change the pitch of or speed up or slow down the playback of a midi file.<br />
<br />
==== Daemon mode ====<br />
<br />
If you are runing TiMidity++ as a [[#Daemon|daemon]] (ALSA sequencer client), it will provide MIDI output support for other programs such as rosegarden, aplaymidi, vkeybd, etc.<br />
<br />
This will give you four output software MIDI ports (in addition of hardware MIDI ports on your system, if any):<br />
{{hc|$ aconnect -o|2=<br />
client 128: 'TiMidity' [type=user]<br />
0 'TiMidity port 0 '<br />
1 'TiMidity port 1 '<br />
2 'TiMidity port 2 '<br />
3 'TiMidity port 3 '<br />
}}<br />
<br />
You can now play MIDI files using aplaymidi:<br />
<br />
$ aplaymidi filename.mid --port 128:0<br />
<br />
Another example is '''vkeybd''', a virtual MIDI keyboard for X.<br />
<br />
You can [[Pacman|install]] {{AUR|vkeybd}} from the [[AUR]].<br />
<br />
$ vkeybd --addr 128:0<br />
<br />
Option {{ic|--addr 128:0}} connects the input (readable) software MIDI port provided by vkeybd to the first output (writable) ALSA port provided by Timidity. Alternatively you can use aconnect, {{AUR|aconnectgui}}, {{Pkg|patchage}} or kaconnect. As a result when you play around with the keys on the vkeybd TiMidity++ plays the appropriate notes.<br />
<br />
==== Connect to virtual MIDI device ====<br />
<br />
Once you have the TiMidity++ daemon running and it is working with aplaymidi, you can connect it to a virtual MIDI device that will work in programs such as rosegarden or scala.<br />
<br />
Load the {{ic|snd-virmidi}} '''kernel module''' and (optionally) configure it to be loaded at boot. Read [[Kernel modules]] for more information.<br />
<br />
Use aconnect to verify the port numbers:<br />
<br />
{{hc|$ aconnect -o|2=<br />
client 14: 'Midi Through' [type=kernel]<br />
0 'Midi Through Port-0'<br />
client 20: 'Virtual Raw MIDI 1-0' [type=kernel]<br />
0 'VirMIDI 1-0 '<br />
client 21: 'Virtual Raw MIDI 1-1' [type=kernel]<br />
0 'VirMIDI 1-1 '<br />
client 22: 'Virtual Raw MIDI 1-2' [type=kernel]<br />
0 'VirMIDI 1-2 '<br />
client 23: 'Virtual Raw MIDI 1-3' [type=kernel]<br />
0 'VirMIDI 1-3 '<br />
client 128: 'TiMidity' [type=user]<br />
0 'TiMidity port 0 '<br />
1 'TiMidity port 1 '<br />
2 'TiMidity port 2 '<br />
3 'TiMidity port 3 '<br />
}}<br />
Now create the connection:<br />
$ aconnect 20:0 128:0<br />
<br />
You should now have a working MIDI output device on your system ({{ic|/dev/snd/midiC1D0}}).<br />
<br />
== Troubleshooting ==<br />
<br />
=== TiMidity++ does not play MIDI files ===<br />
<br />
It may be that your SoundFile is not set up correctly. Just run:<br />
$ timidity example.midi<br />
<br />
If you find a line like this in the terminal output, your SoundFile is not set up properly.<br />
<br />
No instrument mapped to tone bank 0, program XX - \<br />
this instrument will not be heard<br />
<br />
Make sure you've installed some samples and your SoundFile is added to {{ic|/etc/timidity++/timidity.cfg}}. See [[#Soundfonts|SoundFonts]] for more details.<br />
<br />
=== Daemon mode won't start ===<br />
<br />
First, make sure you are in the '''audio''' group. If not, add yourself to it:<br />
<br />
# gpasswd audio -a ''username''<br />
<br />
After group change, you should re-login.<br />
<br />
If you are using [[PulseAudio]], instead of [[Daemons|enabling]] the {{ic|timidity.service}}, start TiMidity++ as an user:<br />
<br />
$ timidity -iA -OO<br />
<br />
If you want to run TiMidity++ in background, do not use TiMidity++'s daemonize option, append {{ic|&}} instead.<br />
<br />
=== Daemon mode plays sound out of pace ===<br />
<br />
TiMidity++'s ALSA output module (default) may cause this issue in ALSA server mode. Try another output option, for example, '''libao''':<br />
<br />
$ timidity -iA -OO<br />
<br />
And test it using aplaymidi. If this does not work, you may want to configure [[JACK]] and set TiMidity++'s output to jack.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Convert files ===<br />
<br />
TiMidity++ can also convert MIDI files into other formats. The following command saves the resulting sound to a WAV file:<br />
$ timidity ''input.mid'' -Ow -o ''out.wav''<br />
To convert to another formats, you can use [[FFmpeg]]. This will convert it to mp3:<br />
$ timidity ''input.mid'' -Ow -o - <nowiki>|</nowiki> ffmpeg -i - -acodec libmp3lame -ab 256k ''out.mp3''<br />
<br />
=== How to make DOSBox use TiMidity++ ===<br />
<br />
{{Note|The following method is tested in version DOSBox 0.72}}<br />
<br />
First of all, you need to write a config file. Input the following in DOSBox to create a configuration file:<br />
config -writeconf dosbox.conf<br />
you can replace {{ic|dosbox.conf}} by any name that you want, add a dot in front of it if you want to hide it.<br />
<br />
Make sure you started TiMidity++ as [[#Daemon|daemon]] as the instructions above, use the '''aconnect''' command.<br />
<br />
Edit this configuration file with any editor, go to the section:<br />
{{hc|dosbox.conf|2=<br />
[midi]<br />
mpu401=intelligent<br />
device=default<br />
config=<br />
}}<br />
put the ALSA connection port into the back of ''config='', in default:<br />
config=128:0<br />
<br />
Restart DOSBox within a terminal so you can see its debug messages, by no accident you should see a successful initiation on port 128:0.<br />
<br />
== See also ==<br />
<br />
* [[USB Midi Keyboards]]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Dolphin_emulator&diff=340236Dolphin emulator2014-10-16T11:17:41Z<p>Sudowoodo: Added a note about the transition to Qt.</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Emulators]]<br />
{{Note|Dolphin is [https://dolphin-emu.org/blog/2014/09/30/dolphin-progress-report-september-2014 moving to Qt]. Parts of this article may need to be rewriten soon.}}<br />
Dolphin is a Nintendo Gamecube, Wii and Triforce emulator, currently supporting the x86, AMD64 and ARM architectures. Dolphin is available for Linux, MacOSX (intel-based), MS Windows and Android. It is a free and open source, community-developed project.<br />
Dolphin was the first Gamecube and Wii emulator, and currently the only one capable of playing commercial games.<br />
<br />
== Installation ==<br />
<br />
Install one of the following:<br />
<br />
* {{App|[[Dolphin emu]]|A Gamecube / Wii / Triforce emulator (Recommended)|https://dolphin-emu.org/|{{Pkg|dolphin-emu}}}}<br />
* {{App|Dolphin emu (git)|A Gamecube / Wii / Triforce emulator (development version)|https://github.com/dolphin-emu/dolphin|{{AUR|dolphin-emu-git}}}}<br />
* {{App|Dolphin emu Wayland (git)|A Gamecube / Wii / Triforce emulator with [[Wayland]] support.|https://dolphin-emu.org/|{{AUR|dolphin-emu-wayland-git}}}}<br />
<br />
== Configuration ==<br />
<br />
{{Note|Dolphin is a resource-heavy application, so expect not all games to run properly. See the reason [https://dolphin-emu.org/docs/faq/#why-do-i-need-such-powerful-computer-emulate-old-c here].}}<br />
<br />
While no additional configuration is needed for the emulator to run (it is preconfigured with the default settings), altering the settings can improve performance and graphics alike.<br />
Settings are split to three main sections, ''Config'', ''Graphics'' and ''DSP''.<br />
<br />
=== Config section ===<br />
<br />
On the General tab, check ''Enable Dual Core'' and ''Enable Idle Skipping''. Enabling or not the cheats is a personal choice. Keep in mind that a real man never cheats. The frame limit should be set to "Audio", so that it works with games from all regions. The CPU emulation engine should be left as JIT Recompiler. Only check "Force console as NTSC-J" if intending to play imported Japanese discs.<br />
<br />
All options on the "Interface" tab are personal choices.<br />
<br />
The Audio tab is the DSP section's screen; setting it up now means there will be no need to do it later. See the [[#DSP section|DSP settings paragraph]] below.<br />
<br />
The next two tabs are not very important; the Gamecube tab has settings about connected accessories, such as memory cards, and the only remarkable Wii tab option is the "Aspect Ratio" drop-down list. Set it to either 16:9 or 4:3, depending on the display's [[Wikipedia: Aspect ratio|aspect ratio]].<br />
<br />
On the final tab, "Paths", ISO directories can be set. The directory of game ISOs can also be set by clicking browse from the home screen, but here more options are available, such as ''Search Subfolders''.<br />
<br />
=== Graphics section ===<br />
<br />
On the "General" tab, choose OpenGL from the backend drop-down list. Set the "Display" and "Other" settings to the desired configuration. V-sync is useful, but it can lead to slowdowns. The "render to main window" option improves the experience aesthetically.<br />
<br />
On the "Enhancements" tab are the options that can improve graphics. While they result to great output, they can slow the emulation down to the point of making games unplayable. Choose the best settings possible, as long as speed remains 100%.<br />
<br />
{| class="wikitable"<br />
|+ Comparison of options<br />
!Option !!Performance !!Quality<br />
|-<br />
| '''Internal resolution''' || 1x Native || Auto (Window size)<br />
|-<br />
| '''Anti-aliasing''' || None || at least 2x<br />
|-<br />
| '''Anisotropic filtering''' || 1x || at least 2x<br />
|-<br />
| '''Post-Processing Effect''' || (off) || your choice<br>(see tip below)<br />
|-<br />
| '''Scaled EFB copy''' || unchecked || checked<br />
|-<br />
| '''Per-Pixel Lightning''' || unchecked || checked<br />
|-<br />
| '''Force texture filtering,<br>Widescreen Hack,<br>Disable fog''' || off || your option<br>(recommended: off)<br />
|}<br />
<br />
{{Tip|Dolphin is able to render games that were developed for 2D in anaglyph 3D. To enable this, set ''Post-Processing Effect'' to ''stereoscopic'' (default, for red-cyan mode) or ''stereoscopic2'' (blue-yellow). It is also '''necessary''' to uncheck "''Fast Depth Calculation''" on the ''Hacks'' tab (''see below'').}}<br />
<br />
{{Warning|Using filters and other ways to improve graphics might break a few games or cause graphical glitches of any level.}}<br />
<br />
Unless sure, the ''Hacks'' tab is best left untouched.<br />
<br />
{| class="wikitable"<br />
|+ Defaults<br />
!Option !! Value<br />
|-<br />
| Skip EFB access from CPU || unchecked<br />
|-<br />
| Ignore format changes || checked<br />
|-<br />
| EFB copies || texture<br />
|-<br />
| Texture cache/ Accuracy || Fast<br />
|-<br />
| External frame buffer || disable<br />
|-<br />
| Cache display lists || unchecked<br />
|-<br />
| Disable destination alpha || unchecked<br />
|-<br />
| OpenCL texture decoder || unchecked<br />
|-<br />
| OpenMP texture decoder || unchecked<br />
|-<br />
| Fast depth calculation || checked<br>(Should uncheck for anaglyph 3D)<br />
|-<br />
| Vertex streaming hack || unchecked<br />
|}<br />
<br />
Similarly, unless sure, leave '''everything''' in the ''Advanced'' tab unchecked.<br />
<br />
=== DSP section ===<br />
<br />
Set the DSP emulation engine to<br />
<br />
* DSP HLE for speed over accuracy,<br />
* DSP LLE recompiler for better accuracy with the cost of some speed,<br />
* DSP LLE interpreter; accurate but makes '''everything''' unplayable. Too slow.<br />
<br />
''DSP LLE on separate thread'' improves speed on computers with multi-core CPUs, but might cause audio glitches, and is known to break [https://wiki.dolphin-emu.org/index.php?title=Category:Zelda_ucode_games Zelda ucode games]. Audio backend is best set to [[ALSA]]. For {{ic|pulseaudio}}, Dolphin's optional dependency [[PulseAudio]] needs to be installed.<br />
<br />
{{Note|If you came here from the [[#Config section|Config section's]] link, you should go back now.}}<br />
<br />
== Playing ==<br />
<br />
{{Warning|Make sure you '''only''' use Dolphin for legally obtained self-made disc dumps of games you legally bought. Dolphin was not designed for illegal actions. Act legally as applying laws define. You are responsible for any usage of the emulator that you make.}}<br />
<br />
{{Note|No links, instructions or tips for obtaining illegal content will be provided on this wiki. No copyright infringement intended.}}<br />
<br />
Click on browse to set a directory of ISOs so that they are shown as a library on Dolphin's default screen. Otherwise just click ''Open'' and select the file.<br />
<br />
=== Dolphin's Wiki ===<br />
<br />
Whenever a game doesn't work properly, try reading its page on [https://wiki.dolphin-emu.org Dolphin's wiki]. Listed there are tips on setting up the emulator for each game, version compatibility charts, testing entries, troubleshooting and video previews. Contributions, such as testing entries and workarounds are welcome and help other users.<br />
<br />
Here's a [https://aur.archlinux.org/packages/xfce4-whiskermenu-plugin/ Whisker Menu] search action command for searching on Dolphin's wiki:<br />
<br />
exo-open --launch WebBrowser https://wiki.dolphin-emu.org/index.php?search=%u<br />
<br />
{{Tip|Setting up keymaps is recommended. Prefer a gamepad with analogue features to a keyboard and a mouse. See this [http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/GCController_Layout.svg/1000px-GCController_Layout.svg.png map of the GameCube gamepad]. Having fun while playing is also recommended.}}<br />
<br />
== Troubleshooting ==<br />
<br />
==== Games play too fast ====<br />
<br />
Make sure to set framelimit to Audio and have properly configure the [[#DSP section|DPS settings]]. If it doesn't work with your sound system, try setting it to 60 for NTSC games or 50 for PAL ones. Also, note that playback of other audio media while frameskip is set to audio breaks the game.<br />
{{Note|Certain software, such as {{Pkg|flashplugin}}, crash the "Audio" feature and make games unstable, if used at the same time as Dolphin.}}<br />
<br />
''See also: [[Sound system]] - one needs to be properly configured for the "Audio" frameskip option to work.''<br />
<br />
==== Emulation is too slow ====<br />
<br />
Double-check the [[Cpu_scaling#Scaling_governors|CPU scaling governor]]. If using an nvidia graphics card, on nvidia-settings changing the powermizer setting to "Prefer maximum performance". Killing unnecessary processes and disabling compositing also helps. Configuring Dolphin correctly, as described above, is the most important part.<br />
<br />
''See also: [[Maximizing Performance]] - most of the advice should be helpful.''<br />
<br />
==== Dolphin occasionally crashes on 64-bit CPUs====<br />
<br />
On 64bit processors, Dolphin crashes when loading a game after having played another. This also randomly happens on menus.<br />
<br />
To solve this, Dolphin must be built manually, with a minor modification. Once the source code has been downloaded ({{ic|$ git clone http://www.github.com/dolphin-emu/dolphin}}), navigate to {{ic|(path to source)/dolphin/Source/Core/Core/}} , or, for older versions, in {{ic|(path to source)/dolphin-emu/src/dolphin/Source/Core/Core/Src/}} and edit ''CoreParameter.cpp''.<br />
<br />
Change line 98 from {{ic|<nowiki>bJITLoadStorePairedOff = false;</nowiki>}} to {{ic|<nowiki>bJITLoadStorePairedOff = true;</nowiki>}}.<br />
Notice the comment saying {{ic|// XXX not 64-bit clean}}.<br />
<br />
Upon saving the file, the package is ready to be compiled.<br />
<br />
''See also: [https://aur.archlinux.org/packages/do/dolphin-emu-git/PKGBUILD a PKGBUILD for Dolphin (git)]''<br />
<br />
== See also ==<br />
<br />
{{Note|The Arch Linux wiki and its users are not responsible for any damage, misuse or illegal action caused by following instructions from webpages hyperlinked bellow.}}<br />
<br />
* [https://dolphin-emu.org/docs/guides/performance-guide/ Dolphin's performance guide.]<br />
* [https://dolphin-emu.org/docs/faq/ Dolphin's FAQ]<br />
* [https://wiki.dolphin-emu.org/index.php?title=Ripping_Game_Discs Dolphin's wiki entry for legally obtaining game dumps.]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=MATE&diff=339705MATE2014-10-11T16:32:30Z<p>Sudowoodo: /* Tips and tricks */ Shared a small script I just wrote :</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[es:MATE]]<br />
[[it:MATE]]<br />
[[ja:MATE]]<br />
[[ko:MATE]]<br />
[[ru:MATE]]<br />
[[zh-CN:MATE]]<br />
{{Related articles start}}<br />
{{Related|GNOME}}<br />
{{Related|Cinnamon}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related articles end}}<br />
<br />
From [http://mate-desktop.org/ MATE homepage]:<br />
<br />
:''The MATE Desktop Environment is the continuation of GNOME 2. It provides an intuitive and attractive desktop environment using traditional metaphors for Linux and other Unix-like operating systems. MATE is [https://github.com/mate-desktop under active development] to add support for new technologies while preserving a traditional desktop experience.''<br />
<br />
== MATE Applications ==<br />
<br />
MATE is largely composed of GNOME 2 applications and utilities, forked and renamed to avoid conflicting with their GNOME 3 counterparts. Below is a list of common GNOME applications which have been renamed in MATE.<br />
<br />
* Alacarte is renamed '''Mozo''';<br />
* Nautilus is renamed '''Caja''';<br />
* Metacity is renamed '''Marco''';<br />
* Gedit is renamed '''Pluma''';<br />
* Eye of GNOME is renamed '''Eye of MATE''';<br />
* Evince is renamed '''Atril''';<br />
* File Roller is renamed '''Engrampa'''.<br />
<br />
Other applications and core components prefixed with GNOME (such as GNOME Terminal, GNOME Panel, GNOME Menus, etc.) have had the prefix changed to MATE so they become MATE Panel, MATE Menus etc.<br />
<br />
== Installation ==<br />
<br />
MATE is available in the [[official repositories]] and can be [[pacman|installed]] with one of the following:<br />
<br />
*The {{Pkg|mate-panel}} package provides a minimal desktop shell.<br />
*The {{Grp|mate}} group contains the core desktop environment required for the standard MATE experience.<br />
*The {{Grp|mate-extra}} group contains additional utilities and applications that integrate well with the MATE desktop. Installing just the {{Grp|mate-extra}} group will not pull in the whole {{Grp|mate}} group via dependencies. If you want to install all MATE packages then you will need to explicitly install both groups.<br />
<br />
=== Additional MATE packages ===<br />
<br />
There is an additional package not included in the {{Grp|mate}} or {{Grp|mate-extra}} because it is not neccessarily useful to everyone.<br />
<br />
*The {{Pkg|mate-netbook}} package provides a MATE panel applet that might be useful to owners of small screen devices, such as a Netbook. The applet will automatically maximize all windows and provides an application switcher applet.<br />
<br />
There are also a number of other MATE applications that are contributed and maintained by the MATE community and therefore not included in the {{Grp|mate}} or {{Grp|mate-extra}} groups.<br />
<br />
* {{Pkg|mate-applet-lockkeys}} - A MATE panel applet that shows which of the CapsLock, NumLock and ScrollLock keys are on and which are off.<br />
* {{Pkg|mate-applet-softupd}} - A MATE panel applet to notify when software updates become available.<br />
* {{Pkg|mate-applet-streamer}} - A MATE panel applet to let you play your favourite online radio station with a single click.<br />
* {{Pkg|mate-color-manager}} - Color management application for MATE.<br />
* {{Pkg|mate-accountsdialog}} - An application to view and modify user accounts information for MATE.<br />
* {{Pkg|mate-disk-utility}} - Disk management application for MATE.<br />
* {{Pkg|mate-mplayer}} - mplayer frontend for MATE<br />
* {{Pkg|mate-nettool}} - MATE interface for various networking tools.<br />
* {{Pkg|mate-themes-extras}} - Collection of GTK2/3 desktop themes for MATE.<br />
* {{Pkg|gnome-main-menu}} - A mate-panel applet similar to the traditional main-menu, but with a few additions.<br />
* {{Pkg|variety}} - Variety changes the wallpaper on a regular interval using user-specified or automatically downloaded images.<br />
<br />
The following is also available via the AUR and integrates with MATE but the package is not maintained by the MATE team.<br />
<br />
* {{AUR|mintmenu}} - Linux Mint Menu for MATE.<br />
<br />
== Starting MATE ==<br />
<br />
MATE can be started via a display manager or manually.<br />
<br />
=== Graphical log-in ===<br />
<br />
Choose ''MATE'' from the menu in a [[display manager]] of choice. The MATE team recommends [[LightDM]] as the display manager with the GTK+ (2) greeter, which can be installed with the {{Pkg|lightdm-gtk2-greeter}} package.<br />
<br />
=== Manually ===<br />
<br />
If you prefer to start MATE manually from the console, add the following line to your {{ic|~/.xinitrc}} file:<br />
{{hc|~/.xinitrc|<nowiki><br />
exec mate-session<br />
</nowiki>}}<br />
<br />
Then MATE can be launched by typing {{ic|startx}}.<br />
<br />
See [[xinitrc]] for details, such as preserving the logind session.<br />
<br />
== Accessibility ==<br />
<br />
MATE is well suited for use by individuals with sight or mobility impairment. First install {{Pkg|orca}} and {{Pkg|espeak}} (Screen reader for individuals who are blind or visually impaired) and {{Pkg|onboard}} (On-screen keyboard useful for mobility impaired users) <br />
<br />
pacman -Syyu orca espeak onboard <br />
<br />
Now, before starting MATE for the first time, enter the following command as the user who needs accessibility features:<br />
<br />
gsettings set org.mate.interface accessibility true<br />
<br />
Once you start MATE, you can configure the accessibility applications via {{ic|System -> Preferences -> Assistive Technologies}}, although if you need Orca, you will need to run it from the {{ic|Alt-F2}} run window in order to start getting speech.<br />
<br />
== Network Management ==<br />
<br />
It is recommended that you use [[Network Manager]] for managing networks in MATE. Please see the wiki page for more details on installing and configuring it.<br />
<br />
== Bluetooth ==<br />
<br />
Since version 1.8, [[Bluetooth]] support in MATE is provided by [[Blueman]].<br />
<br />
== PulseAudio and GStreamer ==<br />
<br />
MATE supports two audio backends, [http://www.pulseaudio.org PulseAudio] and [http://www.gstreamer.net GStreamer]. By default, the PulseAudio backend is installed but if you want to switch to the GStreamer backend, do the following:<br />
<br />
# pacman -S mate-settings-daemon-gstreamer mate-media-gstreamer<br />
<br />
== Tips and tricks ==<br />
<br />
=== Enabling compositing ===<br />
<br />
Compositing is not be enabled by default. To enable it navigate to run {{ic|System -> Preferences -> Windows}} and click the tick box alongside '''Enable software compositing window manager''' in the {{ic|General}} tab. Alternatively, you can run the following from the terminal:<br />
<br />
$ dconf write /org/mate/marco/general/compositing-manager true<br />
<br />
=== Toggling compositing ===<br />
<br />
Some software, may have issues rendering images when working on an environment using the nvidia proprietary drivers and a compositing window manager.<br />
<br />
To easily toggle the compositing feature, save the following script somewhere within the Home directory, e.g. {{ic|~/.scripts/compositing.sh}}:<br />
<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
if $(dconf read /org/mate/marco/general/compositing-manager) == "true"<br />
then<br />
dconf write /org/mate/marco/general/compositing-manager false<br />
else<br />
dconf write /org/mate/marco/general/compositing-manager true<br />
fi<br />
</nowiki>}}<br />
<br />
and then create a custom keyboard shortcut that executes the file, e.g. {{ic|Ctrl+Alt+C}}, to {{ic|sh ~/.scripts/compositing.sh}}.<br />
<br />
=== Enabling new window centering ===<br />
<br />
By default, new windows are placed in the top-left corner. To center new windows on creation navigate to run {{ic|System -> Preferences -> Windows}} and click the tick box alongside '''Center new windows''' in the {{ic|Placement}} tab. Alternatively, you can run the following from the terminal:<br />
<br />
$ dconf write /org/mate/marco/general/center-new-windows true<br />
<br />
=== Enabling window snapping ===<br />
<br />
Window snapping is not be enabled by default, to enable it navigate to run {{ic|System -> Preferences -> Windows}} and click the tick box alongside '''Enable side by side tiling''' in the {{ic|Placement}} tab. <br />
<br />
=== Show or hide desktop icons ===<br />
<br />
By default, MATE shows multiple icons on the desktop: The content of your desktop directory, computer, home and network directories, the trash and mounted drives. You can show or hide them individually or all at once using {{ic|dconf}}.<br />
<br />
==== Hide all desktop icons ====<br />
<br />
$ dconf write /org/mate/desktop/background/show-desktop-icons false<br />
<br />
==== Hide individual icons ====<br />
<br />
Hide computer icon:<br />
<br />
$ dconf write /org/mate/caja/desktop/computer-icon-visible false<br />
<br />
Hide user directory icon:<br />
<br />
$ dconf write /org/mate/caja/desktop/home-icon-visible false<br />
<br />
Hide network icon:<br />
<br />
$ dconf write /org/mate/caja/desktop/network-icon-visible false<br />
<br />
Hide trash icon:<br />
<br />
$ dconf write /org/mate/caja/desktop/trash-icon-visible false<br />
<br />
Hide mounted volumes:<br />
<br />
$ dconf write /org/mate/caja/desktop/volumes-visible false<br />
<br />
Replace {{ic|false}} with {{ic|true}} for the icons to reappear.<br />
<br />
=== Use a different window manager with MATE ===<br />
<br />
The default window manager in MATE is called ''marco'', a fork of the GNOME 2 window manager {{pkg|metacity}}. You can replace ''marco'' with another window manager via a number of different methods:<br />
<br />
* The easiest way to change the window manager is to autostart it using {{ic|mate-session-properties}}. Open the ''System'' menu, navigate to the ''Preferences'' menu and click on '''Startup Applications'''. In the dialog click '''Add.''' Enter a name and comment in the name and comment sections and in the command section add a command of the following syntax: ''"name of window manager"'' ''"--replace"''<br />
<br />
For example: for openbox you would use the command {{ic|openbox --replace}}.<br />
<br />
Log out and log in again and ''marco'' should be replaced by the window manager of your choice. To revert to ''marco'' simply delete the entry you created in '''Startup Applications'''.<br />
<br />
* Alternatively you can specify the desired window manager in dconf:<br />
<br />
$ dconf write /org/mate/desktop/session/required-components/windowmanager "'mywindowmanager'"<br />
<br />
replace "mywindowmanager" with the name of the window manager of your choice e.g. ''openbox'' or ''metacity''.<br />
<br />
=== Change window decoration button order ===<br />
<br />
You can change the button using dconf. The key is in org.mate.marco.general.button-layout. Use the graphical dconf-editor or the dconf command line tool to change it:<br />
<br />
$ dconf write /org/mate/marco/general/button-layout "'close,maximize,minimize:'"<br />
<br />
and put '''menu''', '''close''', '''minimize''' and '''maximize''' in your desired order, separated by commas. The colon is the window title (it is necessary for the changes to apply).<br />
<br />
=== Auto open file manager after drive mount ===<br />
<br />
By default, MATE automatically opens a new file manager window when a drive is mounted. To disable this, change the following key in dconf:<br />
<br />
$ dconf write /org/mate/desktop/media-handling/automount-open false<br />
<br />
=== Screensaver ===<br />
<br />
MATE uses {{pkg|mate-screensaver}} to lock your session. By default there are a limited number of lock-screens available. To make more lock-screens available, install the {{Pkg|mate-screensaver-hacks}} package. This will allow you to use [[Xscreensaver]] lock-screens with {{pkg|mate-screensaver}}.<br />
<br />
=== Lock screen & default background image ===<br />
<br />
The full list of configuration options can be found in <code>/usr/share/glib-2.0/schemas/org.mate.background.gschema.xml</code>, they are overridden by creating the file <code>/usr/share/glib-2.0/schemas/mate-background.gschema.override</code>.<br />
<br />
{{note|The values on the right must be enclosed in single quotes (<nowiki>''</nowiki>) otherwise an error will occur during re-compile.}}<br />
<br />
Example #1: Change the background image of the lock screen:<br />
{{hc|/usr/share/glib-2.0/schemas/mate-background.gschema.override|2=<br />
<br />
[org.mate.background]<br />
picture-filename='/path/to/the/background.jpg'}}<br />
<br />
Example #2: Change the lock screen to use a gradient:<br />
{{hc|/usr/share/glib-2.0/schemas/mate-background.gschema.override|2=<br />
<br />
[org.mate.background]<br />
color-shading-type='vertical-gradient'<br />
picture-options='scaled'<br />
picture-filename=<nowiki>''</nowiki><br />
primary-color='#152233'<br />
secondary-color='#000000'}}<br />
<br />
Re-compile the schemas:<br />
# glib-compile-schemas /usr/share/glib-2.0/schemas/<br />
<br />
Finally, restart your X session for the change to effect.<br />
<br />
=== Styling Qt applications ===<br />
<br />
To make Qt4 applications inherit the MATE theme, do the following:<br />
<br />
* Navigate to ''System -> Preferences -> Qt4 Config'' or execute {{ic|qtconfig-qt4}} from a shell.<br />
* Change '''GUI Style''' to {{ic|GTK+}}.<br />
* ''File --> Save''.<br />
<br />
See [[Uniform Look for Qt and GTK Applications]] for more details.<br />
<br />
=== Consistent cursor theme ===<br />
<br />
You may find that the cursor theme used in MATE is not consistent. For example, it may change when moving the cursor across different application windows. To fix this problem, set the cursor theme by creating an {{ic|index.theme}} file which defines the cursor theme according to the XDG icon theme specification. See the following section of the [[Cursor Themes]] article: [[Cursor_Themes#Using_an_index.theme_file_.28recommended.29]].<br />
<br />
=== Use of gradient backgrounds with LightDM ===<br />
<br />
If you wish to use the default MATE (1.8) ''Stripes'' background as the LightDM background as well so as to make for seamless transition from LightDM to MATE, you will find that it is runtime-constructed from a grayscale PNG upon which MATE layers a vertical blue-to-green gradient, something which LightDM does not currently support. If insistent, you can work around this by temporarily setting {{ic|/org/mate/desktop/background/show-desktop-icons}} to {{ic|false}}, either through the {{ic|dconf Editor}} tool available from the {{ic|System Tools}} menu or by running<br />
dconf write /org/mate/desktop/background/show-desktop-icons false<br />
from the Alt-F2 {{ic|Run Application}} dialog, then running {{ic|killall mate-panel}} from said dialog and hitting {{ic|Print Screen}} before the panel reappears. You are then presented with a {{ic|Save As}} dialog for exactly that fully rendered, screen-sized PNG that you need for LightDM. Run<br />
dconf reset /org/mate/desktop/background/show-desktop-icons<br />
to have your desktop icons reappear.<br />
<br />
== See also ==<br />
<br />
* [http://mate-desktop.org MATE homepage]<br />
* [http://wiki.mate-desktop.org/archlinux_custom_repo MATE wiki for Arch Linux]<br />
* [http://mate-desktop.org/gallery/1.8/ ''MATE desktop screenshots'']<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=1018647 ''The MATE Desktop Environment''] - Arch Linux forum discussion about MATE</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=LVM&diff=338401LVM2014-10-02T12:00:47Z<p>Sudowoodo: /* Disadvantages */ Not a disadvantage Arch Linux users should care about.</p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
[[Category:File systems]]<br />
[[cs:LVM]]<br />
[[de:LVM]]<br />
[[es:LVM]]<br />
[[fr:LVM]]<br />
[[it:LVM]]<br />
[[ja:LVM]]<br />
[[ru:LVM]]<br />
[[tr:LVM]]<br />
[[zh-CN:LVM]]<br />
{{Related articles start}}<br />
{{Related|Software RAID and LVM}}<br />
{{Related|dm-crypt/Encrypting an entire system#LVM on LUKS}}<br />
{{Related|dm-crypt/Encrypting an entire system#LUKS on LVM}}<br />
{{Related articles end}}<br />
From [[Wikipedia:Logical Volume Manager (Linux)]]:<br />
:LVM is a [[Wikipedia:logical volume management|logical volume manager]] for the [[Wikipedia:Linux kernel|Linux kernel]]; it manages disk drives and similar mass-storage devices.<br />
<br />
=== LVM Building Blocks ===<br />
<br />
Logical Volume Management utilizes the kernel's [http://sources.redhat.com/dm/ device-mapper] feature to provide a system of partitions independent of underlying disk layout. With LVM you abstract your storage and have "virtual partitions", making extending/shrinking easier (subject to potential filesystem limitations). Virtual partitions allow addition and removal without worry of whether you have enough contiguous space on a particular disk, getting caught up fdisking a disk in use (and wondering whether the kernel is using the old or new partition table), or, having to move other partitions out of the way. This is strictly an ease-of-management solution: LVM adds no security.<br />
<br />
Basic building blocks of LVM:<br />
<br />
* '''Physical volume (PV)''': Partition on hard disk (or even the disk itself or loopback file) on which you can have volume groups. It has a special header and is divided into physical extents. Think of physical volumes as big building blocks used to build your hard drive.<br />
* '''Volume group (VG)''': Group of physical volumes used as a storage volume (as one disk). They contain logical volumes. Think of volume groups as hard drives.<br />
* '''Logical volume (LV)''': A "virtual/logical partition" that resides in a volume group and is composed of physical extents. Think of logical volumes as normal partitions.<br />
* '''Physical extent (PE)''': The smallest size in the physical volume that can be assigned to a logical volume (default 4MiB). Think of physical extents as parts of disks that can be allocated to any partition.<br />
<br />
Example:<br />
'''Physical disks'''<br />
<br />
Disk1 (/dev/sda):<br />
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br />
|Partition1 50GB (Physical volume) |Partition2 80GB (Physical volume) |<br />
|/dev/sda1 |/dev/sda2 |<br />
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |<br />
<br />
Disk2 (/dev/sdb):<br />
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br />
|Partition1 120GB (Physical volume) |<br />
|/dev/sdb1 |<br />
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _|<br />
<br />
'''LVM logical volumes'''<br />
<br />
Volume Group1 (/dev/MyStorage/ = /dev/sda1 + /dev/sda2 + /dev/sdb1):<br />
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br />
|Logical volume1 15GB |Logical volume2 35GB |Logical volume3 200GB |<br />
|/dev/MyStorage/rootvol|/dev/MyStorage/homevol |/dev/MyStorage/mediavol |<br />
|_ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |<br />
<br />
=== Advantages ===<br />
<br />
LVM gives you more flexibility than just using normal hard drive partitions:<br />
* Use any number of disks as one big disk.<br />
* Have logical volumes stretched over several disks.<br />
* Create small logical volumes and resize them "dynamically" as they get more filled.<br />
* Resize logical volumes regardless of their order on disk. It does not depend on the position of the LV within VG, there is no need to ensure surrounding available space.<br />
* Resize/create/delete logical and physical volumes online. File systems on them still need to be resized, but some (such as ext4) support online resizing.<br />
* Online/live migration of LV being used by services to different disks without having to restart services.<br />
* Snapshots allow you to backup a frozen copy of the file system, while keeping service downtime to a minimum.<br />
* Support for various device-mapper targets, including transparent filesystem encryption and caching of frequently used data.<br />
<br />
=== Disadvantages ===<br />
* Additional steps in setting up the system, more complicated.<br />
<br />
== Installing Arch Linux on LVM ==<br />
<br />
You should create your LVM Volumes between the [[partitioning]] and [[File_systems#Create a filesystem|formatting]] steps of the [[Installation guide|installation procedure]]. Instead of directly formatting a partition to be your root file system, the file system will be created inside a logical volume (LV). <br />
<br />
Make sure the {{pkg|lvm2}} package is [[pacman|installed]].<br />
<br />
Quick overview: <br />
* Create partition(s) where your PV(s) will reside. Set the partition type to 'Linux LVM', which is 8e if you use MBR, 8e00 for GPT.<br />
* Create your physical volumes (PVs). If you have one disk it is best to just create one PV in one large partition. If you have multiple disks you can create partitions on each of them and create a PV on each partition.<br />
* Create your volume group (VG) and add all PVs to it.<br />
* Create logical volumes (LVs) inside that VG.<br />
* Continue with “Format the partitions” step of [[Beginners' guide]].<br />
* When you reach the “Create initial ramdisk environment” step in the Beginners Guide, add the {{ic|lvm}} hook to {{ic|/etc/mkinitcpio.conf}} (see below for details).<br />
<br />
{{Warning|{{ic|/boot}} cannot reside in LVM when using [[GRUB Legacy]], which does not support LVM. [[GRUB]] users do not have this limitation. If you need to use GRUB Legacy, you must create a separate {{ic|/boot}} partition and format it directly. }}<br />
<br />
=== Create partitions ===<br />
{{Note|This step is optional and depends on the users preference. In most cases it is recommended to partition the device first, though.}}<br />
See [[Partitioning]] on how to create partitions on your device.<br />
<br />
=== Create physical volumes ===<br />
To list all your devices capable of being used as a physical volume:<br />
# lvmdiskscan<br />
<br />
{{Warning|Make sure you target the correct device, or below commands will result in data loss!}}<br />
<br />
Create a physical volume on them:<br />
<br />
# pvcreate ''DEVICE''<br />
<br />
This command creates a header on each device so it can be used for LVM. As defined in [[LVM#LVM_Building_Blocks]], ''DEVICE'' can be a disk (e.g. {{ic|/dev/sda}}), a partition (e.g. {{ic|/dev/sda2}}) or a loop back device. For example: <br />
<br />
# pvcreate /dev/sda2<br />
<br />
You can track created physical volumes with:<br />
# pvdisplay<br />
<br />
{{Note|If using a SSD without partitioning it first, use {{ic|pvcreate --dataalignment 1m /dev/sda}} (for erase block size < 1MiB), see e.g. [http://serverfault.com/questions/356534/ssd-erase-block-size-lvm-pv-on-raw-device-alignment here]}}<br />
<br />
=== Create volume group ===<br />
<br />
The next step is to create a volume group on this physical volume.<br />
<br />
First you need to create a volume group on one of the physical volumes:<br />
<br />
# vgcreate <''volume_group''> <''physical_volume''><br />
<br />
For example:<br />
<br />
# vgcreate VolGroup00 /dev/sda2<br />
<br />
Then add to it all other physical volumes you want to have in it:<br />
<br />
# vgextend <''volume_group''> <''physical_volume''><br />
# vgextend <''volume_group''> <''another_physical_volume''><br />
# ...<br />
<br />
For example:<br />
<br />
# vgextend VolGroup00 /dev/sdb1<br />
# vgextend VolGroup00 /dev/sdc<br />
<br />
You can track how your volume group grows with:<br />
<br />
# vgdisplay<br />
<br />
{{Note|You can create more than one volume group if you need to, but then you will not have all your storage presented as one disk.}}<br />
<br />
=== Create in one step ===<br />
<br />
LVM allows you to combine the creation of a volume group and the physical volumes in one easy step. For example, to create the group VolGroup00 with the three devices mentioned above, you can run:<br />
<br />
# vgcreate VolGroup00 /dev/sda2 /dev/sdb1 /dev/sdc<br />
<br />
This command will first set up the three partitions as physical volumes (if necessary) and then create the volume group with the three volumes. The command will warn you it detects an existing filesystem on any of the devices.<br />
<br />
=== Create logical volumes ===<br />
<br />
Now we need to create logical volumes on this volume group. You create a logical volume with the next command by giving the name of a new logical volume, its size, and the volume group it will live on:<br />
<br />
# lvcreate -L <''size''> <''volume_group''> -n <''logical_volume''><br />
<br />
For example:<br />
<br />
# lvcreate -L 10G VolGroup00 -n lvolhome<br />
<br />
This will create a logical volume that you can access later with {{ic|/dev/mapper/Volgroup00-lvolhome}} or {{ic|/dev/VolGroup00/lvolhome}}. Same as with the volume groups, you can use any name you want for your logical volume when creating it.<br />
<br />
You can also specify one or more physical volumes to restrict where LVM allocates the data. For example, you may wish to create a logical volume for the root filesystem on your small SSD, and your home volume on a slower mechanical drive. Simply add the physical volume devices to the command line, for example:<br />
<br />
# lvcreate -L 10G VolGroup00 -n lvolhome /dev/sdc1<br />
<br />
If you want to fill all the free space left on a volume group, use the next command:<br />
<br />
# lvcreate -l +100%FREE <''volume_group''> -n <''logical_volume''><br />
<br />
You can track created logical volumes with:<br />
<br />
# lvdisplay<br />
<br />
{{Note|You may need to load the ''device-mapper'' kernel module ('''modprobe dm-mod''') for the above commands to succeed.}}<br />
<br />
{{Tip|You can start out with relatively small logical volumes and expand them later if needed. For simplicity, leave some free space in the volume group so there is room for expansion.}}<br />
<br />
=== Create file systems and mount logical volumes ===<br />
<br />
Your logical volumes should now be located in {{ic|/dev/mapper/}} and {{ic|/dev/''YourVolumeGroupName''}}. If you cannot find them, use the next commands to bring up the module for creating device nodes and to make volume groups available:<br />
<br />
# modprobe dm-mod<br />
# vgscan<br />
# vgchange -ay<br />
<br />
Now you can create file systems on logical volumes and mount them as normal partitions (if you are installing Arch linux, refer to [[Beginners' guide#Mount the partitions|mounting the partitions]] for additional details):<br />
<br />
# mkfs.<''fstype''> /dev/mapper/<''volume_group''>-<''logical_volume''><br />
# mount /dev/mapper/<''volume_group''>-<''logical_volume''> /<''mountpoint''><br />
<br />
For example:<br />
<br />
# mkfs.ext4 /dev/mapper/VolGroup00-lvolhome<br />
# mount /dev/mapper/VolGroup00-lvolhome /home<br />
<br />
{{Warning|When choosing mountpoints, just select your newly created logical volumes (use: {{ic|/dev/mapper/Volgroup00-lvolhome}}). Do '''not''' select the actual partitions on which logical volumes were created (do not use: {{ic|/dev/sda2}}).}}<br />
<br />
=== Add lvm hook to mkinitcpio.conf ===<br />
<br />
You will need to make sure the {{Ic|udev}} and {{Ic|lvm2}} [[mkinitcpio]] hooks are enabled.<br />
<br />
{{Ic|udev}} is there by default. Edit the file and insert {{Ic|lvm2}} between {{Ic|block}} and {{Ic|filesystems}} like so:<br />
<br />
{{hc|1= /etc/mkinitcpio.conf|2= HOOKS="base udev ... block '''lvm2''' filesystems"}}<br />
<br />
Afterwards, you can continue in normal installation instructions with the [[Mkinitcpio#Image_creation_and_activation|create an initial ramdisk]] step.<br />
<br />
== Configuration ==<br />
<br />
=== Advanced options ===<br />
<br />
If you need monitoring (needed for snapshots) you can enable lvmetad. <br />
For this set {{ic|1=use_lvmetad = 1}} in {{ic|/etc/lvm/lvm.conf}}.<br />
This is the default by now. <br />
<br />
You can restrict the volumes that are activated automatically by setting the {{Ic|auto_activation_volume_list}} in {{Ic|/etc/lvm/lvm.conf}}. If in doubt, leave this option commented out.<br />
<br />
=== Grow physical volume ===<br />
<br />
After changing the size of a device that has a physical volume on it, you need to grow the physical volume using the following command:<br />
<br />
# pvresize ''DEVICE''<br />
<br />
For example, to grow a physical volume located on a mdadm [[RAID]] array:<br />
<br />
# pvresize /dev/md0<br />
<br />
{{Note|This command can be done while the volume is online.}}<br />
<br />
=== Grow logical volume ===<br />
<br />
To increase the available space on a filesystem that resides on a logical volume, two steps need to be done. First grow the logical volume, and then resize the [[File systems|filesystem]] to use the newly created free space.<br />
<br />
==== lvextend ====<br />
<br />
To grow a logical volume, two different commands can be used, {{ic|lvextend}} or {{ic|lvresize}}.<br />
<br />
# lvextend -L +<''size''> <''volume_group''>/<''logical_volume''><br />
<br />
For example:<br />
<br />
# lvextend -L +20G VolGroup00/lvolhome<br />
<br />
If you want to fill all the free space on a volume group, use the following command:<br />
<br />
# lvextend -l +100%FREE <''volume_group''>/<''logical_volume''><br />
<br />
==== resize2fs ====<br />
<br />
To resize an ext2,ext3 or ext4 filesystem:<br />
<br />
# resize2fs /dev/<''volume_group''>/<''logical_volume''><br />
<br />
{{Warning|Not all file systems support growing without loss of data and/or growing online.}}<br />
<br />
{{Note|If you do not resize your filesystem, there will not be more free space available on the filesystem. The logical volume will be bigger but partly unused.}}<br />
<br />
For example:<br />
<br />
# resize2fs /dev/VolGroup00/lvolhome<br />
<br />
=== Shrink logical volume ===<br />
<br />
Because your file system is probably as big as the logical volume it resides on, you need to shrink the file system first and then shrink the logical volume. Depending on your file system, you may need to unmount it first. Let us say we have a logical volume of 15 GB with ext3 on it and we want to shrink it to 10 GB. We need to do the following steps: <br />
# resize2fs /dev/VolGroup00/lvolhome 9G<br />
# lvreduce -L 10G VolGroup00/lvolhome<br />
<br />
Here we shrunk the file system more than needed so that when we shrunk the logical volume we did not accidentally cut off the end of the file system. After that, we normally grow the file system to fill all free space left on logical volume. <br />
<br />
'''Alternatively''', you may use {{Ic|lvresize}} instead of {{Ic|lvreduce}}:<br />
# lvresize -L -5G VolGroup00/lvolhome<br />
# resize2fs /dev/VolGroup00/lvolhome<br />
<br />
{{Warning|<br />
* Do not reduce the file system size to less than the amount of space occupied by data or you risk data loss.<br />
* Not all file systems support shrinking without loss of data and/or shrinking online.<br />
}}<br />
<br />
{{Note|It is better to reduce the file system to a smaller size than the logical volume, so that after resizing the logical volume, we do not accidentally cut off some data from the end of the file system.}}<br />
<br />
=== Remove logical volume ===<br />
<br />
{{Warning|Before you remove a logical volume, make sure to move all data that you want to keep somewhere else; otherwise, it will be lost!}}<br />
<br />
First, find out the name of the logical volume you want to remove. You can get a list of all logical volumes with:<br />
<br />
# lvs<br />
<br />
Next, look up the mountpoint of the chosen logical volume:<br />
<br />
$ lsblk<br />
<br />
Then unmount the filesystem on the logical volume:<br />
<br />
# umount /<''mountpoint''><br />
<br />
Finally, remove the logical volume:<br />
<br />
# lvremove <''volume_goup''>/<''logical_volume''><br />
<br />
For example:<br />
<br />
# lvremove VolGroup00/lvolhome<br />
<br />
Confirm by typing in {{ic|y}}.<br />
<br />
Update {{ic|/etc/fstab}} as necessary.<br />
<br />
You can verify the removal of the logical volume by typing {{ic|lvs}} as root again (see first step of this section).<br />
<br />
=== Add physical volume to a volume group ===<br />
<br />
You first create a new physical volume on the block device you wish to use, then extend your volume group<br />
<br />
{{bc|1=<br />
# pvcreate /dev/sdb1<br />
# vgextend VolGroup00 /dev/sdb1<br />
}}<br />
<br />
This of course will increase the total number of physical extents on your volume group, which can be allocated by logical volumes as you see fit.<br />
<br />
{{Note|It is considered good form to have a [[Partitioning|partition table]] on your storage medium below LVM. Use the appropriate type code: {{ic|8e}} for MBR, and {{ic|8e00}} for GPT partitions.}}<br />
<br />
=== Remove partition from a volume group ===<br />
<br />
All of the data on that partition needs to be moved to another partition. Fortunately, LVM makes this easy:<br />
# pvmove /dev/sdb1<br />
If you want to have the data on a specific physical volume, specify that as the second argument to {{Ic|pvmove}}:<br />
# pvmove /dev/sdb1 /dev/sdf1<br />
Then the physical volume needs to be removed from the volume group:<br />
# vgreduce myVg /dev/sdb1<br />
Or remove all empty physical volumes:<br />
# vgreduce --all vg0<br />
<br />
And lastly, if you want to use the partition for something else, and want to avoid LVM thinking that the partition is a physical volume:<br />
# pvremove /dev/sdb1<br />
<br />
<br />
=== Deactivate volume group ===<br />
<br />
Just invoke <br />
# vgchange -a n my_volume_group<br />
<br />
This will deactivate the volume group and allow you to unmount the container it is stored in.<br />
<br />
=== Snapshots ===<br />
<br />
==== Introduction ====<br />
<br />
LVM allows you to take a snapshot of your system in a much more efficient way than a traditional backup. It does this efficiently by using a COW (copy-on-write) policy. The initial snapshot you take simply contains hard-links to the inodes of your actual data. So long as your data remains unchanged, the snapshot merely contains its inode pointers and not the data itself. Whenever you modify a file or directory that the snapshot points to, LVM automatically clones the data, the old copy referenced by the snapshot, and the new copy referenced by your active system. Thus, you can snapshot a system with 35GB of data using just 2GB of free space so long as you modify less than 2GB (on both the original and snapshot).<br />
<br />
==== Configuration ====<br />
<br />
You create snapshot logical volumes just like normal ones.<br />
<br />
# lvcreate --size 100M --snapshot --name snap01 /dev/mapper/vg0-pv<br />
With that volume, you may modify less than 100M of data, before the snapshot volume fills up.<br />
<br />
Reverting the modified 'pv' logical volume to the state when the 'snap01' snapshot was taken can be done with<br />
<br />
{{ic|# lvconvert --merge /dev/vg0/snap01}}<br />
<br />
In case the origin logical volume is active, merging will occur on the next reboot.(Merging can be done even from a LiveCD)<br />
<br />
The snapshot will no longer exist after merging.<br />
<br />
Also multiple snapshots can be taken and each one can be merged with the origin logical volume at will.<br />
<br />
The snapshot can be mounted and backed up with '''dd''' or '''tar'''. The size of the backup file done with '''dd''' will be the size of the files residing on the snapshot volume. <br />
To restore just create a snapshot, mount it, and write or extract the backup to it. And then merge it with the origin.<br />
<br />
It is important to have the ''dm_snapshot'' module listed in the MODULES variable of {{ic|/etc/mkinitcpio.conf}}, otherwise the system will not boot. If you do this on an already installed system, make sure to rebuild the image with<br />
# mkinitcpio -g /boot/initramfs-linux.img<br />
<br />
Todo: scripts to automate snapshots of root before updates, to rollback... updating {{ic|menu.lst}} to boot snapshots (separate article?)<br />
<br />
snapshots are primarily used to provide a frozen copy of a file system to make backups; a backup taking two hours provides a more consistent image of the file system than directly backing up the partition.<br />
<br />
See [[Create root filesystem snapshots with LVM]] for automating the creation of clean root file system snapshots during system startup for backup and rollback.<br />
<br />
[[Dm-crypt/Encrypting an entire system#LVM on LUKS]] and [[Dm-crypt/Encrypting an entire system#LUKS on LVM]].<br />
<br />
If you have LVM volumes not activated via the [[Mkinitcpio|initramfs]], [[#Using units|enable]] the '''lvm-monitoring''' service, which is provided by the {{pkg|lvm2}} package.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Changes that could be required due to changes in the Arch-Linux defaults ===<br />
<br />
The {{ic|1=use_lvmetad = 1}} must be set in {{ic|/etc/lvm/lvm.conf}}. This is the default now - if you have a {{ic|lvm.conf.pacnew}} file, you must merge this change.<br />
<br />
=== LVM commands do not work ===<br />
<br />
* Load proper module:<br />
# modprobe dm_mod<br />
<br />
The {{ic|dm_mod}} module should be automatically loaded. In case it does not, you can try:<br />
{{Accuracy|Should module loading at boot be done using "/etc/modules-load.d" instead?}}<br />
<br />
{{hc|/etc/mkinitcpio.conf:|<nowiki>MODULES="dm_mod ..."</nowiki>}}<br />
<br />
You will need to [[Mkinitcpio#Image_creation_and_activation|rebuild]] the initramfs to commit any changes you made.<br />
<br />
* Try preceding commands with ''lvm'' like this:<br />
# lvm pvdisplay<br />
<br />
=== Logical Volumes do not show up ===<br />
<br />
If you are trying to mount existing logical volumes, but they do not show up in {{ic|lvscan}}, you can use the following commands to activate them:<br />
<br />
# vgscan<br />
# vgchange -ay<br />
<br />
=== LVM on removable media ===<br />
<br />
Symptoms:<br />
# vgscan<br />
Reading all physical volumes. This may take a while...<br />
/dev/backupdrive1/backup: read failed after 0 of 4096 at 319836585984: Input/output error<br />
/dev/backupdrive1/backup: read failed after 0 of 4096 at 319836643328: Input/output error<br />
/dev/backupdrive1/backup: read failed after 0 of 4096 at 0: Input/output error<br />
/dev/backupdrive1/backup: read failed after 0 of 4096 at 4096: Input/output error<br />
Found volume group "backupdrive1" using metadata type lvm2<br />
Found volume group "networkdrive" using metadata type lvm2<br />
<br />
Cause:<br />
:Removing an external LVM drive without deactivating the volume group(s) first. Before you disconnect, make sure to:<br />
# vgchange -an ''volume group name''<br />
<br />
Fix: assuming you already tried to activate the volume group with {{ic|# vgchange -ay ''vg''}}, and are receiving the Input/output errors:<br />
# vgchange -an ''volume group name''<br />
Unplug the external drive and wait a few minutes:<br />
# vgscan<br />
# vgchange -ay ''volume group name''<br />
<br />
=== Kernel options ===<br />
<br />
In kernel options, you may need {{ic|dolvm}}. {{ic|<nowiki>root=</nowiki>}} should be set to the logical volume, e.g {{ic|/dev/mapper/''vg-name''-''lv-name''}}.<br />
<br />
=== Resizing a contiguous logical volume fails === <br />
<br />
If trying to extend a logical volume errors with:<br />
" Insufficient suitable contiguous allocatable extents for logical volume "<br />
<br />
The reason is that the logical volume was created with an explicit contiguous allocation policy (options {{ic|-C y}} or {{ic|--alloc contiguous}}) and no further adjacent contiguous extents are available (see also [http://www.hostatic.ro/2010/02/15/lvm-inherit-and-contiguous-policies/ reference]).<br />
<br />
To fix this, prior to extending the logical volume, change its allocation policy with {{ic|lvchange --alloc inherit <logical_volume>}}. If you need to keep the contiguous allocation policy, an alternative approach is to move the volume to a disk area with sufficient free extents (see [http://superuser.com/questions/435075/how-to-align-logical-volumes-on-contiguous-physical-extents]).<br />
<br />
== See also ==<br />
<br />
* [http://sourceware.org/lvm2/ LVM2 Resource Page] on SourceWare.org<br />
* [http://tldp.org/HOWTO/LVM-HOWTO/ LVM HOWTO] article at The Linux Documentation project<br />
* [http://wiki.gentoo.org/wiki/LVM LVM] article at Gentoo wiki<br />
* [http://www.joshbryan.com/blog/2008/01/02/lvm2-mirrors-vs-md-raid-1/ LVM2 Mirrors vs. MD Raid 1] post by Josh Bryan<br />
* [http://www.tutonics.com/2012/11/ubuntu-lvm-guide-part-1.html Ubuntu LVM Guide Part 1][http://www.tutonics.com/2012/12/lvm-guide-part-2-snapshots.html Part 2 detals snapshots]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=USB_flash_installation_medium&diff=338321USB flash installation medium2014-10-01T14:45:32Z<p>Sudowoodo: Happy October.</p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
[[ar:USB Installation Media]]<br />
[[bg:USB Installation Media]]<br />
[[de:Installation von einem USB-Stick]]<br />
[[es:USB Installation Media]]<br />
[[fr: Créer une clef USB avec l'ISO Arch Linux]]<br />
[[it:USB Installation Media]]<br />
[[ja:USB Installation Media]]<br />
[[ro:Instalare prin USB]]<br />
[[ru:USB Installation Media]]<br />
[[tr:USB_ile_kurulum]]<br />
[[zh-CN:USB Installation Media]]<br />
[[zh-TW:USB Installation Media]]<br />
{{Related articles start}}<br />
{{Related|CD Burning}}<br />
{{Related|Archiso}}<br />
{{Related|Multiboot USB drive}}<br />
{{Related articles end}}<br />
<br />
This page discusses various multi-platform methods on how to create a Arch Linux Installer USB drive (also referred to as ''"flash drive", "USB stick", "USB key"'', etc) for booting in BIOS and UEFI systems. The result will be a LiveUSB (LiveCD-like) system that can be used for installing Arch Linux, system maintenance or for recovery purposes, and that, because of the nature of [[Wikipedia:SquashFS|SquashFS]], will discard all changes once the computer shuts down.<br />
<br />
If you would like to run a full install of Arch Linux from a USB drive (i.e. with persistent settings), see [[Installing Arch Linux on a USB key]]. If you would like to use your bootable Arch Linux USB stick as a rescue USB, see [[Change root]].<br />
<br />
== BIOS and UEFI Bootable USB ==<br />
<br />
=== Using dd ===<br />
{{Note|This method is recommended due to its simplicity. If it does not work, switch to the alternative method [[#Using manual formatting ]] below.}}<br />
<br />
{{Warning|This will irrevocably destroy all data on {{ic|/dev/sd'''x'''}}.}}<br />
<br />
==== In GNU/Linux ====<br />
<br />
{{Tip|Find out the name of your USB drive with {{ic|lsblk}}. Make sure that it is '''not''' mounted.}}<br />
<br />
Run the following command, replacing {{ic|/dev/'''sdx'''}} with your drive, e.g. {{ic|/dev/sdb}}. (do '''not''' append a partition number, so do '''not''' use something like {{ic|/dev/sdb'''1'''}})<br />
<br />
# dd bs=4M if=/path/to/archlinux.iso of=/dev/'''sdx''' && sync<br />
<br />
==== In Windows ====<br />
<br />
===== Using USBwriter =====<br />
<br />
This method does not require any workaround and is as straightforward as {{ic|dd}} under Linux. Just download the Arch Linux ISO, and use the [http://sourceforge.net/p/usbwriter/wiki/Documentation/ USBwriter] utility to write to your USB flash memory.<br />
<br />
===== Using Universal USB Installer =====<br />
{{Accuracy|UUI is for BIOS only|section=Using Universal USB Installer}}<br />
This is probably the most straightforward way to create a bootable Arch Linux USB stick from Windows. Download [http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/ Universal USB Installer], which runs on Windows XP/Vista/7/8. There's no installation involved; you directly download a single executable. Download the Arch ISO file and run Universal-USB-Installer-1.9.5.2.exe (the version numbers will vary). The use of the program is fairly self-explanatory. You select the distribution you'd like to create a bootable USB for (Arch Linux), the ISO file you downloaded, and the USB flash drive you want to install to.<br />
<br />
{{Note|1= As of UUI 1.9.5.2, this does not work out-of-the-box because of a [https://bbs.archlinux.org/viewtopic.php?pid=1344629 discrepancy in syslinux versions]. However, if you have a UEFI motherboard you can UEFI boot the USB disk and don't need to worry about this. You must still follow the tip below.}}<br />
<br />
{{Tip|The Arch syslinux installer uses the USB disk label to facilitate mounting the correct drive. The current version of UUI (1.9.5.2) sets the disk label to UUI, when Arch is expecting something else. You can easily fix this by right-clicking the USB drive icon, and clicking on ''Properties'' to change the label. For archlinux-2014.10.01-dual.iso, the label should be {{ic|ARCH_201410}}. It should be clear what the label should be for other versions of the ISO, but in any case, Arch will tell you what the label needs to be if you attempt to boot from the USB with an incorrect label.}}<br />
<br />
{{Warning|Make sure you don't accidentally click on one of the ads on the pendrivelinux.com page which feature prominent ''Download'' buttons—these are likely to carry virus/spyware/trojan payloads. The Pendrive download button is small and near the middle of the page.}}<br />
<br />
===== Using Cygwin =====<br />
<br />
Make sure your [http://www.cygwin.com/ Cygwin] installation contains the {{ic|dd}} package.<br />
<br />
{{Tip|If you do not want to install Cygwin, you can download {{ic|dd}} for Windows from [http://www.chrysocome.net/dd here]. See the next section for more information.}}<br />
<br />
Place your image file in your home directory:<br />
<br />
C:\cygwin\home\John\<br />
<br />
Run cygwin as administrator (required for cygwin to access hardware). To write to your USB drive use the following command:<br />
<br />
dd if=image.iso of=\\.\'''x''': bs=4M<br />
<br />
where image.iso is the path to the iso image file within the {{ic|cygwin}} directory and {{ic|\\.\'''x''':}} is your USB flash drive where {{ic|'''x'''}} is the windows designated letter, e.g. {{ic|\\.\d:}}.<br />
<br />
On Cygwin 6.0, find out the correct partition with:<br />
<br />
cat /proc/partitions<br />
<br />
and write the ISO image with the information from the output. Example:<br />
<br />
{{Warning|This will irrevocably delete all files on your USB flash drive, so make sure you do not have any important files on the flash drive before doing this.}}<br />
<br />
dd if=image.iso of=/dev/sdb bs=4M<br />
<br />
===== dd for Windows =====<br />
<br />
{{Note|Some users have an "isolinux.bin missing or corrupt" problem when booting the media with this method.}}<br />
<br />
A GPL licensed dd version for Windows is available at http://www.chrysocome.net/dd. The advantage of this over Cygwin is a smaller download. Use it as shown in instructions for Cygwin above.<br />
<br />
To begin, download the latest version of dd for Windows. Once downloaded, extract the archive's contents into Downloads or elsewhere.<br />
<br />
Now, launch your {{ic|command prompt}} as an administrator. Next, change directory ({{ic|cd}}) into the Downloads directory.<br />
<br />
If your Arch Linux ISO is elsewhere you may need to state the full path, for convenience you may wish to put the Arch Linux ISO into the same folder as the dd executable. The basic format of the command will look like this.<br />
<br />
dd if=archlinux-2014-XX-xx-dual.iso of=\\.\x: bs=4m<br />
<br />
{{Warning|This command will replace the drive's contents and its formatting with the ISO's. You will likely be unable to recover its contents in the event of an accidental copy. Be absolutely sure that you are directing dd to the correct drive before executing!}}<br />
Simply replace the various null spots (indicated by an "x") with the correct date and correct drive letter.<br />
<br />
Here is a complete example.<br />
<br />
dd if=ISOs\archlinux-2014.10.10-dual.iso of=\\.\d: bs=4M<br />
<br />
==== In Mac OS X ====<br />
<br />
To be able to use {{ic|dd}} on your USB device on a Mac you have to do some special maneuvers. First of all insert your usb device, OS X will automount it, and in {{ic|Terminal.app}} run:<br />
<br />
$ diskutil list<br />
<br />
Figure out what your USB device is called with {{ic|mount}} or {{ic|<nowiki>sudo dmesg | tail</nowiki>}} (e.g. {{ic|/dev/disk1}}) and unmount the partitions on the device (i.e., /dev/disk1s1) while keeping the device proper (i.e., /dev/disk1):<br />
<br />
$ diskutil unmountDisk /dev/disk1<br />
<br />
Now we can continue in accordance with the instructions above (but, if you are using the OS X {{ic|dd}}, use {{ic|/dev/rdisk}} instead of {{ic|/dev/disk}}, and use {{ic|1=bs=1m}}. {{ic|rdisk}} means "raw disk" and is much faster on OS X, and {{ic|1=bs=1m}} indicates a 1 MB block size).<br />
<br />
{{hc|<nowiki># dd if=image.iso of=/dev/rdisk1 bs=1m</nowiki>|<br />
20480+0 records in<br />
20480+0 records out<br />
167772160 bytes transferred in 220.016918 secs (762542 bytes/sec)<br />
}}<br />
<br />
It is probably a good idea to eject your drive before physical removal at this point:<br />
<br />
$ diskutil eject /dev/disk1<br />
<br />
==== How to restore the USB drive ====<br />
<br />
Because the ISO image is a hybrid which can either be burned to a disc or directly written to a USB drive, it does not include a standard partition table.<br />
<br />
After you install Arch Linux and you are done with the USB drive, you should zero out its first 512 bytes ''(meaning the boot code from the MBR and the non-standard partition table)'' if you want to restore it to full capacity:<br />
<br />
# dd count=1 bs=512 if=/dev/zero of=/dev/sd'''x''' && sync<br />
<br />
Then create a new partition table (e.g. "msdos") and filesystem (e.g. EXT4, FAT32) using {{Pkg|gparted}}, or from a terminal:<br />
<br />
* For EXT2/3/4 (adjust accordingly), it would be:<br />
<br />
# cfdisk /dev/sd'''x'''<br />
# mkfs.ext4 /dev/sd'''x1'''<br />
# e2label /dev/sd'''x1''' USB_STICK<br />
<br />
* For FAT32, install the {{Pkg|dosfstools}} package and run:<br />
<br />
# cfdisk /dev/sd'''x'''<br />
# mkfs.vfat -F32 /dev/sd'''x1'''<br />
# dosfslabel /dev/sd'''x1''' USB_STICK<br />
<br />
=== Using manual formatting===<br />
<br />
==== In GNU/Linux ====<br />
<br />
This method is more complicated than writing the image directly with {{ic|dd}}, but it does keep the flash drive usable for data storage (that is, the ISO is installed in a specific partition within the already [[Partitioning|partitioned device]] without altering other partitions).<br />
<br />
{{Note|Here, we will denote the targeted partition as {{ic|/dev/sd'''Xn'''}}. In any of the following commands, adjust '''X''' and '''n''' according to your system.}}<br />
<br />
* Make sure that the latest ''syslinux'' package (version 6.02 or newer) is installed on the system. <br />
<br />
* If not done yet, create the partition table and/or partition on the device before continuing. The partition {{ic|/dev/sd'''Xn'''}} must be formatted to FAT32.<br />
<br />
* Mount the ISO image, the FAT32 filesystem located in the USB flash device, and copy the contents of the ISO image to it. Unmount the ISO image, but keep the FAT32 partition mounted for following steps:<br />
# mkdir -p /mnt/{iso,usb}<br />
# mount -o loop archlinux-2014.10.01-dual.iso /mnt/iso<br />
# mount /dev/sd'''Xn''' /mnt/usb<br />
# cp -a /mnt/iso/* /mnt/usb<br />
# sync<br />
# umount /mnt/iso<br />
<br />
* {{Note|The following step is not required when using [[Archboot]] instead of [[Archiso]].}} To boot either a label or an [[UUID]] to select the partition to boot from is required. By default the label {{ic|ARCH_2014'''XX'''}} (with the appropriate release month) is used. Thus, the partition’s label has to be set accordingly, for example using ''gparted''. Alternatively, you can change this behaviour by altering the lines ending by {{ic|1=archisolabel=ARCH_2014'''XX'''}} in files ''/mnt/usb/arch/boot/syslinux/archiso_sys32.cfg'' and ''archiso_sys64.cfg'', as well as ''/mnt/usb/loader/entries/archiso-x86_64.conf'' or similar for a 32-bit ISO (the last being useful only, if you want to boot the USB flash device from an EFI system). To use an UUID instead, replace those portions of lines with {{ic|1=archiso''device''=/dev/disk/by-uuid/'''YOUR-UUID'''}}. The UUID can be retrieved with {{ic|1=blkid -o value -s UUID /dev/sd'''Xn'''}}.<br />
<br />
{{Warning|Mismatching labels or wrong UUID prevents booting from the created medium.}}<br />
<br />
* Syslinux is already preinstalled in ''/mnt/usb/arch/boot/syslinux''. Install it completely to that folder by following [[Syslinux#Manual_install]]. Instructions are reproduced here for convenience.<br />
** Overwrite the existing syslinux modules ({{ic|*.c32}} files) present in the USB (from the ISO) with the ones from the syslinux package. This is necessary to avoid boot failure because of a possible version mismatch.<br />
** Run:<br />
# extlinux --install /mnt/usb/arch/boot/syslinux<br />
** Unmount the partition ({{ic|umount /mnt/usb}}) and install the MBR or GPT partition table to the USB device as described in the page mentioned.<br />
<br />
* Mark the partition as active (or “bootable”).<br />
<br />
==== In Windows ====<br />
<br />
{{Note|<br />
* For manual formatting, do not use any '''Bootable USB Creator utility''' for creating the UEFI bootable USB. For manual formatting, do not use ''dd for Windows'' to dd the ISO to the USB drive either.<br />
<br />
* In the below commands, '''X:''' is assumed to be the USB flash drive in Windows.<br />
<br />
* Windows uses backward slash {{ic|\}} as path-separator, so the same is used in the below commands.<br />
<br />
* All commands should be run in Windows command prompt '''as administrator'''.<br />
<br />
* {{ic|>}} denotes the Windows command prompt.<br />
}}<br />
<br />
* Partition and format the USB drive using [http://rufus.akeo.ie/ Rufus USB partitioner]. Select partition scheme option as '''MBR for BIOS and UEFI''' and File system as '''FAT32'''. Uncheck "Create a bootable disk using ISO image" and "Create extended label and icon files" options.<br />
<br />
* Change the '''Volume Label''' of the USB flash drive {{ic|X:}} to match the LABEL mentioned in the {{ic|1=archisolabel=}} part in {{ic|<ISO>\loader\entries\archiso-x86_64.conf}}. This step is required for Official ISO ([[Archiso]]) but not required for [[Archboot]]. This step can be also performed using Rufus, during the prior "partition and format" step.<br />
<br />
* Extract the ISO (similar to extracting ZIP archive) to the USB flash drive (using [http://7-zip.org/ 7-Zip]. <br />
<br />
* Download official syslinux 6.xx binaries (zip file) from https://www.kernel.org/pub/linux/utils/boot/syslinux/ and extract it. The version of Syslinux should be the same version used in the ISO image.<br />
<br />
* Run the following command (in Windows cmd prompt, as admin):<br />
<br />
{{Note|Use {{ic|X:\boot\syslinux\}} for Archboot iso.}}<br />
<br />
> cd bios\<br />
> for /r %Y in (*.c32) do copy "%Y" "X:\arch\boot\syslinux\" /y<br />
> copy mbr\*.bin X:\arch\boot\syslinux\ /y<br />
<br />
* Install Syslinux to the USB by running (use {{ic|win64\syslinux64.exe}} for x64 Windows):<br />
<br />
{{Note|Use {{ic|-d /boot/syslinux}} for Archboot iso.}}<br />
<br />
> cd bios\<br />
> win32\syslinux.exe -d /arch/boot/syslinux -i -a -m X:<br />
<br />
{{Note|<br />
* The above step installs Syslinux's {{ic|ldlinux.sys}} to the VBR of the USB partition, sets the partition as "active/boot" in the MBR partition table and writes the MBR boot code to the 1st 440-byte boot code region of the USB.<br />
<br />
* The {{ic|-d}} switch expects a path with forward slash path-separator like in *unix systems.<br />
}}<br />
<br />
== Other Methods for BIOS systems ==<br />
<br />
=== In GNU/Linux ===<br />
<br />
==== Using a multiboot USB drive ====<br />
This allows booting multiple ISOs from a single USB device, including the archiso. Updating an existing USB drive to a more recent ISO is simpler than for most other methods. See [[Multiboot USB drive]].<br />
<br />
==== Using UNetbootin ====<br />
<br />
UNetbootin can be used on any Linux distribution or Windows to copy your iso to a USB device. However, Unetbootin overwrites syslinux.cfg, so it creates a USB device that does not boot properly. For this reason, '''Unetbootin is not recommended''' -- please use {{ic|dd}} or one of the other methods discussed in this topic.<br />
{{Warning|UNetbootin writes over the default {{ic|syslinux.cfg}}; this must be restored before the USB device will boot properly.}}<br />
<br />
Edit {{ic|syslinux.cfg}}:<br />
<br />
{{hc|sysconfig.cfg|2=<br />
default menu.c32<br />
prompt 0<br />
menu title Archlinux Installer<br />
timeout 100<br />
<br />
label unetbootindefault<br />
menu label Archlinux_x86_64<br />
kernel /arch/boot/x86_64/vmlinuz<br />
append initrd=/arch/boot/x86_64/archiso.img archisodevice=/dev/sd'''x1''' ../../<br />
<br />
label ubnentry0<br />
menu label Archlinux_i686<br />
kernel /arch/boot/i686/vmlinuz<br />
append initrd=/arch/boot/i686/archiso.img archisodevice=/dev/sd'''x1''' ../../<br />
}}<br />
<br />
In {{ic|/dev/sd'''x1'''}} you must replace '''x''' with the first free letter after the last letter in use on the system where you are installing Arch Linux (e.g. if you have two hard drives, use {{ic|c}}.). You can make this change during the first phase of boot by pressing {{ic|Tab}} when the menu is shown.<br />
<br />
=== In Windows ===<br />
<br />
==== Win32 Disk Imager ====<br />
<br />
{{Warning|This will destroy all information on your USB flash drive!}}<br />
First, download the program from [http://sourceforge.net/projects/win32diskimager/ here]. Next, extract the archive and run the executable. Now, select the Arch Linux ISO under the {{ic|Image File}} section and the USB flash device letter (for example, [D:\]) under the {{ic|Device}} section. Finally, click {{ic|Write}} when ready.<br />
{{Note|After installation, you may need to restore the USB flash drive following a process as outlined [[USB_Installation_Media#How_to_restore_the_USB_drive|here]].}}<br />
<br />
==== USBWriter for Windows ====<br />
<br />
Download the program from http://sourceforge.net/projects/usbwriter/ and run it. Select the arch image file, the target USB stick, and click on the {{ic|write}} button. Now you should be able to boot from the usb stick and install Arch Linux from it.<br />
<br />
==== The Flashnul way ====<br />
<br />
[http://shounen.ru/soft/flashnul/ flashnul] is an utility to verify the functionality and maintenance of Flash-Memory (USB-Flash, IDE-Flash, SecureDigital, MMC, MemoryStick, SmartMedia, XD, CompactFlash etc).<br />
<br />
From a command prompt, invoke flashnul with {{ic|-p}}, and determine which device index is your USB drive, e.g.:<br />
<br />
{{hc|C:\>flashnul -p|<br />
Avaible physical drives:<br />
Avaible logical disks:<br />
C:\<br />
D:\<br />
E:\<br />
}}<br />
<br />
When you have determined which device is the correct one, you can write the image to your drive, by invoking flashnul with the device index, {{ic|-L}}, and the path to your image, e.g:<br />
<br />
C:\>flashnul '''E:''' -L ''path\to\arch.iso''<br />
<br />
As long as you are really sure you want to write the data, type yes, then wait a bit for it to write. If you get an access denied error, close any Explorer windows you have open.<br />
<br />
If under Vista or Win7, you should open the console as administrator, or else flashnul will fail to open the stick as a block device and will only be able to write via the drive handle windows provides<br />
<br />
{{Note|Confirmed that you need to use drive letter as opposed to number. flashnul 1rc1, Windows 7 x64.}}<br />
<br />
==== Loading the installation media from RAM ====<br />
<br />
{{Merge|Multiboot USB drive#Using Syslinux and memdisk|This is the same method, only Syslinux is installed from Windows. Considering that [[multiboot USB drive]] can be used to boot an installation media and it is already linked from the Related articles box at the top, maybe this section should be merged there?}}<br />
<br />
This method uses [[Syslinux]] and a [[Ramdisk]] ([http://www.syslinux.org/wiki/index.php/MEMDISK MEMDISK]) to load the entire Arch Linux ISO image into RAM. Since this will be running entirely from system memory, you will need to make sure the system you will be installing this on has an adequate amount. A minimum amount of RAM between 500 MB and 1 GB should suffice for a MEMDISK based, Arch Linux install.<br />
<br />
For more information on Arch Linux system requirements as well as those for MEMDISK see the [[Beginners' guide]] and [http://www.etherboot.org/wiki/bootingmemdisk#preliminaries here]{{Dead link|2014|09|14}}. For reference, here is the [https://bbs.archlinux.org/viewtopic.php?id=135266 preceding forum thread].<br />
<br />
{{Tip|Once the installer has completed loading you can simply remove the USB stick and even use it on a different machine to start the process all over again. Utilizing MEMDISK also allows booting and installing Arch Linux to and from the same USB flash drive.}}<br />
<br />
===== Preparing the USB flash drive =====<br />
<br />
Begin by formatting the USB flash drive as '''FAT32'''. Then create the following folders on the newly formatted drive.<br />
* {{ic|Boot}}<br />
** {{ic|Boot/ISOs}}<br />
** {{ic|Boot/Settings}}<br />
<br />
===== Copy the needed files to the USB flash drive =====<br />
<br />
Next copy the ISO that you would like to boot to the {{ic|Boot/ISOs}} folder. After that, extract from the following files from the latest release of {{pkg|syslinux}} from [http://www.kernel.org/pub/linux/utils/boot/syslinux/ here] and copy them into the following folders.<br />
* {{ic|./win32/syslinux.exe}} to the Desktop or Downloads folder on your system.<br />
* {{ic|./memdisk/memdisk}} to the {{ic|Settings}} folder on your USB flash drive.<br />
<br />
===== Create the configuration file =====<br />
<br />
After copying the needed files, navigate to the USB flash drive, /boot/Settings and create a {{ic|syslinux.cfg}} file.<br />
{{Warning|On the {{ic|INITRD}} line, be sure to use the name of the ISO file that you copied to your {{ic|ISOs}} folder!}}<br />
{{hc|/Boot/Settings/syslinux.cfg|2=<br />
DEFAULT arch_iso<br />
<br />
LABEL arch_iso<br />
MENU LABEL Arch Setup<br />
LINUX memdisk<br />
INITRD /Boot/ISOs/archlinux-2014.10.01-dual.iso<br />
APPEND iso}}<br />
For more information on Syslinux see the [[Syslinux|Arch Wiki article]].<br />
<br />
===== Final steps =====<br />
<br />
Finally, create a {{ic|*.bat}} file where {{ic|syslinux.exe}} is located and run it ("Run as administrator" if you are on Vista or Windows 7):<br />
{{hc|C:\Documents and Settings\username\Desktop\install.bat|<br />
@echo off<br />
syslinux.exe -m -a -d /Boot/Settings X:}}<br />
<br />
== Troubleshooting ==<br />
<br />
* For the [[#Loading the installation media from RAM|MEMDISK Method]], if you get the famous "30 seconds" error trying to boot the i686 version, press the {{ic|Tab}} key over the {{ic|Boot Arch Linux (i686)}} entry and add {{ic|vmalloc&#61;448M}} at the end. For reference: ''If your image is bigger than 128MiB and you have a 32-bit OS, then you have to increase the maximum memory usage of vmalloc''. [http://www.syslinux.org/wiki/index.php/MEMDISK#-_memdiskfind_in_combination_with_phram_and_mtdblock]<br />
<br />
* If you get the "30 seconds" error due to the {{ic|/dev/disk/by-label/ARCH_XXXXYY}} not mounting, try renaming your USB media to {{ic|ARCH_XXXXYY}} (e.g. {{ic|ARCH_201410}}).<br />
<br />
== See Also ==<br />
<br />
* [https://wiki.gentoo.org/wiki/LiveUSB/HOWTO Gentoo wiki - LiveUSB/HOWTO]<br />
* [https://fedoraproject.org/wiki/How_to_create_and_use_Live_USB Fedora wiki - How to create and use Live USB]<br />
* [http://en.opensuse.org/SDB:Live_USB_stick openSUSE wiki - SDB:Live USB stick]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=User:Sudowoodo&diff=336366User:Sudowoodo2014-09-20T13:01:40Z<p>Sudowoodo: New AUR package.</p>
<hr />
<div>{{Note|I will be studying a lot, from now on, so I won't be very active.}}<br />
♨ Member of the [[ArchWiki Translation Team (Ελληνικά)|Greek Arch Wiki Translation Team]] :-)<br />
----<br />
Pages I created:<br />
*[[Dolphin emulator]]<br />
*[https://wiki.archlinux.org/index.php/Template:Poor_writing_%28%CE%95%CE%BB%CE%BB%CE%B7%CE%BD%CE%B9%CE%BA%CE%AC%29 Poor writing (Ελληνικά)] (External link)<br />
----<br />
Pages I have contributed to:<br />
*[[RetroArch]]<br />
*[[VBA-M]]<br />
----<br />
Some pages I like:<br />
*[[Arch compared to other distributions]]<br />
*[[The Arch Way]]<br />
*[[Arch is the best]]<br />
*[[Time]]<br />
*[[USB flash installation media]]<br />
----<br />
My current target(s):<br />
*Nothing particular for now.<br />
----<br />
[https://aur.archlinux.org/packages/?SeB=m&K=Sudowoodo AUR Packages I maintain:]<br />
*{{AUR|m64py}}<br />
*{{AUR|iptux}}<br />
*{{AUR|gnome-paint}}<br />
*{{AUR|ttf-equestria}}<br />
----<br />
Contact:<br />
*[[Special:EmailUser/Sudowoodo|Email]]<br />
----<br />
<br />
{{ic|- - - - - C o o o o}}</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=User:Sudowoodo&diff=335002User:Sudowoodo2014-09-12T10:03:59Z<p>Sudowoodo: </p>
<hr />
<div>{{Note|I will be studying a lot, from now on, so I won't be very active.}}<br />
♨ Member of the [[ArchWiki Translation Team (Ελληνικά)|Greek Arch Wiki Translation Team]] :-)<br />
----<br />
Pages I created:<br />
*[[Dolphin emulator]]<br />
*[https://wiki.archlinux.org/index.php/Template:Poor_writing_%28%CE%95%CE%BB%CE%BB%CE%B7%CE%BD%CE%B9%CE%BA%CE%AC%29 Poor writing (Ελληνικά)] (External link)<br />
----<br />
Pages I have contributed to:<br />
*[[RetroArch]]<br />
*[[VBA-M]]<br />
----<br />
Some pages I like:<br />
*[[Arch compared to other distributions]]<br />
*[[The Arch Way]]<br />
*[[Arch is the best]]<br />
*[[Time]]<br />
----<br />
My current target:<br />
*Nothing particular for now.<br />
----<br />
[https://aur.archlinux.org/packages/?SeB=m&K=Sudowoodo AUR Packages I maintain:]<br />
*{{AUR|m64py}}<br />
*{{AUR|iptux}}<br />
*{{AUR|gnome-paint}}<br />
----<br />
Contact:<br />
*[[Special:EmailUser/Sudowoodo|Email]]<br />
----<br />
<br />
{{ic|- - - - - C o o o o}}</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Arch_is_the_best&diff=334798Arch is the best2014-09-11T14:38:47Z<p>Sudowoodo: /* The code */ Description for Io, from Wikipedia.</p>
<hr />
<div>[[Category:About Arch]]<br />
[[Category:Programming language]]<br />
[[ja:Arch_is_the_best]]<br />
The '''Arch is the best''' project is a very sophisticated and exquisite, ego-boosting and mind-blowing (albeit perhaps a bit over-engineered) project which gives proof of Arch's superiority.<br />
<br />
== History ==<br />
<br />
The visionary project was originally devised in April 2008 by long time Arch community member [https://bbs.archlinux.org/profile.php?id=2529 lucke] as a simple shell script which provided irrefutable proof that "Arch is the best". It was announced to the world with a [https://bbs.archlinux.org/viewtopic.php?id=47306 forum post], thus illuminating other people's minds, who immediately started porting it to multiple different languages, both programming and verbal, so that every human being on the planet could fully appreciate and benefit from this revolutionary discovery.<br />
<br />
== Installation ==<br />
<br />
A sample PKGBUILD called {{AUR|archbest-mod1}} has been uploaded to [[AUR]].<br />
<br />
== The code ==<br />
<br />
The "Arch is the best" project is ported to many programming languages.<br />
<br />
'''Ada''' - A systems critical programming language.<br />
with Ada.Text_IO;<br />
use Ada.Text_IO;<br />
procedure ArchIsTheBest is<br />
begin<br />
Put_Line("Arch is the best!");<br />
end HelloWorld;<br />
<br />
'''APL''' - A Programming Language.<br />
'Arch is the best!'<br />
<br />
'''ATS''' - A functional programming language that uses dependent types to improve programs' reliability.<br />
implement main () = println! "Arch is the best!"<br />
<br />
'''Awk''' - A data-driven programming language designed for processing text-based data.<br />
BEGIN {<br />
print "Arch is the best!"<br />
}<br />
<br />
'''Befunge''' - Believed to be the first two-dimensional, ASCII-based, general-purpose (in the sense of "you could plausibly write Hunt the Wumpus in it") programming language.<br />
<v"Arch is the best!"0<br />
<,_@#:<br />
<br />
'''Boo''' - A stablished object oriented statically typed programming language for .NET and Mono with a python inspired syntax and a special focus on metaprogramming through language and compiler extensibility features such as macros and custom compilation pipelines.<br />
print "Arch is the best!"<br />
<br />
'''Bourne shell''' - The original program, should be compatible with any shell.<br />
#!/bin/sh<br />
echo "Arch is the best!"<br />
<br />
<br />
'''Bourne shell (Alternate)''' - Handy for piping the output to your favourite IRC/email/IM client. Should work with any shell.<br />
#!/bin/sh<br />
yes Arch is the best!<br />
<br />
<br />
'''Bourne shell (Dynamically updated)'''<br />
<pre style='overflow:auto'><br />
#!/bin/bash<br />
wget http://wiki.archlinux.org/index.php/Arch_is_the_best -qO-| sed -n ':b;n;s/id="Translations"//;Tb;:d;n;s/id="See_also"//;t;p;bd'|sed '/<i>.*<\/i>/d;s/<[^>]*>//g'|sed 'N;s/\n/: /;N;N;s/\n//g'<br />
</pre><br />
<br />
<br />
'''brainfuck''' - Doesn't the language name explain it?<br />
++>++++++>+++++<+[>[->+<]<->++++++++++<]>>.<[-]>[-<++>]<br />
<----------------.---------------.+++++.<+++[-<++++++++++>]<.<br />
>>+.++++++++++.<<.>>+.------------.---.<<.>>---.<br />
+++.++++++++++++++.+.<<+.[-]++++++++++.<br />
<br />
<br />
'''C''' - Note the three space indenting used in this project, much like that used by other superior beings.<br />
#include <stdio.h><br />
#include <stdlib.h><br />
int main(void) <br />
{<br />
puts("Arch is the best!");<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
<br />
'''C#''' - Intended to be a simple, modern, general-purpose, object-oriented programming language.<br />
using System;<br />
public class ArchIsTheBest<br />
{<br />
static public void Main ()<br />
{<br />
Console.WriteLine ("Arch is the best!");<br />
}<br />
}<br />
<br />
<br />
'''C++''' - Arch == Linux++<br />
#include <iostream><br />
#include <cstdlib><br />
int main ()<br />
{<br />
std::cout << "Arch is the best!" << std::endl;<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
<br />
'''COBOL''' - A simple, lightweight programming language.<br />
IDENTIFICATION DIVISION.<br />
PROGRAM-ID. TheBest.<br />
<br />
PROCEDURE DIVISION.<br />
DISPLAY "Arch is the best!".<br />
STOP RUN.<br />
<br />
<br />
'''CoffeeScript''' - A programming language that transcompiles to JavaScript.<br />
alert 'Arch is the best!'<br />
<br />
<br />
'''Clojure''' - A Lisp dialect that runs on the JVM.<br />
(def translations {"english" "Arch is the best!",<br />
"german" "Arch ist das Beste!",<br />
"australian" "Arch is fair dinkum, mate!",<br />
"h4x0r" "arhc 51 7he be57!",<br />
"spanish" "¡Arch es el mejor!"})<br />
<br />
(defn read-choice []<br />
(println "\nAvailable languages: ")<br />
(doall (map #(println (key %)) translations))<br />
(print "Enter language or Ctrl-c: ") (flush)<br />
(translations (read-line) :badinput))<br />
<br />
(defn arch-is-the-best []<br />
(loop [choice (read-choice)]<br />
(case choice<br />
:badinput (do (print "\nBad input!\n")<br />
(recur (read-choice)))<br />
(do (print "\n" choice "\n")<br />
(recur (read-choice))))))<br />
or<br />
(def translations {"english" "Arch is the best!",<br />
"german" "Arch ist das Beste!",<br />
"australian" "Arch is fair dinkum, mate!",<br />
"h4x0r" "arhc 51 7he be57!",<br />
"spanish" "¡Arch es el mejor!"<br />
"street" "Arch iz da shizzle ma nizzle"})<br />
(while 1<br />
(println "\nPick a language:\n" (map #(key %) translations) "\n language: ")<br />
(println (translations (read-line) "Not a valid language")))<br />
<br />
<br />
or<br />
(prn "Arch is the best!")<br />
<br />
'''Common Lisp''' - Tested on SBCL, feel free to add more of the translations.<br />
#!/usr/bin/sbcl --script<br />
(defparameter *best-list* '((English "Arch is the best!")<br />
(Chinese "Arch, 她出类拔萃!")<br />
(German "Arch ist das Beste!")<br />
(Greek "Το Arch είναι το καλύτερο!")))<br />
(defun aitb ()<br />
(format t "Available languages: ~{~{~@(~a~)~*~}~^, ~}.~%" *best-list*)<br />
(loop for input = (progn (format t "~&Input the desired language, (or 'quit'): ~%")<br />
(force-output)<br />
(read-line))<br />
if (string-equal input "quit")<br />
do (loop-finish)<br />
else<br />
do (let ((language-def<br />
(assoc input *best-list*<br />
:key (lambda (lang) (symbol-name lang))<br />
:test #'string-equal)))<br />
(if language-def<br />
(format t "~&~A~%" (second language-def))<br />
(format t "~&Invalid language.~%"))))<br />
(format t "~&May the Arch be with you!~%"))<br />
(aitb)<br />
<br />
<br />
'''Common Lisp (Alternate)''' - Should run on any implementation (Clisp, Allegro, SBCL...)<br />
(princ "Arch is the best!")<br />
<br />
<br />
'''D''' - A C-style language. The benefits of hindsight, with modern conveniences.<br />
import std.stdio : writeln;<br />
void main()<br />
{<br />
writeln("Arch is the best");<br />
}<br />
<br />
<br />
'''Dart''' - Google's javascript killer<br />
main(){<br />
print('Arch is the best');<br />
}<br />
<br />
'''Emacs Lisp''' - A dialect of the Lisp programming language used by the GNU Emacs and XEmacs text editors <br />
(message "Arch is the best!")<br />
<br />
<br />
'''Erlang''' - A concurrent, garbage-collected programming language and runtime system.<br />
-module(arch).<br />
-export([is_the_best/0]).<br />
is_the_best() -> io:fwrite("Arch is the best!\n").<br />
<br />
Or using message passing between processes<br />
<br />
-module(arch).<br />
-export([ultimate_question/0,the_answer/0]).<br />
the_answer() -><br />
receive<br />
{Client,who_is_the_best} -><br />
Client ! {self(),"Arch is the best!"};<br />
{Client,_} -><br />
Client ! {self(),"Taco Taco Taco!"}<br />
end,<br />
the_answer().<br />
ultimate_question() -><br />
Pid = spawn(arch,the_answer,[]),<br />
Pid ! {self(),who_is_the_best},<br />
receive<br />
{Pid,Response} -> io:format("~s~n",[Response])<br />
end.<br />
<br />
'''F#''' - A strongly-typed, functional-first programming language for writing simple code to solve complex problems.<br />
printfn "Arch is the best!"<br />
<br />
'''Factor''' - High-level stack-based language.<br />
"Arch is the best" print<br />
<br />
'''FIM++''' - A wordy, imperative, dynamically-typed, and interpreted language that can use Java classes.<br />
Dear Princess Celestia: Letter About Arch Linux.<br />
Today I learned:<br />
I wrote "Arch is the best!".<br />
Your faithful student, Twilight Sparkle<br />
<br />
'''Forth''' - Stack-based language.<br />
." Arch is the best" cr -- kiss way<br />
<br />
'''Fortran95'''<br />
program arch<br />
print *,"Arch is the best!"<br />
end program arch<br />
<br />
'''Genie''' - A new programming language, that allows for a more modern programming style while being able to effortlessly create and use GObjects natively. <br />
init<br />
print "Arch is the best"<br />
<br />
<br />
'''Gjs''' - A Javascript binding for GNOME. It's mainly based on Spidermonkey javascript engine and the GObject introspection framework.<br />
#!/usr/bin/env gjs<br />
print ('Arch is the best');<br />
<br />
<br />
'''Go''' - A language created by Google that's a love child between C, C++ and Python.<br />
package main<br />
<br />
import "fmt"<br />
<br />
func main() {<br />
fmt.Println("Arch is the best!")<br />
}<br />
<br />
<br />
'''Haskell''' - The language where IO is easy and unproblematic.<br />
main = putStrLn "Arch is the best!"<br />
<br />
<br />
'''HTML''' - A markup language used to create and define web pages and their content.<br />
<pre><br />
<!DOCTYPE html><br />
<html lang='en'><br />
<head><br />
<title>Arch is the best!</title><br />
</head><br />
<body><br />
<p>Arch is the best!</p><br />
</body><br />
</html><br />
</pre><br />
<br />
'''Io''' - A pure object-oriented programming language inspired by Smalltalk, Self, Lua, Lisp, Act1, and NewtonScript.<br />
"Arch is the best!" println<br />
<br />
<br />
'''Java''' - An extremely portable language, this will run on pretty much anything, it might even run on your toaster!<br />
public class ArchIsTheBest {<br />
public static void main(String[] args) {<br />
System.out.println("Arch is the best!");<br />
}<br />
}<br />
<br />
<br />
'''JavaScript''' - Also known as ECMAScript, a prototype-based object-oriented scripting language. <br />
console.log('Arch is the best!');<br />
<br />
<br />
'''JavaScript (in a web browser)'''<br />
alert('Arch is the best!');<br />
<br />
<br />
'''LilyPond''' - A powerful music engraving program with an intuitive LaTeX-like input language.<br />
\version "2.12.3"<br />
\include "english.ly"<br />
\header { title = "Arch is the best!" }<br />
\score<br />
{<br />
<<<br />
\relative c' { c4 e g c \bar "||" }<br />
\addlyrics { Arch is the best! }<br />
>><br />
}<br />
<br />
<br />
'''LOLCODE''' - Why not?<br />
HAI<br />
CAN HAS STDIO?<br />
VISIBLE "ARCH IS TEH PWNZ LOL!"<br />
KTHXBYE<br />
<br />
<br />
'''Lua''' - A lightweight, extensible programming language.<br />
print "Arch is the best!"<br />
<br />
'''Morpho''' - Morpho is a multi-paradigm programming language that supports procedural, object-oriented and functional programming. <br />
<br />
writeln("Arch is the best!");<br />
<br />
<br />
'''Nasm(x86_64) (or yasm)''' - Notice that the string is in the .text section, which feels superior<br />
<br />
;nasm -f elf64 arch.asm<br />
;ld -o arch arch.o<br />
;./arch<br />
<br />
section .text<br />
global _start<br />
_start:<br />
mov edx,len<br />
mov ecx,msg<br />
mov ebx,1<br />
mov eax,4<br />
int 0x80<br />
xor ebx,ebx<br />
mov eax,1<br />
int 0x80<br />
msg: db "Arch is the best!",10<br />
len equ $-msg<br />
<br />
<br />
'''Nimrod''' - Portable lightweight programming language.<br />
echo "Arch is the best!"<br />
<br />
<br />
'''node.js''' - a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications, using an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.<br />
console.log('Arch is the best!');<br />
<br />
<br />
'''Objective-C''' - A reflective, object-oriented programming language that adds Smalltalk-style messaging to the C programming language.<br />
NSLog(@"Arch is the best!");<br />
<br />
<br />
'''OCaml''' - The main implementation of the Caml programming language.<br />
print_endline "Arch is the best!"<br />
<br />
'''Octave''' - High-level interpreted language, primarily intended for numerical computations.<br />
printf("Arch is the best!\n")<br />
<br />
'''Ook!''' - brainfuck, translated to Orangutan<br />
Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook! Ook? Ook. Ook? Ook! Ook? Ook! Ook! Ook. Ook? Ook. Ook. Ook? Ook. Ook? Ook! Ook? Ook. Ook! Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook? Ook! Ook. Ook? Ook. Ook? Ook! Ook. Ook? Ook. Ook! Ook? Ook! Ook! Ook? Ook! Ook. Ook? Ook! Ook? Ook! Ook! Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook! Ook! Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook? Ook! Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook! Ook. Ook! Ook? Ook! Ook! Ook? Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook.<br />
<br />
<br />
'''Pascal''' - An influential imperative and procedural programming language.<br />
program ArchIsTheBest;<br />
begin<br />
writeln('Arch is the best!');<br />
end.<br />
<br />
<br />
'''Perl''' - A high-level, general-purpose, interpreted, dynamic programming language.<br />
#!/usr/bin/perl<br />
print "Arch is the best!\n";<br />
<br />
<br />
'''PHP''' - A general-purpose scripting language.<br />
<?php<br />
echo "Arch is the best!\n";<br />
?> <br />
<br />
<br />
'''Pixilang''' - Make me pixels.<br />
print("Arch is the best!",0,0,#1897D1)<br />
frame<br />
<br />
<br />
'''Portable GNU assembler''' - as -o arch.o arch.s && ld -o arch -O0 arch.o<br />
<br />
.section .data<br />
archIsBest: <br />
.ascii "Arch is the best!\n"<br />
archIsBest_len:<br />
.long . - archIsBest<br />
.section .text<br />
.globl _start<br />
_start:<br />
xorl %ebx, %ebx<br />
movl $4, %eax <br />
xorl %ebx, %ebx<br />
incl %ebx <br />
leal archIsBest, %ecx<br />
movl archIsBest_len, %edx <br />
int $0x80 <br />
xorl %eax, %eax<br />
incl %eax<br />
xorl %ebx, %ebx <br />
int $0x80<br />
<br />
<br />
'''Processing''' - An open source programming language and IDE built for the electronic arts and visual design.<br />
println("Arch is the best!");<br />
<br />
<br />
'''Prolog''' - A general purpose logic programming language associated with artificial intelligence and computational linguistics.<br />
format('Arch is the best~n',[]).<br />
<br />
<br />
'''Python''' - A general-purpose high-level programming language.<br />
#!/usr/bin/env python3<br />
print('Arch is the best!')<br />
<br />
<br />
'''QBASIC''' - An interpreter for a variant of the BASIC programming language which is based on QuickBASIC.<br />
PRINT "Arch is the best!"<br />
<br />
<br />
'''R''' - A language for statistical computing (and much more!).<br />
archIsBest <- function() { cat("Arch is the best!\n") }<br />
archIsBest()<br />
<br />
<br />
'''Ruby''' - A dynamic, reflective, general purpose object-oriented programming language.<br />
#!/usr/bin/ruby -w<br />
puts 'Arch is the best!'<br />
<br />
<br />
'''Rust''' - Rust is a systems programming language that runs blazingly fast, prevents almost all crashes, and eliminates data races. <br />
fn main() {<br />
println!("Arch is the best!");<br />
}<br />
<br />
<br />
'''Scala''' - A multi paradigm language that runs on the JVM<br />
object ArchIsBest extends App {<br />
println("Arch is the best!")<br />
} <br />
<br />
<br />
<br />
'''Scheme''' - A dialect of Lisp.<br />
(display "Arch is the best!\n")<br />
or in XunDu style<br />
#!/usr/bin/guile1.8 -s<br />
!#<br />
(define 节 or)<br />
(define 哀 #t)<br />
(define (xi) (display "Arch is the best!\n"))<br />
(节 (xi) 哀 (wen) 顺 (le) 变 (jian) )<br />
<br />
<br />
'''Seed''' - A library and interpreter, dynamically bridging the WebKit JavaScriptCore engine, with the GNOME platform.<br />
#!/usr/bin/env seed<br />
print ('Arch is the best');<br />
<br />
<br />
'''Shoes''' - A Ruby version using Shoes for a GUI<br />
Shoes.app :width => 135, :height => 30 do <br />
para "Arch is the Best!"<br />
end<br />
<br />
<br />
'''SQL''' - Structured Query Language, the query language for relational databases<br />
SELECT 'Arch is the best!';<br />
SELECT 'Arch is the best!' from dual; -- for Oracle DB<br />
<br />
<br />
'''Standard ML''' - A general-purpose, modular, functional programming language with compile-time type checking and type inference.<br />
print "Arch is the best!\n"<br />
<br />
<br />
'''Tcl/Tk''' - A scripting language that is commonly used for rapid prototyping, scripted applications, GUIs and testing.<br />
#!/usr/bin/env tclsh<br />
puts "Arch is the best!"<br />
<br />
<br />
'''Vala''' - Vala is a new programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C<br />
void main(string[] args) {<br />
stdout.printf("\nArch is the best!\n\n");<br />
}<br />
<br />
<br />
''' Wiring (Arduino)''' - Built on Processing, the open source programming language developed at the Massachusetts Institute of Technology.<br />
void setup() <br />
{<br />
Serial.begin(9600); <br />
}<br />
void loop() <br />
{ <br />
Serial.print("Arch is the best!");<br />
}<br />
<br />
<br />
''' X11 ''' - X11 is an architecture independent system for display of graphical user interfaces.<br />
#include <stdio.h><br />
#include <stdlib.h><br />
#include <string.h><br />
<br />
#include <X11/Xlib.h><br />
<br />
int main()<br />
{<br />
Display *d;<br />
Window w;<br />
XEvent e;<br />
int s;<br />
<br />
if (!(d = XOpenDisplay(NULL))) {<br />
fprintf(stderr, "Couldn't open display, but Arch is the best!\n");<br />
exit(1);<br />
}<br />
<br />
s = DefaultScreen(d);<br />
w = XCreateSimpleWindow(d, RootWindow(d,s), 0, 0, 110, 20, 0, <br />
0, WhitePixel(d,s));<br />
XSelectInput(d, w, ExposureMask | KeyPressMask);<br />
XMapWindow(d,w);<br />
<br />
while (1) {<br />
XNextEvent(d, &e);<br />
if (e.type == Expose) {<br />
XDrawString(d, w, DefaultGC(d, s), 5, 15, "Arch is the best!", 17);<br />
}<br />
}<br />
<br />
XCloseDisplay(d);<br />
return 0;<br />
}<br />
<br />
==Translations==<br />
<br />
'''Ancient Chinese'''<br />
阿祺,盡善矣。<br />
<br />
'''Ancient Greek'''<br />
Ἡ Ἀψίς ἄριστην ἐστί!<br />
<br />
'''Arabic'''<br />
ارتش هو الأفضل<br />
<br />
'''Australian'''<br />
Arch is fair dinkum, mate!<br />
<br />
'''Bahasa Indonesia'''<br />
Arch terbaik!<br />
<br />
'''Basque'''<br />
Arch onena da!<br />
<br />
'''Belarusian'''<br />
Арч - самы лепшы!<br />
<br />
'''Bengali'''<br />
আর্চ সবচেয়ে ভালো!<br />
<br />
'''British'''<br />
Arch is simply spiffing.<br />
<br />
'''Bulgarian'''<br />
Арч е най-добрият!<br />
<br />
'''Catalan'''<br />
Arch és el millor!<br />
<br />
'''Chinese (Simplified)'''<br />
Arch 最棒了!<br />
<br />
'''Chinese (Traditional)'''<br />
狀哉我大 Arch!<br />
<br />
'''Chinese (Taobao Style - 淘宝体)'''<br />
Arch,好评哦,亲!<br />
<br />
'''Czech'''<br />
Arch je nejlepší!<br />
<br />
'''Croatian'''<br />
Arch je najbolji!<br />
<br />
'''Danish'''<br />
Arch er bedst!<br />
<br />
'''Dutch'''<br />
Arch is de beste!<br />
<br />
'''Esperanto'''<br />
Arch plejbonas!<br />
<br />
'''Estonian'''<br />
Arch on parim!<br />
<br />
'''Fikonspråket'''<br />
Firch Arkon fir äkon fist bäkon<br />
<br />
'''Filipino'''<br />
Mabuhay ang Arch!<br />
<br />
'''Finnish'''<br />
Arch on paras!<br />
<br />
'''French'''<br />
Arch est le meilleur!<br />
<br />
'''Galician'''<br />
Arch é o mellor!<br />
<br />
'''German'''<br />
Arch ist das Beste!<br />
<br />
'''Greek (Modern)'''<br />
Το Αρτς είναι το καλύτερο!<br />
<br />
'''Haitian Creole'''<br />
Arch se meye bagay!<br />
<br />
'''Hantec'''<br />
Arch je nejbetélnější!<br />
<br />
'''Hebrew'''<br />
ארצ' זה הכי אחי!<br />
<br />
'''Hindi'''<br />
आर्च सर्वोत्तम है ।<br />
<br />
'''Hungarian'''<br />
Az Arch a legjobb!<br />
<br />
'''Irish'''<br />
Arch é is fearr!<br />
<br />
'''Italian'''<br />
Arch è il migliore!<br />
<br />
'''Japanese'''<br />
Archが一番ですよ!<br />
<br />
'''Kazakh'''<br />
Арч - ең жақсы!<br />
<br />
'''Klingon'''<br />
Arch'pu'ta' 'a'<br />
<br />
'''Latin'''<br />
Arch optimus est!<br />
<br />
'''Latvian'''<br />
Arch ir labākais!<br />
<br />
'''Lithuanian'''<br />
Arch yra geriausias!<br />
<br />
'''Lojban'''<br />
la .artc. xagrai<br />
<br />
'''Malayalam'''<br />
ആർച് ആണ് ഏറ്റവും നല്ലത് <br />
<br />
'''Marathi'''<br />
आर्च सगळ्यात भारी आहे!<br />
<br />
'''Norwegian'''<br />
Arch er best!<br />
<br />
'''Old English'''<br />
Arch biþ betst!<br />
<br />
'''Persian'''<br />
طاق بزرگ است<br />
<br />
'''Pig Latin'''<br />
Archway isway ethay estbay!<br />
<br />
'''Polish'''<br />
Arch jest najlepszy!<br />
<br />
'''Portuguese'''<br />
Arch é o melhor!<br />
<br />
'''Québécois'''<br />
Arch est le plus meilleure du monde!<br />
<br />
'''Romanian'''<br />
Аrch e cel mai bun!<br />
<br />
'''Russian'''<br />
Арч — лучший!<br />
<br />
'''Serbian'''<br />
Arch je najbolji!<br />
<br />
'''Singaporean'''<br />
Arch the best lah!<br />
<br />
'''Slovenian'''<br />
Arch je najboljši!<br />
<br />
'''Spanish (Standard)'''<br />
¡Arch es el mejor!<br />
<br />
'''Spanish (Argentina)'''<br />
Arch es una mazza!!<br />
<br />
'''Spanish (Chile)'''<br />
Arch es bacán<br />
<br />
'''Spanish (Chile, alternative)'''<br />
Arch es la raja<br />
<br />
'''Spanish (Chile, marginal)'''<br />
(written in IPA because standard Spanish doesn't have these sounds)<br />
ˈæɹʃ ɛːʰ tɜ.rˈiː.u.lɛ la rˈa.χa ʃʊ.ɹʊ<br />
<br />
'''Spanish (Uruguay)'''<br />
Arch la rompe!<br />
<br />
'''Swedish'''<br />
Arch är bäst!<br />
<br />
'''Turkish'''<br />
Arch en iyisidir!<br />
<br />
'''Tamil'''<br />
ஆர்ச்சே சிறந்தது!<br />
<br />
'''Telugu'''<br />
ఆర్చ్ ఉత్తమమైనది!<br />
<br />
'''Toki Pona'''<br />
Arch li pona mute!<br />
<br />
'''Ukrainian'''<br />
Arch є найкращий!<br />
<br />
'''Urdu'''<br />
آرچ سب سے بہتر ہے! <br />
<br />
'''Vietnamese'''<br />
Arch là tốt nhất!<br />
<br />
'''Welsh (Cymraeg)'''<br />
<br />
Emphasis on Arch:<br />
Arch sydd yr orau un!<br />
Arch sydd y gorau un!<br />
<br />
Emphasis on being the best (one):<br />
Yr orau un yw Arch!<br />
Y gorau un yw Arch!<br />
<br />
== Encodings ==<br />
<br />
'''ASCII Banner'''<br />
_ _ _ _ _ _ _ <br />
/\ | | (_) | | | | | | | | | |<br />
/ \ _ __ ___| |__ _ ___ | |_| |__ ___ | |__ ___ ___| |_| |<br />
/ /\ \ | '__/ __| '_ \ | / __| | __| '_ \ / _ \ | '_ \ / _ \/ __| __| |<br />
/ ____ \| | | (__| | | | | \__ \ | |_| | | | __/ | |_) | __/\__ \ |_|_|<br />
/_/ \_\_| \___|_| |_| |_|___/ \__|_| |_|\___| |_.__/ \___||___/\__(_)<br />
<br />
<br />
'''Base64'''<br />
QXJjaCBpcyB0aGUgYmVzdCEK<br />
<br />
'''Binary ASCII'''<br />
0100000101110010011000110110100000100000011010010111001100100000011101000110100001100101001000000110001001100101011100110111010000100001<br />
<br />
'''Braille'''<br />
⠁⠗⠉⠓⠀⠊⠎⠀⠮⠀⠃⠑⠎⠞⠲<br />
<br />
'''Desrever (Reversed)'''<br />
!tseb eht si hcrA<br />
<br />
'''h4x0r'''<br />
Arch 15 7h3 b357!<br />
<br />
'''Hexadecimal ASCII'''<br />
4172636820697320746865206265737421<br />
<br />
'''md5sum'''<br />
2d9092e089d77a8e23f47ba3dfe77027<br />
<br />
'''Morse Code'''<br />
.- .-. -.-. .... .. ... - .... . -... . ... -<br />
<br />
'''ROT13'''<br />
Nepu vf gur orfg!<br />
<br />
'''Upside Down'''<br />
¡ʇsǝq ǝɥʇ s! ɥɔɹ∀<br />
<br />
'''URL Encoded'''<br />
Arch%20is%20the%20best!</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=USB_flash_installation_medium&diff=334797USB flash installation medium2014-09-11T14:08:00Z<p>Sudowoodo: Happy September, I'm a bit late.</p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
[[ar:USB Installation Media]]<br />
[[bg:USB Installation Media]]<br />
[[de:Installation von einem USB-Stick]]<br />
[[es:USB Installation Media]]<br />
[[fr: Créer une clef USB avec l'ISO Arch Linux]]<br />
[[it:USB Installation Media]]<br />
[[ja:USB Installation Media]]<br />
[[ro:Instalare prin USB]]<br />
[[ru:USB Installation Media]]<br />
[[tr:USB_ile_kurulum]]<br />
[[zh-CN:USB Installation Media]]<br />
[[zh-TW:USB Installation Media]]<br />
{{Related articles start}}<br />
{{Related|CD Burning}}<br />
{{Related|Archiso}}<br />
{{Related articles end}}<br />
This page discusses various multi-platform methods on how to create a Arch Linux Installer USB drive (also referred to as ''"flash drive", "USB stick", "USB key"'', etc) for booting in BIOS and UEFI systems. The result will be a LiveUSB (LiveCD-like) system that can be used for installing Arch Linux, system maintenance or for recovery purposes, and that, because of the nature of [[Wikipedia:SquashFS|SquashFS]], will discard all changes once the computer shuts down.<br />
<br />
If you would like to run a full install of Arch Linux from a USB drive (i.e. with persistent settings), see [[Installing Arch Linux on a USB key]]. If you would like to use your bootable Arch Linux USB stick as a rescue USB, see [[Change Root]].<br />
<br />
== BIOS and UEFI Bootable USB ==<br />
<br />
=== Using dd ===<br />
{{Note|This method is recommended due to its simplicity. If it does not work, switch to the alternative method [[#Using manual formatting ]] below.}}<br />
<br />
{{Warning|This will irrevocably destroy all data on {{ic|/dev/sd'''x'''}}.}}<br />
<br />
==== In GNU/Linux ====<br />
<br />
{{Tip|Find out the name of your USB drive with {{ic|lsblk}}. Make sure that it is '''not''' mounted.}}<br />
<br />
Run the following command, replacing {{ic|/dev/'''sdx'''}} with your drive, e.g. {{ic|/dev/sdb}}. (do '''not''' append a partition number, so do '''not''' use something like {{ic|/dev/sdb'''1'''}})<br />
<br />
# dd bs=4M if=/path/to/archlinux.iso of=/dev/'''sdx''' && sync<br />
<br />
==== In Windows ====<br />
<br />
===== Using USBwriter =====<br />
<br />
This method does not require any workaround and is as straightforward as {{ic|dd}} under Linux. Just download the Arch Linux ISO, and use the [http://sourceforge.net/p/usbwriter/wiki/Documentation/ USBwriter] utility to write to your USB flash memory.<br />
<br />
===== Using Universal USB Installer =====<br />
<br />
This is probably the most straightforward way to create a bootable Arch Linux USB stick from Windows. Download [http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/ Universal USB Installer], which runs on Windows XP/Vista/7/8. There's no installation involved; you directly download a single executable. Download the Arch ISO file and run Universal-USB-Installer-1.9.5.2.exe (the version numbers will vary). The use of the program is fairly self-explanatory. You select the distribution you'd like to create a bootable USB for (Arch Linux), the ISO file you downloaded, and the USB flash drive you want to install to.<br />
<br />
{{Note|1= As of UUI 1.9.5.2, this does not work out-of-the-box because of a [https://bbs.archlinux.org/viewtopic.php?pid=1344629 discrepancy in syslinux versions].}}<br />
<br />
{{Tip|The Arch syslinux installer uses the USB disk label to facilitate mounting the correct drive. The current version of UUI (1.9.5.2) sets the disk label to UUI, when Arch is expecting something else. You can easily fix this by right-clicking the USB drive icon, and clicking on ''Properties'' to change the label. For archlinux-2014.09.03-dual.iso, the label should be {{ic|ARCH_201409}}. It should be clear what the label should be for other versions of the ISO, but in any case, Arch will tell you what the label needs to be if you attempt to boot from the USB with an incorrect label.}}<br />
<br />
{{Warning|Make sure you don't accidentally click on one of the ads on the pendrivelinux.com page which feature prominent ''Download'' buttons—these are likely to carry virus/spyware/trojan payloads. The Pendrive download button is small and near the middle of the page.}}<br />
<br />
===== Using Cygwin =====<br />
<br />
Make sure your [http://www.cygwin.com/ Cygwin] installation contains the {{ic|dd}} package.<br />
<br />
{{Tip|If you do not want to install Cygwin, you can download {{ic|dd}} for Windows from [http://www.chrysocome.net/dd here]. See the next section for more information.}}<br />
<br />
Place your image file in your home directory:<br />
<br />
C:\cygwin\home\John\<br />
<br />
Run cygwin as administrator (required for cygwin to access hardware). To write to your USB drive use the following command:<br />
<br />
dd if=image.iso of=\\.\'''x''': bs=4M<br />
<br />
where image.iso is the path to the iso image file within the {{ic|cygwin}} directory and {{ic|\\.\'''x''':}} is your USB flash drive where {{ic|'''x'''}} is the windows designated letter, e.g. {{ic|\\.\d:}}.<br />
<br />
On Cygwin 6.0, find out the correct partition with:<br />
<br />
cat /proc/partitions<br />
<br />
and write the ISO image with the information from the output. Example:<br />
<br />
{{Warning|This will irrevocably delete all files on your USB flash drive, so make sure you do not have any important files on the flash drive before doing this.}}<br />
<br />
dd if=image.iso of=/dev/sdb bs=4M<br />
<br />
===== dd for Windows =====<br />
<br />
{{Note|Some users have an "isolinux.bin missing or corrupt" problem when booting the media with this method.}}<br />
<br />
A GPL licensed dd version for Windows is available at http://www.chrysocome.net/dd. The advantage of this over Cygwin is a smaller download. Use it as shown in instructions for Cygwin above.<br />
<br />
To begin, download the latest version of dd for Windows. Once downloaded, extract the archive's contents into Downloads or elsewhere.<br />
<br />
Now, launch your {{ic|command prompt}} as an administrator. Next, change directory ({{ic|cd}}) into the Downloads directory.<br />
<br />
If your Arch Linux ISO is elsewhere you may need to state the full path, for convenience you may wish to put the Arch Linux ISO into the same folder as the dd executable. The basic format of the command will look like this.<br />
<br />
dd if=archlinux-2014-XX-xx-dual.iso of=\\.\x: bs=4m<br />
<br />
{{Warning|This command will replace the drive's contents and its formatting with the ISO's. You will likely be unable to recover its contents in the event of an accidental copy. Be absolutely sure that you are directing dd to the correct drive before executing!}}<br />
Simply replace the various null spots (indicated by an "x") with the correct date and correct drive letter.<br />
<br />
Here is a complete example.<br />
<br />
dd if=ISOs\archlinux-2014.09.03-dual.iso of=\\.\d: bs=4M<br />
<br />
==== In Mac OS X ====<br />
<br />
To be able to use {{ic|dd}} on your USB device on a Mac you have to do some special maneuvers. First of all insert your usb device, OS X will automount it, and in {{ic|Terminal.app}} run:<br />
<br />
$ diskutil list<br />
<br />
Figure out what your USB device is called with {{ic|mount}} or {{ic|<nowiki>sudo dmesg | tail</nowiki>}} (e.g. {{ic|/dev/disk1}}) and unmount the partitions on the device (i.e., /dev/disk1s1) while keeping the device proper (i.e., /dev/disk1):<br />
<br />
$ diskutil unmountDisk /dev/disk1<br />
<br />
Now we can continue in accordance with the instructions above (but, if you are using the OS X {{ic|dd}}, use {{ic|/dev/rdisk}} instead of {{ic|/dev/disk}}, and use {{ic|1=bs=1m}}. {{ic|rdisk}} means "raw disk" and is much faster on OS X, and {{ic|1=bs=1m}} indicates a 1 MB block size).<br />
<br />
{{hc|<nowiki># dd if=image.iso of=/dev/rdisk1 bs=1m</nowiki>|<br />
20480+0 records in<br />
20480+0 records out<br />
167772160 bytes transferred in 220.016918 secs (762542 bytes/sec)<br />
}}<br />
<br />
It is probably a good idea to eject your drive before physical removal at this point:<br />
<br />
$ diskutil eject /dev/disk1<br />
<br />
==== How to restore the USB drive ====<br />
<br />
Because the ISO image is a hybrid which can either be burned to a disc or directly written to a USB drive, it does not include a standard partition table.<br />
<br />
After you install Arch Linux and you are done with the USB drive, you should zero out its first 512 bytes ''(meaning the boot code from the MBR and the non-standard partition table)'' if you want to restore it to full capacity:<br />
<br />
# dd count=1 bs=512 if=/dev/zero of=/dev/sd'''x''' && sync<br />
<br />
Then create a new partition table (e.g. "msdos") and filesystem (e.g. EXT4, FAT32) using {{Pkg|gparted}}, or from a terminal:<br />
<br />
* For EXT2/3/4 (adjust accordingly), it would be:<br />
<br />
# cfdisk /dev/sd'''x'''<br />
# mkfs.ext4 /dev/sd'''x1'''<br />
# e2label /dev/sd'''x1''' USB_STICK<br />
<br />
* For FAT32, install the {{Pkg|dosfstools}} package and run:<br />
<br />
# cfdisk /dev/sd'''x'''<br />
# mkfs.vfat -F32 /dev/sd'''x1'''<br />
# dosfslabel /dev/sd'''x1''' USB_STICK<br />
<br />
=== Using manual formatting===<br />
<br />
==== In GNU/Linux ====<br />
<br />
This method is more complicated than writing the image directly with {{ic|dd}}, but it does keep the flash drive usable for data storage (that is, the ISO is installed in a specific partition within the already [[Partitioning|partitioned device]] without altering other partitions).<br />
<br />
{{Note|Here, we will denote the targeted partition as {{ic|/dev/sd'''Xn'''}}. In any of the following commands, adjust '''X''' and '''n''' according to your system.}}<br />
<br />
* Make sure that the latest ''syslinux'' package (version 6.02 or newer) is installed on the system. <br />
<br />
* If not done yet, create the partition table and/or partition on the device before continuing. The partition {{ic|/dev/sd'''Xn'''}} must be formatted to FAT32.<br />
<br />
* Mount the ISO image, the FAT32 filesystem located in the USB flash device, and copy the contents of the ISO image to it. Unmount the ISO image, but keep the FAT32 partition mounted for following steps:<br />
# mkdir -p /mnt/{iso,usb}<br />
# mount -o loop archlinux-2014.09.03-dual.iso /mnt/iso<br />
# mount /dev/sd'''Xn''' /mnt/usb<br />
# cp -a /mnt/iso/* /mnt/usb<br />
# sync<br />
# umount /mnt/iso<br />
<br />
* {{Note|The following step is not required when using [[Archboot]] instead of [[Archiso]].}} To boot either a label or an [[UUID]] to select the partition to boot from is required. By default the label {{ic|ARCH_2014'''XX'''}} (with the appropriate release month) is used. Thus, the partition’s label has to be set accordingly, for example using ''gparted''. Alternatively, you can change this behaviour by altering the lines ending by {{ic|1=archisolabel=ARCH_2014'''XX'''}} in files ''/mnt/usb/arch/boot/syslinux/archiso_sys32.cfg'' and ''archiso_sys64.cfg'', as well as ''/mnt/usb/loader/entries/archiso-x86_64.conf'' or similar for a 32-bit ISO (the last being useful only, if you want to boot the USB flash device from an EFI system). To use an UUID instead, replace those portions of lines with {{ic|1=archiso''device''=/dev/disk/by-uuid/'''YOUR-UUID'''}}. The UUID can be retrieved with {{ic|1=blkid -o value -s UUID /dev/sd'''Xn'''}}.<br />
<br />
{{Warning|Mismatching labels or wrong UUID prevents booting from the created medium.}}<br />
<br />
* Syslinux is already preinstalled in ''/mnt/usb/arch/boot/syslinux''. Install it completely to that folder by following [[Syslinux#Manual_install]]. Instructions are reproduced here for convenience.<br />
** Overwrite the existing syslinux modules ({{ic|*.c32}} files) present in the USB (from the ISO) with the ones from the syslinux package. This is necessary to avoid boot failure because of a possible version mismatch.<br />
** Run:<br />
# extlinux --install /mnt/usb/arch/boot/syslinux<br />
** Unmount the partition ({{ic|umount /mnt/usb}}) and install the MBR or GPT partition table to the USB device as described in the page mentioned.<br />
<br />
* Mark the partition as active (or “bootable”).<br />
<br />
==== In Windows ====<br />
<br />
{{Note|<br />
* For manual formatting, do not use any '''Bootable USB Creator utility''' for creating the UEFI bootable USB. For manual formatting, do not use ''dd for Windows'' to dd the ISO to the USB drive either.<br />
<br />
* In the below commands, '''X:''' is assumed to be the USB flash drive in Windows.<br />
<br />
* Windows uses backward slash {{ic|\}} as path-separator, so the same is used in the below commands.<br />
<br />
* All commands should be run in Windows command prompt '''as administrator'''.<br />
<br />
* {{ic|>}} denotes the Windows command prompt.<br />
}}<br />
<br />
* Partition and format the USB drive using [http://rufus.akeo.ie/ Rufus USB partitioner]. Select partition scheme option as '''MBR for BIOS and UEFI''' and File system as '''FAT32'''. Uncheck "Create a bootable disk using ISO image" and "Create extended label and icon files" options.<br />
<br />
* Change the '''Volume Label''' of the USB flash drive {{ic|X:}} to match the LABEL mentioned in the {{ic|1=archisolabel=}} part in {{ic|<ISO>\loader\entries\archiso-x86_64.conf}}. This step is required for Official ISO ([[Archiso]]) but not required for [[Archboot]]. This step can be also performed using Rufus, during the prior "partition and format" step.<br />
<br />
* Extract the ISO (similar to extracting ZIP archive) to the USB flash drive (using [http://7-zip.org/ 7-Zip]. <br />
<br />
* Download official syslinux 6.xx binaries (zip file) from https://www.kernel.org/pub/linux/utils/boot/syslinux/ and extract it. The version of Syslinux should be the same version used in the ISO image.<br />
<br />
* Run the following command (in Windows cmd prompt, as admin):<br />
<br />
{{Note|Use {{ic|X:\boot\syslinux\}} for Archboot iso.}}<br />
<br />
> cd bios\<br />
> for /r %Y in (*.c32) do copy "%Y" "X:\arch\boot\syslinux\" /y<br />
> copy mbr\*.bin X:\arch\boot\syslinux\ /y<br />
<br />
* Install Syslinux to the USB by running (use {{ic|win64\syslinux64.exe}} for x64 Windows):<br />
<br />
{{Note|Use {{ic|-d /boot/syslinux}} for Archboot iso.}}<br />
<br />
> cd bios\<br />
> win32\syslinux.exe -d /arch/boot/syslinux -i -a -m X:<br />
<br />
{{Note|<br />
* The above step installs Syslinux's {{ic|ldlinux.sys}} to the VBR of the USB partition, sets the partition as "active/boot" in the MBR partition table and writes the MBR boot code to the 1st 440-byte boot code region of the USB.<br />
<br />
* The {{ic|-d}} switch expects a path with forward slash path-separator like in *unix systems.<br />
}}<br />
<br />
== Other Methods for BIOS systems ==<br />
<br />
=== In GNU/Linux ===<br />
<br />
==== Using a multiboot USB drive ====<br />
This allows booting multiple ISOs from a single USB device, including the archiso. Updating an existing USB drive to a more recent ISO is simpler than for most other methods. See [[Multiboot USB drive]].<br />
<br />
==== Using UNetbootin ====<br />
<br />
UNetbootin can be used on any Linux distribution or Windows to copy your iso to a USB device. However, Unetbootin overwrites syslinux.cfg, so it creates a USB device that does not boot properly. For this reason, '''Unetbootin is not recommended''' -- please use {{ic|dd}} or one of the other methods discussed in this topic.<br />
{{Warning|UNetbootin writes over the default {{ic|syslinux.cfg}}; this must be restored before the USB device will boot properly.}}<br />
<br />
Edit {{ic|syslinux.cfg}}:<br />
<br />
{{hc|sysconfig.cfg|2=<br />
default menu.c32<br />
prompt 0<br />
menu title Archlinux Installer<br />
timeout 100<br />
<br />
label unetbootindefault<br />
menu label Archlinux_x86_64<br />
kernel /arch/boot/x86_64/vmlinuz<br />
append initrd=/arch/boot/x86_64/archiso.img archisodevice=/dev/sd'''x1''' ../../<br />
<br />
label ubnentry0<br />
menu label Archlinux_i686<br />
kernel /arch/boot/i686/vmlinuz<br />
append initrd=/arch/boot/i686/archiso.img archisodevice=/dev/sd'''x1''' ../../<br />
}}<br />
<br />
In {{ic|/dev/sd'''x1'''}} you must replace '''x''' with the first free letter after the last letter in use on the system where you are installing Arch Linux (e.g. if you have two hard drives, use {{ic|c}}.). You can make this change during the first phase of boot by pressing {{ic|Tab}} when the menu is shown.<br />
<br />
=== In Windows ===<br />
<br />
==== Win32 Disk Imager ====<br />
<br />
{{Warning|This will destroy all information on your USB flash drive!}}<br />
First, download the program from [http://sourceforge.net/projects/win32diskimager/ here]. Next, extract the archive and run the executable. Now, select the Arch Linux ISO under the {{ic|Image File}} section and the USB flash device letter (for example, [D:\]) under the {{ic|Device}} section. Finally, click {{ic|Write}} when ready.<br />
{{Note|After installation, you may need to restore the USB flash drive following a process as outlined [[USB_Installation_Media#How_to_restore_the_USB_drive|here]].}}<br />
<br />
==== USBWriter for Windows ====<br />
<br />
Download the program from http://sourceforge.net/projects/usbwriter/ and run it. Select the arch image file, the target USB stick, and click on the {{ic|write}} button. Now you should be able to boot from the usb stick and install Arch Linux from it.<br />
<br />
==== The Flashnul way ====<br />
<br />
[http://shounen.ru/soft/flashnul/ flashnul] is an utility to verify the functionality and maintenance of Flash-Memory (USB-Flash, IDE-Flash, SecureDigital, MMC, MemoryStick, SmartMedia, XD, CompactFlash etc).<br />
<br />
From a command prompt, invoke flashnul with {{ic|-p}}, and determine which device index is your USB drive, e.g.:<br />
<br />
{{hc|C:\>flashnul -p|<br />
Avaible physical drives:<br />
Avaible logical disks:<br />
C:\<br />
D:\<br />
E:\<br />
}}<br />
<br />
When you have determined which device is the correct one, you can write the image to your drive, by invoking flashnul with the device index, {{ic|-L}}, and the path to your image, e.g:<br />
<br />
C:\>flashnul '''E:''' -L ''path\to\arch.iso''<br />
<br />
As long as you are really sure you want to write the data, type yes, then wait a bit for it to write. If you get an access denied error, close any Explorer windows you have open.<br />
<br />
If under Vista or Win7, you should open the console as administrator, or else flashnul will fail to open the stick as a block device and will only be able to write via the drive handle windows provides<br />
<br />
{{Note|Confirmed that you need to use drive letter as opposed to number. flashnul 1rc1, Windows 7 x64.}}<br />
<br />
==== Loading the installation media from RAM ====<br />
<br />
This method uses [[Syslinux]] and a [[Ramdisk]] ([http://www.syslinux.org/wiki/index.php/MEMDISK MEMDISK]) to load the entire Arch Linux ISO image into RAM. Since this will be running entirely from system memory, you will need to make sure the system you will be installing this on has an adequate amount. A minimum amount of RAM between 500 MB and 1 GB should suffice for a MEMDISK based, Arch Linux install.<br />
<br />
For more information on Arch Linux system requirements as well as those for MEMDISK see the [[Beginners' guide]] and [http://www.etherboot.org/wiki/bootingmemdisk#preliminaries here].<br />
{{Tip|Once the installer has completed loading you can simply remove the USB stick and even use it on a different machine to start the process all over again. Utilizing MEMDISK also allows booting and installing Arch Linux to and from the same USB flash drive.}}<br />
<br />
===== Preparing the USB flash drive =====<br />
<br />
Begin by formatting the USB flash drive as '''FAT32'''. Then create the following folders on the newly formatted drive.<br />
* {{ic|Boot}}<br />
** {{ic|Boot/ISOs}}<br />
** {{ic|Boot/Settings}}<br />
<br />
===== Copy the needed files to the USB flash drive =====<br />
<br />
Next copy the ISO that you would like to boot to the {{ic|Boot/ISOs}} folder. After that, extract from the following files from the latest release of {{pkg|syslinux}} from [http://www.kernel.org/pub/linux/utils/boot/syslinux/ here] and copy them into the following folders.<br />
* {{ic|./win32/syslinux.exe}} to the Desktop or Downloads folder on your system.<br />
* {{ic|./memdisk/memdisk}} to the {{ic|Settings}} folder on your USB flash drive.<br />
<br />
===== Create the configuration file =====<br />
<br />
After copying the needed files, navigate to the USB flash drive, /boot/Settings and create a {{ic|syslinux.cfg}} file.<br />
{{Warning|On the {{ic|INITRD}} line, be sure to use the name of the ISO file that you copied to your {{ic|ISOs}} folder!}}<br />
{{hc|/Boot/Settings/syslinux.cfg|2=<br />
DEFAULT arch_iso<br />
<br />
LABEL arch_iso<br />
MENU LABEL Arch Setup<br />
LINUX memdisk<br />
INITRD /Boot/ISOs/archlinux-2014.09.03-dual.iso<br />
APPEND iso}}<br />
For more information on Syslinux see the [[Syslinux|Arch Wiki article]].<br />
<br />
===== Final steps =====<br />
<br />
Finally, create a {{ic|*.bat}} file where {{ic|syslinux.exe}} is located and run it ("Run as administrator" if you are on Vista or Windows 7):<br />
{{hc|C:\Documents and Settings\username\Desktop\install.bat|<br />
@echo off<br />
syslinux.exe -m -a -d /Boot/Settings X:}}<br />
<br />
== Troubleshooting ==<br />
<br />
* For the [[#Loading the installation media from RAM|MEMDISK Method]], if you get the famous "30 seconds" error trying to boot the i686 version, press the {{ic|Tab}} key over the {{ic|Boot Arch Linux (i686)}} entry and add {{ic|vmalloc&#61;448M}} at the end. For reference: ''If your image is bigger than 128MiB and you have a 32-bit OS, then you have to increase the maximum memory usage of vmalloc''. [http://www.syslinux.org/wiki/index.php/MEMDISK#-_memdiskfind_in_combination_with_phram_and_mtdblock]<br />
<br />
* If you get the "30 seconds" error due to the {{ic|/dev/disk/by-label/ARCH_XXXXYY}} not mounting, try renaming your USB media to {{ic|ARCH_XXXXYY}} (e.g. {{ic|ARCH_201409}}).<br />
<br />
== See Also ==<br />
<br />
* [https://wiki.gentoo.org/wiki/LiveUSB/HOWTO Gentoo wiki - LiveUSB/HOWTO]<br />
* [https://fedoraproject.org/wiki/How_to_create_and_use_Live_USB Fedora wiki - How to create and use Live USB]<br />
* [http://en.opensuse.org/SDB:Live_USB_stick openSUSE wiki - SDB:Live USB stick]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=LibreOffice&diff=333700LibreOffice2014-09-03T16:09:24Z<p>Sudowoodo: /* Speed up LibreOffice */ Wording: remove "you"s.</p>
<hr />
<div>[[Category:Office]]<br />
[[ar:LibreOffice]]<br />
[[de:LibreOffice]]<br />
[[es:LibreOffice]]<br />
[[fr:LibreOffice]]<br />
[[it:LibreOffice]]<br />
[[ja:LibreOffice]]<br />
[[ru:LibreOffice]]<br />
[[zh-CN:LibreOffice]]<br />
{{Related articles start}}<br />
{{Related|Apache OpenOffice}}<br />
{{Related articles end}}<br />
<br />
From [http://www.libreoffice.org/ Home - LibreOffice]:<br />
<br />
:''LibreOffice is the free power-packed Open Source personal productivity suite for Windows, Macintosh and Linux, that gives you six feature-rich applications for all your document production and data processing needs: Writer, Calc, Impress, Draw, Math and Base. [http://www.libreoffice.org/get-help/ Support] and [http://www.libreoffice.org/get-help/documentation/ documentation] is free from our large, dedicated community of users, contributors and developers. [http://www.libreoffice.org/get-involved/ You, too, can also get involved!]''<br />
<br />
== LibreOffice in Arch Linux ==<br />
<br />
Official support for [[OpenOffice.org]] was dropped in favor of LibreOffice, the "Document Foundation" fork of the project, which also includes enhancements and additional features. See [https://mailman.archlinux.org/pipermail/arch-general/2011-March/018819.html Dropping Oracle OpenOffice (arch-general)].<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] one of the following groups from the [[official repositories]]: <br />
<br />
* {{Pkg|libreoffice-fresh}} is the feature branch, with new program enhancements.<br />
* {{Grp|libreoffice-still}} is the maintenance branch.<br />
<br />
{{Note|<br />
* The installation of at least 1 language pack is required. The default language is Afrikaans (because it is alphabetically the first provider of libreoffice-langpack). If you want the UK-English language pack, install {{Pkg|libreoffice-en-GB}}, not {{Pkg|libreoffice-uk}} (Ukrainian) or {{Pkg|libreoffice-br}} (Breton)!<br />
* The packages {{Pkg|libreoffice-still-kde4}} and {{Pkg|libreoffice-still-gnome}} are required for Qt and GTK+ visual integration respectively. See the [[#Theme|Theme]] section.<br />
* For SDK - use {{Pkg|libreoffice-fresh-sdk}} OR {{Pkg|libreoffice-still-sdk}} accordingly<br />
}}<br />
<br />
Check the optional dependencies pacman displays. A Java Runtime Environment is not required unless you want to use Libreoffice Base: see [[Java]]. You may need {{AUR|hsqldb2-java}} to use [https://wiki.documentfoundation.org/Base#Java_and_HSQLDB some modules] in LibreOffice Base.<br />
<br />
== Theme ==<br />
<br />
For [[Qt]] integration, install the package {{Pkg|libreoffice-still-kde4}}.<br />
For [[GTK+]] integration, install the package {{Pkg|libreoffice-still-gnome}}.<br />
{{Note|<br />
* Qt integration is able to mimic GTK+ theme. The command {{ic|qtconfig-qt4}} opens a window which let you choose.<br />
* Even if you are not running one of these desktop environments and thus do not need to "integrate" with them, you may still wish to install these packages so that LibreOffice will use non-default GTK+ or Qt themes. For example, LibreOffice on e17 uses the default "ugly" (aka "win95"/"win98") theme; installing libreoffice-still-gnome will allow you to select a more pleasant GTK+ theme.<br />
}}<br />
<br />
As of LibreOffice version 3.5.x it tries to magically autodetect your desktop UI using the following magic if proper libs will be found:<br />
gtk > kde4 > generic<br />
<br />
To force the use of a certain VCL UI interface use one of this:<br />
SAL_USE_VCLPLUGIN=gen lowriter<br />
SAL_USE_VCLPLUGIN=kde4 lowriter<br />
SAL_USE_VCLPLUGIN=gtk lowriter<br />
SAL_USE_VCLPLUGIN=gtk3 lowriter<br />
It is convenient to save {{ic|SAL_USE_VCLPLUGIN}} variable in your shell configuration file, e.g.{{ic|/etc/bash.bashrc}} or {{ic|~/.bashrc}} if using Bash.<br />
<br />
{{Note|The new GTK3 UI is still marked upstream as experimental and will only be available if you enable "experimental features" in LibreOffice main configuration dialog.}}<br />
<br />
However, if it looks like it is using Windows 95/98 icons, go to ''Tools > Options...'' in the menus (which presents the Options Dialog), then select ''LibreOffice > Accessibility'' and uncheck "Automatically detect high-contrast mode of operating system".<br />
<br />
If that does not work immediately, you may need to change the icon set that is in use; this is also in the Options Dialog, under ''LibreOffice > View'' with two pop-up boxes for "Icon size and style" (the latter pop-up box should be changed to something other than "High-contrast").<br />
<br />
=== Firefox themes ===<br />
<br />
LibreOffice 4.x series is able to use Firefox themes.<br />
Enter LibreOffice options and choose ''Personalization > Select Theme'', then paste the URL of your favourite one. A convenient button in the dialog box lets you open the browser.<br />
<br />
Themes can be found on [https://addons.mozilla.org/en-US/firefox/themes/ Mozilla's theme repository].<br />
<br />
=== Disable startup logo ===<br />
<br />
If you prefer to disable the startup logo, open {{ic|/etc/libreoffice/sofficerc}}, find the {{ic|1=Logo=}} line and set {{ic|1=Logo=0}}.<br />
{{Note|This variable is unrelated with the Logo scripting support.}}<br />
<br />
== Extension management ==<br />
<br />
The following additional extensions are available in the [[official repositories]]:<br />
<br />
*{{Pkg|libreoffice-still-extension-nlpsolver}}<br />
*{{Pkg|libreoffice-still-extension-wiki-publisher}}<br />
<br />
For more extensions, check the [[AUR]], the built-in LibreOffice Extension manager, or [http://libreplanet.org/wiki/Group:OpenOfficeExtensions/List libreplanet].<br />
<br />
== Language aids ==<br />
<br />
=== Spell checking ===<br />
<br />
For spell checking, you will need {{Pkg|hunspell}} and a language dictionary for hunspell (like {{Pkg|hunspell-en}} for English, {{Pkg|hunspell-de}} for German, etc).<br />
<br />
=== Hyphenation rules ===<br />
<br />
For hyphenation rules, you will need {{Pkg|hyphen}} and a language hyphen rule set ({{Pkg|hyphen-en}} for English, {{Pkg|hyphen-de}} for German, etc).<br />
<br />
=== Thesaurus ===<br />
<br />
For the thesaurus option, you will need {{Pkg|libmythes}} and a mythes language thesaurus (like {{Pkg|mythes-en}} for English, {{Pkg|mythes-de}} for German, etc).<br />
<br />
=== Grammar checking ===<br />
<br />
For grammar checking, you will need to install an extension such as LanguageTool, which can be found in the [[AUR]]: {{AUR|libreoffice-extension-languagetool}} or the [http://www.languagetool.org/ LanguageTool Website].<br />
<br />
Other grammar tools can also be found on the [http://libreplanet.org/wiki/Group:OpenOfficeExtensions/List LibreOffice Extension Page] or [http://lingucomponent.openoffice.org/grammar.html OpenOffice's Website]. Not all OpenOffice extensions are guaranteed to work with LibreOffice.<br />
<br />
{{Note|Languagetool uses Java and may slow down or briefly hang LibreOffice, particularly while opening documents. Fortunately this is usually only when initially opening a document and is usually not apparent otherwise.}}<br />
<br />
=== Finnish spell checking ===<br />
<br />
For Finnish users, there are four packages to be installed. Install them in this order: {{AUR|malaga}}, {{AUR|suomi-malaga-voikko}}, {{AUR|libvoikko}} and {{AUR|voikko-libreoffice}}.<br />
<br />
=== Offline help for en-US ===<br />
<br />
The {{Pkg|libreoffice-en-US}} package in the official repositories does not include the offline help files. Users who desire offline help for en-US can install the {{AUR|libreoffice-en-us-help}} or {{AUR|libreoffice-fresh-en-us-help}} package from the [[AUR]].<br />
<br />
== Installing macros ==<br />
<br />
If you intend to use macros, you must have a Java Runtime Environment enabled. A Java Runtime Environment is enabled by default, but disabling it [[#Speed up LibreOffice|speeds up the program]].<br />
<br />
The default path for macros in Arch Linux is different from most Linux distributions. Its location is:<br />
~/.config/libreoffice/4/user/Scripts/<br />
<br />
== Speed up LibreOffice ==<br />
<br />
Some settings may improve LibreOffice's loading time and responsiveness. However, some also increase RAM usage, so use them carefully. They can all be accessed under ''Tools > Options''.<br />
* Under ''Memory'':<br />
** Reduce the number of Undo steps to a figure lower than 100, to something like 20 or 30 steps<br />
** Under ''Graphics cache'', set Use for LibreOffice to 128&nbsp;MB (up from the original 20&nbsp;MB)<br />
** Set ''Memory per object'' to 20&nbsp;MB (up from the default 5&nbsp;MB).<br />
** If LibreOffice is used often, check ''Enable systray Quickstarter''<br />
{{Note|The package {{Pkg|libreoffice-still-gnome}} must be installed for the quickstarter option to be available.}}<br />
* Under ''Advanced'', uncheck ''Use a Java runtime environment''<br />
{{Note|For a list of functionality written in Java only, see: https://wiki.documentfoundation.org/Development/Java.}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Font substitution ===<br />
<br />
These settings can be changed in the LibreOffice options. From the drop-down menu, select ''Tools > Options > LibreOffice > Fonts''. Check the box that says ''Apply Replacement Table''. Type {{ic|Andale Sans UI}} in the font box and choose your desired font for the ''Replace with'' option. When done, click the ''checkmark''. Then choose the ''Always'' and ''Screen only'' options in the box below. Click OK.<br />
You will then need to go to ''Tools > Options > LibreOffice > View'', and uncheck "Use system font for user interface". If you use a non-antialised font, such as Arial, you will also need to uncheck "Screen font antialiasing" before menu fonts render correctly.<br />
<br />
=== Anti-aliasing ===<br />
<br />
Execute:<br />
$ echo "Xft.lcdfilter: lcddefault" | xrdb -merge<br />
<br />
To make the change persistent, add {{ic|Xft.lcdfilter: lcddefault}} to your {{ic|~/.Xresources}} file, and make sure to run {{ic|$ xrdb -merge ~/.Xresources}} ([https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/271283/comments/19 source]. See [[X resources]] for more details.<br />
<br />
If this does not work, you can also try adding {{ic|Xft.lcdfilter: lcddefault}} to your {{ic|~/.Xdefaults}}. If you do not have this file, you will have to create it.<br />
<br />
=== Hanging when using NFSv3 shares ===<br />
<br />
If LibreOffice hangs when trying to open or save a document located on a NFSv3 share, try prepending the following lines with a {{ic|#}} in {{ic|/usr/lib/libreoffice/program/soffice}}:<br />
# file locking now enabled by default<br />
SAL_ENABLE_FILE_LOCKING=1<br />
export SAL_ENABLE_FILE_LOCKING<br />
<br />
To avoid overwriting on update you can copy {{ic|/usr/lib/libreoffice/program/soffice}} in {{ic|/usr/local/bin}}. Original post [http://www.crazysquirrel.com/computing/debian/bugs/openoffice-over-nfs.jspx here].<br />
<br />
=== Fixing Java framework error ===<br />
<br />
You may get the following error when you try to run LibreOffice.<br />
<br />
[Java framework] Error in function createSettingsDocument (elements.cxx).<br />
javaldx failed!<br />
<br />
If so, give yourself ownership of {{ic|~/.config/}} like so:<br />
# chown -vR username:users ~/.config<br />
<br />
[https://bbs.archlinux.org/viewtopic.php?id=93168 Post on Arch Linux forums].<br />
<br />
=== LibreOffice does not detect my certificates ===<br />
<br />
If you cannot see the certificates when trying to sign a document, you will need to have the certificates configured in Mozilla Firefox (or Thunderbird). If after that LibreOffice still does not show them, set the {{ic|MOZILLA_CERTIFICATE_FOLDER}} environment variable to point to your Mozilla Firefox (or Thunderbird) folder:<br />
export MOZILLA_CERTIFICATE_FOLDER=$HOME/.mozilla/firefox/XXXXXX.default/<br />
<br />
[http://wiki.openoffice.org/wiki/Certificate_Detection Certificate detection].<br />
<br />
=== Run .pps files in edit mode (without slideshow) ===<br />
<br />
The only solution is to rename the {{ic|.pps}} file to {{ic|.ppt}}.<br />
<br />
Add the following script to your home directory and use it to open every .pps file. Very useful to open {{ic|.pps}} files received by email without the need to save them.<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
<br />
f=$(mktemp)<br />
cp "$1" "${f}.ppt" && libreoffice "${f}.ppt" && rm -f "${f}.ppt"<br />
</nowiki>}}<br />
<br />
=== Bibliography problems ===<br />
<br />
If Writer crashes on attempting to access ''Tools > Bibliography Database'', with the following error:<br />
com::sun::star::loader::CannotActivateFactoryException<br />
Install {{Pkg|libreoffice-base}} as this is a workaround to a known bug, purportedly [http://cgit.freedesktop.org/libreoffice/core/commit/?id=1889c1af41650576a29c587a0b2cdeaf0d297587 fixed].<br />
<br />
=== Media support ===<br />
<br />
If embedded videos are just gray boxes, make sure to have installed the [[GStreamer#Current version plugins|GStreamer plugins]] required.<br />
<br />
=== Content not resizing with windows on Xfwm4 ===<br />
<br />
If you do not get the content of the LibreOffice window resize along with it under Xfce (or just using Xfwm4), like in this post: [https://bbs.archlinux.org/viewtopic.php?id=133137]. Install {{Pkg|libreoffice-still-gnome}} to solve the issue.<br />
<br />
=== gvfs mounts ===<br />
<br />
If you need to open/save documents on gvfs mounts, you will need to install {{Pkg|libreoffice-still-gnome}} package.</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=LibreOffice&diff=333698LibreOffice2014-09-03T16:06:09Z<p>Sudowoodo: /* Firefox themes */ Added link to Mozilla's theme repository.</p>
<hr />
<div>[[Category:Office]]<br />
[[ar:LibreOffice]]<br />
[[de:LibreOffice]]<br />
[[es:LibreOffice]]<br />
[[fr:LibreOffice]]<br />
[[it:LibreOffice]]<br />
[[ja:LibreOffice]]<br />
[[ru:LibreOffice]]<br />
[[zh-CN:LibreOffice]]<br />
{{Related articles start}}<br />
{{Related|Apache OpenOffice}}<br />
{{Related articles end}}<br />
<br />
From [http://www.libreoffice.org/ Home - LibreOffice]:<br />
<br />
:''LibreOffice is the free power-packed Open Source personal productivity suite for Windows, Macintosh and Linux, that gives you six feature-rich applications for all your document production and data processing needs: Writer, Calc, Impress, Draw, Math and Base. [http://www.libreoffice.org/get-help/ Support] and [http://www.libreoffice.org/get-help/documentation/ documentation] is free from our large, dedicated community of users, contributors and developers. [http://www.libreoffice.org/get-involved/ You, too, can also get involved!]''<br />
<br />
== LibreOffice in Arch Linux ==<br />
<br />
Official support for [[OpenOffice.org]] was dropped in favor of LibreOffice, the "Document Foundation" fork of the project, which also includes enhancements and additional features. See [https://mailman.archlinux.org/pipermail/arch-general/2011-March/018819.html Dropping Oracle OpenOffice (arch-general)].<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] one of the following groups from the [[official repositories]]: <br />
<br />
* {{Pkg|libreoffice-fresh}} is the feature branch, with new program enhancements.<br />
* {{Grp|libreoffice-still}} is the maintenance branch.<br />
<br />
{{Note|<br />
* The installation of at least 1 language pack is required. The default language is Afrikaans (because it is alphabetically the first provider of libreoffice-langpack). If you want the UK-English language pack, install {{Pkg|libreoffice-en-GB}}, not {{Pkg|libreoffice-uk}} (Ukrainian) or {{Pkg|libreoffice-br}} (Breton)!<br />
* The packages {{Pkg|libreoffice-still-kde4}} and {{Pkg|libreoffice-still-gnome}} are required for Qt and GTK+ visual integration respectively. See the [[#Theme|Theme]] section.<br />
* For SDK - use {{Pkg|libreoffice-fresh-sdk}} OR {{Pkg|libreoffice-still-sdk}} accordingly<br />
}}<br />
<br />
Check the optional dependencies pacman displays. A Java Runtime Environment is not required unless you want to use Libreoffice Base: see [[Java]]. You may need {{AUR|hsqldb2-java}} to use [https://wiki.documentfoundation.org/Base#Java_and_HSQLDB some modules] in LibreOffice Base.<br />
<br />
== Theme ==<br />
<br />
For [[Qt]] integration, install the package {{Pkg|libreoffice-still-kde4}}.<br />
For [[GTK+]] integration, install the package {{Pkg|libreoffice-still-gnome}}.<br />
{{Note|<br />
* Qt integration is able to mimic GTK+ theme. The command {{ic|qtconfig-qt4}} opens a window which let you choose.<br />
* Even if you are not running one of these desktop environments and thus do not need to "integrate" with them, you may still wish to install these packages so that LibreOffice will use non-default GTK+ or Qt themes. For example, LibreOffice on e17 uses the default "ugly" (aka "win95"/"win98") theme; installing libreoffice-still-gnome will allow you to select a more pleasant GTK+ theme.<br />
}}<br />
<br />
As of LibreOffice version 3.5.x it tries to magically autodetect your desktop UI using the following magic if proper libs will be found:<br />
gtk > kde4 > generic<br />
<br />
To force the use of a certain VCL UI interface use one of this:<br />
SAL_USE_VCLPLUGIN=gen lowriter<br />
SAL_USE_VCLPLUGIN=kde4 lowriter<br />
SAL_USE_VCLPLUGIN=gtk lowriter<br />
SAL_USE_VCLPLUGIN=gtk3 lowriter<br />
It is convenient to save {{ic|SAL_USE_VCLPLUGIN}} variable in your shell configuration file, e.g.{{ic|/etc/bash.bashrc}} or {{ic|~/.bashrc}} if using Bash.<br />
<br />
{{Note|The new GTK3 UI is still marked upstream as experimental and will only be available if you enable "experimental features" in LibreOffice main configuration dialog.}}<br />
<br />
However, if it looks like it is using Windows 95/98 icons, go to ''Tools > Options...'' in the menus (which presents the Options Dialog), then select ''LibreOffice > Accessibility'' and uncheck "Automatically detect high-contrast mode of operating system".<br />
<br />
If that does not work immediately, you may need to change the icon set that is in use; this is also in the Options Dialog, under ''LibreOffice > View'' with two pop-up boxes for "Icon size and style" (the latter pop-up box should be changed to something other than "High-contrast").<br />
<br />
=== Firefox themes ===<br />
<br />
LibreOffice 4.x series is able to use Firefox themes.<br />
Enter LibreOffice options and choose ''Personalization > Select Theme'', then paste the URL of your favourite one. A convenient button in the dialog box lets you open the browser.<br />
<br />
Themes can be found on [https://addons.mozilla.org/en-US/firefox/themes/ Mozilla's theme repository].<br />
<br />
=== Disable startup logo ===<br />
<br />
If you prefer to disable the startup logo, open {{ic|/etc/libreoffice/sofficerc}}, find the {{ic|1=Logo=}} line and set {{ic|1=Logo=0}}.<br />
{{Note|This variable is unrelated with the Logo scripting support.}}<br />
<br />
== Extension management ==<br />
<br />
The following additional extensions are available in the [[official repositories]]:<br />
<br />
*{{Pkg|libreoffice-still-extension-nlpsolver}}<br />
*{{Pkg|libreoffice-still-extension-wiki-publisher}}<br />
<br />
For more extensions, check the [[AUR]], the built-in LibreOffice Extension manager, or [http://libreplanet.org/wiki/Group:OpenOfficeExtensions/List libreplanet].<br />
<br />
== Language aids ==<br />
<br />
=== Spell checking ===<br />
<br />
For spell checking, you will need {{Pkg|hunspell}} and a language dictionary for hunspell (like {{Pkg|hunspell-en}} for English, {{Pkg|hunspell-de}} for German, etc).<br />
<br />
=== Hyphenation rules ===<br />
<br />
For hyphenation rules, you will need {{Pkg|hyphen}} and a language hyphen rule set ({{Pkg|hyphen-en}} for English, {{Pkg|hyphen-de}} for German, etc).<br />
<br />
=== Thesaurus ===<br />
<br />
For the thesaurus option, you will need {{Pkg|libmythes}} and a mythes language thesaurus (like {{Pkg|mythes-en}} for English, {{Pkg|mythes-de}} for German, etc).<br />
<br />
=== Grammar checking ===<br />
<br />
For grammar checking, you will need to install an extension such as LanguageTool, which can be found in the [[AUR]]: {{AUR|libreoffice-extension-languagetool}} or the [http://www.languagetool.org/ LanguageTool Website].<br />
<br />
Other grammar tools can also be found on the [http://libreplanet.org/wiki/Group:OpenOfficeExtensions/List LibreOffice Extension Page] or [http://lingucomponent.openoffice.org/grammar.html OpenOffice's Website]. Not all OpenOffice extensions are guaranteed to work with LibreOffice.<br />
<br />
{{Note|Languagetool uses Java and may slow down or briefly hang LibreOffice, particularly while opening documents. Fortunately this is usually only when initially opening a document and is usually not apparent otherwise.}}<br />
<br />
=== Finnish spell checking ===<br />
<br />
For Finnish users, there are four packages to be installed. Install them in this order: {{AUR|malaga}}, {{AUR|suomi-malaga-voikko}}, {{AUR|libvoikko}} and {{AUR|voikko-libreoffice}}.<br />
<br />
=== Offline help for en-US ===<br />
<br />
The {{Pkg|libreoffice-en-US}} package in the official repositories does not include the offline help files. Users who desire offline help for en-US can install the {{AUR|libreoffice-en-us-help}} or {{AUR|libreoffice-fresh-en-us-help}} package from the [[AUR]].<br />
<br />
== Installing macros ==<br />
<br />
If you intend to use macros, you must have a Java Runtime Environment enabled. A Java Runtime Environment is enabled by default, but disabling it [[#Speed up LibreOffice|speeds up the program]].<br />
<br />
The default path for macros in Arch Linux is different from most Linux distributions. Its location is:<br />
~/.config/libreoffice/4/user/Scripts/<br />
<br />
== Speed up LibreOffice ==<br />
<br />
Some settings may improve LibreOffice's loading time and responsiveness. However, some also increase RAM usage, so use them carefully. They can all be accessed under ''Tools > Options''.<br />
* Under ''Memory'':<br />
** Reduce the number of Undo steps to a figure lower than 100, to something like 20 or 30 steps<br />
** Under ''Graphics cache'', set Use for LibreOffice to 128&nbsp;MB (up from the original 20&nbsp;MB)<br />
** Set ''Memory per object'' to 20&nbsp;MB (up from the default 5&nbsp;MB).<br />
** If you use LibreOffice often, check ''Enable systray Quickstarter''<br />
{{Note|You need to have the package {{Pkg|libreoffice-still-gnome}} installed for the quickstarter option to be available.}}<br />
* Under ''Advanced'', uncheck ''Use a Java runtime environment''<br />
{{Note|For a list of functionality written in Java only, see: https://wiki.documentfoundation.org/Development/Java.}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Font substitution ===<br />
<br />
These settings can be changed in the LibreOffice options. From the drop-down menu, select ''Tools > Options > LibreOffice > Fonts''. Check the box that says ''Apply Replacement Table''. Type {{ic|Andale Sans UI}} in the font box and choose your desired font for the ''Replace with'' option. When done, click the ''checkmark''. Then choose the ''Always'' and ''Screen only'' options in the box below. Click OK.<br />
You will then need to go to ''Tools > Options > LibreOffice > View'', and uncheck "Use system font for user interface". If you use a non-antialised font, such as Arial, you will also need to uncheck "Screen font antialiasing" before menu fonts render correctly.<br />
<br />
=== Anti-aliasing ===<br />
<br />
Execute:<br />
$ echo "Xft.lcdfilter: lcddefault" | xrdb -merge<br />
<br />
To make the change persistent, add {{ic|Xft.lcdfilter: lcddefault}} to your {{ic|~/.Xresources}} file, and make sure to run {{ic|$ xrdb -merge ~/.Xresources}} ([https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/271283/comments/19 source]. See [[X resources]] for more details.<br />
<br />
If this does not work, you can also try adding {{ic|Xft.lcdfilter: lcddefault}} to your {{ic|~/.Xdefaults}}. If you do not have this file, you will have to create it.<br />
<br />
=== Hanging when using NFSv3 shares ===<br />
<br />
If LibreOffice hangs when trying to open or save a document located on a NFSv3 share, try prepending the following lines with a {{ic|#}} in {{ic|/usr/lib/libreoffice/program/soffice}}:<br />
# file locking now enabled by default<br />
SAL_ENABLE_FILE_LOCKING=1<br />
export SAL_ENABLE_FILE_LOCKING<br />
<br />
To avoid overwriting on update you can copy {{ic|/usr/lib/libreoffice/program/soffice}} in {{ic|/usr/local/bin}}. Original post [http://www.crazysquirrel.com/computing/debian/bugs/openoffice-over-nfs.jspx here].<br />
<br />
=== Fixing Java framework error ===<br />
<br />
You may get the following error when you try to run LibreOffice.<br />
<br />
[Java framework] Error in function createSettingsDocument (elements.cxx).<br />
javaldx failed!<br />
<br />
If so, give yourself ownership of {{ic|~/.config/}} like so:<br />
# chown -vR username:users ~/.config<br />
<br />
[https://bbs.archlinux.org/viewtopic.php?id=93168 Post on Arch Linux forums].<br />
<br />
=== LibreOffice does not detect my certificates ===<br />
<br />
If you cannot see the certificates when trying to sign a document, you will need to have the certificates configured in Mozilla Firefox (or Thunderbird). If after that LibreOffice still does not show them, set the {{ic|MOZILLA_CERTIFICATE_FOLDER}} environment variable to point to your Mozilla Firefox (or Thunderbird) folder:<br />
export MOZILLA_CERTIFICATE_FOLDER=$HOME/.mozilla/firefox/XXXXXX.default/<br />
<br />
[http://wiki.openoffice.org/wiki/Certificate_Detection Certificate detection].<br />
<br />
=== Run .pps files in edit mode (without slideshow) ===<br />
<br />
The only solution is to rename the {{ic|.pps}} file to {{ic|.ppt}}.<br />
<br />
Add the following script to your home directory and use it to open every .pps file. Very useful to open {{ic|.pps}} files received by email without the need to save them.<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
<br />
f=$(mktemp)<br />
cp "$1" "${f}.ppt" && libreoffice "${f}.ppt" && rm -f "${f}.ppt"<br />
</nowiki>}}<br />
<br />
=== Bibliography problems ===<br />
<br />
If Writer crashes on attempting to access ''Tools > Bibliography Database'', with the following error:<br />
com::sun::star::loader::CannotActivateFactoryException<br />
Install {{Pkg|libreoffice-base}} as this is a workaround to a known bug, purportedly [http://cgit.freedesktop.org/libreoffice/core/commit/?id=1889c1af41650576a29c587a0b2cdeaf0d297587 fixed].<br />
<br />
=== Media support ===<br />
<br />
If embedded videos are just gray boxes, make sure to have installed the [[GStreamer#Current version plugins|GStreamer plugins]] required.<br />
<br />
=== Content not resizing with windows on Xfwm4 ===<br />
<br />
If you do not get the content of the LibreOffice window resize along with it under Xfce (or just using Xfwm4), like in this post: [https://bbs.archlinux.org/viewtopic.php?id=133137]. Install {{Pkg|libreoffice-still-gnome}} to solve the issue.<br />
<br />
=== gvfs mounts ===<br />
<br />
If you need to open/save documents on gvfs mounts, you will need to install {{Pkg|libreoffice-still-gnome}} package.</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=User:Sudowoodo&diff=333433User:Sudowoodo2014-09-01T09:00:43Z<p>Sudowoodo: New aur package, and I won't be very active.</p>
<hr />
<div>{{Note|I will be studying a lot, from now on, so I won't be very active.}}<br />
♨ Member of the [[ArchWiki Translation Team (Ελληνικά)|Greek Arch Wiki Translation Team]] :-)<br />
----<br />
Pages I created:<br />
*[[Dolphin emulator]]<br />
*[[Template:Poor writing (Ελληνικά)]]<br />
----<br />
Pages I have contributed to:<br />
*[[RetroArch]]<br />
*[[VBA-M]]<br />
----<br />
Some pages I like:<br />
*[[Arch compared to other distributions]]<br />
*[[The Arch Way]]<br />
*[[Arch is the best]]<br />
*[[Time]]<br />
----<br />
My current target:<br />
*Nothing particular for now.<br />
----<br />
[https://aur.archlinux.org/packages/?SeB=m&K=Sudowoodo AUR Packages I maintain:]<br />
*{{AUR|m64py}}<br />
*{{AUR|iptux}}<br />
*{{AUR|gnome-paint}}<br />
----<br />
Contact:<br />
*[[Special:EmailUser/Sudowoodo|Email]]<br />
----<br />
<br />
{{ic|- - - - - C o o o o}}</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Dolphin_emulator&diff=333432Dolphin emulator2014-09-01T08:59:12Z<p>Sudowoodo: /* Dolphin occasionally crashes on 64-bit CPUs */</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Emulators]]<br />
Dolphin is a Nintendo Gamecube, Wii and Triforce emulator, currently supporting the x86, AMD64 and ARM architectures. Dolphin is available for Linux, MacOSX (intel-based), MS Windows and Android. It is a free and open source, community-developed project.<br />
Dolphin was the first Gamecube and Wii emulator, and currently the only one capable of playing commercial games.<br />
<br />
== Installation ==<br />
<br />
Install one of the following:<br />
<br />
* {{App|[[Dolphin emu]]|A Gamecube / Wii / Triforce emulator (Recommended)|https://dolphin-emu.org/|{{Pkg|dolphin-emu}}}}<br />
* {{App|Dolphin emu (git)|A Gamecube / Wii / Triforce emulator (development version)|https://github.com/dolphin-emu/dolphin|{{AUR|dolphin-emu-git}}}}<br />
* {{App|Dolphin emu Wayland (git)|A Gamecube / Wii / Triforce emulator with [[Wayland]] support.|https://dolphin-emu.org/|{{AUR|dolphin-emu-wayland-git}}}}<br />
<br />
== Configuration ==<br />
<br />
{{Note|Dolphin is a resource-heavy application, so expect not all games to run properly. See the reason [https://dolphin-emu.org/docs/faq/#why-do-i-need-such-powerful-computer-emulate-old-c here].}}<br />
<br />
While no additional configuration is needed for the emulator to run (it is preconfigured with the default settings), altering the settings can improve performance and graphics alike.<br />
Settings are split to three main sections, ''Config'', ''Graphics'' and ''DSP''.<br />
<br />
=== Config section ===<br />
<br />
On the General tab, check ''Enable Dual Core'' and ''Enable Idle Skipping''. Enabling or not the cheats is a personal choice. Keep in mind that a real man never cheats. The frame limit should be set to "Audio", so that it works with games from all regions. The CPU emulation engine should be left as JIT Recompiler. Only check "Force console as NTSC-J" if intending to play imported Japanese discs.<br />
<br />
All options on the "Interface" tab are personal choices.<br />
<br />
The Audio tab is the DSP section's screen; setting it up now means there will be no need to do it later. See the [[#DSP section|DSP settings paragraph]] below.<br />
<br />
The next two tabs are not very important; the Gamecube tab has settings about connected accessories, such as memory cards, and the only remarkable Wii tab option is the "Aspect Ratio" drop-down list. Set it to either 16:9 or 4:3, depending on the display's [[Wikipedia: Aspect ratio|aspect ratio]].<br />
<br />
On the final tab, "Paths", ISO directories can be set. The directory of game ISOs can also be set by clicking browse from the home screen, but here more options are available, such as ''Search Subfolders''.<br />
<br />
=== Graphics section ===<br />
<br />
On the "General" tab, choose OpenGL from the backend drop-down list. Set the "Display" and "Other" settings to the desired configuration. V-sync is useful, but it can lead to slowdowns. The "render to main window" option improves the experience aesthetically.<br />
<br />
On the "Enhancements" tab are the options that can improve graphics. While they result to great output, they can slow the emulation down to the point of making games unplayable. Choose the best settings possible, as long as speed remains 100%.<br />
<br />
{| class="wikitable"<br />
|+ Comparison of options<br />
!Option !!Performance !!Quality<br />
|-<br />
| '''Internal resolution''' || 1x Native || Auto (Window size)<br />
|-<br />
| '''Anti-aliasing''' || None || at least 2x<br />
|-<br />
| '''Anisotropic filtering''' || 1x || at least 2x<br />
|-<br />
| '''Post-Processing Effect''' || (off) || your choice<br>(see tip below)<br />
|-<br />
| '''Scaled EFB copy''' || unchecked || checked<br />
|-<br />
| '''Per-Pixel Lightning''' || unchecked || checked<br />
|-<br />
| '''Force texture filtering,<br>Widescreen Hack,<br>Disable fog''' || off || your option<br>(recommended: off)<br />
|}<br />
<br />
{{Tip|Dolphin is able to render games that were developed for 2D in anaglyph 3D. To enable this, set ''Post-Processing Effect'' to ''stereoscopic'' (default, for red-cyan mode) or ''stereoscopic2'' (blue-yellow). It is also '''necessary''' to uncheck "''Fast Depth Calculation''" on the ''Hacks'' tab (''see below'').}}<br />
<br />
{{Warning|Using filters and other ways to improve graphics might break a few games or cause graphical glitches of any level.}}<br />
<br />
Unless sure, the ''Hacks'' tab is best left untouched.<br />
<br />
{| class="wikitable"<br />
|+ Defaults<br />
!Option !! Value<br />
|-<br />
| Skip EFB access from CPU || unchecked<br />
|-<br />
| Ignore format changes || checked<br />
|-<br />
| EFB copies || texture<br />
|-<br />
| Texture cache/ Accuracy || Fast<br />
|-<br />
| External frame buffer || disable<br />
|-<br />
| Cache display lists || unchecked<br />
|-<br />
| Disable destination alpha || unchecked<br />
|-<br />
| OpenCL texture decoder || unchecked<br />
|-<br />
| OpenMP texture decoder || unchecked<br />
|-<br />
| Fast depth calculation || checked<br>(Should uncheck for anaglyph 3D)<br />
|-<br />
| Vertex streaming hack || unchecked<br />
|}<br />
<br />
Similarly, unless sure, leave '''everything''' in the ''Advanced'' tab unchecked.<br />
<br />
=== DSP section ===<br />
<br />
Set the DSP emulation engine to<br />
<br />
* DSP HLE for speed over accuracy,<br />
* DSP LLE recompiler for better accuracy with the cost of some speed,<br />
* DSP LLE interpreter; accurate but makes '''everything''' unplayable. Too slow.<br />
<br />
''DSP LLE on separate thread'' improves speed on computers with multi-core CPUs, but might cause audio glitches, and is known to break [https://wiki.dolphin-emu.org/index.php?title=Category:Zelda_ucode_games Zelda ucode games]. Audio backend is best set to [[ALSA]]. For {{ic|pulseaudio}}, Dolphin's optional dependency [[PulseAudio]] needs to be installed.<br />
<br />
{{Note|If you came here from the [[#Config section|Config section's]] link, you should go back now.}}<br />
<br />
== Playing ==<br />
<br />
{{Warning|Make sure you '''only''' use Dolphin for legally obtained self-made disc dumps of games you legally bought. Dolphin was not designed for illegal actions. Act legally as applying laws define. You are responsible for any usage of the emulator that you make.}}<br />
<br />
{{Note|No links, instructions or tips for obtaining illegal content will be provided on this wiki. No copyright infringement intended.}}<br />
<br />
Click on browse to set a directory of ISOs so that they are shown as a library on Dolphin's default screen. Otherwise just click ''Open'' and select the file.<br />
<br />
=== Dolphin's Wiki ===<br />
<br />
Whenever a game doesn't work properly, try reading its page on [https://wiki.dolphin-emu.org Dolphin's wiki]. Listed there are tips on setting up the emulator for each game, version compatibility charts, testing entries, troubleshooting and video previews. Contributions, such as testing entries and workarounds are welcome and help other users.<br />
<br />
Here's a [https://aur.archlinux.org/packages/xfce4-whiskermenu-plugin/ Whisker Menu] search action command for searching on Dolphin's wiki:<br />
<br />
exo-open --launch WebBrowser https://wiki.dolphin-emu.org/index.php?search=%u<br />
<br />
{{Tip|Setting up keymaps is recommended. Prefer a gamepad with analogue features to a keyboard and a mouse. See this [http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/GCController_Layout.svg/1000px-GCController_Layout.svg.png map of the GameCube gamepad]. Having fun while playing is also recommended.}}<br />
<br />
== Troubleshooting ==<br />
<br />
==== Games play too fast ====<br />
<br />
Make sure to set framelimit to Audio and have properly configure the [[#DSP section|DPS settings]]. If it doesn't work with your sound system, try setting it to 60 for NTSC games or 50 for PAL ones. Also, note that playback of other audio media while frameskip is set to audio breaks the game.<br />
{{Note|Certain software, such as {{Pkg|flashplugin}}, crash the "Audio" feature and make games unstable, if used at the same time as Dolphin.}}<br />
<br />
''See also: [[Sound system]] - one needs to be properly configured for the "Audio" frameskip option to work.''<br />
<br />
==== Emulation is too slow ====<br />
<br />
Double-check the [[Cpu_scaling#Scaling_governors|CPU scaling governor]]. If using an nvidia graphics card, on nvidia-settings changing the powermizer setting to "Prefer maximum performance". Killing unnecessary processes and disabling compositing also helps. Configuring Dolphin correctly, as described above, is the most important part.<br />
<br />
''See also: [[Maximizing Performance]] - most of the advice should be helpful.''<br />
<br />
==== Dolphin occasionally crashes on 64-bit CPUs====<br />
<br />
On 64bit processors, Dolphin crashes when loading a game after having played another. This also randomly happens on menus.<br />
<br />
To solve this, Dolphin must be built manually, with a minor modification. Once the source code has been downloaded ({{ic|$ git clone http://www.github.com/dolphin-emu/dolphin}}), navigate to {{ic|(path to source)/dolphin/Source/Core/Core/}} , or, for older versions, in {{ic|(path to source)/dolphin-emu/src/dolphin/Source/Core/Core/Src/}} and edit ''CoreParameter.cpp''.<br />
<br />
Change line 98 from {{ic|<nowiki>bJITLoadStorePairedOff = false;</nowiki>}} to {{ic|<nowiki>bJITLoadStorePairedOff = true;</nowiki>}}.<br />
Notice the comment saying {{ic|// XXX not 64-bit clean}}.<br />
<br />
Upon saving the file, the package is ready to be compiled.<br />
<br />
''See also: [https://aur.archlinux.org/packages/do/dolphin-emu-git/PKGBUILD a PKGBUILD for Dolphin (git)]''<br />
<br />
== See also ==<br />
<br />
{{Note|The Arch Linux wiki and its users are not responsible for any damage, misuse or illegal action caused by following instructions from webpages hyperlinked bellow.}}<br />
<br />
* [https://dolphin-emu.org/docs/guides/performance-guide/ Dolphin's performance guide.]<br />
* [https://dolphin-emu.org/docs/faq/ Dolphin's FAQ]<br />
* [https://wiki.dolphin-emu.org/index.php?title=Ripping_Game_Discs Dolphin's wiki entry for legally obtaining game dumps.]</div>Sudowoodohttps://wiki.archlinux.org/index.php?title=Samba&diff=332346Samba2014-08-25T07:02:32Z<p>Sudowoodo: Small corrections.</p>
<hr />
<div>[[Category:Networking]]<br />
[[cs:Samba]]<br />
[[da:Samba]]<br />
[[de:Samba]]<br />
[[es:Samba]]<br />
[[fr:Samba]]<br />
[[it:Samba]]<br />
[[ja:Samba]]<br />
[[ru:Samba]]<br />
[[sr:Samba]]<br />
[[tr:Samba]]<br />
[[zh-CN:Samba]]<br />
[[zh-TW:Samba]]<br />
{{Related articles start}}<br />
{{Related|Samba/Tips and tricks}}<br />
{{Related|Samba/Troubleshooting}}<br />
{{Related|Samba/Advanced file sharing with KDE4}}<br />
{{Related|Samba Domain Controller}}<br />
{{Related|Active Directory Integration}}<br />
{{Related|Samba 4 Active Directory Domain Controller}}<br />
{{Related|OpenChange Server}}<br />
{{Related|NFS}}<br />
{{Related articles end}}<br />
<br />
'''Samba''' is a re-implementation of the [[wikipedia:Server_Message_Block|SMB/CIFS]] networking protocol, it facilitates file and printer sharing among Linux and Windows systems as an alternative to NFS. Some users say that Samba is easily configured and that operation is very straight-forward. However, many new users run into problems with its complexity and non-intuitive mechanism. It is strongly suggested that the user sticks close to the following directions.<br />
<br />
== Server configuration ==<br />
<br />
To share files with Samba, [[pacman#Installing specific packages|install]] {{Pkg|samba}}, from the [[official repositories]].<br />
<br />
The Samba server is configured in {{ic|/etc/samba/smb.conf}}. Copy the default Samba configuration file to {{ic|/etc/samba/smb.conf}}:<br />
# cp /etc/samba/smb.conf.default /etc/samba/smb.conf<br />
<br />
{{Tip|Run {{ic|testparm}} to check the validity of ''samba'' configuration file.}}<br />
<br />
=== Creating a share ===<br />
<br />
Edit {{ic|/etc/samba/smb.conf}}, scroll down to the '''Share Definitions''' section. The default configuration automatically creates a share for each user's home directory. It also creates a share for printers by default. There are a number of commented sample configurations included. More information about available options for shared resources can be found in {{ic|man smb.conf}}. [http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html Here] is the on-line version.<br />
<br />
On Windows side, be sure to change {{ic|smb.conf}} to the Windows Workgroup. (Windows default: WORKGROUP)<br />
<br />
=== Starting services ===<br />
<br />
To provide basic file sharing through SMB [[Systemd#Using units|start/enable]] {{ic|smbd.service}} and {{ic|nmbd.service}} services. See [http://www.samba.org/samba/docs/man/manpages-3/smbd.8.html smbd] and [http://www.samba.org/samba/docs/man/manpages-3/nmbd.8.html nmbd] manpages for details.<br />
<br />
{{Tip|Instead of having the service running since boot, you can enable {{ic|smbd.socket}} so the daemon is started on the first incoming connection. Don't forget to disable {{ic|smbd.service}}.}}<br />
<br />
=== Creating usershare path ===<br />
{{Note|This is an optional feature. Skip this section if you don't need it.}}<br />
<br />
"Usershare" is a feature that gives non-root users the capability to add, modify, and delete their own share definitions. <br />
<br />
This creates the usershares directory in {{ic|/var/lib/samba}}:<br />
<br />
# mkdir -p /var/lib/samba/usershare<br />
<br />
This makes the group sambashare:<br />
<br />
# groupadd sambashare<br />
<br />
This changes the owner of the directory and group you just created to root:<br />
<br />
# chown root:sambashare /var/lib/samba/usershare<br />
<br />
This changes the permissions of the usershares directory so that users in the group sambashare can read, write and execute files:<br />
<br />
# chmod 1770 /var/lib/samba/usershare<br />
<br />
Set the following variables in {{ic|smb.conf}} configuration file: <br />
<br />
{{hc|/etc/samba/smb.conf|2=<br />
...<br />
[global]<br />
usershare path = /var/lib/samba/usershare<br />
usershare max shares = 100<br />
usershare allow guests = yes<br />
usershare owner only = False<br />
...<br />
}}<br />
<br />
Add your user to the ''sambashare'' group. Replace {{ic|''your_username''}} with the name of your user:<br />
<br />
# usermod -a -G sambashare ''your_username''<br />
<br />
Restart {{ic|smbd}} and {{ic|nmbd}} services.<br />
<br />
Log out and log back in. You should now be able to configure your samba share using GUI. For example, in [[Thunar]] you can right click on any directory and share it on the network.<br />
<br />
=== Adding a user ===<br />
<br />
Create a [[Users and groups#User management|Linux user account]] for ''samba'' user. Substitute {{ic|''samba_user''}} with preferred name if desired:<br />
<br />
# useradd ''samba_user''<br />
<br />
Then create a ''Samba'' user account with the same name:<br />
<br />
# pdbedit -a -u ''samba_user''<br />
<br />
=== Changing Samba user's password ===<br />
<br />
To change a user's password, use {{ic|smbpasswd}}:<br />
<br />
# smbpasswd ''samba_user''<br />
<br />
=== Required ports ===<br />
<br />
If running a [[firewall]], don't forget to open required [https://wiki.samba.org/index.php/Samba_port_usage Samba ports].<br />
<br />
== Client configuration ==<br />
<br />
Only {{Pkg|smbclient}} is required to access files from a Samba/SMB/CIFS server. It is available from the official repositories.<br />
<br />
Shared resources from other computers on the LAN may be accessed and mounted locally by GUI or CLI methods. The graphical manner is limited since most lightweight Desktop Environments do not have a native way to facilitate accessing these shared resources.<br />
<br />
There are two parts to share access. First is the underlying file system mechanism, and second is the interface which allows the user to select to mount shared resources. Some environments have the first part built into them.<br />
<br />
=== Manual mounting ===<br />
<br />
For a lighter approach without support for listing public shares, only install {{Pkg|cifs-utils}} to provide {{ic|/usr/bin/mount.cifs}}.<br />
<br />
To list public shares on a server:<br />
<br />
$ smbclient -L ''hostname'' -U%<br />
<br />
Create a mount point for the share:<br />
<br />
# mkdir /mnt/''mountpoint''<br />
<br />
Mount the share using the {{ic|mount.cifs}} type. Not all the options listed below are needed or desirable (ie. {{ic|password}}).<br />
<br />
{{bc|1=<br />
# mount -t cifs //''SERVER''/''sharename'' /mnt/''mountpoint'' -o user=''username'',password=''password'',workgroup=''workgroup'',ip=''serverip''<br />
}}<br />
<br />
''SERVER''<br />
: The Windows system name.<br />
<br />
''sharename''<br />
: The shared directory.<br />
<br />
''mountpoint''<br />
: The local directory where the share will be mounted.<br />
<br />
{{ic|<nowiki>-o [options]</nowiki>}}<br />
: See {{ic|man mount.cifs}} for more information.<br />
<br />
{{Note|<br />
* Abstain from using a trailing {{ic|/}}. {{ic|//''SERVER''/''sharename'''''/'''}} will not work.<br />
* If your mount does not work stable, stutters or freezes, try to enable different SMB protocol version with {{ic|1=vers=}} option. For example, {{ic|1=vers=2.0}} for Windows Vista mount.<br />
}}<br />
<br />
==== Add Share to /etc/fstab ====<br />
<br />
The simplest way to add an fstab entry is something like this:<br />
<br />
{{hc|/etc/fstab|2=<br />
//''SERVER''/''sharename'' /mnt/''mountpoint'' cifs username=''username'',password=''password'' 0 0<br />
}}<br />
<br />
However, storing passwords in a world readable file is not recommended! A safer method would be to use a credentials file. As an example, create a file and {{ic|chmod 600 ''filename''}} so only the owning user can read and write to it. It should contain the following information:<br />
<br />
{{hc|/path/to/credentials/sambacreds|2=<br />
username=''username''<br />
password=''password''<br />
}}<br />
<br />
and the line in your fstab should look something like this:<br />
<br />
{{hc|/etc/fstab|2=<br />
//SERVER/SHARENAME /mnt/''mountpoint'' cifs credentials=''/path/to/credentials/sambacreds'' 0 0<br />
}}<br />
<br />
If using ''systemd'' (modern installations), one can utilize the {{ic|1=comment=systemd.automount}} option, which speeds up service boot by a few seconds. Also, one can map current user and group to make life a bit easier, utilizing {{ic|uid}} and {{ic|gid}} options.<br />
<br />
{{Warning|Using the {{ic|uid}} and {{ic|gid}} options may cause input ouput errors in programs that try to fetch data from network drives.}}<br />
<br />
{{hc|/etc/fstab|2=<br />
//''SERVER''/''SHARENAME'' /mnt/''mountpoint'' cifs credentials=''/path/to/smbcredentials'',comment=systemd.automount,uid=''username'',gid=''usergroup'' 0 0<br />
}}<br />
<br />
{{Note|Space in sharename should be replaced by {{ic|\040}} (ASCII code for space in octal). For example, {{ic|//''SERVER''/share name}} on the command line should be {{ic|//''SERVER''/share\040name}} in {{ic|/etc/fstab}}.}}<br />
<br />
==== User mounting ====<br />
<br />
{{hc|/etc/fstab|2=<br />
//''SERVER''/''SHARENAME'' /mnt/''mountpoint'' cifs users,credentials=''/path/to/smbcredentials'',workgroup=''workgroup'',ip=''serverip'' 0 0<br />
}}<br />
<br />
{{Note|The option is user'''s''' (plural). For other filesystem types handled by mount, this option is usually ''user''; sans the "'''s'''".}}<br />
<br />
This will allow users to mount it as long as the mount point resides in a directory controllable by the user; i.e. the user's home. For users to be allowed to mount and unmount the Samba shares with mount points that they do not own, use [[#smbnetfs|smbnetfs]], or grant privileges using [[sudo]].<br />
<br />
=== WINS host names ===<br />
<br />
The {{pkg|smbclient}} package provides a driver to resolve host names using WINS. To enable it, add “wins” to the “hosts” line in /etc/nsswitch.conf.<br />
<br />
=== Automatic mounting ===<br />
<br />
There are several ways to easily browse shared resources:<br />
<br />
==== smbnetfs ====<br />
<br />
{{Note|1=smbnetfs needs an intact Samba server setup.<br />
See above on how to do that.}}<br />
<br />
First, check if you can see all the shares you are interested in mounting:<br />
$ smbtree -U ''remote_user''<br />
<br />
If that does not work, find and modify the following line<br />
in {{ic|/etc/samba/smb.conf}} accordingly:<br />
<br />
domain master = auto<br />
<br />
Now [[systemd#Using units|restart]] {{ic|smbd.service}} and {{ic|nmbd.service}}.<br />
<br />
If everything works as expected, [[pacman#Installing specific packages|install]] {{Pkg|smbnetfs}} from the official repositories.<br />
<br />
Then, add the following line to {{ic|/etc/fuse.conf}}:<br />
<br />
user_allow_other<br />
<br />
and load the {{ic|fuse}} [[kernel module]]:<br />
<br />
# modprobe fuse<br />
<br />
Now copy the directory {{ic|/etc/smbnetfs/.smb}} to your home directory:<br />
<br />
$ cp -a /etc/smbnetfs/.smb ~<br />
<br />
Then create a link to {{ic|smb.conf}}:<br />
<br />
$ ln -sf /etc/samba/smb.conf ~/.smb/smb.conf<br />
<br />
If a username and a password are required to access some of the shared folders, edit {{ic|~/.smb/smbnetfs.auth}}<br />
to include one or more entries like this:<br />
<br />
{{hc|~/.smb/smbnetfs.auth|<br />
auth "hostname" "username" "password"<br />
}}<br />
<br />
It is also possible to add entries for specific hosts to be mounted by smbnetfs, if necessary.<br />
More details can be found in {{ic|~/.smb/smbnetfs.conf}}.<br />
<br />
When you are done with the configuration, you need to run<br />
$ chmod 600 ~/.smb/smbnetfs.*<br />
Otherwise, smbnetfs complains about 'insecure config file permissions'.<br />
<br />
Finally, to mount your Samba network neighbourhood to a directory of your choice, call<br />
$ smbnetfs ''mount_point''<br />
<br />
===== Daemon =====<br />
<br />
The Arch Linux package also maintains an additional system-wide operation mode for smbnetfs. To enable it, you need to make the<br />
said modifications in the directoy {{ic|/etc/smbnetfs/.smb}}.<br />
<br />
Then, you can start and/or enable the {{ic|smbnetfs}} [[daemon]] as usual. The system-wide mount point is at {{ic|/mnt/smbnet/}}.<br />
<br />
==== autofs ====<br />
<br />
See [[Autofs]] for information on the kernel-based automounter for Linux.<br />
<br />
=== File manager configuration ===<br />
<br />
==== Nautilus, Nemo, Thunar and PCManFM ====<br />
<br />
In order to access samba shares through Nautilus, Nemo, Thunar or PCManFM, install the {{Pkg|gvfs-smb}} package, available in the [[official repositories]].<br />
<br />
Press {{ic|Ctrl+l}} and enter {{ic|smb://''servername''/''share''}} in the location bar to access your share.<br />
<br />
The mounted share is likely to be present at {{ic|/run/user/''your_UID''/gvfs}} in the filesystem.<br />
<br />
==== KDE ====<br />
<br />
KDE, has the ability to browse Samba shares built in. Therefore do not need any additional packages. However, for a GUI in the KDE System Settings, install the {{Pkg|kdenetwork-filesharing}} package from the official repositories.<br />
<br />
If when navigating with Dolphin you get a "Time Out" Error, you should uncomment and edit this line in smb.conf:{{bc|1=name resolve order = lmhosts bcast host wins}}<br />
as shown in this [http://ubuntuforums.org/showthread.php?t=1605499 page].<br />
<br />
==== Other graphical environments ====<br />
<br />
There are a number of useful programs, but they may need to have packages created for them. This can be done with the Arch package build system. The good thing about these others is that they do not require a particular environment to be installed to support them, and so they bring along less baggage.<br />
<br />
* {{Pkg|pyneighborhood}} is available in the official repositories.<br />
* LinNeighborhood, RUmba, xffm-samba plugin for Xffm are not available in the official repositories or the AUR. As they are not officially (or even unofficially supported), they may be obsolete and may not work at all.<br />
<br />
== See also ==<br />
<br />
* [http://www.samba.org/samba/docs/SambaIntro.html Samba: An Introduction]<br />
* [http://www.samba.org/ Official Samba site]</div>Sudowoodo