https://wiki.archlinux.org/api.php?action=feedcontributions&user=Pseudonomous&feedformat=atom
ArchWiki - User contributions [en]
2024-03-29T09:28:58Z
User contributions
MediaWiki 1.41.0
https://wiki.archlinux.org/index.php?title=CUPS/Printer_sharing&diff=265781
CUPS/Printer sharing
2013-07-10T22:31:30Z
<p>Pseudonomous: /* Sharing via IPP */</p>
<hr />
<div>[[Category:Printers]]<br />
[[ru:CUPS printer sharing]]<br />
{{Article summary start|Summary}}<br />
{{Article summary text|Setting up printer sharing using CUPS}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Samba}}<br />
{{Article summary wiki|CUPS}}<br />
{{Article summary end}}<br />
<br />
[[CUPS]] provides capabilities to set up printer sharing between different systems. Below you'll find instructions for common scenarios.<br />
<br />
==Between GNU/Linux systems==<br />
Once CUPS has been setup on the GNU/Linux print server, the recommended method of sharing the printer with another GNU/Linux system is through the relatively easy to use web interface, yet manual configuration is also a way.<br />
<br />
You will need avahi-daemon running, before you restart cupsd.<br />
<br />
===Using the web interface===<br />
<br />
Access http://localhost:631 with a browser and the CUPS administration home page will be displayed. <br />
<br />
Click on the ''Administration'' tab near the top, select the add printer option and it should automatically detect the connected printer. If not, try turning off the printer and then back on before another attempt. <br />
<br />
Once the printer has been set up, look under the ''Server'' heading and click the checkbox for "Share printers connected to this system". Now, conclude by clicking ''change settings'' and the server will automatically restart. <br />
<br />
Selecting "Edit Configuration File" allows making direct edits to the {{ic|cups.conf}} file. This is useful for allowing server access only to certain users or IP addresses, as the example shown below.<br />
<br />
===Manual setup===<br />
<br />
On the server computer (the one directly connected to the printer) simply open up {{ic|/etc/cups/cupsd.conf}} and allow access to the server by modifying the location lines. For instance:<br />
<Location /><br />
Order allow,deny<br />
Allow localhost<br />
Allow 192.168.0.*<br />
</Location><br />
<br />
Also make sure the server is listening on the IP address the client will be addressing. Add the following line after "# Listen <serverip>:631" (using the server's IP address instead of client's 192.168.0.100):<br />
Listen 192.168.0.101:631<br />
<br />
To "Show shared printers on the local network" make sure you have the Browsing directive enabled:<br />
Browsing On<br />
<br />
After making modifications, restart CUPS.<br />
<br />
On the client system, open up (create if not present) {{ic|/etc/cups/client.conf}} and add the ServerName to match the IP address or the name of the server. Add this line:<br />
ServerName 192.168.0.101<br />
<br />
There are more configuration possibilities, including automatic methods, which are described in detail in http://localhost:631/help/network.html <!-- Someone with CUPS installed could rename the link to the page title --><br />
<br />
After making modifications, restart CUPS.<br />
<br />
{{Note|When adding the printer from the client, if using the Internet Printing Protocol (IPP), put the URI as ipp://192.168.0.101:631/printers/<name-of-printer>}}<br />
<br />
====Using a CUPS 1.6.x client with a <= 1.5.x server====<br />
<br />
As of CUPS version 1.6, the client defaults to IPP 2.0. If the server uses CUPS <= 1.5 / IPP <= 1.1, the client doesn't downgrade the protocol automatically and thus can't communicate with the server. A workaround (undocumented as of 2013-05-07, but see [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=704238 this bug report]) is to put the following in {{ic|/etc/cups/client.conf}}:<br />
ServerName HOSTNAME-OR-IP-ADDRESS[:PORT]/version=1.1<br />
<br />
==Between GNU/Linux and Windows==<br />
<br />
===Linux server - Windows client===<br />
<br />
====Sharing via IPP====<br />
<br />
The '''preferred way''' to connect a Windows client to a Linux print server is using [http://de.wikipedia.org/wiki/Internet_Printing_Protocol IPP]. It's a standard printer protocol based on HTTP, allowing you all ways to profit from port forwarding, tunneling etc.<br />
The configuration is '''very easy''' and this way is less error-prone than using Samba.<br />
IPP is natively supported by Windows '''since Windows 2000'''.<br />
<br />
To configure the server side proceed as described in the section above to enable browsing.<br />
<br />
On the Windows computer, go to the printer control panel and choose to 'Add a New Printer'. Next, choose to give a URL. For the URL, type in the location of the printer:<br />
<pre><br />
http://host_ip_address:631/printers/printer_name<br />
</pre><br />
(where host_ip_address is the GNU/Linux server's IP address and printer_name is the name of the printer being connected to, you can also use the server's fully qualified domain name, if it has one, but you may need to set "ServerAlias my_fully_qualified_domain_name" in cupsd.conf for this to work).<br />
<br />
'''Note:''' The add printer dialog in windows is quite sensitive to the path to the printer, the dialogue box itself suggests:<br />
<pre><br />
http://servername:631/printers/printer_name/.printer <br />
</pre><br />
which will work in a web-browser but '''not''' in the add printer dialogue. (At least, not when using cups as an ipp server). The syntax suggested above:<br />
<pre><br />
http://host_ip_address:631/printers/printer_name<br />
</pre><br />
'''will''' work.<br />
<br />
After this, install the native printer drivers for your printer on the Windows computer. If the CUPS server is set up to use its own printer drivers, then you can just select a generic postscript printer for the Windows client(e.g. 'HP Color LaserJet 8500 PS' or 'Xerox DocuTech 135 PS2'). Then test the print setup by printing a test page.<br />
<br />
====Sharing via Samba====<br />
<br />
If your client's Windows version is below Windows 2000 or if you experienced troubles with IPP you can also use Samba for sharing.<br />
Note of course that with Samba this involves another complex piece of software. This makes this way '''more difficult to configure''' and thus sometimes also '''more error-prone''', mostly due do authentication problems.<br />
<br />
To configure Samba on the Linux server, edit {{ic|/etc/samba/smb.conf}} file to allow access to printers. File {{ic|smb.conf}} can look something like this:<br />
{{hc|/etc/samba/smb.conf|2=<br />
[global]<br />
workgroup=Heroes<br />
server string=Arch Linux Print Server<br />
security=user<br />
<br />
[printers]<br />
comment=All Printers<br />
path=/var/spool/samba<br />
browseable=yes<br />
# to allow user 'guest account' to print.<br />
guest ok=no<br />
writable=no<br />
printable=yes<br />
create mode=0700<br />
write list=@adm root yourusername<br />
}}<br />
<br />
That should be enough to share the printer, yet adding an individual printer entry may be desirable:<br />
{{hc|/etc/samba/smb.conf|2=<br />
[ML1250]<br />
comment=Samsung ML-1250 Laser Printer<br />
printer=ml1250<br />
path=/var/spool/samba<br />
printing=cups<br />
printable=yes<br />
printer admin=@admin root yourusername<br />
user client driver=yes<br />
# to allow user 'guest account' to print.<br />
guest ok=no<br />
writable=no<br />
write list=@adm root yourusername<br />
valid users=@adm root yourusername<br />
}}<br />
<br />
Please note that this assumes configuration was made so that users must have a valid account to access the printer. To have a public printer, set ''guest ok'' to ''yes'', and remove the ''valid users'' line. To add accounts, set up a regular GNU/Linux account and then set up a Samba password on the server. For instance:<br />
# useradd yourusername<br />
# smbpasswd -a yourusername<br />
<br />
<!--<br />
After setting up all the needed user accounts, the samba spool directory also needs configuration:<br />
{{bc|<br />
# mkdir /var/spool/samba<br />
# chmod 777 /var/spool/samba<br />
}}<br />
<br />
The next items that need changing are {{ic|/etc/cups/mime.convs}} and {{ic|/etc/cups/mime.types}}:<br />
<br />
{{ic|mime.convs}}:<br />
{{bc|<br />
# The following line is found at near the end of the file. Uncomment it.<br />
application/octet-stream application/vnd.cups-raw 0 -<br />
}}<br />
<br />
{{ic|mime.types}}:<br />
{{bc|<br />
# Again near the end of the file.<br />
application/octet-stream<br />
}}<br />
<br />
The changes to {{ic|mime.convs}} and {{ic|mime.types}} are needed to make CUPS print Microsoft Office document files. Many users seem to need that.<br />
--><br />
<br />
After this, restart the Samba daemon.<br />
<br />
Obviously, there are a lot of tweaks and customizations that can be done with setting up a Samba print server, so it is advised to look at the Samba and CUPS documentation for more help. The {{ic|smb.conf.example}} file also has some good samples that might warrant imitating.<br />
<br />
===Windows server - Linux client===<br />
<br />
====Sharing via LPD====<br />
<br />
Windows 7 has a built-in LPD server - using it will probably be the easiest approach as it does neither require an installation of ''Samba'' on the client nor heavy configuration on the server. It can be activated in the ''Control Panel'' under ''Programs'' -> ''Activate Windows functions'' in the section ''Print services''. The printer must have ''shared'' activated in its properties. Use a share name without any special characters like spaces, commas, etc.<br />
<br />
Then the printer can be added in CUPS, choosing LPD protocol. The printer address will look like this:<br />
<br />
# lpd://windowspc/printersharename<br />
<br />
Before adding the printer, you will most likely have to install an appropriate printer driver depending on your printer model. Generic PostScript or RAW drivers might also work.<br />
<br />
====Sharing via IPP====<br />
<br />
As above, IPP is also the '''preferred''' protocol for printer sharing. However this way might be a bit '''more difficult''' than the native Samba approach below, since you need a greater effort to set up an IPP-Server on Windows.<br />
The commonly chosen server software is Microsoft's Internet Information Services (IIS).<br />
<br />
{{Note|This section is incomplete. Here is a description how to set up ISS in Windows XP and Windows 2000, unfortunately in German [http://www.heise.de/netze/artikel/Ueberall-drucken-221652.html]}}<br />
<br />
====Sharing via Samba====<br />
<br />
A '''much simpler way''' is using Window's native printer sharing via Samba. There is almost no configuration needed, and all of it can be done from the CUPS Backend. As above noted, if there are any problems the reason is mostly related to authentication trouble and Windows access restrictions.<br />
<br />
On the server side enable sharing for your desired printer and ensure that the user on the client machine has the right to access the printer.<br />
<br />
The following section describes how to set up the client, assuming that both daemons (cupsd and smbd) are running.<br />
<br />
=====Configuration using the web interface=====<br />
<br />
The Samba CUPS back-end is enabled by default, if for any reason it is not activate it by entering the following command and restarting CUPS.<br />
# ln -s $(which smbspool) /usr/lib/cups/backend/smb<br />
<br />
Next, simply log in on the CUPS web interface and choose to add a new printer. As a device choose "Windows Printer via SAMBA".<br />
<br />
For the device location, enter:<br />
smb://username:password@hostname/printer_name<br />
<br />
Or without a password:<br />
smb://username@hostname/printer_name<br />
<br />
Make sure that the user actually has access to the printer on the Windows computer and select the appropriate drivers. If the computer is located on a domain, make sure the user-name includes the domain: <br />
smb://username:password@domain/hostname/printer_name<br />
<br />
If the network contains many printers you might want to set a preferred printer. To do so use the web interface, go into the printer tab, choose the desired printer and select 'Set as default' from the drop-down list.<br />
<br />
=====Manual configuration=====<br />
<br />
For manual configuration stop the CUPS daemon and add your printer to {{ic|/etc/cups/printers.conf}}, which might for example look like this<br />
{{hc|/etc/cups/printers.conf|2=<br />
<DefaultPrinter MyPrinter><br />
AuthInfoRequired username,password<br />
Info My printer via SAMBA<br />
Location In my Office<br />
MakeModel Samsung ML-1250 - CUPS+Gutenprint v5.2.7 # <= use 'lpinfo -m' to list available models<br />
DeviceURI smb://username:password@hostname/printer_name # <= server URI as described in previous section<br />
State Idle<br />
Type 4<br />
Accepting Yes<br />
Shared No<br />
JobSheets none none<br />
QuotaPeriod 0<br />
PageLimit 0<br />
KLimit 0<br />
AllowUser yourusername # <= do not forget to change this<br />
OpPolicy default<br />
ErrorPolicy stop-printer<br />
</Printer><br />
}}<br />
<br />
Then restart the CUPS daemon an try to print a test page.<br />
<br />
To set the preferred printer use the following command <br />
# lpoptions -d desired_default_printer_name<br />
<br />
===Troubleshooting===<br />
<br />
If there are any problems, the first thing to do is enable debug information by setting<br />
{{bc|LogLevel debug}} in {{ic|/etc/cups/cupsd.conf}}.<br />
<br />
Then restart the CUPS daemon and check for error messages in {{ic|/var/log/cups/error_log}}. A convenient way to do so is<br />
# tail -f /var/log/cups/error_log<br />
which keeps printing new error messages as they occur.<br />
<br />
Note: You can also use the web interface to browse this error file.<br />
<br />
====Can't print with GTK applications====<br />
If you get "getting printer information failed" when you try to print from gtk-applications, add this line to your {{ic|/etc/hosts}}:<br />
# serverip some.name.org ServersHostname<br />
<br />
==Other operating systems==<br />
More information on interfacing CUPS with other printing systems can be found in the CUPS manual, e.g. on http://localhost:631/sam.html#PRINTING_OTHER</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=KMS&diff=103194
KMS
2010-04-14T00:06:08Z
<p>Pseudonomous: /* Enabling KMS */</p>
<hr />
<div>{{i18n|KMS}}<br />
[[Category: Graphics (English)]][[Category: X Server (English)]]<br />
<br />
Kernel Mode Setting (KMS) is a method for setting display resolution and depth in the kernel space rather than user space.<br />
<br />
KMS enables native resolution in the framebuffer and allows for instant console (tty) switching. KMS also enables newer technologies (such as DRI2) which will help reduce artifacts and increase 3D performance, even kernel space power-saving.<br />
<br />
It is predicted that all major video chipsets will eventually support and make use of KMS by default.<br />
<br />
== Background ==<br />
<br />
Previously, setting up the video card was the job of the X server. Because of this, it was not easily possible to have fancy graphics in virtual consoles. Also, each time a switch from X to a virtual console was made (Ctrl+Alt+F1), the server had to give control over the video card to the kernel, which was slow and caused flickering. The same "painful" process happened when the control was given back to the X server (Ctrl+Alt+F7).<br />
<br />
With Kernel Mode Setting (KMS) , the kernel is now able to set the mode of the video card. This makes fancy graphics during bootup, virtual console and X fast switching possible, among other things.<br />
<br />
KMS is a new technology which is still considered experimental at this time due to its incomplete support for all video cards. It is usable and stable for many, but as with all newer software, the possibility of bugs exists.<br />
<br />
== Enabling KMS ==<br />
<br />
Several methods of enabling KMS exist. Note that for ''any'' method you use, you should ''always'' disable any "vga=" and "video=" options in your bootloader as these will conflict with the native resolution enabled by KMS. Any other framebuffer drivers (such as [[uvesafb]]) must also be disabled before enabling KMS.<br />
<br />
KMS is not yet supported by all graphics chipsets. Consult the article of your particular chipset for specifics:<br />
<br />
* [[ATI]]<br />
* [[Intel]]<br />
* [[NVIDIA]]<br />
<br />
== KMS is enabled, now my fonts are too tiny ==<br />
<br />
See [[Fonts#Changing_the_default_font changing the default font]] for how change your console font to a large font. One font available from EXTRA that is available in many sizes, including larger sizes, is the Terminus font.<br />
<br />
== More resources ==<br />
[http://en.wikipedia.org/wiki/Mode-setting Mode-setting at Wikipedia]</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=Wpa_supplicant&diff=83438
Wpa supplicant
2009-11-13T08:50:04Z
<p>Pseudonomous: /* Wireless Management Only */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|WPA Supplicant}}<br />
{{i18n_entry|简体中文|WPA 客户端}}<br />
{{i18n_entry|Russian|WPA Supplicant (Русский)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Communication and network (English)]]<br />
[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
==Read This First==<br />
This article assumes that you are familiar with your hardware, and are capable of finding your way around configuration files and configuring your system. It is also critical you have *read and understood* the [[Wireless Setup]] article, because it is the basis for all that we are going to explain here.<br />
<br />
The previous version of this article expanded on the use of [[ABS - The Arch Build System]] and the Network Profiles mentioned on [[Wireless Setup]]. I suppose that a better understanding of the system always helps, but tends to divert objectives, and finally affects the scope of the document. <br />
<br />
Finally, this document is not a prerequisite if your hardware works out of the box and is handled through a connection daemon like networkmanager or the like. If you prefer to connect to the network using a graphical tool, you shouldn't be reading this.<br />
<br />
==What is WPA Supplicant? ==<br />
You have probably heard about WEP and its inherent weaknesses. A network protected by a static WEP key can quite easily be compromised by a motivated hacker. WPA corrects the problem of the static key, by changing it at a packet transmitted/recieved frequency, or once a certain amount of time has passed. This process is performed by a daemon which is tightly bound to your wireless hardware. <br />
<br />
Inferior drivers (in particular those used through ndiswrapper) can provide much frustration when used in conjunction with wpa_supplicant so, if at all possible, use hardware with proper support and high quality drivers.<br />
<br />
For further information, WPA Supplicant's homepage is reachable at: http://hostap.epitest.fi/wpa_supplicant/<br />
<br />
==Installation==<br />
wpa_supplicant is in the package group '''base-devel''' from the repositories. Invoking pacman, the package can be installed explicitly:<br />
pacman -S wpa_supplicant<br />
<br />
This package has been built for supporting a very broad range of wireless hardware. For your information, here is the list, which can be obtained by executing 'wpa_supplicant', without quotes, from your bash prompt:<br />
<br />
# wpa_supplicant<br />
...<br />
<br />
Driver list:<br />
<br />
*HostAP<br />
*Prism54<br />
*Madwifi<br />
*NDISWrapper<br />
*AMTEL<br />
*IPW (both 2100 and 2200 drivers)<br />
*WEXT (Generic Linux wireless extensions)<br />
*Wired ethernet<br />
<br />
Most wireless hardware is supported by default by wpa_supplicant. Even if your chipset manufacturer isn't listed (which is the most probable case), you can still make use of the Generic Wireless Extensions to connect to a WPA-secured network. Based on my particular experience, 75% of hardware is supported by WEXT, about 20% is compatible by recompiling wpa_supplicant/hw drivers from scratch and, unfortunately the missing 5% which is definitely incompatible. I'll talk about the incompatibilities later, however if you're completely desperate, ABS is always an option. WPA Supplicant is available at: /var/abs/core/support/wpa_supplicant.<br />
<br />
=Procedure=<br />
/etc/wpa_supplicant.conf contains all configuration settings for wpa_supplicant. Its contents are quite simple, although the sample file that is provided is horribly obtuse. For the purpose of simplifying, login as root, and rename the default wpa_supplicant.conf file. It is not needed at this point.<br />
# mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.original<br />
<br />
==The "add my networks on the fly w/ a cli or gui front-end" Method==<br />
It possible to configure wpa_supplicant just enough that you can use wpa_gui or wpa_cli (see "Management") to actually configure your network connections, instead of defining your network blocks in the wpa_supplicant.conf file. You will need a config file along the lines of:<br />
<br />
ctrl_interface=/var/run/wpa_supplicant<br />
ctrl_interface_group=network<br />
update_config=1<br />
<br />
This configuration will allow users in the "network" group to control wpa_supplicant via the wpa_gui, wpa_cli frontends, the "update_config=1" variable allows these programs (wpa_cli,wpa_gui) to modify the wpa_supplicant.conf file, to save new networks or modifications to existing networks. Now you'll need to start wpa_supplicant:<br />
<br />
# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B<br />
<br />
where the -D option specifies your wireless driver (which is almost always wext), -i specifies interface (replace wlan0 with your wireless interface's name) and -c specifies the conf file. -B tell wpa_supplicant to run as a deamon. You will have to run wpa_supplicant as root (or with sudo), but any user in the network group can run wpa_gui or wpa_cli.<br />
<br />
So now you should be able to start up wpa_gui, or wpa_cli and add some networks to connect to. If you'd rather edit the config file manually, read on. In fact, some of the following information is kind of important even if you don't manuelly define your networks in wpa_supplicant.conf, so you should probably read it anyway.<br />
<br />
==The "I want to add my networks by editing wpa_supplicant.conf method"==<br />
<br />
The specified ssid and passphrase for your wpa encrypted wireless network must be encoded into a hexadecimal string. Achieving this is quite simple, by utilizing the wpa_passphrase utility, which is supplied as part of the wpa_supplicant package. Use the syntax <code>wpa_passphrase [ssid] [passphrase]</code><br />
<br />
*An example exercise:<br />
<br />
# wpa_passphrase mywireless secretpassphrase<br />
<br />
this should generate something like the below:<br />
network={<br />
ssid="mywireless"<br />
#psk="secretpassphrase"<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
This is the basic configuration required to get wpa working. The first line is the opening statement for the network, the second is the ssid of the base station you are wanting to connect to, the third line the passphrase, and the fourth the hex key which is required to connect.<br />
<br />
*Utilizing wpa_passphrase, specify your actual ssid and passphrase, and redirect the output to /etc/wpa_supplicant.conf:<br />
<br />
# wpa_passphrase mywireless secretpassphrase > /etc/wpa_supplicant.conf<br />
<br />
changing the details where applicable to your own specific information. This will then create a basic /etc/wpa_supplicant.conf from the output of the wpa_passphrase command. <br />
<br />
For example if you use the WPA2 protocol you will have to add few lines in the network section:<br />
<br />
network={<br />
ssid="mywireless"<br />
proto=RSN<br />
pairwise=CCMP TKIP<br />
key_mgmt=WPA-PSK<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
{{Box Note | Your network information will be stored in plain text format, so you should change the permissions on the newly created /etc/wpa_supplicant.conf file (e.g. <tt>chmod 0600 /etc/wpa_supplicant.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
Adding an additional WPA encrypted network can be achieved like so:<br />
# wpa_passphrase additional_ssid additional_passphrase >> /etc/wpa_supplicant.conf<br />
The '>>' will redirect and append the output to /etc/wpa_supplicant.conf, without overwriting.<br />
<br />
There are a large number of options which are available to set under the network which you can investigate by looking at the original configuration file. In most cases you can use the defaults, and not specify anything further in that section at the moment.<br />
<br />
Lastly, specify these additional lines at the top of /etc/wpa_supplicant.conf, with your editor of choice:<br />
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel<br />
<br />
If you need to connect to several networks, just define another network block in the same file. Change the priority at will, recalling that priorities with big numbers are tried first.<br />
<br />
Now you can try connecting manually.<br />
<br />
First, bring the wifi interface up. For the purposes of this example we will use interface <code>wlan0.</code><br />
<br />
# ifconfig wlan0 up<br />
<br />
Next, direct the interface to associate with the access point ssid:<br />
# iwconfig wlan0 essid [ssid]<br />
Once ssid association is successful, (after about 10 seconds on average), you need to run wpa_supplicant to complete the encrypted association. Typically, you will be able to use the '''W'''ireless '''EXT'''ensions driver for wpa_supplicant, if you cannot, then you might need to check how to do it with your wireless device on the internet.<br />
<br />
Issue the following as root:<br />
<br />
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf <br />
The previous syntax tells wpa_supplicant to use its default hardware configuration (WEXT - Linux '''W'''ireless '''EXT'''ensions) and to associate with the ssid which is specified in /etc/wpa_supplicant.conf. Also, this association should be performed through the wlan0 wireless interface and the process should move to the background, (-B). For verbose output, add '''-d''' or '''-dd''' (for debug) to dump more information to the console. You can find additional examples here [http://www.examplenow.com/wpa_supplicant wpa_supplicant].<br />
<br />
In the console output, there should be a line that reads ''''Associated:'''' followed by a MAC address. All that is required now is an IP address.<br />
s<br />
As root, issue:<br />
# dhcpcd wlan0<br />
<br />
*Note: *Do not* request the IP inmediately! You must wait to ensure proper asociation. If you use a script, you can use "sleep 10s" to wait for 10 seconds.<br />
<br />
Verify the interface has received an IP address using ifconfig:<br />
# ifconfig wlan0<br />
<br />
wlan0 Link encap:Ethernet HWaddr 00:1C:BF:66:4E:E0 <br />
inet addr:192.168.0.62 Bcast:192.168.0.255 Mask:255.255.255.0<br />
inet6 addr: fe80::21c:bfff:fe66:4ee0/64 Scope:Link<br />
UP BROADCAST MULTICAST MTU:1500 Metric:1<br />
RX packets:140387 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:96902 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000<br />
RX bytes:125513183 (119.6 Mb) TX bytes:12299192 (11.7 Mb)<br />
<br />
If the output is close to the above, you are now connected. If so you can investigate using the netcfg2 scripts to setup this on a more permanent arrangement and get it working when you start the machine.<br />
Depending to the approach you've chosen to configure your wireless adapter, you can decide to use a graphical --but not invasive-- tool like [[Wicd]] or pick the network profiles provided by netcfg.<br />
<br />
More sophisticated configurations, like EAPOL or RADIUS authentication are very well detailed in the wpa_supplicant.conf manpage. These configurations fall out of the scope of this document.<br />
<br />
==But man, that didn't work for me - (Rebuilding wpa_supplicant from scratch)==<br />
Grab a copy of wpa_supplicant source from the homepage or from the ABS. Once downloaded and untarred, have a look at the file '.config' (yeah, it's hidden). The file looks like a kernel config, only much smaller. Have a look at the sections named CONFIG_DRIVER_''DRIVERNAME'' and choose yes or no, depending upon your driver. Be careful with the options chosen, because you will need to specify an additional path to your wireless drivers' source in order to correctly compile the low-level association component. Some weird atheros cards may need a fresh wpa_supplicant build compiled against the latest madwifi-svn relase available. If this is the case, here is an example to enlighten you through the compilation process:<br />
<br />
'''madwifi example''': edit the following lines in the config file to look like this. This assumes that you have built madwifi with abs and that the source from the build is stored in /var/abs/local/madwifi/src/.<br />
<br />
#Driver interface for madwifi driver<br />
CONFIG_DRIVER_MADWIFI=y<br />
#Change include directories to match with the local settings<br />
CFLAGS += -I/var/abs/local/madwifi/src/madwifi<br />
<br />
Once configured, you can proceed with makepkg as usual.<br />
<br />
=Management=<br />
<br />
===Wireless Management Only===<br />
<br />
As mentioned above, there are two frontends to wpa_supplicant actually written by the wpa_supplicant developers themselves, "wpa_cli", and "wpa_gui". wpa_cli is, as you might expect, a command line front end, while "wpa_gui" is a qt-based frontend to wpa_supplicant. wpa_cli is include with the wpa_supplicant package, wpa_supplicant_gui is it's own package. The details on how to setup wpa supplicant to work w/ either wpa_cli or wpa_supplicant are above.<br />
<br />
wpa_cli, when invoked without options, will give you a prompt environment, try typing "help" for help.<br />
<br />
wpa_gui is pretty straightforward, If you hit "scan" you will be presented with a list of detected SSIDs, you can double click to add one, you will be given a dialogue box that will let you enter information that you need to associate with your network, most likely, you will only have to enter your PSK if you use wpa/wpa2 or your "key0" for a WEP connection. The protocal for WPA/WPA2/WEP/Unencrypted should be autodetected. Things like 802.1x will require a bit more configuration.<br />
<br />
After you add a network you can modify it if you do something like changing the PSK, switch to the 'Manage Networks' tab and select the network you want to Edit / Remove. You can also add a network without scanning, which you will need to do if you don't broadcast your SSID.<br />
<br />
'''Note:''' wpa_cli and wpa_gui will not get you an ip address or set up a proper routeing table, they will '''only''' associate you with a wireless access point. The wpa_auto scripts from the aur can be used to start wpa_supplicant at boot and automatically run dhcp to configure your network connection after you associate to a wireless network, or you might right your own scripts. Higher level, wireless/network management utilites are also available, that are capable of managing both wireless connections and wired connections:<br />
<br />
===[[Wicd]]===<br />
<br />
Installation:<br />
# pacman -S [[wicd]] <br />
<br />
Very straightforward. Scan for networks, fill in the required data and connect. You might need to add <br />
/usr/lib/wicd/autoconnect.py<br />
<br />
to your init and power-managing scripts to reconnect to those networks if autoconnection behavior is expected.<br />
q<br />
===netcfg===<br />
<br />
See [[Network Profiles]]<br />
<br />
==Common Issues==<br />
99.9% of the issues are related to the association. So, have a deep look at wpa_supplicant's output when you suspect its misbehaving. Add '-d' (for debug) to increase the verbosity. Usually '-dd' is enough. '-dddd' might be overkill.<br />
<br />
When you're inspecting the log, have a look at entries like this one:<br />
<br />
ioctl['''WHATEVER''']: Operation not supported<br />
<br />
If this is the case, you're experiencing a driver issue. Upgrade drivers, or change the -D parameter.<br />
<br />
Another common problem is ''No suitable AP found'' messages. Wpa_supplicant seems to have trouble finding hidden essids. Usually setting scan_ssid=1 in your network block will take care of this.</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=Wpa_supplicant&diff=83437
Wpa supplicant
2009-11-13T08:49:41Z
<p>Pseudonomous: /* Management */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|WPA Supplicant}}<br />
{{i18n_entry|简体中文|WPA 客户端}}<br />
{{i18n_entry|Russian|WPA Supplicant (Русский)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Communication and network (English)]]<br />
[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
==Read This First==<br />
This article assumes that you are familiar with your hardware, and are capable of finding your way around configuration files and configuring your system. It is also critical you have *read and understood* the [[Wireless Setup]] article, because it is the basis for all that we are going to explain here.<br />
<br />
The previous version of this article expanded on the use of [[ABS - The Arch Build System]] and the Network Profiles mentioned on [[Wireless Setup]]. I suppose that a better understanding of the system always helps, but tends to divert objectives, and finally affects the scope of the document. <br />
<br />
Finally, this document is not a prerequisite if your hardware works out of the box and is handled through a connection daemon like networkmanager or the like. If you prefer to connect to the network using a graphical tool, you shouldn't be reading this.<br />
<br />
==What is WPA Supplicant? ==<br />
You have probably heard about WEP and its inherent weaknesses. A network protected by a static WEP key can quite easily be compromised by a motivated hacker. WPA corrects the problem of the static key, by changing it at a packet transmitted/recieved frequency, or once a certain amount of time has passed. This process is performed by a daemon which is tightly bound to your wireless hardware. <br />
<br />
Inferior drivers (in particular those used through ndiswrapper) can provide much frustration when used in conjunction with wpa_supplicant so, if at all possible, use hardware with proper support and high quality drivers.<br />
<br />
For further information, WPA Supplicant's homepage is reachable at: http://hostap.epitest.fi/wpa_supplicant/<br />
<br />
==Installation==<br />
wpa_supplicant is in the package group '''base-devel''' from the repositories. Invoking pacman, the package can be installed explicitly:<br />
pacman -S wpa_supplicant<br />
<br />
This package has been built for supporting a very broad range of wireless hardware. For your information, here is the list, which can be obtained by executing 'wpa_supplicant', without quotes, from your bash prompt:<br />
<br />
# wpa_supplicant<br />
...<br />
<br />
Driver list:<br />
<br />
*HostAP<br />
*Prism54<br />
*Madwifi<br />
*NDISWrapper<br />
*AMTEL<br />
*IPW (both 2100 and 2200 drivers)<br />
*WEXT (Generic Linux wireless extensions)<br />
*Wired ethernet<br />
<br />
Most wireless hardware is supported by default by wpa_supplicant. Even if your chipset manufacturer isn't listed (which is the most probable case), you can still make use of the Generic Wireless Extensions to connect to a WPA-secured network. Based on my particular experience, 75% of hardware is supported by WEXT, about 20% is compatible by recompiling wpa_supplicant/hw drivers from scratch and, unfortunately the missing 5% which is definitely incompatible. I'll talk about the incompatibilities later, however if you're completely desperate, ABS is always an option. WPA Supplicant is available at: /var/abs/core/support/wpa_supplicant.<br />
<br />
=Procedure=<br />
/etc/wpa_supplicant.conf contains all configuration settings for wpa_supplicant. Its contents are quite simple, although the sample file that is provided is horribly obtuse. For the purpose of simplifying, login as root, and rename the default wpa_supplicant.conf file. It is not needed at this point.<br />
# mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.original<br />
<br />
==The "add my networks on the fly w/ a cli or gui front-end" Method==<br />
It possible to configure wpa_supplicant just enough that you can use wpa_gui or wpa_cli (see "Management") to actually configure your network connections, instead of defining your network blocks in the wpa_supplicant.conf file. You will need a config file along the lines of:<br />
<br />
ctrl_interface=/var/run/wpa_supplicant<br />
ctrl_interface_group=network<br />
update_config=1<br />
<br />
This configuration will allow users in the "network" group to control wpa_supplicant via the wpa_gui, wpa_cli frontends, the "update_config=1" variable allows these programs (wpa_cli,wpa_gui) to modify the wpa_supplicant.conf file, to save new networks or modifications to existing networks. Now you'll need to start wpa_supplicant:<br />
<br />
# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B<br />
<br />
where the -D option specifies your wireless driver (which is almost always wext), -i specifies interface (replace wlan0 with your wireless interface's name) and -c specifies the conf file. -B tell wpa_supplicant to run as a deamon. You will have to run wpa_supplicant as root (or with sudo), but any user in the network group can run wpa_gui or wpa_cli.<br />
<br />
So now you should be able to start up wpa_gui, or wpa_cli and add some networks to connect to. If you'd rather edit the config file manually, read on. In fact, some of the following information is kind of important even if you don't manuelly define your networks in wpa_supplicant.conf, so you should probably read it anyway.<br />
<br />
==The "I want to add my networks by editing wpa_supplicant.conf method"==<br />
<br />
The specified ssid and passphrase for your wpa encrypted wireless network must be encoded into a hexadecimal string. Achieving this is quite simple, by utilizing the wpa_passphrase utility, which is supplied as part of the wpa_supplicant package. Use the syntax <code>wpa_passphrase [ssid] [passphrase]</code><br />
<br />
*An example exercise:<br />
<br />
# wpa_passphrase mywireless secretpassphrase<br />
<br />
this should generate something like the below:<br />
network={<br />
ssid="mywireless"<br />
#psk="secretpassphrase"<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
This is the basic configuration required to get wpa working. The first line is the opening statement for the network, the second is the ssid of the base station you are wanting to connect to, the third line the passphrase, and the fourth the hex key which is required to connect.<br />
<br />
*Utilizing wpa_passphrase, specify your actual ssid and passphrase, and redirect the output to /etc/wpa_supplicant.conf:<br />
<br />
# wpa_passphrase mywireless secretpassphrase > /etc/wpa_supplicant.conf<br />
<br />
changing the details where applicable to your own specific information. This will then create a basic /etc/wpa_supplicant.conf from the output of the wpa_passphrase command. <br />
<br />
For example if you use the WPA2 protocol you will have to add few lines in the network section:<br />
<br />
network={<br />
ssid="mywireless"<br />
proto=RSN<br />
pairwise=CCMP TKIP<br />
key_mgmt=WPA-PSK<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
{{Box Note | Your network information will be stored in plain text format, so you should change the permissions on the newly created /etc/wpa_supplicant.conf file (e.g. <tt>chmod 0600 /etc/wpa_supplicant.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
Adding an additional WPA encrypted network can be achieved like so:<br />
# wpa_passphrase additional_ssid additional_passphrase >> /etc/wpa_supplicant.conf<br />
The '>>' will redirect and append the output to /etc/wpa_supplicant.conf, without overwriting.<br />
<br />
There are a large number of options which are available to set under the network which you can investigate by looking at the original configuration file. In most cases you can use the defaults, and not specify anything further in that section at the moment.<br />
<br />
Lastly, specify these additional lines at the top of /etc/wpa_supplicant.conf, with your editor of choice:<br />
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel<br />
<br />
If you need to connect to several networks, just define another network block in the same file. Change the priority at will, recalling that priorities with big numbers are tried first.<br />
<br />
Now you can try connecting manually.<br />
<br />
First, bring the wifi interface up. For the purposes of this example we will use interface <code>wlan0.</code><br />
<br />
# ifconfig wlan0 up<br />
<br />
Next, direct the interface to associate with the access point ssid:<br />
# iwconfig wlan0 essid [ssid]<br />
Once ssid association is successful, (after about 10 seconds on average), you need to run wpa_supplicant to complete the encrypted association. Typically, you will be able to use the '''W'''ireless '''EXT'''ensions driver for wpa_supplicant, if you cannot, then you might need to check how to do it with your wireless device on the internet.<br />
<br />
Issue the following as root:<br />
<br />
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf <br />
The previous syntax tells wpa_supplicant to use its default hardware configuration (WEXT - Linux '''W'''ireless '''EXT'''ensions) and to associate with the ssid which is specified in /etc/wpa_supplicant.conf. Also, this association should be performed through the wlan0 wireless interface and the process should move to the background, (-B). For verbose output, add '''-d''' or '''-dd''' (for debug) to dump more information to the console. You can find additional examples here [http://www.examplenow.com/wpa_supplicant wpa_supplicant].<br />
<br />
In the console output, there should be a line that reads ''''Associated:'''' followed by a MAC address. All that is required now is an IP address.<br />
s<br />
As root, issue:<br />
# dhcpcd wlan0<br />
<br />
*Note: *Do not* request the IP inmediately! You must wait to ensure proper asociation. If you use a script, you can use "sleep 10s" to wait for 10 seconds.<br />
<br />
Verify the interface has received an IP address using ifconfig:<br />
# ifconfig wlan0<br />
<br />
wlan0 Link encap:Ethernet HWaddr 00:1C:BF:66:4E:E0 <br />
inet addr:192.168.0.62 Bcast:192.168.0.255 Mask:255.255.255.0<br />
inet6 addr: fe80::21c:bfff:fe66:4ee0/64 Scope:Link<br />
UP BROADCAST MULTICAST MTU:1500 Metric:1<br />
RX packets:140387 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:96902 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000<br />
RX bytes:125513183 (119.6 Mb) TX bytes:12299192 (11.7 Mb)<br />
<br />
If the output is close to the above, you are now connected. If so you can investigate using the netcfg2 scripts to setup this on a more permanent arrangement and get it working when you start the machine.<br />
Depending to the approach you've chosen to configure your wireless adapter, you can decide to use a graphical --but not invasive-- tool like [[Wicd]] or pick the network profiles provided by netcfg.<br />
<br />
More sophisticated configurations, like EAPOL or RADIUS authentication are very well detailed in the wpa_supplicant.conf manpage. These configurations fall out of the scope of this document.<br />
<br />
==But man, that didn't work for me - (Rebuilding wpa_supplicant from scratch)==<br />
Grab a copy of wpa_supplicant source from the homepage or from the ABS. Once downloaded and untarred, have a look at the file '.config' (yeah, it's hidden). The file looks like a kernel config, only much smaller. Have a look at the sections named CONFIG_DRIVER_''DRIVERNAME'' and choose yes or no, depending upon your driver. Be careful with the options chosen, because you will need to specify an additional path to your wireless drivers' source in order to correctly compile the low-level association component. Some weird atheros cards may need a fresh wpa_supplicant build compiled against the latest madwifi-svn relase available. If this is the case, here is an example to enlighten you through the compilation process:<br />
<br />
'''madwifi example''': edit the following lines in the config file to look like this. This assumes that you have built madwifi with abs and that the source from the build is stored in /var/abs/local/madwifi/src/.<br />
<br />
#Driver interface for madwifi driver<br />
CONFIG_DRIVER_MADWIFI=y<br />
#Change include directories to match with the local settings<br />
CFLAGS += -I/var/abs/local/madwifi/src/madwifi<br />
<br />
Once configured, you can proceed with makepkg as usual.<br />
<br />
=Management=<br />
<br />
==Wireless Management Only==<br />
<br />
As mentioned above, there are two frontends to wpa_supplicant actually written by the wpa_supplicant developers themselves, "wpa_cli", and "wpa_gui". wpa_cli is, as you might expect, a command line front end, while "wpa_gui" is a qt-based frontend to wpa_supplicant. wpa_cli is include with the wpa_supplicant package, wpa_supplicant_gui is it's own package. The details on how to setup wpa supplicant to work w/ either wpa_cli or wpa_supplicant are above.<br />
<br />
wpa_cli, when invoked without options, will give you a prompt environment, try typing "help" for help.<br />
<br />
wpa_gui is pretty straightforward, If you hit "scan" you will be presented with a list of detected SSIDs, you can double click to add one, you will be given a dialogue box that will let you enter information that you need to associate with your network, most likely, you will only have to enter your PSK if you use wpa/wpa2 or your "key0" for a WEP connection. The protocal for WPA/WPA2/WEP/Unencrypted should be autodetected. Things like 802.1x will require a bit more configuration.<br />
<br />
After you add a network you can modify it if you do something like changing the PSK, switch to the 'Manage Networks' tab and select the network you want to Edit / Remove. You can also add a network without scanning, which you will need to do if you don't broadcast your SSID.<br />
<br />
'''Note:''' wpa_cli and wpa_gui will not get you an ip address or set up a proper routeing table, they will '''only''' associate you with a wireless access point. The wpa_auto scripts from the aur can be used to start wpa_supplicant at boot and automatically run dhcp to configure your network connection after you associate to a wireless network, or you might right your own scripts. Higher level, wireless/network management utilites are also available, that are capable of managing both wireless connections and wired connections:<br />
<br />
===[[Wicd]]===<br />
<br />
Installation:<br />
# pacman -S [[wicd]] <br />
<br />
Very straightforward. Scan for networks, fill in the required data and connect. You might need to add <br />
/usr/lib/wicd/autoconnect.py<br />
<br />
to your init and power-managing scripts to reconnect to those networks if autoconnection behavior is expected.<br />
q<br />
===netcfg===<br />
<br />
See [[Network Profiles]]<br />
<br />
==Common Issues==<br />
99.9% of the issues are related to the association. So, have a deep look at wpa_supplicant's output when you suspect its misbehaving. Add '-d' (for debug) to increase the verbosity. Usually '-dd' is enough. '-dddd' might be overkill.<br />
<br />
When you're inspecting the log, have a look at entries like this one:<br />
<br />
ioctl['''WHATEVER''']: Operation not supported<br />
<br />
If this is the case, you're experiencing a driver issue. Upgrade drivers, or change the -D parameter.<br />
<br />
Another common problem is ''No suitable AP found'' messages. Wpa_supplicant seems to have trouble finding hidden essids. Usually setting scan_ssid=1 in your network block will take care of this.</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=Wpa_supplicant&diff=83436
Wpa supplicant
2009-11-13T08:49:26Z
<p>Pseudonomous: /* [Wireless Management Only] */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|WPA Supplicant}}<br />
{{i18n_entry|简体中文|WPA 客户端}}<br />
{{i18n_entry|Russian|WPA Supplicant (Русский)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Communication and network (English)]]<br />
[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
==Read This First==<br />
This article assumes that you are familiar with your hardware, and are capable of finding your way around configuration files and configuring your system. It is also critical you have *read and understood* the [[Wireless Setup]] article, because it is the basis for all that we are going to explain here.<br />
<br />
The previous version of this article expanded on the use of [[ABS - The Arch Build System]] and the Network Profiles mentioned on [[Wireless Setup]]. I suppose that a better understanding of the system always helps, but tends to divert objectives, and finally affects the scope of the document. <br />
<br />
Finally, this document is not a prerequisite if your hardware works out of the box and is handled through a connection daemon like networkmanager or the like. If you prefer to connect to the network using a graphical tool, you shouldn't be reading this.<br />
<br />
==What is WPA Supplicant? ==<br />
You have probably heard about WEP and its inherent weaknesses. A network protected by a static WEP key can quite easily be compromised by a motivated hacker. WPA corrects the problem of the static key, by changing it at a packet transmitted/recieved frequency, or once a certain amount of time has passed. This process is performed by a daemon which is tightly bound to your wireless hardware. <br />
<br />
Inferior drivers (in particular those used through ndiswrapper) can provide much frustration when used in conjunction with wpa_supplicant so, if at all possible, use hardware with proper support and high quality drivers.<br />
<br />
For further information, WPA Supplicant's homepage is reachable at: http://hostap.epitest.fi/wpa_supplicant/<br />
<br />
==Installation==<br />
wpa_supplicant is in the package group '''base-devel''' from the repositories. Invoking pacman, the package can be installed explicitly:<br />
pacman -S wpa_supplicant<br />
<br />
This package has been built for supporting a very broad range of wireless hardware. For your information, here is the list, which can be obtained by executing 'wpa_supplicant', without quotes, from your bash prompt:<br />
<br />
# wpa_supplicant<br />
...<br />
<br />
Driver list:<br />
<br />
*HostAP<br />
*Prism54<br />
*Madwifi<br />
*NDISWrapper<br />
*AMTEL<br />
*IPW (both 2100 and 2200 drivers)<br />
*WEXT (Generic Linux wireless extensions)<br />
*Wired ethernet<br />
<br />
Most wireless hardware is supported by default by wpa_supplicant. Even if your chipset manufacturer isn't listed (which is the most probable case), you can still make use of the Generic Wireless Extensions to connect to a WPA-secured network. Based on my particular experience, 75% of hardware is supported by WEXT, about 20% is compatible by recompiling wpa_supplicant/hw drivers from scratch and, unfortunately the missing 5% which is definitely incompatible. I'll talk about the incompatibilities later, however if you're completely desperate, ABS is always an option. WPA Supplicant is available at: /var/abs/core/support/wpa_supplicant.<br />
<br />
=Procedure=<br />
/etc/wpa_supplicant.conf contains all configuration settings for wpa_supplicant. Its contents are quite simple, although the sample file that is provided is horribly obtuse. For the purpose of simplifying, login as root, and rename the default wpa_supplicant.conf file. It is not needed at this point.<br />
# mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.original<br />
<br />
==The "add my networks on the fly w/ a cli or gui front-end" Method==<br />
It possible to configure wpa_supplicant just enough that you can use wpa_gui or wpa_cli (see "Management") to actually configure your network connections, instead of defining your network blocks in the wpa_supplicant.conf file. You will need a config file along the lines of:<br />
<br />
ctrl_interface=/var/run/wpa_supplicant<br />
ctrl_interface_group=network<br />
update_config=1<br />
<br />
This configuration will allow users in the "network" group to control wpa_supplicant via the wpa_gui, wpa_cli frontends, the "update_config=1" variable allows these programs (wpa_cli,wpa_gui) to modify the wpa_supplicant.conf file, to save new networks or modifications to existing networks. Now you'll need to start wpa_supplicant:<br />
<br />
# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B<br />
<br />
where the -D option specifies your wireless driver (which is almost always wext), -i specifies interface (replace wlan0 with your wireless interface's name) and -c specifies the conf file. -B tell wpa_supplicant to run as a deamon. You will have to run wpa_supplicant as root (or with sudo), but any user in the network group can run wpa_gui or wpa_cli.<br />
<br />
So now you should be able to start up wpa_gui, or wpa_cli and add some networks to connect to. If you'd rather edit the config file manually, read on. In fact, some of the following information is kind of important even if you don't manuelly define your networks in wpa_supplicant.conf, so you should probably read it anyway.<br />
<br />
==The "I want to add my networks by editing wpa_supplicant.conf method"==<br />
<br />
The specified ssid and passphrase for your wpa encrypted wireless network must be encoded into a hexadecimal string. Achieving this is quite simple, by utilizing the wpa_passphrase utility, which is supplied as part of the wpa_supplicant package. Use the syntax <code>wpa_passphrase [ssid] [passphrase]</code><br />
<br />
*An example exercise:<br />
<br />
# wpa_passphrase mywireless secretpassphrase<br />
<br />
this should generate something like the below:<br />
network={<br />
ssid="mywireless"<br />
#psk="secretpassphrase"<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
This is the basic configuration required to get wpa working. The first line is the opening statement for the network, the second is the ssid of the base station you are wanting to connect to, the third line the passphrase, and the fourth the hex key which is required to connect.<br />
<br />
*Utilizing wpa_passphrase, specify your actual ssid and passphrase, and redirect the output to /etc/wpa_supplicant.conf:<br />
<br />
# wpa_passphrase mywireless secretpassphrase > /etc/wpa_supplicant.conf<br />
<br />
changing the details where applicable to your own specific information. This will then create a basic /etc/wpa_supplicant.conf from the output of the wpa_passphrase command. <br />
<br />
For example if you use the WPA2 protocol you will have to add few lines in the network section:<br />
<br />
network={<br />
ssid="mywireless"<br />
proto=RSN<br />
pairwise=CCMP TKIP<br />
key_mgmt=WPA-PSK<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
{{Box Note | Your network information will be stored in plain text format, so you should change the permissions on the newly created /etc/wpa_supplicant.conf file (e.g. <tt>chmod 0600 /etc/wpa_supplicant.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
Adding an additional WPA encrypted network can be achieved like so:<br />
# wpa_passphrase additional_ssid additional_passphrase >> /etc/wpa_supplicant.conf<br />
The '>>' will redirect and append the output to /etc/wpa_supplicant.conf, without overwriting.<br />
<br />
There are a large number of options which are available to set under the network which you can investigate by looking at the original configuration file. In most cases you can use the defaults, and not specify anything further in that section at the moment.<br />
<br />
Lastly, specify these additional lines at the top of /etc/wpa_supplicant.conf, with your editor of choice:<br />
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel<br />
<br />
If you need to connect to several networks, just define another network block in the same file. Change the priority at will, recalling that priorities with big numbers are tried first.<br />
<br />
Now you can try connecting manually.<br />
<br />
First, bring the wifi interface up. For the purposes of this example we will use interface <code>wlan0.</code><br />
<br />
# ifconfig wlan0 up<br />
<br />
Next, direct the interface to associate with the access point ssid:<br />
# iwconfig wlan0 essid [ssid]<br />
Once ssid association is successful, (after about 10 seconds on average), you need to run wpa_supplicant to complete the encrypted association. Typically, you will be able to use the '''W'''ireless '''EXT'''ensions driver for wpa_supplicant, if you cannot, then you might need to check how to do it with your wireless device on the internet.<br />
<br />
Issue the following as root:<br />
<br />
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf <br />
The previous syntax tells wpa_supplicant to use its default hardware configuration (WEXT - Linux '''W'''ireless '''EXT'''ensions) and to associate with the ssid which is specified in /etc/wpa_supplicant.conf. Also, this association should be performed through the wlan0 wireless interface and the process should move to the background, (-B). For verbose output, add '''-d''' or '''-dd''' (for debug) to dump more information to the console. You can find additional examples here [http://www.examplenow.com/wpa_supplicant wpa_supplicant].<br />
<br />
In the console output, there should be a line that reads ''''Associated:'''' followed by a MAC address. All that is required now is an IP address.<br />
s<br />
As root, issue:<br />
# dhcpcd wlan0<br />
<br />
*Note: *Do not* request the IP inmediately! You must wait to ensure proper asociation. If you use a script, you can use "sleep 10s" to wait for 10 seconds.<br />
<br />
Verify the interface has received an IP address using ifconfig:<br />
# ifconfig wlan0<br />
<br />
wlan0 Link encap:Ethernet HWaddr 00:1C:BF:66:4E:E0 <br />
inet addr:192.168.0.62 Bcast:192.168.0.255 Mask:255.255.255.0<br />
inet6 addr: fe80::21c:bfff:fe66:4ee0/64 Scope:Link<br />
UP BROADCAST MULTICAST MTU:1500 Metric:1<br />
RX packets:140387 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:96902 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000<br />
RX bytes:125513183 (119.6 Mb) TX bytes:12299192 (11.7 Mb)<br />
<br />
If the output is close to the above, you are now connected. If so you can investigate using the netcfg2 scripts to setup this on a more permanent arrangement and get it working when you start the machine.<br />
Depending to the approach you've chosen to configure your wireless adapter, you can decide to use a graphical --but not invasive-- tool like [[Wicd]] or pick the network profiles provided by netcfg.<br />
<br />
More sophisticated configurations, like EAPOL or RADIUS authentication are very well detailed in the wpa_supplicant.conf manpage. These configurations fall out of the scope of this document.<br />
<br />
==But man, that didn't work for me - (Rebuilding wpa_supplicant from scratch)==<br />
Grab a copy of wpa_supplicant source from the homepage or from the ABS. Once downloaded and untarred, have a look at the file '.config' (yeah, it's hidden). The file looks like a kernel config, only much smaller. Have a look at the sections named CONFIG_DRIVER_''DRIVERNAME'' and choose yes or no, depending upon your driver. Be careful with the options chosen, because you will need to specify an additional path to your wireless drivers' source in order to correctly compile the low-level association component. Some weird atheros cards may need a fresh wpa_supplicant build compiled against the latest madwifi-svn relase available. If this is the case, here is an example to enlighten you through the compilation process:<br />
<br />
'''madwifi example''': edit the following lines in the config file to look like this. This assumes that you have built madwifi with abs and that the source from the build is stored in /var/abs/local/madwifi/src/.<br />
<br />
#Driver interface for madwifi driver<br />
CONFIG_DRIVER_MADWIFI=y<br />
#Change include directories to match with the local settings<br />
CFLAGS += -I/var/abs/local/madwifi/src/madwifi<br />
<br />
Once configured, you can proceed with makepkg as usual.<br />
<br />
==Management==<br />
<br />
==Wireless Management Only==<br />
<br />
As mentioned above, there are two frontends to wpa_supplicant actually written by the wpa_supplicant developers themselves, "wpa_cli", and "wpa_gui". wpa_cli is, as you might expect, a command line front end, while "wpa_gui" is a qt-based frontend to wpa_supplicant. wpa_cli is include with the wpa_supplicant package, wpa_supplicant_gui is it's own package. The details on how to setup wpa supplicant to work w/ either wpa_cli or wpa_supplicant are above.<br />
<br />
wpa_cli, when invoked without options, will give you a prompt environment, try typing "help" for help.<br />
<br />
wpa_gui is pretty straightforward, If you hit "scan" you will be presented with a list of detected SSIDs, you can double click to add one, you will be given a dialogue box that will let you enter information that you need to associate with your network, most likely, you will only have to enter your PSK if you use wpa/wpa2 or your "key0" for a WEP connection. The protocal for WPA/WPA2/WEP/Unencrypted should be autodetected. Things like 802.1x will require a bit more configuration.<br />
<br />
After you add a network you can modify it if you do something like changing the PSK, switch to the 'Manage Networks' tab and select the network you want to Edit / Remove. You can also add a network without scanning, which you will need to do if you don't broadcast your SSID.<br />
<br />
'''Note:''' wpa_cli and wpa_gui will not get you an ip address or set up a proper routeing table, they will '''only''' associate you with a wireless access point. The wpa_auto scripts from the aur can be used to start wpa_supplicant at boot and automatically run dhcp to configure your network connection after you associate to a wireless network, or you might right your own scripts. Higher level, wireless/network management utilites are also available, that are capable of managing both wireless connections and wired connections:<br />
<br />
===[[Wicd]]===<br />
<br />
Installation:<br />
# pacman -S [[wicd]] <br />
<br />
Very straightforward. Scan for networks, fill in the required data and connect. You might need to add <br />
/usr/lib/wicd/autoconnect.py<br />
<br />
to your init and power-managing scripts to reconnect to those networks if autoconnection behavior is expected.<br />
q<br />
===netcfg===<br />
<br />
See [[Network Profiles]]<br />
<br />
==Common Issues==<br />
99.9% of the issues are related to the association. So, have a deep look at wpa_supplicant's output when you suspect its misbehaving. Add '-d' (for debug) to increase the verbosity. Usually '-dd' is enough. '-dddd' might be overkill.<br />
<br />
When you're inspecting the log, have a look at entries like this one:<br />
<br />
ioctl['''WHATEVER''']: Operation not supported<br />
<br />
If this is the case, you're experiencing a driver issue. Upgrade drivers, or change the -D parameter.<br />
<br />
Another common problem is ''No suitable AP found'' messages. Wpa_supplicant seems to have trouble finding hidden essids. Usually setting scan_ssid=1 in your network block will take care of this.</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=Wpa_supplicant&diff=83435
Wpa supplicant
2009-11-13T08:49:06Z
<p>Pseudonomous: /* [Wireless Management Only] */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|WPA Supplicant}}<br />
{{i18n_entry|简体中文|WPA 客户端}}<br />
{{i18n_entry|Russian|WPA Supplicant (Русский)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Communication and network (English)]]<br />
[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
==Read This First==<br />
This article assumes that you are familiar with your hardware, and are capable of finding your way around configuration files and configuring your system. It is also critical you have *read and understood* the [[Wireless Setup]] article, because it is the basis for all that we are going to explain here.<br />
<br />
The previous version of this article expanded on the use of [[ABS - The Arch Build System]] and the Network Profiles mentioned on [[Wireless Setup]]. I suppose that a better understanding of the system always helps, but tends to divert objectives, and finally affects the scope of the document. <br />
<br />
Finally, this document is not a prerequisite if your hardware works out of the box and is handled through a connection daemon like networkmanager or the like. If you prefer to connect to the network using a graphical tool, you shouldn't be reading this.<br />
<br />
==What is WPA Supplicant? ==<br />
You have probably heard about WEP and its inherent weaknesses. A network protected by a static WEP key can quite easily be compromised by a motivated hacker. WPA corrects the problem of the static key, by changing it at a packet transmitted/recieved frequency, or once a certain amount of time has passed. This process is performed by a daemon which is tightly bound to your wireless hardware. <br />
<br />
Inferior drivers (in particular those used through ndiswrapper) can provide much frustration when used in conjunction with wpa_supplicant so, if at all possible, use hardware with proper support and high quality drivers.<br />
<br />
For further information, WPA Supplicant's homepage is reachable at: http://hostap.epitest.fi/wpa_supplicant/<br />
<br />
==Installation==<br />
wpa_supplicant is in the package group '''base-devel''' from the repositories. Invoking pacman, the package can be installed explicitly:<br />
pacman -S wpa_supplicant<br />
<br />
This package has been built for supporting a very broad range of wireless hardware. For your information, here is the list, which can be obtained by executing 'wpa_supplicant', without quotes, from your bash prompt:<br />
<br />
# wpa_supplicant<br />
...<br />
<br />
Driver list:<br />
<br />
*HostAP<br />
*Prism54<br />
*Madwifi<br />
*NDISWrapper<br />
*AMTEL<br />
*IPW (both 2100 and 2200 drivers)<br />
*WEXT (Generic Linux wireless extensions)<br />
*Wired ethernet<br />
<br />
Most wireless hardware is supported by default by wpa_supplicant. Even if your chipset manufacturer isn't listed (which is the most probable case), you can still make use of the Generic Wireless Extensions to connect to a WPA-secured network. Based on my particular experience, 75% of hardware is supported by WEXT, about 20% is compatible by recompiling wpa_supplicant/hw drivers from scratch and, unfortunately the missing 5% which is definitely incompatible. I'll talk about the incompatibilities later, however if you're completely desperate, ABS is always an option. WPA Supplicant is available at: /var/abs/core/support/wpa_supplicant.<br />
<br />
=Procedure=<br />
/etc/wpa_supplicant.conf contains all configuration settings for wpa_supplicant. Its contents are quite simple, although the sample file that is provided is horribly obtuse. For the purpose of simplifying, login as root, and rename the default wpa_supplicant.conf file. It is not needed at this point.<br />
# mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.original<br />
<br />
==The "add my networks on the fly w/ a cli or gui front-end" Method==<br />
It possible to configure wpa_supplicant just enough that you can use wpa_gui or wpa_cli (see "Management") to actually configure your network connections, instead of defining your network blocks in the wpa_supplicant.conf file. You will need a config file along the lines of:<br />
<br />
ctrl_interface=/var/run/wpa_supplicant<br />
ctrl_interface_group=network<br />
update_config=1<br />
<br />
This configuration will allow users in the "network" group to control wpa_supplicant via the wpa_gui, wpa_cli frontends, the "update_config=1" variable allows these programs (wpa_cli,wpa_gui) to modify the wpa_supplicant.conf file, to save new networks or modifications to existing networks. Now you'll need to start wpa_supplicant:<br />
<br />
# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B<br />
<br />
where the -D option specifies your wireless driver (which is almost always wext), -i specifies interface (replace wlan0 with your wireless interface's name) and -c specifies the conf file. -B tell wpa_supplicant to run as a deamon. You will have to run wpa_supplicant as root (or with sudo), but any user in the network group can run wpa_gui or wpa_cli.<br />
<br />
So now you should be able to start up wpa_gui, or wpa_cli and add some networks to connect to. If you'd rather edit the config file manually, read on. In fact, some of the following information is kind of important even if you don't manuelly define your networks in wpa_supplicant.conf, so you should probably read it anyway.<br />
<br />
==The "I want to add my networks by editing wpa_supplicant.conf method"==<br />
<br />
The specified ssid and passphrase for your wpa encrypted wireless network must be encoded into a hexadecimal string. Achieving this is quite simple, by utilizing the wpa_passphrase utility, which is supplied as part of the wpa_supplicant package. Use the syntax <code>wpa_passphrase [ssid] [passphrase]</code><br />
<br />
*An example exercise:<br />
<br />
# wpa_passphrase mywireless secretpassphrase<br />
<br />
this should generate something like the below:<br />
network={<br />
ssid="mywireless"<br />
#psk="secretpassphrase"<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
This is the basic configuration required to get wpa working. The first line is the opening statement for the network, the second is the ssid of the base station you are wanting to connect to, the third line the passphrase, and the fourth the hex key which is required to connect.<br />
<br />
*Utilizing wpa_passphrase, specify your actual ssid and passphrase, and redirect the output to /etc/wpa_supplicant.conf:<br />
<br />
# wpa_passphrase mywireless secretpassphrase > /etc/wpa_supplicant.conf<br />
<br />
changing the details where applicable to your own specific information. This will then create a basic /etc/wpa_supplicant.conf from the output of the wpa_passphrase command. <br />
<br />
For example if you use the WPA2 protocol you will have to add few lines in the network section:<br />
<br />
network={<br />
ssid="mywireless"<br />
proto=RSN<br />
pairwise=CCMP TKIP<br />
key_mgmt=WPA-PSK<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
{{Box Note | Your network information will be stored in plain text format, so you should change the permissions on the newly created /etc/wpa_supplicant.conf file (e.g. <tt>chmod 0600 /etc/wpa_supplicant.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
Adding an additional WPA encrypted network can be achieved like so:<br />
# wpa_passphrase additional_ssid additional_passphrase >> /etc/wpa_supplicant.conf<br />
The '>>' will redirect and append the output to /etc/wpa_supplicant.conf, without overwriting.<br />
<br />
There are a large number of options which are available to set under the network which you can investigate by looking at the original configuration file. In most cases you can use the defaults, and not specify anything further in that section at the moment.<br />
<br />
Lastly, specify these additional lines at the top of /etc/wpa_supplicant.conf, with your editor of choice:<br />
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel<br />
<br />
If you need to connect to several networks, just define another network block in the same file. Change the priority at will, recalling that priorities with big numbers are tried first.<br />
<br />
Now you can try connecting manually.<br />
<br />
First, bring the wifi interface up. For the purposes of this example we will use interface <code>wlan0.</code><br />
<br />
# ifconfig wlan0 up<br />
<br />
Next, direct the interface to associate with the access point ssid:<br />
# iwconfig wlan0 essid [ssid]<br />
Once ssid association is successful, (after about 10 seconds on average), you need to run wpa_supplicant to complete the encrypted association. Typically, you will be able to use the '''W'''ireless '''EXT'''ensions driver for wpa_supplicant, if you cannot, then you might need to check how to do it with your wireless device on the internet.<br />
<br />
Issue the following as root:<br />
<br />
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf <br />
The previous syntax tells wpa_supplicant to use its default hardware configuration (WEXT - Linux '''W'''ireless '''EXT'''ensions) and to associate with the ssid which is specified in /etc/wpa_supplicant.conf. Also, this association should be performed through the wlan0 wireless interface and the process should move to the background, (-B). For verbose output, add '''-d''' or '''-dd''' (for debug) to dump more information to the console. You can find additional examples here [http://www.examplenow.com/wpa_supplicant wpa_supplicant].<br />
<br />
In the console output, there should be a line that reads ''''Associated:'''' followed by a MAC address. All that is required now is an IP address.<br />
s<br />
As root, issue:<br />
# dhcpcd wlan0<br />
<br />
*Note: *Do not* request the IP inmediately! You must wait to ensure proper asociation. If you use a script, you can use "sleep 10s" to wait for 10 seconds.<br />
<br />
Verify the interface has received an IP address using ifconfig:<br />
# ifconfig wlan0<br />
<br />
wlan0 Link encap:Ethernet HWaddr 00:1C:BF:66:4E:E0 <br />
inet addr:192.168.0.62 Bcast:192.168.0.255 Mask:255.255.255.0<br />
inet6 addr: fe80::21c:bfff:fe66:4ee0/64 Scope:Link<br />
UP BROADCAST MULTICAST MTU:1500 Metric:1<br />
RX packets:140387 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:96902 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000<br />
RX bytes:125513183 (119.6 Mb) TX bytes:12299192 (11.7 Mb)<br />
<br />
If the output is close to the above, you are now connected. If so you can investigate using the netcfg2 scripts to setup this on a more permanent arrangement and get it working when you start the machine.<br />
Depending to the approach you've chosen to configure your wireless adapter, you can decide to use a graphical --but not invasive-- tool like [[Wicd]] or pick the network profiles provided by netcfg.<br />
<br />
More sophisticated configurations, like EAPOL or RADIUS authentication are very well detailed in the wpa_supplicant.conf manpage. These configurations fall out of the scope of this document.<br />
<br />
==But man, that didn't work for me - (Rebuilding wpa_supplicant from scratch)==<br />
Grab a copy of wpa_supplicant source from the homepage or from the ABS. Once downloaded and untarred, have a look at the file '.config' (yeah, it's hidden). The file looks like a kernel config, only much smaller. Have a look at the sections named CONFIG_DRIVER_''DRIVERNAME'' and choose yes or no, depending upon your driver. Be careful with the options chosen, because you will need to specify an additional path to your wireless drivers' source in order to correctly compile the low-level association component. Some weird atheros cards may need a fresh wpa_supplicant build compiled against the latest madwifi-svn relase available. If this is the case, here is an example to enlighten you through the compilation process:<br />
<br />
'''madwifi example''': edit the following lines in the config file to look like this. This assumes that you have built madwifi with abs and that the source from the build is stored in /var/abs/local/madwifi/src/.<br />
<br />
#Driver interface for madwifi driver<br />
CONFIG_DRIVER_MADWIFI=y<br />
#Change include directories to match with the local settings<br />
CFLAGS += -I/var/abs/local/madwifi/src/madwifi<br />
<br />
Once configured, you can proceed with makepkg as usual.<br />
<br />
==Management==<br />
<br />
===[Wireless Management Only]===<br />
<br />
As mentioned above, there are two frontends to wpa_supplicant actually written by the wpa_supplicant developers themselves, "wpa_cli", and "wpa_gui". wpa_cli is, as you might expect, a command line front end, while "wpa_gui" is a qt-based frontend to wpa_supplicant. wpa_cli is include with the wpa_supplicant package, wpa_supplicant_gui is it's own package. The details on how to setup wpa supplicant to work w/ either wpa_cli or wpa_supplicant are above.<br />
<br />
wpa_cli, when invoked without options, will give you a prompt environment, try typing "help" for help.<br />
<br />
wpa_gui is pretty straightforward, If you hit "scan" you will be presented with a list of detected SSIDs, you can double click to add one, you will be given a dialogue box that will let you enter information that you need to associate with your network, most likely, you will only have to enter your PSK if you use wpa/wpa2 or your "key0" for a WEP connection. The protocal for WPA/WPA2/WEP/Unencrypted should be autodetected. Things like 802.1x will require a bit more configuration.<br />
<br />
After you add a network you can modify it if you do something like changing the PSK, switch to the 'Manage Networks' tab and select the network you want to Edit / Remove. You can also add a network without scanning, which you will need to do if you don't broadcast your SSID.<br />
<br />
'''Note:''' wpa_cli and wpa_gui will not get you an ip address or set up a proper routeing table, they will '''only''' associate you with a wireless access point. The wpa_auto scripts from the aur can be used to start wpa_supplicant at boot and automatically run dhcp to configure your network connection after you associate to a wireless network, or you might right your own scripts. Higher level, wireless/network management utilites are also available, that are capable of managing both wireless connections and wired connections:<br />
<br />
===[[Wicd]]===<br />
<br />
Installation:<br />
# pacman -S [[wicd]] <br />
<br />
Very straightforward. Scan for networks, fill in the required data and connect. You might need to add <br />
/usr/lib/wicd/autoconnect.py<br />
<br />
to your init and power-managing scripts to reconnect to those networks if autoconnection behavior is expected.<br />
q<br />
===netcfg===<br />
<br />
See [[Network Profiles]]<br />
<br />
==Common Issues==<br />
99.9% of the issues are related to the association. So, have a deep look at wpa_supplicant's output when you suspect its misbehaving. Add '-d' (for debug) to increase the verbosity. Usually '-dd' is enough. '-dddd' might be overkill.<br />
<br />
When you're inspecting the log, have a look at entries like this one:<br />
<br />
ioctl['''WHATEVER''']: Operation not supported<br />
<br />
If this is the case, you're experiencing a driver issue. Upgrade drivers, or change the -D parameter.<br />
<br />
Another common problem is ''No suitable AP found'' messages. Wpa_supplicant seems to have trouble finding hidden essids. Usually setting scan_ssid=1 in your network block will take care of this.</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=Wpa_supplicant&diff=83434
Wpa supplicant
2009-11-13T08:36:28Z
<p>Pseudonomous: /* The "add my networks on the fly w/ a cli or gui front-end" Method */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|WPA Supplicant}}<br />
{{i18n_entry|简体中文|WPA 客户端}}<br />
{{i18n_entry|Russian|WPA Supplicant (Русский)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Communication and network (English)]]<br />
[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
==Read This First==<br />
This article assumes that you are familiar with your hardware, and are capable of finding your way around configuration files and configuring your system. It is also critical you have *read and understood* the [[Wireless Setup]] article, because it is the basis for all that we are going to explain here.<br />
<br />
The previous version of this article expanded on the use of [[ABS - The Arch Build System]] and the Network Profiles mentioned on [[Wireless Setup]]. I suppose that a better understanding of the system always helps, but tends to divert objectives, and finally affects the scope of the document. <br />
<br />
Finally, this document is not a prerequisite if your hardware works out of the box and is handled through a connection daemon like networkmanager or the like. If you prefer to connect to the network using a graphical tool, you shouldn't be reading this.<br />
<br />
==What is WPA Supplicant? ==<br />
You have probably heard about WEP and its inherent weaknesses. A network protected by a static WEP key can quite easily be compromised by a motivated hacker. WPA corrects the problem of the static key, by changing it at a packet transmitted/recieved frequency, or once a certain amount of time has passed. This process is performed by a daemon which is tightly bound to your wireless hardware. <br />
<br />
Inferior drivers (in particular those used through ndiswrapper) can provide much frustration when used in conjunction with wpa_supplicant so, if at all possible, use hardware with proper support and high quality drivers.<br />
<br />
For further information, WPA Supplicant's homepage is reachable at: http://hostap.epitest.fi/wpa_supplicant/<br />
<br />
==Installation==<br />
wpa_supplicant is in the package group '''base-devel''' from the repositories. Invoking pacman, the package can be installed explicitly:<br />
pacman -S wpa_supplicant<br />
<br />
This package has been built for supporting a very broad range of wireless hardware. For your information, here is the list, which can be obtained by executing 'wpa_supplicant', without quotes, from your bash prompt:<br />
<br />
# wpa_supplicant<br />
...<br />
<br />
Driver list:<br />
<br />
*HostAP<br />
*Prism54<br />
*Madwifi<br />
*NDISWrapper<br />
*AMTEL<br />
*IPW (both 2100 and 2200 drivers)<br />
*WEXT (Generic Linux wireless extensions)<br />
*Wired ethernet<br />
<br />
Most wireless hardware is supported by default by wpa_supplicant. Even if your chipset manufacturer isn't listed (which is the most probable case), you can still make use of the Generic Wireless Extensions to connect to a WPA-secured network. Based on my particular experience, 75% of hardware is supported by WEXT, about 20% is compatible by recompiling wpa_supplicant/hw drivers from scratch and, unfortunately the missing 5% which is definitely incompatible. I'll talk about the incompatibilities later, however if you're completely desperate, ABS is always an option. WPA Supplicant is available at: /var/abs/core/support/wpa_supplicant.<br />
<br />
=Procedure=<br />
/etc/wpa_supplicant.conf contains all configuration settings for wpa_supplicant. Its contents are quite simple, although the sample file that is provided is horribly obtuse. For the purpose of simplifying, login as root, and rename the default wpa_supplicant.conf file. It is not needed at this point.<br />
# mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.original<br />
<br />
==The "add my networks on the fly w/ a cli or gui front-end" Method==<br />
It possible to configure wpa_supplicant just enough that you can use wpa_gui or wpa_cli (see "Management") to actually configure your network connections, instead of defining your network blocks in the wpa_supplicant.conf file. You will need a config file along the lines of:<br />
<br />
ctrl_interface=/var/run/wpa_supplicant<br />
ctrl_interface_group=network<br />
update_config=1<br />
<br />
This configuration will allow users in the "network" group to control wpa_supplicant via the wpa_gui, wpa_cli frontends, the "update_config=1" variable allows these programs (wpa_cli,wpa_gui) to modify the wpa_supplicant.conf file, to save new networks or modifications to existing networks. Now you'll need to start wpa_supplicant:<br />
<br />
# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B<br />
<br />
where the -D option specifies your wireless driver (which is almost always wext), -i specifies interface (replace wlan0 with your wireless interface's name) and -c specifies the conf file. -B tell wpa_supplicant to run as a deamon. You will have to run wpa_supplicant as root (or with sudo), but any user in the network group can run wpa_gui or wpa_cli.<br />
<br />
So now you should be able to start up wpa_gui, or wpa_cli and add some networks to connect to. If you'd rather edit the config file manually, read on. In fact, some of the following information is kind of important even if you don't manuelly define your networks in wpa_supplicant.conf, so you should probably read it anyway.<br />
<br />
==The "I want to add my networks by editing wpa_supplicant.conf method"==<br />
<br />
The specified ssid and passphrase for your wpa encrypted wireless network must be encoded into a hexadecimal string. Achieving this is quite simple, by utilizing the wpa_passphrase utility, which is supplied as part of the wpa_supplicant package. Use the syntax <code>wpa_passphrase [ssid] [passphrase]</code><br />
<br />
*An example exercise:<br />
<br />
# wpa_passphrase mywireless secretpassphrase<br />
<br />
this should generate something like the below:<br />
network={<br />
ssid="mywireless"<br />
#psk="secretpassphrase"<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
This is the basic configuration required to get wpa working. The first line is the opening statement for the network, the second is the ssid of the base station you are wanting to connect to, the third line the passphrase, and the fourth the hex key which is required to connect.<br />
<br />
*Utilizing wpa_passphrase, specify your actual ssid and passphrase, and redirect the output to /etc/wpa_supplicant.conf:<br />
<br />
# wpa_passphrase mywireless secretpassphrase > /etc/wpa_supplicant.conf<br />
<br />
changing the details where applicable to your own specific information. This will then create a basic /etc/wpa_supplicant.conf from the output of the wpa_passphrase command. <br />
<br />
For example if you use the WPA2 protocol you will have to add few lines in the network section:<br />
<br />
network={<br />
ssid="mywireless"<br />
proto=RSN<br />
pairwise=CCMP TKIP<br />
key_mgmt=WPA-PSK<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
{{Box Note | Your network information will be stored in plain text format, so you should change the permissions on the newly created /etc/wpa_supplicant.conf file (e.g. <tt>chmod 0600 /etc/wpa_supplicant.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
Adding an additional WPA encrypted network can be achieved like so:<br />
# wpa_passphrase additional_ssid additional_passphrase >> /etc/wpa_supplicant.conf<br />
The '>>' will redirect and append the output to /etc/wpa_supplicant.conf, without overwriting.<br />
<br />
There are a large number of options which are available to set under the network which you can investigate by looking at the original configuration file. In most cases you can use the defaults, and not specify anything further in that section at the moment.<br />
<br />
Lastly, specify these additional lines at the top of /etc/wpa_supplicant.conf, with your editor of choice:<br />
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel<br />
<br />
If you need to connect to several networks, just define another network block in the same file. Change the priority at will, recalling that priorities with big numbers are tried first.<br />
<br />
Now you can try connecting manually.<br />
<br />
First, bring the wifi interface up. For the purposes of this example we will use interface <code>wlan0.</code><br />
<br />
# ifconfig wlan0 up<br />
<br />
Next, direct the interface to associate with the access point ssid:<br />
# iwconfig wlan0 essid [ssid]<br />
Once ssid association is successful, (after about 10 seconds on average), you need to run wpa_supplicant to complete the encrypted association. Typically, you will be able to use the '''W'''ireless '''EXT'''ensions driver for wpa_supplicant, if you cannot, then you might need to check how to do it with your wireless device on the internet.<br />
<br />
Issue the following as root:<br />
<br />
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf <br />
The previous syntax tells wpa_supplicant to use its default hardware configuration (WEXT - Linux '''W'''ireless '''EXT'''ensions) and to associate with the ssid which is specified in /etc/wpa_supplicant.conf. Also, this association should be performed through the wlan0 wireless interface and the process should move to the background, (-B). For verbose output, add '''-d''' or '''-dd''' (for debug) to dump more information to the console. You can find additional examples here [http://www.examplenow.com/wpa_supplicant wpa_supplicant].<br />
<br />
In the console output, there should be a line that reads ''''Associated:'''' followed by a MAC address. All that is required now is an IP address.<br />
s<br />
As root, issue:<br />
# dhcpcd wlan0<br />
<br />
*Note: *Do not* request the IP inmediately! You must wait to ensure proper asociation. If you use a script, you can use "sleep 10s" to wait for 10 seconds.<br />
<br />
Verify the interface has received an IP address using ifconfig:<br />
# ifconfig wlan0<br />
<br />
wlan0 Link encap:Ethernet HWaddr 00:1C:BF:66:4E:E0 <br />
inet addr:192.168.0.62 Bcast:192.168.0.255 Mask:255.255.255.0<br />
inet6 addr: fe80::21c:bfff:fe66:4ee0/64 Scope:Link<br />
UP BROADCAST MULTICAST MTU:1500 Metric:1<br />
RX packets:140387 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:96902 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000<br />
RX bytes:125513183 (119.6 Mb) TX bytes:12299192 (11.7 Mb)<br />
<br />
If the output is close to the above, you are now connected. If so you can investigate using the netcfg2 scripts to setup this on a more permanent arrangement and get it working when you start the machine.<br />
Depending to the approach you've chosen to configure your wireless adapter, you can decide to use a graphical --but not invasive-- tool like [[Wicd]] or pick the network profiles provided by netcfg.<br />
<br />
More sophisticated configurations, like EAPOL or RADIUS authentication are very well detailed in the wpa_supplicant.conf manpage. These configurations fall out of the scope of this document.<br />
<br />
==But man, that didn't work for me - (Rebuilding wpa_supplicant from scratch)==<br />
Grab a copy of wpa_supplicant source from the homepage or from the ABS. Once downloaded and untarred, have a look at the file '.config' (yeah, it's hidden). The file looks like a kernel config, only much smaller. Have a look at the sections named CONFIG_DRIVER_''DRIVERNAME'' and choose yes or no, depending upon your driver. Be careful with the options chosen, because you will need to specify an additional path to your wireless drivers' source in order to correctly compile the low-level association component. Some weird atheros cards may need a fresh wpa_supplicant build compiled against the latest madwifi-svn relase available. If this is the case, here is an example to enlighten you through the compilation process:<br />
<br />
'''madwifi example''': edit the following lines in the config file to look like this. This assumes that you have built madwifi with abs and that the source from the build is stored in /var/abs/local/madwifi/src/.<br />
<br />
#Driver interface for madwifi driver<br />
CONFIG_DRIVER_MADWIFI=y<br />
#Change include directories to match with the local settings<br />
CFLAGS += -I/var/abs/local/madwifi/src/madwifi<br />
<br />
Once configured, you can proceed with makepkg as usual.<br />
<br />
==Management==<br />
<br />
===[Wireless Management Only]===<br />
<br />
There are two frontends to wpa_supplicant actually written by the wpa_supplicant developers themselves, "wpa_cli", and "wpa_gui". wpa_cli is, as you might expect, a command line front end, while "wpa_gui" is a qt-based frontend to wpa_supplicant. wpa_cli is include with the wpa_supplicant package, wpa_supplicant_gui is it's own package. There are three key things required to use either wpa_cli or wpa_gui:<br />
<br />
- You must first start an instance of wpa_supplicant, starting either frontend won't do that for you<br />
<br />
- You must specify a ctrl_interface in you wpa_supplicant.conf file, if you use something non-standard you must properly configure/call your client programs, the default value in wpa_supplicant.conf:<br />
ctrl_interface=/var/run/wpa_supplicant<br />
[/code]<br />
should work for most people.<br />
<br />
- If you want to manage wireless connections with a non-root user you also must specify a "ctrl_interface_group" in wpa_supplicant.conf like:<br />
[code]<br />
ctrl_interface_group=network<br />
[/code]<br />
then users in the "network" group will be able to start/stop/modify wireless connections.<br />
<br />
'''Note:''' wpa_cli and wpa_gui will not get you an ip address or set up a proper routeing table, they will '''only''' associate you with a wireless access point. The wpa_auto scripts from the aur can be used to start wpa_supplicant at boot and automatically run dhcp to configure your network connection after you associate to a wireless network, or you might right your own scripts. Higher level, wireless/network management utilites are also available, that are capable of managing both wireless connections and wired connections:<br />
<br />
===[[Wicd]]===<br />
<br />
Installation:<br />
# pacman -S [[wicd]] <br />
<br />
Very straightforward. Scan for networks, fill in the required data and connect. You might need to add <br />
/usr/lib/wicd/autoconnect.py<br />
<br />
to your init and power-managing scripts to reconnect to those networks if autoconnection behavior is expected.<br />
q<br />
===netcfg===<br />
<br />
See [[Network Profiles]]<br />
<br />
==Common Issues==<br />
99.9% of the issues are related to the association. So, have a deep look at wpa_supplicant's output when you suspect its misbehaving. Add '-d' (for debug) to increase the verbosity. Usually '-dd' is enough. '-dddd' might be overkill.<br />
<br />
When you're inspecting the log, have a look at entries like this one:<br />
<br />
ioctl['''WHATEVER''']: Operation not supported<br />
<br />
If this is the case, you're experiencing a driver issue. Upgrade drivers, or change the -D parameter.<br />
<br />
Another common problem is ''No suitable AP found'' messages. Wpa_supplicant seems to have trouble finding hidden essids. Usually setting scan_ssid=1 in your network block will take care of this.</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=Wpa_supplicant&diff=83433
Wpa supplicant
2009-11-13T08:33:26Z
<p>Pseudonomous: /* The "add my networks on the fly w/ a cli or gui front-end" Method */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|WPA Supplicant}}<br />
{{i18n_entry|简体中文|WPA 客户端}}<br />
{{i18n_entry|Russian|WPA Supplicant (Русский)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Communication and network (English)]]<br />
[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
==Read This First==<br />
This article assumes that you are familiar with your hardware, and are capable of finding your way around configuration files and configuring your system. It is also critical you have *read and understood* the [[Wireless Setup]] article, because it is the basis for all that we are going to explain here.<br />
<br />
The previous version of this article expanded on the use of [[ABS - The Arch Build System]] and the Network Profiles mentioned on [[Wireless Setup]]. I suppose that a better understanding of the system always helps, but tends to divert objectives, and finally affects the scope of the document. <br />
<br />
Finally, this document is not a prerequisite if your hardware works out of the box and is handled through a connection daemon like networkmanager or the like. If you prefer to connect to the network using a graphical tool, you shouldn't be reading this.<br />
<br />
==What is WPA Supplicant? ==<br />
You have probably heard about WEP and its inherent weaknesses. A network protected by a static WEP key can quite easily be compromised by a motivated hacker. WPA corrects the problem of the static key, by changing it at a packet transmitted/recieved frequency, or once a certain amount of time has passed. This process is performed by a daemon which is tightly bound to your wireless hardware. <br />
<br />
Inferior drivers (in particular those used through ndiswrapper) can provide much frustration when used in conjunction with wpa_supplicant so, if at all possible, use hardware with proper support and high quality drivers.<br />
<br />
For further information, WPA Supplicant's homepage is reachable at: http://hostap.epitest.fi/wpa_supplicant/<br />
<br />
==Installation==<br />
wpa_supplicant is in the package group '''base-devel''' from the repositories. Invoking pacman, the package can be installed explicitly:<br />
pacman -S wpa_supplicant<br />
<br />
This package has been built for supporting a very broad range of wireless hardware. For your information, here is the list, which can be obtained by executing 'wpa_supplicant', without quotes, from your bash prompt:<br />
<br />
# wpa_supplicant<br />
...<br />
<br />
Driver list:<br />
<br />
*HostAP<br />
*Prism54<br />
*Madwifi<br />
*NDISWrapper<br />
*AMTEL<br />
*IPW (both 2100 and 2200 drivers)<br />
*WEXT (Generic Linux wireless extensions)<br />
*Wired ethernet<br />
<br />
Most wireless hardware is supported by default by wpa_supplicant. Even if your chipset manufacturer isn't listed (which is the most probable case), you can still make use of the Generic Wireless Extensions to connect to a WPA-secured network. Based on my particular experience, 75% of hardware is supported by WEXT, about 20% is compatible by recompiling wpa_supplicant/hw drivers from scratch and, unfortunately the missing 5% which is definitely incompatible. I'll talk about the incompatibilities later, however if you're completely desperate, ABS is always an option. WPA Supplicant is available at: /var/abs/core/support/wpa_supplicant.<br />
<br />
=Procedure=<br />
/etc/wpa_supplicant.conf contains all configuration settings for wpa_supplicant. Its contents are quite simple, although the sample file that is provided is horribly obtuse. For the purpose of simplifying, login as root, and rename the default wpa_supplicant.conf file. It is not needed at this point.<br />
# mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.original<br />
<br />
==The "add my networks on the fly w/ a cli or gui front-end" Method==<br />
It possible to configure wpa_supplicant just enough that you can use wpa_gui or wpa_cli (see "Management") to actually configure your network connections, instead of defining your network blocks in the wpa_supplicant.conf file. You will need a config file along the lines of:<br />
<br />
ctrl_interface=/var/run/wpa_supplicant<br />
ctrl_interface_group=network<br />
update_config=1<br />
<br />
This configuration will allow users in the "network" group to control wpa_supplicant via the wpa_gui, wpa_cli frontends, the "update_config=1" variable allows these programs (wpa_cli,wpa_gui) to modify the wpa_supplicant.conf file, to save new networks or modifications to existing networks. Now you'll need to start wpa_supplicant:<br />
<br />
# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B<br />
<br />
Now you should be able to start up wpa_gui, or wpa_cli and add some networks to connect to. If you'd rather edit the config file manually, read on.<br />
<br />
where the -D option specifies your wireless driver (which is almost always wext), -i specifies interface (replace wlan0 with your wireless interface's name) and -c specifies the conf file. -B tell wpa_supplicant to run as a deamon. You will have to run wpa_supplicant as root (or with sudo), but any user in the network group can run wpa_gui or wpa_cli.<br />
<br />
==The "I want to add my networks by editing wpa_supplicant.conf method"==<br />
<br />
The specified ssid and passphrase for your wpa encrypted wireless network must be encoded into a hexadecimal string. Achieving this is quite simple, by utilizing the wpa_passphrase utility, which is supplied as part of the wpa_supplicant package. Use the syntax <code>wpa_passphrase [ssid] [passphrase]</code><br />
<br />
*An example exercise:<br />
<br />
# wpa_passphrase mywireless secretpassphrase<br />
<br />
this should generate something like the below:<br />
network={<br />
ssid="mywireless"<br />
#psk="secretpassphrase"<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
This is the basic configuration required to get wpa working. The first line is the opening statement for the network, the second is the ssid of the base station you are wanting to connect to, the third line the passphrase, and the fourth the hex key which is required to connect.<br />
<br />
*Utilizing wpa_passphrase, specify your actual ssid and passphrase, and redirect the output to /etc/wpa_supplicant.conf:<br />
<br />
# wpa_passphrase mywireless secretpassphrase > /etc/wpa_supplicant.conf<br />
<br />
changing the details where applicable to your own specific information. This will then create a basic /etc/wpa_supplicant.conf from the output of the wpa_passphrase command. <br />
<br />
For example if you use the WPA2 protocol you will have to add few lines in the network section:<br />
<br />
network={<br />
ssid="mywireless"<br />
proto=RSN<br />
pairwise=CCMP TKIP<br />
key_mgmt=WPA-PSK<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
{{Box Note | Your network information will be stored in plain text format, so you should change the permissions on the newly created /etc/wpa_supplicant.conf file (e.g. <tt>chmod 0600 /etc/wpa_supplicant.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
Adding an additional WPA encrypted network can be achieved like so:<br />
# wpa_passphrase additional_ssid additional_passphrase >> /etc/wpa_supplicant.conf<br />
The '>>' will redirect and append the output to /etc/wpa_supplicant.conf, without overwriting.<br />
<br />
There are a large number of options which are available to set under the network which you can investigate by looking at the original configuration file. In most cases you can use the defaults, and not specify anything further in that section at the moment.<br />
<br />
Lastly, specify these additional lines at the top of /etc/wpa_supplicant.conf, with your editor of choice:<br />
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel<br />
<br />
If you need to connect to several networks, just define another network block in the same file. Change the priority at will, recalling that priorities with big numbers are tried first.<br />
<br />
Now you can try connecting manually.<br />
<br />
First, bring the wifi interface up. For the purposes of this example we will use interface <code>wlan0.</code><br />
<br />
# ifconfig wlan0 up<br />
<br />
Next, direct the interface to associate with the access point ssid:<br />
# iwconfig wlan0 essid [ssid]<br />
Once ssid association is successful, (after about 10 seconds on average), you need to run wpa_supplicant to complete the encrypted association. Typically, you will be able to use the '''W'''ireless '''EXT'''ensions driver for wpa_supplicant, if you cannot, then you might need to check how to do it with your wireless device on the internet.<br />
<br />
Issue the following as root:<br />
<br />
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf <br />
The previous syntax tells wpa_supplicant to use its default hardware configuration (WEXT - Linux '''W'''ireless '''EXT'''ensions) and to associate with the ssid which is specified in /etc/wpa_supplicant.conf. Also, this association should be performed through the wlan0 wireless interface and the process should move to the background, (-B). For verbose output, add '''-d''' or '''-dd''' (for debug) to dump more information to the console. You can find additional examples here [http://www.examplenow.com/wpa_supplicant wpa_supplicant].<br />
<br />
In the console output, there should be a line that reads ''''Associated:'''' followed by a MAC address. All that is required now is an IP address.<br />
s<br />
As root, issue:<br />
# dhcpcd wlan0<br />
<br />
*Note: *Do not* request the IP inmediately! You must wait to ensure proper asociation. If you use a script, you can use "sleep 10s" to wait for 10 seconds.<br />
<br />
Verify the interface has received an IP address using ifconfig:<br />
# ifconfig wlan0<br />
<br />
wlan0 Link encap:Ethernet HWaddr 00:1C:BF:66:4E:E0 <br />
inet addr:192.168.0.62 Bcast:192.168.0.255 Mask:255.255.255.0<br />
inet6 addr: fe80::21c:bfff:fe66:4ee0/64 Scope:Link<br />
UP BROADCAST MULTICAST MTU:1500 Metric:1<br />
RX packets:140387 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:96902 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000<br />
RX bytes:125513183 (119.6 Mb) TX bytes:12299192 (11.7 Mb)<br />
<br />
If the output is close to the above, you are now connected. If so you can investigate using the netcfg2 scripts to setup this on a more permanent arrangement and get it working when you start the machine.<br />
Depending to the approach you've chosen to configure your wireless adapter, you can decide to use a graphical --but not invasive-- tool like [[Wicd]] or pick the network profiles provided by netcfg.<br />
<br />
More sophisticated configurations, like EAPOL or RADIUS authentication are very well detailed in the wpa_supplicant.conf manpage. These configurations fall out of the scope of this document.<br />
<br />
==But man, that didn't work for me - (Rebuilding wpa_supplicant from scratch)==<br />
Grab a copy of wpa_supplicant source from the homepage or from the ABS. Once downloaded and untarred, have a look at the file '.config' (yeah, it's hidden). The file looks like a kernel config, only much smaller. Have a look at the sections named CONFIG_DRIVER_''DRIVERNAME'' and choose yes or no, depending upon your driver. Be careful with the options chosen, because you will need to specify an additional path to your wireless drivers' source in order to correctly compile the low-level association component. Some weird atheros cards may need a fresh wpa_supplicant build compiled against the latest madwifi-svn relase available. If this is the case, here is an example to enlighten you through the compilation process:<br />
<br />
'''madwifi example''': edit the following lines in the config file to look like this. This assumes that you have built madwifi with abs and that the source from the build is stored in /var/abs/local/madwifi/src/.<br />
<br />
#Driver interface for madwifi driver<br />
CONFIG_DRIVER_MADWIFI=y<br />
#Change include directories to match with the local settings<br />
CFLAGS += -I/var/abs/local/madwifi/src/madwifi<br />
<br />
Once configured, you can proceed with makepkg as usual.<br />
<br />
==Management==<br />
<br />
===[Wireless Management Only]===<br />
<br />
There are two frontends to wpa_supplicant actually written by the wpa_supplicant developers themselves, "wpa_cli", and "wpa_gui". wpa_cli is, as you might expect, a command line front end, while "wpa_gui" is a qt-based frontend to wpa_supplicant. wpa_cli is include with the wpa_supplicant package, wpa_supplicant_gui is it's own package. There are three key things required to use either wpa_cli or wpa_gui:<br />
<br />
- You must first start an instance of wpa_supplicant, starting either frontend won't do that for you<br />
<br />
- You must specify a ctrl_interface in you wpa_supplicant.conf file, if you use something non-standard you must properly configure/call your client programs, the default value in wpa_supplicant.conf:<br />
ctrl_interface=/var/run/wpa_supplicant<br />
[/code]<br />
should work for most people.<br />
<br />
- If you want to manage wireless connections with a non-root user you also must specify a "ctrl_interface_group" in wpa_supplicant.conf like:<br />
[code]<br />
ctrl_interface_group=network<br />
[/code]<br />
then users in the "network" group will be able to start/stop/modify wireless connections.<br />
<br />
'''Note:''' wpa_cli and wpa_gui will not get you an ip address or set up a proper routeing table, they will '''only''' associate you with a wireless access point. The wpa_auto scripts from the aur can be used to start wpa_supplicant at boot and automatically run dhcp to configure your network connection after you associate to a wireless network, or you might right your own scripts. Higher level, wireless/network management utilites are also available, that are capable of managing both wireless connections and wired connections:<br />
<br />
===[[Wicd]]===<br />
<br />
Installation:<br />
# pacman -S [[wicd]] <br />
<br />
Very straightforward. Scan for networks, fill in the required data and connect. You might need to add <br />
/usr/lib/wicd/autoconnect.py<br />
<br />
to your init and power-managing scripts to reconnect to those networks if autoconnection behavior is expected.<br />
q<br />
===netcfg===<br />
<br />
See [[Network Profiles]]<br />
<br />
==Common Issues==<br />
99.9% of the issues are related to the association. So, have a deep look at wpa_supplicant's output when you suspect its misbehaving. Add '-d' (for debug) to increase the verbosity. Usually '-dd' is enough. '-dddd' might be overkill.<br />
<br />
When you're inspecting the log, have a look at entries like this one:<br />
<br />
ioctl['''WHATEVER''']: Operation not supported<br />
<br />
If this is the case, you're experiencing a driver issue. Upgrade drivers, or change the -D parameter.<br />
<br />
Another common problem is ''No suitable AP found'' messages. Wpa_supplicant seems to have trouble finding hidden essids. Usually setting scan_ssid=1 in your network block will take care of this.</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=Wpa_supplicant&diff=83432
Wpa supplicant
2009-11-13T08:32:45Z
<p>Pseudonomous: /* The "add my networks on the fly w/ a cli or gui front-end" Method */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|WPA Supplicant}}<br />
{{i18n_entry|简体中文|WPA 客户端}}<br />
{{i18n_entry|Russian|WPA Supplicant (Русский)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Communication and network (English)]]<br />
[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
==Read This First==<br />
This article assumes that you are familiar with your hardware, and are capable of finding your way around configuration files and configuring your system. It is also critical you have *read and understood* the [[Wireless Setup]] article, because it is the basis for all that we are going to explain here.<br />
<br />
The previous version of this article expanded on the use of [[ABS - The Arch Build System]] and the Network Profiles mentioned on [[Wireless Setup]]. I suppose that a better understanding of the system always helps, but tends to divert objectives, and finally affects the scope of the document. <br />
<br />
Finally, this document is not a prerequisite if your hardware works out of the box and is handled through a connection daemon like networkmanager or the like. If you prefer to connect to the network using a graphical tool, you shouldn't be reading this.<br />
<br />
==What is WPA Supplicant? ==<br />
You have probably heard about WEP and its inherent weaknesses. A network protected by a static WEP key can quite easily be compromised by a motivated hacker. WPA corrects the problem of the static key, by changing it at a packet transmitted/recieved frequency, or once a certain amount of time has passed. This process is performed by a daemon which is tightly bound to your wireless hardware. <br />
<br />
Inferior drivers (in particular those used through ndiswrapper) can provide much frustration when used in conjunction with wpa_supplicant so, if at all possible, use hardware with proper support and high quality drivers.<br />
<br />
For further information, WPA Supplicant's homepage is reachable at: http://hostap.epitest.fi/wpa_supplicant/<br />
<br />
==Installation==<br />
wpa_supplicant is in the package group '''base-devel''' from the repositories. Invoking pacman, the package can be installed explicitly:<br />
pacman -S wpa_supplicant<br />
<br />
This package has been built for supporting a very broad range of wireless hardware. For your information, here is the list, which can be obtained by executing 'wpa_supplicant', without quotes, from your bash prompt:<br />
<br />
# wpa_supplicant<br />
...<br />
<br />
Driver list:<br />
<br />
*HostAP<br />
*Prism54<br />
*Madwifi<br />
*NDISWrapper<br />
*AMTEL<br />
*IPW (both 2100 and 2200 drivers)<br />
*WEXT (Generic Linux wireless extensions)<br />
*Wired ethernet<br />
<br />
Most wireless hardware is supported by default by wpa_supplicant. Even if your chipset manufacturer isn't listed (which is the most probable case), you can still make use of the Generic Wireless Extensions to connect to a WPA-secured network. Based on my particular experience, 75% of hardware is supported by WEXT, about 20% is compatible by recompiling wpa_supplicant/hw drivers from scratch and, unfortunately the missing 5% which is definitely incompatible. I'll talk about the incompatibilities later, however if you're completely desperate, ABS is always an option. WPA Supplicant is available at: /var/abs/core/support/wpa_supplicant.<br />
<br />
=Procedure=<br />
/etc/wpa_supplicant.conf contains all configuration settings for wpa_supplicant. Its contents are quite simple, although the sample file that is provided is horribly obtuse. For the purpose of simplifying, login as root, and rename the default wpa_supplicant.conf file. It is not needed at this point.<br />
# mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.original<br />
<br />
==The "add my networks on the fly w/ a cli or gui front-end" Method==<br />
It is also possible to configure wpa_supplicant just enough that you can use wpa_gui or wpa_cli (see "Management") to actually configure your network connections, instead of defining your network blocks in the wpa_supplicant.conf file. You will need a config file along the lines of:<br />
<br />
ctrl_interface=/var/run/wpa_supplicant<br />
ctrl_interface_group=network<br />
update_config=1<br />
<br />
This configuration will allow users in the "network" group to control wpa_supplicant via the wpa_gui, wpa_cli frontends, the "update_config=1" variable allows these programs (wpa_cli,wpa_gui) to modify the wpa_supplicant.conf file, to save new networks or modifications to existing networks. Now you'll need to start wpa_supplicant:<br />
<br />
# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B<br />
<br />
Now you should be able to start up wpa_gui, or wpa_cli and add some networks to connect to. If you'd rather edit the config file manually, read on.<br />
<br />
where the -D option specifies your wireless driver (which is almost always wext), -i specifies interface (replace wlan0 with your wireless interface's name) and -c specifies the conf file. -B tell wpa_supplicant to run as a deamon. You will have to run wpa_supplicant as root (or with sudo), but any user in the network group can run wpa_gui or wpa_cli.<br />
<br />
==The "I want to add my networks by editing wpa_supplicant.conf method"==<br />
<br />
The specified ssid and passphrase for your wpa encrypted wireless network must be encoded into a hexadecimal string. Achieving this is quite simple, by utilizing the wpa_passphrase utility, which is supplied as part of the wpa_supplicant package. Use the syntax <code>wpa_passphrase [ssid] [passphrase]</code><br />
<br />
*An example exercise:<br />
<br />
# wpa_passphrase mywireless secretpassphrase<br />
<br />
this should generate something like the below:<br />
network={<br />
ssid="mywireless"<br />
#psk="secretpassphrase"<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
This is the basic configuration required to get wpa working. The first line is the opening statement for the network, the second is the ssid of the base station you are wanting to connect to, the third line the passphrase, and the fourth the hex key which is required to connect.<br />
<br />
*Utilizing wpa_passphrase, specify your actual ssid and passphrase, and redirect the output to /etc/wpa_supplicant.conf:<br />
<br />
# wpa_passphrase mywireless secretpassphrase > /etc/wpa_supplicant.conf<br />
<br />
changing the details where applicable to your own specific information. This will then create a basic /etc/wpa_supplicant.conf from the output of the wpa_passphrase command. <br />
<br />
For example if you use the WPA2 protocol you will have to add few lines in the network section:<br />
<br />
network={<br />
ssid="mywireless"<br />
proto=RSN<br />
pairwise=CCMP TKIP<br />
key_mgmt=WPA-PSK<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
{{Box Note | Your network information will be stored in plain text format, so you should change the permissions on the newly created /etc/wpa_supplicant.conf file (e.g. <tt>chmod 0600 /etc/wpa_supplicant.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
Adding an additional WPA encrypted network can be achieved like so:<br />
# wpa_passphrase additional_ssid additional_passphrase >> /etc/wpa_supplicant.conf<br />
The '>>' will redirect and append the output to /etc/wpa_supplicant.conf, without overwriting.<br />
<br />
There are a large number of options which are available to set under the network which you can investigate by looking at the original configuration file. In most cases you can use the defaults, and not specify anything further in that section at the moment.<br />
<br />
Lastly, specify these additional lines at the top of /etc/wpa_supplicant.conf, with your editor of choice:<br />
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel<br />
<br />
If you need to connect to several networks, just define another network block in the same file. Change the priority at will, recalling that priorities with big numbers are tried first.<br />
<br />
Now you can try connecting manually.<br />
<br />
First, bring the wifi interface up. For the purposes of this example we will use interface <code>wlan0.</code><br />
<br />
# ifconfig wlan0 up<br />
<br />
Next, direct the interface to associate with the access point ssid:<br />
# iwconfig wlan0 essid [ssid]<br />
Once ssid association is successful, (after about 10 seconds on average), you need to run wpa_supplicant to complete the encrypted association. Typically, you will be able to use the '''W'''ireless '''EXT'''ensions driver for wpa_supplicant, if you cannot, then you might need to check how to do it with your wireless device on the internet.<br />
<br />
Issue the following as root:<br />
<br />
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf <br />
The previous syntax tells wpa_supplicant to use its default hardware configuration (WEXT - Linux '''W'''ireless '''EXT'''ensions) and to associate with the ssid which is specified in /etc/wpa_supplicant.conf. Also, this association should be performed through the wlan0 wireless interface and the process should move to the background, (-B). For verbose output, add '''-d''' or '''-dd''' (for debug) to dump more information to the console. You can find additional examples here [http://www.examplenow.com/wpa_supplicant wpa_supplicant].<br />
<br />
In the console output, there should be a line that reads ''''Associated:'''' followed by a MAC address. All that is required now is an IP address.<br />
s<br />
As root, issue:<br />
# dhcpcd wlan0<br />
<br />
*Note: *Do not* request the IP inmediately! You must wait to ensure proper asociation. If you use a script, you can use "sleep 10s" to wait for 10 seconds.<br />
<br />
Verify the interface has received an IP address using ifconfig:<br />
# ifconfig wlan0<br />
<br />
wlan0 Link encap:Ethernet HWaddr 00:1C:BF:66:4E:E0 <br />
inet addr:192.168.0.62 Bcast:192.168.0.255 Mask:255.255.255.0<br />
inet6 addr: fe80::21c:bfff:fe66:4ee0/64 Scope:Link<br />
UP BROADCAST MULTICAST MTU:1500 Metric:1<br />
RX packets:140387 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:96902 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000<br />
RX bytes:125513183 (119.6 Mb) TX bytes:12299192 (11.7 Mb)<br />
<br />
If the output is close to the above, you are now connected. If so you can investigate using the netcfg2 scripts to setup this on a more permanent arrangement and get it working when you start the machine.<br />
Depending to the approach you've chosen to configure your wireless adapter, you can decide to use a graphical --but not invasive-- tool like [[Wicd]] or pick the network profiles provided by netcfg.<br />
<br />
More sophisticated configurations, like EAPOL or RADIUS authentication are very well detailed in the wpa_supplicant.conf manpage. These configurations fall out of the scope of this document.<br />
<br />
==But man, that didn't work for me - (Rebuilding wpa_supplicant from scratch)==<br />
Grab a copy of wpa_supplicant source from the homepage or from the ABS. Once downloaded and untarred, have a look at the file '.config' (yeah, it's hidden). The file looks like a kernel config, only much smaller. Have a look at the sections named CONFIG_DRIVER_''DRIVERNAME'' and choose yes or no, depending upon your driver. Be careful with the options chosen, because you will need to specify an additional path to your wireless drivers' source in order to correctly compile the low-level association component. Some weird atheros cards may need a fresh wpa_supplicant build compiled against the latest madwifi-svn relase available. If this is the case, here is an example to enlighten you through the compilation process:<br />
<br />
'''madwifi example''': edit the following lines in the config file to look like this. This assumes that you have built madwifi with abs and that the source from the build is stored in /var/abs/local/madwifi/src/.<br />
<br />
#Driver interface for madwifi driver<br />
CONFIG_DRIVER_MADWIFI=y<br />
#Change include directories to match with the local settings<br />
CFLAGS += -I/var/abs/local/madwifi/src/madwifi<br />
<br />
Once configured, you can proceed with makepkg as usual.<br />
<br />
==Management==<br />
<br />
===[Wireless Management Only]===<br />
<br />
There are two frontends to wpa_supplicant actually written by the wpa_supplicant developers themselves, "wpa_cli", and "wpa_gui". wpa_cli is, as you might expect, a command line front end, while "wpa_gui" is a qt-based frontend to wpa_supplicant. wpa_cli is include with the wpa_supplicant package, wpa_supplicant_gui is it's own package. There are three key things required to use either wpa_cli or wpa_gui:<br />
<br />
- You must first start an instance of wpa_supplicant, starting either frontend won't do that for you<br />
<br />
- You must specify a ctrl_interface in you wpa_supplicant.conf file, if you use something non-standard you must properly configure/call your client programs, the default value in wpa_supplicant.conf:<br />
ctrl_interface=/var/run/wpa_supplicant<br />
[/code]<br />
should work for most people.<br />
<br />
- If you want to manage wireless connections with a non-root user you also must specify a "ctrl_interface_group" in wpa_supplicant.conf like:<br />
[code]<br />
ctrl_interface_group=network<br />
[/code]<br />
then users in the "network" group will be able to start/stop/modify wireless connections.<br />
<br />
'''Note:''' wpa_cli and wpa_gui will not get you an ip address or set up a proper routeing table, they will '''only''' associate you with a wireless access point. The wpa_auto scripts from the aur can be used to start wpa_supplicant at boot and automatically run dhcp to configure your network connection after you associate to a wireless network, or you might right your own scripts. Higher level, wireless/network management utilites are also available, that are capable of managing both wireless connections and wired connections:<br />
<br />
===[[Wicd]]===<br />
<br />
Installation:<br />
# pacman -S [[wicd]] <br />
<br />
Very straightforward. Scan for networks, fill in the required data and connect. You might need to add <br />
/usr/lib/wicd/autoconnect.py<br />
<br />
to your init and power-managing scripts to reconnect to those networks if autoconnection behavior is expected.<br />
q<br />
===netcfg===<br />
<br />
See [[Network Profiles]]<br />
<br />
==Common Issues==<br />
99.9% of the issues are related to the association. So, have a deep look at wpa_supplicant's output when you suspect its misbehaving. Add '-d' (for debug) to increase the verbosity. Usually '-dd' is enough. '-dddd' might be overkill.<br />
<br />
When you're inspecting the log, have a look at entries like this one:<br />
<br />
ioctl['''WHATEVER''']: Operation not supported<br />
<br />
If this is the case, you're experiencing a driver issue. Upgrade drivers, or change the -D parameter.<br />
<br />
Another common problem is ''No suitable AP found'' messages. Wpa_supplicant seems to have trouble finding hidden essids. Usually setting scan_ssid=1 in your network block will take care of this.</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=Wpa_supplicant&diff=83431
Wpa supplicant
2009-11-13T08:30:51Z
<p>Pseudonomous: /* Procedure */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|WPA Supplicant}}<br />
{{i18n_entry|简体中文|WPA 客户端}}<br />
{{i18n_entry|Russian|WPA Supplicant (Русский)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Communication and network (English)]]<br />
[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
==Read This First==<br />
This article assumes that you are familiar with your hardware, and are capable of finding your way around configuration files and configuring your system. It is also critical you have *read and understood* the [[Wireless Setup]] article, because it is the basis for all that we are going to explain here.<br />
<br />
The previous version of this article expanded on the use of [[ABS - The Arch Build System]] and the Network Profiles mentioned on [[Wireless Setup]]. I suppose that a better understanding of the system always helps, but tends to divert objectives, and finally affects the scope of the document. <br />
<br />
Finally, this document is not a prerequisite if your hardware works out of the box and is handled through a connection daemon like networkmanager or the like. If you prefer to connect to the network using a graphical tool, you shouldn't be reading this.<br />
<br />
==What is WPA Supplicant? ==<br />
You have probably heard about WEP and its inherent weaknesses. A network protected by a static WEP key can quite easily be compromised by a motivated hacker. WPA corrects the problem of the static key, by changing it at a packet transmitted/recieved frequency, or once a certain amount of time has passed. This process is performed by a daemon which is tightly bound to your wireless hardware. <br />
<br />
Inferior drivers (in particular those used through ndiswrapper) can provide much frustration when used in conjunction with wpa_supplicant so, if at all possible, use hardware with proper support and high quality drivers.<br />
<br />
For further information, WPA Supplicant's homepage is reachable at: http://hostap.epitest.fi/wpa_supplicant/<br />
<br />
==Installation==<br />
wpa_supplicant is in the package group '''base-devel''' from the repositories. Invoking pacman, the package can be installed explicitly:<br />
pacman -S wpa_supplicant<br />
<br />
This package has been built for supporting a very broad range of wireless hardware. For your information, here is the list, which can be obtained by executing 'wpa_supplicant', without quotes, from your bash prompt:<br />
<br />
# wpa_supplicant<br />
...<br />
<br />
Driver list:<br />
<br />
*HostAP<br />
*Prism54<br />
*Madwifi<br />
*NDISWrapper<br />
*AMTEL<br />
*IPW (both 2100 and 2200 drivers)<br />
*WEXT (Generic Linux wireless extensions)<br />
*Wired ethernet<br />
<br />
Most wireless hardware is supported by default by wpa_supplicant. Even if your chipset manufacturer isn't listed (which is the most probable case), you can still make use of the Generic Wireless Extensions to connect to a WPA-secured network. Based on my particular experience, 75% of hardware is supported by WEXT, about 20% is compatible by recompiling wpa_supplicant/hw drivers from scratch and, unfortunately the missing 5% which is definitely incompatible. I'll talk about the incompatibilities later, however if you're completely desperate, ABS is always an option. WPA Supplicant is available at: /var/abs/core/support/wpa_supplicant.<br />
<br />
=Procedure=<br />
/etc/wpa_supplicant.conf contains all configuration settings for wpa_supplicant. Its contents are quite simple, although the sample file that is provided is horribly obtuse. For the purpose of simplifying, login as root, and rename the default wpa_supplicant.conf file. It is not needed at this point.<br />
# mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.original<br />
<br />
==The "add my networks on the fly w/ a cli or gui front-end" Method==<br />
'''Note:''' While the described procedure below works, it is also possible to configure wpa_supplicant just enough that you can use wpa_gui or wpa_cli (see "Management") to actually configure your network connections, instead of defining your network blocks in the wpa_supplicant.conf file. You will need a config file along the lines of:<br />
<br />
ctrl_interface=/var/run/wpa_supplicant<br />
ctrl_interface_group=network<br />
update_config=1<br />
<br />
This configuration will allow users in the "network" group to control wpa_supplicant via the wpa_gui, wpa_cli frontends, the "update_config=1" variable allows these programs (wpa_cli,wpa_gui) to modify the wpa_supplicant.conf file, to save new networks or modifications to existing networks. Now you'll need to start wpa_supplicant:<br />
<br />
# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B<br />
<br />
Now you should be able to start up wpa_gui, or wpa_cli and add some networks to connect to. If you'd rather edit the config file manually, read on.<br />
<br />
where the -D option specifies your wireless driver (which is almost always wext), -i specifies interface (replace wlan0 with your wireless interface's name) and -c specifies the conf file. -B tell wpa_supplicant to run as a deamon.<br />
<br />
==The "I want to add my networks by editing wpa_supplicant.conf method"==<br />
<br />
The specified ssid and passphrase for your wpa encrypted wireless network must be encoded into a hexadecimal string. Achieving this is quite simple, by utilizing the wpa_passphrase utility, which is supplied as part of the wpa_supplicant package. Use the syntax <code>wpa_passphrase [ssid] [passphrase]</code><br />
<br />
*An example exercise:<br />
<br />
# wpa_passphrase mywireless secretpassphrase<br />
<br />
this should generate something like the below:<br />
network={<br />
ssid="mywireless"<br />
#psk="secretpassphrase"<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
This is the basic configuration required to get wpa working. The first line is the opening statement for the network, the second is the ssid of the base station you are wanting to connect to, the third line the passphrase, and the fourth the hex key which is required to connect.<br />
<br />
*Utilizing wpa_passphrase, specify your actual ssid and passphrase, and redirect the output to /etc/wpa_supplicant.conf:<br />
<br />
# wpa_passphrase mywireless secretpassphrase > /etc/wpa_supplicant.conf<br />
<br />
changing the details where applicable to your own specific information. This will then create a basic /etc/wpa_supplicant.conf from the output of the wpa_passphrase command. <br />
<br />
For example if you use the WPA2 protocol you will have to add few lines in the network section:<br />
<br />
network={<br />
ssid="mywireless"<br />
proto=RSN<br />
pairwise=CCMP TKIP<br />
key_mgmt=WPA-PSK<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
{{Box Note | Your network information will be stored in plain text format, so you should change the permissions on the newly created /etc/wpa_supplicant.conf file (e.g. <tt>chmod 0600 /etc/wpa_supplicant.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
Adding an additional WPA encrypted network can be achieved like so:<br />
# wpa_passphrase additional_ssid additional_passphrase >> /etc/wpa_supplicant.conf<br />
The '>>' will redirect and append the output to /etc/wpa_supplicant.conf, without overwriting.<br />
<br />
There are a large number of options which are available to set under the network which you can investigate by looking at the original configuration file. In most cases you can use the defaults, and not specify anything further in that section at the moment.<br />
<br />
Lastly, specify these additional lines at the top of /etc/wpa_supplicant.conf, with your editor of choice:<br />
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel<br />
<br />
If you need to connect to several networks, just define another network block in the same file. Change the priority at will, recalling that priorities with big numbers are tried first.<br />
<br />
Now you can try connecting manually.<br />
<br />
First, bring the wifi interface up. For the purposes of this example we will use interface <code>wlan0.</code><br />
<br />
# ifconfig wlan0 up<br />
<br />
Next, direct the interface to associate with the access point ssid:<br />
# iwconfig wlan0 essid [ssid]<br />
Once ssid association is successful, (after about 10 seconds on average), you need to run wpa_supplicant to complete the encrypted association. Typically, you will be able to use the '''W'''ireless '''EXT'''ensions driver for wpa_supplicant, if you cannot, then you might need to check how to do it with your wireless device on the internet.<br />
<br />
Issue the following as root:<br />
<br />
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf <br />
The previous syntax tells wpa_supplicant to use its default hardware configuration (WEXT - Linux '''W'''ireless '''EXT'''ensions) and to associate with the ssid which is specified in /etc/wpa_supplicant.conf. Also, this association should be performed through the wlan0 wireless interface and the process should move to the background, (-B). For verbose output, add '''-d''' or '''-dd''' (for debug) to dump more information to the console. You can find additional examples here [http://www.examplenow.com/wpa_supplicant wpa_supplicant].<br />
<br />
In the console output, there should be a line that reads ''''Associated:'''' followed by a MAC address. All that is required now is an IP address.<br />
s<br />
As root, issue:<br />
# dhcpcd wlan0<br />
<br />
*Note: *Do not* request the IP inmediately! You must wait to ensure proper asociation. If you use a script, you can use "sleep 10s" to wait for 10 seconds.<br />
<br />
Verify the interface has received an IP address using ifconfig:<br />
# ifconfig wlan0<br />
<br />
wlan0 Link encap:Ethernet HWaddr 00:1C:BF:66:4E:E0 <br />
inet addr:192.168.0.62 Bcast:192.168.0.255 Mask:255.255.255.0<br />
inet6 addr: fe80::21c:bfff:fe66:4ee0/64 Scope:Link<br />
UP BROADCAST MULTICAST MTU:1500 Metric:1<br />
RX packets:140387 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:96902 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000<br />
RX bytes:125513183 (119.6 Mb) TX bytes:12299192 (11.7 Mb)<br />
<br />
If the output is close to the above, you are now connected. If so you can investigate using the netcfg2 scripts to setup this on a more permanent arrangement and get it working when you start the machine.<br />
Depending to the approach you've chosen to configure your wireless adapter, you can decide to use a graphical --but not invasive-- tool like [[Wicd]] or pick the network profiles provided by netcfg.<br />
<br />
More sophisticated configurations, like EAPOL or RADIUS authentication are very well detailed in the wpa_supplicant.conf manpage. These configurations fall out of the scope of this document.<br />
<br />
==But man, that didn't work for me - (Rebuilding wpa_supplicant from scratch)==<br />
Grab a copy of wpa_supplicant source from the homepage or from the ABS. Once downloaded and untarred, have a look at the file '.config' (yeah, it's hidden). The file looks like a kernel config, only much smaller. Have a look at the sections named CONFIG_DRIVER_''DRIVERNAME'' and choose yes or no, depending upon your driver. Be careful with the options chosen, because you will need to specify an additional path to your wireless drivers' source in order to correctly compile the low-level association component. Some weird atheros cards may need a fresh wpa_supplicant build compiled against the latest madwifi-svn relase available. If this is the case, here is an example to enlighten you through the compilation process:<br />
<br />
'''madwifi example''': edit the following lines in the config file to look like this. This assumes that you have built madwifi with abs and that the source from the build is stored in /var/abs/local/madwifi/src/.<br />
<br />
#Driver interface for madwifi driver<br />
CONFIG_DRIVER_MADWIFI=y<br />
#Change include directories to match with the local settings<br />
CFLAGS += -I/var/abs/local/madwifi/src/madwifi<br />
<br />
Once configured, you can proceed with makepkg as usual.<br />
<br />
==Management==<br />
<br />
===[Wireless Management Only]===<br />
<br />
There are two frontends to wpa_supplicant actually written by the wpa_supplicant developers themselves, "wpa_cli", and "wpa_gui". wpa_cli is, as you might expect, a command line front end, while "wpa_gui" is a qt-based frontend to wpa_supplicant. wpa_cli is include with the wpa_supplicant package, wpa_supplicant_gui is it's own package. There are three key things required to use either wpa_cli or wpa_gui:<br />
<br />
- You must first start an instance of wpa_supplicant, starting either frontend won't do that for you<br />
<br />
- You must specify a ctrl_interface in you wpa_supplicant.conf file, if you use something non-standard you must properly configure/call your client programs, the default value in wpa_supplicant.conf:<br />
ctrl_interface=/var/run/wpa_supplicant<br />
[/code]<br />
should work for most people.<br />
<br />
- If you want to manage wireless connections with a non-root user you also must specify a "ctrl_interface_group" in wpa_supplicant.conf like:<br />
[code]<br />
ctrl_interface_group=network<br />
[/code]<br />
then users in the "network" group will be able to start/stop/modify wireless connections.<br />
<br />
'''Note:''' wpa_cli and wpa_gui will not get you an ip address or set up a proper routeing table, they will '''only''' associate you with a wireless access point. The wpa_auto scripts from the aur can be used to start wpa_supplicant at boot and automatically run dhcp to configure your network connection after you associate to a wireless network, or you might right your own scripts. Higher level, wireless/network management utilites are also available, that are capable of managing both wireless connections and wired connections:<br />
<br />
===[[Wicd]]===<br />
<br />
Installation:<br />
# pacman -S [[wicd]] <br />
<br />
Very straightforward. Scan for networks, fill in the required data and connect. You might need to add <br />
/usr/lib/wicd/autoconnect.py<br />
<br />
to your init and power-managing scripts to reconnect to those networks if autoconnection behavior is expected.<br />
q<br />
===netcfg===<br />
<br />
See [[Network Profiles]]<br />
<br />
==Common Issues==<br />
99.9% of the issues are related to the association. So, have a deep look at wpa_supplicant's output when you suspect its misbehaving. Add '-d' (for debug) to increase the verbosity. Usually '-dd' is enough. '-dddd' might be overkill.<br />
<br />
When you're inspecting the log, have a look at entries like this one:<br />
<br />
ioctl['''WHATEVER''']: Operation not supported<br />
<br />
If this is the case, you're experiencing a driver issue. Upgrade drivers, or change the -D parameter.<br />
<br />
Another common problem is ''No suitable AP found'' messages. Wpa_supplicant seems to have trouble finding hidden essids. Usually setting scan_ssid=1 in your network block will take care of this.</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=Wpa_supplicant&diff=83430
Wpa supplicant
2009-11-13T08:21:38Z
<p>Pseudonomous: /* Procedure */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|WPA Supplicant}}<br />
{{i18n_entry|简体中文|WPA 客户端}}<br />
{{i18n_entry|Russian|WPA Supplicant (Русский)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Communication and network (English)]]<br />
[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
==Read This First==<br />
This article assumes that you are familiar with your hardware, and are capable of finding your way around configuration files and configuring your system. It is also critical you have *read and understood* the [[Wireless Setup]] article, because it is the basis for all that we are going to explain here.<br />
<br />
The previous version of this article expanded on the use of [[ABS - The Arch Build System]] and the Network Profiles mentioned on [[Wireless Setup]]. I suppose that a better understanding of the system always helps, but tends to divert objectives, and finally affects the scope of the document. <br />
<br />
Finally, this document is not a prerequisite if your hardware works out of the box and is handled through a connection daemon like networkmanager or the like. If you prefer to connect to the network using a graphical tool, you shouldn't be reading this.<br />
<br />
==What is WPA Supplicant? ==<br />
You have probably heard about WEP and its inherent weaknesses. A network protected by a static WEP key can quite easily be compromised by a motivated hacker. WPA corrects the problem of the static key, by changing it at a packet transmitted/recieved frequency, or once a certain amount of time has passed. This process is performed by a daemon which is tightly bound to your wireless hardware. <br />
<br />
Inferior drivers (in particular those used through ndiswrapper) can provide much frustration when used in conjunction with wpa_supplicant so, if at all possible, use hardware with proper support and high quality drivers.<br />
<br />
For further information, WPA Supplicant's homepage is reachable at: http://hostap.epitest.fi/wpa_supplicant/<br />
<br />
==Installation==<br />
wpa_supplicant is in the package group '''base-devel''' from the repositories. Invoking pacman, the package can be installed explicitly:<br />
pacman -S wpa_supplicant<br />
<br />
This package has been built for supporting a very broad range of wireless hardware. For your information, here is the list, which can be obtained by executing 'wpa_supplicant', without quotes, from your bash prompt:<br />
<br />
# wpa_supplicant<br />
...<br />
<br />
Driver list:<br />
<br />
*HostAP<br />
*Prism54<br />
*Madwifi<br />
*NDISWrapper<br />
*AMTEL<br />
*IPW (both 2100 and 2200 drivers)<br />
*WEXT (Generic Linux wireless extensions)<br />
*Wired ethernet<br />
<br />
Most wireless hardware is supported by default by wpa_supplicant. Even if your chipset manufacturer isn't listed (which is the most probable case), you can still make use of the Generic Wireless Extensions to connect to a WPA-secured network. Based on my particular experience, 75% of hardware is supported by WEXT, about 20% is compatible by recompiling wpa_supplicant/hw drivers from scratch and, unfortunately the missing 5% which is definitely incompatible. I'll talk about the incompatibilities later, however if you're completely desperate, ABS is always an option. WPA Supplicant is available at: /var/abs/core/support/wpa_supplicant.<br />
<br />
==Procedure==<br />
/etc/wpa_supplicant.conf contains all configuration settings for wpa_supplicant. Its contents are quite simple, although the sample file that is provided is horribly obtuse. For the purpose of simplifying, login as root, and rename the default wpa_supplicant.conf file. It is not needed at this point.<br />
# mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.original<br />
<br />
'''Note:''' While the described procedure here still works, it is also possible to configure wpa_supplicant just enough that you can use wpa_gui or wpa_cli (see "Management") to actually configure your network connections, instead of defining your network blocks in the wpa_supplicant.conf file. You will need a config file along the lines of:<br />
<br />
ctrl_interface=/var/run/wpa_supplicant<br />
ctrl_interface_group=network<br />
update_config=1<br />
<br />
This configuration will allow users in the "network" group to control wpa_supplicant via the wpa_gui, wpa_cli frontends, the "update_config=1" variable allows these programs (wpa_cli,wpa_gui) to modify the wpa_supplicant.conf file, to save new networks or modifications to existing networks.<br />
<br />
The specified ssid and passphrase for your wpa encrypted wireless network must be encoded into a hexadecimal string. Achieving this is quite simple, by utilizing the wpa_passphrase utility, which is supplied as part of the wpa_supplicant package. Use the syntax <code>wpa_passphrase [ssid] [passphrase]</code><br />
<br />
*An example exercise:<br />
<br />
# wpa_passphrase mywireless secretpassphrase<br />
<br />
this should generate something like the below:<br />
network={<br />
ssid="mywireless"<br />
#psk="secretpassphrase"<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
This is the basic configuration required to get wpa working. The first line is the opening statement for the network, the second is the ssid of the base station you are wanting to connect to, the third line the passphrase, and the fourth the hex key which is required to connect.<br />
<br />
*Utilizing wpa_passphrase, specify your actual ssid and passphrase, and redirect the output to /etc/wpa_supplicant.conf:<br />
<br />
# wpa_passphrase mywireless secretpassphrase > /etc/wpa_supplicant.conf<br />
<br />
changing the details where applicable to your own specific information. This will then create a basic /etc/wpa_supplicant.conf from the output of the wpa_passphrase command. <br />
<br />
For example if you use the WPA2 protocol you will have to add few lines in the network section:<br />
<br />
network={<br />
ssid="mywireless"<br />
proto=RSN<br />
pairwise=CCMP TKIP<br />
key_mgmt=WPA-PSK<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
{{Box Note | Your network information will be stored in plain text format, so you should change the permissions on the newly created /etc/wpa_supplicant.conf file (e.g. <tt>chmod 0600 /etc/wpa_supplicant.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
Adding an additional WPA encrypted network can be achieved like so:<br />
# wpa_passphrase additional_ssid additional_passphrase >> /etc/wpa_supplicant.conf<br />
The '>>' will redirect and append the output to /etc/wpa_supplicant.conf, without overwriting.<br />
<br />
There are a large number of options which are available to set under the network which you can investigate by looking at the original configuration file. In most cases you can use the defaults, and not specify anything further in that section at the moment.<br />
<br />
Lastly, specify these additional lines at the top of /etc/wpa_supplicant.conf, with your editor of choice:<br />
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel<br />
<br />
If you need to connect to several networks, just define another network block in the same file. Change the priority at will, recalling that priorities with big numbers are tried first.<br />
<br />
Now you can try connecting manually.<br />
<br />
First, bring the wifi interface up. For the purposes of this example we will use interface <code>wlan0.</code><br />
<br />
# ifconfig wlan0 up<br />
<br />
Next, direct the interface to associate with the access point ssid:<br />
# iwconfig wlan0 essid [ssid]<br />
Once ssid association is successful, (after about 10 seconds on average), you need to run wpa_supplicant to complete the encrypted association. Typically, you will be able to use the '''W'''ireless '''EXT'''ensions driver for wpa_supplicant, if you cannot, then you might need to check how to do it with your wireless device on the internet.<br />
<br />
Issue the following as root:<br />
<br />
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf <br />
The previous syntax tells wpa_supplicant to use its default hardware configuration (WEXT - Linux '''W'''ireless '''EXT'''ensions) and to associate with the ssid which is specified in /etc/wpa_supplicant.conf. Also, this association should be performed through the wlan0 wireless interface and the process should move to the background, (-B). For verbose output, add '''-d''' or '''-dd''' (for debug) to dump more information to the console. You can find additional examples here [http://www.examplenow.com/wpa_supplicant wpa_supplicant].<br />
<br />
In the console output, there should be a line that reads ''''Associated:'''' followed by a MAC address. All that is required now is an IP address.<br />
s<br />
As root, issue:<br />
# dhcpcd wlan0<br />
<br />
*Note: *Do not* request the IP inmediately! You must wait to ensure proper asociation. If you use a script, you can use "sleep 10s" to wait for 10 seconds.<br />
<br />
Verify the interface has received an IP address using ifconfig:<br />
# ifconfig wlan0<br />
<br />
wlan0 Link encap:Ethernet HWaddr 00:1C:BF:66:4E:E0 <br />
inet addr:192.168.0.62 Bcast:192.168.0.255 Mask:255.255.255.0<br />
inet6 addr: fe80::21c:bfff:fe66:4ee0/64 Scope:Link<br />
UP BROADCAST MULTICAST MTU:1500 Metric:1<br />
RX packets:140387 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:96902 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000<br />
RX bytes:125513183 (119.6 Mb) TX bytes:12299192 (11.7 Mb)<br />
<br />
If the output is close to the above, you are now connected. If so you can investigate using the netcfg2 scripts to setup this on a more permanent arrangement and get it working when you start the machine.<br />
Depending to the approach you've chosen to configure your wireless adapter, you can decide to use a graphical --but not invasive-- tool like [[Wicd]] or pick the network profiles provided by netcfg.<br />
<br />
More sophisticated configurations, like EAPOL or RADIUS authentication are very well detailed in the wpa_supplicant.conf manpage. These configurations fall out of the scope of this document.<br />
<br />
==But man, that didn't work for me - (Rebuilding wpa_supplicant from scratch)==<br />
Grab a copy of wpa_supplicant source from the homepage or from the ABS. Once downloaded and untarred, have a look at the file '.config' (yeah, it's hidden). The file looks like a kernel config, only much smaller. Have a look at the sections named CONFIG_DRIVER_''DRIVERNAME'' and choose yes or no, depending upon your driver. Be careful with the options chosen, because you will need to specify an additional path to your wireless drivers' source in order to correctly compile the low-level association component. Some weird atheros cards may need a fresh wpa_supplicant build compiled against the latest madwifi-svn relase available. If this is the case, here is an example to enlighten you through the compilation process:<br />
<br />
'''madwifi example''': edit the following lines in the config file to look like this. This assumes that you have built madwifi with abs and that the source from the build is stored in /var/abs/local/madwifi/src/.<br />
<br />
#Driver interface for madwifi driver<br />
CONFIG_DRIVER_MADWIFI=y<br />
#Change include directories to match with the local settings<br />
CFLAGS += -I/var/abs/local/madwifi/src/madwifi<br />
<br />
Once configured, you can proceed with makepkg as usual.<br />
<br />
==Management==<br />
<br />
===[Wireless Management Only]===<br />
<br />
There are two frontends to wpa_supplicant actually written by the wpa_supplicant developers themselves, "wpa_cli", and "wpa_gui". wpa_cli is, as you might expect, a command line front end, while "wpa_gui" is a qt-based frontend to wpa_supplicant. wpa_cli is include with the wpa_supplicant package, wpa_supplicant_gui is it's own package. There are three key things required to use either wpa_cli or wpa_gui:<br />
<br />
- You must first start an instance of wpa_supplicant, starting either frontend won't do that for you<br />
<br />
- You must specify a ctrl_interface in you wpa_supplicant.conf file, if you use something non-standard you must properly configure/call your client programs, the default value in wpa_supplicant.conf:<br />
ctrl_interface=/var/run/wpa_supplicant<br />
[/code]<br />
should work for most people.<br />
<br />
- If you want to manage wireless connections with a non-root user you also must specify a "ctrl_interface_group" in wpa_supplicant.conf like:<br />
[code]<br />
ctrl_interface_group=network<br />
[/code]<br />
then users in the "network" group will be able to start/stop/modify wireless connections.<br />
<br />
'''Note:''' wpa_cli and wpa_gui will not get you an ip address or set up a proper routeing table, they will '''only''' associate you with a wireless access point. The wpa_auto scripts from the aur can be used to start wpa_supplicant at boot and automatically run dhcp to configure your network connection after you associate to a wireless network, or you might right your own scripts. Higher level, wireless/network management utilites are also available, that are capable of managing both wireless connections and wired connections:<br />
<br />
===[[Wicd]]===<br />
<br />
Installation:<br />
# pacman -S [[wicd]] <br />
<br />
Very straightforward. Scan for networks, fill in the required data and connect. You might need to add <br />
/usr/lib/wicd/autoconnect.py<br />
<br />
to your init and power-managing scripts to reconnect to those networks if autoconnection behavior is expected.<br />
q<br />
===netcfg===<br />
<br />
See [[Network Profiles]]<br />
<br />
==Common Issues==<br />
99.9% of the issues are related to the association. So, have a deep look at wpa_supplicant's output when you suspect its misbehaving. Add '-d' (for debug) to increase the verbosity. Usually '-dd' is enough. '-dddd' might be overkill.<br />
<br />
When you're inspecting the log, have a look at entries like this one:<br />
<br />
ioctl['''WHATEVER''']: Operation not supported<br />
<br />
If this is the case, you're experiencing a driver issue. Upgrade drivers, or change the -D parameter.<br />
<br />
Another common problem is ''No suitable AP found'' messages. Wpa_supplicant seems to have trouble finding hidden essids. Usually setting scan_ssid=1 in your network block will take care of this.</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=Wpa_supplicant&diff=83429
Wpa supplicant
2009-11-13T08:16:50Z
<p>Pseudonomous: /* Management */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|WPA Supplicant}}<br />
{{i18n_entry|简体中文|WPA 客户端}}<br />
{{i18n_entry|Russian|WPA Supplicant (Русский)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Communication and network (English)]]<br />
[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
==Read This First==<br />
This article assumes that you are familiar with your hardware, and are capable of finding your way around configuration files and configuring your system. It is also critical you have *read and understood* the [[Wireless Setup]] article, because it is the basis for all that we are going to explain here.<br />
<br />
The previous version of this article expanded on the use of [[ABS - The Arch Build System]] and the Network Profiles mentioned on [[Wireless Setup]]. I suppose that a better understanding of the system always helps, but tends to divert objectives, and finally affects the scope of the document. <br />
<br />
Finally, this document is not a prerequisite if your hardware works out of the box and is handled through a connection daemon like networkmanager or the like. If you prefer to connect to the network using a graphical tool, you shouldn't be reading this.<br />
<br />
==What is WPA Supplicant? ==<br />
You have probably heard about WEP and its inherent weaknesses. A network protected by a static WEP key can quite easily be compromised by a motivated hacker. WPA corrects the problem of the static key, by changing it at a packet transmitted/recieved frequency, or once a certain amount of time has passed. This process is performed by a daemon which is tightly bound to your wireless hardware. <br />
<br />
Inferior drivers (in particular those used through ndiswrapper) can provide much frustration when used in conjunction with wpa_supplicant so, if at all possible, use hardware with proper support and high quality drivers.<br />
<br />
For further information, WPA Supplicant's homepage is reachable at: http://hostap.epitest.fi/wpa_supplicant/<br />
<br />
==Installation==<br />
wpa_supplicant is in the package group '''base-devel''' from the repositories. Invoking pacman, the package can be installed explicitly:<br />
pacman -S wpa_supplicant<br />
<br />
This package has been built for supporting a very broad range of wireless hardware. For your information, here is the list, which can be obtained by executing 'wpa_supplicant', without quotes, from your bash prompt:<br />
<br />
# wpa_supplicant<br />
...<br />
<br />
Driver list:<br />
<br />
*HostAP<br />
*Prism54<br />
*Madwifi<br />
*NDISWrapper<br />
*AMTEL<br />
*IPW (both 2100 and 2200 drivers)<br />
*WEXT (Generic Linux wireless extensions)<br />
*Wired ethernet<br />
<br />
Most wireless hardware is supported by default by wpa_supplicant. Even if your chipset manufacturer isn't listed (which is the most probable case), you can still make use of the Generic Wireless Extensions to connect to a WPA-secured network. Based on my particular experience, 75% of hardware is supported by WEXT, about 20% is compatible by recompiling wpa_supplicant/hw drivers from scratch and, unfortunately the missing 5% which is definitely incompatible. I'll talk about the incompatibilities later, however if you're completely desperate, ABS is always an option. WPA Supplicant is available at: /var/abs/core/support/wpa_supplicant.<br />
<br />
==Procedure==<br />
/etc/wpa_supplicant.conf contains all configuration settings for wpa_supplicant. Its contents are quite simple, although the sample file that is provided is horribly obtuse. For the purpose of simplifying, login as root, and rename the default wpa_supplicant.conf file. It is not needed at this point.<br />
# mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.original<br />
<br />
The specified ssid and passphrase for your wpa encrypted wireless network must be encoded into a hexadecimal string. Achieving this is quite simple, by utilizing the wpa_passphrase utility, which is supplied as part of the wpa_supplicant package. Use the syntax <code>wpa_passphrase [ssid] [passphrase]</code><br />
<br />
*An example exercise:<br />
<br />
# wpa_passphrase mywireless secretpassphrase<br />
<br />
this should generate something like the below:<br />
network={<br />
ssid="mywireless"<br />
#psk="secretpassphrase"<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
This is the basic configuration required to get wpa working. The first line is the opening statement for the network, the second is the ssid of the base station you are wanting to connect to, the third line the passphrase, and the fourth the hex key which is required to connect.<br />
<br />
*Utilizing wpa_passphrase, specify your actual ssid and passphrase, and redirect the output to /etc/wpa_supplicant.conf:<br />
<br />
# wpa_passphrase mywireless secretpassphrase > /etc/wpa_supplicant.conf<br />
<br />
changing the details where applicable to your own specific information. This will then create a basic /etc/wpa_supplicant.conf from the output of the wpa_passphrase command. <br />
<br />
For example if you use the WPA2 protocol you will have to add few lines in the network section:<br />
<br />
network={<br />
ssid="mywireless"<br />
proto=RSN<br />
pairwise=CCMP TKIP<br />
key_mgmt=WPA-PSK<br />
psk=b90e230f1f2f5361a9b2d3acf276745ee3c751c0724a3b0052d6df15ec420e69<br />
}<br />
<br />
{{Box Note | Your network information will be stored in plain text format, so you should change the permissions on the newly created /etc/wpa_supplicant.conf file (e.g. <tt>chmod 0600 /etc/wpa_supplicant.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
Adding an additional WPA encrypted network can be achieved like so:<br />
# wpa_passphrase additional_ssid additional_passphrase >> /etc/wpa_supplicant.conf<br />
The '>>' will redirect and append the output to /etc/wpa_supplicant.conf, without overwriting.<br />
<br />
There are a large number of options which are available to set under the network which you can investigate by looking at the original configuration file. In most cases you can use the defaults, and not specify anything further in that section at the moment.<br />
<br />
Lastly, specify these additional lines at the top of /etc/wpa_supplicant.conf, with your editor of choice:<br />
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel<br />
<br />
If you need to connect to several networks, just define another network block in the same file. Change the priority at will, recalling that priorities with big numbers are tried first.<br />
<br />
Now you can try connecting manually.<br />
<br />
First, bring the wifi interface up. For the purposes of this example we will use interface <code>wlan0.</code><br />
<br />
# ifconfig wlan0 up<br />
<br />
Next, direct the interface to associate with the access point ssid:<br />
# iwconfig wlan0 essid [ssid]<br />
Once ssid association is successful, (after about 10 seconds on average), you need to run wpa_supplicant to complete the encrypted association. Typically, you will be able to use the '''W'''ireless '''EXT'''ensions driver for wpa_supplicant, if you cannot, then you might need to check how to do it with your wireless device on the internet.<br />
<br />
Issue the following as root:<br />
<br />
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf <br />
The previous syntax tells wpa_supplicant to use its default hardware configuration (WEXT - Linux '''W'''ireless '''EXT'''ensions) and to associate with the ssid which is specified in /etc/wpa_supplicant.conf. Also, this association should be performed through the wlan0 wireless interface and the process should move to the background, (-B). For verbose output, add '''-d''' or '''-dd''' (for debug) to dump more information to the console. You can find additional examples here [http://www.examplenow.com/wpa_supplicant wpa_supplicant].<br />
<br />
In the console output, there should be a line that reads ''''Associated:'''' followed by a MAC address. All that is required now is an IP address.<br />
s<br />
As root, issue:<br />
# dhcpcd wlan0<br />
<br />
*Note: *Do not* request the IP inmediately! You must wait to ensure proper asociation. If you use a script, you can use "sleep 10s" to wait for 10 seconds.<br />
<br />
Verify the interface has received an IP address using ifconfig:<br />
# ifconfig wlan0<br />
<br />
wlan0 Link encap:Ethernet HWaddr 00:1C:BF:66:4E:E0 <br />
inet addr:192.168.0.62 Bcast:192.168.0.255 Mask:255.255.255.0<br />
inet6 addr: fe80::21c:bfff:fe66:4ee0/64 Scope:Link<br />
UP BROADCAST MULTICAST MTU:1500 Metric:1<br />
RX packets:140387 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:96902 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000<br />
RX bytes:125513183 (119.6 Mb) TX bytes:12299192 (11.7 Mb)<br />
<br />
If the output is close to the above, you are now connected. If so you can investigate using the netcfg2 scripts to setup this on a more permanent arrangement and get it working when you start the machine.<br />
Depending to the approach you've chosen to configure your wireless adapter, you can decide to use a graphical --but not invasive-- tool like [[Wicd]] or pick the network profiles provided by netcfg.<br />
<br />
More sophisticated configurations, like EAPOL or RADIUS authentication are very well detailed in the wpa_supplicant.conf manpage. These configurations fall out of the scope of this document.<br />
<br />
==But man, that didn't work for me - (Rebuilding wpa_supplicant from scratch)==<br />
Grab a copy of wpa_supplicant source from the homepage or from the ABS. Once downloaded and untarred, have a look at the file '.config' (yeah, it's hidden). The file looks like a kernel config, only much smaller. Have a look at the sections named CONFIG_DRIVER_''DRIVERNAME'' and choose yes or no, depending upon your driver. Be careful with the options chosen, because you will need to specify an additional path to your wireless drivers' source in order to correctly compile the low-level association component. Some weird atheros cards may need a fresh wpa_supplicant build compiled against the latest madwifi-svn relase available. If this is the case, here is an example to enlighten you through the compilation process:<br />
<br />
'''madwifi example''': edit the following lines in the config file to look like this. This assumes that you have built madwifi with abs and that the source from the build is stored in /var/abs/local/madwifi/src/.<br />
<br />
#Driver interface for madwifi driver<br />
CONFIG_DRIVER_MADWIFI=y<br />
#Change include directories to match with the local settings<br />
CFLAGS += -I/var/abs/local/madwifi/src/madwifi<br />
<br />
Once configured, you can proceed with makepkg as usual.<br />
<br />
==Management==<br />
<br />
===[Wireless Management Only]===<br />
<br />
There are two frontends to wpa_supplicant actually written by the wpa_supplicant developers themselves, "wpa_cli", and "wpa_gui". wpa_cli is, as you might expect, a command line front end, while "wpa_gui" is a qt-based frontend to wpa_supplicant. wpa_cli is include with the wpa_supplicant package, wpa_supplicant_gui is it's own package. There are three key things required to use either wpa_cli or wpa_gui:<br />
<br />
- You must first start an instance of wpa_supplicant, starting either frontend won't do that for you<br />
<br />
- You must specify a ctrl_interface in you wpa_supplicant.conf file, if you use something non-standard you must properly configure/call your client programs, the default value in wpa_supplicant.conf:<br />
ctrl_interface=/var/run/wpa_supplicant<br />
[/code]<br />
should work for most people.<br />
<br />
- If you want to manage wireless connections with a non-root user you also must specify a "ctrl_interface_group" in wpa_supplicant.conf like:<br />
[code]<br />
ctrl_interface_group=network<br />
[/code]<br />
then users in the "network" group will be able to start/stop/modify wireless connections.<br />
<br />
'''Note:''' wpa_cli and wpa_gui will not get you an ip address or set up a proper routeing table, they will '''only''' associate you with a wireless access point. The wpa_auto scripts from the aur can be used to start wpa_supplicant at boot and automatically run dhcp to configure your network connection after you associate to a wireless network, or you might right your own scripts. Higher level, wireless/network management utilites are also available, that are capable of managing both wireless connections and wired connections:<br />
<br />
===[[Wicd]]===<br />
<br />
Installation:<br />
# pacman -S [[wicd]] <br />
<br />
Very straightforward. Scan for networks, fill in the required data and connect. You might need to add <br />
/usr/lib/wicd/autoconnect.py<br />
<br />
to your init and power-managing scripts to reconnect to those networks if autoconnection behavior is expected.<br />
q<br />
===netcfg===<br />
<br />
See [[Network Profiles]]<br />
<br />
==Common Issues==<br />
99.9% of the issues are related to the association. So, have a deep look at wpa_supplicant's output when you suspect its misbehaving. Add '-d' (for debug) to increase the verbosity. Usually '-dd' is enough. '-dddd' might be overkill.<br />
<br />
When you're inspecting the log, have a look at entries like this one:<br />
<br />
ioctl['''WHATEVER''']: Operation not supported<br />
<br />
If this is the case, you're experiencing a driver issue. Upgrade drivers, or change the -D parameter.<br />
<br />
Another common problem is ''No suitable AP found'' messages. Wpa_supplicant seems to have trouble finding hidden essids. Usually setting scan_ssid=1 in your network block will take care of this.</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=Alpine&diff=50448
Alpine
2008-10-01T05:50:45Z
<p>Pseudonomous: /* Configuration for use with IMAP */</p>
<hr />
<div>=Alpine: A Console Based E-mail and News Client=<br />
<br />
==Introduction==<br />
<br />
Alpine is based on pine, a text-based E-mail and newsclient that was originally released by the university of Washington in 1991. Right now, this wiki page is just a quick and dirty guide to configuring Alpine to use with a remote mailserver using IMAP.<br />
<br />
==Installation==<br />
<br />
Alpine is a package in Extra with some light dependancies, libldap, heimdal>=1.2, and gettext but you can grab them all with:<br />
<br />
pacman -S alpine<br />
<br />
You might also want to grab something to check your spelling, like:<br />
<br />
pacman -S aspell<br />
<br />
==Configuration for use with IMAP==<br />
<br />
Alpine can be configured directly from the config file in your home folder called ".pinerc", but it's ussaully easier to use the in program configuration tools (which are pretty comprehensive anyway). You can also create a system wide pinerc file if you want to, but that's beyond the scope of this page.<br />
<br />
To start alpine call up a console or a terminal emulator and type, you guessed it:<br />
<br />
alpine<br />
<br />
You will see the main menu for alpine, you can select various sub-menus by moving your cursor with the arrow keys. You should also note that a<br />
list of handy commands is given at the bottom of the screen including "?" for built in help (see below).<br />
<br />
To get to the configuration options we want to type "S" for "setup" and then "C" for "config"(or you can select these by using the arrow keys and return) At the top of your screen you will see various lines you can edit by pressing "C", for "change value" (I've pasted an example in below), you'll probably want<br />
to fill in you name, the name of your mailserver in "User Domain" (although you might have to overide this later, more on<br />
that later), your SMTP server for sending mail and, if you want to, the location of things like your saved message folder<br />
and postponed message folder. <br />
<br />
Some notes on setting up your SMTP server, as you can see below I've specified my mailserver and which port to connect to,<br />
you also need to specify your username on that server (probably your e-mail address) and if you are using some method of incryption ssl or tls note the format:<br />
<br />
mailserver.org:portnumber/user=username/ssl (or tls)<br />
<br />
Also note the format for where I've told Alpine to keep my saved and postponed messages, since I want them stored on the mailserver, and not locally, I've added an entry with form:<br />
<br />
{mailserver.org:portnumber/user=username/ssl}/path/to/folder<br />
<br />
You need to put the full entry you've specified for you SMTP Server into "{}" before the path name to the folder on the mailserver.<br />
<br />
Personal Name = Jim Bob<br />
User Domain = mailserver.org<br />
SMTP Server (for sending) = mailserver.org:465/user=jimbob123/ssl<br />
NNTP Server (for news) = <No Value Set><br />
Inbox Path = <No Value Set: using "inbox"><br />
Incoming Archive Folders = <No Value Set><br />
Pruned Folders = <No Value Set><br />
Default Fcc (File carbon copy) = {mailserver.org:465/user=jimbob123/ssl}~/mail/sent-mail<br />
Default Saved Message Folder = <No Value Set: using "saved-messages"><br />
Postponed Folder = {mailserver.org:465/user=jimbob123/ssl}~/mail/drafts<br />
Read Message Folder = <No Value Set><br />
Form Letter Folder = <No Value Set><br />
Trash Folder = <No Value Set: using "Trash"><br />
Literal Signature = <No Value Set><br />
Signature File = <No Value Set: using ".signature"><br />
Feature List =<br />
<br />
In this day and age, you probably want to set alpine up receive e-mails from another server using imap or pop, to do this we need to enable some things, in particular, check the boxes in the section "Folder Preferences" for "Enable Incoming Folders Collection" and "Enable Incoming Folders Checking". There's a bunch of other fun stuff to configure, but you can come back to that later.<br />
<br />
Now from the main menu type "L" to open "Folder List", then select "Incoming Folders". Now you'll probably see your defualt inbox, which I'm assuming you'll want to leave alone incase you recieve local mail. To add another folder to recieve mail from a remote server type "A" to add a folder.<br />
<br />
Alpine prompts you for "name of server to contain folder", enter your mailserver with the format:<br />
<br />
"mailserver.org:993/user=jimbob123/ssl"<br />
<br />
where mailserver.org is the name of your mailserver, 993 should be replaced by the proper port to connect to, jimbob123 should be replaced by your username (probably your e-mail address) and ssl should be replaced by tls if you are using tls instead of ssl.<br />
<br />
Now it will prompt you for the name of the folder on you mailserver to use, it's probably "INBOX" and if it isn't hopefully<br />
you can find out from your mail provider what it is.<br />
<br />
Then it will ask you for a nickname, type whatever you want to call the folder. At this point you might get prompted for<br />
your password on the mailserver, enter it and you should be able to read e-mail!<br />
<br />
==Setting up Other Imap folders==<br />
<br />
Great, now you can read your INBOX, but what about the REST of your Imap folders? We'll fix that know:<br />
<br />
Type "E" to exit setup and make sure that you save the changes. This should put you back at the main menu type "S" agian to bring up the setup menu, but this time pick "L" for collectionLists.<br />
<br />
Enter your mailserver info below using the format you should be getting used to by now:<br />
<br />
<br />
Nickname : My Mailserver<br />
Server : mailserver.org:993/user=jimbob123/ssl<br />
Path : ~/mail/<br />
View :<br />
<br />
<br />
Fill in the fields above to add a Folder Collection to your<br />
COLLECTION LIST screen.<br />
Use the "^G" command to get help specific to each item, and<br />
use "^X" when finished.<br />
<br />
Note that "Path" is the path on the remote server and you DON'T have to write:<br />
<br />
{mailserver.org:993/user=jimbob123/ssl}~/mail/<br />
<br />
You only need to give the local path on the mailserver (in this case ~/mail/)<br />
<br />
==Setting Up A Proper Return Address==<br />
<br />
If you've followed the steps above you can read and write e-mails, but you're probably not specifying your return address correctly, in fact, you will specify you return address properly if and only if the user name on the host computer which is run alpine is the same as your e-mail address on the mail server. In order to fix this we open setup again (type "M" for main menu, type "S" for setup). Then find "Customized Headers" (either use the "Whereis" command to search, or page down a few pages to find this) and change the value to<br />
<br />
From: Jim Bob <jimbob123@mailserver.org><br />
<br />
Of course, replace Jim Bob with your name and put your proper e-mail address in the <>. While this works, the behavior of alpine with respect to this field is somewhat complex if you want now more use:<br />
<br />
==Built in Help==<br />
<br />
To see built-in help files on just about anything you can type "?", if you have an item highlighted, this will give you help on that item.<br />
<br />
==What else can you configure?==<br />
<br />
Almost anything, in particular you can specify which colors to use, (from the main menu "S" for set up "K" for colors ... should be natural for KDE users), a browser to open external links (this is in the "Config" setup that we've previously been modifying"), an alternate text editor to use, different folder views, etc.<br />
<br />
==Externel Links==<br />
<br />
[http://http://www.washington.edu/alpine/ Official Alpine Page] this page includes links to un-official Alpine pages that have some handy tutorials (argue better than the one I've provided here), hit "C" to open the config menu.</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=Alpine&diff=50447
Alpine
2008-10-01T05:41:30Z
<p>Pseudonomous: /* Introduction */</p>
<hr />
<div>=Alpine: A Console Based E-mail and News Client=<br />
<br />
==Introduction==<br />
<br />
Alpine is based on pine, a text-based E-mail and newsclient that was originally released by the university of Washington in 1991. Right now, this wiki page is just a quick and dirty guide to configuring Alpine to use with a remote mailserver using IMAP.<br />
<br />
==Installation==<br />
<br />
Alpine is a package in Extra with some light dependancies, libldap, heimdal>=1.2, and gettext but you can grab them all with:<br />
<br />
pacman -S alpine<br />
<br />
You might also want to grab something to check your spelling, like:<br />
<br />
pacman -S aspell<br />
<br />
==Configuration for use with IMAP==<br />
<br />
Alpine can be configured directly from the config file in your home folder called ".pinerc", but it's ussaully easier to use the in program configuration tools (which are pretty comprehensive anyway). You can also create a system wide pinerc file if you want to, but that's beyond the scope of this page.<br />
<br />
To start alpine call up a console or a terminal emulator and type, you guessed it:<br />
<br />
alpine<br />
<br />
At the top of your screen you will see various lines you can edit by pressing "C", for "change value" (I've pasted an example in below), you'll probably want<br />
to fill in you name, the name of your mailserver in "User Domain" (although you might have to overide this later, more on<br />
that later), your SMTP server for sending mail and, if you want to, the location of things like your saved message folder<br />
and postponed message folder. <br />
<br />
Some notes on setting up your SMTP server, as you can see below I've specified my mailserver and which port to connect to,<br />
you also need to specify your username on that server (probably your e-mail address) and if you are using some method of incryption ssl or tls note the format:<br />
<br />
mailserver.org:portnumber/user=username/ssl (or tls)<br />
<br />
Also note the format for where I've told Alpine to keep my saved and postponed messages, since I want them stored on the mailserver, and not locally, I've added an entry with form:<br />
<br />
{mailserver.org:portnumber/user=username/ssl}/path/to/folder<br />
<br />
You need to put the full entry you've specified for you SMTP Server into "{}" before the path name to the folder on the mailserver.<br />
<br />
Personal Name = Jim Bob<br />
User Domain = mailserver.org<br />
SMTP Server (for sending) = mailserver.org:465/user=jimbob123/ssl<br />
NNTP Server (for news) = <No Value Set><br />
Inbox Path = <No Value Set: using "inbox"><br />
Incoming Archive Folders = <No Value Set><br />
Pruned Folders = <No Value Set><br />
Default Fcc (File carbon copy) = {mailserver.org:465/user=jimbob123/ssl}~/mail/sent-mail<br />
Default Saved Message Folder = <No Value Set: using "saved-messages"><br />
Postponed Folder = {mailserver.org:465/user=jimbob123/ssl}~/mail/drafts<br />
Read Message Folder = <No Value Set><br />
Form Letter Folder = <No Value Set><br />
Trash Folder = <No Value Set: using "Trash"><br />
Literal Signature = <No Value Set><br />
Signature File = <No Value Set: using ".signature"><br />
Feature List =<br />
<br />
In this day and age, you probably want to set alpine up receive e-mails from another server using imap or pop, to do this we need to enable some things, in particular, check the boxes in the section "Folder Preferences" for "Enable Incoming Folders Collection" and "Enable Incoming Folders Checking". There's a bunch of other fun stuff to configure, but you can come back to that later.<br />
<br />
Now from the main menu type "L" to open "Folder List", then select "Incoming Folders". Now you'll probably see your defualt inbox, which I'm assuming you'll want to leave alone incase you recieve local mail. To add another folder to recieve mail from a remote server type "A" to add a folder.<br />
<br />
Alpine prompts you for "name of server to contain folder", enter your mailserver with the format:<br />
<br />
"mailserver.org:993/user=jimbob123/ssl"<br />
<br />
where mailserver.org is the name of your mailserver, 993 should be replaced by the proper port to connect to, jimbob123 should be replaced by your username (probably your e-mail address) and ssl should be replaced by tls if you are using tls instead of ssl.<br />
<br />
Now it will prompt you for the name of the folder on you mailserver to use, it's probably "INBOX" and if it isn't hopefully<br />
you can find out from your mail provider what it is.<br />
<br />
Then it will ask you for a nickname, type whatever you want to call the folder. At this point you might get prompted for<br />
your password on the mailserver, enter it and you should be able to read e-mail!<br />
<br />
==Setting up Other Imap folders==<br />
<br />
Great, now you can read your INBOX, but what about the REST of your Imap folders? We'll fix that know:<br />
<br />
Type "E" to exit setup and make sure that you save the changes. This should put you back at the main menu type "S" agian to bring up the setup menu, but this time pick "L" for collectionLists.<br />
<br />
Enter your mailserver info below using the format you should be getting used to by now:<br />
<br />
<br />
Nickname : My Mailserver<br />
Server : mailserver.org:993/user=jimbob123/ssl<br />
Path : ~/mail/<br />
View :<br />
<br />
<br />
Fill in the fields above to add a Folder Collection to your<br />
COLLECTION LIST screen.<br />
Use the "^G" command to get help specific to each item, and<br />
use "^X" when finished.<br />
<br />
Note that "Path" is the path on the remote server and you DON'T have to write:<br />
<br />
{mailserver.org:993/user=jimbob123/ssl}~/mail/<br />
<br />
You only need to give the local path on the mailserver (in this case ~/mail/)<br />
<br />
==Setting Up A Proper Return Address==<br />
<br />
If you've followed the steps above you can read and write e-mails, but you're probably not specifying your return address correctly, in fact, you will specify you return address properly if and only if the user name on the host computer which is run alpine is the same as your e-mail address on the mail server. In order to fix this we open setup again (type "M" for main menu, type "S" for setup). Then find "Customized Headers" (either use the "Whereis" command to search, or page down a few pages to find this) and change the value to<br />
<br />
From: Jim Bob <jimbob123@mailserver.org><br />
<br />
Of course, replace Jim Bob with your name and put your proper e-mail address in the <>. While this works, the behavior of alpine with respect to this field is somewhat complex if you want now more use:<br />
<br />
==Built in Help==<br />
<br />
To see built-in help files on just about anything you can type "?", if you have an item highlighted, this will give you help on that item.<br />
<br />
==What else can you configure?==<br />
<br />
Almost anything, in particular you can specify which colors to use, (from the main menu "S" for set up "K" for colors ... should be natural for KDE users), a browser to open external links (this is in the "Config" setup that we've previously been modifying"), an alternate text editor to use, different folder views, etc.<br />
<br />
==Externel Links==<br />
<br />
[http://http://www.washington.edu/alpine/ Official Alpine Page] this page includes links to un-official Alpine pages that have some handy tutorials (argue better than the one I've provided here), hit "C" to open the config menu.</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=Alpine&diff=50446
Alpine
2008-10-01T05:41:04Z
<p>Pseudonomous: /* Alpine: A Console Based E-mail and News Client */</p>
<hr />
<div>=Alpine: A Console Based E-mail and News Client=<br />
<br />
==Introduction==<br />
<br />
Alpine is based on pine, a text-based E-mail and newsclient that was originally released by the university of Washington in 1991. Right now, this wiki page is just a quick and dirty guide to configuring Alpine to use with a remote mailserver using IMAP.<br />
<br />
=+Installation=+<br />
<br />
Alpine is a package in Extra with some light dependancies, libldap, heimdal>=1.2, and gettext but you can grab them all with:<br />
<br />
pacman -S alpine<br />
<br />
You might also want to grab something to check your spelling, like:<br />
<br />
pacman -S aspell<br />
<br />
==Configuration for use with IMAP==<br />
<br />
Alpine can be configured directly from the config file in your home folder called ".pinerc", but it's ussaully easier to use the in program configuration tools (which are pretty comprehensive anyway). You can also create a system wide pinerc file if you want to, but that's beyond the scope of this page.<br />
<br />
To start alpine call up a console or a terminal emulator and type, you guessed it:<br />
<br />
alpine<br />
<br />
At the top of your screen you will see various lines you can edit by pressing "C", for "change value" (I've pasted an example in below), you'll probably want<br />
to fill in you name, the name of your mailserver in "User Domain" (although you might have to overide this later, more on<br />
that later), your SMTP server for sending mail and, if you want to, the location of things like your saved message folder<br />
and postponed message folder. <br />
<br />
Some notes on setting up your SMTP server, as you can see below I've specified my mailserver and which port to connect to,<br />
you also need to specify your username on that server (probably your e-mail address) and if you are using some method of incryption ssl or tls note the format:<br />
<br />
mailserver.org:portnumber/user=username/ssl (or tls)<br />
<br />
Also note the format for where I've told Alpine to keep my saved and postponed messages, since I want them stored on the mailserver, and not locally, I've added an entry with form:<br />
<br />
{mailserver.org:portnumber/user=username/ssl}/path/to/folder<br />
<br />
You need to put the full entry you've specified for you SMTP Server into "{}" before the path name to the folder on the mailserver.<br />
<br />
Personal Name = Jim Bob<br />
User Domain = mailserver.org<br />
SMTP Server (for sending) = mailserver.org:465/user=jimbob123/ssl<br />
NNTP Server (for news) = <No Value Set><br />
Inbox Path = <No Value Set: using "inbox"><br />
Incoming Archive Folders = <No Value Set><br />
Pruned Folders = <No Value Set><br />
Default Fcc (File carbon copy) = {mailserver.org:465/user=jimbob123/ssl}~/mail/sent-mail<br />
Default Saved Message Folder = <No Value Set: using "saved-messages"><br />
Postponed Folder = {mailserver.org:465/user=jimbob123/ssl}~/mail/drafts<br />
Read Message Folder = <No Value Set><br />
Form Letter Folder = <No Value Set><br />
Trash Folder = <No Value Set: using "Trash"><br />
Literal Signature = <No Value Set><br />
Signature File = <No Value Set: using ".signature"><br />
Feature List =<br />
<br />
In this day and age, you probably want to set alpine up receive e-mails from another server using imap or pop, to do this we need to enable some things, in particular, check the boxes in the section "Folder Preferences" for "Enable Incoming Folders Collection" and "Enable Incoming Folders Checking". There's a bunch of other fun stuff to configure, but you can come back to that later.<br />
<br />
Now from the main menu type "L" to open "Folder List", then select "Incoming Folders". Now you'll probably see your defualt inbox, which I'm assuming you'll want to leave alone incase you recieve local mail. To add another folder to recieve mail from a remote server type "A" to add a folder.<br />
<br />
Alpine prompts you for "name of server to contain folder", enter your mailserver with the format:<br />
<br />
"mailserver.org:993/user=jimbob123/ssl"<br />
<br />
where mailserver.org is the name of your mailserver, 993 should be replaced by the proper port to connect to, jimbob123 should be replaced by your username (probably your e-mail address) and ssl should be replaced by tls if you are using tls instead of ssl.<br />
<br />
Now it will prompt you for the name of the folder on you mailserver to use, it's probably "INBOX" and if it isn't hopefully<br />
you can find out from your mail provider what it is.<br />
<br />
Then it will ask you for a nickname, type whatever you want to call the folder. At this point you might get prompted for<br />
your password on the mailserver, enter it and you should be able to read e-mail!<br />
<br />
==Setting up Other Imap folders==<br />
<br />
Great, now you can read your INBOX, but what about the REST of your Imap folders? We'll fix that know:<br />
<br />
Type "E" to exit setup and make sure that you save the changes. This should put you back at the main menu type "S" agian to bring up the setup menu, but this time pick "L" for collectionLists.<br />
<br />
Enter your mailserver info below using the format you should be getting used to by now:<br />
<br />
<br />
Nickname : My Mailserver<br />
Server : mailserver.org:993/user=jimbob123/ssl<br />
Path : ~/mail/<br />
View :<br />
<br />
<br />
Fill in the fields above to add a Folder Collection to your<br />
COLLECTION LIST screen.<br />
Use the "^G" command to get help specific to each item, and<br />
use "^X" when finished.<br />
<br />
Note that "Path" is the path on the remote server and you DON'T have to write:<br />
<br />
{mailserver.org:993/user=jimbob123/ssl}~/mail/<br />
<br />
You only need to give the local path on the mailserver (in this case ~/mail/)<br />
<br />
==Setting Up A Proper Return Address==<br />
<br />
If you've followed the steps above you can read and write e-mails, but you're probably not specifying your return address correctly, in fact, you will specify you return address properly if and only if the user name on the host computer which is run alpine is the same as your e-mail address on the mail server. In order to fix this we open setup again (type "M" for main menu, type "S" for setup). Then find "Customized Headers" (either use the "Whereis" command to search, or page down a few pages to find this) and change the value to<br />
<br />
From: Jim Bob <jimbob123@mailserver.org><br />
<br />
Of course, replace Jim Bob with your name and put your proper e-mail address in the <>. While this works, the behavior of alpine with respect to this field is somewhat complex if you want now more use:<br />
<br />
==Built in Help==<br />
<br />
To see built-in help files on just about anything you can type "?", if you have an item highlighted, this will give you help on that item.<br />
<br />
==What else can you configure?==<br />
<br />
Almost anything, in particular you can specify which colors to use, (from the main menu "S" for set up "K" for colors ... should be natural for KDE users), a browser to open external links (this is in the "Config" setup that we've previously been modifying"), an alternate text editor to use, different folder views, etc.<br />
<br />
==Externel Links==<br />
<br />
[http://http://www.washington.edu/alpine/ Official Alpine Page] this page includes links to un-official Alpine pages that have some handy tutorials (argue better than the one I've provided here), hit "C" to open the config menu.</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=Alpine&diff=50445
Alpine
2008-10-01T05:35:38Z
<p>Pseudonomous: /* Installation */</p>
<hr />
<div>=Alpine: A Console Based E-mail and News Client=<br />
<br />
==Introduction==<br />
<br />
Alpine is based on pine, a text-based E-mail and newsclient that was originally released by the university of Washington in 1991. Right now, this wiki page is just a quick and dirty guide to configuring Alpine to use with a remote mailserver using IMAP.<br />
<br />
=+Installation=+<br />
<br />
Alpine is a package in Extra with some light dependancies, libldap, heimdal>=1.2, and gettext but you can grab them all with:<br />
<br />
pacman -S alpine<br />
<br />
You might also want to grab something to check your spelling, like:<br />
<br />
pacman -S aspell<br />
<br />
==Configuration for use with IMAP==<br />
<br />
Alpine can be configured directly from the config file in your home folder called ".pinerc", but it's ussaully easier to use the in program configuration tools (which are pretty comprehensive anyway). You can also create a system wide pinerc file if you want to, but that's beyond the scope of this page.<br />
<br />
To start alpine call up a console or a terminal emulator and type, you guessed it:<br />
<br />
alpine<br />
<br />
At the top of your screen you will see various lines you can edit by pressing "C", for "change value" (I've pasted an example in below), you'll probably want<br />
to fill in you name, the name of your mailserver in "User Domain" (although you might have to overide this later, more on<br />
that later), your SMTP server for sending mail and, if you want to, the location of things like your saved message folder<br />
and postponed message folder. <br />
<br />
Some notes on setting up your SMTP server, as you can see below I've specified my mailserver and which port to connect to,<br />
you also need to specify your username on that server (probably your e-mail address) and if you are using some method of incryption ssl or tls note the format:<br />
<br />
mailserver.org:portnumber/user=username/ssl (or tls)<br />
<br />
Also note the format for where I've told Alpine to keep my saved and postponed messages, since I want them stored on the mailserver, and not locally, I've added an entry with form:<br />
<br />
{mailserver.org:portnumber/user=username/ssl}/path/to/folder<br />
<br />
You need to put the full entry you've specified for you SMTP Server into "{}" before the path name to the folder on the mailserver.<br />
<br />
Personal Name = Jim Bob<br />
User Domain = mailserver.org<br />
SMTP Server (for sending) = mailserver.org:465/user=jimbob123/ssl<br />
NNTP Server (for news) = <No Value Set><br />
Inbox Path = <No Value Set: using "inbox"><br />
Incoming Archive Folders = <No Value Set><br />
Pruned Folders = <No Value Set><br />
Default Fcc (File carbon copy) = {mailserver.org:465/user=jimbob123/ssl}~/mail/sent-mail<br />
Default Saved Message Folder = <No Value Set: using "saved-messages"><br />
Postponed Folder = {mailserver.org:465/user=jimbob123/ssl}~/mail/drafts<br />
Read Message Folder = <No Value Set><br />
Form Letter Folder = <No Value Set><br />
Trash Folder = <No Value Set: using "Trash"><br />
Literal Signature = <No Value Set><br />
Signature File = <No Value Set: using ".signature"><br />
Feature List =<br />
<br />
In this day and age, you probably want to set alpine up receive e-mails from another server using imap or pop, to do this we need to enable some things, in particular, check the boxes in the section "Folder Preferences" for "Enable Incoming Folders Collection" and "Enable Incoming Folders Checking". There's a bunch of other fun stuff to configure, but you can come back to that later.<br />
<br />
Now from the main menu type "L" to open "Folder List", then select "Incoming Folders". Now you'll probably see your defualt inbox, which I'm assuming you'll want to leave alone incase you recieve local mail. To add another folder to recieve mail from a remote server type "A" to add a folder.<br />
<br />
Alpine prompts you for "name of server to contain folder", enter your mailserver with the format:<br />
<br />
"mailserver.org:993/user=jimbob123/ssl"<br />
<br />
where mailserver.org is the name of your mailserver, 993 should be replaced by the proper port to connect to, jimbob123 should be replaced by your username (probably your e-mail address) and ssl should be replaced by tls if you are using tls instead of ssl.<br />
<br />
Now it will prompt you for the name of the folder on you mailserver to use, it's probably "INBOX" and if it isn't hopefully<br />
you can find out from your mail provider what it is.<br />
<br />
Then it will ask you for a nickname, type whatever you want to call the folder. At this point you might get prompted for<br />
your password on the mailserver, enter it and you should be able to read e-mail!<br />
<br />
==Setting up Other Imap folders==<br />
<br />
Great, now you can read your INBOX, but what about the REST of your Imap folders? We'll fix that know:<br />
<br />
Type "E" to exit setup and make sure that you save the changes. This should put you back at the main menu type "S" agian to bring up the setup menu, but this time pick "L" for collectionLists.<br />
<br />
Enter your mailserver info below using the format you should be getting used to by now:<br />
<br />
<br />
Nickname : My Mailserver<br />
Server : mailserver.org:993/user=jimbob123/ssl<br />
Path : ~/mail/<br />
View :<br />
<br />
<br />
Fill in the fields above to add a Folder Collection to your<br />
COLLECTION LIST screen.<br />
Use the "^G" command to get help specific to each item, and<br />
use "^X" when finished.<br />
<br />
Note that "Path" is the path on the remote server and you DON'T have to write:<br />
<br />
{mailserver.org:993/user=jimbob123/ssl}~/mail/<br />
<br />
You only need to give the local path on the mailserver (in this case ~/mail/)<br />
<br />
==Setting Up A Proper Return Address==<br />
<br />
If you've followed the steps above you can read and write e-mails, but you're probably not specifying your return address correctly, in fact, you will specify you return address properly if and only if the user name on the host computer which is run alpine is the same as your e-mail address on the mail server. In order to fix this we open setup again (type "M" for main menu, type "S" for setup). Then<br />
<br />
==Built in Help==<br />
<br />
To see built-in help files on just about anything you can type "?", if you have an item highlighted, this will give you help on that item.<br />
<br />
<br />
==Externel Links==<br />
<br />
[http://http://www.washington.edu/alpine/ Official Alpine Page] this page includes links to un-official Alpine pages that have some handy tutorials (argue better than the one I've provided here), hit "C" to open the config menu.<br />
<br />
Find "Customized Headers" (either use the "Whereis" command to search, or pagedown a few pages to find this) and change the value to<br />
<br />
From: Jim Bob <jimbob123@mailserver.org><br />
<br />
Of course, replace Jim Bob with your name and put your proper e-mail address in the <>. While this works, the behavior of alpine with respect to this field is somewhat complex if you want now more use:</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=Alpine&diff=50444
Alpine
2008-10-01T05:34:53Z
<p>Pseudonomous: /* Built in Help */</p>
<hr />
<div>=Alpine: A Console Based E-mail and News Client=<br />
<br />
==Introduction==<br />
<br />
Alpine is based on pine, a text-based E-mail and newsclient that was originally released by the university of Washington in 1991. Right now, this wiki page is just a quick and dirty guide to configuring Alpine to use with a remote mailserver using IMAP.<br />
<br />
=Installation=<br />
<br />
Alpine is a package in Extra with some light dependancies, libldap, heimdal>=1.2, and gettext but you can grab them all with:<br />
<br />
pacman -S alpine<br />
<br />
You might also want to grab something to check your spelling, like:<br />
<br />
pacman -S aspell<br />
<br />
==Configuration for use with IMAP==<br />
<br />
Alpine can be configured directly from the config file in your home folder called ".pinerc", but it's ussaully easier to use the in program configuration tools (which are pretty comprehensive anyway). You can also create a system wide pinerc file if you want to, but that's beyond the scope of this page.<br />
<br />
To start alpine call up a console or a terminal emulator and type, you guessed it:<br />
<br />
alpine<br />
<br />
At the top of your screen you will see various lines you can edit by pressing "C", for "change value" (I've pasted an example in below), you'll probably want<br />
to fill in you name, the name of your mailserver in "User Domain" (although you might have to overide this later, more on<br />
that later), your SMTP server for sending mail and, if you want to, the location of things like your saved message folder<br />
and postponed message folder. <br />
<br />
Some notes on setting up your SMTP server, as you can see below I've specified my mailserver and which port to connect to,<br />
you also need to specify your username on that server (probably your e-mail address) and if you are using some method of incryption ssl or tls note the format:<br />
<br />
mailserver.org:portnumber/user=username/ssl (or tls)<br />
<br />
Also note the format for where I've told Alpine to keep my saved and postponed messages, since I want them stored on the mailserver, and not locally, I've added an entry with form:<br />
<br />
{mailserver.org:portnumber/user=username/ssl}/path/to/folder<br />
<br />
You need to put the full entry you've specified for you SMTP Server into "{}" before the path name to the folder on the mailserver.<br />
<br />
Personal Name = Jim Bob<br />
User Domain = mailserver.org<br />
SMTP Server (for sending) = mailserver.org:465/user=jimbob123/ssl<br />
NNTP Server (for news) = <No Value Set><br />
Inbox Path = <No Value Set: using "inbox"><br />
Incoming Archive Folders = <No Value Set><br />
Pruned Folders = <No Value Set><br />
Default Fcc (File carbon copy) = {mailserver.org:465/user=jimbob123/ssl}~/mail/sent-mail<br />
Default Saved Message Folder = <No Value Set: using "saved-messages"><br />
Postponed Folder = {mailserver.org:465/user=jimbob123/ssl}~/mail/drafts<br />
Read Message Folder = <No Value Set><br />
Form Letter Folder = <No Value Set><br />
Trash Folder = <No Value Set: using "Trash"><br />
Literal Signature = <No Value Set><br />
Signature File = <No Value Set: using ".signature"><br />
Feature List =<br />
<br />
In this day and age, you probably want to set alpine up receive e-mails from another server using imap or pop, to do this we need to enable some things, in particular, check the boxes in the section "Folder Preferences" for "Enable Incoming Folders Collection" and "Enable Incoming Folders Checking". There's a bunch of other fun stuff to configure, but you can come back to that later.<br />
<br />
Now from the main menu type "L" to open "Folder List", then select "Incoming Folders". Now you'll probably see your defualt inbox, which I'm assuming you'll want to leave alone incase you recieve local mail. To add another folder to recieve mail from a remote server type "A" to add a folder.<br />
<br />
Alpine prompts you for "name of server to contain folder", enter your mailserver with the format:<br />
<br />
"mailserver.org:993/user=jimbob123/ssl"<br />
<br />
where mailserver.org is the name of your mailserver, 993 should be replaced by the proper port to connect to, jimbob123 should be replaced by your username (probably your e-mail address) and ssl should be replaced by tls if you are using tls instead of ssl.<br />
<br />
Now it will prompt you for the name of the folder on you mailserver to use, it's probably "INBOX" and if it isn't hopefully<br />
you can find out from your mail provider what it is.<br />
<br />
Then it will ask you for a nickname, type whatever you want to call the folder. At this point you might get prompted for<br />
your password on the mailserver, enter it and you should be able to read e-mail!<br />
<br />
==Setting up Other Imap folders==<br />
<br />
Great, now you can read your INBOX, but what about the REST of your Imap folders? We'll fix that know:<br />
<br />
Type "E" to exit setup and make sure that you save the changes. This should put you back at the main menu type "S" agian to bring up the setup menu, but this time pick "L" for collectionLists.<br />
<br />
Enter your mailserver info below using the format you should be getting used to by now:<br />
<br />
<br />
Nickname : My Mailserver<br />
Server : mailserver.org:993/user=jimbob123/ssl<br />
Path : ~/mail/<br />
View :<br />
<br />
<br />
Fill in the fields above to add a Folder Collection to your<br />
COLLECTION LIST screen.<br />
Use the "^G" command to get help specific to each item, and<br />
use "^X" when finished.<br />
<br />
Note that "Path" is the path on the remote server and you DON'T have to write:<br />
<br />
{mailserver.org:993/user=jimbob123/ssl}~/mail/<br />
<br />
You only need to give the local path on the mailserver (in this case ~/mail/)<br />
<br />
==Setting Up A Proper Return Address==<br />
<br />
If you've followed the steps above you can read and write e-mails, but you're probably not specifying your return address correctly, in fact, you will specify you return address properly if and only if the user name on the host computer which is run alpine is the same as your e-mail address on the mail server. In order to fix this we open setup again (type "M" for main menu, type "S" for setup). Then<br />
<br />
==Externel Links==<br />
<br />
[http://http://www.washington.edu/alpine/ Official Alpine Page] this page includes links to un-official Alpine pages that have some handy tutorials (argue better than the one I've provided here), hit "C" to open the config menu.<br />
<br />
Find "Customized Headers" (either use the "Whereis" command to search, or pagedown a few pages to find this) and change the value to<br />
<br />
From: Jim Bob <jimbob123@mailserver.org><br />
<br />
Of course, replace Jim Bob with your name and put your proper e-mail address in the <>. While this works, the behavior of alpine with respect to this field is somewhat complex if you want now more use:<br />
<br />
==Built in Help==<br />
<br />
To see built-in help files on just about anything you can type "?", if you have an item highlighted, this will give you help on that item.</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=Alpine&diff=50443
Alpine
2008-10-01T05:33:25Z
<p>Pseudonomous: New page: =Alpine: A Console Based E-mail and News Client= ==Introduction== Alpine is based on pine, a text-based E-mail and newsclient that was originally released by the university of Washington...</p>
<hr />
<div>=Alpine: A Console Based E-mail and News Client=<br />
<br />
==Introduction==<br />
<br />
Alpine is based on pine, a text-based E-mail and newsclient that was originally released by the university of Washington in 1991. Right now, this wiki page is just a quick and dirty guide to configuring Alpine to use with a remote mailserver using IMAP.<br />
<br />
=Installation=<br />
<br />
Alpine is a package in Extra with some light dependancies, libldap, heimdal>=1.2, and gettext but you can grab them all with:<br />
<br />
pacman -S alpine<br />
<br />
You might also want to grab something to check your spelling, like:<br />
<br />
pacman -S aspell<br />
<br />
==Configuration for use with IMAP==<br />
<br />
Alpine can be configured directly from the config file in your home folder called ".pinerc", but it's ussaully easier to use the in program configuration tools (which are pretty comprehensive anyway). You can also create a system wide pinerc file if you want to, but that's beyond the scope of this page.<br />
<br />
To start alpine call up a console or a terminal emulator and type, you guessed it:<br />
<br />
alpine<br />
<br />
At the top of your screen you will see various lines you can edit by pressing "C", for "change value" (I've pasted an example in below), you'll probably want<br />
to fill in you name, the name of your mailserver in "User Domain" (although you might have to overide this later, more on<br />
that later), your SMTP server for sending mail and, if you want to, the location of things like your saved message folder<br />
and postponed message folder. <br />
<br />
Some notes on setting up your SMTP server, as you can see below I've specified my mailserver and which port to connect to,<br />
you also need to specify your username on that server (probably your e-mail address) and if you are using some method of incryption ssl or tls note the format:<br />
<br />
mailserver.org:portnumber/user=username/ssl (or tls)<br />
<br />
Also note the format for where I've told Alpine to keep my saved and postponed messages, since I want them stored on the mailserver, and not locally, I've added an entry with form:<br />
<br />
{mailserver.org:portnumber/user=username/ssl}/path/to/folder<br />
<br />
You need to put the full entry you've specified for you SMTP Server into "{}" before the path name to the folder on the mailserver.<br />
<br />
Personal Name = Jim Bob<br />
User Domain = mailserver.org<br />
SMTP Server (for sending) = mailserver.org:465/user=jimbob123/ssl<br />
NNTP Server (for news) = <No Value Set><br />
Inbox Path = <No Value Set: using "inbox"><br />
Incoming Archive Folders = <No Value Set><br />
Pruned Folders = <No Value Set><br />
Default Fcc (File carbon copy) = {mailserver.org:465/user=jimbob123/ssl}~/mail/sent-mail<br />
Default Saved Message Folder = <No Value Set: using "saved-messages"><br />
Postponed Folder = {mailserver.org:465/user=jimbob123/ssl}~/mail/drafts<br />
Read Message Folder = <No Value Set><br />
Form Letter Folder = <No Value Set><br />
Trash Folder = <No Value Set: using "Trash"><br />
Literal Signature = <No Value Set><br />
Signature File = <No Value Set: using ".signature"><br />
Feature List =<br />
<br />
In this day and age, you probably want to set alpine up receive e-mails from another server using imap or pop, to do this we need to enable some things, in particular, check the boxes in the section "Folder Preferences" for "Enable Incoming Folders Collection" and "Enable Incoming Folders Checking". There's a bunch of other fun stuff to configure, but you can come back to that later.<br />
<br />
Now from the main menu type "L" to open "Folder List", then select "Incoming Folders". Now you'll probably see your defualt inbox, which I'm assuming you'll want to leave alone incase you recieve local mail. To add another folder to recieve mail from a remote server type "A" to add a folder.<br />
<br />
Alpine prompts you for "name of server to contain folder", enter your mailserver with the format:<br />
<br />
"mailserver.org:993/user=jimbob123/ssl"<br />
<br />
where mailserver.org is the name of your mailserver, 993 should be replaced by the proper port to connect to, jimbob123 should be replaced by your username (probably your e-mail address) and ssl should be replaced by tls if you are using tls instead of ssl.<br />
<br />
Now it will prompt you for the name of the folder on you mailserver to use, it's probably "INBOX" and if it isn't hopefully<br />
you can find out from your mail provider what it is.<br />
<br />
Then it will ask you for a nickname, type whatever you want to call the folder. At this point you might get prompted for<br />
your password on the mailserver, enter it and you should be able to read e-mail!<br />
<br />
==Setting up Other Imap folders==<br />
<br />
Great, now you can read your INBOX, but what about the REST of your Imap folders? We'll fix that know:<br />
<br />
Type "E" to exit setup and make sure that you save the changes. This should put you back at the main menu type "S" agian to bring up the setup menu, but this time pick "L" for collectionLists.<br />
<br />
Enter your mailserver info below using the format you should be getting used to by now:<br />
<br />
<br />
Nickname : My Mailserver<br />
Server : mailserver.org:993/user=jimbob123/ssl<br />
Path : ~/mail/<br />
View :<br />
<br />
<br />
Fill in the fields above to add a Folder Collection to your<br />
COLLECTION LIST screen.<br />
Use the "^G" command to get help specific to each item, and<br />
use "^X" when finished.<br />
<br />
Note that "Path" is the path on the remote server and you DON'T have to write:<br />
<br />
{mailserver.org:993/user=jimbob123/ssl}~/mail/<br />
<br />
You only need to give the local path on the mailserver (in this case ~/mail/)<br />
<br />
==Setting Up A Proper Return Address==<br />
<br />
If you've followed the steps above you can read and write e-mails, but you're probably not specifying your return address correctly, in fact, you will specify you return address properly if and only if the user name on the host computer which is run alpine is the same as your e-mail address on the mail server. In order to fix this we open setup again (type "M" for main menu, type "S" for setup). Then<br />
<br />
==Externel Links==<br />
<br />
[http://http://www.washington.edu/alpine/ Official Alpine Page] this page includes links to un-official Alpine pages that have some handy tutorials (argue better than the one I've provided here), hit "C" to open the config menu.<br />
<br />
Find "Customized Headers" (either use the "Whereis" command to search, or pagedown a few pages to find this) and change the value to<br />
<br />
From: Jim Bob <jimbob123@mailserver.org><br />
<br />
Of course, replace Jim Bob with your name and put your proper e-mail address in the <>. While this works, the behavior of alpine with respect to this field is somewhat complex if you want now more use:<br />
<br />
==Built in Help==</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=Talk:Network_configuration/Wireless&diff=48151
Talk:Network configuration/Wireless
2008-08-24T22:31:21Z
<p>Pseudonomous: </p>
<hr />
<div>It would be good to place a further example for encrypting.<br />
<br />
# /etc/conf.d/wireless<br />
wlan_wlan0="wlan0 essid MyEssid"<br />
#wlan_wlan0="wlan0 essid MyEssid key 625341627"<br />
#wlan_wlan0="wlan0 essid MyEssid key s:masterpassword"<br />
<br />
If you have eth0 as wireless card, you replace wlan0 with eth0<br />
<br />
wlan_et0="eth0 essid MyEssid key s:masterpassword""<br />
<br />
<br />
<br />
----<br />
<br />
I added the section in ndiswrapper about no internet -- this also could be adapted for other sections, or just generalized at the beginning. --[[User:Majikstreet|Majikstreet]] 13:30, 15 September 2006 (PDT)<br />
<br />
----<br />
<br />
I made some changes to the rt2500 driver section, since the newer driver rt2500pci works with wpa supplicant. Somebody could probably clean that section up, and write it better, but I don't really think I know enough to be qualified.</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=Network_configuration/Wireless&diff=48150
Network configuration/Wireless
2008-08-24T22:28:18Z
<p>Pseudonomous: /* RT2500 */</p>
<hr />
<div>[[Category:Communication and network (English)]]<br />
[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Wireless_Setup}}<br />
{{i18n_entry|Italiano|Configurazione_Wireless}}<br />
{{i18n_entry|Nederlands|Draadloze_Configuratie}}<br />
{{i18n_entry|German|Drahtlos_Installation}}<br />
{{i18n_entry|简体中文|无线设置}}<br />
{{i18n_entry|Russian|Wireless_Setup_(Русский)}}<br />
{{i18n_links_end}}<br />
<br />
= Introduction =<br />
<br />
Configuring wireless under Arch Linux (or any distro for that matter) is a two-part process. The first part is to identify and ensure the correct driver for your wireless device is installed, (they are available on the installation media, so make sure you install them) and configure the interface. The second is choosing a method of managing wireless connections. This article covers both parts, and provides additional links to wireless management tools.<br />
<br />
{{Box Note | The wireless drivers and tools are available on the installation media. (Be sure to install the proper driver for your card). Udev will usually load the appropriate module, thereby creating the wireless interface, from the initial live system of the installer, as well as the newly installed system on your hard drive. If you are configuring your wireless functionality after, and not during, Arch installation, simply ensure the required packages are installed with pacman, (driver, firmware if needed, wireless_tools) and follow the guidelines below.}}<br />
<br />
= Part I: Identify your card and appropriate Driver =<br />
<br />
==First steps==<br />
#Check to see whether Linux supports your hardware. You can find out what your card is with 'hwdetect --show-net' or lshwd.<br />
#*zd1201-based card like ZyXEL B-220<br />
#*[http://www.linux-wlan.org/docs/wlan_adapters.html.gz wlan-ng] supports quite a lot of chipsets; check here first.<br />
#*[http://madwifi.org madwifi] for Atheros chipsets (AR5210, AR5211, AR5212 and AR5213)<br />
#*[http://rt2x00.serialmonkey.com/wiki/index.php/Main_Page rt2x00 project] for a unified driver for Ralink's rt2400, rt2500, and rt2570 chipsets (beta).<br />
#*[http://www.ralinktech.com/ralink/Home/Support/Linux.html Ralink Linux Support] for drivers for Ralink chipsets direct from the manufacturer.<br />
#*[http://rt2x00.serialmonkey.com/wiki/index.php/Downloads rt2x00 project] for better-maintained versions of Ralink's own drivers ("legacy drivers" on the site).<br />
#*[http://ipw2100.sourceforge.net/ ipw2100] for Intel Pro/Wireless 2100 Mini PCI<br />
#*[http://ipw2200.sourceforge.net/ ipw2200] for Intel Pro/Wireless 2200 Mini PCI<br />
#*[http://ipw3945.sourceforge.net/ ipw3945] for Intel Pro/Wireless 3945 AB/G Mini PCI-E<br />
#*[http://www.nongnu.org/orinoco/devices/ orinoco] for some Prism 2-based cards<br />
#*[http://prism54.org/ prism54] for Prism 54-based cards<br />
#*[http://bcm43xx.berlios.de/ bcm43xx] for Broadcom 43xx-based cards (old)<br />
#*[http://linuxwireless.org/en/users/Drivers/b43/ b43] for Broadcom 43xx-based cards<br />
#*Check the [http://linux-wless.passys.nl/ Linux Wireless Support] page for your hardware or in The Linux Questions [http://www.linuxquestions.org/hcl/index.php?cat=10 hardware compatibility list] (HCL), which also has a good list of Linux-friendly hardware <br />
#If the hardware is supported only under Windows<br />
#*[http://ndiswrapper.sourceforge.net/wiki/index.php/List ndiswrapper] for hardware supported only under Windows (some Broadcom, 3com, etc)<br />
#*You will need the .inf and .sys files from your Windows driver - [http://ndiswrapper.sourceforge.net/mediawiki/index.php/List check here]<br />
#If your hardware is not listed anywhere<br />
#*Try a web search for the exact model name of your hardware with the word "linux" - and feel free to ask for help on [http://bbs.archlinux.org the forums]<br />
#*There is a chance that your hardware will not function under Linux (however, this is rarely the case)<br />
==How it Works==<br />
The Arch kernel is ''modular'', meaning many of the drivers for machine hardware reside on the hard drive and are available as ''modules''. On bootup, udev takes an inventory of your hardware. Udev will load appropriate modules (drivers) for your corresponding hardware, and the driver, in turn, will allow creation of a kernel ''interface''. <br />
<br />
The interface name for different drivers and chipsets will vary. Some examples are wlan0, eth1, and ath0.<br />
<br />
*Note: Udev is not perfect. If the proper module is not loaded by udev on boot, simply modprobe it and add the module name to etc/rc.conf on the '''MODULES=''' line.<br />
<br />
==Installation==<br />
<br />
===If you have wired internet available===<br />
If you have wired ethernet available, and are simply adding wireless functionality to an existing system, and did not include wireless_tools during initial installation, use pacman to install:<br />
# pacman -S wireless_tools<br />
The drivers' corresponding package names are all highlighted in '''bold''' on this page. The packages can be installed during initial package selection on the Arch installation media and can also be installed later with pacman, e.g.:<br />
# pacman -S madwifi<br />
<br />
===If you have only wireless internet available===<br />
The '''wireless_tools''' package is now available as part of the base system and is also on the live installation media (CD/USB stick image). <br />
<br />
You cannot initialize wireless hardware without these userspace tools, so ensure they are installed from the installer media, (during package selection), especially if you have no other means of networking other than wirelessly. Otherwise, you will be stuck in a recursion when you reboot your newly installed Arch system; you will need wireless_tools and drivers, but in order to get them, you will need wireless_tools and drivers.<br />
*This line intentionally left blank.<br />
<br />
===Wireless Quickstart===<br />
The general procedure will be:<br />
<br />
* Identify your interface and appropriate module:<br />
# hwdetect --show-net<br />
or<br />
# lshwd <br />
* Ensure the module is loaded with <code>lsmod | grep <name_or_part_of_name_of_module></code> e.g.:<br />
# lsmod | grep ath<br />
* Ensure the driver has created a usable interface:<br />
# iwconfig<br />
* Bring the interface up with <code>ifconfig <interface> up</code>. e.g.:<br />
# ifconfig ath0 up<br />
* (Optional) Scan for available access points:<br />
# iwlist ath0 scan | less<br />
* Specify the id of the wireless network with <code>iwconfig <interface> essid <youressid></code>. Or, if using WEP; <code>iwconfig <interface> essid <youressid> key <yourwepkey></code>, e.g.:<br />
# iwconfig ath0 essid linksys key 0241baf34c<br />
* Request an IP address with <code>dhcpcd <interface></code>. e.g.:<br />
# dhcpcd ath0<br />
* Ensure you can route:<br />
$ ping -c 3 www.google.com<br />
Done.<br />
<br />
Refer to [[#Part II: Wireless Management|Part II]] to ensure a permanent configuration solution for your system.<br />
<br />
===Drivers===<br />
====wlan-ng====<br />
Packages: '''wlan-ng26 wlan-ng26-utils'''<br />
<br />
For wlan-ng you do not need the wireless_tools package as mentioned above. Instead you will need to learn the tools in the wlan-ng26-utils package: '''wlancfg and wlanctl-ng'''.<br />
<br />
====rt2870====<br />
See [[Rt2870]]<br />
<br />
====rt2x00====<br />
Unified driver for Ralink chipsets (replaces rt2500,rt61,rt73 etc). Compatible with stable wpa_supplicant using the wext driver interface. This driver is now (as of 2.6.24) part of the mainline kernel, and can be manually loaded as follows...<br />
<pre>modprobe rt2500pci</pre> (replace rt2500pci with your hardware e.g. rt2400pci, rt2500usb, rt61pci, rt73usb)<br />
Some chips require a firmware file.<br />
See the [[Using_the_new_rt2x00_beta_driver|rt2x00 wiki page]].<br />
<br />
====RT2500====<br />
For Ralink's PCI/PCMCIA based rt2500 series chipsets (the first generation of Ralink chips to support 802.11g).<br />
<br />
Package: '''rt2500'''<br />
<br />
Supports standard iwconfig tools for unencrypted and WEP connections, although it can be quite sensitive to the order of commands.<br />
wpa_supplicant is not supported using the standard wext interface. The driver does support WPA (using hardware encryption), but in a non-standard way. The trunk version of wpa_supplicant (0.6.x) appears to include special support for this driver, and it is also possible to negotiate a WPA connection manually using iwpriv commands.<br />
See [http://rt2400.cvs.sourceforge.net/*checkout*/rt2400/source/rt2500/Module/iwpriv_usage.txt these instructions] for details.<br />
The same applies for RT61 and RT73 below.<br />
<br />
As of August 24, 2008, the rt2500pci driver, will work with wpa_supplicant using the wext driver, if you are using the old rt2500 module, you may need to disable it in your rc.conf fileand make sure you are loading the rt2500pci and rt2x00lib and rt2x00pci modules.<br />
<br />
====RT61====<br />
For PCI/PCMCIA cards based on Ralink's later generation of 802.11g chipsets (including those supporting proprietary MIMO modes).<br />
See the [[RT61_Wireless|RT61 wiki page]].<br />
<br />
====RT73====<br />
For USB devices based on Ralink's later generation of 802.11g chipsets (including those supporting proprietary MIMO modes).<br />
See the [[RT73_Wireless|RT73 wiki page]].<br />
<br />
====madwifi====<br />
<br />
Package: '''madwifi'''<br />
<br />
The module is called <tt>ath_pci</tt>. The newer module, ath5k, will eventually phase out ath_pci.<br />
modprobe ath_pci<br />
for the older driver, or:<br />
modprobe ath5k<br />
for the development version. Note that not all cards work with ath5k yet.<br />
<br />
If using ath_pci, you may need to blacklist ath5k by adding it to the MODULES= array in /etc/rc.conf, and subsequently prefixing it with a bang (!):<br />
MODULES=(!ath5k forcedeth snd_intel8x0 ... ...)<br />
<br />
'''Some users may need to use the countrycode option when loading the MadWifi driver in order to use channels and transmit power settings that are legal in their country/region.''' In the Netherlands, for example, you would load the module like this:<br />
<br />
modprobe ath_pci countrycode=528<br />
<br />
You can verify the settings with the <tt>iwlist</tt> command. See <tt>man iwlist</tt> and the [http://madwifi.org/wiki/UserDocs/CountryCode CountryCode page on the MadWifi wiki]. To have this setting automatically applied during boot, add the following to <tt>/etc/modprobe.conf</tt>:<br />
<br />
options ath_pci countrycode=528<br />
<br />
ATTENTION: I had to remove the countrycode option completely or the ath0 device wasn't created (andyrtr, kernel 2.6.21)!<br />
<br />
====ipw2100 and ipw2200====<br />
Depending on which of the chips you have, use either:<br />
<br />
'''ipw2100-fw'''<br />
<br />
or:<br />
<br />
'''ipw2200-fw'''<br />
<br />
If installing after initial Arch installation, you may need to reboot for the firmware to be loaded.<br />
<br />
If at boot up you see that your firmware is not being loaded, then you probably need to add the 'firmware' hook to your /etc/mkinitcpio.conf file and regenerate you kernel image with: <br />
<pre>mkinitcpio -g /boot/kernel26.img</pre><br />
<br />
====iwl3945 and iwl4965====<br />
<br />
Intel's open source [http://intellinuxwireless.org/?p=iwlwifi iwlwifi] driver will work for both the 3945 and 4965 chipsets and is conveniently included with kernel v2.6.24 and up. Simply use the ''firmware'' that corresponds to your chipset: <br />
<br />
# pacman -S iwlwifi-3945-ucode<br />
<br />
or:<br />
<br />
# pacman -S iwlwifi-4965-ucode<br />
<br />
If MOD_AUTOLOAD is set to yes in /etc/rc.conf (it is by default) that should be all that's required. Simply check for the presence of the drivers by running '''''ifconfig''''' from a terminal. There should be a listing for wlan0.<br />
<br />
To manually load the driver at startup, edit <tt>/etc/rc.conf</tt> as root and add '''iwl3945''' or '''iwl4965''' respectively to the MODULES array. For example:<br />
<br />
MODULES=( ... b44 mii '''iwl3945''' snd-mixer-oss ...)<br />
<br />
The drivers should now load after a reboot, and running 'ifconfig' from a terminal should report '''wlan0''' as a new network interface.<br />
<br />
'''Other Notes'''<br />
* The windows NETw4x32 driver can be used with ndiswrapper as an alternative to the iwl3945 and ipw3945 drivers<br />
* In some cases (specifically a [[Dell Latitude D620]] with Arch 2008.06, though it could happen elsewhere) after installation you may have both iwl3945 and ipw3945 in your <tt>MODULES=()</tt> section of rc.conf. The card will not work with both modules loaded, so you will have to ! out the ipw3945 module and then reboot or remove the module manually before you can use your wireless card.<br />
<br />
====ipw3945 (Deprecated Method)====<br />
'''''Note: The ipw3945 driver is no longer actively developed. The iwlwifi driver (described above) should work fine.'''''<br />
<br />
# pacman -S ipw3945 ipw3945-ucode ipw3945d<br />
<br />
To initialize the driver on startup, edit <tt>/etc/rc.conf</tt> as root and add '''ipw3945''' to the MODULES array and '''ipw3945d''' to the DAEMONS array. For example:<br />
<br />
MODULES=(... mii '''ipw3945''' snd-mixer-oss ...)<br />
<br />
DAEMONS=(syslog-ng '''ipw3945d''' network ...)<br />
<br />
'''Note:''' The '''ipw3945d''' daemon ''must'' be inserted BEFORE network and dhcdbd/networkmanager in the array.<br />
<br />
====orinoco====<br />
This should be part of the kernel package and be installed already.<br />
====ndiswrapper====<br />
Ndiswrapper is not a real driver, but you can use it when there are no native Linux drivers for your wireless chips. So it is very useful in some situations. To use it you need the *.inf file from your Windows driver (the *.sys file must also be present in the same directory). If you need to extract these files from an *.exe file, you can use either cabextract or wine. ndiswrapper is included on the installation CD.<br />
<br />
Follow these steps to configure ndiswrapper.<br />
<pre>ndiswrapper -i filename.inf<br />
ndiswrapper -l<br />
ndiswrapper -m<br />
depmod -a</pre><br />
<br />
Now the ndiswrapper install is almost finished; you just have to update /etc/rc.conf to load the module at boot (below is a sample of my config; yours might look slightly different):<br />
<br />
<pre>MODULES=(ndiswrapper snd-intel8x0 !usbserial)</pre><br />
<br />
The important part is making sure that ndiswrapper exists on this line, so just add it alongside the other modules. It would be best to test that ndiswrapper will load now, so:<br />
<br />
<pre>modprobe ndiswrapper<br />
iwconfig</pre><br />
<br />
and wlan0 should exist. Check this page if you're having problems:<br />
[http://ndiswrapper.sourceforge.net/joomla/index.php?/component/option,com_openwiki/Itemid,33/id,installation/ Ndiswrapper installation wiki].<br />
<br />
====prism54====<br />
Download the firmware driver for your appropriate card from [http://www.prism54.org/ this site]. Rename the firmware file to 'isl3890'.<br />
If nonexistent, create the directory /lib/firmware and place the file 'isl3890' in it. This should do the trick. ([http://bbs.archlinux.org/viewtopic.php?t=16569&start=0&postdays=0&postorder=asc&highlight=siocsifflags+such+file++directory forum source])<br />
<br />
====ACX100/111====<br />
packages: tiacx tiacx-firmware<br />
<br />
The driver should tell you which firmware it needs; check /var/log/messages.log or use the dmesg command. Move the appropriate firmware to '/lib/firmware'. I did this:<br />
ln -s /usr/share/tiacx/acx111_2.3.1.31/tiacx111c16 /lib/firmware<br />
<br />
Hint: If you find that the driver is spamming your kernel log, for example because you're running Kismet with channel-hopping, you could put this in /etc/modprobe.conf:<br />
options acx debug=0<br />
<br />
====BCM43XX====<br />
Broadcom users that have 43xx series chipsets have a new alternative to ndiswrapper. In kernel version 2.6.17, the bcm43xx driver was introduced.<br />
<br />
#Run <pre>iwconfig</pre> or <pre>hwd -s</pre> to determine that you have an appropriate card. My output of hwd -s looked like this: <pre>Network : Broadcom Corp.|BCM94306 802.11g NIC module: unknown</pre><br />
For a list of supported devices, see [http://bcm43xx.berlios.de/?go=devices here].<br />
#Run <pre>pacman -Sy bcm43xx-fwcutter</pre> to install the firmware cutter application.<br />
#Download the Windows driver file for your card from which to extract the firmware.<br />
#If you download the driver from Dell's website, you must run in on a Windows machine or under WINE (it is a .exe file that extracts itself to C:\Dell\[driver numbers]). Or you may try [http://downloads.openwrt.org/sources/wl_apsta-3.130.20.0.o], [http://freewebs.com/ronserver/bcm43xx.tar.gz] or [http://xeve.de/down/wl_apsta.o]. I just saved this file to my desktop; you won't need it after the next step.<br />
#Run <pre>bcm43xx-fwcutter -w /lib/firmware /home/&lt;user&gt;/Desktop/wl_apsta.o</pre> You may have to create /lib/firmware first.<br />
#Restart, and configure your device as normal. You may want to add bcm43xx into the modules section of your rc.conf file. Good luck!<br />
<br />
====b43====<br />
This driver is the successor to the bcm43xx driver, and is included in kernel 2.6.24.<br />
<br />
#Run <pre>lspci</pre> to determine that you have an appropriate card. My output of looked like this: <pre>0c:00.0 Network controller: Broadcom Corporation BCM4311 802.11b/g WLAN (rev 01)</pre><br />
For a list of supported devices, see [http://linuxwireless.org/en/users/Drivers/b43/devices here].<br />
#Install the firmware cutter application from core. It is named b43-fwcutter. <br />
#Because now in core we have kernel >=2.6.25 we download version 4.150.10.5 of Broadcom's proprietary driver. The older version(4.80.53.0) will be drop in july. <pre>wget http://mirror2.openwrt.org/sources/broadcom-wl-4.150.10.5.tar.bz2</pre><br />
#Unpack the compressed file.<pre>tar xjf broadcom-wl-4.150.10.5.tar.bz2</pre><br />
#Change the current directory to the newly created directory, and then further to the driver folder: <pre>cd broadcom-wl-4.150.10.5/driver</pre><br />
#Create /lib/firmware if you don't have and then Run <pre>b43-fwcutter -w "/lib/firmware/" wl_apsta_mimo.o</pre> <br />
#Restart, and configure your device as normal. You may want to add b43 into the modules section of your rc.conf file. <br />
<pre>MODULES=(...b43 !bcm43xx...)</pre><br />
Good luck!<br />
<br />
====rtl8187====<br />
See the [[Rtl8187_wireless|rtl8187 wiki page]].<br />
<br />
====zd1211rw====<br />
[http://zd1211.wiki.sourceforge.net/ zd1211rw] is a driver for the ZyDAS ZD1211 802.11b/g USB WLAN chipset and it is included in recent versions of the Linux kernel. See [http://www.linuxwireless.org/en/users/Drivers/zd1211rw/devices] for a list of supported devices. You only need to install the firmware for the device: <pre>pacman -Sy zd1211-firmware</pre><br />
<br />
==Test Installation==<br />
After loading your driver run<br />
iwconfig<br />
and see if a wireless interface (wlanX, ethX, athX) is recognized<br />
<br />
= Part II: Wireless Management =<br />
Assuming that your drivers are installed and working properly, you will need to choose a method for managing your wireless connections. The following subsections will help you decide the best way to do just that.<br />
<br />
== Arch-based wireless management ==<br />
Arch Linux provides several solutions for managing wireless connections. Choosing the best method depends on your individual needs.<br />
<br />
===netcfg===<br />
netcfg provides a versatile, robust solution to networking on Arch. It uses a profile based setup and is capable of detection and connection to a wide range of network types. <br />
<br />
Documentation: [[Network Profiles]]<br />
<br />
Development version: [[Network Profiles development]]<br />
<br />
==='''/etc/rc.conf'''===<br />
* The '''/etc/rc.conf''' file is sourced by the network script. Therefore, you may define and configure a simple wireless setup within /etc/rc.conf for a centralized approach with '''wlan_<interface>="<interface> essid <essid>"''' and '''INTERFACES=(<interface1> <interface2>)'''<br />
<br />
For example:<br />
# /etc/rc.conf<br />
eth0="dhcp"<br />
wlan0="dhcp"<br />
wlan_wlan0="wlan0 essid MyEssid" # Unencrypted<br />
#wlan_wlan0="wlan0 essid MyEssid key 1234567890" # hex WEP key<br />
#wlan_wlan0="wlan0 essid MyEssid key s:asciikey" # ascii WEP key<br />
INTERFACES=(eth0 wlan0)<br />
(Not all wireless cards are wlan0. Determine your wireless interface with ifconfig -a. <br />
<br />
Atheros-based cards, for example, are typically ath0, so change wlan_wlan0 to:<br />
wlan_ath0="ath0 essid MyEssid key 12345678" <br />
Also define ath0 in the INTERFACES= line.)<br />
<br />
* Alternatively, you may define wlan_<interface> within /etc/conf.d/wireless, (which is also sourced by the network script), for a de-centralized approach: <br />
# /etc/conf.d/wireless<br />
wlan_wlan0="wlan0 essid MyEssid"<br />
<br />
== wireless_tools ==<br />
These powerful userspace console tools work extremely well and allow complete, manual control from the shell. These examples assume your wireless device is wlan0. Replace wlan0 with the appropriate device name.<br />
Many cards require that the kernel interface be activated before you can use the wireless_tools:<br />
# ifconfig wlan0 up<br />
See what access points are available:<br />
# iwlist wlan0 scan<br />
Using the scan results, tell your wireless device which access point to use. For example:<br />
# iwconfig wlan0 essid linksys<br />
Then, setup the network interface as usual. Simple examples are:<br />
# dhcpcd wlan0<br />
for DHCP, or<br />
# ifconfig wlan0 192.168.0.2<br />
# route add default gw 192.168.0.1<br />
for static IP.<br />
<br />
== Third-party wireless management ==<br />
There are a number of wireless management solutions available to Arch Linux users as an alternative to the above scripts.<br />
===Wicd===<br />
Wicd is a network manager that can handle both wireless and wired connections. It is written in Python and Gtk with fewer dependencies than NetworkManager, making it an ideal solution for lightweight desktop users. Wicd is now available in the extra repository for both i686 and x86_64.<br />
<br />
For more information, see the [[Wicd]] wiki.<br />
===NetworkManager===<br />
NetworkManager is an advanced network management tool that is enabled by default in most popular Linux distributions. In addition to managing wired connections, NetworkManager provides worry-free wireless roaming with an easy-to-use GUI program for selecting your desired network. <br />
<br />
For more information, see the [[NetworkManager]] wiki.<br />
<br />
===Wifi Radar===<br />
WiFi Radar is Python/PyGTK2 utility for managing wireless profiles (and ''only'' wireless). It enables you to scan for available networks and create profiles for your preferred networks.<br />
<br />
For more information, see the [[Wifi Radar]] wiki.<br />
<br />
===Wlassistant===<br />
Wlassistant is a very intuitive and straightforward GUI app for managing your wireless connections. <br />
<br />
Install with:<br />
# pacman -S wlassistant<br />
Wlassistant must be run with root privileges:<br />
# sudo wlassistant<br />
One method of using wlassistant is to configure your wireless card within /etc/rc.conf, specifying the access point you use most often. On startup, your card will automatically be configured for this essid, but if other wireless networks are needed/available, wlassistant can then be invoked to access them. Background the network daemon in /etc/rc.conf, by prefixing it with a @, to avoid boot delays.<br />
<br />
= Additional Resources =<br />
*[http://www.gnome.org/projects/NetworkManager/ NetworkManager] - The official website for NetworkManager<br />
*[http://wicd.sourceforge.net/ WICD] - The official website for WICD<br />
*[http://wifi-radar.systemimager.org/ Wifi Radar] - The official website for Wifi Radar<br />
*[http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Wireless.html An overly wordy howto that rarely helps]<br />
*[http://madwifi.org/wiki/UserDocs/FirstTimeHowTo The madwifi project's method of installing, good if you're having trouble doing it the Arch way]</div>
Pseudonomous
https://wiki.archlinux.org/index.php?title=Newcomers_Guide&diff=47434
Newcomers Guide
2008-08-10T21:58:47Z
<p>Pseudonomous: /* Useful DAEMONS */</p>
<hr />
<div>[[Category:Getting and installing Arch (English)]]<br />
[[Category:About Arch (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{Article summary start}}<br />
{{Article summary text|Provides a highly detailed, explanatory guide to installing and configuring a full-featured Arch Linux system.}}<br />
{{Article summary heading|Available Languages}}<br />
{{i18n_entry|Dansk|Dansk_Begynderguide}}<br />
{{i18n_entry|简体中文|Beginners Guide 新手指南}}<br />
{{i18n_entry|正體中文|Beginner's Guide 新手指南}}<br />
{{i18n_entry|Deutsch|Beginners Guide (Deutsch)}}<br />
{{i18n_entry|English|Beginners Guide}}<br />
{{i18n_entry|Español|Guía para Principiantes (Español)}}<br />
{{i18n_entry|Français|Manuel_du_Débutant_(Français)}}<br />
{{i18n_entry|Česky|Průvodce začátečníka (Česky)}}<br />
{{i18n_entry|Italiano|Beginners Guide (Italiano)}}<br />
{{i18n_entry|Lietuviškai|Pradedančiųjų gidas (Lietuviškai)}}<br />
{{i18n_entry|Português Brasil|Guia do Iniciante(Português do Brasil)}}<br />
{{i18n_entry|Türkçe|Başlangıç Rehberi (Türkçe)}}<br />
{{Article summary heading|Related articles}}<br />
{{Article summary wiki|Official Arch Linux Install Guide}} (provides a more general approach)<br />
{{Article summary end}}<br />
==Preface==<br />
<br />
=====Everything you ever wanted to know about installing Arch, but were afraid to ask=====<br />
Welcome. This document will guide you through the process of installing and configuring [[ArchLinux|Arch Linux]]; a simple, agile and lightweight GNU/Linux distribution, <code>UNIX</code>-like operating system. Arch Linux requires a certain level of intimate knowledge of its configuration and of <code>UNIX</code>-like system methodology and for this reason, extra explanatory information is included. It is aimed at new Arch users, but strives to serve as a strong reference and informative base for all. <br />
<br />
Since GNU/Linux Distributions are fundamentally 'modular' by design, the article is logically divided into 3 main components of a desktop <code>UNIX</code>-like operating system:<br />
<br />
'''[[#Part I: Install the Base System|Part I: Installing the Base system]]'''<br />
<br />
'''[[#Part II: Install X and configure ALSA|Part II: Installing X and configuring ALSA]]'''<br />
<br />
'''[[#Part III: Installing and configuring a Desktop Environment|Part III: Installing a Desktop Environment]]'''<br />
<br />
=====DON'T PANIC!=====<br />
The Arch Linux system is assembled by the ''user'', from the shell, using basic command line tools. This is '''[[The Arch Way]].''' Unlike the more rigid structures of other distributions and installers, there are no default environments nor configurations chosen for you. From the command line, ''you'' will add packages from the Arch repositories using the [[pacman]] tool via your internet connection and manually configure your installation until your system is customized to your requirements. This method allows for maximum flexibility, choice, and system resource control ''from the base up''.<br />
<br />
Arch Linux is aimed at GNU/Linux users who desire minimal 'code separation' from their machine.<br />
<br />
=====[[The Arch Way]]=====<br />
<br />
'''''The design principles behind Arch are aimed at keeping it [[The Arch Way|simple]].'' '''<br />
<br />
'Simple', in this context, shall mean 'without unnecessary additions, modifications, or complications'. In short; an elegant, minimalist approach.<br />
<br />
'''Some thoughts to keep in mind:'''<br />
<br />
*''" 'Simple' is defined from a technical standpoint, not a usability standpoint. It is better to be technically elegant with a higher learning curve, than to be easy to use and technically [inferior]." -Aaron Griffin''<br />
<br />
*''Entia non sunt multiplicanda praeter necessitatem'' or "Entities should not be multiplied unnecessarily." -Occam's razor. The term ''razor'' refers to the act of shaving away unnecessary complications to arrive at the simplest explanation, method or theory.<br />
<br />
*''"The extraordinary part of [my method] lies in its simplicity..I always believe that the simple way is the right way."'' - Bruce Lee<br />
<br />
{{Box Note |'''Following this guide closely is essential in order to successfully install a properly configured Arch Linux system, so ''please'' read it thoroughly.'''}}<br />
* You may wish to make a print out of this guide which will serve as a useful Arch Linux user reference. Simply click on the 'Printable Version' tab in the toolbox on the top-left.<br />
*''If you would like to add to this wiki, please include the "Why" as well as the "How", where appropriate. The best documentation teaches us how, as well as why!''<br />
* The Arch wiki is an excellent resource and should be consulted for issues [http://wiki.archlinux.org/index.php/Main_Page first]; IRC (freenode #archlinux), and the [http://bbs.archlinux.org/ forums] are also available if the answer cannot be found.<br />
----<br />
Welcome to Arch! Now, let's get started.<br />
<br />
==Part I: Install the Base System==<br />
<br />
===Obtain the latest Installation media ===<br />
<br />
You can obtain Arch's latest installation media from [http://archlinux.org/download/ here].<br />
<br />
*Both the Core installer and the FTP/HTTP-downloads provide only the necessary packages to create an '''Arch Linux base system'''. ''Note that the Base System does not include a GUI. It is mainly comprised of the GNU toolchain, (compiler, assembler, linker, libraries, shell, and a few useful utilities) the Linux kernel, and a few extra libraries and modules.'' <br />
*Expanding your Arch Linux system beyond the base system, to include extra software, a Graphical User Interface, etc., is achieved from the command line, ''by the user'', via the pacman package manager to grab i686/x86-64 binary packages. The process is covered in detail below.<br />
====CD installer====<br />
Burn the .iso to a CD with your favorite burner, and continue with [[#Boot Arch Linux Installer | Boot Arch Linux Installer]]<br />
{{Box Note| Generally, using a maximum speed of no more than 8x is recommended for reliable burns, and some users recommend speeds '''''as low as 4x or 2x!''''' If you are experiencing unexpected behavior from the CD, try burning at the minimum speed supported by your system.}}<br />
<br />
====USB stick====<br />
Insert an empty or expendable USB stick, determine its path, and dd the .img to the USB stick like so:<br />
dd if=archlinux-2008.06-[core_or_ftp]-i686.img of=/dev/sd''x''<br />
where ''if='' is the path to the img file and ''of='' is your USB device. Make sure to use /dev/sd''x'' and not /dev/sd''x1''.<br />
<br />
<font color="red">'''WARNING''': This will destroy all data on your USB stick.</font><br />
<br />
Continue with [[#Boot Arch Linux Installer | Boot Arch Linux Installer]]<br />
<br />
===Boot Arch Linux Installer===<br />
As you follow these directions, you may find the [[Official Arch Linux Install Guide]] helpful as well. <br />
<br />
Insert the CD or USB stick and boot from it. You may have to <br />
change the boot order in your computer BIOS or press a key (usually DEL, F1, F2, F11 or F12) during the BIOS POST phase.<br />
<br />
Memory requirements:<br />
<br />
* CORE : 160 MB RAM x86_64/i686 (all packages selected, with swap partition)<br />
* FTP : 160 MB RAM x86_64/i686 (all packages selected, with swap partition)<br />
<br />
Choose Boot Archlive or Boot Archlive [legacy IDE] if you have trouble with libata/PATA. <br />
<br />
To change boot options press '''e''' for editing the boot lines. Many users may wish to change the resolution of the framebuffer, for more readable console output. Append:<br />
vga=773<br />
to the kernel line, followed by <ENTER>, for a 1024x768 framebuffer. Hit '''b''' to boot.<br />
<br />
The system will now boot and present a login prompt.<br />
<br />
===Login and Changing the keymap===<br />
Login as 'root'. If you have a non-US keyboard layout do:<br />
km<br />
at the prompt, and choose your keymap/console font.<br />
<br />
That's right, the ever-popular '''km''' program is back as of 2008-06!<br />
<br />
===Documentation===<br />
The guide you are now reading is available on the live system. Change to vc/2 with <ALT>+F2 and do:<br />
less /arch/beginnersguide.txt<br />
'''Less''' will allow you to page through the document. Change back to vc/1 with <ALT>+F1. <br />
<br />
Change back to vc/2 if you need to reference the Beginners' Guide at any time.<br />
<br />
===Start the Installation===<br />
As root, run the installer script from vc/1:<br />
/arch/setup <br />
<br />
====Select an installation source====<br />
After a welcome screen, you will be prompted for an installation source. Choose the appropriate source for the installer you are using. <br />
* If you chose the CORE installer, continue below with [[#Prepare Hard Drive|Prepare Hard Drive]].<br />
* FTP/HTTP only: You shall be prompted to load ethernet drivers manually, if desired. Udev is quite effective at loading the required modules, so you may assume it has already done so. You may verify this by invoking ifconfig -a from vc/3. (Select OK to continue.)<br />
<br />
===Configure Network (FTP/HTTP)===<br />
Available Interfaces will be presented. If an interface and HWaddr is listed, then your module has already been loaded. If your interface is not listed, you may probe it from the installer, or manually do so from another virtual console.<br />
<br />
The following screen will prompt you to ''Select the interface, Probe,'' or ''Cancel''. Choose the appropriate interface and continue.<br />
<br />
The installer will then ask if you wish to use DHCP. Choosing Yes will run '''dhcpcd''' to discover an available gateway and request an IP address; Choosing No will prompt you for your static IP, netmask, broadcast, gateway DNS IP, HTTP proxy, and FTP proxy. Lastly, you will be presented with an overview to ensure your entries are correct.<br />
<br />
====Wireless Quickstart (If you need wireless connectivity during the installation process)====<br />
<br />
The wireless drivers and utilities are now available to you in the live environment of the installation media. <br />
<br />
If you need wireless functionality from the initial installation (live installer environment) onwards, the basic procedure will be:<br />
* Switch to a free virtual console, e.g.: <ALT>+F3<br />
* Identify your wireless card and appropriate module:<br />
hwdetect --show-net<br />
* Ensure udev has loaded the module:<br />
lsmod | grep <name_of_module><br />
* If not, probe it:<br />
modprobe <name_of_module><br />
* Ensure the driver has created a usable wireless kernel interface:<br />
iwconfig<br />
(Output should show an available wireless interface)<br />
* Bring the interface up with <code>ifconfig <interface> up</code>. <br />
<br />
An example, using an atheros card and madwifi driver:<br />
ifconfig ath0 up<br />
(Remember, your interface may be named something else, depending on your module (driver) and chipset: wlan0, eth1, etc.)<br />
* Specify the id of the wireless network with iwconfig <interface> essid <youressid> key <yourwepkey>, e.g.:<br />
iwconfig ath0 essid linksys key 0241baf34c<br />
* Acquire an IP address with dhcpcd <interface>. e.g.:<br />
dhcpcd ath0<br />
* Ensure you can route:<br />
ping -c 3 www.google.com<br />
Done.<br />
<br />
After the initial Arch installation is complete, you may wish to refer to [[Wireless Setup]] to ensure a permanent configuration solution for your system.<br />
<br />
<br />
Return to vc/1 with <ALT>+F1. Continue with [[#Prepare Hard Drive|Prepare Hard Drive]]<br />
<br />
===Prepare Hard Drive===<br />
<font color="red"> '''WARNING:''' '''''Partitioning hard drives can destroy data. You are strongly cautioned and advised to backup your critical data if applicable.'''''</font><br />
<br />
Select the first menu entry "Prepare Hard Drive". <br />
* Option 1: Auto Prepare<br />
Auto-Prepare divides your disk into the following configuration:<br />
<br />
* ext2 /boot partition, default size 32MB. ''You will be prompted to modify the size to you requirement.''<br />
* swap partition, default size 256MB. ''You will be prompted to modify the size to you requirement.'' <br />
* A Separate / and /home partition, (sizes can also be specified). You may choose from ext2, ext3, reiserfs, xfs and jfs, but note that ''both / and /home must share the same fs type'' if choosing the Auto Prepare option.<br />
<br />
Be warned that Auto-prepare will completely erase the chosen hard drive. Read the <font color="red">warning</font> presented by the installer very carefully, and make sure the correct device is about to be partitioned.<br />
<br />
* Option 2: '''(Recommended)''' Partition Hard Drives (with cfdisk)<br />
<br />
This option will allow for the most robust and customized partitioning solution for your personal needs. <br />
<br />
''At this point, more advanced GNU/Linux users who are familiar and comfortable with manually partitioning may wish to skip down to '''[[#Select Packages|Select Packages]]''' below.''<br />
<br />
====Partition Hard Drives====<br />
<br />
=====Partition Info=====<br />
<br />
Partitioning a hard disk drive defines specific areas (the partitions) within the disk, that will each appear and behave as a separate disk and upon which a filesystem may be created (formatted). There exist 3 types of disk partitions: '''Primary, Extended, and Logical.''' <br />
<br />
'''Primary''' partitions can be bootable, and are limited to 4. If a partitioning scheme requires more than 4 partitions, we are forced to use an '''extended''' partition which will contain '''logical''' partitions.<br />
<br />
Extended partitions are not usable by themselves; they are merely a "container" for logical partitions. If required, a hard disk shall contain only one extended partition; which shall then be sub-divided into logical partitions. <br />
<br />
When partitioning a disk, one can observe this numbering scheme by creating primary partitions sda1-3 followed by creating an extended partition, sda4, and subsequently creating logical partition(s) within the extended partition; sda5, sda6, and so on.<br />
<br />
=====Swap Partition=====<br />
A swap partition is a place on your hard drive where virtual ram resides, allowing the kernel to easily use disk storage for data that does not fit into physical RAM. <br />
<br />
Historically, the general rule for swap partition size was 2x the amount of physical RAM. Over time, as computers have gained ever larger memory capacities, this rule has become increasingly deprecated. Generally, on machines with up to 512MB RAM, the 2x rule is usually quite sufficient. On machines with 1GB RAM, generally a 1x rule is adequate. If you have gratuitous amounts of RAM (more than 1024 MB) it may be possible to completely forgo a swap partition altogether, though this is not recommended. We will create a 1 GB swap partition in this example.<br />
{{Box Note|If you plan on using suspend-to-disk, (hibernate) you must have a swap partition at least '''equal''' in size to the amount of physical RAM, and some Arch users even recommend oversizing it beyond the amount of physical RAM by 10-15%, to allow for possible bad sectors.}}<br />
<br />
=====Partition Scheme=====<br />
A disk partitioning scheme is a very personalized preference. Each user's choices will be unique to their own computing habits and requirements. Filesystem candidates for separate partitions include:<br />
<br />
'''/''' (root) ''The root filesystem is the primary filesystem from which all other filesystems stem; the top of the hierarchy. All files and directories appear under the root directory "/", even if they are stored on different physical devices. The contents of the root filesystem must be adequate to boot, restore, recover, and/or repair the system.'' <br />
<br />
'''/boot''' ''This directory contains the kernel and ramdisk images as well as the bootloader configuration file, and bootloader stages. /boot also stores data that is used before the kernel begins executing userspace programs. This may include saved master boot sectors and sector map files.''<br />
<br />
'''/home''' ''User data and user specific configuration files for applications are stored in each user's home directory in a file that starts with the '.' character (a "dot file").''<br />
<br />
'''/usr''' ''While root is the primary filesystem, /usr is the secondary hierarchy, for user data, containing the majority of (multi-)user utilities and applications. /usr is shareable, read-only data. This means that /usr shall be shareable between various hosts and must not be written to, except in the case of system update/upgrade. Any information that is host-specific or varies with time is stored elsewhere.''<br />
<br />
'''/tmp''' ''directory for programs that require temporary files''<br />
<br />
'''/var''' ''contains variable data; spool directories and files, administrative and logging data, pacman's cache, the ABS tree, etc.''<br />
<br />
There are several reasons for using separate filesystems, rather than combining everything into one:<br />
<br />
* Security: Filesystems may be configured as 'nosuid', 'nodev', 'noexec', 'readonly', etc. (This is specified in /etc/fstab).<br />
* Stability: A user, or a misbehaved program, can completely fill a filesystem with garbage if they have write permissions for it. Critical programs, which reside on a different filesystem, do not get interrupted.<br />
* Speed: A filesystem which gets written to frequently may become somewhat fragmented. (An effective method of avoiding fragmentation is to ensure that each filesystem is never in danger of filling up completely.) Separate filesystems remain unaffected, and each can be defragmented separately as well.<br />
* Integrity: If one filesystem becomes corrupted, separate filesystems remain unaffected.<br />
* Versatility: Sharing data across several systems becomes more expedient when independent filesystems are used. Separate filesystem types may also be chosen based upon the nature of data and usage. <br />
In this recommended example, we shall use separate partitions for /, /var, /home, and a swap partition. <br />
<br />
{{Box Note | /var contains many small files. You may wish to take this into consideration when choosing a filesystem type for it.}}<br />
<br />
=====How big should my partitions be?=====<br />
This question is best answered based upon individual needs. If you have little or no experience with partitioning, you may wish to simply create one partition for root, and one partition for swap. Or, follow the recommended example closely, and consider these guidelines to provide a frame of reference:<br />
* The root filesystem (/) in the example will contain the /usr directory, which can become moderately large, depending upon how much software is installed.<br />
<br />
* The /var filesystem will contain, among other data, the pacman cache. Keeping cached packages is useful and versatile; it provides the ability to downgrade packages if needed. The cache can grow large over long periods of time, but can be safely cleared if needed.<br />
* The /home filesystem is typically where user data, downloads, and multimedia reside, typically resulting in the largest filesystem on the drive by a large margin. <br />
* An extra 25% of space added to each filesystem will provide a cushion for unforeseen occurrence, expansion, and serve as a preventive against fragmentation.<br />
From the guidelines above, the example system shall contain a ~12GB root (/) partition, ~6GB /var, 1GB swap, and a /home containing the remaining disk space.<br />
<br />
=====cfdisk=====<br />
Start by creating the primary partition that will contain the '''root''', (/) filesystem. <br />
<br />
Choose '''N'''ew -> Primary and enter the desired size for root (/). Put the partition at the beginning of the disk. <br />
<br />
Also choose the '''T'''ype by designating it as '83 Linux'. The created / partition shall appear as sda1 in our example.<br />
<br />
Now create a primary partition for /var, designating it as '''T'''ype 83 Linux. The created /var partition shall appear as sda2 <br />
<br />
Next, create a partition for swap. Select an appropriate size and specify the '''T'''ype as 82 (Linux swap / Solaris). The created swap partition shall appear as sda3.<br />
<br />
Lastly, create a partition for your /home directory. Choose another primary partition and set the desired size.<br />
<br />
Likewise, select the '''T'''ype as 83 Linux. The created /home partition shall appear as sda4.<br />
<br />
Example:<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-------------------------------------------------------------------------<br />
sda1 Primary Linux 12440 #root<br />
sda2 Primary Linux 6256 #/var<br />
sda3 Primary Linux swap / Solaris 1024 #swap<br />
sda4 Primary Linux 140480 #/home<br />
<br />
Choose '''W'''rite and type ''''yes''''. Beware that this operation may destroy data on your disk. Choose '''Q'''uit to leave the partitioner. <br />
Choose Done to leave this menu and continue with "Set Filesystem Mountpoints".<br />
<br />
{{Box Note | Since the latest developments of the Linux kernel which include the libata and PATA modules, all IDE, SATA and SCSI drives have adopted the sd''x'' naming scheme. This is perfectly normal and should not be a concern.}}<br />
<br />
====Set Filesystem Mountpoints====<br />
First you will be asked for your swap partition. Choose the appropriate partition (sda3 in this example). You will be asked if you want to create a swap filesystem; select yes. Next, choose where to mount the / (root) directory (sda1 in the example). At this time, you will be asked to specify the filesystem type.<br />
<br />
=====Filesystem Types=====<br />
<br />
Again, a filesystem type is a very subjective matter which comes down to personal preference. Each has its own advantages, disadvantages, and unique idiosyncrasies. Here is a very brief overview of supported filesystems:<br />
<br />
1. '''ext2''' ''Second Extended Filesystem''- Old, reliable GNU/Linux filesystem. Very stable, but ''without journaling support''. May be inconvenient for root (/) and /home, due to very long fsck's. ''An ext2 filesystem can easily be converted to ext3.'' Generally regarded as a good choice for /boot/.<br />
<br />
2. '''ext3''' ''Third Extended Filesystem''- Essentially the ext2 system, but with journaling support. ext3 is completely compatible with ext2. ''Extremely'' stable, mature, and by far the most widely used, supported and developed GNU/Linux FS.<br />
<br />
'''High Performance Filesystems:'''<br />
<br />
3. '''ReiserFS''' - Hans Reiser's high-performance journaling FS uses a very interesting method of data throughput based on an unconventional and creative algorithm. ReiserFS is touted as very fast, especially when dealing with many small files. ReiserFS is fast at formatting, yet comparatively slow at mounting. Quite mature and stable. ReiserFS is not actively developed at this time (Reiser4 is the new Reiser filesystem). Generally regarded as a good choice for /var/.<br />
<br />
4. '''JFS''' - IBM's '''J'''ournaled '''F'''ile'''S'''ystem- The first filesystem to offer journaling. JFS had many years of use in the IBM AIX® OS before being ported to Linux. JFS currently uses the least CPU resources of any GNU/Linux filesystem. Very fast at formatting, mounting and fsck's, and very good all-around performance, especially in conjunction with the deadline I/O scheduler. (See [[JFS]].) Not as widely supported as ext or ReiserFS, but very mature and stable.<br />
<br />
5. '''XFS''' - Another early journaling filesystem originally developed by Silicon Graphics for the IRIX OS and ported to Linux. XFS offers very fast throughput on large files and large filesystems. Very fast at formatting and mounting. Generally benchmarked as slower with many small files, in comparison to other filesystems. XFS is very mature and is currently the only available stable Linux FS with online defragmentation ability.<br />
<br />
===== A note on Journaling=====<br />
All above filesystems, except ext2, utilize [http://en.wikipedia.org/wiki/Journaling_file_system journaling]. Journaling file systems are fault-resilient file systems that use a journal to log changes before they're committed to the file system to avoid metadata corruption in the event of a crash. Note that not all journaling techniques are alike; specifically, only ext3 offers ''data-mode journaling'', (though, not by default), which journals ''both'' data ''and'' meta-data (but with significant speed penalty). The others only offer ''ordered-mode journaling'', which journals meta-data only. While all will return your filesystem to a valid state after recovering from a crash, ''data-mode journaling'' offers the greatest protection against file system corruption and data loss but can suffer from performance degradation, as all data is written twice (first to the journal, then to the disk). Depending on how important your data is, this may be a consideration in choosing your filesystem type.<br />
<br />
Choose and create the filesystem (format the partition) for / by selecting '''yes'''. You will now be prompted to add any additional partitions. In our example, sda2 and sda4 remain. For sda2, choose a filesystem type and mount it as /var. Finally, choose the filesystem type for sda4, and mount it as /home. Return to main menu.<br />
<br />
===Select Packages===<br />
<br />
*Core ISO: Choose CD as source and select the appropriate CD drive if you have more than one.<br />
*FTP ISO: Select an FTP/HTTP mirror. ''Note that archlinux.org is throttled to 50KB/s''.<br />
<br />
Package selection is split into two stages. First, you will select package categories, then you will be presented will the full lists of packages in the selected categories, allowing you to fine-tune your selections. The space bar selects and unselects the categories.<br />
<br />
*'''BASE:''' Contains the minimal GNU/Linux package set; just enough for a barebones environment; The linux kernel, GNU, fsprogs, bootloader, editor, bash, etc.<br />
*'''SUPPORT:''' Additional convenience packages for networking and filesystems, etc; gpm, fuse, dnsutils, wireless drivers, ndiswrapper, ntfs-3g, and so forth.<br />
*'''DEVEL:''' Critical software compiling tools such as GCC, autoconf, automake and make.<br />
*'''LIB:''' A thimbleful of various extra libraries such as gmp, lebelf, libevent, etc. <br />
<br />
Choose OK to continue and then choose 'yes' for 'Select all packages by default', for now.<br />
<br />
The next screen will present you with the selected packages within your selected categories. Leaving all selected is a safe choice for beginners, while more experienced users will wish to trim a few unnecessary packages. (For instance, an unneeded filesystem type utility, unneeded drivers, etc.)<br />
<br />
===Install Packages===<br />
Next, choose 'Install Packages'. You will be asked if you wish to keep the packages in the pacman cache. If you choose 'yes', you will have the flexibility to [[Downgrade packages|downgrade]] to previous package versions in the future, so this is recommended (you can always clear the cache in the future). The installer script will now install the selected packages, as well as the default Arch 2.6 kernel, to your system. <br />
*FTP ISO: The [[Pacman]] package manager will now download and install your selected packages. (See vc/5 for output, vc/1 to return to the installer)<br />
*CORE ISO: The packages will be installed from the CD.<br />
<br />
Note: For Arch 2007.08 FTP installation: after 'Install Packages' you have to upgrade pacman (<ALT>+F3, pacman -Sy pacman) and again 'Install Packages'.<br />
<br />
===Configure the System===<br />
''Closely following and understanding these steps is of key importance to ensure a properly configured system.'' <br />
<br />
The installer will ask if you want to choose [[Hwdetect|hwdetect]] to gather information for your configuration. Beginners should choose 'yes'. <br />
<br />
Advanced users who are thoroughly familiar with their hardware, required modules, and who are able to manually configure /etc/rc.conf, /etc/mkinitcpio and /etc/fstab, etc. from scratch may wish to choose 'no'. (Needless to say, this option is very involved, beyond the scope of this guide, and therefore is not covered.)<br />
<br />
Next, you will be asked if you need support for booting from USB devices, FireWire devices, PCMCIA devices, NFS shares, software RAID arrays, LVM2 volumes, encrypted volumes, and DSDT support. Choose yes if you need it; in our example nothing is needed. <br />
<br />
Now you will be asked which text editor you want to use; choose [http://en.wikipedia.org/wiki/Nano_%28text_editor%29 nano] or [http://en.wikipedia.org/wiki/Vim_%28text_editor%29 vim] (recommended). You will be presented with a menu including the main configuration files for your system. <br />
=====Can the installer handle this more automatically?=====<br />
Hiding the process of system configuration is in direct opposition to [[The Arch Way]]. While it is true that recent versions of the kernel and hardware probing tools offer excellent hardware support and auto-configuration, Arch presents the user all pertinent configuration files during installation for the purpose of ''transparency''. By the time you have finished modifying these files to your specifications, you will have learned the simple method of manual Arch Linux system configuration and become more familiar with the base structure, leaving you better prepared to use your new installation productively.<br />
<br />
====='''/etc/rc.conf'''=====<br />
Arch Linux follows in the '''*BSD''' tradition of utilizing '''/etc/rc.conf''' as the principal location for system configuration. This one file contains a wide range of configuration information, principally used at system startup. As its name directly implies, it also contains settings for and invokes the /etc/rc* files, and is, of course, sourced ''by'' these files. /etc/rc.conf offers a simple, elegant method of streamlining system resource configuration by encompassing a wide range of control, readily accessible for the Arch user. <br />
* '''LOCALIZATION''' section<br />
** '''LOCALE'''=: This sets your system locale, which will be used by all i18n-aware applications and utilities. You can get a list of the available locales by running 'locale -a' from the command line. This setting's default is fine for US English users. <br />
** '''HARDWARECLOCK'''=: Specifies whether the hardware clock, which is synchronized on bootup and on shutdown, stores '''UTC''' time, or the '''localtime'''. UTC makes sense because it greatly simplifies changing timezones and daylight savings time. localtime is necessary if you dual boot with an operating system such as Windows, that only stores localtime to the hardware clock.<br />
** '''TIMEZONE'''=: Specify your TIMEZONE. (All available zones are under /usr/share/zoneinfo/).<br />
** '''KEYMAP'''=: The available keymaps are in /usr/share/kbd/keymaps. Please note that this setting is only valid for your TTYs, not any graphical window managers or X!<br />
** '''CONSOLEFONT'''=: Available console fonts reside under /usr/share/kbd/consolefonts/ if you must change. The default (blank) is safe.<br />
** '''CONSOLEMAP'''=: Defines the console map to load with the setfont program on bootup. Possible maps are found in /usr/share/kbd/consoletrans, if needed. The default (blank) is safe. <br />
** '''USECOLOR'''=: Select "yes" if you have a color monitor and wish to have colors in your consoles.<br />
<br />
LOCALE="en_US.utf8"<br />
HARDWARECLOCK="localtime"<br />
TIMEZONE="US/Eastern"<br />
KEYMAP="us"<br />
CONSOLEFONT=<br />
CONSOLEMAP=<br />
USECOLOR="yes"<br />
* '''HARDWARE''' section<br />
** '''MOD_AUTOLOAD'''=: Setting this to "yes" will utilize '''udev''' to automatically probe hardware and load the appropriate modules during boot-up, (convenient with the default modular kernel). Setting this to "no" will rely on the user's ability to specify this information manually, or compile their own custom kernel and modules, etc. <br />
** '''MOD_BLACKLIST'''=: This has become deprecated in favor of adding blacklisted modules directly to the '''MODULES=''' line below. <br />
** '''MODULES'''=: Specify additional MODULES if you know that an important module is missing, ('''hwdetect''' should have filled in the most important modules). Also specify any blacklisted modules by prefixing them with a bang (!). Udev will be forced NOT to load blacklisted modules. In the example, the IPv6 module as well as the annoying pcspeaker are blacklisted. <br />
# Scan hardware and load required modules at bootup<br />
MOD_AUTOLOAD="yes"<br />
# Module Blacklist - Deprecated<br />
MOD_BLACKLIST=()<br />
#<br />
MODULES=(e100 eepro100 mii slhc snd-ac97-codec snd-intel8x0 soundcore !net-pf-10 !pcspkr)<br />
* '''NETWORKING''' section<br />
** '''HOSTNAME'''=:Set your HOSTNAME to your liking.<br />
** '''eth0'''=: 'Ethernet, card 0'. Adjust the interface IP address, netmask and broadcast address ''if'' you are using '''static IP'''. Set eth0="dhcp" if you want to use '''DHCP'''<br />
** '''INTERFACES'''=: Specify any/all interfaces here. If you do not use DHCP to configure a device, just keep in mind that the value of the variable (whose name must be equal to the name of the device which is supposed to be configured) equals the line which would be appended to the ifconfig command if you were to configure the device manually in the shell.<br />
** '''gateway'''=: If you are using '''static IP''', set the gateway address. If using '''DHCP''', you can usually ignore this variable, though some users have reported the need to define it.<br />
** '''ROUTES'''=: If you are using static '''IP''', remove the '''!''' in front of 'gateway'. If using '''DHCP''', you can usually leave this variable commented out with the bang (!), but again, some users require the gateway and ROUTES defined. If you experience networking issues with pacman, for instance, you may want to return to these variables. <br />
<br />
Example, using '''DHCP''':<br />
HOSTNAME="arch"<br />
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" <br />
eth0="dhcp"<br />
INTERFACES=(eth0)<br />
gateway="default gw 192.168.0.1"<br />
ROUTES=(!gateway)<br />
{{Box Note | Arch uses the '''dhcpcd''' DHCP client. Alternatively, '''dhclient''' is available from the [extra] repository via pacman.}}<br />
* '''DAEMONS''' section<br />
This array simply lists the names of those scripts contained in /etc/rc.d/ which are to be started during the boot process, and the order in which they start. <br />
DAEMONS=(@network syslog-ng netfs crond)<br />
*If a script name is prefixed with a bang (!), it is not executed. <br />
*If a script is prefixed with an "at" symbol (@), then it will be executed in the background; the startup sequence will not wait for successful completion of each daemon before continuing to the next. (Useful for speeding up system boot).<br />
*Edit this array whenever new system services are installed, if starting them automatically during bootup is desired. <br />
<br />
This 'BSD-style' init, is the Arch way of handling what others handle with various symlinks to an /etc/init.d directory.<br />
<br />
======About DAEMONS======<br />
You do not have to change the [[daemons]] line at this time, but it is useful to explain what daemons are, because we need them later in this guide. <br />
<br />
Analogous to a Windows service, a ''daemon'' is a program that runs in the background, waiting for events to occur and offering services. A good example is a webserver that waits for a request to deliver a page or an SSH server waiting for someone trying to log in. While these are full-featured applications, there are daemons whose work is not that visible. Examples are a daemon which writes messages into a log file (e.g. syslog, metalog), a daemon which lowers your CPU's frequency if your system has nothing to do (e.g.:cpufreq), and a daemon which offers you a graphical login (e.g.: gdm, kdm). All these programs can be added to the daemons line and will be started when the system boots. Useful daemons will be presented during this guide.<br />
<br />
Historically, the term ''daemon'' was coined by the programmers of MIT's Project MAC. They took the name from ''Maxwell's demon'', an imaginary being from a famous thought experiment that constantly works in the background, sorting molecules. <code>UNIX</code> systems inherited this terminology and created the backronym '''d'''isk '''a'''nd '''e'''xecution '''mon'''itor. <br />
<br />
*<font color="blue">'''Tip:</font> All Arch daemons reside under /etc/rc.d/'''<br />
<br />
=====/etc/fstab=====<br />
The '''fstab''' (for '''f'''ile '''s'''ystems '''tab'''le) is part of the system configuration listing all available disks and disk partitions, and indicating how they are to be initialized or otherwise integrated into the overall system's filesystem. The '''/etc/fstab''' file is most commonly used by the '''mount''' command. The mount command takes a filesystem on a device, and adds it to the main system heirarchy that you see when you use your system. '''mount -a''' is called from /etc/rc.sysinit, about 3/4 of the way through the boot process, and reads /etc/fstab to determine which options should be used when mounting the specified devices therein. If '''noauto''' is appended to a filesystem in /etc/fstab, '''mount -a''' will not mount it at boot.<br />
<br />
An example '''/etc/fstab''':<br />
<br />
#<br />
# /etc/fstab: static file system information<br />
#<br />
# <file system> <dir> <type> <options> <dump> <pass><br />
none /dev/pts devpts defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
#/dev/cdrom /media/cdrom auto ro,user,noauto,unhide 0 0<br />
#/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0<br />
#/dev/fd0 /media/fl auto user,noauto 0 0<br />
/dev/disk/by-uuid/0ec-933.. / jfs defaults,noatime,nodiratime 0 1<br />
/dev/disk/by-uuid/7ef-223.. /home jfs defaults,noatime,nodiratime 0 2<br />
/dev/disk/by-uuid/530-1e-.. swap swap defaults 0 0<br />
/dev/disk/by-uuid/4fe-110.. /var reiserfs defaults,noatime,notail 0 2 <br />
{{Box Note | '''''The 'noatime' and 'nodiratime' options may safely be appended to / and /home regardless of your specified filesystem type for increased speed, performance, and power efficiency, for laptops as well as desktops. 'notail' disables the ReiserFS tailpacking feature, for added performance at the cost of slightly less efficient disk usage.'''''}}<br />
Modify your '''fstab''' to your requirements.<br />
{{Box Note | As of 2008-04rc, Arch is now utilizing the UUID, or Universally Unique Identifier naming convention, for consistent device mapping. This is due to active developments in the kernel and also udev, which may randomly change the ordering in which drivers for storage controllers are loaded, yielding an unbootable system/kernel panic. Nearly every motherboard has several controllers (onboard SATA, onboard IDE), and due to the aforementioned development updates, /dev/sda may become /dev/sdb on the next reboot- hence the persistent device naming convention of UUID has been adopted for reliability. ''If you do not need nor wish to use UUID, simply change your fstab to use whatever naming convention desired.'' (See [[Persistent block device naming| this wiki article]] for more information on persistent block device naming. )}}<br />
ls -lF /dev/disk/by-uuid/<br />
Will list all partitions by uuid.<br />
<br />
*If you plan on using '''hal''' to automount media such as DVDs, you may wish to comment out the cdrom and dvd entries in preparation for '''hal''', which will be installed later in this guide.<br />
<br />
<br />
<br />
Expanded information available in the [[Fstab]] wiki entry.<br />
<br />
====='''/etc/mkinitcpio.conf and /etc/modprobe.conf'''=====<br />
Editing these configurations is unnecessary at this point. <br />
<br />
* '''mkinitcpio.conf''' This file allows you to fine-tune the initial ram filesystem (also commonly referred to as the initial ramdisk or "initrd") for your system. The initrd is a gzipped image that is read by the kernel during bootup. The purpose of the initrd is to bootstrap the system to the point where it can access the root filesystem. This means it has to load any modules that are required for devices like IDE, SCSI, or SATA drives (or USB/FW, if you are booting off a USB/FW drive). Once the initrd loads the proper modules, either manually or through udev, it passes control to the Arch system and your bootup continues. For this reason, the initrd only needs to contain the modules necessary to access the root filesystem. It does not need to contain every module you would ever want to use. The majority of your everyday modules will be loaded later on by udev, during the init process.<br />
<br />
* '''modprobe.conf''' can be used to set special configuration options for the kernel modules<br />
<br />
=====/etc/resolv.conf (for Static IP)=====<br />
The ''resolver'' is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). One of the main functions of DNS is to translate domain names into IP addresses, to make the Web a friendlier place. The resolver configuration file, or /etc/resolv.conf, contains information that is read by the resolver routines the first time they are invoked by a process.<br />
<br />
*''If you are using DHCP, you may safely ignore this file, as by default, it will be dynamically created and destroyed by the dhcpcd daemon. You may change this default behavior if you wish. (See [[Network]]).''<br />
<br />
If you use a static IP, set your DNS servers in /etc/resolv.conf (nameserver <ip-address>). You may have as many as you wish, e.g.:<br />
nameserver 4.2.2.1<br />
nameserver 4.2.2.2<br />
<br />
If you are using a router, you will probably want to specify your DNS servers in the router itself, and merely point to it from your '''/etc/resolv.conf''', using your router's IP (which is also your gateway from '''/etc/rc.conf'''), e.g.:<br />
nameserver 192.168.1.1<br />
<br />
If using '''DHCP''', you may also specify your DNS servers in the router, or allow automatic assignment from your ISP, if your ISP is so equipped.<br />
<br />
=====/etc/hosts=====<br />
<br />
This file associates IP addresses with hostnames and aliases, one line per IP address. For each host a single line should be present with the following information:<br />
<IP-address> <hostname> [aliases...]<br />
Add your ''hostname'', coinciding with the one specified in /etc/rc.conf, as an alias, so that it looks like this:<br />
127.0.0.1 localhost.localdomain localhost '''''yourhostname'''''<br />
{{Box Note |''This format, '''including the 'localhost' and your actual host name''', is required for program compatibility! Errors in this entry may cause poor network performance and/or certain programs to open very slowly, or not work at all. This is a very common error for beginners.''}}<br />
<br />
If you use a static IP, add another line using the syntax: <static-IP> <hostname.domainname.org> <hostname> e.g.:<br />
192.168.1.100 '''''yourhostname'''''.domain.org '''''yourhostname'''''<br />
<br />
*<font color="blue">'''TIP''':</font> For convenience, you may also use /etc/hosts aliases for hosts on your network, and/or on the Web, e.g.:<br />
64.233.169.103 www.google.com g<br />
192.168.1.90 media<br />
192.168.1.88 data<br />
The above example would allow you to access google simply by typing 'g' into your browser, and access to a media and data server on your network by name and without the need for typing out their respective IP addresses.<br />
<br />
=====/etc/hosts.deny and /etc/hosts.allow=====<br />
Modify these configurations according to your needs if you plan on using the [[SSH|ssh]] daemon. The default configuration will reject all incoming connections, not only ssh connections. Edit your '''/etc/hosts.allow '''file and add the appropriate parameters: <br />
<br />
* let everyone connect to you<br />
sshd: ALL<br />
<br />
* restrict it to a certain ip<br />
sshd: 192.168.0.1<br />
<br />
* OR restrict for an IP range<br />
sshd: 10.0.0.0/255.255.255.0<br />
<br />
If you do not plan on using the [[SSH|ssh]] daemon, leave this file at the default, (empty), for added security.<br />
<br />
=====/etc/locale.gen=====<br />
<br />
The '''locale-gen''' command reads from '''/etc/locale.gen''' to generate specific locales. They can then be used by '''glibc''' and any other locale-aware program or library for rendering "peculiar" text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards. The ability to setup a default locale is a great built-in privilege of using a <code>UNIX</code>-like operating system.<br />
<br />
By default /etc/locale.gen is an empty file with commented documentation. Once edited, the file remains untouched. '''locale-gen''' runs on every '''glibc''' upgrade, generating all the locales specified in /etc/locale.gen.<br />
<br />
Choose the locale(s) you need (remove the # in front of the lines you want), e.g.:<br />
en_US ISO-8859-1<br />
en_US.UTF-8 <br />
<br />
The installer will now run the locale-gen script, which will generate the locales you specified. You may change your locale in the future by editing /etc/locale.gen and subsequently running 'locale-gen' as root.<br />
<br />
{{Box Note |'''''If you fail to choose your locale, this will lead to a "The current locale is invalid..." error. This is perhaps the most common mistake by new Arch users, and also leads to the most commonly asked questions on the forum.'''''}}<br />
<br />
=====Root password=====<br />
Finally, set a root password and make sure that you remember it later. Return to the main menu and continue with installing bootloader.<br />
<br />
=====Pacman-Mirror=====<br />
Choose a mirror repository for '''pacman'''. <br />
*''archlinux.org is throttled, limiting downloads to 50KB/s'' <br />
<br />
Return to the main menu.<br />
<br />
===Install Bootloader===<br />
Because we have no secondary operating system in our example, we will need a bootloader. [http://www.gnu.org/software/grub/ GNU GRUB] is the recommended bootloader. Alternatively, you may choose [http://lilo.go.dyndns.org/ LILO]. <br />
====GRUB====<br />
The provided '''GRUB''' configuration ('''/boot/grub/menu.lst''') should be sufficient, but verify its contents to ensure accuracy. You may want to alter the resolution of the console by adding a vga=<number> kernel argument corresponding to your desired virtual console resolution. (A table of resolutions and the corresponding numbers is printed in the menu.lst.)<br />
<br />
Example: <br />
title Arch Linux (Main)<br />
root (hd0,0) <br />
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/0ec1-9339.. ro vga=773<br />
initrd /boot/kernel26.img<br />
{{Box Note | '''''The linux kernel, 'vmlinuz', is so named because it incorporated '''v'''irtual '''m'''emory capability early in its development. The '''z''' denotes a zipped (compressed) image.'''''}}<br />
<br />
Explanation:<br />
<br />
Line 1: '''title''': A printed menu selection. "Arch Linux (Main)" will be printed on the screen as a menu selection.<br />
<br />
Line 2: '''root''': '''GRUB''''s root; the drive and partition where the kernel (/boot) resides, according to system BIOS. (More accurately, where GRUB's stage2 file resides). '''NOT necessarily the root''' (/) file system, as they can reside on separate partitions. GRUB's numbering scheme starts at 0, and uses an hd''x,x'' format regardless of IDE or SATA, and enclosed within parentheses. <br />
<br />
The example indicates that /boot is on the first partition of the first drive, according to BIOS, or, (hd0,0).<br />
<br />
Line 3: '''kernel''': This line specifies:<br />
<br />
* The path and filename of the kernel '''''relative to GRUB's root'''''.<br />
In the example, /boot is merely a directory residing on the same partition as / and '''vmlinuz26''' is the kernel filename; '''/boot/vmlinuz26'''. ''If /boot were on a separate partition, the path and filename would be simply '''/vmlinuz26''', being relative to '''GRUB''''s root.'' <br />
<br />
* The root= argument to the kernel statement specifies the partition containing the root (/) directory in the booted system, (more accurately, the partition containing '''/sbin/init'''), ''according to the UUID numbering scheme'' as of 2008-04rc, which uses the /dev/disk/by-uuid/xxxx-xxxx-xxxx format. <br />
<br />
*An easy way to distinguish the 2 appearances of 'root' in /boot/grub/menu.lst is to remember that the first root statement ''informs GRUB where the kernel resides'', whereas the second root= kernel argument ''tells the kernel where the root filesystem (/) resides''.<br />
<br />
* Kernel options. <br />
<br />
In our example, '''ro''' mounts the filesystem as read only during startup, and the '''"vga=773"''' argument will give a 1024x768 framebuffer with 256 color depth.<br />
<br />
Line 4: '''initrd''': (For Initial RAM disk) The path and filename of the initial RAM filesystem '''relative to GRUB''''s root. Again, in the example, /boot is merely a directory residing on the same partition as / and '''kernel26.img''' is the initrd filename; '''/boot/kernel26.img'''. ''If /boot were on a separate partition, the path and filename would be simply '''/kernel26.img''', being relative to '''GRUB''''s root.'' <br />
<br />
Install the '''GRUB''' bootloader to the master boot record, (sda in our example).<br />
<br />
===Reboot===<br />
<br />
That's it; You have configured and installed your Arch Linux base system. Exit the install, and type the magic word:<br />
<br />
reboot<br />
(Be sure to remove the installer CD)<br />
<br />
Your new Arch Linux system will boot up and finish with a login prompt (you may want to change the boot order in your '''BIOS''' back to booting from hard disk).<br />
<br />
'''Congratulations, and welcome to your shiny, new Arch Linux base system!'''<br />
<br />
Your new Arch Linux base system is now a functional GNU/Linux environment ready for customization. From here, you may build this elegant set of tools into whatever you wish or require for your purposes. <br />
<br />
Login with the root account. We will configure pacman and update the system as root, then add a normal user. <br />
{{Box Note |Virtual consoles 1-6 are available.}}<br />
<br />
===Configuring the network (if necessary)===<br />
*''This section will assist you in configuring most types of networks, if your network configuration is not working for you.''<br />
<br />
If you properly configured your system, you should have a working network. Try to ping www.google.com to verify this.<br />
ping -c 3 www.google.com<br />
<br />
''If you have successfully established a network connection, continue with '''[[#Update, Sync and Upgrade the system with pacman|Update, Sync and Upgrade the system with pacman]]'''.''<br />
<br />
If, after trying to ping www.google.com, you get an "unknown host" error, you may conclude that your network is not properly configured. You may choose to double-check the following files for integrity and proper settings:<br />
<br />
'''/etc/rc.conf''' # Specifically, check your HOSTNAME= and NETWORKING section for typos and errors.<br />
<br />
'''/etc/hosts''' # Double-check your format. (See above.)<br />
<br />
'''/etc/resolv.conf''' # If you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default, but can be changed to your preference. (See [[Network]].)<br />
<br />
Advanced instructions for configuring the network can be found in the [[Network]] article.<br />
<br />
====Wired LAN====<br />
<br />
Check your Ethernet with<br />
ifconfig -a<br />
All interfaces will be listed. You should see an entry for eth0, or perhaps eth1. <br />
*'''Static IP'''<br />
<br />
If required, you can set a new static IP with:<br />
ifconfig eth0 <ip address> netmask <netmask> up <br />
and the default gateway with<br />
route add default gw <ip address of the gateway><br />
Verify that /etc/resolv.conf contains your DNS server and add it if it is missing. <br />
Check your network again with ping www.google.com. If everything is working now, adjust /etc/rc.conf as described above for static IP. <br />
*'''DHCP'''<br />
If you have a DHCP server/router in your network try:<br />
dhcpcd eth0<br />
If this is working, adjust /etc/rc.conf as described above, for dynamic IP.<br />
<br />
====Wireless LAN====<br />
Detailed setup guide: [[Wireless Setup]]<br />
<br />
====Analog Modem====<br />
To be able to use a Hayes-compatible, external, analog modem, you need to at least have the ppp package installed. Modify the file /etc/ppp/options to suit your needs and according to man pppd. You will need to define a chat script to supply your username and password to the ISP after the initial connection has been established. The manpages for pppd and chat have examples in them that should suffice to get a connection up and running if you're either experienced or stubborn enough. With udev, your serial ports usually are /dev/tts/0 and /dev/tts/1.<br />
Tip: Read [[Dialup without a dialer HOWTO]].<br />
<br />
Instead of fighting a glorious battle with the plain pppd, you may opt to install wvdial or a similar tool to ease the setup process considerably. In case you're using a so-called WinModem, which is basically a PCI plugin card working as an internal analog modem, you should indulge in the vast information found on the [http://www.linmodems.org/ LinModem] homepage.<br />
<br />
====ISDN====<br />
<br />
Setting up ISDN is done in three steps:<br />
# Install and configure hardware<br />
# Install and configure the ISDN utilities<br />
# Add settings for your ISP <br />
<br />
The current Arch stock kernels include the necessary ISDN modules, meaning that you will not need to recompile your kernel unless you're about to use rather odd ISDN hardware. After physically installing your ISDN card in your machine or plugging in your USB ISDN-Box, you can try loading the modules with modprobe. Nearly all passive ISDN PCI cards are handled by the hisax module, which needs two parameters: type and protocol. You must set protocol to '1' if your country uses the 1TR6 standard, '2' if it uses EuroISDN (EDSS1), '3' if you're hooked to a so-called leased-line without D-channel, and '4' for US NI1.<br />
<br />
Details on all those settings and how to set them is included in the kernel documentation, more specifically in the isdn subdirectory, and available online. The type parameter depends on your card; a list of all possible types can be found in the README.HiSax kernel documentation. Choose your card and load the module with the appropriate options like this:<br />
<br />
modprobe hisax type=18 protocol=2<br />
<br />
This will load the hisax module for my ELSA Quickstep 1000PCI, being used in Germany with the EDSS1 protocol. You should find helpful debugging output in your /var/log/everything.log file, in which you should see your card being prepared for action. Please note that you will probably need to load some USB modules before you can work with an external USB ISDN Adapter.<br />
<br />
Once you have confirmed that your card works with certain settings, you can add the module options to your /etc/modprobe.conf:<br />
<br />
alias ippp0 hisax<br />
options hisax type=18 protocol=2<br />
<br />
Alternatively, you can add only the options line here, and add hisax to your MODULES array in the rc.conf. It's your choice, really, but this example has the advantage that the module will not be loaded until it's really needed.<br />
<br />
That being done, you should have working, supported hardware. Now you need the basic utilities to actually use it!<br />
<br />
Install the isdn4k-utils package, and read the manpage to isdnctrl; it'll get you started. Further down in the manpage you will find explanations on how to create a configuration file that can be parsed by isdnctrl, as well as some helpful setup examples. Please note that you have to add your SPID to your MSN setting separated by a colon if you use US NI1.<br />
<br />
After you have configured your ISDN card with the isdnctrl utility, you should be able to dial into the machine you specified with the PHONE_OUT parameter, but fail the username and password authentication. To make this work add your username and password to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets as if you were configuring a normal analogous PPP link, depending on which protocol your ISP uses for authentication. If in doubt, put your data into both files.<br />
<br />
If you set up everything correctly, you should now be able to establish a dial-up connection with<br />
isdnctrl dial ippp0<br />
as root. If you have any problems, remember to check the logfiles!<br />
<br />
====DSL (PPPoE)====<br />
<br />
These instructions are relevant to you only if your PC itself is supposed to manage the connection to your ISP. You do not need to do anything but define a correct default gateway if you are using a separate router of some sort to do the grunt work.<br />
<br />
Before you can use your DSL online connection, you will have to physically install the network card that is supposed to be connected to the DSL-Modem into your computer. After adding your newly installed network card to the modules.conf/modprobe.conf or the MODULES array, you should install the rp-pppoe package and run the pppoe-setup script to configure your connection. After you have entered all the data, you can connect and disconnect your line with<br />
<br />
/etc/rc.d/adsl start<br />
<br />
and<br />
<br />
/etc/rc.d/adsl stop<br />
<br />
respectively. The setup usually is rather easy and straightforward, but feel free to read the manpages for hints. If you want to automatically 'dial in' on boot-up, add adsl to your DAEMONS array.<br />
<br />
===Update, Sync and Upgrade the system with [[pacman]]===<br />
Now we will update the system using [[pacman]]. <br />
<br />
====What is pacman ?====<br />
[[Pacman]] is the '''pac'''kage '''man'''ager of Arch Linux. Pacman is written in C and is designed from the ground up to be lightweight, fast, simple, and extremely versatile. It manages your entire package system and handles installation, removal, package downgrade (through cache), custom compiled package handling, automatic dependency resolution, remote and local searches and much more. Arch uses the .tar.gz package format, which further enhances pacman's speed; Gzipped tarballs, though slightly larger, are decompressed many times faster than their Bzipped counterparts, and are therefore installed ''much'' more expediently. <br />
<br />
We will use pacman to download software packages from remote repositories and install them onto your system.<br />
<br />
Pacman is the most important tool in your Arch Linux toolbox for building the base system into whatsoever you please.<br />
<br />
====Configuring pacman====<br />
<br />
=====Package Repositories and /etc/pacman.conf=====<br />
Arch currently offers the following 5 repositories readily accessible through pacman:<br />
<br />
'''[core]'''<br />
<br />
The simple principle behind [core] is to provide only one of each necessary tool for a base Arch Linux system; The GNU toolchain, the Linux kernel, one editor, one command line browser, etc. (There are a few exceptions to this. For instance, both vi and nano are provided, allowing the user to choose one or both.) It contains all the packages that MUST be in perfect working order to make sure your system continues to run. These are the absolute system-critical packages. Developer maintained.<br />
<br />
*''The Core installation media simply contains an installer script, and a snapshot of the core repository at the time of release.''<br />
<br />
'''[extra]'''<br />
<br />
The [extra] repository contains all Arch packages that are not themselves necessary for a base Arch system, but contribute to a more full-featured environment. '''X''', KDE, and Apache, for instance, can be found here. Developer maintained.<br />
<br />
'''[unstable]'''<br />
<br />
The [unstable] repository contains experimental and unstable software, especially if the development version of a package has become popular for some reason. For example, perhaps the upstream stable version is hopelessly out of date, or the unstable version has some groundbreaking changes that a lot of users seem interested in, like experimental kernel drivers or -svn package versions. Developer maintained.<br />
<br />
{{Box Note |'''Contrary to popular belief, it is perfectly safe to enable the unstable repository, as there are no name collisions with [core], [community] or [extra]. Packages from [unstable] are only installed if you explicitly do so. If there is a conflict between an [Unstable] package and an installed package, pacman will warn you and resolve the conflict, if prompted, by removing the installed package.'''}}<br />
<br />
The [unstable] repository is currently not maintained for ''x86_64''.<br />
<br />
'''[testing]'''<br />
<br />
The [testing] repository contains packages that are candidates for the [core], [extra] or [unstable] repositories. New packages go into [testing] if:<br />
* they are expected to break something on update and need to be tested first<br />
* they require other packages to be rebuilt. In this case, all packages that need to be rebuilt are put into [testing] first and when all rebuilds are done, they are moved back to the other repositories. Developer maintained.<br />
<br />
[testing] is the only repository that can have name collisions with any of the other official repositories. If enabled, it has to be the first repo listed in your ''pacman.conf'' file.<br />
<br />
<font color="red">'''WARNING''': '''''Be careful when enabling [testing]. Your system may break after you update with [testing] enabled. Only experienced users should use it.'''''</font><br />
<br />
'''[community]'''<br />
<br />
The [community] repository is maintained by the ''Trusted Users (TUs)'' and is part of the ''Arch User Repository ([[AUR]])''. It contains binary packages from the ''AUR'' that have enough votes and were adopted by a ''TU''. Like all repos listed above, [community] may be readily accessed by pacman.<br />
<br />
The '''[[AUR]]''' also contains the '''unsupported''' branch, which cannot be accessed directly by pacman*. [unsupported] contains more than eight thousand PKGBUILD scripts for building packages from source, that may be unavailable through the other repos. <br />
<br />
<nowiki>*</nowiki> '''''[[AUR Helpers]]''''' can help you seamlessly access AUR.<br />
<br />
'''/etc/pacman.conf'''<br />
<br />
pacman will attempt to read /etc/pacman.conf each time it is invoked. This configuration file is divided into sections, or repositories. Each section defines a package [[Official Repositories|repository]] that pacman can use when searching for packages. The exception to this is the options section, which defines global options.<br />
nano /etc/pacman.conf<br />
Example:<br />
# GENERAL OPTIONS<br />
#<br />
[options]<br />
LogFile = /var/log/pacman.log<br />
NoUpgrade = etc/passwd etc/group etc/shadow etc/sudoers<br />
NoUpgrade = etc/fstab etc/raidtab etc/ld.so.conf<br />
NoUpgrade = etc/rc.conf etc/rc.local<br />
NoUpgrade = etc/modprobe.conf etc/modules.conf<br />
NoUpgrade = boot/grub/menu.lst<br />
#IgnorePkg = wine<br />
HoldPkg = pacman glibc<br />
#XferCommand = /usr/bin/wget --passive-ftp -nv -c -O %o %u<br />
#XferCommand = /usr/bin/aria2c -s 2 -m 2 -d / -o %o %u<br />
ILoveCandy<br />
#<br />
# REPOSITORIES<br />
# - can be defined here or included from another file<br />
# - pacman will search repositories in the order defined here.<br />
# - local/custom mirrors can be added here or in separate files<br />
# <br />
<br />
#[testing]<br />
#Server = http://mirrors.easynews.com/linux/archlinux/$repo/os/i686<br />
#Include = /etc/pacman.d/mirrorlist<br />
<br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Server = http://mirrors.easynews.com/linux/archlinux/$repo/os/i686<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
#Server = http://mirrors.easynews.com/linux/archlinux/$repo/os/i686<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
[unstable]<br />
# Add your preferred servers here, they will be used first<br />
#Server = http://mirrors.easynews.com/linux/archlinux/$repo/os/i686<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
#Server = http://mirrors.easynews.com/linux/archlinux/$repo/os/i686<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
# An example of a custom package repository. See the pacman manpage for<br />
# tips on creating your own repositories.<br />
#[custom]<br />
#Server = file:///home/custompkgs<br />
<br />
Enable all desired repositories (remove the # in front of the 'Include =' and '[repository]' lines).<br />
<br />
<br />
*'''''When choosing repos, be sure to uncomment both the repository header lines in [brackets] as well as the 'Include =' lines. Failure to do so will result in the selected repository being omitted! This is a very common error.'' '''<br />
<br />
=====/etc/pacman.d/mirrorlist=====<br />
Faster mirrors will dramatically improve pacman performance, and your overall Arch Linux experience.<br />
<br />
Edit /etc/pacman.d/mirrorlist:<br />
nano /etc/pacman.d/mirrorlist<br />
Remove all mirrors which are not on your continent, or are extremely distant. (Using nano, you may use CTRL-K to cut each unneeded line.) <br />
<br />
Edit /etc/pacman.d/mirrorlist by placing the best mirror at the top of the list. (Recall that archlinux.org is throttled to 50KB/s). If using nano, you can cut a line with CTRL-K and paste with CTRL-U. <br />
<br />
After changing mirrors, issue the following command:<br />
pacman -Syy<br />
This will force pacman to resynchronize with the new repo. Issuing pacman -Syy ''whenever a mirror is changed'', is good practice and will avoid possible headaches.<br />
=====Ignoring packages=====<br />
When you execute the command "pacman -Syu", your entire system will be updated. It is possible that you want to prevent a package from being upgraded. An example could be the kernel (kernel26) or a package for which an upgrade may prove problematic for your system. In this case, you have two options; indicate the packages you want to skip in the pacman command line using the --ignore switch (do pacman -S --help for details) or permanently indicate the packages you want to skip in your /etc/pacman.conf file:<br />
<br />
IgnorePkg = kernel26<br />
The typical way to use Arch is to use pacman to install all packages unless there is no package available, in which case you can build your own package using [[ABS]]. Many user-contributed packages are also available in the [[AUR]]. You are expected to keep your system up to date with pacman -Syu, rather than selectively upgrading packages. You may diverge from this typical usage as you wish; just be warned that there is a greater chance that things will not work as intended and that it could break your system. The majority of complaints happen when selective upgrading, unusual compilation or improper software installation is performed. Use of '''IgnorePkg''' in /etc/pacman.conf is therefore discouraged, and should only be used sparingly, if you know what you are doing.<br />
<br />
=====Ignoring Configuration Files=====<br />
In the same vein, you can also "protect" your configuration/system files from being overwritten during "pacman -Su" using the following option in your /etc/pacman.conf<br />
<br />
NoUpgrade = etc/lilo.conf boot/grub/menu.lst<br />
<br />
====Update System====<br />
Update, sync, and '''upgrade''' your entire new system with:<br />
pacman -Syu<br />
pacman will now fetch the latest information about available packages and perform all available upgrades. (You may be prompted to upgrade pacman itself at this point. If so, say yes, and then reissue the pacman -Syu command when finished.) <br />
Reboot if a kernel upgrade has occurred. <br />
{{Box Note|'''''Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information.'''''}}<br />
If the messages go by too fast to read, you can look at them later at /var/log/pacman.log.<br />
<br />
=====The beauty of the Arch rolling release model=====<br />
Keep in mind that Arch is a '''rolling release''' distribution. This means there is never a reason to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Simply issuing '''pacman -Syu''' periodically keeps your entire system up-to-date and on the bleeding edge. At the end of this upgrade, your system is completely current. <br />
Reboot if a kernel upgrade has occurred.<br />
<br />
====Get familiar with pacman====<br />
Pacman is the Arch user's best friend. It is highly recommended to study and learn how to use the pacman tool. Try:<br />
man pacman<br />
Check out the bottom of this article, and look up the [[pacman]] wiki entries at your leisure.<br />
<br />
<br />
<br />
===Add a user and setup groups===<br />
You should not do your everyday work using the root account. It is more than poor practice; it is dangerous. Root is for administrative tasks. Instead, add a normal user account using:<br />
adduser<br />
While most default options are safe to use, you may want to add audio, optical, storage, video, and wheel when prompted for additional groups (separate them with a comma and no space) - especially if you are planning on having a full-featured desktop environment. <br />
<br />
Groups and users thereof are defined in /etc/group. <br />
<br />
They include:<br />
<br />
*'''audio''' - for tasks involving sound card and related software<br />
*'''floppy''' - for access to a floppy if applicable<br />
*'''lp''' - for managing printing tasks<br />
*'''optical''' - for managing tasks pertaining to the optical drive(s)<br />
*'''storage''' - for managing storage devices<br />
*'''video''' - for video tasks and 3d acceleration<br />
*'''wheel''' - for using sudo<br />
<br />
See the [[Groups]] article to understand what groups you need to be a member of. <br />
<br />
Check the man pages for usermod and gpasswd for more information.<br />
===Install and setup Sudo===<br />
<br />
See [[Sudo]]<br />
<br />
==Part II: Install X and configure ALSA==<br />
<br />
<br />
===Configure the audio card with alsamixer===<br />
The Advanced Linux Sound Architecture (known by the acronym '''ALSA''') is a Linux kernel component intended to replace the original Open Sound System (OSS) for providing device drivers for sound cards. Besides the sound device drivers, '''ALSA''' also bundles a user space library for application developers who want to use driver features with a higher level API than direct interaction with the kernel drivers. <br />
-----<br />
{{Box Note|udev will automatically probe your hardware on boot-up, loading the corresponding module for your audio card. Your sound should already be working, but you cannot hear anything because it is muted by default.}} <br />
The alsa-utils package contains alsamixer, which will allow us to configure the sound device from the console. (You may also run alsamixer from an '''X''' environment later.)<br />
<br />
Install the alsa-utils package:<br />
pacman -S alsa-utils<br />
Did you add your normal user to the audio group? If not, now would be a good time. As root do:<br />
gpasswd -a yourusername audio<br />
Log out the root user, and login as non-root user.<br />
<br />
As '''''normal, non-root''''' user, do: <br />
'''$''' alsamixer<br />
Unmute the Master and PCM channels by scrolling to them with cursor left/right and pressing '''M'''. Increase the volume levels with the cursor-up key. (70-90 Should be a safe range.) Some machines, (like the Thinkpad T61), have a '''Speaker''' channel which must be unmuted and adjusted as well. Leave alsamixer by pressing ESC. <br />
==== Sound Test ====<br />
Test your sound configuration as normal user using aplay:<br />
aplay /usr/share/sounds/alsa/Front_Center.wav<br />
You should hear a very eloquent woman say, "Front, center."<br />
<br />
''Note: If you still cannot hear any sound, try checking (by running alsamixer) if Speaker is muted. If so, press '''M''' to unmute it and then try playing the test sound again.''<br />
<br />
Then run alsactl as root:<br />
alsactl store<br />
This will create '/etc/asound.state', saving the alsamixer settings. <br />
<br />
Also, add the alsa ''daemon'' to your DAEMONS section in /etc/rc.conf to automatically restore the mixer settings on boot-up.<br />
nano /etc/rc.conf<br />
DAEMONS=(syslog-ng network crond '''alsa''')<br />
''Note that the alsa daemon merely restores your volume mixer levels on boot up by reading /etc/asound.state. It is separate from the alsa audio library (and kernel level API).''<br />
<br />
Expanded information available in the [[ALSA]] wiki entry.<br />
<br />
===Installing and configuring X===<br />
The '''X''' Window System (commonly '''X11''', or just simply '''X''') is a networking and display protocol which provides windowing on bitmap displays. It provides the standard toolkit and protocol to build graphical user interfaces (GUIs) on <code>UNIX</code>-like operating systems.<br />
<br />
'''X''' provides the basic framework, or primitives, for building GUI environments: drawing and moving windows on the screen and interacting with a mouse and/or keyboard. '''X''' does not mandate the user interface — individual client programs handle this. <br />
<br />
'''X''' is so named because it was preceded by the '''W''' Window System, originally developed at Stanford University. <br />
-----<br />
<br />
{{Box Note| If you plan on using an '''open-source''' video driver, and need 3d acceleration, it is recommended to install the libgl library before installing Xorg:}}<br />
pacman -S libgl<br />
''(Proprietary video drivers provide their own gl library implementations.)''<br />
----- <br />
Now we will install the base Xorg packages using pacman. This is the first step in building a GUI.<br />
<br />
pacman -S xorg<br />
3d utilities such as glxgears are included in the '''mesa''' package:<br />
pacman -S mesa<br />
<br />
Now we have the base packages we need for running the '''X''' Server. You should add the driver for your graphics card now (e.g. xf86-video-<name>). The easiest way to configure X.org is by installing the correct driver packages first, and then generating /etc/X11/xorg.conf using an autoconfiguration script, like Xorg -configure.<br />
<br />
You will need knowledge of which video chipset your machine has. If you do not know, use the lspci program:<br />
lspci | grep VGA<br />
<br />
If you need a list of all '''open-source''' video drivers, do: <br />
pacman -Ss xf86-video | less<br />
Here is a list of '''open source''' drivers, and the corresponding video chipsets.<br />
*'''xf86-video-apm''' Alliance ProMotion video driver<br />
*'''xf86-video-ark''' ark video driver<br />
*'''xf86-video-ati''' ATI(AMD) video driver<br />
*'''xf86-video-chips''' Chips and Technologies video driver<br />
*'''xf86-video-cirrus''' Cirrus Logic video driver<br />
*'''xf86-video-dummy''' dummy video driver<br />
*'''xf86-video-fbdev''' framebuffer video driver<br />
*'''xf86-video-glint''' GLINT/Permedia video driver<br />
*'''xf86-video-i128''' Number 0 i128 video driver<br />
*'''xf86-video-i740''' Intel i740 video driver<br />
*'''xf86-video-i810''' Intel i810/i830/i9xx video drivers (deprecated - use -intel)<br />
*'''xf86-video-intel''' Newer Version of Intel i810/i830/i9xx video drivers<br />
*'''xf86-video-imstt''' Integrated Micro Solutions Twin Turbo vidoe driver<br />
*'''xf86-video-mga''' mga video driver (Matrox Graphics Adapter)<br />
*'''xf86-video-neomagic''' neomagic video driver<br />
*'''xf86-video-nv''' Nvidia nv video driver<br />
*'''xf86-video-rendition''' Rendition video driver<br />
*'''xf86-video-s3''' S3 video driver<br />
*'''xf86-video-s3virge''' S3 Virge video driver<br />
*'''xf86-video-savage''' savage video driver<br />
*'''xf86-video-siliconmotion''' siliconmotion video driver<br />
*'''xf86-video-sis''' SiS video driver<br />
*'''xf86-video-sisusb''' SiS USB video driver<br />
*'''xf86-video-tdfx''' tdfx video driver<br />
*'''xf86-video-trident''' Trident video driver<br />
*'''xf86-video-tseng''' tseng video driver<br />
*'''xf86-video-unichrome''' VIA S3 Unichrome video drivers<br />
*'''xf86-video-v4l''' v4l video driver<br />
*'''xf86-video-vesa''' vesa video driver<br />
*'''xf86-video-vga''' VGA 16 color video driver<br />
*'''xf86-video-via''' via video driver<br />
*'''xf86-video-vmware ''' vmware video driver<br />
*'''xf86-video-voodoo ''' voodoo video driver<br />
<br />
* Note that the '''vesa''' driver is the most generic, and should work with almost any modern video chipset. If you cannot find a suitable driver for your video chipset, vesa '''should''' work.<br />
<br />
*If you have an NVIDIA or ATI video adapter, you may wish to install the proprietary NVIDIA or ATI drivers. '''Installing proprietary video drivers is covered [[#Using proprietary Graphics Driver (NVIDIA, ATI)|below]].'''<br />
<br />
Use pacman to install the appropriate video driver for your video card/onboard video. e.g.:<br />
pacman -S xf86-video-savage<br />
(for the Savage driver.)<br />
<br />
===Create /etc/X11/xorg.conf===<br />
=====What is /etc/X11/xorg.conf?=====<br />
/etc/X11/xorg.conf is the main configuration file for your '''X''' Window System, the foundation of your '''G'''raphical '''U'''ser '''I'''nterface. It is a plain text file ordered into sections and subsections. Important sections are ''Files, InputDevice, Module, Monitor, Modes, Screen, Device, and ServerLayout''. Sections can appear in any order and there may be more than one section of each kind, for example, if you have more than one monitor, or if your laptop has a trackpoint as well as a mouse. <br />
------<br />
By default, you will not have an Xorg config file, as the newest versions of Xorg feature autodetection. ''If'' the autodetection ''works satisfactorily'' and you do not need to specify special features such as aiglx, compositing and so forth, you may forgo creating an xorg.conf file. <br />
<br />
''Most people will still find that they need to generate a config file, however.''<br />
<br />
Advanced users may wish to manually create their own xorg.conf file. You may also use the Xorg -configure script to generate a basic config file. As root, do:<br />
Xorg -configure<br />
This will create a config file at /root/xorg.conf.new <br />
<br />
To test the server, run:<br />
X -config /root/xorg.conf.new<br />
'''X''' should start with the white hollow vector '''X''' in the center of the screen, which should respond to mouse, trackpoint or touchpad movement. Use CTRL-Alt-Backspace to exit '''X'''.<br />
<br />
Inspect your config file in case of errors:<br />
<br />
nano /root/xorg.conf.new<br />
<br />
Ensure the Xorg -configure script has correctly specified your video driver. e.g.:<br />
Section "Device"<br />
<br />
...<br />
<br />
Driver "savage"<br />
<br />
...<br />
<br />
EndSection<br />
<br />
Ensure there are horizontal sync and vertical refresh specs under section "Monitor". If not, add them:<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
HorizSync 30.0 - 130.0 # Safe for LCD's<br />
VertRefresh 50.0 - 100.0 # Safe for LCD's and most CRT's.<br />
EndSection<br />
(If you do not know these specs, consult your monitor's documentation.)<br />
<br />
Specify your default color depth under section "Screen":<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
(Typically, this will be set to 24 for true color.)<br />
<br />
Also add your desired Modes to your "Display" subsection, at least under the Depth 24 header, e.g.:<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Modes "1024x768" "800x600" "640x480"<br />
Add the following section, if you wish to enable eye candy which requires the composite extension: <br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
Try your config again, after modifying:<br />
X -config /root/xorg.conf.new<br />
Ensure an '''X''' session opens, without errors, and move the generated config file to /etc/X11/:<br />
mv /root/xorg.conf.new /etc/X11/xorg.conf<br />
Detailed instructions in the [[Xorg]] article.<br />
<br />
====Alternative xorg.conf generation====<br />
* Note that if your machine has a successfully configured xorg.conf under another distribution, you may easily copy it over to your current Arch system.<br />
* If Xorg -configure is not generating a usable xorg.conf, you may alternatively use the hwd tool. Install with:<br />
pacman -S hwd<br />
And run with<br />
hwd -xa<br />
* You may also try the xorgcfg script:<br />
xorgcfg <br />
* Lastly, you may choose xorgconfig, which will interactively prompt you for hardware information to create a basic xorg.conf:<br />
xorgconfig<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
===Using proprietary Graphics Driver (NVIDIA, ATI)===<br />
You may choose to use the proprietary video drivers from NVIDIA or ATI. <br />
====NVIDIA Graphic Cards====<br />
The NVIDIA proprietary drivers are generally considered to be of good quality, and offer 3D performance, whereas the open source '''nv''' driver offers only 2d support at this time. <br />
<br />
Before you configure your Graphics Card you will need to know which driver fits. Arch currently has 3 different driver packages that each match a certain subset of Cards: <br />
<br />
'''1. nvidia-71xx''' ''for very old Cards like TNT and TNT2''<br />
<br />
'''2. nvidia-96xx''' ''slightly newer cards up to the GF 4''<br />
<br />
'''3. nvidia''' ''newest GPUs after the GF 4''<br />
<br />
Consult the NVIDIA-Homepage to see which one is for you. The difference is only for the installation; Configuration works the same with every driver.<br />
<br />
Select and install the appropriate NVIDIA driver ''for your card'', e.g.: <br />
pacman -S nvidia-96xx<br />
<br />
The NVIDIA package has a utility for updating your existing /etc/X11/xorg.conf for use with the NVIDIA driver:<br />
nvidia-xconfig<br />
<br />
It also has several options which will further specify the contents and options of the xorg.conf file.<br />
For example,<br />
nvidia-xconfig --composite --add-argb-glx-visuals<br />
<br />
For more detailed information, see nvidia-xconfig(1).<br />
<br />
Some useful tweaking options in the device section are (beware that these may not work on your system):<br />
Option "RenderAccel" "true"<br />
Option "NoLogo" "true"<br />
Option "AGPFastWrite" "true"<br />
Option "EnablePageFlip" "true"<br />
Make sure all instances of DRI are commented out:<br />
# Load "dri"<br />
Double check your /etc/X11/xorg.conf to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
Update kernel module dependencies:<br />
depmod -a<br />
<br />
Advanced instructions for nvidia configuration can be found in the [[NVIDIA]] article.<br />
<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
====ATI Graphic Cards====<br />
ATI owners have two options for drivers. If you are unsure which driver to use, please try the open-source one first. The open-source driver will suit most needs along with being generally less problematic.<br />
<br />
Install the '''proprietary''' ATI Driver with<br />
pacman -S catalyst<br />
Use the aticonfig tool to modify the xorg.conf.<br />
<br />
Install the '''open-source''' ATI Driver with<br />
pacman -S xf86-video-ati<br />
Currently, the performance of the open-source driver is not on par with that of the proprietary one. It also lacks TV-out, dual-link DVI support, and possibly other features. On the other hand, it supports Aiglx and has better dual-head support.<br />
{{Box Note| The latest proprietary driver does support [[AIGLX]] now. To use [[Compiz]] or [[Beryl]] add Option "AIGLX" "True" to Section ServerFlags and Option "Composite" "True" to Section Extensions.}}<br />
Advanced instructions for ATI configuration can be found in the [[ATI | ATI wiki]].<br />
<br />
===Simple baseline X test===<br />
<br />
At this point, you should have xorg installed, with a suitable video driver and an /etc/X11/xorg.conf configuration file. If you want to test your configuration quickly, to ensure your ability to start '''X''' from the command line before installing a complete desktop environment, you can do so by invoking '''xterm'''. Xterm is a very simple terminal emulator which runs in the '''X '''Server environment; it is installed as part of the base xorg packages. More advanced users who are comfortable with '''X''' configuration may choose to skip this optional step.<br />
<br />
Prepare for the test by configuring a ~/.xinitrc:<br />
<br />
===== ~/.xinitrc =====<br />
One of the main functions of this file is to dictate what '''X''' Window client is invoked with the '''startx''' and/or '''xinit''' command ''on a per-user basis''. (The '''startx''' script is merely a front end to the more versatile '''xinit''' command.) There are ''vast'' amounts of additional configurable specifications that may also be added to ~/.xinitrc as you further customize your system.<br />
{{Box Note | '''.xinitrc''' is a so-called 'dot' (.) file. Files in a UNIX filesystem which are preceded with a dot (.) are 'hidden', and will not show up with a regular 'ls' command, usually for the sake of keeping directories tidy. Dot files may be seen by issuing '''ls -a'''. The 'rc' denotes ''Run Commands'' and simply indicates that it is a configuration file. Since it controls how a program runs, it is (although historically incorrect) also said to stand for "Run Control".}}<br />
<br />
'''startx/xinit''' will start the '''X''' server and clients. To determine the client to run, '''startx/xinit''' will first look for a .xinitrc file in the user's home directory. In the absence of file ~/.xinitrc, it defaults to the global xinitrc in the xinit library directory; /etc/X11/xinit/xinitrc, which defaults to using the TWM window manager. (Hence, if you invoke startx without a ~/.xinitrc file, a TWM session will start.)<br />
<br />
Switch to your '''''normal, non-root''''' user:<br />
su yourusername<br />
* /etc/skel/ contains files and directories to provide sane defaults for newly created user accounts. The name '''skel''' is derived from the word '''skeleton''', because the files it contains form the basic structure for users' home directories.<br />
Copy the sample xinitrc file from /etc/skel/ to your home directory: <br />
<br />
cp /etc/skel/.xinitrc ~/<br />
Edit the file: <br />
nano ~/.xinitrc<br />
and add:<br />
<br />
exec xterm<br />
<br />
So that it looks like this:<br />
<br />
#!/bin/sh<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
exec xterm<br />
# exec wmaker<br />
# exec startkde<br />
# exec icewm<br />
# exec blackbox<br />
# exec fluxbox<br />
<br />
''Be sure to have only one uncommented '''exec''' line in your ~/.xinitrc''. Below, we shall edit this file again to specify the appropriate desktop environment/window manager of your choice.<br />
<br />
Finally, test your configurations by starting '''X''' as '''normal, non-root''' user, with:<br />
<br />
startx<br />
or<br />
xinit<br />
You should have an '''xterm''' session open up. You can exit the '''X''' Server with Ctrl+Alt+Backspace, or by typing "exit". If you have problems starting '''X''', you can look for errors in the /var/log/Xorg.0.log file and on the console output of the console you started '''X''' from.<br />
<br />
If you prove a properly configured /etc/X11/xorg.conf by successfully running the test, you can be assured that your DE/WM of choice will work smoothly.<br />
<br />
Advanced instructions for Xorg configuration can be found in the [[Xorg]] article.<br />
<br />
==Part III: Installing and configuring a Desktop Environment ==<br />
While The '''X''' Window System provides the basic framework for building a ''graphical user interface'' (GUI), a '''Desktop Environment''' (DE), works atop and in conjunction with '''X''', to provide a completely functional and dynamic GUI. A DE typically provides icons, applets, windows, toolbars, folders, wallpapers, applications and abilities like drag and drop. The particular functionalities and designs of each DE will uniquely affect your overall environment and experience. Therefore, choosing a DE is a very subjective and personal decision. Choose the best environment for ''your'' needs.<br />
<br />
* If you want something full-featured and similar to Windows and Mac OSX, '''[[#KDE|KDE]]''' is a good choice<br />
* If you want something slightly more minimalist, which follows the K.I.S.S. principle more closely, '''[[#GNOME|GNOME]]''' is a good choice<br />
* '''[[#Xfce|Xfce]]''' is generally perceived as similar to GNOME, but lighter and less demanding on system resources, yet still visually pleasing and providing a very complete environment.<br />
* '''[[#LXDE|LXDE]]''' is an even lighter choice than Xfce. It provides the most things you need for a modern desktop while keeping relatively low system resource usage. It's not yet as powerful or as complete as GNOME or Xfce, but it can serve your daily needs well. <br />
<br />
If you desire a lighter, less demanding GUI, you may choose to simply install a '''Window Manager''', or WM. A WM controls the placement and appearance of application windows in conjunction with the X Window System but does NOT provide such additions as panels, applets, icons, applications, etc.<br />
* Lightweight floating WM's include: [[#Openbox|'''Openbox''']], [[#Fluxbox|'''Fluxbox''']], [[#fvwm2|'''fvwm2''']], '''Windowmaker, Pekwm, and TWM'''.<br />
* If you need something completely different, try '''Awesome, ion, wmii, dwm, or xmonad'''.<br />
<br />
===Install Fonts===<br />
At this point, you may wish to install visually pleasing, true type fonts, before installing a desktop environment/window manager. Dejavu and bitstream-vera are good, general-purpose font sets. You may also want to have the Microsoft font sets, which are especially popular on websites. <br />
<br />
Install with:<br />
pacman -S ttf-ms-fonts ttf-dejavu ttf-bitstream-vera<br />
<br />
===~/.xinitrc (again)===<br />
<br />
As '''non-root user''', edit your /home/username/.xinitrc to utilize the DE you wish to use. This will allow you to use '''startx/xinit''' from the shell, in the future, to open your DE/WM of choice:<br />
<br />
nano ~/.xinitrc<br />
<br />
Uncomment or add the ''''exec''' ..' line of the appropriate desktop environment/window manager. Some examples are below:<br />
<br />
For the Xfce4 desktop environment:<br />
exec startxfce4 <br />
<br />
For the KDE desktop environment:<br />
exec startkde<br />
A '''startkde''' or '''startxfce4''' command starts the KDE or Xfce4 desktop environment. This command does not finish until you logout of the DE. Normally the shell would wait for KDE to finish, then run the next command. The "exec" prefix to this command tells the shell that this is the last command, so the shell does not need to wait to run a subsequent command.<br />
<br />
Remember to have only one uncommented '''exec''' line in your ~/.xinitrc for now. <br />
<br />
Continue below, installing the DE/WM of your choice.<br />
<br />
* [[#GNOME|'''GNOME''']]<br />
* [[#KDE|'''KDE''']]<br />
* [[#Xfce|'''Xfce''']]<br />
* [[#LXDE|'''LXDE''']]<br />
* [[#Openbox|'''Openbox''']]<br />
* [[#Fluxbox|'''Fluxbox''']]<br />
* [[#fvwm2|'''fvwm2''']]<br />
<br />
===GNOME===<br />
====About GNOME====<br />
The '''G'''NU '''N'''etwork '''O'''bject '''M'''odel '''E'''nvironment. The GNOME project provides two things: The GNOME desktop environment, an intuitive and attractive desktop for end-users, and the GNOME development platform, an extensive framework for building applications that integrate into the rest of the desktop.<br />
<br />
====Installation====<br />
Install the base GNOME environment with:<br />
pacman -S gnome<br />
<br />
Additionally, you can install the extras:<br />
pacman -S gnome-extra<br />
<br />
It's safe to choose all packages shown in the extra package. <br />
<br />
=====Useful DAEMONS for GNOME=====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The '''hal''' daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The '''fam''' daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. Both '''hal''' and '''fam''' make life easier for the GNOME user. The hal and fam packages are installed when you install GNOME, but must be invoked to become useful.<br />
<br />
You may want to install a graphical login manager. For GNOME, the '''gdm''' daemon is a good choice. <br />
<br />
As root:<br />
pacman -S gdm<br />
You will almost certainly want the '''hal''' and '''fam''' daemons.<br />
<br />
Start hal and fam:<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
<br />
Add them to your /etc/rc.conf DAEMONS section, so they will be invoked on bootup:<br />
nano /etc/rc.conf<br />
<br />
DAEMONS=(syslog-ng network crond alsa '''hal fam gdm''')<br />
(If you prefer to log into the console and manually start X, leave out gdm.)<br />
<br />
<br />
As normal user, start X:<br />
startx<br />
If ~/.xinitrc is not configured for GNOME, you may always start it with '''xinit''':<br />
xinit /usr/bin/gnome-session<br />
You may want to install a terminal and an editor. I would recommend gnome-terminal (part of the group gnome-extra) and geany:<br />
pacman -S geany gnome-terminal<br />
<br />
Advanced instructions for installing and configuring GNOME can be found in the [[Gnome]] article.<br />
<br />
Congratulations! Welcome to your GNOME desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
====Eye Candy====<br />
You may find the default GNOME theme and icons not very attractive. A nice gtk theme is murrine. Install it with<br />
pacman -S gtk-engine-murrine<br />
and select it with System->Preferences->Theme. You can find more themes, icons, and wallpaper at [http://www.gnome-look.org Gnome Look].<br />
<br />
===KDE===<br />
====About KDE====<br />
The '''K''' '''D'''esktop '''E'''nvironment. KDE is a powerful Free Software graphical desktop environment for GNU/Linux and <code>UNIX</code> workstations. It combines ease of use, contemporary functionality, and outstanding graphical design with the technological superiority of <code>UNIX</code>-like operating systems.<br />
<br />
====Installation====<br />
Arch offers several versions of kde: '''kde, kdebase, and KDEmod'''. Choose '''one''' of the following, and continue below with '''[[#Useful KDE DAEMONS|Useful KDE DAEMONS]]''': <br />
<br />
'''1.)''' Package '''kde''' is the complete, vanilla KDE, ~300MB.<br />
pacman -S kde<br />
'''2.)''' Package '''kdebase''' is a slimmed-down version with less applications, ~80MB.<br />
pacman -S kdebase<br />
'''3.)''' Lastly, '''KDEmod''' is an Arch Linux exclusive, community-driven system which is modified for extreme performance and modularity. The KDEmod project website can be found at [http://kdemod.ath.cx/ http://kdemod.ath.cx/]. KDEmod is extremely fast, lightweight and responsive, with a pleasing, customized theme.<br />
<br />
====Useful KDE DAEMONS====<br />
<br />
KDE will require the '''hal''' ('''H'''ardware '''A'''bstraction '''L'''ayer) and '''fam''' ('''F'''ile '''A'''lteration '''M'''onitor) daemons. The '''kdm''' daemon is the '''K''' '''D'''isplay '''M'''anager, which provides a '''graphical login''', if desired.<br />
<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system.. Both '''hal''' and '''fam''' make life easier for the KDE user. The hal, fam and kdm packages are installed when you install KDE, but must be invoked to become useful.<br />
-----<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup. If you prefer a graphical login, add '''kdm''' as well: <br />
DAEMONS=(syslog-ng network crond alsa '''hal fam kdm''')<br />
*This method will start the system at runlevel 3, (/etc/inittab default, multiuser mode), and then start KDM as a daemon. <br />
<br />
*Some users prefer an alternative method of starting a display manager like KDM on bootup by utilizing the /etc/inittab method and starting the system at runlevel 5. See [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]] for more.<br />
<br />
*If you prefer to log into the '''console''' at runlevel 3, and manually start X, leave out kdm, or comment it out with an exclamation. ( ! )<br />
<br />
Now try starting your X Server as normal user:<br />
startx<br />
Advanced instructions for installing and configuring KDE can be found in the [[KDE]] article.<br />
<br />
Congratulations! Welcome to your KDE desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===Xfce===<br />
====About Xfce====<br />
The cholesterol-free '''X''' environment. Xfce, like GNOME or KDE, is a desktop environment, but aims to be fast and lightweight while remaining visually appealing and easy to use. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit (like GNOME) and contains its own development environment (libraries, daemons, etc) similar to other big DEs. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware, and will fly with especially great speed on newer machines as well.<br />
<br />
====Installation====<br />
Install Xfce: <br />
pacman -S xfce4 <br />
You may also wish to install themes and extras:<br />
pacman -S xfce4-goodies gtk2-themes-collection<br />
If you want to admire 'Tips and Tricks' on login, you must install the '''fortune-mod''' package:<br />
pacman -S fortune-mod <br />
====Useful DAEMONS====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. The hal and fam packages are installed when you install Xfce, but must be invoked to become useful.<br />
<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup.<br />
<br />
Advanced instructions for installing and configuring Xfce can be found in the [[Xfce]] article.<br />
<br />
If you wish to install one, see [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]]. Otherwise you can login in via the console and run:<br />
<br />
startxfce4<br />
<br />
Congratulations! Welcome to your Xfce desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===LXDE===<br />
====About LXDE====<br />
LXDE, (for ''L''ightweight ''X''11 ''D''esktop ''E''nvironment), is a new project aimed to provide a modern desktop environment which aims to be lightweight, fast, intuitive and functional while keeping system resource usage low. LXDE is quite different from other known desktop environments, since each component of LXDE is a discrete and independent application, and each can be easily substituted by other programs. This modular design eliminates all unnecessary dependencies and provides more flexibility. Details and screenshots available at: http://lxde.org/ <br />
<br />
LXDE provides:<br />
# The OpenBox windowmanager<br />
# PCManFM File manager<br />
# LXpanel system panel<br />
# LXSession session manager<br />
# LXAppearance GTK+ theme switcher<br />
# GPicView image viewer<br />
# Leafpad simple text editor<br />
# XArchiver: Lightweight, fast, and desktop-independent gtk+-based file archiver<br />
# LXNM (still under development): Lightweight network manager for LXDE supporting wireless connections<br />
These lightweight and versatile tools combine for quick setup, modularity and simplicity.<br />
<br />
Install LXDE with: <br />
pacman -S lxde<br />
Add:<br />
exec startlxde<br />
to your ~/.xinitrc and start with ''startx'' or ''xinit''<br />
<br />
Further information available at the [[LXDE]] wiki article.<br />
<br />
===*box===<br />
====Fluxbox====<br />
Fluxbox © is yet another windowmanager for X.<br />
It's based on the Blackbox 0.61.1 code. Fluxbox looks like blackbox and handles styles, colors, window placement and similar things exactly like blackbox (100% theme/style compability).<br />
<br />
Install Fluxbox using <br />
pacman -S fluxbox fluxconf<br />
<br />
If you use gdm/kdm a new fluxbox session will be automatically added. Otherwise, you should modify your user's .xinitrc and add this to it:<br />
exec startfluxbox <br />
<br />
More information is available in the [[Fluxbox]] article.<br />
<br />
====Openbox====<br />
Openbox is a standards compliant, fast, light-weight, extensible window manager.<br />
<br />
Openbox works with your applications, and makes your desktop easier to manage. This is because the approach to its development was the opposite of what seems to be the general case for window managers. Openbox was written first to comply with standards and to work properly. Only when that was in place did the team turn to the visual interface.<br />
<br />
Openbox is fully functional as a stand-alone working environment, or can be used as a drop-in replacement for the default window manager in the GNOME or KDE desktop environments. <br />
<br />
Install openbox using<br />
pacman -S openbox<br />
Additional configuration tools are also available, if desired:<br />
pacman -S obconf obmenu<br />
<br />
Once openbox is installed you will get a message to move menu.xml & rc.xml to ~/.config/openbox/ in your home directory:<br />
<br />
mkdir -p ~/.config/openbox/<br />
cp /etc/xdg/openbox/rc.xml ~/.config/openbox/<br />
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/<br />
<br />
'''rc.xml''' is the main configuration file for OpenBox. It may be manually edited, (or you can use OBconf). '''menu.xml''' configures the right-click menu.<br />
<br />
You may log into OpenBox via graphical login using KDM/GDM, or from the shell using '''startx''', in which case you will need to edit your ~/.xinitrc (as non-root user) and add the following:<br />
<br />
exec openbox-session<br />
You may also start OpenBox from the shell using '''xinit''':<br />
xinit /usr/bin/openbox-session<br />
* Openbox may also be used as the window manager for GNOME, KDE, and Xfce.<br />
For KDM there is nothing left to do; openbox is listed in the sessions menu in KDM.<br />
<br />
Some useful, lightweight programs for OpenBox are:<br />
* PyPanel or LXpanel if you want a panel<br />
* feh if you want to set the background<br />
* ROX if you want a simple file manager (also provides simple icons)<br />
* PcmanFM a lightweight but versatile file manager (also provides desktop icon functionality)<br />
* iDesk (available in [[AUR]]) for providing desktop icons<br />
<br />
More information is available in the [[Openbox]] article.<br />
<br />
===fvwm2===<br />
FVWM is an extremely powerful ICCCM-compliant multiple virtual desktop window manager for the X Window system. Development is active, and support is excellent. <br />
<br />
Install fvwm2 with<br />
pacman -S fvwm <br />
<br />
fvwm will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add <br />
exec fvwm <br />
<br />
to your user's .xinitrc.<br />
<br />
Note that this stable version of fvwm is a few years old. If you want a more recent version of fvwm, there is a fvwm-devel package in the unstable repo.<br />
<br />
=APPENDIX=<br />
<br />
==An Introduction to [[ABS]]==<br />
<br />
[[ABS]] is the Arch Linux Build System. It is a ports-like system for compiling sources into installable packages. <br />
<br />
'Ports' is a system used by *BSD, which utilizes simple build scripts residing in a directory tree on the local machine. Each port is simply a directory, named for the installable 3rd party software, and containing a build script. Typically, a *BSD user who wanted to build and install ''firefox'', would cd into the corresponding firefox port residing under /usr/ports and do <code>make install clean</code>. The ''firefox'' sourcecode would then be downloaded from a 3rd party source. According to the port build script, the sources would then be compiled, patched (if directed), and finally, installed to the system.<br />
<br />
[[ABS]] offers the same functionality by providing build scripts called [[#ABS PKGBUILD Explained | PKGBUILD]]s, which contain all information for a given piece of software; The md5sums, source URL, version, license and compilation instructions. In addition, [[ABS]] provides the advantage of compiling the sources ''into an installable package'' with the extension ''.pkg.tar.gz''. Obviously, it is a simple g-zipped tarball, but it is cleanly installable/removable/trackable via pacman.<br />
<br />
Install the abs package:<br />
pacman -Sy abs<br />
<br />
After installing the ''abs'' package with pacman, run the <code>abs</code> script as root:<br />
# abs <br />
The ''ABS tree'' is then installed under /var/abs, organized according to the installable software. <br />
<br />
To build a package from source, create a build directory and copy the abs directory for a given application to the build directory:<br />
mkdir ~/abs<br />
cp -r /var/abs/extra/x11/slim ~/abs<br />
This will move the slim subdir and PKGBUILD script for slim to the build directory.<br />
{{Box Note | In addition to PKGBUILDs, some software requires an additional *.install file. See the '''[[ABS]]''' and '''[[makepkg]]''' wiki entries for more information}}<br />
navigate to the slim build directory and, after modifying the PKGBUILD if desired or necessary, invoke the abs <code>[[makepkg]]</code> tool<br />
[[makepkg]] -cs<br />
* -c Cleans up any leftover files from the source compilation<br />
* -s Downloads and installs any missing dependencies by invoking pacman<br />
Install with pacman's upgrade switch:<br />
pacman -U slim<version>.pkg.tar.gz<br />
Done. Slim sources are downloaded, compiled, compressed into a package and finally, installed.<br />
{{Box Note | You may build, clean, install any needed dependencies and finally install the package with one command: '''makepkg -csi'''. The above example used pacman -U to install as a separate step for informational purposes. See the '''[[makepkg]]''' man page.}} <br />
Q: Why would I need [[ABS]] to compile and create an installable package from source, when I have access to all of the same software via pacman and the binary repos?<br />
<br />
A: A few reasons:<br />
*For installing newer, unstable, custom, or development versions of an application.<br />
PKGBUILDs are transparent and simple. Edit the software version and the md5sums of the desired versions within the PKGBUILD, and build and install your custom packages.<br />
*For patching.<br />
Copy the corresponding PKGBUILD to a build directory along with your patch, edit the PKGBUILD, and build/install with <code>makepkg</code>.<br />
*For creating your own packages for yourself, or to share with the community on the [[AUR]].<br />
You are not limited to the PKGBUILDs under /var/abs. Create your own to build from 3rd party sourcecode. They are simple, open and transparent. Explore the prototpe PKGBUILD provided at /usr/share/pacman/PKGBUILD.proto<br />
*ABS provides an expedient method for recompiling, if necessary. <br />
For example, to recompile your video or wireless drivers.<br />
* To build an installable package with custom configurations<br />
Enable or disable options in any package by modifying the PKGBUILD<br />
* To build an installable package, further optimized for your machine's architecture, <br />
Specify your [[#makepkg.conf | CFLAGS]] in /etc/[[makepkg]].conf.<br />
* To rebuild your entire system, further optimized for your machine's architecure.<br />
Use the makeworld script, or the community-contributed [http://bbs.archlinux.org/viewtopic.php?id=48957 pacbuilder]<br />
==An Introduction to The [[AUR]]==<br />
The '''A'''rch '''U'''ser '''R'''epository<br />
<br />
The [[ABS]] tree provides the ability to build all Arch software available in the [core], [extra], [community], [unstable] and [testing] repositories. The [[AUR]] does not provide a tree on the local machine, but rather, an unsupported repository sporting a handsome web interface at http://aur.archlinux.org/index.php Also, there is an AUR link tab at the top right of every page on the Arch site.<br />
<br />
Once you have navigated to the AUR web page, click on the '''Packages''' button on the top right. You will be brought to the packages search page. <br />
<br />
The general procedure will be:<br />
# Enter the search criteria into the '''keywords''' field and click on '''go'''. The next screen will present all related results.<br />
# Take note of the '''Location''' on the package listing. If the package location is in '''community''', you have not done your homework, and should simply use pacman or ABS to install. If the location is '''unsupported''', continue. <br />
# Click on the name of the package on the package listing. You will be brought to the Package Details page.<br />
An example for the '''yaourt''' package:<br />
yaourt 0.9-2<br />
http://www.archlinux.fr/yaourt-en/<br />
A Pacman frontend with more features and AUR support<br />
unsupported :: system<br />
Maintainer: wain<br />
Votes: 943<br />
License: GPL<br />
Last Updated: Sat, 15 Mar 2008 17:15:20 +0000<br />
First Submitted: Tue, 04 Jul 2006 20:37:58 +0000<br />
Tarball :: Files :: PKGBUILD<br />
Click on the '''Tarball''' link in the last line of the details, and save to a build directory.<br />
<br />
Navigate to, and extract the tarball:<br />
tar -xvf yaourt.tar.gz<br />
Enter the build directory and invoke makepkg, which will download the sources, compile, and compress the installation into an installable .pkg.tar.gz package:<br />
makepkg -c<br />
Install with pacman's upgrade switch:<br />
pacman -U yaourt<version>.pkg.tar.gz<br />
Done.<br />
<br />
See the [[AUR]] wiki entry for more information.<br />
<br />
==Tweaks/Finishing touches==<br />
===Install an AUR Helper===<br />
[[AUR Helpers]] add seamless access to the [[AUR]]. They vary in their features, but can ease in searching, fetching, building, and installing from over 9000 PKGBUILDs found in AUR.<br />
<br />
===HAL===<br />
Since you have now installed a desktop environment/window manager, and if you did not do so earlier, now would be a good time to also install HAL. HAL allows plug-and-play for your mobile phone, your iPod, your external HD's, etc. It will mount the device and make a nice visual icon on your desktop and/or in 'My Computer', allowing you to access the device after you have plugged it in instead of having to manually configure the /etc/fstab file or udev rules for each and every new device.<br />
<br />
KDE, GNOME and XFCE all use HAL.<br />
<br />
The installation procedure is described in the [[HAL]] article. Some information can also be found at [http://en.wikipedia.org/wiki/HAL_(software) Wikipedia].<br />
<br />
===Backgrounding DAEMONS on startup===<br />
<br />
To speed up system start up procedure, background selected DAEMONS in /etc/rc.conf by prefixing them with a '@' e.g.:<br />
<br />
DAEMONS=(syslog-ng @network crond @alsa @hal @fam @kdm)<br />
This will enable daemons to load in the background, without waiting for the preceding daemon to load first.<br />
<br />
Prefix any daemons which you do not need with a bang (!) e.g.:<br />
<br />
DAEMONS=(syslog-ng @network !netfs !crond @alsa @hal @fam @kdm)<br />
<br />
Alternatively, you may also simply remove unneeded daemons.<br />
<br />
===Beautifying Fonts for LCD's===<br />
See [[Fonts]]<br />
<br />
===Adjusting Mouse for scroll wheel===<br />
While your mouse should be working out of the box, you may want to use your scroll wheel. Add this to your Input Section (mouse0):<br />
Option "ZAxisMapping" "4 5 6 7"<br />
<br />
===Get All Mouse Buttons Working===<br />
See [[Get All Mouse Buttons Working]]<br />
<br />
===Configuring Touchpad for Laptops===<br />
See [[Touchpad Synaptics]]<br />
<br />
===Adjusting Keyboard Layout===<br />
You may want to change your keyboard layout. To do this edit your /etc/X11/xorg.conf and add these lines in the InputDevice Section (Keyboard0) (the example shows a German keyboard layout with no dead keys; alter this to fit your needs).<br />
Option "XkbLayout" "de"<br />
Option "XkbVariant" "nodeadkeys"<br />
<br />
===Additional tweaks for laptops===<br />
ACPI support is needed if you want to use some special functions on your notebook (e.g. sleep, sleep when lid is closed, special keys...). Install <tt>acpid</tt> using<br />
pacman -S acpid<br />
and add it to the daemons in /etc/rc.conf. If you already have '''hal''' specified in your DAEMONS, there is no need to add '''acpid'''. HAL will automatically detect and load the acpid daemon. Manually, it can be started by<br />
/etc/rc.d/acpid start<br />
<br />
More-specific information about Arch Linux on various Laptops can be found at [[:Category:Laptops (English)]]<br />
<br />
===Configuring CPU frequency scaling===<br />
Modern processors can decrease their frequency and voltage to reduce heat and power consumption. Less heat leads to a quieter system; Laptop users will definitely want this, but even a desktop system will benefit from it. Install cpufrequtils with<br />
pacman -S cpufrequtils<br />
Edit the config file /etc/conf.d/cpufreq and change <br />
governor="ondemand"<br />
which dynamically increases the CPU frequency if needed (which is a safe choice on desktop systems too). Alter min_freq and max_freq to match your system's CPU spec. If you do not know the frequencies, run ''cpufreq-info'' after loading one of the frequency scaling modules. You can also comment out or delete the min_freq and max_freq lines: things will work automatically. Add the frequency scaling modules to your /etc/rc.conf modules line. Most modern notebooks and desktops can simply use the ''acpi-cpufreq'' driver, however other options include the ''p4-clockmod, powernow-k6, powernow-k7, powernow-k8, and speedstep-centrino'' drivers. Load the module with<br />
modprobe <modulname> <br />
and start cpufreq with<br />
/etc/rc.d/cpufreq start<br />
For more details, see [[Cpufrequtils]]<br />
<br />
===Pm-Utils===<br />
The pm-utils package will allow you to suspend-to-RAM and hibernate: <br />
pacman -S pm-utils<br />
[[Pm-utils]] wiki page.<br />
<br />
===Laptop-Mode===<br />
The laptop-mode-tools package is sort of a one-stop configuration for all laptop power management utilities. It works in conjunction with other installed tools to fully configure everything from hard disk spin-down to X display DPMS standby times, if desired.<br />
pacman -S laptop-mode-tools<br />
Add laptop-mode to your DAEMONS= line in /etc/rc.conf and configure /etc/laptop-mode/laptop-mode.conf.<br />
<br />
==File and directory explanation==<br />
<br />
"Shareable" files are defined as those that can be stored on one host and<br />
used on others. "Unshareable" files are those that are not shareable. For<br />
example, the files in user home directories are shareable whereas device<br />
lock files are not. "Static" files include binaries, libraries,<br />
documentation files and other files that do not change without system<br />
administrator intervention. "Variable" files are defined as files that<br />
are not static.<br />
<br />
'''/''' (root) The root filesystem is the primary filesystem from which all other filesystems stem; the top of the hierarchy. All files and directories appear under the root directory "/", even if they are stored on different physical devices. The contents of the root filesystem must be adequate to boot, restore, recover, and/or repair the system.<br />
<br />
'''/bin/''' Essential command binaries that must be available in single user mode; for all users (e.g., cat, ls, cp). /bin/ provides programs that must be available even if only the partition containing / is mounted. This situation may arise should one need to repair other partitions but have no access to shared directories (i.e. you are in single user mode and therefore have no network access). Unlike /sbin, the /bin directory contains several useful commands that are of use to both the root user as well as non-root users.<br />
<br />
'''/boot/''' Unshareable, static directory containing the kernel and ramdisk images as well as the bootloader configuration file, and bootloader stages. /boot also stores data that is used before the kernel begins executing userspace programs. This may include saved master boot sectors and sector map files.<br />
<br />
'''/dev/''' Essential device nodes created by udev during the boot process and as machine hardware is discovered by events. This directory highlights one important aspect of the <code>UNIX</code> filesystem - everything is a file or a directory. Exploring this directory will reveal many files, each representing a hardware component of the system. The majority of devices are either block or character devices; however other types of devices exist and can be created. In general, 'block devices' are devices that store or hold data, whereas 'character devices' can be thought of as devices that transmit or transfer data. For example, hard disk drives and optical drives are categorized as block devices while serial ports, mice and USB printer ports are all character devices.<br />
<br />
'''/etc/''' Host-specific, unshareable global configuration files shall be placed in the /etc directory. If more than one configuration file is required for an application, it is customary to utilize a subdirectory in order to keep the /etc/ area as clean as possible. It is considered good practice to make frequent backups of this directory as it contains all system related configuration files. <br />
:'''/etc/conf.d/''' Some daemon scripts will have a matching configuration file in this directory that contains some useful default values. When a daemon is started, it will first source the settings from its config file within this directory, and then source /etc/rc.conf. Arch's simple, transparent scripting approach means you can easily centralize all your daemon configuration options in your /etc/rc.conf simply by setting an appropriate variable value, or, split up your configuration over multiple files if you prefer a decentralized approach to this issue. <br />
:'''/etc/rc.d/''' All Arch daemons reside here. Custom scripts may also be placed here and invoked from the DAEMONS= array in /etc/rc.conf<br />
:'''/etc/X11/''' Configuration files for the X Window System<br />
:::'''/etc/X11/xinit/''' xinit configuration files. 'xinit' is a configuration method of starting up an X session that is designed to be used as part of a script. <br />
:::'''/etc/X11/xinit/xinitrc''' Global xinitrc file, used by all X sessions started by xinit (startx). Its usage is of course overridden by a .xinitrc file located in the home directory of a user.<br />
<br />
'''/home/''' <code>UNIX</code> is a multi-user environment. Therefore, each user is also assigned a specific directory that is accessible only to them and to the root user. These are the user home directories, which can be found under '/home/$USER' (~/). Within their home directory, a user can write files, delete them, install programs, etc. Users' home directories contain their data and personal configuration files, the so-called 'dot files' (their name is preceded by a dot), which are 'hidden'. To view dotfiles, enable the appropriate option in your file manager or run ls with the -a switch. If there is a conflict between personal and system wide configuration files, the settings in the personal file will prevail. Dotfiles most likely to be altered by the end user include .xinitrc and .bashrc files. The configuration files for xinit and Bash respectively. They allow the user the ability to change the window manager to be started upon login and also aliases, user-specified commands and environment variables respectively. When a user is created, their dotfiles shall be taken from the /etc/skel directory where system sample files reside. <br />
'''/home''' can become quite large as it is typically used for storing downloads, compiling, installing and running programs, mail, collections of multimedia files etc.<br />
<br />
'''/lib/''' Contains kernel modules and essential shared library images (the C programming code library) needed to boot the system and run the commands under /bin/ and /sbin/. Libraries are collections of frequently used program routines and are readily identifiable through their filename extension of *.so. They are essential for basic system functionality. Kernel modules (drivers) are in the subdirectory /lib/modules/<kernel-version>.<br />
<br />
'''/lost+found''' <code>UNIX</code>-like operating systems must execute a proper shutdown sequence. At times, a system might crash or a power failure might take the machine down. Either way, at the next boot, a filesystem check using the ''fsck'' program shall be performed. ''Fsck'' will go through the system and try to recover any corrupt files that it finds. The result of this recovery operation will be placed in this directory. The files recovered are not likely to be complete or make much sense but there always is a chance that something worthwhile is recovered.<br />
<br />
'''/media/''' Mount points for removable media. CDROMs, DVD's, and USB sticks shall have an appropriate mount point under /media/. The motivation for the creation of this directory has been that historically there have been a number of other different places used to mount removeable media such as /cdrom, /mnt or /mnt/cdrom. Placing the mount points for all removeable media directly in the root directory would potentially result in a large number of extra directories in /. Although the use of subdirectories in /mnt as a mount point has recently been common, it conflicts with a much older tradition of using /mnt directly as a temporary mount point. Therefore, Arch allocates /media as the mountpoint for removable media. On systems where more than one device exists for mounting a certain type of media, mount directories shall be created by appending a digit to the name of those available above starting with '0', but the unqualified name must also exist.<br />
* hal mounts removable media to /media as /media/<name_of_removable_filesystem><br />
<br />
'''/mnt/''' This is a generic mount point for temporary filesystems or devices. Mounting is the process of making a filesystem available to the system. After mounting, files will be accessible under the mount-point. Additional mount-points (subdirectories) may be created under /mnt/. There is no limitation to creating a mount-point anywhere on the system, but by convention and for practicality, littering a file system with mount-points should be avoided.<br />
<br />
'''/proc/''' /proc is very special in that it is also a virtual filesystem. It is sometimes referred to as the ''process information pseudo-file system''. It doesn't contain 'real' files, but rather, runtime system information (e.g. system memory, devices mounted, hardware configuration, etc). For this reason it can be regarded as a control and information center for the kernel. In fact, quite a lot of system utilities are simply calls to files in this directory. For example, 'lsmod' is the same as 'cat /proc/modules' while 'lspci' is a synonym for 'cat /proc/pci'. By altering files located in this directory, kernel parameters may be read/changed (sysctl) while the system is running.<br />
<br />
The most distinctive facet about files in this directory is the fact that all of them have a file size of 0, with the exception of '''kcore, mounts''' and '''self'''. <br />
<br />
'''/root/''' Home directory of the System Administrator, 'root'. This may be somewhat confusing, ('/root under root') but historically, '/' was root's home directory (hence the name of the Administrator account). To keep things tidier, 'root' eventually got his own home directory. Why not in '/home'? Because '/home' is often located on a different partition or even on another system and would thus be inaccessible to 'root' when - for some reason - only '/' is mounted. <br />
<br />
'''/sbin/''' <code>UNIX</code> discriminates between 'normal' executables and those used for system maintenance and/or administrative tasks. The latter reside either here or - the less important ones - in /usr/sbin. Programs executed after /usr is known to be mounted (when there are no problems) are generally placed into /usr/sbin. This directory contains binaries that are essential to the working of the system. These include system administration as well as maintenance and hardware configuration programs. grub (the command), fdisk, init, route, ifconfig, etc., all reside here. Another directory that contains system binaries is /usr/sbin. <br />
<br />
'''/srv/''' Site-specific data which is served by the system. The main purpose of specifying this is so that users may find the location of the data files for a particular service, and so that services which require a single tree for readonly data, writable data and scripts (such as cgi scripts) can be reasonably placed. Data that is only of interest to a specific user shall be placed that user's home directory.<br />
<br />
<br />
'''/tmp''' This directory contains files that are required temporarily. Many programs use this to create lock files and for temporary storage of data. Do not remove files from this directory unless you know exactly what you are doing! Many of these files are important for currently running programs and deleting them may result in a system crash. On most systems, this directory is cleared out at boot or at shutdown by the local system. The basis for this was historical precedent and common practice<br />
<br />
'''/usr/''' While root is the primary filesystem, /usr is the secondary hierarchy, for user data, containing the majority of (multi-)user utilities and applications. /usr is shareable, read-only data. This means that /usr shall be shareable between various hosts and must not be written to, except in the case of system administrator intervention (installation, update, upgrade). Any information that is host-specific or varies with time is stored elsewhere. <br />
<br />
Aside from /home/, /usr/ usually contains by far the largest share of data on a system. Hence, this is one of the most important directories in the system as it contains all the user binaries, their documentation, libraries, header files, etc. X and its supporting libraries can be found here. User programs like telnet, ftp, etc., are also placed here. In the original <code>UNIX</code> implementations, /usr/ (for ''user''), was where the home directories of the system's users were placed (that is to say, /usr/''someone'' was then the directory now known as /home/''someone''). Over time, /usr/ has become where userspace programs and data (as opposed to 'kernelspace' programs and data) reside. The name has not changed, but its meaning has narrowed and lengthened from ''everything user related'' to ''user usable programs and data''. As such, the backronym ''''U'''ser '''S'''ystem '''R'''esources' was created. <br />
::'''/usr/bin/''' Non-essential command binaries (not needed in single user mode); for all users. This directory contains the vast majority of binaries (applications) on your system. Executables in this directory vary widely. For instance vi, gcc, and gnome-session reside here.<br />
::'''/usr/include/''' Header files needed for compiling userspace source code..<br />
::'''/usr/lib/''' Libraries for the binaries in /usr/bin/ and /usr/sbin/.<br />
::'''/usr/sbin/''' Non-essential system binaries of use to the system administrator. This is where the network daemons for the system reside, along with other binaries that (generally) only the system administrator has access to, but which are not required for system maintenance and repair. Normally, these directories are never part of normal user's $PATHs, only of root's (PATH is an environment variable that controls the sequence of locations that the system will attempt to look in for commands).<br />
::'''/usr/share/''' This directory contains 'shareable', architecture-independent files (docs, icons, fonts etc). Note, however, that '/usr/share' is generally not intended to be shared by different operating systems or by different releases of the same operating system. Any program or package which contains or requires data that doesn't need to be modified should store that data in '/usr/share/' (or '/usr/local/share/', if manually installed- see below). It is recommended that a subdirectory be used in /usr/share for this purpose.<br />
::'''/usr/src/''' The 'linux' sub-directory holds the Linux kernel sources, and header-files.<br />
::'''/usr/local/''' Optional tertiary hierarchy for local data. The original idea behind '/usr/local' was to have a separate ('local') '/usr/' directory on every machine besides '/usr/', which might be mounted read-only from somewhere else. It copies the structure of '/usr/'. These days, '/usr/local/' is widely regarded as a good place in which to keep self-compiled or third-party programs. This directory is empty by default in Arch Linux. It may be used for manually compiled software installations if desired. Pacman installs to /usr/, therefore, manually compiled/installed software installed to /usr/local/ may peacefully co-exist with pacman-tracked system software. <br />
<br />
'''/var/''' Variable files, such as logs, spool files, and temporary e-mail files. On Arch, the [[ABS]] tree and pacman cache also reside here. Why not put the variable and transient data into /usr/? Because there might be circumstances when /usr/ is mounted as read-only, e.g. if it is on a CD or on another computer. '/var/' contains variable data, i.e. files and directories the system must be able to write to during operation, whereas /usr/ shall only contain static data. Some directories can be put onto separate partitions or systems, e.g. for easier backups, due to network topology or security concerns. Other directories have to be on the root partition, because they are vital for the boot process. 'Mountable' directories are: '/home', '/mnt', '/tmp', '/usr' and '/var'. Essential for booting are: '/bin', '/boot', '/dev', '/etc', '/lib', '/proc' and '/sbin'. <br />
::'''/var/abs/''' The [[ABS]] tree. A ports-like package build system hierarchy containing build scripts within subdirectories corresponding to all installable Arch software.<br />
::'''/var/cache/pacman/pkg/''' The pacman package cache. <br />
::'''/var/lib/''' State information. Persistent data modified by programs as they run (e.g. databases, packaging system metadata etc.).<br />
::'''/var/lock/''' Unsharable Lock files data. Files keeping track of resources currently in use.<br />
::'''/var/log/''' Log files. <br />
::'''/var/mail/''' Shareable directory for users' mailboxes.<br />
::'''/var/run/''' Unshareable data about the running system since last boot (e.g. currently logged-in users and running daemons).<br />
::'''/var/spool/''' Spool for tasks waiting to be processed (e.g. print queues and unread mail).<br />
::'''/var/spool/mail/''' Deprecated location for users' mailboxes.<br />
::'''/var/tmp/''' Temporary files to be preserved between reboots.<br />
'''/opt/''' Packages that do not fit cleanly into the above GNU filesystem layout can be placed here. If a package's files cannot be cleanly placed into the above directories, then /opt shall be used. /opt shall therefore contain shareable data.<br />
<br />
For example, the acrobat package has Browser, Reader, and Resource<br />
directories sitting at the same level as the bin directory. This<br />
doesn't fit into a normal GNU filesystem layout, so Arch places all the<br />
files in a subdirectory of /opt.<br />
<br />
==Boot Scripts==<br />
<br />
Arch Linux uses a fairly simple bootup sequence quite similar to *BSDs. The first boot script to run is /etc/rc.sysinit. When it's done, /etc/rc.multi will be called (in a normal bootup). The last script to run will be /etc/rc.local. When started in runlevel 1, the single user mode, the script /etc/rc.single is run instead of /etc/rc.multi. You will not find an endless symlink collection in the /etc/rc?.d/ directories to define the bootup sequence for all possible runlevels. In fact, due to this approach Arch only really has three runlevels, if you take starting up X in runlevel 5 into account. The boot scripts are using the variables and definitions found in the /etc/rc.conf file and also a set of general functions defined in the<br />
/etc/rc.d/functions script. If you plan to write your own daemon<br />
files, you should consider having a look at this file and existing<br />
daemon scripts.<br />
<br />
Boot Script Overview<br />
#/etc/inittab<br />
#/etc/rc.sysinit<br />
#/etc/rc.single<br />
#/etc/rc.multi<br />
#/etc/rc.local<br />
#/etc/profile<br />
#/etc/rc.shutdown<br />
#/etc/rc.local.shutdown<br />
#/etc/rc.d/*<br />
<br />
'''/etc/inittab'''<br />
<br />
After the kernel is loaded, it looks for the program <code>init</code> which resides at /sbin/init. <code>init</code> reads the file /etc/inittab, which tells it what to do. Looking over the inittab script, you will find that the first uncommented line defines the default system runlevel, or, 3. The next thing it is told to do is to run an initialization script. The program that executes (or interprets) this script is bash, the same program that gives you a command prompt. In Arch Linux, the main initialization script is /etc/rc.sysinit. /etc/inittab also defines your virtual consoles, which are 'respawned' by /sbin/init if terminated. Lastly, inittab defines a login manager, if starting the system at runlevel 5 is desired. The login manager is also respawned by /sbin/init if terminated.<br />
<br />
'''/etc/rc.sysinit'''<br />
<br />
The main system boot script, which mounts filesystems, runs udev, activates swap, loads modules, sets localization parameters, etc. <br />
<br />
'''/etc/rc.single'''<br />
<br />
Single-user startup. Not used in a normal boot-up. If the system is started in single-user mode, for example with the kernel parameter 1 before booting or during normal multi-user operation with the command init 1, this script makes sure no daemons are running except for the bare minimum; syslog-ng and udev. The single-user mode is useful if you need to make any changes to the system while making sure that no remote user can do anything that might cause data loss or damage. <br />
For desktop users, this mode is usually quite useless.<br />
<br />
'''/etc/rc.multi'''<br />
<br />
Multi-user startup script. It starts all daemons you configured in the DAEMONS array (set in /etc/rc.conf) after which it calls /etc/rc.local. <br />
<br />
'''/etc/rc.local'''<br />
<br />
Local multi-user startup script. It is a good place to put any last-minute commands you want the system to run at the very end of the bootup process. Most common system configuration tasks, like loading modules, changing<br />
the console font or setting up devices, usually have a dedicated place where they belong. To avoid confusion, you should make sure that whatever you intend to add to your rc.local is not already residing in /etc/profile.d/, or any other already existing config location instead.<br />
<br />
'''/etc/profile''' This script is run on each user login to initialize the system. It also globally defines PS1, $PATH, bash aliases, etc. It is kept quite simple under Arch Linux, as most things are. You may wish to edit or customize it to suit your needs.<br />
<br />
'''/etc/rc.shutdown''' <br />
<br />
System shutdown script. It stops daemons, unmounts filesystems, deactivates the swap, etc. <br />
<br />
'''/etc/rc.local.shutdown''' (Optional)<br />
<br />
Analogous to the /etc/rc.local file, this file may contain any commands you want to run right before the common rc.shutdown is executed. Please note that this file does not exist by default, and for it to work properly, it must be set as executable.<br />
<br />
<br />
'''/etc/rc.d/*'''<br />
<br />
This directory contains the daemon scripts referred to from the rc.conf's DAEMONS= array. In addition to being called on bootup, you can use these scripts when the system is running to manage the services of your system. For example the command<br />
/etc/rc.d/postfix stop<br />
<br />
will stop the postfix daemon. This directory is not in the $PATH by default, but may be added for convenience. Obviously a corresponding daemon script only exists when the appropriate package has been installed (in this case postfix). With a base system install, there are few scripts in here, but rest assured that all relevant daemon scripts end up here. If you wish, you can, of course, create your own scripts and place them here, to be called by the DAEMONS= array in /etc/rc.conf on system startup. <br />
<br />
This directory is pretty much the equivalent to the /etc/rc3.d/ or /etc/init.d/ directories of other distributions, but without all the symlink hassle. The lack of symlink requirement is a defining difference of a *BSD-style init framework, vs a sysvinit.<br />
<br />
==Useful Applications==<br />
This section will never be complete. It just shows some good applications for the everyday user. <br />
<br />
'''KDE users NOTE''': Since KDE resides in /opt, you will most likely have to log out and in after initial installation to update your PATH before these programs can be used.<br />
<br />
===Web browser===<br />
<br />
=====Firefox=====<br />
The ever-popular Firefox web browser is available through pacman, although it does not have its official branding. Therefore, the program appears as its development codename, ''Gran Paradiso'', when opened.<br />
<br />
Install with:<br />
<br />
pacman -S firefox<br />
Be sure and install 'flashplugin', 'mplayer', 'mplayer-plugin', and the 'codecs' packages for a complete web experience:<br />
pacman -S flashplugin mplayer mplayer-plugin codecs<br />
(The codecs package contains most codecs, including those for Win32, Quicktime and Realplayer9 content.)<br />
<br />
Thunderbird is useful for managing your emails. If you are using GNOME you may want to take a look at Epiphany and Evolution; if you are using KDE Konqueror and KMail could be your choice. If you want something completely different you can still use Opera. Finally, if you are working on the system console - or in a terminal session - you could use various text-based browsers like ELinks, Links and Lynx, and manage your emails with [[Mutt]]. Pidgin (previously known as Gaim) and Kopete are good instant messengers for GNOME and KDE, respectively. PSI and Gajim are perfect if you are using only Jabber or Google Talk.<br />
<br />
===Office===<br />
OpenOffice.org is a complete office suite (similar to Microsoft Office). Abiword is a good, small alternative word processor, and Gnumeric an Excel replacement for the GNOME desktop. KOffice is a complete office suite for the KDE Desktop. GIMP (or GIMPShop) is a pixel-based graphics program (similar to Adobe Photoshop), while Inkscape is a vector-based graphics program (like Adobe Illustrator). And, of course, Arch comes with a full set of LaTeX Programs: tetex has been popular for many years and still works, and its successor [[Texlive]] is available from the [[AUR]] repository.<br />
<br />
===Video Player===<br />
====VLC====<br />
VLC Player is a versatile multimedia player which can many different formats, from a disc or file. It also provides the ability to stream multimedia over a lan. To install it, simply type the code below.<br />
<br />
pacman -S vlc<br />
<br />
(TODO) Instructions for VLC mozilla plug-in<br />
<br />
====Mplayer====<br />
MPlayer is a multimedia player for Linux. To install it, simply type the code below.<br />
<br />
pacman -S mplayer<br />
<br />
It also has a Mozilla plug-in for videos and streams embedded in web pages. To install it, simply type the code below.<br />
<br />
pacman -S mplayer-plugin<br />
<br />
If you use KDE, KMplayer is a better choice. It comes with a plug-in for videos and streams embedded in web pages, which works with Konqueror. To install it, simply type the code below.<br />
<br />
pacman -S kmplayer<br />
<br />
(TODO) GMPlayer instructions<br />
<br />
====Xine====<br />
<br />
Xine is an excellent player, especially for DVDs.<br />
<br />
pacman -S xine-ui<br />
The libdvdcss library provides DVD decoding for encrypted DVDs. ''Ensure the legality of using libdvdcss in your country before installing!''<br />
pacman -S libdvdcss<br />
<br />
====GNOME====<br />
=====Totem=====<br />
[http://www.gnome.org/projects/totem/ Totem] is the official movie player of the GNOME desktop environment based on xine-lib or GStreamer (gstreamer is the default which installs with the arch totem package). It features a playlist, a full-screen mode, seek and volume controls, as well as keyboard navigation.<br />
It comes with added functionality such as:<br />
<br />
* Video thumbnailer for the file manager<br />
* Nautilus properties tab<br />
* Epiphany / Mozilla (Firefox) plugin to view movies inside your browser <br />
* Webcam utility (in development)<br />
<br />
Totem-xine is still the better choice if you want to watch DVDs.<br />
<br />
Totem is part of the gnome-extra group; the Totem webbrowser plugin is not.<br />
<br />
To install separately:<br />
pacman -S totem<br />
<br />
To install the Totem webbrowser plugin:<br />
pacman -S totem-plugin<br />
<br />
====KDE====<br />
=====Kaffeine=====<br />
Kaffeine is a good option for KDE users. To install it, simply type the code below.<br />
<br />
pacman -S kaffeine<br />
<br />
===Audio Player===<br />
====Gnome/Xfce====<br />
=====Exaile=====<br />
[[Exaile]] is a music player written in Python that makes use of the GTK+ toolkit. It tries to be close to the popular Amarok, but in GTK. It is in [community], so install with:<br />
pacman -S exaile<br />
<br />
=====Rhythmbox=====<br />
[http://www.gnome.org/projects/rhythmbox/ Rhythmbox] is an integrated music management application, originally inspired by Apple's iTunes. It is free software, designed to work well under the GNOME Desktop, and based on the powerful GStreamer media framework.<br />
<br />
Rhythmbox has a number of features, including:<br />
<br />
* Easy-to-use music browser<br />
* Searching and sorting<br />
* Comprehensive audio format support through GStreamer<br />
* Internet radio support<br />
* Playlists<br />
<br />
To install rhythmbox:<br />
pacman -S rhythmbox<br />
<br />
=====Quod Libet=====<br />
[http://www.sacredchao.net/quodlibet Quod Libet] is a music manager that uses the GStreamer media framework to play audio files. This allows it to play all the file-types that Rhythmbox (which uses GStreamer too) can play. Quod Libet is more suited to non-Gnome desktops since it has a smaller footprint and fewer dependencies than Rhythmbox (Rhythmbox depends on nautilus, which requires a lot of GNOME to be installed).<br />
<br />
In addition to the music player/manager, Quod Libet also includes Ex Falso, a tag editor.<br />
<br />
Quod Libet's features include:<br />
<br />
* Easy-to-use music browser<br />
* Searching<br />
* Comprehensive audio format support through GStreamer<br />
* Easy Playlist management<br />
<br />
To install Quod Libet:<br />
pacman -S quodlibet<br />
<br />
Other good audio players are Banshee and Listen. See [http://gnomefiles.org/ Gnomefiles] to compare them.<br />
<br />
====KDE====<br />
=====Amarok=====<br />
[http://amarok.kde.org/ Amarok] is one of the best audio players and music library systems available for KDE. To install it, simply type the code below.<br />
<br />
pacman -S amarok-base<br />
<br />
====Console====<br />
[http://moc.daper.net/ Moc] is a ncurses-based audio player for the console. Other excellent choices are [http://musicpd.org/ mpd], [http://freshmeat.net/projects/cmus/ cmus], and [http://herrie.info/ herrie].<br />
<br />
====Other X-based====<br />
(TODO) Xmms, audacious, bmpx.<br />
<br />
===Codecs and other multimedia content types (i686 only) ===<br />
====DVD====<br />
You can use xine-ui, totem-xine, mplayer or kaffeine (just to name three of the big ones) to watch DVDs. The only thing you may miss is libdvdcss. Beware that using it may be illegal in some countries.<br />
<br />
====Flash====<br />
Install the flash plugin using<br />
pacman -S flashplugin<br />
to enable Macromedia (now Adobe) Flash in your browser, if you run KDE you should see this after installing flash. http://wiki.archlinux.org/index.php/Flash_and_Adobe_Acrobat_browser_plugins#Fixing_Flash_in_Konqueror<br />
<br />
====Quicktime====<br />
Quicktime codecs are contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them.<br />
====Realplayer====<br />
The codec for Realplayer 9 is contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them. Realplayer 10 is available as a binary package for Linux. You can get it from AUR [http://aur.archlinux.org/packages.php?do_Details=1&ID=1590&O=0&L=0&C=0&K=realplay&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here].<br />
<br />
===CD and DVD Burning===<br />
====GNOME====<br />
=====Brasero=====<br />
[http://www.gnome.org/projects/brasero/ Brasero] is an application that burns CDs/DVDs for the GNOME Desktop. It is designed to be as simple as possible and has some unique features to enable users to create their discs easily and quickly.<br />
<br />
To install:<br />
pacman -S brasero<br />
<br />
====KDE====<br />
=====K3b=====<br />
K3b (from '''K'''DE '''B'''urn '''B'''aby '''B'''urn) is a free software CD and DVD authoring application for GNU/Linux and other <code>UNIX</code>-like operating systems designed for KDE. As is the case with most KDE applications, K3b is written in the C++ programming language and uses the Qt GUI toolkit. K3b provides a graphical user interface to perform most CD/DVD burning tasks like creating an Audio CD from a set of audio files or copying a CD/DVD, as well as more advanced tasks such as burning eMoviX CD/DVDs. It can also perform direct disc-to-disc copies. The program has many default settings which can be customized by more experienced users. The actual disc recording in K3b is done by the command line utilities cdrecord or wodim, cdrdao, and growisofs. As of version 1.0, K3b features a built-in DVD ripper.- licensed under the GPL.<br />
<br />
K3b was voted LinuxQuestions.org's Multimedia Utility of the Year (2006) by the majority (70%) of voters. <br />
-----<br />
To install:<br />
pacman -S k3b<br />
<br />
=====(Todo) cdrecord, graveman...=====<br />
<br />
<br />
<br />
<br />
Most CD burners are wrappers for cdrecord:<br />
<br />
pacman -S cdrkit<br />
<br />
If you install packages for CD/DVD burning applications like Brasero or K3B it also installs the CD/DVD burning library for it, like libburn or cdrkit.<br />
<br />
A good command-line DVD-burning tool is growisofs:<br />
<br />
pacman -S dvd+rw-tools<br />
<br />
===TV-Cards===<br />
<br />
There are several things to do if you want to watch TV under (Arch) Linux. The most important task is to find out which chip your tuner is using. However, quite a lot are supported. Be sure to check at a Hardware Database to be sure (see [http://en.opensuse.org/HCL/TV_Cards this list], for example). Once you know your Model, there are just a few steps ahead to get you going.<br />
<br />
In most cases, you will need to use the bttv-drivers (other drivers exist, like [http://linux.bytesex.org/v4l2/drivers.html V4L]) together with the I2C-modules. Configuring those is the hardest task. If you are lucky, a<br />
modprobe bttv<br />
will autodetect the card (check dmesg for results). In that case, you need only to install an application to watch TV. We will look at that later, though.<br />
If the autodetection did not work, you will need to check the file CARDLIST, which is included in the tarball of [http://dl.bytesex.org/releases/video4linux/ bttv] to find out the right parameters for your card. A PV951 without radio support would need this line:<br />
modprobe bttv card=42 radio=0<br />
Some cards need the following line to produce sound:<br />
modprobe tvaudio<br />
However, that varies. So just try it out. Some other cards demand the following line:<br />
modprobe tuner<br />
This is subject to trial-and-error, too.<br />
<br />
TODO: clarify the installation-procedure<br />
<br />
To actually watch TV, install the xawtv-package with<br />
pacman -S xawtv <br />
and read its manpage.<br />
<br />
TODO: clarify some possible problems and procedures. Introduction to XAWTV on another page?<br />
<br />
===Digital Cameras===<br />
Most newer digital cameras are supported as USB mass storage devices, which means that you can simply plug it in and copy the images. Older cameras may use the PTP (Picture Transfer Protocol) which requires a "special driver". gPhoto2 provides this driver and allows a shell-based transfer of the images; digikam (for KDE) and gthumb (for GNOME, gtkam would be another choice) use this driver and offer a nice GUI.<br />
<br />
===USB Memory Sticks / Hard Disks===<br />
USB Memory Sticks and hard disks are supported out of the box with the USB mass storage device driver and will appear as a new SCSI device (/dev/sdX). If you are using KDE or GNOME you should use dbus and hal (add them to your daemons in /etc/rc.conf), and they will be automatically mounted. If you use a different Desktop Environment you may have a look at ivman.<br />
<br />
==Maintaining the system==<br />
===Pacman===<br />
[[Pacman]] is both a binary and source package manager which is able to download, install, and upgrade packages from both remote and local repositories with full dependency handling, and has easy-to-understand tools for crafting your own packages too.<br />
<br />
A more-detailed description of Pacman can be found in [[Pacman|its article]].<br />
<br />
====Useful commands====<br />
To view the options available for a particular operational command, say '''-Q''', just append it with '''-h''':<br />
pacman -Qh<br />
<br />
To synchronize and update the local packages database with the remote repositories (it is a good idea to do this before installing and upgrading packages):<br />
pacman -Sy<br />
<br />
To '''upgrade''' all packages on the system:<br />
pacman -Su<br />
<br />
To sync, update, and '''upgrade''' all the packages on the system with one command:<br />
pacman -Syu<br />
<br />
To install or upgrade a single package or list of packages (including dependencies):<br />
pacman -S packageA packageB<br />
<br />
You can also sync, update the package database, and install packages in one command:<br />
pacman -Sy packageA packageB<br />
<br />
To remove a single package, leaving all of its dependencies installed:<br />
pacman -R package<br />
<br />
To remove a package and all of the package's dependencies which are not used by any other installed package:<br />
pacman -Rs package<br />
('''-Rs''' is typically preferred vs '''R''' to remove any package as it will clean up all unused dependencies)<br />
<br />
To remove all of the package's now unneeded dependencies and also instruct pacman to ignore file backup designations. (Normally, when a file is removed from the system the database is checked to see if the file should be renamed with a ".pacsave" extension.):<br />
pacman -Rsn package<br />
<br />
To search the remote (repo) package database for a list of packages matching a given keyword:<br />
pacman -Ss keyword<br />
<br />
To list all packages on your system<br />
pacman -Q<br />
<br />
To list all packages on your system without the version strings, we add the '''-q''' option:<br />
pacman -Qq<br />
<br />
To search (query) the local (your machine) package database for a given package:<br />
pacman -Q package <br />
<br />
To search (query) the local (your machine) package database for a given package and list all pertinent information:<br />
pacman -Qi package<br />
<br />
To list all files installed by a given ''package'':<br />
<tt>pacman -Ql ''package''</tt><br />
Conversely, to find the package that owns a given file (in this example, the ''ls'' executable):<br />
<tt>pacman -Qo /bin/ls</tt><br />
To find all unused packages (orphans):<br />
pacman -Qdt<br />
Missing libraries: Suppose you receive an error message like this:<br />
<tt>mplayer: error while loading shared libraries: ''libgssapi.so.2'': cannot open shared object file: No such file or directory</tt><br />
This may be an indication that a package you have previously installed is now corrupt (some or all of its files are missing). You should try to find the package name that provides the missing shared library. In this example, you could type:<br />
<tt>pacman -Ql | grep ''libgssapi.so.2''</tt><br />
The first column in the output is the package name:<br />
<tt>heimdal /usr/lib/libgssapi.so.2<br />
heimdal /usr/lib/libgssapi.so.2.0.0<br />
</tt><br />
Then, you can just re-install it:<br />
<tt>pacman -Sy heimdal</tt><br />
<br />
To defragment pacman's cache database and optimize for speed:<br />
pacman-optimize<br />
<br />
To count how many packages are currently on your system:<br />
pacman -Q | wc -l<br />
<br />
To install a package compiled from source using ABS and makepkg:<br />
pacman -U packagename.pkg.tar.gz<br />
<br />
Note: There are countless additional pacman functions and commands. Try man pacman and consult the [[pacman]] wiki entries.<br />
<br />
====Files====<br />
There are a number of files left and created by pacman and other programs to facilitate maintenance and to conform to a safe computing practice. When pacman is installing something, the package contains information on whether to back up a particular file. Such files will have the '''.pacsave''' extension. When you force a "NoUpgrade" on a file via [http://www.archlinux.org/pacman/pacman.conf.5.html pacman.conf], it will not be replaced during an upgrade and the new file will come with the '''.pacnew''' extension. For example, you have edited a configuration file thoroughly and you do not want an upgrade of the respective package to replace the file with a new one, we must have the following line in '''/etc/pacman.conf''':<br />
NoUpgrade = /path/to/config/file<br />
To view the differences of the old and new versions of these files, we can either edit them manually or use a '''diff''' utility to take note of the differences. There is an automated tool to find and view such files available from the '''community''' repository:<br />
pacman -S pacman-contrib<br />
cd ~/<br />
pacdiff # as root<br />
There is a bug in the above tool where if you navigate to '''/etc''' and run it from there, the paths will be messed up. We remain on the safer side by being at "home". You may want to run it as user first in case you happen to be a careless person (you may just overwrite or remove files because you ''think'' that is the right way).<br><br />
<br />
There are other types of leftovers depending on the programs available on your system. Some will create backups with a '''.bak''' extension, while others with something like "'''~'''" or "'''-'''". Unfortunately, there is currently no way to "automatically" find and review them. Fear not, as we have no need for automated tools to deal with such trivial tasks. Simply use '''locate''' to search for them:<br />
locate -e *.~ *.- *.bak<br />
And we can use something useful like '''vimdiff''' to look at the differences manually:<br />
pacman -S vim<br />
vimdiff file1 file2<br />
<br />
==Polishing & Further information==<br />
For further information and support you can go to the [http://www.archlinux.org/ homepage], [[Special:Search|search the wiki]], the [http://bbs.archlinux.org/ forums], the [[ArchChannel|IRC channel]], and the [http://www.archlinux.org/mailman/listinfo/ mailing lists].<br />
=====FAQs=====<br />
See [[Arch FAQs for newbies]]<br />
<br />
There is also an [http://bbs.archlinux.org/viewforum.php?id=23 Arch Subforum] devoted to beginners.<br />
<br />
=====Terminology=====<br />
For more information on the jargon used in Arch, look at [[Arch Terminology/Jargon for newbies|this article]].<br />
<br />
=====Where to go from here?=====<br />
<br />
You may also be interested in:<br />
<br />
[[Post Installation Tips]]<br />
<br />
[[ArchLinux User-community Repository (AUR)]]<br />
<br />
[[Get All Mouse Buttons Working]]<br />
<br />
[[Improve Pacman Performance]]<br />
<br />
[[Kernel Compilation]]<br />
<br />
[[Pm-utils]]<br />
<br />
[[Cpufrequtils]]<br />
<br />
[[:Category:Eye candy (English)| Eye Candy]]<br />
<br />
==External links==<br />
* [http://archux.com/page/installation-guide/ Arch Linux installation guide with images]<br />
* [http://archux.com/page/arch-linux-video-installation-guide Arch Linux video installation guide]</div>
Pseudonomous