https://wiki.archlinux.org/api.php?action=feedcontributions&user=Iphitus&feedformat=atom
ArchWiki - User contributions [en]
2024-03-28T16:43:21Z
User contributions
MediaWiki 1.41.0
https://wiki.archlinux.org/index.php?title=User_talk:Pointone&diff=99220
User talk:Pointone
2010-03-07T01:18:25Z
<p>Iphitus: </p>
<hr />
<div>Thanks for your work on the netcfg documentation!<br />
<br />
[[User:Iphitus|Iphitus]] 20:18, 6 March 2010 (EST)<br />
<br />
----<br />
<br />
Hi and thanks for the good work wrt templates.<br />
I wanted first to get the green/red light for my idea and then proceed w/ adding the templates to the articles that beg for them. Many wiki pages are just a wall of grey text.<br />
<br />
[[User:Karol|Karol]] 17:05, 31 May 2009 (EDT)<br />
<br />
----<br />
<br />
Thanks for fixing Compact TOC! I don't know much about templates/markup. [[User:Manolo|manolo]] 18:49, 10 November 2009 (EST)<br />
<br />
----<br />
<br />
Kudos for cleaning up package-building articles! --[[User:Bhobbit|Bhobbit]] 00:57, 26 November 2009 (EST)<br />
<br />
----<br />
<br />
Really good cleanup and update on Fake RAID article. Thanks. --[[User:Loosec|Loosec]] 12:28, 4 December 2009 (CET)<br />
<br />
----<br />
<br />
I noticed your user page the list of potential protected pages, and was wondering if [[Irc]] has been considered?<br />
--[[User:Gen2ly|Gen2ly]] 10:12, 11 December 2009 (EST)<br />
<br />
:For clarification; my list of consists of protected pages I've wished to edit -- not a complete list of protected pages ([[Special:ProtectedPages]]). [[IRC Channel]] is tagged with an ominous warning against editing! ;)<br />
<br />
:-- [[User:Pointone|pointone]] 18:01, 11 December 2009 (EST)<br />
<br />
----<br />
<br />
Got dayum, pointione. Good work ;) [[User:Pwd|pwd]] 23:01, 15 December 2009 (EST)<br />
<br />
==Section-specific request templates==<br />
:"''e.g. Template:ExpandSection, Template:MoveSection? Would such templates be useful?''"<br />
Splitting templates like that adds to more work when keeping up with the wiki's status on what needs to be done. Simply alter the existing expand/move article templates so that they refer to ''article/section'' instead of just ''article''. [[User:Pwd|pwd]] 22:43, 17 December 2009 (EST)<br />
<br />
==Padding==<br />
By padding I mean the space to right that renders on every single article on this wiki, and this is ''still'' there. This has less to do with suggestions to the [[Main Page]] but it seems like the central place for suggestions that affect everything, the same with the link captions. [[User:Dres|Dres]] 17:54, 14 January 2010 (EST)<br />
<br />
==To wiki or not to wiki?==<br />
Please unlock [[AUR User Guidelines]].<br />
I hope that "high traffic/semi official" isn't the only reason that you locked it. The AUR is not even officially supported. Was there a history of vandalism or anything? It seems that pages are getting locked more often. It's difficult to get community participation if they are locked out. Thanks for reading. - [[User:Louipc|louipc]] 22:31, 4 February 2010 (EST)<br />
<br />
:Sorry; I re-protected the page upon restoration after being overwritten by [[AUR - uživatelský průvodce (Česky)]] (it was protected prior to this incident). I agree that the page should be unlocked, though; this was an oversight.<br />
<br />
:-- [[User:Pointone|pointone]] 23:41, 4 February 2010 (EST)<br />
<br />
::Well, I don't blame you for maintaining the status quo. Thanks for the quick response unlocking it. I appreciate it. - [[User:Louipc|louipc]] 18:43, 5 February 2010 (EST)<br />
<br />
==Category:Laptops==<br />
This was already done with a pywikipedia bot, check the history in most of the laptop articles. heh, [[User:Dres|Dres]] 22:42, 4 February 2010 (EST)</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Talk:Netcfg&diff=99219
Talk:Netcfg
2010-03-07T01:16:38Z
<p>Iphitus: /* DHCLIENT */</p>
<hr />
<div>== DHCLIENT ==<br />
<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
I is correct? Without setting DHCLIENT, IP="dhcp" in my profile launches dhcpcd. [[User:Mykhal|Mykhal]] 17:28, 22 May 2009 (EDT)<br />
<br />
:This appears to refer to an older revision. See [http://projects.archlinux.org/netcfg.git/commit/?id=75b7abe2727a9ce7e72721a5c79f070d6126b6b3 this commit: "Restore dhcpcd as default dhcp client"]. I've removed the offending line from the article.<br />
<br />
:-- [[User:Pointone|pointone]] 14:51, 24 February 2010 (EST)<br />
<br />
DHCLIENT=yes still works. It generally shouldn't be necessary though.<br />
<br />
[[User:Iphitus|Iphitus]] 20:16, 6 March 2010 (EST)<br />
<br />
== Move to [[netcfg]] ==<br />
<br />
Are there any objections to renaming this article "netcfg"? I think this would be much clearer. -- [[User:Pointone|pointone]] 12:19, 23 February 2010 (EST)<br />
<br />
+1 [[User:Daenyth|Daenyth]] 17:46, 25 February 2010 (EST)<br />
<br />
+1 [[User:Proofrific|Proofrific]] 22:17, 5 March 2010 (EST)<br />
<br />
+1 [[User:Idupree|Idupree]] 18:19, 6 March 2010 (EST)<br />
:If we do this, we should also move [[Network_Profiles_development]] to Netcfg_development; also check [[Network_Profiles_with_3G_card]]; also do we need to be concerned about the "Network Profiles (Some other language)" pages? [[User:Idupree|Idupree]] 18:34, 6 March 2010 (EST)<br />
<br />
+1 [[User:Iphitus|Iphitus]] 20:11, 6 March 2010 (EST) I don't mind.<br />
<br />
== confusing warning message ==<br />
<br />
The page begins<br />
{{Box RED||'''This document refers to netcfg 2.5.x''' &ndash; please upgrade to the latest version of netcfg.}}<br />
which sounds to me like the page itself is outdated and needs to be updated to describe a netcfg 2.6 or so (which doesn't exist actually) -- especially because I remembered an announcement on archlinux.org saying there was a netcfg update (it was to 2.5.2).<br />
<br />
Is it needed? Can it be, say, green instead of "SOMETHING IS WRONG" red? What if it just said the fact, "This document refers to netcfg 2.5.x"? Or add "; using older versions is unsupported."<br />
<br />
[[User:Idupree|Idupree]] 18:24, 6 March 2010 (EST)<br />
<br />
I put it there at the time of release to alert people that it reflected the latest netcfg, v2.5. That was in case people with older versions came to the wiki. Now 2.5 has been in [core] for a little while, I think it's probably safe to just remove it entirely - it's assumed that the wiki should reflect the latest version. <br />
<br />
[[User:Iphitus|Iphitus]] 20:13, 6 March 2010 (EST)</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=99218
Netcfg
2010-03-07T01:14:31Z
<p>Iphitus: 2.5 has been out for long enough, message isn't necessary now. Wiki should be assumed to reflect latest version.</p>
<hr />
<div>[[Category:Networking (English)]]<br />
{{i18n|Network Profiles}}<br />
{{Moveto|netcfg|Talk:Network Profiles#Move to netcfg}}<br />
{{Article summary start}}<br />
{{Article summary text|An guide to installing and configuring netcfg &ndash; network configuration and profile scripts.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Network}}<br />
{{Article summary wiki|Wireless Setup}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary link|netcfg network scripts repository|http://projects.archlinux.org/netcfg.git/}}<br />
{{Article summary end}}<br />
<br />
From the [http://projects.archlinux.org/netcfg.git/tree/man/netcfg.8 netcfg man page]:<br />
<br />
:'''''netcfg''' is used to configure and manage network connections via profiles. It has pluggable support for a range of connection types, such as wireless, ethernet, ppp. It is also capable of starting/stopping many to one connections, that is, multiple connections within the same profile, optionally with bonding.''<br />
<br />
netcfg is useful for users seeking a simple and robust means of managing multiple network configurations (e.g. laptop users). For systems connecting to a single network, the [[network]] daemon may be more appropriate.<br />
<br />
==Preparation==<br />
In the simplest cases, users must at least know the name of their network interface(s) (e.g. '''eth0''', '''wlan0'''). If configuring a static IP address, gateway and name server addresses must also be known.<br />
<br />
If connecting to a wireless network, have some basic information ready. For a wireless network this includes what type of security is used, the network name (SSID), and any password or encryption keys. Additionally, ensure the proper drivers and firmware are installed for the wireless device, as described in [[Wireless Setup]].<br />
<br />
==Installation==<br />
Ensure you have the latest version of netcfg installed. Older versions have more bugs and may not work well with the latest drivers. The {{Package Official|netcfg}} package is available in '''core''':<br />
<br />
# pacman -S netcfg<br />
<br />
As of version 2.5.x, optional dependencies include {{Package Official|wpa_actiond}} &ndash; required for automatic/roaming wireless connection &ndash; and {{Package Official|ifplugd}} &ndash; required for automatic ethernet configuration. ([http://www.archlinux.org/news/487/ More information].)<br />
<br />
# pacman -S wpa_actiond ifplugd<br />
<br />
==Configuration==<br />
Network profiles are stored in the {{Filename|/etc/network.d}} directory. To minimize the potential for errors, copy an example configuration from {{Filename|/etc/network.d/examples}} to {{Filename|/etc/network.d/mynetwork}}. The file name is the name of the network profile ("mynetwork" is used as an example throughout this article). The name is not a network setting and does not need to match the wireless network name (SSID).<br />
<br />
Depending on the connection type and security, use one of the following examples from {{Filename|/etc/network.d/examples}} as a base. Be wary of examples found on the Internet as they often contain deprecated options that may cause problems.<br />
<br />
{| border="1"<br />
! Connection type/security !! Example profile<br />
|-<br />
| Wireless; WEP hex key || {{Filename|wireless-wep}}<br />
|-<br />
| Wireless; WEP string key || {{Filename|wireless-wep-string-key}}<br />
|-<br />
| Wireless; WPA personal (passphrase) || {{Filename|wireless-wpa}}<br />
|-<br />
| Wireless; WPA enterprise || {{Filename|wireless-wpa-config}} (wpa_supplicant configuration is external) <br /> {{Filename|wireless-wpa-configsection}} (wpa_supplicant configuration stored as string)<br />
|-<br />
| Wired; DHCP || {{Filename|ethernet-dhcp}}<br />
|-<br />
| Wired; static IP || {{Filename|ethernet-static}}<br />
|-<br />
| Wired; iproute configuration || {{Filename|ethernet-iproute}}<br />
|}<br />
<br />
Next, modify the new configuration file, {{Filename|/etc/network.d/mynetwork}}:<br />
<br />
* Set {{Codeline|INTERFACE}} to the correct wireless or ethernet interface. This can be checked with {{Codeline|ifconfig}} and {{Codeline|iwconfig}}.<br />
* Ensure the {{Codeline|ESSID}} and {{Codeline|KEY}} (passphrase) are set correctly for wireless connections. Typos in these fields are common errors.<br />
** Note that WEP ''string'' keys (not ''hex'' keys) must be specified with a leading {{Codeline|s:}} (e.g. {{Codeline|<nowiki>KEY="s:somepasskey"</nowiki>}}).<br />
<br />
{{Note | Netcfg configurations are valid Bash scripts. Any configuration involving special characters such as $ or \ needs to be quoted correctly otherwise it will be interpreted by Bash. To avoid interpretation, use single quotes or backslash escape characters where appropriate. }}<br />
<br />
{{Note | Network information (e.g. wireless passkey) will be stored in plain text format, so users may want to change the permissions on the newly created profile (e.g. {{Codeline|chmod 0600 /etc/network.d/mynetwork}} to make it readable by root only).}}<br />
<br />
==Usage==<br />
To connect a profile:<br />
# netcfg mynetwork<br />
<br />
To disconnect a profile:<br />
# netcfg down <profile-name><br />
<br />
If successful, users can configure netcfg to connect automatically or during boot. If the connection fails, see [[#Troubleshooting]] for solutions and how to get help.<br />
<br />
For other functions, see:<br />
$ netcfg help<br />
<br />
==Connecting automatically==<br />
Several methods are available to users wanting to automatically connect network profiles (e.g. during boot or whilst roaming). Note that a network profile must be properly configured within the {{Filename|/etc/network.d}} directory ''first'' (see [[#Configuration]]).<br />
<br />
{{Tip|If enabling one of the following daemons and nothing is configured within the {{Codeline|INTERFACES}} array in {{Filename|rc.conf}}, you may remove the {{Codeline|network}} daemon from the {{Codeline|DAEMONS}} array. If you mount NFS shares during boot, ensure the {{Codeline|netfs}} daemon remains listed, though (otherwise the network will be dropped before unmounting shares during shutdown).}}<br />
<br />
===net-profiles===<br />
'''{{Codeline|net-profiles}} allows users to connect profiles during boot.'''<br />
<br />
To enable this feature, users must add {{Codeline|net-profiles}} to the {{Codeline|DAEMONS}} array in [[rc.conf]] and specify profiles to try in the {{Codeline|NETWORKS}} array:<br />
<br />
{{File<br />
|name=/etc/rc.conf<br />
|content=<nowiki><br />
NETWORKS=(mynetwork yournetwork)<br />
<br />
...<br />
<br />
DAEMONS=(... net-profiles ...)<br />
</nowiki>}}<br />
<br />
Alternatively, {{Codeline|net-profiles}} can be configured to display a menu &ndash; allowing users to choose a desired profile &ndash; by setting the contents of the {{Codeline|NETWORKS}} array to {{Codeline|menu}}:<br />
<br />
{{File<br />
|name=/etc/rc.conf<br />
|content=<nowiki><br />
NETWORKS=(menu)<br />
<br />
...<br />
<br />
DAEMONS=(... net-profiles ...)<br />
</nowiki>}}<br />
<br />
Additionally, the {{Package Official|dialog}} package is required.<br />
<br />
{{Tip|Access the menu at any time by running {{Codeline|netcfg-menu}} in a terminal.}}<br />
<br />
===net-auto-wireless===<br />
'''{{Codeline|net-auto-wireless}} allows users to automatically connect to wireless networks with proper roaming support.'''<br />
<br />
To enable this feature, users must add {{Codeline|net-auto-wireless}} to the {{Codeline|DAEMONS}} array in [[rc.conf]] and specify the desired wireless interface with the {{Codeline|WIRELESS_INTERFACE}} variable:<br />
<br />
{{File<br />
|name=/etc/rc.conf<br />
|content=<nowiki><br />
WIRELESS_INTERFACE="wlan0"<br />
<br />
...<br />
<br />
DAEMONS=(... net-auto-wireless ...)<br />
</nowiki>}}<br />
<br />
Additionally, the {{Package Official|wpa_actiond}} package is required.<br />
<br />
===net-auto-wired===<br />
'''{{Codeline|net-auto-wired}} allows users to automatically connect to wired networks.'''<br />
<br />
To enable this feature, users must add {{Codeline|net-auto-wired}} to the {{Codeline|DAEMONS}} array in [[rc.conf]] and specify the desired wired interface with the {{Codeline|WIRED_INTERFACE}} variable:<br />
<br />
{{File<br />
|name=/etc/rc.conf<br />
|content=<nowiki><br />
WIRED_INTERFACE="eth0"<br />
<br />
...<br />
<br />
DAEMONS=(... net-auto-wired ...)<br />
</nowiki>}}<br />
<br />
Additionally, the {{Package Official|ifplugd}} package is required.<br />
<br />
==Tips and tricks==<br />
<br />
===Passing arguments to iwconfig before connecting===<br />
Simply add the following to a profile:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where {{Codeline|<arguments>}} can be any valid {{Codeline|iwconfig}} argument. The script then runs {{Codeline|iwconfig $INTERFACE $IWCONFIG}}.<br />
<br />
For example, force the card to register to a specific access point given by MAC address:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supersedes the {{Codeline|IWOPTS}} and {{Codeline|WEP_OPTS}} options which were incompletely implemented.<br />
<br />
===rfkill (enable/disable radio power)===<br />
netcfg can enable/disable radio for wireless cards equipped with software control of radio. For wireless cards with hardware switches, netcfg can detect disabled hardware switches and fail accordingly.<br />
<br />
To enable rfkill support, you need to specify what sort of switch the wireless interface has; hardware or software. This can be set within a profile or at the interface level ({{Filename|/etc/network.d/interfaces/$INTERFACE}}; see [[#Per-interface configuration]]). <br />
<br />
RFKILL=soft # can be either 'hard' or 'soft'<br />
<br />
For some kill switches the rfkill entry in {{Filename|/sys}} is not linked to the interface and the {{Codeline|RFKILL_NAME}} variable needs to be set to the contents of the matching {{Filename|/sys/class/rfkill/rfkill#/name}}.<br />
<br />
For example, on an Eee PC:<br />
<br />
RFKILL=soft<br />
RFKILL_NAME='eeepc-wlan'<br />
<br />
===Execute commands before/after interface up/down===<br />
If your interface requires special actions prior/after the establishment/closure of a connection, you may use the {{Codeline|PRE_UP}}, {{Codeline|POST_UP}}, {{Codeline|PRE_DOWN}}, and {{Codeline|POST_DOWN}} variables.<br />
<br />
For example, if you want to configure your wireless card to operate in ad-hoc mode but you can only change modes when the interface is down, you could use something like this:<br />
<br />
PRE_UP="ifconfig wlan0 down; iwconfig wlan0 mode ad-hoc"<br />
<br />
Or if you want to mount your network shares after a successful connection, you could use:<br />
<br />
POST_UP="sleep 5; mount /mnt/shares/nexus/utorrent 2>/dev/null"<br />
<br />
{{Note|If the commands specified in these properties return anything other than 0 (success), netcfg aborts the current operation. So if you want to mount a certain network share that might not be available at the time of connection (thus returning an error), you could create a separate Bash script with the mount commands and a {{Codeline|exit 0}} at the end. Alternatively you can add {{Codeline|<nowiki>|| true</nowiki>}} to the end of the command that may fail.}}<br />
<br />
===Per-interface configuration===<br />
Configuration options that apply to all profiles using an interface can be set using {{Filename|/etc/network.d/interfaces/$INTERFACE}}. For example:<br />
<br />
/etc/network.d/interfaces/wlan0<br />
<br />
This is useful for {{Codeline|wpa_supplicant}} options, rfkill switch support, pre/post up/down scripts and {{Codeline|net-auto-wireless}}. These options are loaded ''before'' profiles so that any profile-based options will take priority.<br />
<br />
{{Filename|/etc/network.d/interfaces/$INTERFACE}} may contain any valid profile option, though you are likely to use {{Codeline|PRE_UP}}/{{Codeline|DOWN}} and {{Codeline|POST_UP}}/{{Codeline|DOWN}} (described in the previous section) or one of the options listed below. Remember that these options are set for ''all'' profiles using the interface; you probably do not want to connect to your work VPN here, for instance, as it will try to connect on ''every'' wireless network!<br />
<br />
WPA_GROUP - Setting the group of the wpa_ctrl interface<br />
WPA_COUNTRY - Enforces local regulatory limitations and allows use of more channels<br />
WPA_DRIVER - Defaults to wext, may want nl80211 for mac80211 devices<br />
<br />
{{Note|{{Codeline|POST_UP}}/{{Codeline|POST_DOWN}} require the {{Package Official|wpa_actiond}} package.}}<br />
<br />
===Output hooks===<br />
netcfg has limited support to load hooks that handle output. By default it loads the {{Filename|arch}} hook which provides the familiar output that you see. A syslog logging hook is also included. These can be found at {{Filename|/usr/lib/network/hooks}}.<br />
<br />
===ArchAssitant (GUI)===<br />
<br />
A Qt-based netcfg front-end called ArchAssistant exists. It proposes to manage and connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
<br />
* [http://aur.archlinux.org/packages.php?ID=15655 archassistant in the AUR] <br />
* [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] <br />
* archassistant package on archlinux.fr: [http://repo.archlinux.fr/i686/archassistant/ i686] and [http://repo.archlinux.fr/x86_64/archassistant/ x86_64]<br />
<br />
There is also a relatively new GUI for netcfg2 on qt-apps.org that does only network configuration. You can find it [http://www.qt-apps.org/content/show.php/netcfgGUI?content=99523 here].<br />
<br />
===wifi-select===<br />
<br />
There is a console tool for selecting wireless networks in "real-time" (in NetworkManager manner) called <tt>wifi-select</tt>. The tool is convenient for use in Internet cafés or other places you are visiting for the first (and maybe the last) time. With this tool, you do not need to create a profile for a new network, just type {{Codeline|sudo wifi-select wlan0}} and choose the network you need. <br />
<br />
The tool is currently packaged and available in [community] repository. To install:<br />
<br />
# pacman -S wifi-select<br />
<br />
<tt>wifi-select</tt> does the following:<br />
* parses <tt>iwlist scan</tt> results and presents list of networks along with its security settings (WPA/WEP/none) using <tt>dialog</tt><br />
* if user selects network with existing profile -- just use this profile to connect with <tt>netcfg</tt><br />
* if user selects a new network (for example, WiFi hotspot), <tt>wifi-select</tt> automatically generates new profile with corresponding <tt>$SECURITY</tt> and asks for the key (if needed). It uses DHCP as <tt>$IP</tt> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <tt>$IP</tt> to static or adjust some additional options)<br />
<br />
Links: <br />
<br />
* [http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <tt>wifi-select</tt><br />
* [http://aur.archlinux.org/packages.php?ID=23471 wifi-select in the AUR] <br />
* [http://hg.horna.org.ua/wifi-select/ wifi-select Mercurial repository]<br />
<br />
==Troubleshooting==<br />
<br />
===Debugging===<br />
To run netcfg with debugging output, set the {{Codeline|NETCFG_DEBUG}} environment variable to {{Codeline|"yes"}}, for example:<br />
<br />
# NETCFG_DEBUG="yes" netcfg <arguments><br />
<br />
===Network unavailable===<br />
This error is typically due to:<br />
* Out of range<br />
* Driver issue <br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set:<br />
SCAN=no <br />
<br />
===Wireless association failed===<br />
This error is typically due to:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem<br />
<br />
If it is a range problem, increasing {{Codeline|TIMEOUT}} can help.<br />
<br />
===Unable to get IP address with DHCP===<br />
This error is typically due to:<br />
* Out of range/reception<br />
<br />
Try increasing {{Codeline|DHCP_TIMEOUT}}.<br />
<br />
===Not a valid connection, check spelling or look at examples===<br />
You must set {{Codeline|CONNECTION}} to one of the connection types listed in the {{Filename|/usr/lib/network/connections}} directory. Alternatively, use one of the provided configuration examples in {{Filename|/etc/network.d/examples}}.<br />
<br />
===Driver quirks===<br />
{{Note|You most likely do '''not''' need quirks; ensure your configuration is correct before considering them. Quirks are intended for a small range of drivers with unusual issues, many of them older versions. These are workarounds, not solutions.}}<br />
<br />
Some drivers behave oddly and need workarounds to connect. Quirks must be enabled manually. They are best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. Quirks can be combined.<br />
<br />
; {{Codeline|prescan}}: Run {{Codeline|iwlist $INTERFACE scan}} before attempting to connect (broadcom)<br />
; {{Codeline|preessid}}: Run {{Codeline|iwconfig $INTERFACE essid $ESSID}} before attempting to connect (ipw3945 and Intel PRO/Wireless 4965AGN)<br />
; {{Codeline|wpaessid}}: Same as previous, run before starting {{Codeline|wpa_supplicant}}. Deprecated - use <pre>PRE_UP="iwconfig $INTERFACE essid $ESSID"</pre> instead. (ath9k)<br />
; {{Codeline|predown}}: Take interface down before association and then restore it after (madwifi)<br />
; {{Codeline|postsleep}}: Sleep one second before checking if the association was successful<br />
; {{Codeline|postscan}}: Run {{Codeline|iwlist scan}} after associating <br />
<br />
For example:<br />
QUIRKS=(prescan preessid)<br />
<br />
If you receive "Wireless network not found" or "Association failed" errors and have tried the above, try:<br />
SCAN=no<br />
<br />
===Ralink legacy drivers rt2500, rt2400 that use iwpriv===<br />
There is no plans to add WPA support to these drivers. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed {{Codeline|iwpriv}} commands and put its path in {{Codeline|PRE_UP}}.<br />
<br />
===It still doesn't work, what do I do?===<br />
If this article did not help solve your problem, the next best place to ask for help is the forums or the mailing list. <br />
<br />
To be able to determine the problem, we need information. When you ask, provide the following output:<br />
* '''ALL OUTPUT FROM netcfg''' <br />
* '''ALL OUTPUT FROM netcfg''' <br />
* '''ALL OUTPUT FROM netcfg'''<br />
** This is absolutely crucial to be able determine what went wrong. The message might be short or non-existent, but it can mean a great deal. <br />
* '''{{Filename|/etc/network.d}} network profiles'''<br />
** This is also crucial as many problems are simple configuration issues. Feel free to censor your wireless key.<br />
* '''netcfg version'''<br />
* {{Codeline|lsmod}}<br />
* {{Codeline|iwconfig}}<br />
<br />
==FAQ==<br />
{{FAQ<br />
|question=Why doesn't netcfg do ''X''?<br />
|answer=netcfg doesn't need to; it connects to networks. netcfg is modular and re-usable; see {{Filename|/usr/lib/networks}} for reusable functions for custom scripts.}}<br />
<br />
{{FAQ<br />
|question=Why doesn't netcfg behave in ''this'' way?<br />
|answer=netcfg doesn't enforce any rules; it connects to networks. It doesn't impose any heuristics, like "disconnect from wireless if ethernet is connected". If you want behaviour like that, it should be simple to write a separate tool over netcfg. See the question above.}}<br />
<br />
{{FAQ<br />
|question=Do I still need ''X'' if I'm using netcfg?<br />
|answer=This question usually references {{Filename|/etc/hosts}} and the {{Codeline|HOSTNAME}} variable in {{Filename|/etc/rc.conf}}, which are both still required. You may remove {{Codeline|network}} from the {{Codeline|DAEMONS}} array if you've configured all your networks with netcfg, though.}}</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Talk:Netcfg&diff=99217
Talk:Netcfg
2010-03-07T01:13:37Z
<p>Iphitus: /* confusing warning message */</p>
<hr />
<div>== DHCLIENT ==<br />
<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
I is correct? Without setting DHCLIENT, IP="dhcp" in my profile launches dhcpcd. [[User:Mykhal|Mykhal]] 17:28, 22 May 2009 (EDT)<br />
<br />
:This appears to refer to an older revision. See [http://projects.archlinux.org/netcfg.git/commit/?id=75b7abe2727a9ce7e72721a5c79f070d6126b6b3 this commit: "Restore dhcpcd as default dhcp client"]. I've removed the offending line from the article.<br />
<br />
:-- [[User:Pointone|pointone]] 14:51, 24 February 2010 (EST)<br />
<br />
== Move to [[netcfg]] ==<br />
<br />
Are there any objections to renaming this article "netcfg"? I think this would be much clearer. -- [[User:Pointone|pointone]] 12:19, 23 February 2010 (EST)<br />
<br />
+1 [[User:Daenyth|Daenyth]] 17:46, 25 February 2010 (EST)<br />
<br />
+1 [[User:Proofrific|Proofrific]] 22:17, 5 March 2010 (EST)<br />
<br />
+1 [[User:Idupree|Idupree]] 18:19, 6 March 2010 (EST)<br />
:If we do this, we should also move [[Network_Profiles_development]] to Netcfg_development; also check [[Network_Profiles_with_3G_card]]; also do we need to be concerned about the "Network Profiles (Some other language)" pages? [[User:Idupree|Idupree]] 18:34, 6 March 2010 (EST)<br />
<br />
+1 [[User:Iphitus|Iphitus]] 20:11, 6 March 2010 (EST) I don't mind.<br />
<br />
== confusing warning message ==<br />
<br />
The page begins<br />
{{Box RED||'''This document refers to netcfg 2.5.x''' &ndash; please upgrade to the latest version of netcfg.}}<br />
which sounds to me like the page itself is outdated and needs to be updated to describe a netcfg 2.6 or so (which doesn't exist actually) -- especially because I remembered an announcement on archlinux.org saying there was a netcfg update (it was to 2.5.2).<br />
<br />
Is it needed? Can it be, say, green instead of "SOMETHING IS WRONG" red? What if it just said the fact, "This document refers to netcfg 2.5.x"? Or add "; using older versions is unsupported."<br />
<br />
[[User:Idupree|Idupree]] 18:24, 6 March 2010 (EST)<br />
<br />
I put it there at the time of release to alert people that it reflected the latest netcfg, v2.5. That was in case people with older versions came to the wiki. Now 2.5 has been in [core] for a little while, I think it's probably safe to just remove it entirely - it's assumed that the wiki should reflect the latest version. <br />
<br />
[[User:Iphitus|Iphitus]] 20:13, 6 March 2010 (EST)</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Talk:Netcfg&diff=99216
Talk:Netcfg
2010-03-07T01:11:51Z
<p>Iphitus: /* Move to netcfg */</p>
<hr />
<div>== DHCLIENT ==<br />
<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
I is correct? Without setting DHCLIENT, IP="dhcp" in my profile launches dhcpcd. [[User:Mykhal|Mykhal]] 17:28, 22 May 2009 (EDT)<br />
<br />
:This appears to refer to an older revision. See [http://projects.archlinux.org/netcfg.git/commit/?id=75b7abe2727a9ce7e72721a5c79f070d6126b6b3 this commit: "Restore dhcpcd as default dhcp client"]. I've removed the offending line from the article.<br />
<br />
:-- [[User:Pointone|pointone]] 14:51, 24 February 2010 (EST)<br />
<br />
== Move to [[netcfg]] ==<br />
<br />
Are there any objections to renaming this article "netcfg"? I think this would be much clearer. -- [[User:Pointone|pointone]] 12:19, 23 February 2010 (EST)<br />
<br />
+1 [[User:Daenyth|Daenyth]] 17:46, 25 February 2010 (EST)<br />
<br />
+1 [[User:Proofrific|Proofrific]] 22:17, 5 March 2010 (EST)<br />
<br />
+1 [[User:Idupree|Idupree]] 18:19, 6 March 2010 (EST)<br />
:If we do this, we should also move [[Network_Profiles_development]] to Netcfg_development; also check [[Network_Profiles_with_3G_card]]; also do we need to be concerned about the "Network Profiles (Some other language)" pages? [[User:Idupree|Idupree]] 18:34, 6 March 2010 (EST)<br />
<br />
+1 [[User:Iphitus|Iphitus]] 20:11, 6 March 2010 (EST) I don't mind.<br />
<br />
== confusing warning message ==<br />
<br />
The page begins<br />
{{Box RED||'''This document refers to netcfg 2.5.x''' &ndash; please upgrade to the latest version of netcfg.}}<br />
which sounds to me like the page itself is outdated and needs to be updated to describe a netcfg 2.6 or so (which doesn't exist actually) -- especially because I remembered an announcement on archlinux.org saying there was a netcfg update (it was to 2.5.2).<br />
<br />
Is it needed? Can it be, say, green instead of "SOMETHING IS WRONG" red? What if it just said the fact, "This document refers to netcfg 2.5.x"? Or add "; using older versions is unsupported."<br />
<br />
[[User:Idupree|Idupree]] 18:24, 6 March 2010 (EST)</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=97710
Netcfg
2010-02-21T04:03:31Z
<p>Iphitus: /* Configuration */</p>
<hr />
<div>[[Category:Networking (English)]]<br />
{{i18n|Network Profiles}}<br />
<br />
{{Box RED||'''This document refers to netcfg 2.5.x''' &ndash; please upgrade to the latest version of netcfg.}}<br />
<br />
From the [http://projects.archlinux.org/netcfg.git/tree/man/netcfg.8 netcfg man page]:<br />
<br />
:'''''netcfg''' is used to configure and manage network connections via profiles. It has pluggable support for a range of connection types, such as wireless, ethernet, ppp. It is also capable of starting/stopping many to one connections, that is, multiple connections within the same profile, optionally with bonding.''<br />
<br />
netcfg is profile-based; each network has an individual profile. These profiles can be individually connected/disconnected at any time. The profile configuration varies depending on whether it's a wireless, ethernet or other type of connection. The available options are documented on the netcfg website and in the included examples.<br />
<br />
==Prerequisites==<br />
<br />
If connecting to a wireless network, have some basic information ready. For a wireless network this includes what type of security is used, the network name (SSID), and any password or encryption keys. <br />
<br />
==Installation==<br />
Ensure you have the latest version of netcfg installed. Older versions have more bugs and may not work well with the latest drivers. The {{Package Official|netcfg}} package is available in '''core''':<br />
<br />
# pacman -S netcfg<br />
<br />
As of version 2.5.x, optional dependencies include {{Package Official|wpa_actiond}} &ndash; required for automatic/roaming wireless connection &ndash; and {{Package Official|ifplugd}} &ndash; required for automatic ethernet configuration. ([http://www.archlinux.org/news/487/ More information].)<br />
<br />
# pacman -S wpa_actiond ifplugd<br />
<br />
==Configuration==<br />
Copy an example configuration from {{Filename|/etc/network.d/examples/}} to {{Filename|/etc/network.d/mynetwork}}. The filename is the name of the network profile, "mynetwork" is used as an example throughout this introduction. The name is not a network setting and does not need to match your wireless network name (SSID).<br />
<br />
Depending on your security and connection, use one of the following examples from {{Filename|/etc/network.d/examples/}} as a base. Be wary of examples found on the internet as they often contain deprecated options that may cause problems.<br />
<br />
{| border="1"<br />
! Connection type/security !! Example profile<br />
|-<br />
| Wireless; WEP hex key || {{Filename|wireless-wep}}<br />
|-<br />
| Wireless; WEP string key || {{Filename|wireless-wep-string-key}}<br />
|-<br />
| Wireless; WPA personal (passphrase) || {{Filename|wireless-wpa}}<br />
|-<br />
| Wireless; WPA enterprise || {{Filename|wireless-wpa-config}} (wpa_supplicant configuration is external) or {{Filename|wireless-wpa-configsection}} (wpa_supplicant configuration stored as string)<br />
|-<br />
| Wired; DHCP || {{Filename|ethernet-dhcp}}<br />
|-<br />
| Wired; static IP || {{Filename|ethernet-static}}<br />
|-<br />
| Wired; iproute configuration || {{Filename|ethernet-iproute}}<br />
|}<br />
<br />
{{Note | Netcfg configurations are valid bash scripts. Any configuration involving special characters such as $ or \ needs to be quoted correctly otherwise it will be interpreted by bash. To avoid interpretation, use single quotes or backslash escape characters where appropriate. }}<br />
<br />
{{Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created {{Filename|/etc/network.d/*.conf}} file (e.g. {{Codeline|chmod 0600 /etc/network.d/*.conf}} to make it readable by root only), depending upon how security conscious you are.}}<br />
<br />
Next, modify your new configuration file, {{Filename|/etc/network.d/mynetwork}}:<br />
<br />
* Set {{Codeline|<nowiki>INTERFACE=</nowiki>}} to your wireless or ethernet interface. This can be checked with ifconfig and iwconfig.<br />
* Make sure you set your ESSID and KEY/passphrase correctly. Typos in these fields are common errors.<br />
<br />
==Usage==<br />
To connect, simply execute:<br />
# netcfg mynetwork<br />
<br />
To disconnect from a profile:<br />
# netcfg down <profile-name><br />
<br />
If it does not work, have a look at [[#Troubleshooting]] for solutions and how to get help.<br />
<br />
If all goes to plan, you can configure it to connect automatically or on boot.<br />
<br />
For more command line arguments, see:<br />
$ netcfg help<br />
<br />
=Configuration Notes=<br />
==Using a string WEP key==<br />
This is for a STRING WEP key, not a HEX WEP key, not a WPA key.<br />
KEY="s:Somepasskey"<br />
<br />
==Ralink legacy drivers rt2500, rt2400 that use iwpriv==<br />
There is no plans to add WPA support to these drivers. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed iwpriv commands and put its path in PRE_UP=""<br />
<br />
==Passing arguments to iwconfig before connecting==<br />
Simply:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where <arguments> can be any valid iwconfig argument. The script then runs "iwconfig $INTERFACE $IWCONFIG"<br />
<br />
For example, setting bssid/ap mac:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supercedes the IWOPTS and WEP_OPTS options which were incompletely implemented.<br />
<br />
=Connecting automatically and/or on boot=<br />
==net-profiles - Connect a specific list of profiles==<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array<br />
<br />
If you have nothing configured within the INTERFACES array, you may remove the "network" daemon from the daemons line.<br />
<br />
==net-auto-wireless - Automatically connect to, and roam between wireless networks==<br />
<br />
In your /etc/rc.conf, add a line setting WIRELESS_INTERFACE to your wireless device. For example:<br />
WIRELESS_INTERFACE="wlan0"<br />
<br />
Then add <code>net-auto-wireless</code> to the DAEMONS array.<br />
<br />
This requires appropriate profiles to be made for the networks in /etc/network.d/<br />
<br />
==net-auto-wired==<br />
<br />
In your /etc/rc.conf, add a line setting WIRED_INTERFACE to your wired device. For example:<br />
WIRED_INTERFACE="eth0"<br />
<br />
Then add <code>net-auto-wired</code> to the DAEMONS array.<br />
<br />
This requires appropriate profiles to be made for the networks in /etc/network.d/<br />
<br />
==netcfg-menu - Display a menu at boot where a profile may be selected==<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu:<br />
<br />
NETWORKS=menu<br />
<br />
or<br />
<br />
NETWORKS=(menu)<br />
<br />
(either will work). And ensure that net-profiles is in your rc.conf DAEMONS array. You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
==net-auto (DEPRECATED, see net-auto-wireless)==<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line, eg: DAEMONS=(... '''net-auto''' ...).<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
note: for this to work with a given profile, that profile MUST set the ESSID variable (which is not required to connect manually if a separate wpa_supplicant.conf is supplied.)<br />
<br />
=Other Features=<br />
==RFKill (enable/disable radio power)==<br />
<br />
netcfg can enable/disable radio for wireless cards equipped with software control of radio. For wireless cards with hardware switches netcfg can detect disabled hardware switches and fail accordingly.<br />
<br />
To enable rfkill support, you need to specify what sort of switch the wireless interface has, hardware or software. This can be put in a profile, or /etc/network.d/interfaces/$INTERFACE. <br />
<br />
RFKILL=soft # can be either 'hard' or 'soft'.<br />
<br />
For some kill switches the rfkill entry in /sys is not linked to the interface. For these the 'RFKILL_NAME' needs to be set. This value is the contents of the matching /sys/class/rfkill/rfkillX/name<br />
<br />
For example on my eeepc:<br />
<br />
RFKILL=soft<br />
RFKILL_NAME='eeepc-wlan'<br />
<br />
==Execute commands before/after interface up/down==<br />
If your interface requires special actions prior/after the establishment/closure of a connection, you may use the '''PRE_UP''', '''POST_UP''', '''PRE_DOWN''', '''POST_DOWN''' properties.<br />
<br />
For example, if you want to set your wlan card to operate in ad-hoc mode but you can only change it when the interface is down, you could use something like this:<br />
<br />
PRE_UP="ifconfig wlan0 down; iwconfig wlan0 mode ad-hoc"<br />
<br />
Or if you want to mount your network shares after a successful connection, you could use:<br />
<br />
POST_UP="sleep 5; mount /mnt/shares/nexus/utorrent 2>/dev/null;"<br />
<br />
{{Note|If the commands specified in these properties return anything other than 0 (success), netcfg aborts the current operation. So if you want to mount a certain network share that might not be available at the time of connection (thus returning an error), you could create a separate bash script with the mount commands and a "exit 0;" at the end. Alternatively you can add <nowiki>"|| true"</nowiki> to the end of the command that may fail.}}<br />
<br />
==Profile Menu==<br />
You may select a profile to connect to from a menu. This requires the 'dialog' package installed. To display a menu, simply run 'netcfg-menu'. If you wish to have a menu on boot, set <br />
<br />
NETWORKS=(menu) <br />
<br />
in your /etc/rc.conf and ensure that net-profiles is in the DAEMONS array.<br />
<br />
==Per interface configuration==<br />
Configuration options that apply to all profiles using an interface can be set using: /etc/network.d/interfaces/$INTERFACE. For example:<br />
<br />
/etc/network.d/interfaces/eth0<br />
<br />
This is useful for wpa_supplicant options, radio kill switch support, pre/post up/down scripts and net-auto-wireless. It is loaded before a profile is loaded so that any profile based options will take priority.<br />
<br />
For example, /etc/network.d/interfaces/wlan0 may contain any valid profile option, though you're most likely going to want one of the options below. Remember that this option is set for _all_ profiles using that interface - for example you probably don't want to set your work VPN here, as it will try to connect to it on every wireless network - it would be better suited to the profile.<br />
<br />
PRE_UP - To run a command before/after bringing the connection up/down<br />
POST_UP<br />
PRE_DOWN<br />
POST_DOWN (note only POST_UP/DOWN work with wpa_actiond)<br />
<br />
WPA_GROUP - Setting the group of the wpa_ctrl interface<br />
WPA_COUNTRY - Enforces local regulatory limitations and allows use of more channels. <br />
WPA_DRIVER - Defaults to wext, may want nl80211 for mac80211 devices<br />
<br />
==Output Hooks==<br />
netcfg has limited support to load hooks that handle output. By default it loads the "arch" hook which provides the familiar output that you see. A syslog logging hook is also included. These can be found at /usr/lib/network/hooks<br />
<br />
==Debugging==<br />
To run netcfg with debugging output, set the NETCFG_DEBUG environment variable to "yes", for example:<br />
NETCFG_DEBUG="yes" netcfg <arguments><br />
<br />
=Troubleshooting=<br />
==Wireless connections==<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
==netcfg error messages==<br />
===Network unavailable===<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue <br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
===Wireless Association failed===<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
===Unable to get IP address with DHCP===<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
===Not a valid connection, check spelling or look at examples===<br />
You must set CONNECTION= to one of the connection types in /usr/lib/network/connections/. Alternatively use one of the provided configuration examples in /etc/network.d/examples.<br />
<br />
==Driver Quirks (netcfg 2.1 and later)==<br />
{{Box Note | You most likely do NOT need these. Ensure your configuration is correct before considering these. They are for a small range of drivers with unusual issues, many of them older versions. These are workarounds, not solutions. }}<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant (ath9k)<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
==It still doesn't work, what do I do ?==<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely crucial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also crucial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
=GUI=<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
There is also a relatively new gui to netcfg2 on qt-apps that does only network configuring.You can find it here: [http://www.qt-apps.org/content/show.php/netcfgGUI?content=99523].<br />
<br />
=Supplementary tools=<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convenient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in [community] repository. To install, do <code>pacman -S wifi-select</code>.<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
=FAQ=<br />
==Why doesnt netcfg do ''x''?==<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
==Why doesn't netcfg behave in this way? It makes more sense==<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
==Do I still need ''x'' when I'm using netcfg?==<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=97709
Netcfg
2010-02-21T03:59:00Z
<p>Iphitus: Undo revision 97382 by EdwardXXIV (Talk) - ifplugd is NOT required in the daemons line</p>
<hr />
<div>[[Category:Networking (English)]]<br />
{{i18n|Network Profiles}}<br />
<br />
{{Box RED||'''This document refers to netcfg 2.5.x''' &ndash; please upgrade to the latest version of netcfg.}}<br />
<br />
From the [http://projects.archlinux.org/netcfg.git/tree/man/netcfg.8 netcfg man page]:<br />
<br />
:'''''netcfg''' is used to configure and manage network connections via profiles. It has pluggable support for a range of connection types, such as wireless, ethernet, ppp. It is also capable of starting/stopping many to one connections, that is, multiple connections within the same profile, optionally with bonding.''<br />
<br />
netcfg is profile-based; each network has an individual profile. These profiles can be individually connected/disconnected at any time. The profile configuration varies depending on whether it's a wireless, ethernet or other type of connection. The available options are documented on the netcfg website and in the included examples.<br />
<br />
==Prerequisites==<br />
<br />
If connecting to a wireless network, have some basic information ready. For a wireless network this includes what type of security is used, the network name (SSID), and any password or encryption keys. <br />
<br />
==Installation==<br />
Ensure you have the latest version of netcfg installed. Older versions have more bugs and may not work well with the latest drivers. The {{Package Official|netcfg}} package is available in '''core''':<br />
<br />
# pacman -S netcfg<br />
<br />
As of version 2.5.x, optional dependencies include {{Package Official|wpa_actiond}} &ndash; required for automatic/roaming wireless connection &ndash; and {{Package Official|ifplugd}} &ndash; required for automatic ethernet configuration. ([http://www.archlinux.org/news/487/ More information].)<br />
<br />
# pacman -S wpa_actiond ifplugd<br />
<br />
==Configuration==<br />
Copy an example configuration from {{Filename|/etc/network.d/examples/}} to {{Filename|/etc/network.d/mynetwork}}. The filename is the name of the network profile, "mynetwork" is used as an example throughout this introduction. The name is not a network setting and does not need to match your wireless network name (SSID).<br />
<br />
Depending on your security and connection, use one of the following examples from {{Filename|/etc/network.d/examples/}} as a base. Be wary of examples found on the internet as they often contain deprecated options that may cause problems.<br />
<br />
{| border="1"<br />
! Connection type/security !! Example profile<br />
|-<br />
| Wireless; WEP hex key || {{Filename|wireless-wep}}<br />
|-<br />
| Wireless; WEP string key || {{Filename|wireless-wep-string-key}}<br />
|-<br />
| Wireless; WPA personal (passphrase) || {{Filename|wireless-wpa}}<br />
|-<br />
| Wireless; WPA enterprise || {{Filename|wireless-wpa-config}} (wpa_supplicant configuration is external) or {{Filename|wireless-wpa-configsection}} (wpa_supplicant configuration stored as string)<br />
|-<br />
| Wired; DHCP || {{Filename|ethernet-dhcp}}<br />
|-<br />
| Wired; static IP || {{Filename|ethernet-static}}<br />
|-<br />
| Wired; iproute configuration || {{Filename|ethernet-iproute}}<br />
|}<br />
<br />
{{Note | Example profiles are located in {{Filename|/etc/network.d/examples/}}. Modifying an example from here is the best way to ensure that you have a configuration suitable for your version of netcfg.}}<br />
<br />
{{Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created {{Filename|/etc/network.d/*.conf}} file (e.g. {{Codeline|chmod 0600 /etc/network.d/*.conf}} to make it readable by root only), depending upon how security conscious you are.}}<br />
<br />
Next, modify your new configuration file, {{Filename|/etc/network.d/mynetwork}}:<br />
<br />
* Set {{Codeline|<nowiki>INTERFACE=</nowiki>}} to your wireless or ethernet interface. This can be checked with ifconfig and iwconfig.<br />
* Make sure you set your ESSID and KEY/passphrase correctly. Typos in these fields are common errors.<br />
<br />
==Usage==<br />
To connect, simply execute:<br />
# netcfg mynetwork<br />
<br />
To disconnect from a profile:<br />
# netcfg down <profile-name><br />
<br />
If it does not work, have a look at [[#Troubleshooting]] for solutions and how to get help.<br />
<br />
If all goes to plan, you can configure it to connect automatically or on boot.<br />
<br />
For more command line arguments, see:<br />
$ netcfg help<br />
<br />
=Configuration Notes=<br />
==Using a string WEP key==<br />
This is for a STRING WEP key, not a HEX WEP key, not a WPA key.<br />
KEY="s:Somepasskey"<br />
<br />
==Ralink legacy drivers rt2500, rt2400 that use iwpriv==<br />
There is no plans to add WPA support to these drivers. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed iwpriv commands and put its path in PRE_UP=""<br />
<br />
==Passing arguments to iwconfig before connecting==<br />
Simply:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where <arguments> can be any valid iwconfig argument. The script then runs "iwconfig $INTERFACE $IWCONFIG"<br />
<br />
For example, setting bssid/ap mac:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supercedes the IWOPTS and WEP_OPTS options which were incompletely implemented.<br />
<br />
=Connecting automatically and/or on boot=<br />
==net-profiles - Connect a specific list of profiles==<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array<br />
<br />
If you have nothing configured within the INTERFACES array, you may remove the "network" daemon from the daemons line.<br />
<br />
==net-auto-wireless - Automatically connect to, and roam between wireless networks==<br />
<br />
In your /etc/rc.conf, add a line setting WIRELESS_INTERFACE to your wireless device. For example:<br />
WIRELESS_INTERFACE="wlan0"<br />
<br />
Then add <code>net-auto-wireless</code> to the DAEMONS array.<br />
<br />
This requires appropriate profiles to be made for the networks in /etc/network.d/<br />
<br />
==net-auto-wired==<br />
<br />
In your /etc/rc.conf, add a line setting WIRED_INTERFACE to your wired device. For example:<br />
WIRED_INTERFACE="eth0"<br />
<br />
Then add <code>net-auto-wired</code> to the DAEMONS array.<br />
<br />
This requires appropriate profiles to be made for the networks in /etc/network.d/<br />
<br />
==netcfg-menu - Display a menu at boot where a profile may be selected==<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu:<br />
<br />
NETWORKS=menu<br />
<br />
or<br />
<br />
NETWORKS=(menu)<br />
<br />
(either will work). And ensure that net-profiles is in your rc.conf DAEMONS array. You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
==net-auto (DEPRECATED, see net-auto-wireless)==<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line, eg: DAEMONS=(... '''net-auto''' ...).<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
note: for this to work with a given profile, that profile MUST set the ESSID variable (which is not required to connect manually if a separate wpa_supplicant.conf is supplied.)<br />
<br />
=Other Features=<br />
==RFKill (enable/disable radio power)==<br />
<br />
netcfg can enable/disable radio for wireless cards equipped with software control of radio. For wireless cards with hardware switches netcfg can detect disabled hardware switches and fail accordingly.<br />
<br />
To enable rfkill support, you need to specify what sort of switch the wireless interface has, hardware or software. This can be put in a profile, or /etc/network.d/interfaces/$INTERFACE. <br />
<br />
RFKILL=soft # can be either 'hard' or 'soft'.<br />
<br />
For some kill switches the rfkill entry in /sys is not linked to the interface. For these the 'RFKILL_NAME' needs to be set. This value is the contents of the matching /sys/class/rfkill/rfkillX/name<br />
<br />
For example on my eeepc:<br />
<br />
RFKILL=soft<br />
RFKILL_NAME='eeepc-wlan'<br />
<br />
==Execute commands before/after interface up/down==<br />
If your interface requires special actions prior/after the establishment/closure of a connection, you may use the '''PRE_UP''', '''POST_UP''', '''PRE_DOWN''', '''POST_DOWN''' properties.<br />
<br />
For example, if you want to set your wlan card to operate in ad-hoc mode but you can only change it when the interface is down, you could use something like this:<br />
<br />
PRE_UP="ifconfig wlan0 down; iwconfig wlan0 mode ad-hoc"<br />
<br />
Or if you want to mount your network shares after a successful connection, you could use:<br />
<br />
POST_UP="sleep 5; mount /mnt/shares/nexus/utorrent 2>/dev/null;"<br />
<br />
{{Note|If the commands specified in these properties return anything other than 0 (success), netcfg aborts the current operation. So if you want to mount a certain network share that might not be available at the time of connection (thus returning an error), you could create a separate bash script with the mount commands and a "exit 0;" at the end. Alternatively you can add <nowiki>"|| true"</nowiki> to the end of the command that may fail.}}<br />
<br />
==Profile Menu==<br />
You may select a profile to connect to from a menu. This requires the 'dialog' package installed. To display a menu, simply run 'netcfg-menu'. If you wish to have a menu on boot, set <br />
<br />
NETWORKS=(menu) <br />
<br />
in your /etc/rc.conf and ensure that net-profiles is in the DAEMONS array.<br />
<br />
==Per interface configuration==<br />
Configuration options that apply to all profiles using an interface can be set using: /etc/network.d/interfaces/$INTERFACE. For example:<br />
<br />
/etc/network.d/interfaces/eth0<br />
<br />
This is useful for wpa_supplicant options, radio kill switch support, pre/post up/down scripts and net-auto-wireless. It is loaded before a profile is loaded so that any profile based options will take priority.<br />
<br />
For example, /etc/network.d/interfaces/wlan0 may contain any valid profile option, though you're most likely going to want one of the options below. Remember that this option is set for _all_ profiles using that interface - for example you probably don't want to set your work VPN here, as it will try to connect to it on every wireless network - it would be better suited to the profile.<br />
<br />
PRE_UP - To run a command before/after bringing the connection up/down<br />
POST_UP<br />
PRE_DOWN<br />
POST_DOWN (note only POST_UP/DOWN work with wpa_actiond)<br />
<br />
WPA_GROUP - Setting the group of the wpa_ctrl interface<br />
WPA_COUNTRY - Enforces local regulatory limitations and allows use of more channels. <br />
WPA_DRIVER - Defaults to wext, may want nl80211 for mac80211 devices<br />
<br />
==Output Hooks==<br />
netcfg has limited support to load hooks that handle output. By default it loads the "arch" hook which provides the familiar output that you see. A syslog logging hook is also included. These can be found at /usr/lib/network/hooks<br />
<br />
==Debugging==<br />
To run netcfg with debugging output, set the NETCFG_DEBUG environment variable to "yes", for example:<br />
NETCFG_DEBUG="yes" netcfg <arguments><br />
<br />
=Troubleshooting=<br />
==Wireless connections==<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
==netcfg error messages==<br />
===Network unavailable===<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue <br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
===Wireless Association failed===<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
===Unable to get IP address with DHCP===<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
===Not a valid connection, check spelling or look at examples===<br />
You must set CONNECTION= to one of the connection types in /usr/lib/network/connections/. Alternatively use one of the provided configuration examples in /etc/network.d/examples.<br />
<br />
==Driver Quirks (netcfg 2.1 and later)==<br />
{{Box Note | You most likely do NOT need these. Ensure your configuration is correct before considering these. They are for a small range of drivers with unusual issues, many of them older versions. These are workarounds, not solutions. }}<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant (ath9k)<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
==It still doesn't work, what do I do ?==<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely crucial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also crucial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
=GUI=<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
There is also a relatively new gui to netcfg2 on qt-apps that does only network configuring.You can find it here: [http://www.qt-apps.org/content/show.php/netcfgGUI?content=99523].<br />
<br />
=Supplementary tools=<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convenient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in [community] repository. To install, do <code>pacman -S wifi-select</code>.<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
=FAQ=<br />
==Why doesnt netcfg do ''x''?==<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
==Why doesn't netcfg behave in this way? It makes more sense==<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
==Do I still need ''x'' when I'm using netcfg?==<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=97290
Netcfg
2010-02-18T09:30:46Z
<p>Iphitus: </p>
<hr />
<div>[[Category:Networking (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Network Profiles}}<br />
{{i18n_entry|简体中文|Netcfg2网络配置}}<br />
{{i18n_entry|Türkçe|Ağ Profilleri}}<br />
{{i18n_links_end}}<br />
<br />
{{Box RED|This document refers to netcfg 2.5.x|Please upgrade to the latest version of netcfg}}<br />
<br />
=Quick Start - netcfg in 4 easy steps=<br />
<br />
Have some basic information about your wireless network ready. For a wireless network this includes what type of security is used, network name and any password or encryption keys. <br />
<br />
netcfg is profile based. Each network has an individual profile. These profiles can be individually connected/disconnected at any time. The profile configuration varies depending on whether it's a wireless, ethernet or other type of connection. The available options are documented on the netcfg website and in the included examples.<br />
<br />
==Step 1==<br />
Ensure you have the latest version of netcfg installed. Older versions have more bugs and may not work well with the latest drivers.<br />
<br />
# pacman -S netcfg<br />
<br />
==Step 2==<br />
Copy an example configuration from /etc/network.d/examples/ to /etc/network.d/mynetwork. The filename is the name of the network profile, "mynetwork" is used as an example throughout this quickstart. The name is not a network setting and does not need to match your wireless network name (SSID).<br />
<br />
Depending on your security and connection, use one of the following examples from /etc/network.d/examples/ as a base. Be wary of examples found on the internet as they often contain deprecated options that may cause problems.<br />
<br />
* '''WEP hex key''' wireless-wep<br />
* '''WEP string key''' wireless-wep-string-key<br />
* '''WPA personal (passphrase)''' wireless-wpa<br />
* '''WPA enterprise''' wireless-wpa-config (wpa_supplicant configuration is external) or wireless-wpa-configsection (wpa_supplicant configuration stored as string)<br />
* '''Wired connection - dhcp''' ethernet-dhcp<br />
* '''Wired connection - static IP''' ethernet-static<br />
* '''Wired connection - iproute configuration''' ethernet-iproute<br />
<br />
{{Box Note | Example profiles are located in /etc/network.d/examples/. Modifying an example from here is the best way to ensure that you have a configuration suitable for your version of netcfg. }}<br />
<br />
{{Box Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created /etc/network.d/*.conf file (e.g. <tt>chmod 0600 /etc/network.d/*.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
==Step 3==<br />
Modify your configuration file new configuration file, /etc/network.d/mynetwork<br />
<br />
* Set INTERFACE= to your wireless or ethernet interface. This can be checked with ifconfig and iwconfig.<br />
* Make sure you set your ESSID and KEY/passphrase correctly. Typos in these are common errors.<br />
<br />
==Step 4==<br />
To connect, simply execute:<br />
# netcfg mynetwork<br />
<br />
To disconnect from a profile:<br />
# netcfg down <profile-name><br />
<br />
If it does not work, have a look at the [[Network Profiles#Troubleshooting|troubleshooting section]] for solutions and how to get help.<br />
<br />
If all goes to plan, you can configure it to [[Network Profiles#Step 4: Connecting on boot|connect automatically or on boot]].<br />
<br />
For more command line arguments, see <br />
# netcfg help<br />
<br />
=Configuration Notes=<br />
==Using a string WEP key==<br />
This is for a STRING WEP key, not a HEX WEP key, not a WPA key.<br />
KEY="s:Somepasskey"<br />
<br />
==Ralink legacy drivers rt2500, rt2400 that use iwpriv==<br />
There is no plans to add WPA support to these drivers. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed iwpriv commands and put its path in PRE_UP=""<br />
<br />
==Passing arguments to iwconfig before connecting==<br />
Simply:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where <arguments> can be any valid iwconfig argument. The script then runs "iwconfig $INTERFACE $IWCONFIG"<br />
<br />
For example, setting bssid/ap mac:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supercedes the IWOPTS and WEP_OPTS options which were incompletely implemented.<br />
<br />
=Connecting automatically and/or on boot=<br />
==net-profiles - Connect a specific list of profiles==<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array<br />
<br />
If you have nothing configured within the INTERFACES array, you may remove the "network" daemon from the daemons line.<br />
<br />
==net-auto-wireless - Automatically connect to, and roam between wireless networks==<br />
<br />
In your /etc/rc.conf, add a line setting WIRELESS_INTERFACE to your wireless device. For example:<br />
WIRELESS_INTERFACE="wlan0"<br />
<br />
Then add <code>net-auto-wireless</code> to the DAEMONS array.<br />
<br />
This requires appropriate profiles to be made for the networks in /etc/network.d/<br />
<br />
==net-auto-wired==<br />
<br />
In your /etc/rc.conf, add a line setting WIRED_INTERFACE to your wired device. For example:<br />
WIRED_INTERFACE="eth0"<br />
<br />
Then add <code>net-auto-wired</code> to the DAEMONS array.<br />
<br />
This requires appropriate profiles to be made for the networks in /etc/network.d/<br />
<br />
==netcfg-menu - Display a menu at boot where a profile may be selected==<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu:<br />
<br />
NETWORKS=menu<br />
<br />
or<br />
<br />
NETWORKS=(menu)<br />
<br />
(either will work). And ensure that net-profiles is in your rc.conf DAEMONS array. You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
==net-auto (DEPRECATED, see net-auto-wireless)==<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line, eg: DAEMONS=(... '''net-auto''' ...).<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
note: for this to work with a given profile, that profile MUST set the ESSID variable (which is not required to connect manually if a separate wpa_supplicant.conf is supplied.)<br />
<br />
=Other Features=<br />
==RFKill (enable/disable radio power)==<br />
<br />
netcfg can enable/disable radio for wireless cards equipped with software control of radio. For wireless cards with hardware switches netcfg can detect disabled hardware switches and fail accordingly.<br />
<br />
To enable rfkill support, you need to specify what sort of switch the wireless interface has, hardware or software. This can be put in a profile, or /etc/network.d/interfaces/$INTERFACE. <br />
<br />
RFKILL=soft # can be either 'hard' or 'soft'.<br />
<br />
For some kill switches the rfkill entry in /sys is not linked to the interface. For these the 'RFKILL_NAME' needs to be set. This value is the contents of the matching /sys/class/rfkill/rfkillX/name<br />
<br />
For example on my eeepc:<br />
<br />
RFKILL=soft<br />
RFKILL_NAME='eeepc-wlan'<br />
<br />
==Execute commands before/after interface up/down==<br />
If your interface requires special actions prior/after the establishment/closure of a connection, you may use the '''PRE_UP''', '''POST_UP''', '''PRE_DOWN''', '''POST_DOWN''' properties.<br />
<br />
For example, if you want to set your wlan card to operate in ad-hoc mode but you can only change it when the interface is down, you could use something like this:<br />
<br />
PRE_UP="ifconfig wlan0 down; iwconfig wlan0 mode ad-hoc"<br />
<br />
Or if you want to mount your network shares after a successful connection, you could use:<br />
<br />
POST_UP="sleep 5; mount /mnt/shares/nexus/utorrent 2>/dev/null;"<br />
<br />
{{Note|If the commands specified in these properties return anything other than 0 (success), netcfg aborts the current operation. So if you want to mount a certain network share that might not be available at the time of connection (thus returning an error), you could create a separate bash script with the mount commands and a "exit 0;" at the end. Alternatively you can add <nowiki>"|| true"</nowiki> to the end of the command that may fail.}}<br />
<br />
==Profile Menu==<br />
You may select a profile to connect to from a menu. This requires the 'dialog' package installed. To display a menu, simply run 'netcfg-menu'. If you wish to have a menu on boot, set <br />
<br />
NETWORKS=(menu) <br />
<br />
in your /etc/rc.conf and ensure that net-profiles is in the DAEMONS array.<br />
<br />
==Per interface configuration==<br />
Configuration options that apply to all profiles using an interface can be set using: /etc/network.d/interfaces/$INTERFACE. For example:<br />
<br />
/etc/network.d/interfaces/eth0<br />
<br />
This is useful for wpa_supplicant options, radio kill switch support, pre/post up/down scripts and net-auto-wireless. It is loaded before a profile is loaded so that any profile based options will take priority.<br />
<br />
For example, /etc/network.d/interfaces/wlan0 may contain any valid profile option, though you're most likely going to want one of the options below. Remember that this option is set for _all_ profiles using that interface - for example you probably don't want to set your work VPN here, as it will try to connect to it on every wireless network - it would be better suited to the profile.<br />
<br />
PRE_UP - To run a command before/after bringing the connection up/down<br />
POST_UP<br />
PRE_DOWN<br />
POST_DOWN (note only POST_UP/DOWN work with wpa_actiond)<br />
<br />
WPA_GROUP - Setting the group of the wpa_ctrl interface<br />
WPA_COUNTRY - Enforces local regulatory limitations and allows use of more channels. <br />
WPA_DRIVER - Defaults to wext, may want nl80211 for mac80211 devices<br />
<br />
==Output Hooks==<br />
netcfg has limited support to load hooks that handle output. By default it loads the "arch" hook which provides the familiar output that you see. A syslog logging hook is also included. These can be found at /usr/lib/network/hooks<br />
<br />
==Debugging==<br />
To run netcfg with debugging output, set the NETCFG_DEBUG environment variable to "yes", for example:<br />
NETCFG_DEBUG="yes" netcfg <arguments><br />
<br />
=Troubleshooting=<br />
==Wireless connections==<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
==netcfg error messages==<br />
===Network unavailable===<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue <br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
===Wireless Association failed===<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
===Unable to get IP address with DHCP===<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
===Not a valid connection, check spelling or look at examples===<br />
You must set CONNECTION= to one of the connection types in /usr/lib/network/connections/. Alternatively use one of the provided configuration examples in /etc/network.d/examples.<br />
<br />
==Driver Quirks (netcfg 2.1 and later)==<br />
{{Box Note | You most likely do NOT need these. Ensure your configuration is correct before considering these. They are for a small range of drivers with unusual issues, many of them older versions. These are workarounds, not solutions. }}<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant (ath9k)<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
==It still doesn't work, what do I do ?==<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely crucial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also crucial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
=GUI=<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
There is also a relatively new gui to netcfg2 on qt-apps that does only network configuring.You can find it here: [http://www.qt-apps.org/content/show.php/netcfgGUI?content=99523].<br />
<br />
=Supplementary tools=<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convenient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in [community] repository. To install, do <code>pacman -S wifi-select</code>.<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
=FAQ=<br />
==Why doesnt netcfg do ''x''?==<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
==Why doesn't netcfg behave in this way? It makes more sense==<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
==Do I still need ''x'' when I'm using netcfg?==<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=97289
Netcfg
2010-02-18T09:26:06Z
<p>Iphitus: New version, docs needed overhauling to reduce duplication.</p>
<hr />
<div>[[Category:Networking (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Network Profiles}}<br />
{{i18n_entry|简体中文|Netcfg2网络配置}}<br />
{{i18n_entry|Türkçe|Ağ Profilleri}}<br />
{{i18n_links_end}}<br />
<br />
=Quick Start - netcfg in 4 easy steps=<br />
<br />
Have some basic information about your wireless network ready. For a wireless network this includes what type of security is used, network name and any password or encryption keys. <br />
<br />
netcfg is profile based. Each network has an individual profile. These profiles can be individually connected/disconnected at any time. The profile configuration varies depending on whether it's a wireless, ethernet or other type of connection. The available options are documented on the netcfg website and in the included examples.<br />
<br />
==Step 1==<br />
Ensure you have the latest version of netcfg installed. Older versions have more bugs and may not work well with the latest drivers.<br />
<br />
# pacman -S netcfg<br />
<br />
==Step 2==<br />
Copy an example configuration from /etc/network.d/examples/ to /etc/network.d/mynetwork. The filename is the name of the network profile, "mynetwork" is used as an example throughout this quickstart. The name is not a network setting and does not need to match your wireless network name (SSID).<br />
<br />
Depending on your security and connection, use one of the following examples from /etc/network.d/examples/ as a base. Be wary of examples found on the internet as they often contain deprecated options that may cause problems.<br />
<br />
* '''WEP hex key''' wireless-wep<br />
* '''WEP string key''' wireless-wep-string-key<br />
* '''WPA personal (passphrase)''' wireless-wpa<br />
* '''WPA enterprise''' wireless-wpa-config (wpa_supplicant configuration is external) or wireless-wpa-configsection (wpa_supplicant configuration stored as string)<br />
* '''Wired connection - dhcp''' ethernet-dhcp<br />
* '''Wired connection - static IP''' ethernet-static<br />
* '''Wired connection - iproute configuration''' ethernet-iproute<br />
<br />
{{Box Note | Example profiles are located in /etc/network.d/examples/. Modifying an example from here is the best way to ensure that you have a configuration suitable for your version of netcfg. }}<br />
<br />
{{Box Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created /etc/network.d/*.conf file (e.g. <tt>chmod 0600 /etc/network.d/*.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
==Step 3==<br />
Modify your configuration file new configuration file, /etc/network.d/mynetwork<br />
<br />
* Set INTERFACE= to your wireless or ethernet interface. This can be checked with ifconfig and iwconfig.<br />
* Make sure you set your ESSID and KEY/passphrase correctly. Typos in these are common errors.<br />
<br />
==Step 4==<br />
To connect, simply execute:<br />
# netcfg mynetwork<br />
<br />
To disconnect from a profile:<br />
# netcfg down <profile-name><br />
<br />
If it does not work, have a look at the [[Network Profiles#Troubleshooting|troubleshooting section]] for solutions and how to get help.<br />
<br />
If all goes to plan, you can configure it to [[Network Profiles#Step 4: Connecting on boot|connect automatically or on boot]].<br />
<br />
For more command line arguments, see <br />
# netcfg help<br />
<br />
=Configuration Notes=<br />
==Using a string WEP key==<br />
This is for a STRING WEP key, not a HEX WEP key, not a WPA key.<br />
KEY="s:Somepasskey"<br />
<br />
==Ralink legacy drivers rt2500, rt2400 that use iwpriv==<br />
There is no plans to add WPA support to these drivers. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed iwpriv commands and put its path in PRE_UP=""<br />
<br />
==Passing arguments to iwconfig before connecting==<br />
Simply:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where <arguments> can be any valid iwconfig argument. The script then runs "iwconfig $INTERFACE $IWCONFIG"<br />
<br />
For example, setting bssid/ap mac:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supercedes the IWOPTS and WEP_OPTS options which were incompletely implemented.<br />
<br />
=Connecting automatically and/or on boot=<br />
==net-profiles - Connect a specific list of profiles==<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array<br />
<br />
If you have nothing configured within the INTERFACES array, you may remove the "network" daemon from the daemons line.<br />
<br />
==net-auto-wireless - Automatically connect to, and roam between wireless networks==<br />
<br />
In your /etc/rc.conf, add a line setting WIRELESS_INTERFACE to your wireless device. For example:<br />
WIRELESS_INTERFACE="wlan0"<br />
<br />
Then add <code>net-auto-wireless</code> to the DAEMONS array.<br />
<br />
This requires appropriate profiles to be made for the networks in /etc/network.d/<br />
<br />
==net-auto-wired==<br />
<br />
In your /etc/rc.conf, add a line setting WIRED_INTERFACE to your wired device. For example:<br />
WIRED_INTERFACE="eth0"<br />
<br />
Then add <code>net-auto-wired</code> to the DAEMONS array.<br />
<br />
This requires appropriate profiles to be made for the networks in /etc/network.d/<br />
<br />
==netcfg-menu - Display a menu at boot where a profile may be selected==<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu:<br />
<br />
NETWORKS=menu<br />
<br />
or<br />
<br />
NETWORKS=(menu)<br />
<br />
(either will work). And ensure that net-profiles is in your rc.conf DAEMONS array. You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
==net-auto (DEPRECATED, see net-auto-wireless)==<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line, eg: DAEMONS=(... '''net-auto''' ...).<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
note: for this to work with a given profile, that profile MUST set the ESSID variable (which is not required to connect manually if a separate wpa_supplicant.conf is supplied.)<br />
<br />
=Other Features=<br />
==RFKill (enable/disable radio power)==<br />
<br />
netcfg can enable/disable radio for wireless cards equipped with software control of radio. For wireless cards with hardware switches netcfg can detect disabled hardware switches and fail accordingly.<br />
<br />
To enable rfkill support, you need to specify what sort of switch the wireless interface has, hardware or software. This can be put in a profile, or /etc/network.d/interfaces/$INTERFACE. <br />
<br />
RFKILL=soft # can be either 'hard' or 'soft'.<br />
<br />
For some kill switches the rfkill entry in /sys is not linked to the interface. For these the 'RFKILL_NAME' needs to be set. This value is the contents of the matching /sys/class/rfkill/rfkillX/name<br />
<br />
For example on my eeepc:<br />
<br />
RFKILL=soft<br />
RFKILL_NAME='eeepc-wlan'<br />
<br />
==Execute commands before/after interface up/down==<br />
If your interface requires special actions prior/after the establishment/closure of a connection, you may use the '''PRE_UP''', '''POST_UP''', '''PRE_DOWN''', '''POST_DOWN''' properties.<br />
<br />
For example, if you want to set your wlan card to operate in ad-hoc mode but you can only change it when the interface is down, you could use something like this:<br />
<br />
PRE_UP="ifconfig wlan0 down; iwconfig wlan0 mode ad-hoc"<br />
<br />
Or if you want to mount your network shares after a successful connection, you could use:<br />
<br />
POST_UP="sleep 5; mount /mnt/shares/nexus/utorrent 2>/dev/null;"<br />
<br />
{{Note|If the commands specified in these properties return anything other than 0 (success), netcfg aborts the current operation. So if you want to mount a certain network share that might not be available at the time of connection (thus returning an error), you could create a separate bash script with the mount commands and a "exit 0;" at the end. Alternatively you can add <nowiki>"|| true"</nowiki> to the end of the command that may fail.}}<br />
<br />
==Profile Menu==<br />
You may select a profile to connect to from a menu. This requires the 'dialog' package installed. To display a menu, simply run 'netcfg-menu'. If you wish to have a menu on boot, set <br />
<br />
NETWORKS=(menu) <br />
<br />
in your /etc/rc.conf and ensure that net-profiles is in the DAEMONS array.<br />
<br />
==Per interface configuration==<br />
Configuration options that apply to all profiles using an interface can be set using: /etc/network.d/interfaces/$INTERFACE. For example:<br />
<br />
/etc/network.d/interfaces/eth0<br />
<br />
This is useful for wpa_supplicant options, radio kill switch support, pre/post up/down scripts and net-auto-wireless. It is loaded before a profile is loaded so that any profile based options will take priority.<br />
<br />
For example, /etc/network.d/interfaces/wlan0 may contain any valid profile option, though you're most likely going to want one of the options below. Remember that this option is set for _all_ profiles using that interface - for example you probably don't want to set your work VPN here, as it will try to connect to it on every wireless network - it would be better suited to the profile.<br />
<br />
PRE_UP - To run a command before/after bringing the connection up/down<br />
POST_UP<br />
PRE_DOWN<br />
POST_DOWN (note only POST_UP/DOWN work with wpa_actiond)<br />
<br />
WPA_GROUP - Setting the group of the wpa_ctrl interface<br />
WPA_COUNTRY - Enforces local regulatory limitations and allows use of more channels. <br />
WPA_DRIVER - Defaults to wext, may want nl80211 for mac80211 devices<br />
<br />
==Output Hooks==<br />
netcfg has limited support to load hooks that handle output. By default it loads the "arch" hook which provides the familiar output that you see. A syslog logging hook is also included. These can be found at /usr/lib/network/hooks<br />
<br />
==Debugging==<br />
To run netcfg with debugging output, set the NETCFG_DEBUG environment variable to "yes", for example:<br />
NETCFG_DEBUG="yes" netcfg <arguments><br />
<br />
=Troubleshooting=<br />
==Wireless connections==<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
==netcfg error messages==<br />
===Network unavailable===<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue <br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
===Wireless Association failed===<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
===Unable to get IP address with DHCP===<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
===Not a valid connection, check spelling or look at examples===<br />
You must set CONNECTION= to one of the connection types in /usr/lib/network/connections/. Alternatively use one of the provided configuration examples in /etc/network.d/examples.<br />
<br />
==Driver Quirks (netcfg 2.1 and later)==<br />
{{Box Note | You most likely do NOT need these. Ensure your configuration is correct before considering these. They are for a small range of drivers with unusual issues, many of them older versions. These are workarounds, not solutions. }}<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant (ath9k)<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
==It still doesn't work, what do I do ?==<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely crucial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also crucial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
=GUI=<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
There is also a relatively new gui to netcfg2 on qt-apps that does only network configuring.You can find it here: [http://www.qt-apps.org/content/show.php/netcfgGUI?content=99523].<br />
<br />
=Supplementary tools=<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convenient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in [community] repository. To install, do <code>pacman -S wifi-select</code>.<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
=FAQ=<br />
==Why doesnt netcfg do ''x''?==<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
==Why doesn't netcfg behave in this way? It makes more sense==<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
==Do I still need ''x'' when I'm using netcfg?==<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=DeveloperWiki:Roll_Call&diff=96917
DeveloperWiki:Roll Call
2010-02-15T12:51:40Z
<p>Iphitus: </p>
<hr />
<div>This is a list of developers and what they work on:<br />
<br />
<br />
'''Allan McRae'''<br />
* toolchain + related packages<br />
* a lot more from core<br />
* python<br />
* SDL<br />
* a bunch of other crap<br />
* makepkg<br />
<br />
'''Jan de Groot'''<br />
* Xorg + official drivers + mesa<br />
* GNOME<br />
* GStreamer<br />
* Xulrunner + Firefox<br />
<br />
'''Daniel Isenmann'''<br />
* complete MONO stack<br />
* monodevelop<br />
* windowmaker<br />
* 3 or 4 more smaller packages<br />
<br />
'''Vesa Kaihlavirta'''<br />
* Haskell <br />
* Erlang<br />
* 5ish small packages<br />
* Willing to take openjdk amongst other things. <br />
<br />
'''Giovanni Scafora'''<br />
* abiword + related packages<br />
* mythtv + related packages<br />
* VLC + related packages<br />
* k9copy/dvdrip/dvdauthor<br />
* some packages that cannot be grouped<br />
* pacman translations<br />
* AUR Italian translation<br />
* adminstration, programming etc. of archlinux.it <br />
<br />
'''François Charette'''<br />
* TeX Live<br />
* Perl<br />
<br />
'''Ionuț MirceaB'''<br />
* Telepathy framework + related packages<br />
* Empathy/gajim/pidgin(+some plugins)<br />
* x264/ffmpeg/mplayer/smpalyer<br />
* networkmanager plugins<br />
* deluge + related packages<br />
* lib32 packages<br />
* some packages that cannot be grouped<br />
<br />
'''Ronald van Haren'''<br />
* Scientific related packages<br />
* koffice and other kde related packages<br />
* quite a few packages that can't be grouped<br />
* networkmanager plugins<br />
* some backend coding for a build service but seems D.Griffith is now ahead for me<br />
<br />
'''Andrea Scarpino'''<br />
* KDE core<br />
* KDE applications<br />
* MySQL<br />
* Bluetooth stuff<br />
* BBS maintainer<br />
* AUR development<br />
<br />
'''Paul Mattal'''<br />
* postgres, postfix, spamassassin, cron, etc.<br />
* bug fixing / un-sticking<br />
* archweb (if I manage to find more time after the first two to help Dan)<br />
<br />
'''Dale Blount'''<br />
* Physical server maintenance<br />
* Would like to help with the "tiered mirroring" design and setup.<br />
* Not much else lately, haven't had a bunch of time.<br />
<br />
'''Daniel J Griffiths'''<br />
* Openbox<br />
* Chromium<br />
* General cleanup of repos/bugtrackers<br />
* I will continue patching away at dbscripts and the such as needed.<br />
* I will also take on other packages that need a home as the are made available.<br />
<br />
'''Aaron Griffin'''<br />
(Take this all with a grain of salt, as my freetime is rare as hell right now)<br />
* dbscripts/devtools<br />
* bash and related (though Allan has been doing most of it)<br />
* releases and archiso<br />
* external contact (press, legal, etc)<br />
* donations<br />
<br />
'''Dieter Plaetinck'''<br />
* release media<br />
* AIF<br />
<br />
'''Thomas Bächler'''<br />
* mkinitcpio<br />
* initscripts<br />
* archiso<br />
* core wireless packages as well as a few general networking packages<br />
* kernel26 (tpowa does most of it, helping out when he can't)<br />
* a few extra packages<br />
* maintenance on gerolde and gudrun<br />
<br />
'''Pierre Schmitz'''<br />
* KDE SC and dependencies<br />
* Qt<br />
* QtCurve-*<br />
* php-*<br />
* chromium<br />
* arora<br />
* psi<br />
* zlib, openssl, ca-certificates etc.<br />
* pkgstats and its results<br />
* adminstration, programming etc. of archlinux.de<br />
* MirrorStatistics<br />
* maintenance of archlinux mediawiki<br />
* maintenance of gudrun (al.org web server)<br />
<br />
'''Eric Bélanger'''<br />
* LVM2<br />
* Misc. CLI utilities in [core]<br />
* DE and related (fvwm, fluxbox, enlightenment, icewm)<br />
* wxgtk/wxpython, gtk/glib (version 1)<br />
* Graphics (imagemagick, gimp-devel and related, geeqie, ...)<br />
* Audio-Video (xine, audacity, avidemux, mutagen, quodlibet, timidity++, xmms, ...)<br />
* Libraries (libwmf, libtiff, jasper, faad2, flac, freeglut, ...)<br />
* Network (curl, rsync, liferea, xchat, ...)<br />
* System (xscreensaver, lm_sensors, net-snmp, ...)<br />
* Other misc. packages: games, scientific, utilities, etc.<br />
* dbscripts/devtools (sourceballs scripts in particuliar)<br />
* Occasional update or bug fix to orphaned packages<br />
<br />
'''Dan McGee'''<br />
* pacman (oh how I wish I had more time...)<br />
* archweb<br />
* random sysadmin/operations tasks on all three servers + stats site<br />
* a handful of packages I use heavily (pacman, mirrorlist, git, etc.)<br />
* development assistance with other projects<br />
<br />
'''Jürgen Hötzel'''<br />
* LXDE<br />
* Emacs<br />
* Scheme/Lisp packages<br />
<br />
'''TobiasP aka tpowa'''<br />
* kernel26 and kernel26-lts<br />
* mostly all binary modules for kernels like nvidia and so on.<br />
* udev<br />
* mkinitcpio<br />
* initscripts<br />
* freenx<br />
* some kde apps like k3b,digikam,kipi-plugins<br />
* archboot + hwdetect<br />
* archboot releases<br />
<br />
'''AndreasR / AndyRTR'''<br />
* OpenOffice + deps<br />
* OpenJDK<br />
* Xfce<br />
* Nouveau driver<br />
* AMD/Ati driver<br />
* Printing packages (cups/ghostscript/foomatic/gutenprint)<br />
* introduced LTS kernel<br />
* nano,sqlite3,libgcrypt,man-db+pages in core<br />
* webkit, midori<br />
* dovecot, getmail + other minor stuff and deps<br />
<br />
'''Thayer Williams'''<br />
* Archweb redesign (bbs, wiki, the works...)<br />
* Packaging<br />
* Wiki author/editor<br />
<br />
'''James Rayner'''<br />
* netcfg<br />
* small collection of packages<br />
* looking to find a new project, however Arch has been 'just working' and time has been short.<br />
<br />
People on the [http://www.archlinux.org/developers/ developers] page that have not filled this out yet:<br />
<br />
*GeoffroyC<br />
*HugoD<br />
*KevinP<br />
*RomanK<br />
*TobiasK</div>
Iphitus
https://wiki.archlinux.org/index.php?title=DeveloperWiki:Roll_Call&diff=96915
DeveloperWiki:Roll Call
2010-02-15T12:47:37Z
<p>Iphitus: </p>
<hr />
<div>This is a list of developers and what they work on:<br />
<br />
<br />
'''Allan McRae'''<br />
* toolchain + related packages<br />
* a lot more from core<br />
* python<br />
* SDL<br />
* a bunch of other crap<br />
* makepkg<br />
<br />
'''Jan de Groot'''<br />
* Xorg + official drivers + mesa<br />
* GNOME<br />
* GStreamer<br />
* Xulrunner + Firefox<br />
<br />
'''Daniel Isenmann'''<br />
* complete MONO stack<br />
* monodevelop<br />
* windowmaker<br />
* 3 or 4 more smaller packages<br />
<br />
'''Vesa Kaihlavirta'''<br />
* Haskell <br />
* Erlang<br />
* 5ish small packages<br />
* Willing to take openjdk amongst other things. <br />
<br />
'''Giovanni Scafora'''<br />
* abiword + related packages<br />
* mythtv + related packages<br />
* VLC + related packages<br />
* k9copy/dvdrip/dvdauthor<br />
* some packages that cannot be grouped<br />
* pacman translations<br />
* AUR Italian translation<br />
* adminstration, programming etc. of archlinux.it <br />
<br />
'''François Charette'''<br />
* TeX Live<br />
* Perl<br />
<br />
'''Ionuț MirceaB'''<br />
* Telepathy framework + related packages<br />
* Empathy/gajim/pidgin(+some plugins)<br />
* x264/ffmpeg/mplayer/smpalyer<br />
* networkmanager plugins<br />
* deluge + related packages<br />
* lib32 packages<br />
* some packages that cannot be grouped<br />
<br />
'''Ronald van Haren'''<br />
* Scientific related packages<br />
* koffice and other kde related packages<br />
* quite a few packages that can't be grouped<br />
* networkmanager plugins<br />
* some backend coding for a build service but seems D.Griffith is now ahead for me<br />
<br />
'''Andrea Scarpino'''<br />
* KDE core<br />
* KDE applications<br />
* MySQL<br />
* Bluetooth stuff<br />
* BBS maintainer<br />
* AUR development<br />
<br />
'''Paul Mattal'''<br />
* postgres, postfix, spamassassin, cron, etc.<br />
* bug fixing / un-sticking<br />
* archweb (if I manage to find more time after the first two to help Dan)<br />
<br />
'''Dale Blount'''<br />
* Physical server maintenance<br />
* Would like to help with the "tiered mirroring" design and setup.<br />
* Not much else lately, haven't had a bunch of time.<br />
<br />
'''Daniel J Griffiths'''<br />
* Openbox<br />
* Chromium<br />
* General cleanup of repos/bugtrackers<br />
* I will continue patching away at dbscripts and the such as needed.<br />
* I will also take on other packages that need a home as the are made available.<br />
<br />
'''Aaron Griffin'''<br />
(Take this all with a grain of salt, as my freetime is rare as hell right now)<br />
* dbscripts/devtools<br />
* bash and related (though Allan has been doing most of it)<br />
* releases and archiso<br />
* external contact (press, legal, etc)<br />
* donations<br />
<br />
'''Dieter Plaetinck'''<br />
* release media<br />
* AIF<br />
<br />
'''Thomas Bächler'''<br />
* mkinitcpio<br />
* initscripts<br />
* archiso<br />
* core wireless packages as well as a few general networking packages<br />
* kernel26 (tpowa does most of it, helping out when he can't)<br />
* a few extra packages<br />
* maintenance on gerolde and gudrun<br />
<br />
'''Pierre Schmitz'''<br />
* KDE SC and dependencies<br />
* Qt<br />
* QtCurve-*<br />
* php-*<br />
* chromium<br />
* arora<br />
* psi<br />
* zlib, openssl, ca-certificates etc.<br />
* pkgstats and its results<br />
* adminstration, programming etc. of archlinux.de<br />
* MirrorStatistics<br />
* maintenance of archlinux mediawiki<br />
* maintenance of gudrun (al.org web server)<br />
<br />
'''Eric Bélanger'''<br />
* LVM2<br />
* Misc. CLI utilities in [core]<br />
* DE and related (fvwm, fluxbox, enlightenment, icewm)<br />
* wxgtk/wxpython, gtk/glib (version 1)<br />
* Graphics (imagemagick, gimp-devel and related, geeqie, ...)<br />
* Audio-Video (xine, audacity, avidemux, mutagen, quodlibet, timidity++, xmms, ...)<br />
* Libraries (libwmf, libtiff, jasper, faad2, flac, freeglut, ...)<br />
* Network (curl, rsync, liferea, xchat, ...)<br />
* System (xscreensaver, lm_sensors, net-snmp, ...)<br />
* Other misc. packages: games, scientific, utilities, etc.<br />
* dbscripts/devtools (sourceballs scripts in particuliar)<br />
* Occasional update or bug fix to orphaned packages<br />
<br />
'''Dan McGee'''<br />
* pacman (oh how I wish I had more time...)<br />
* archweb<br />
* random sysadmin/operations tasks on all three servers + stats site<br />
* a handful of packages I use heavily (pacman, mirrorlist, git, etc.)<br />
* development assistance with other projects<br />
<br />
'''Jürgen Hötzel'''<br />
* LXDE<br />
* Emacs<br />
* Scheme/Lisp packages<br />
<br />
'''TobiasP aka tpowa'''<br />
* kernel26 and kernel26-lts<br />
* mostly all binary modules for kernels like nvidia and so on.<br />
* udev<br />
* mkinitcpio<br />
* initscripts<br />
* freenx<br />
* some kde apps like k3b,digikam,kipi-plugins<br />
* archboot + hwdetect<br />
* archboot releases<br />
<br />
'''AndreasR / AndyRTR'''<br />
* OpenOffice + deps<br />
* OpenJDK<br />
* Xfce<br />
* Nouveau driver<br />
* AMD/Ati driver<br />
* Printing packages (cups/ghostscript/foomatic/gutenprint)<br />
* introduced LTS kernel<br />
* nano,sqlite3,libgcrypt,man-db+pages in core<br />
* webkit, midori<br />
* dovecot, getmail + other minor stuff and deps<br />
<br />
'''Thayer Williams'''<br />
* Archweb redesign (bbs, wiki, the works...)<br />
* Packaging<br />
* Wiki author/editor<br />
<br />
'''James Rayner'''<br />
* netcfg<br />
* small collection of packages<br />
<br />
People on the [http://www.archlinux.org/developers/ developers] page that have not filled this out yet:<br />
<br />
*GeoffroyC<br />
*HugoD<br />
*KevinP<br />
*RomanK<br />
*TobiasK</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=79315
Netcfg
2009-10-19T10:53:46Z
<p>Iphitus: /* Step 2 */</p>
<hr />
<div>[[Category:Networking (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Network Profiles}}<br />
{{i18n_entry|简体中文|Netcfg2网络配置}}<br />
{{i18n_entry|Türkçe|Ağ Profilleri}}<br />
{{i18n_links_end}}<br />
<br />
==Quickstart==<br />
===Step 1===<br />
# pacman -Sy netcfg<br />
<br />
===Step 2===<br />
Copy an example configuration from /etc/network.d/examples/ to /etc/network.d/mynetwork. You may use another name instead of "mynetwork".<br />
<br />
Depending on your security and connection, use the following examples from /etc/network.d/examples/<br />
* '''WEP hex key''' wireless-wep<br />
* '''WEP string key''' wireless-wep-string-key<br />
* '''WPA passphrase''' wireless-wpa<br />
* '''WPA enterprise''' wireless-wpa-config<br />
* '''WPA enterprise/passphrase''' wireless-wpa-configsection (new in netcfg 2.5)<br />
* '''Wired connection - dhcp''' ethernet-dhcp<br />
* '''Wired connection - static IP''' ethernet-static<br />
* '''Wired connection - iproute configuration''' ethernet-iproute<br />
<br />
===Step 3===<br />
Modify your configuration file new configuration file, /etc/network.d/mynetwork<br />
<br />
* Set INTERFACE= to your wireless or ethernet interface. This can be checked with ifconfig and iwconfig.<br />
* '''Wireless''' - Make sure you set your ESSID and KEY correctly. Typos in these are common errors.<br />
* '''Wireless - WPA Enterprise''' - You'll need to use an external wpa_supplicant configuration.<br />
<br />
===Step 4===<br />
To connect, simply execute:<br />
# netcfg mynetwork<br />
<br />
If it does not work, have a look at the [[Network Profiles#Troubleshooting|troubleshooting section]] for solutions and how to get help.<br />
<br />
If all goes to plan, you can configure it to [[Network Profiles#Step 4: Connecting on boot|connect automatically or on boot]].<br />
<br />
==Step 1: Install==<br />
Network profiles are handled by the bash scripts available in the netcfg package.<br />
<br />
# pacman -Sy netcfg<br />
<br />
For information relating to the latest development version of netcfg, see [[Network Profiles development]]<br />
<br />
==Step 2: Create the profile(s)==<br />
A profile is a single text file in /etc/network.d which defines variables used by netcfg. The file name will become the name of the profile, and can be anything you wish, it is not a setting involved in the connection.<br />
<br />
The easiest way to create a new profile is to copy one of the example profiles from /etc/network.d/examples and edit it to fit with your network.<br />
<br />
{{Box Note | Example profiles are located in /etc/network.d/examples/. Modifying an example from here is the best way to ensure that you have a configuration suitable for your version of netcfg. }}<br />
<br />
{{Box Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created /etc/network.d/*.conf file (e.g. <tt>chmod 0600 /etc/network.d/*.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
===Configuration Notes===<br />
====Using a string WEP key====<br />
This is for a STRING WEP key, not a HEX WEP key, not a WPA key.<br />
KEY="s:Somepasskey"<br />
<br />
====Ralink legacy drivers rt2500, rt2400 that use iwpriv====<br />
There is no plans to add WPA support to these drivers. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed iwpriv commands and put its path in PRE_UP=""<br />
<br />
====Passing arguments to iwconfig before connecting====<br />
Simply:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where <arguments> can be any valid iwconfig argument. The script then runs "iwconfig $INTERFACE $IWCONFIG"<br />
<br />
For example, setting bssid/ap mac:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supercedes the IWOPTS and WEP_OPTS options which were incompletely implemented.<br />
<br />
====Execute commands before/after interface up/down====<br />
If your interface requires special actions prior/after the establishment/closure of a connection, you may use the '''PRE_UP''', '''POST_UP''', '''PRE_DOWN''', '''POST_DOWN''' properties.<br />
<br />
For example, if you want to set your wlan card to operate in ad-hoc mode but you can only change it when the interface is down, you could use something like this:<br />
<br />
PRE_UP="ifconfig wlan0 down; iwconfig wlan0 mode ad-hoc"<br />
<br />
Or if you want to mount your network shares after a successful connection, you could use:<br />
<br />
POST_UP="sleep 5; mount /mnt/shares/nexus/utorrent 2>/dev/null;"<br />
<br />
{{Note|If the commands specified in these properties return anything other than 0 (success), netcfg aborts the current operation. So if you want to mount a certain network share that might not be available at the time of connection (thus returning an error), you could create a separate bash script with the mount commands and a "exit 0;" at the end. Alternatively you can add <nowiki>"|| true"</nowiki> to the end of the command that may fail.}}<br />
<br />
==Step 3: Connect==<br />
To connect to a profile just execute the following command ''as root'':<br />
# netcfg <profile-name><br />
To disconnect from a profile:<br />
# netcfg down <profile-name><br />
<br />
Where <profile-name> is the name of the file created in /etc/network.d. For example /etc/network.d/homewireless would simply have a profile name of homewireless<br />
<br />
==Step 4: Connecting on boot==<br />
===net-profiles===<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array, eg: DAEMONS=(... '''net-profiles''' ...).<br />
<br />
If you are only using a laptop, with little-to-no use of ethernet, you may want to delete the Network Daemon to resolve boot issues. <br />
<br />
====Display a menu at boot====<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu:<br />
<br />
NETWORKS=menu<br />
<br />
or<br />
<br />
NETWORKS=(menu)<br />
<br />
(either will work). You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
===Automatic detection===<br />
====net-auto====<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line, eg: DAEMONS=(... '''net-auto''' ...).<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
note: for this to work with a given profile, that profile MUST set the ESSID variable (which is not required to connect manually if a separate wpa_supplicant.conf is supplied.)<br />
<br />
==Troubleshooting==<br />
===Wireless connections===<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
===netcfg error messages===<br />
====Network unavailable====<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue (See Driver Quirks above)<br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
====Wireless Association failed====<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem (See Driver Quirks above)<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
====Unable to get IP address with DHCP====<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
====Not a valid connection, check spelling or look at examples====<br />
You must set CONNECTION= to one of the connection types in /usr/lib/network/connections/. Alternatively use one of the provided configuration examples in /etc/network.d/examples.<br />
<br />
===Driver Quirks (netcfg 2.1 and later)===<br />
{{Box Note | You most likely do NOT need these. Ensure your configuration is correct before considering these. They are for a small range of drivers with unusual issues, many of them older versions. These are workarounds, not solutions. }}<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant (ath9k)<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
===It still doesn't work, what do I do ?===<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely crucial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also crucial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
==GUI==<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
There is also a relatively new gui to netcfg2 on qt-apps that does only network configuring.You can find it here: [http://www.qt-apps.org/content/show.php/netcfgGUI?content=99523].<br />
<br />
==Supplementary tools==<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convenient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in [community] repository. To install, do <code>pacman -S wifi-select</code>.<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
==FAQ==<br />
===Why doesnt netcfg do ''x''?===<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
===Why doesn't netcfg behave in this way? It makes more sense===<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
===Do I still need ''x'' when I'm using netcfg?===<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=79314
Netcfg
2009-10-19T10:53:12Z
<p>Iphitus: /* Step 2 */</p>
<hr />
<div>[[Category:Networking (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Network Profiles}}<br />
{{i18n_entry|简体中文|Netcfg2网络配置}}<br />
{{i18n_entry|Türkçe|Ağ Profilleri}}<br />
{{i18n_links_end}}<br />
<br />
==Quickstart==<br />
===Step 1===<br />
# pacman -Sy netcfg<br />
<br />
===Step 2===<br />
Copy an example configuration from /etc/network.d/examples/ to /etc/network.d/mynetwork. You may use another name instead of "mynetwork".<br />
<br />
Depending on your security and connection, use the following examples from /etc/network.d/examples/<br />
* '''WEP hex key''' wireless-wep<br />
* '''WEP string key''' wireless-wep-string-key<br />
* '''WPA passphrase''' wireless-wpa<br />
* '''WPA enterprise''' wireless-wpa-config<br />
* '''WPA enterprise''' wireless-wpa-configsection (new in netcfg 2.5)<br />
* '''Wired connection - dhcp''' ethernet-dhcp<br />
* '''Wired connection - static IP''' ethernet-static<br />
* '''Wired connection - iproute configuration''' ethernet-iproute<br />
<br />
===Step 3===<br />
Modify your configuration file new configuration file, /etc/network.d/mynetwork<br />
<br />
* Set INTERFACE= to your wireless or ethernet interface. This can be checked with ifconfig and iwconfig.<br />
* '''Wireless''' - Make sure you set your ESSID and KEY correctly. Typos in these are common errors.<br />
* '''Wireless - WPA Enterprise''' - You'll need to use an external wpa_supplicant configuration.<br />
<br />
===Step 4===<br />
To connect, simply execute:<br />
# netcfg mynetwork<br />
<br />
If it does not work, have a look at the [[Network Profiles#Troubleshooting|troubleshooting section]] for solutions and how to get help.<br />
<br />
If all goes to plan, you can configure it to [[Network Profiles#Step 4: Connecting on boot|connect automatically or on boot]].<br />
<br />
==Step 1: Install==<br />
Network profiles are handled by the bash scripts available in the netcfg package.<br />
<br />
# pacman -Sy netcfg<br />
<br />
For information relating to the latest development version of netcfg, see [[Network Profiles development]]<br />
<br />
==Step 2: Create the profile(s)==<br />
A profile is a single text file in /etc/network.d which defines variables used by netcfg. The file name will become the name of the profile, and can be anything you wish, it is not a setting involved in the connection.<br />
<br />
The easiest way to create a new profile is to copy one of the example profiles from /etc/network.d/examples and edit it to fit with your network.<br />
<br />
{{Box Note | Example profiles are located in /etc/network.d/examples/. Modifying an example from here is the best way to ensure that you have a configuration suitable for your version of netcfg. }}<br />
<br />
{{Box Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created /etc/network.d/*.conf file (e.g. <tt>chmod 0600 /etc/network.d/*.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
===Configuration Notes===<br />
====Using a string WEP key====<br />
This is for a STRING WEP key, not a HEX WEP key, not a WPA key.<br />
KEY="s:Somepasskey"<br />
<br />
====Ralink legacy drivers rt2500, rt2400 that use iwpriv====<br />
There is no plans to add WPA support to these drivers. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed iwpriv commands and put its path in PRE_UP=""<br />
<br />
====Passing arguments to iwconfig before connecting====<br />
Simply:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where <arguments> can be any valid iwconfig argument. The script then runs "iwconfig $INTERFACE $IWCONFIG"<br />
<br />
For example, setting bssid/ap mac:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supercedes the IWOPTS and WEP_OPTS options which were incompletely implemented.<br />
<br />
====Execute commands before/after interface up/down====<br />
If your interface requires special actions prior/after the establishment/closure of a connection, you may use the '''PRE_UP''', '''POST_UP''', '''PRE_DOWN''', '''POST_DOWN''' properties.<br />
<br />
For example, if you want to set your wlan card to operate in ad-hoc mode but you can only change it when the interface is down, you could use something like this:<br />
<br />
PRE_UP="ifconfig wlan0 down; iwconfig wlan0 mode ad-hoc"<br />
<br />
Or if you want to mount your network shares after a successful connection, you could use:<br />
<br />
POST_UP="sleep 5; mount /mnt/shares/nexus/utorrent 2>/dev/null;"<br />
<br />
{{Note|If the commands specified in these properties return anything other than 0 (success), netcfg aborts the current operation. So if you want to mount a certain network share that might not be available at the time of connection (thus returning an error), you could create a separate bash script with the mount commands and a "exit 0;" at the end. Alternatively you can add <nowiki>"|| true"</nowiki> to the end of the command that may fail.}}<br />
<br />
==Step 3: Connect==<br />
To connect to a profile just execute the following command ''as root'':<br />
# netcfg <profile-name><br />
To disconnect from a profile:<br />
# netcfg down <profile-name><br />
<br />
Where <profile-name> is the name of the file created in /etc/network.d. For example /etc/network.d/homewireless would simply have a profile name of homewireless<br />
<br />
==Step 4: Connecting on boot==<br />
===net-profiles===<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array, eg: DAEMONS=(... '''net-profiles''' ...).<br />
<br />
If you are only using a laptop, with little-to-no use of ethernet, you may want to delete the Network Daemon to resolve boot issues. <br />
<br />
====Display a menu at boot====<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu:<br />
<br />
NETWORKS=menu<br />
<br />
or<br />
<br />
NETWORKS=(menu)<br />
<br />
(either will work). You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
===Automatic detection===<br />
====net-auto====<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line, eg: DAEMONS=(... '''net-auto''' ...).<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
note: for this to work with a given profile, that profile MUST set the ESSID variable (which is not required to connect manually if a separate wpa_supplicant.conf is supplied.)<br />
<br />
==Troubleshooting==<br />
===Wireless connections===<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
===netcfg error messages===<br />
====Network unavailable====<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue (See Driver Quirks above)<br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
====Wireless Association failed====<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem (See Driver Quirks above)<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
====Unable to get IP address with DHCP====<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
====Not a valid connection, check spelling or look at examples====<br />
You must set CONNECTION= to one of the connection types in /usr/lib/network/connections/. Alternatively use one of the provided configuration examples in /etc/network.d/examples.<br />
<br />
===Driver Quirks (netcfg 2.1 and later)===<br />
{{Box Note | You most likely do NOT need these. Ensure your configuration is correct before considering these. They are for a small range of drivers with unusual issues, many of them older versions. These are workarounds, not solutions. }}<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant (ath9k)<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
===It still doesn't work, what do I do ?===<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely crucial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also crucial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
==GUI==<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
There is also a relatively new gui to netcfg2 on qt-apps that does only network configuring.You can find it here: [http://www.qt-apps.org/content/show.php/netcfgGUI?content=99523].<br />
<br />
==Supplementary tools==<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convenient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in [community] repository. To install, do <code>pacman -S wifi-select</code>.<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
==FAQ==<br />
===Why doesnt netcfg do ''x''?===<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
===Why doesn't netcfg behave in this way? It makes more sense===<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
===Do I still need ''x'' when I'm using netcfg?===<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Newcomers_Guide&diff=77194
Newcomers Guide
2009-10-05T12:00:58Z
<p>Iphitus: moved Beginners’ Guide to Beginners Guide</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, configuring and using a full-featured Arch Linux system.}}<br />
{{Article summary heading|Available Languages}}<br />
{{i18n_entry|Česky|Průvodce začátečníka (Česky)}}<br />
{{i18n_entry|简体中文|Arch 新手安装指南 (简体中文)}}<br />
{{i18n_entry|正體中文|Beginner's Guide 新手指南}}<br />
{{i18n_entry|Dansk|Dansk_Begynderguide}}<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|Italiano|Beginners Guide (Italiano)}}<br />
{{i18n_entry|Indonesia|Beginners_Guide_(Indonesia)}}<br />
{{i18n_entry|Lietuviškai|Pradedančiųjų gidas (Lietuviškai)}}<br />
{{i18n_entry|Nederlands|Beginners_Guide_(Nederlands)}}<br />
{{i18n_entry|Português Brasil|Guia do Iniciante(Português do Brasil)}}<br />
{{i18n_entry|Português|Guia para Principiantes(Português)}}<br />
{{i18n_entry|Русский|Руководство_для_новичков}}<br />
{{i18n_entry|Türkçe|Başlangıç Rehberi (Türkçe)}}<br />
{{i18n_entry|हिन्दी|नौसिखिया गाइड(हिन्दी)}}<br />
{{Article summary heading|Related articles}}<br />
{{Article summary wiki|Official Arch Linux Install Guide}} (provides a more general approach)<br />
{{Article summary wiki|Beginners Guide Appendix}}<br />
{{Article summary wiki|Post Installation Tips}}<br />
{{Article summary end}}<br />
<br />
==Preface==<br />
=====Everything you ever wanted to know about Arch, but were afraid to ask=====<br />
Welcome. This document will guide you through the process of installing and configuring [[Arch Linux]]; a simple, agile and lightweight GNU/Linux distribution, and <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. This guide is aimed at new Arch users, but strives to serve as a strong reference and informative base for all.<br />
<br />
'''Arch Linux distribution highlights:'''<br />
* '''[[The Arch Way | Simple]]''', <code>UNIX</code>-like design and philosophy<br />
* Independently Developed Community distro built from scratch and targeted at competent GNU/Linux users<br />
* All packages compiled for '''i686/x86-64'''<br />
* Highly customizable system assembled by the user from the ground up<br />
* '''[[The Arch boot process | BSD-style init]]''' scripts, featuring one centralized configuration file<br />
* '''mkinitcpio''': a simple and dynamic initramfs creator <br />
* '''Rolling Release''' model<br />
* '''[[Pacman]]''' package manager: is written in '''C''', and is fast, lightweight and agile, with a very modest memory footprint<br />
* '''[[ABS]]''': The '''A'''rch '''B'''uild '''S'''ystem, a ports-like package building system, makes it simple to create your own easily-installable Arch packages from source, to use and/or share with the community on the [[AUR]]<br />
* '''[[AUR]]''': The Arch User Repository, offering many thousands of build scripts for Arch user-provided software packages<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 by editing text files until your system is customized to your requirements. You will also manually add non-root user(s) and manage groups and permissions. This method allows for maximum flexibility, choice, and system resource control ''from the base up''.<br />
<br />
Arch Linux is aimed at competent GNU/Linux users who desire minimal 'code separation' from their machine.<br />
<br />
<br><br />
=====License=====<br />
<br />
Arch Linux, pacman, documentation, and scripts are copyright<br />
©2002-2007 by Judd Vinet, ©2007-2009 by Aaron Griffin and are licensed under the GNU General Public License Version 2.<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 as you consider simplicity:'''<br />
<br />
*''&quot; '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].&quot; -Aaron Griffin''<br />
*''Entia non sunt multiplicanda praeter necessitatem'' or &quot;Entities should not be multiplied unnecessarily.&quot; -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 />
*''&quot;The extraordinary part of [my method] lies in its simplicity..The height of cultivation always runs to simplicity.&quot;'' - Bruce Lee<br />
<br />
=====About This Guide=====<br />
<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 elsewhere.<br />
<br />
{{Note|Following this guide closely is essential in order to successfully install a properly configured Arch Linux system, so ''please'' read it thoroughly. It is strongly recommended you read each section completely <u>before</u> carrying out the tasks contained.}}<br />
<br />
Since GNU/Linux Distributions are fundamentally 'modular' by design, the guide is logically divided into 4 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: Configure&Update the New Arch Linux base system|Part II: Configure&Update the New Arch Linux base system]]'''<br />
<br />
'''[[#Part III: Install X and configure ALSA|Part III: Installing X and configuring ALSA]]'''<br />
<br />
'''[[#Part IV: Installing and configuring a Desktop Environment|Part IV: Installing a Desktop Environment]]'''<br />
<br />
<br />
'''''Welcome to Arch!'''''<br />
:'''''Enjoy the installation; take your time and have fun!'''''<br />
<br />
'''''Now, let's get started....'''''<br />
<br />
<br><br />
<br />
==Part I: Install the Base System==<br />
<br />
===Step 1: Obtain the latest Installation media ===<br />
<br />
You can obtain Arch's official installation media from [http://archlinux.org/download/ here]. The latest version is 2009.08 <br />
<br />
*Both the Core and the Netinstall images 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 />
*Core images facilitate both installing from CD and Net. <br />
*Netinstall images are smaller and provide no packages themselves; the entire system is retrieved via internet.<br />
*The isolinux images are provided for people who experience trouble using the grub version. There are no other differences.<br />
*The Arch64 FAQ ( http://wiki.archlinux.org/index.php/Arch64_FAQ ) can help you choose between the 32- and 64-bit versions.<br />
<br />
====CD installer====<br />
Burn the .iso image file to a CD with your preferred CD burner drive and software, and continue with [[#Step 2: Boot Arch Linux Installer | Step 2: Boot Arch Linux Installer]]<br />
{{Box Note| The quality of optical drives, as well as the CD media itself, vary greatly. But generally, using a slow burn speed is recommended for reliable burns; 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 />
{{Warning|This will irrevocably destroy all data on your USB stick!}}<br />
<br />
'''<code>UNIX</code> Method:'''<br />
<br />
Insert an empty or expendable USB stick, determine its path, and write the .img to the USB stick with the <code>/bin/dd</code> program:<br />
dd if=archlinux-2009.08-''{core|netinstall}''-''{i686|x86_64}''.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 />
'''Check md5sum (optional):'''<br />
<br />
Make a note of the number of records (blocks) read in and written out, then perform the following check:<br />
dd if=/dev/sd''x'' count=''number_of_records'' status=noxfer | md5sum<br />
The md5sum returned should match the md5sum of the downloaded archlinux image file; they both should match the md5sum of the image as listed in the md5sums file in the mirror distribution site.<br />
<br />
'''Windows Method:'''<br />
<br />
Download Disk Imager from https://launchpad.net/win32-image-writer/+download. Insert flash media. Start the Disk Imager and select the image file. Select the Drive letter associated with the flash drive. Click "write".<br />
<br />
Continue with [[#Step 2: Boot Arch Linux Installer | Step 2: Boot Arch Linux Installer]]<br />
<br />
===Step 2: Boot Arch Linux Installer===<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 (Power On Self-Test) phase.<br />
<br />
{{Note|Memory requirements:<br />
* Core : 160 MB RAM x86_64/i686 (all packages selected, with swap partition)<br />
* Netinstall : 160 MB RAM x86_64/i686 (all packages selected, with swap partition)}}<br />
<br />
The main menu should be displayed at this point. Select the preferred choice by using your arrow keys to highlight your choice, and then by pressing Enter.<br />
<br />
Usually, the first item is the preferred selection. However, choose Boot Archlive or Boot Archlive [legacy IDE] if you have trouble with libata/PATA, or have no SATA (Serial ATA) drives.<br />
<br />
Also, 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. Whenever done, just press '''b''' to boot into that selection.<br />
<br />
The system will now boot and present a login prompt. Login as 'root', without the quotes.<br />
<br />
If your system has errors trying to boot from the live CD or there are other '''hardware''' errors, refer to the [[Installation Troubleshooting]] wiki page.<br />
<br />
====Changing the keymap====<br />
If you have a non-US keyboard layout you can interactively choose your keymap/console font with the command:<br />
# km<br />
or use the loadkeys command:<br />
# loadkeys ''layout''<br />
(replace ''layout'' with your keyboard layout such as &quot;<code>fr</code>&quot; or &quot;<code>be-latin1</code>&quot;)<br />
<br />
====Documentation====<br />
The official install guide is conveniently available right on the live system! To access it, change to vc/2 (virtual console #2) with <ALT>+F2, and then invoke <code>/usr/bin/less</code> by typing in the following at the # prompt:<br />
# less /arch/docs/official_installation_guide_en<br />
<code>less</code> will allow you to page through the document. Change back to vc/1 with <ALT>+F1 to follow the rest of the install process.<br />
<br />
Change back to vc/2 at any time if you need to reference the Official Guide as you go thru the installation process.<br />
<br />
{{tip|Please note that the official guide only covers installation and configuration of the base system. Once that is installed, it is strongly recommended that you come back here to the wiki to find out more about post-installation considerations and other related issues.}}<br />
<br />
===Step 3: Start the Installation===<br />
As root, run the installer script from vc/1:<br />
# /arch/setup<br />
<br />
===A: 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 [[#B: Set Clock|B: Set Clock]].<br />
* Netinstall 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 (Netinstall)====<br />
Available Interfaces will be presented. If an interface and HWaddr ('''H'''ard'''W'''are '''addr'''ess) 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 />
=====(A)DSL Quickstart for the Live Environment (If you have a pure modem (or router in bridge mode) to connect to your ISP) =====<br />
<br />
Switch to another virtual console (<Alt> + F2), login as root and invoke <br />
# pppoe-setup<br />
If everything is well configured in the end you can connect to your ISP with <br />
# pppoe-start<br />
<br />
Return to first virtual console with <ALT>+F1. Continue with [[#B: Set Clock|B: Set Clock]]<br />
<br />
=====Wireless Quickstart For the Live Environment (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. A good knowledge of your wireless hardware will be of key importance to successful configuration. Note that the following quickstart procedure will initialize your wireless hardware for use ''in the live environment''.<br />
<br />
The basic procedure will be:<br />
* Switch to a free virtual console, e.g.: <ALT>+F3<br />
* Ensure udev has loaded the driver, and that the driver has created a usable wireless kernel interface with <code>/usr/sbin/iwconfig</code>:<br />
# iwconfig<br />
(Output should show an available wireless interface)<br />
* Bring the interface up with <code>/sbin/ifconfig <interface> up</code>.<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 &quot;<youressid>&quot; key <yourwepkey> (give the essid (the 'network name') of the network in quotes). <br />
* An example using WEP:<br />
# iwconfig ath0 essid &quot;linksys&quot; key 0241baf34c<br />
* An example using an unsecured network:<br />
# iwconfig ath0 essid "linksys"<br />
* Request and acquire an IP address with <code>/sbin/dhcpcd <interface> </code>. e.g.:<br />
# dhcpcd ath0<br />
* Ensure you can route using <code>/bin/ping</code>:<br />
# ping -c 3 www.google.com<br />
Done.<br />
{{Box Note | '''''In addition to the wireless module, some wireless chipsets, like ipw2100 and ipw2200, require corresponding firmware installation. The firmware packages must be explicitly installed to your actual system to provide wireless functionality after you reboot into your installed system. (Due to the firmware installation requirement, these chipsets may not work in the live environment.) Package selection and installation is covered below. Ensure installation of both your wireless module and firmware during the package selection step! See [[Wireless Setup]] if you are unsure about the requirement of corresponding firmware installation for your particular chipset. This is a very common error.'''''}}<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 installed system.<br />
<br />
Return to vc/1 with <ALT>+F1. Continue with [[#B: Set Clock|B: Set Clock]]<br />
<br />
===B: Set Clock===<br />
* UTC - Choose UTC if running only <code>UNIX</code>-like operating system(s).<br />
<br />
* localtime - Choose local if multi-booting with a Microsoft Windows OS.<br />
<br />
===C: Prepare Hard Drive===<br />
<br />
{{Warning|Partitioning hard drives can destroy data. You are strongly cautioned and advised to backup your critical data if applicable.}}<br />
<br />
Verify current disk identities and layout by invoking <code>/sbin/fdisk</code> with the <code>-l</code> (lower-case L) switch.<br />
<br />
Open another virtual console (<ALT>+F3) and enter:<br />
# fdisk -l<br />
Take note of the disk(s)/partition(s) to utilize for the Arch installation.<br />
<br />
Switch back to the installation script with <ALT>+F1<br />
<br />
Select the first menu entry &quot;Prepare Hard Drive&quot;.<br />
* Option 1: Auto Prepare<br />
Auto-Prepare divides the disk into the following configuration:<br />
<br />
* ext2 /boot partition, default size 32MB. ''You will be prompted to modify the size to your requirement.''<br />
* swap partition, default size 256MB. ''You will be prompted to modify the size to your requirement.''<br />
* A Separate / and /home partition, (sizes can also be specified). Available filesystems include ext2, ext3, ext4, reiserfs, xfs and jfs, but note that ''both / and /home shall 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=&quot;red&quot;>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 '''[[#D: Select Packages|D: Select Packages]]''' below.''<br />
<br />
{{Box Note|If you are installing to a USB flash key, see "[[Installing Arch Linux on a USB key]]".}}<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).<br />
*There are 3 types of disk partitions:<br />
#Primary<br />
#Extended<br />
#Logical<br />
'''Primary''' partitions can be bootable, and are limited to 4 partitions per disk or raid volume. If a partitioning scheme requires more than 4 partitions, an '''extended''' partition which will contain '''logical''' partitions will be required.<br />
<br />
Extended partitions are not usable by themselves; they are merely a &quot;container&quot; 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 the 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 the installation machine provides gratuitous amounts of RAM (more than 1024 MB) it may be possible to completely forget a swap partition altogether, though this is not recommended. A 1 GB swap partition will be used in this example.<br />
{{Box Note|If using suspend-to-disk, (hibernate) a swap partition at least '''equal''' in size to the amount of physical RAM is required. 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.<br />
<br />
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 &quot;/&quot;, 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 &quot;dot file&quot;).''<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 />
{{Box Note | Besides /boot, directories essential for booting are: '/bin', '/dev', '/etc', '/lib', '/proc' and '/sbin'. Therefore, they must not reside on a separate partition from /.}}<br />
'''''There are several advantages for using discrete filesystems, rather than combining all into one partition''''':<br />
<br />
* Security: Each filesystem may be configured in /etc/fstab as 'nosuid', 'nodev', 'noexec', 'readonly', etc.<br />
* Stability: A user, or malfunctioning program can completely fill a filesystem with garbage if they have write permissions for it. Critical programs, which reside on a different filesystem remain unaffected.<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 example, we shall use separate partitions for /, /var, /home, and a swap partition.<br />
<br />
{{Box Note | /var contains many small files. This should be taken into consideration when choosing a filesystem type for it, (if creating its own separate partition).}}<br />
<br />
=====How big should my partitions be?=====<br />
This question is best answered based upon individual needs.<br />
You may wish to simply create '''one partition for root and one partition for swap or only one root partition without swap''' or refer to the following examples 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. 15-20 GB should be sufficient for most users.<br />
<br />
* The /var filesystem will contain, among other data, the [[ABS]] tree and the pacman cache. Keeping cached packages is useful and versatile; it provides the ability to downgrade packages if needed. /var tends to grow in size; the pacman cache can grow large over long periods of time, but can be safely cleared if needed. If you are using an SSD, you may wish to locate your /var on an HDD and keep the / and /home partitions on your SSD to avoid needless read/writes to the SSD. 6-8 Gigs on a desktop system should be sufficient for /var. Servers tend to have extremely large /var filesystems.<br />
<br />
* The /home filesystem is typically where user data, downloads, and multimedia reside. On a desktop system, /home is typically the largest filesystem on the drive by a large margin. Remember that if you chose to reinstall Arch, all the data on your /home partition will be untouched (so long as you have a separate /home partition). <br />
<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 ~15GB root (/) partition, ~7GB /var, 1GB swap, and a /home containing the remaining disk space.'''''<br />
<br />
=====Create Partition: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 15440 #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 &quot;Set Filesystem Mountpoints&quot;.<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 />
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. '''ext4''' ''Fourth Extended Filesystem''- Backward compatible with ext2 and ext3, Introduces support for volumes with sizes up to 1 exabyte and files with sizes up to 16 terabyte. Increases the 32,000 subdirectory limit in ext3 to 64,000. Offers online defragmentation ability. <br />
{{Box Note | ext4 is a new filesystem and may have some bugs.}}<br />
<br />
4. '''ReiserFS''' (V3)- 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 />
5. '''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 />
6. '''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 offers online defragmentation ability.<br />
* JFS and XFS filesystems cannot be ''shrunk'' by disk utilities (such as gparted or parted magic)<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 are 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 and ext4 offer ''data-mode journaling'', (though, not by default), which journals ''both'' data ''and'' meta-data (but with a 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 upon how important your data is, this may be a consideration in choosing your filesystem type.<br />
<br />
'''''Moving on...'''''<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 />
===D: Select Packages===<br />
<br />
Now we shall select packages to install in our system.<br />
*Core ISO: Choose CD as source and select the appropriate CD drive if you have more than one.<br />
*Netinstall: Select an FTP/HTTP mirror. ''Note that archlinux.org is throttled to 50KB/s''.<br />
<br />
Package selection is split into two stages. First, select the package category:<br />
{{Box Note | For expedience, all packages in '''base''' are selected by default}}<br />
* '''Base''': The minimal base environment. ''Always select it and only remove packages that you don't use.''<br />
* '''Base-devel''': Extra tools such as '''make''', '''automake''' and '''wireless-tools''' as well as wireless firmwares. ''Most beginners should choose to install it, and will probably need it later.<br />
''<br />
After category selection, you will be presented with the full lists of packages, allowing you to fine-tune your selections. Use the space bar to select and unselect.<br />
<br />
{{Box Note | If you are going to require connection to a wireless network with WPA encryption, consider installing netcfg2 (as well as wireless_tools), which will enable you to do so.}}<br />
<br />
Once you're done selecting the packages you need, leave the selection<br />
screen and continue to the next step, Install Packages.<br />
<br />
===E: 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 />
*Netinstall: 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 image: The packages will be installed from the CD/USB stick.<br />
<br />
===F: Configure the System===<br />
''Closely following and understanding these steps is of key importance to ensure a properly configured system.''<br />
<br />
At this stage of the installation, you will configure the primary configuration files of your Arch Linux base system.<br />
<br />
Previous versions of the installer included [[Hwdetect|hwdetect]] to gather information for your configuration. This has been deprecated, and udev should handle most module loading automatically at boot.<br />
<br />
====The initramfs====<br />
<br />
The initial ram filesystem, or initramfs, is a temporary file system used by the kernel during boot. It is used for making preparations like hardware detection and module loading, before the real root file system can be mounted. Therefore, an initramfs allows for the use of a generic modular kernel for a wide variety of hardware, and without the need to compile a custom kernel for each installation.<br />
<br />
You will be prompted by a series of questions related to the configuration of your initramfs. 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. Choosing 'yes' for any of the above will cause the installer script to place the appropriate hook(s) within the <code>/etc/mkinitcpio.conf</code> file.<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]. You will be presented with a menu including the main configuration files for your system.<br />
<br />
{{Box Note | ''It is very important at this point to edit, or at least verify by opening, every configuration file.'' The installer script relies on your input to create these files on your installation. A common error is to skip over these critical steps of configuration.}}<br />
<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 purposes of ''transparency and system resource control''. 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 and maintain your new installation productively.<br />
<br />
====/etc/rc.conf====<br />
Arch Linux uses the file '''/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.<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 boot 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 />
* '''USEDIRECTISA''': Use direct I/O request instead of /dev/rtc for hwclock<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 at boot. Possible maps are found in /usr/share/kbd/consoletrans, if needed. The default (blank) is safe.<br />
* '''USECOLOR'''=: Select &quot;yes&quot; if you have a color monitor and wish to have colors in your consoles.<br />
<br />
LOCALE=&quot;en_US.utf8&quot;<br />
HARDWARECLOCK=&quot;localtime&quot;<br />
USEDIRECTISA=&quot;no&quot;<br />
TIMEZONE=&quot;US/Eastern&quot;<br />
KEYMAP=&quot;us&quot;<br />
CONSOLEFONT=<br />
CONSOLEMAP=<br />
USECOLOR=&quot;yes&quot;<br />
<br />
=====HARDWARE Section=====<br />
* '''MOD_AUTOLOAD'''=: Setting this to &quot;yes&quot; will use '''udev''' to automatically probe hardware and load the appropriate modules during boot-up, (convenient with the default modular kernel). Setting this to &quot;no&quot; 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. If your system has any floppy drives, add "floppy". If you will be using loopback filesystems, add "loop". 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 boot<br />
MOD_AUTOLOAD=&quot;yes&quot;<br />
# Module Blacklist - Deprecated<br />
MOD_BLACKLIST=()<br />
#<br />
MODULES=(!net-pf-10 !snd_pcsp !pcspkr loop)<br />
<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=&quot;dhcp&quot; if you want to use '''DHCP'''<br />
* '''INTERFACES'''=: Specify all interfaces here. <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 a dynamically assigned IP address ('''DHCP''')======<br />
HOSTNAME=&quot;arch&quot;<br />
#eth0=&quot;eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255&quot;<br />
eth0=&quot;dhcp&quot;<br />
INTERFACES=(eth0)<br />
gateway=&quot;default gw 192.168.0.1&quot;<br />
ROUTES=(!gateway)<br />
{{Box Note | Arch uses the '''dhcpcd''' DHCP client. Alternatively, '''dhclient''' is available from the [extra] repository via pacman.}}<br />
<br />
======Example, using a '''static''' IP address======<br />
HOSTNAME=&quot;arch&quot;<br />
eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"<br />
INTERFACES=(eth0)<br />
gateway="default gw 192.168.0.1"<br />
ROUTES=(gateway)<br />
<br />
{{tip|If you also require using a non-standard MTU size (a.k.a. jumbo frames) to speed up intranet xfers AND your hardware supports them, see the [[Jumbo Frames]] wiki article for further configuration.}}<br />
<br />
{{Note|In some cases, users will need to modify their {{Filename|/etc/resolv.conf}} to prevent the dhcpcd daemon from overwriting the DNS entries.}}<br />
<br />
Modify your {{Filename|/etc/resolv.conf}} to contain the DNS servers of your choice.<br />
search my.isp.net.<br />
nameserver a.b.c.d<br />
nameserver a.b.c.d<br />
nameserver a.b.c.d<br />
<br />
{{Tip|If you are unsure what values to use in the {{Filename|/etc/resolv.conf}} simply configure your system to use DHCP and look at the {{Filename|/etc/resolv.conf}} which should be automatically set for you. You may use these values.}}<br />
<br />
Finally, {{Filename|/etc/conf.d/dhcpcd}} needs to be tweaked to keep the dhcpcd from overwriting your {{Filename|/etc/resolv.conf}} which will happen without this modification:<br />
<br />
# Arguments to be passed to the DHCP client daemon<br />
#<br />
<br />
# DHCPCD_ARGS="-q"<br />
DHCPCD_ARGS="-C resolv.conf -q"<br />
<br />
=====DAEMONS Section=====<br />
<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 &quot;at&quot; symbol (@), it shall 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). Do not background daemons that are needed by other daemons. For example "mpd" depends on "network", therefore backgrounding network may cause mpd to break.<br />
*Edit this array whenever new system services are installed, if starting them automatically during boot is desired.<br />
<br />
This 'BSD-style' init, is the Arch way of handling what other distributions 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 />
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 />
{{Tip|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 hierarchy 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 />
# <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 0 1<br />
/dev/disk/by-uuid/7ef-223.. /home jfs defaults,noatime 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' option disables writing read access times to the metadata of files and may safely be appended to / and /home regardless of your specified filesystem type for increased speed, performance, and power efficiency. 'notail' disables the ReiserFS tailpacking feature, for added performance at the cost of slightly less efficient disk usage.}}<br />
{{Box Note | It may be beneficial to make a note of the UUID of the root (/) partition, as this may be required during GRUB configuration.}}<br />
<br />
* '''<file system>''': describes the block device or remote filesystem to be mounted. For regular mounts, this field will contain a link to a block device node (as created by mknod which is called by udev at boot) for the device to be mounted; for instance, '/dev/cdrom' or '/dev/sda1'. Instead of giving the device explicitly, the Arch installer indicates the filesystem that is to be mounted by its UUID by default.<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, while<br />
/sbin/blkid<br />
will show a list correlating each partition with its label, filesystem type and UUID. ''Note: this command is installed by the '''e2fsprogs''' package.''<br />
<br />
* '''<dir>''': describes the mount point for the filesystem. For swap partitions, this field should be specified as 'swap'; (Swap partitions are not actually mounted.)<br />
<br />
* '''<type>''': describes the type of the filesystem. The Linux kernel supports many filesystem types. (For the filesystems currently supported by the running kernel, see /proc/filesystems). An entry 'swap' denotes a file or partition to be used for swapping. An entry 'ignore' causes the line to be ignored. This is useful to show disk partitions which are currently unused.<br />
<br />
* '''<options>''': describes the mount options associated with the filesystem. It is formatted as a comma separated list of options with no intervening spaces. It contains at least the type of mount plus any additional options appropriate to the filesystem type. For documentation on the available options for non-nfs file systems, see mount(8).<br />
<br />
* '''<dump>''': used by the dump(8) command to determine which filesystems are to be dumped. dump is a backup utility. If the fifth field is not present, a value of zero is returned and dump will assume that the filesystem does not need to be backed up. ''Note that dump is not installed by default.''<br />
<br />
* '''<pass>''': used by the fsck(8) program to determine the order in which filesystem checks are done at boot time. The root filesystem should be specified with a <pass> of 1, and other filesystems should have a <pass> of 2 or 0. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked.<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 />
Expanded information available in the [[Fstab]] wiki entry.<br />
<br />
===='''[[Configuring mkinitcpio | /etc/mkinitcpio]].conf'''====<br />
This file allows you to fine-tune the initial ram filesystem (also commonly referred to as the initial ramdisk or &quot;initrd&quot;) for your system. The initrd is a gzipped image that is read by the kernel during boot. 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 boot 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 />
'''mkinitcpio''' is the next generation of '''initramfs creation'''. It has many advantages over the old '''mkinitrd''' and '''mkinitramfs''' scripts.<br />
<br />
* It uses '''klibc''' and '''kinit''' which are developed by Linux kernel devs to provide a small and lightweight base for early userspace.<br />
* It can use '''udev''' for hardware autodetection at runtime, thus prevents you from having tons of unnecessary modules loaded.<br />
* Its hook-based init script is easily extendable with custom hooks, which can easily be included in pacman packages without having to modifiy mkinitcpio itself.<br />
* It already supports '''lvm2''', '''dm-crypt''' for both legacy and luks volumes, '''raid''', '''swsusp''' and '''suspend2''' resuming and booting from '''usb mass storage''' devices.<br />
* Many features can be configured from the kernel command line without having to rebuild the image.<br />
* The '''mkinitcpio''' script makes it possible to include the image in a kernel, thus making a self-contained kernel image is possible.<br />
* Its flexibility makes recompiling a kernel unnecessary in many cases.<br />
<br />
If you are using a non-US keyboard you may want to add &quot;<code>keymap</code>&quot; to the &quot;<code>HOOKS=</code>&quot; section of '''/etc/mkinitcpio.conf''' to load your local keymap during boot, e.g.:<br />
HOOKS="base udev autodetect pata scsi sata filesystems keymap"<br />
Otherwise if boot fails for some reason you will be asked to enter root's password for system maintenance but will be unable to do so.<br />
<br />
''If you are using a US keyboard editing this configuration should be unnecessary at this point.''<br />
<br />
'''mkinitcpio''' was developed by Aaron Griffin and Tobias Powalowski with some help from the community.<br />
<br />
==== /etc/modprobe.conf====<br />
It is unnecessary to configure this file at this time.<br />
<br />
* '''modprobe.conf''' can be used to set special configuration options for the kernel modules<br />
{{Note | The new module-init-tools 3.8 package changes the location of the configuration file: /etc/modprobe.conf is no longer read, instead /etc/modprobe.d/modprobe.conf is used. [http://www.archlinux.org/news/450/ link]}}<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 [http://wiki.archlinux.org/index.php/Network#For_DHCP_IP 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.<br />
An example, using OpenDNS:<br />
nameserver 208.67.222.222<br />
nameserver 208.67.220.220<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 />
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! So, if you have named your computer Archhost, then that line above should look like this:<br />
127.0.0.1 localhost.localdomain localhost Archhost<br />
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 />
{{Tip|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 />
* restrict it to your local LAN network (range 192.168.0.0 to 192.168.0.255)<br />
sshd: 192.168.0.<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 />
The '''/usr/sbin/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 &quot;peculiar&quot; 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 &quot;The current locale is invalid...&quot; 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 />
===G: 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 />
<br />
====GRUB====<br />
The provided '''GRUB''' configuration ('''/boot/grub/menu.lst''') should be sufficient, but verify its contents to ensure accuracy (specifically, ensure that the root (/) partition is specified by UUID on line 3). 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. &quot;Arch Linux (Main)&quot; 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'''). If not already specified, you should enter the name of the partition, according to the UUID numbering scheme, using the ''/dev/disk/by-uuid/xxxx-xxxx-xxxx'' format. This UUID was found in the previous section regarding configuration of ''/etc/fstab''.<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, (usually a safe default; you may wish to change this in case it causes problems booting) and the '''&quot;vga=773&quot;''' 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 />
{{tip|For more details, see the [[GRUB]] wiki page.}}<br />
<br />
===H: Reboot===<br />
That's it; You have configured and installed your Arch Linux base system. Exit the install, and reboot:<br />
# reboot<br />
(Be sure to remove the installer CD)<br />
<br />
==Part II: Configure&Update the New Arch Linux base system==<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 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. You may swap between them with ALT+F1...F6}}<br />
<br />
===Step 1: 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 '''[[#Step 2: 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, an &quot;unknown host&quot; error is received, 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 />
{{Tip|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 />
* 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 wlan0 up<br />
* (Optional) Scan for available access points:<br />
# iwlist wlan0 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 wlan0 essid linksys key ABCDEF01234<br />
* Request an IP address with <code>dhcpcd <interface></code>. e.g.:<br />
# dhcpcd wlan0<br />
* Ensure you can route:<br />
$ ping -c 3 www.google.com<br />
Done.<br />
<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, and put a ! before the network entry, since the network is handled by adsl now.<br />
<br />
===Step 2: 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 with a very modest memory footprint, fast, simple, and 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. Pacman's output is streamlined, very readable and provides ETA for each package download. 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 />
====Package Repositories and /etc/pacman.conf====<br />
Arch currently offers the following 4 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 ensure the system remains in a usable state. These are the absolute system-critical packages. <br />
* Developer maintained<br />
* All binary packages<br />
* pacman accessible <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. <br />
* Developer maintained<br />
* All binary packages<br />
* pacman accessible<br />
'''[testing]'''<br />
<br />
The [testing] repository contains packages that are candidates for the [core] or [extra] repositories. New packages go into [testing] if:<br />
<br />
<nowiki>*</nowiki> they are expected to break something on update and need to be tested first.<br />
<br />
<nowiki>*</nowiki> 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. <br />
* Developer maintained<br />
* All binary packages<br />
* pacman accessible<br />
{{Note|* [testing] is the only repository that can have name collisions with any of the other official repositories. Therefore, if enabled, [testing] must be the first repo listed in <code>pacman.conf</code>.}}<br />
<br />
{{Warning|Only experienced users should use [testing].}}<br />
<br />
'''[community]'''<br />
<br />
The [community] repository is maintained by the ''Trusted Users (TUs)'' and is simply the binary branch of the ''Arch User Repository ([[AUR]])''. It contains binary packages which originated as PKGBUILDs from ''AUR'' [unsupported] that have acquired enough votes and were adopted by a ''TU''. Like all repos listed above, [community] may be readily accessed by pacman.<br />
* TU maintained<br />
* All binary packages<br />
* pacman accessible<br />
<br />
'''AUR (unsupported)'''<br />
<br />
The '''[[AUR]]''' also contains the '''unsupported''' branch, which cannot be accessed directly by pacman*. '''AUR''' [unsupported] does not contain binary packages. Rather, it provides more than sixteen thousand PKGBUILD scripts for building packages from source, that may be unavailable through the other repos. When an AUR unsupported package acquires enough popular votes, it may be moved to the AUR [community] binary repo, if a TU is willing to adopt and maintain it there.<br />
* TU maintained<br />
* All PKGBUILD bash build scripts<br />
* '''''Not''''' pacman accessible by default<br />
<br />
<nowiki>*</nowiki> pacman wrappers ('''''[[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 />
#<br />
# /etc/pacman.conf<br />
#<br />
# See the pacman.conf(5) manpage for option and repository directives<br />
<br />
#<br />
# GENERAL OPTIONS<br />
#<br />
[options]<br />
# The following paths are commented out with their default values listed.<br />
# If you wish to use different paths, uncomment and update the paths.<br />
#RootDir = /<br />
#DBPath = /var/lib/pacman/<br />
#CacheDir = /var/cache/pacman/pkg/<br />
#LogFile = /var/log/pacman.log<br />
HoldPkg = pacman glibc<br />
# If upgrades are available for these packages they will be asked for first<br />
SyncFirst = pacman<br />
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u<br />
#XferCommand = /usr/bin/curl %u > %o<br />
<br />
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup<br />
#IgnorePkg =<br />
#IgnoreGroup =<br />
<br />
#NoUpgrade =<br />
#NoExtract =<br />
<br />
# Misc options (all disabled by default)<br />
#NoPassiveFtp<br />
#UseSyslog<br />
#ShowSize<br />
#UseDelta<br />
#TotalDownload<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 />
# - repositories listed first will take precedence when packages<br />
# have identical names, regardless of version number<br />
# - URLs will have $repo replaced by the name of the current repo<br />
#<br />
# Repository entries are of the format:<br />
# [repo-name]<br />
# Server = ServerName<br />
# Include = IncludePath<br />
#<br />
# The header [repo-name] is crucial - it must be present and<br />
# uncommented to enable the repo.<br />
# <br />
<br />
# Testing is disabled by default. To enable, uncomment the following<br />
# two lines. You can add preferred servers immediately after the header,<br />
# and they will be used before the default mirrors.<br />
#[testing]<br />
#Include = /etc/pacman.d/mirrorlist<br />
<br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist <br />
<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
<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 />
==== Build a mirrorlist using the rankmirrors script ====<br />
<br />
<code>/usr/bin/rankmirrors</code> is a python script which will attempt to detect the mirrors which are closest to you based on the mirrors specified in your mirrorlist. Faster mirrors will dramatically improve pacman performance, and your overall Arch Linux experience. It is '''highly''' recommended that you use it periodically<br />
<br />
First, use pacman to install python:<br />
# pacman -Sy python <br />
'''cd''' to the /etc/pacman.d/ directory:<br />
# cd /etc/pacman.d<br />
Backup your existing /etc/pacman.d/mirrorlist:<br />
# cp mirrorlist mirrorlist.backup<br />
Edit mirrorlist.backup and uncomment mirrors you want to test with rankmirrors.<br />
<br />
Run the script against the mirrorlist.backup with the -n switch and redirect output to a new /etc/pacman.d/mirrorlist file:<br />
# rankmirrors -n 6 mirrorlist.backup > mirrorlist<br />
'''-n 6''': rank the 6 fastest mirrors<br />
<br />
'''Force pacman to refresh the package lists'''<br />
<br />
After creating/editing your /etc/pacman.d/mirrorlist, (manually or by <code>/usr/bin/rankmirrors</code>) issue the following command:<br />
# pacman -Syy<br />
Passing two --refresh or -y flags forces pacman to refresh all package lists even if they are considered to be up to date. Issuing pacman -Syy ''whenever a mirror is changed'', is good practice and will avoid possible headaches.<br />
<br />
====Mirrorcheck for up-to-date packages====<br />
Some of the official mirrors may contain packages that are out-of-date. [[http://users.archlinux.de/~gerbra/mirrorcheck.html ArchLinux Mirrorcheck]] reports various aspects about the mirrors such as, those experiencing network problems, data collection problems, reports the last time they have been synced, etc.<br />
<br />
One may wish to manually inspect the mirrors in the /etc/pacman.d/mirrorlist insuring that it only contains up-to-date mirrors if having the latest and greatest package versions is important to you.<br />
<br />
====Ignoring packages====<br />
When you execute the command &quot;pacman -Syu&quot;, 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 package(s) you want to skip in the pacman command line using the --ignore switch (do pacman -S --help for details) or permanently indicate the package(s) you want to skip in your /etc/pacman.conf file in the IgnorePkg array. List each package, with one intervening space :<br />
IgnorePkg = wine <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 package build scripts are also available in the [[AUR]]. <br />
<br />
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 &quot;protect&quot; your configuration/system files from being overwritten during &quot;pacman -Su&quot; using the following option in your /etc/pacman.conf<br />
<br />
NoUpgrade = etc/lilo.conf boot/grub/menu.lst<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(8) tool. Try:<br />
$ man pacman<br />
<br />
For more information,please look up the [[pacman]] wiki entries at your leisure.<br />
<br />
====Powerpill, a pacman wrapper script====<br />
Before you continue, consider installing Xyne's powerpill (now in [community]) which is a pacman wrapper script that speeds up package retrieval by using aria2c (an external download helper) for concurrent/segmented downloads. In other words, powerpill pulls packages in parallel effectively speeding up your downloads. This is particularly advantageous on new installs when pulling down hundreds of megs of packages.<br />
<br />
# pacman -S powerpill<br />
<br />
Treat powerpill as pacman as you consider installations, for example, the following will update your system:<br />
<br />
# powerpill -Syu<br />
<br />
See the [[Powerpill]] wiki article for more.<br />
<br />
===Step 3: Update System===<br />
You are now ready to upgrade your entire system. Before you do, read through the [http://www.archlinux.org/news/ news] (and optionally the [http://archlinux.org/pipermail/arch-announce/ announce mailing list]). Often the developers will provide important information about fixes for known issues. Consulting these pages before any upgrade is good practice. <br />
<br />
Sync, refresh, and upgrade your entire new system with:<br />
# pacman -Syu<br />
you may also use:<br />
# pacman --sync --refresh --sysupgrade<br />
<br />
pacman will now download a fresh copy of the master package list from the server(s) defined in pacman.conf(5) 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 />
<br />
Reboot if a kernel upgrade has occurred. <br />
<br />
{{Box Note|Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information.}}<br />
<br />
Pacman output is saved in /var/log/pacman.log.<br />
<br />
See [[Package_Management_FAQs|Package Management FAQs]] for answers to frequently asked questions regarding updating and managing your packages.<br />
<br />
=====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. '''Reboot''' if a kernel upgrade has occurred.<br />
=====Network Time Protocol=====<br />
You may wish to set the system time now using OpenNTPD to sync the local clock to remote NTP servers. OpenNTPD may also be added to the DAEMONS= array in /etc/rc.conf to provide this service at each boot. (See the [[Network Time Protocol]] article.)<br />
<br />
===Step 4: Add a user and setup groups===<br />
<code>UNIX</code> is a multi-user environment. 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, non-root user account using the <code>/usr/sbin/useradd</code> program:<br />
# useradd -m -G [groups] -s [login_shell] [username] <br />
* '''-m''' Creates user home directory as /home/'''username'''. Within their home directory, a user can write files, delete them, install programs, etc. Users' home directories shall 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 ''user'' (under /home/username) and ''global'' configuration files, (usually under /etc/) the settings in the ''user'' file will prevail. Dotfiles 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 />
* '''-G''' A list of supplementary groups which the user is also a member of. ''Each group is separated from the next by a comma, with no intervening spaces''. The default is for the user to belong only to the initial group (users). <br />
* '''-s''' The path and filename of the user´s default login shell.<br />
Useful groups for your non-root user include:<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 />
*'''power''' - used w/ power options (ie. shutdown w/ off button) <br />
A typical desktop system example, adding a user named &quot;archie&quot; specifying bash as the login shell:<br />
# useradd -m -G users,audio,lp,optical,storage,video,wheel,power -s /bin/bash archie<br />
Next, add a password for your new user using <code>/usr/bin/passwd</code>.<br />
<br />
An example for our user, 'archie':<br />
# passwd archie<br />
(You will be prompted to provide the new <code>UNIX</code> password.)<br />
<br />
Your new non-root user has now been created, complete with a home directory and a login password.<br />
<br />
'''Alternative method, using <code>/usr/sbin/adduser</code>:'''<br />
<br />
Alternatively, you may use <code>adduser</code>, an interactive user adding program which will prompt you for the above data: ''(recommended for beginners)''<br />
# adduser<br />
'''Deleting the user account:'''<br />
<br />
In the event of error, or if you wish to delete this user account in favor of a different name or for any other reason, use <code>/usr/sbin/userdel</code>:<br />
# userdel -r [username]<br />
* '''-r ''' Files in the user´s home directory will be removed along with the home directory itself and the user´s mail spool.<br />
<br />
If you want to change the name of your user or any existing user, see the [[Change username]] page of the wiki and/or the [[Groups]] and [[User Management]] articles for further information. You may also check the man pages for <code>usermod(8)</code> and <code>gpasswd(8)</code>.<br />
<br />
===Step 5: Install and setup Sudo (Optional)===<br />
To install Sudo:<br />
# pacman -S sudo vim<br />
To add a user as a sudo user (a &quot;sudoer&quot;), the visudo command must be run as root. If you do not know how to use vi, you may set the EDITOR environment variable to the editor of your choice before running visudo. e.g.:<br />
# EDITOR=nano visudo<br />
If you are comfortable using vi, issue the visudo command without the EDITOR=nano variable:<br />
# visudo<br />
This will open the file /etc/sudoers in a special session of vi. visudo copies the file to be edited to a temporary file, edits it with an editor, (vi by default), and subsequently runs a sanity check. If it passes, the temporary file overwrites the original with the correct permissions. <br />
<br />
{{Warning|Do not edit /etc/sudoers directly with an editor; Errors in syntax can cause annoyances (like rendering the root account unusable). You must use the ''visudo'' command to edit /etc/sudoers.}}<br />
<br />
To give the user full root privileges when he/she precedes a command with &quot;sudo&quot;, add the following line:<br />
USER_NAME ALL=(ALL) ALL<br />
where USER_NAME is the username of the individual.<br />
<br />
For more information, such as sudoer <TAB> completion, see [[Sudo]]<br />
<br />
==Part III: Install X and configure ALSA==<br />
<br />
<br />
===Step 1: Configure sound 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 />
{{Box Note| Alsa is included in the Arch mainline kernel and udev will automatically probe your hardware on boot-up, loading the corresponding kernel module for your audio card. Therefore, your sound should already be working, but upstream sources mute all channels by default.}}<br />
{{Box Note| OSS4.1 has been released under a free license and is generally considered a significant improvement over older OSS versions. If you have issues with ALSA, or simply wish to explore another option, you may choose OSS4.1 instead. Instructions can be found in [[OSS]]}} <br />
<br />
The alsa-utils package contains the alsamixer userspace tool, which allows configuration of the sound device from the console or terminal.<br />
<br />
By default the upstream kernel sources ship with snd_pcsp, the alsa pc speaker module. snd_pcsp is usually loaded before your &quot;actual&quot; sound card module. In most cases, it will be more convenient if this module is loaded last, as it will allow alsamixer to correctly control the desired sound card.<br />
<br />
To have snd_pcsp load last, add the following to /etc/modprobe.d/modprobe.conf:<br />
options snd-pcsp index=2<br />
<br />
Alternatively, if you do not want snd_pcsp to load at all, blacklist it by adding the following to /etc/rc.conf:<br />
MODULES=(... !snd_pcsp)<br />
<br />
{{Box Note | You will need to unload all your sound modules and reload them for the changes to take effect. It might be easier to reboot. Your choice. }}<br />
<br />
Install the alsa-utils package:<br />
# pacman -S alsa-utils<br />
Also, you may want to install the alsa-oss package, which wraps applications written for [[OSS]] in a compatibility library, allowing them to work with [[ALSA]]. To install the alsa-oss package:<br />
# pacman -S alsa-oss <br />
Did you add your normal user to the audio group? If not, use <code>/usr/bin/gpasswd</code>. As root do:<br />
# gpasswd -a ''yourusername'' audio<br />
As '''''normal, non-root''''' user, invoke <code>/usr/bin/alsamixer</code>:<br />
# su - ''yourusername'' <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 />
Ensure your speakers are properly connected, and test your sound configuration as normal user using <code>/usr/bin/aplay</code>:<br />
$ aplay /usr/share/sounds/alsa/Front_Center.wav<br />
You should hear a very eloquent woman say, &quot;Front, center.&quot;<br />
==== Saving the Sound Settings ====<br />
Exit your normal user shell and run <code>/usr/sbin/alsactl</code> as root:<br />
$ exit<br />
# alsactl store<br />
This will create the file '/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 />
===Step 2: Install X===<br />
The '''X''' Window System version 11 (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 />
{{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 />
<br />
# pacman -S libgl<br />
''(Proprietary video drivers provide their own gl library implementations.)''<br />
<br />
====A: Install X====<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 />
With newer versions of xorg, it is suggested (and possibly necessary in most cases) to install the input driver evdev, which should be installed as a dependency for xorg-server, but many seem to be lacking somehow:<br />
# pacman -S xf86-input-evdev<br />
The 3d utilities glxgears and glxinfo are included in the '''mesa''' package:<br />
# pacman -S mesa<br />
<br />
====B: Install Video Driver Package====<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 <code>/usr/sbin/lspci</code> 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''' &mdash; Alliance ProMotion video driver<br />
*'''xf86-video-ark''' &mdash; ark video driver<br />
*'''xf86-video-ati''' &mdash; ATI(AMD) video driver<br />
**'''xf86-video-r128''' &mdash; ATI(AMD) video driver for X.org ati Rage128 video<br />
**'''xf86-video-mach64''' &mdash; ATI(AMD) video driver for X.org mach64 video<br />
**'''xf86-video-radeonhd''' &mdash; open source radeonhd driver<br />
*'''xf86-video-chips''' &mdash; Chips and Technologies video driver<br />
*'''xf86-video-cirrus''' &mdash; Cirrus Logic video driver<br />
*'''xf86-video-dummy''' &mdash; dummy video driver<br />
*'''xf86-video-fbdev''' &mdash; framebuffer video driver<br />
*'''xf86-video-glint''' &mdash; GLINT/Permedia video driver<br />
*'''xf86-video-i128''' &mdash; Number 0 i128 video driver<br />
*'''xf86-video-i740''' &mdash; Intel i740 video driver<br />
*'''xf86-video-i810''' &mdash; Intel i810/i830/i9xx video drivers (deprecated - use -intel)<br />
*'''xf86-video-intel''' &mdash; Newer Version of Intel i810/i830/i9xx video drivers<br />
*'''xf86-video-intel-legacy''' &mdash; Legacy-driver for older intel cards as 82865G (xf86-video-intel currently crashes with older cards)<br />
*'''xf86-video-imstt''' &mdash; Integrated Micro Solutions Twin Turbo video driver<br />
*'''xf86-video-mga''' &mdash; mga video driver (Matrox Graphics Adapter)<br />
*'''xf86-video-neomagic''' &mdash; neomagic video driver<br />
*'''xf86-video-nv''' &mdash; Nvidia nv video driver<br />
*'''xf86-video-nouveau''' &mdash; Open Source 3D acceleration driver for nVidia cards (experimental), check: [http://nouveau.freedesktop.org/wiki/] for Current Status<br />
*'''xf86-video-openchrome''' &mdash; VIA/S3G UniChrome, UniChrome Pro and Chrome9 video driver<br />
*'''xf86-video-rendition''' &mdash; Rendition video driver<br />
*'''xf86-video-s3''' &mdash; S3 video driver<br />
*'''xf86-video-s3virge''' &mdash; S3 Virge video driver<br />
*'''xf86-video-savage''' &mdash; savage video driver<br />
*'''xf86-video-siliconmotion''' &mdash; siliconmotion video driver<br />
*'''xf86-video-sis''' &mdash; SiS video driver<br />
*'''xf86-video-sisusb''' &mdash; SiS USB video driver<br />
*'''xf86-video-tdfx''' &mdash; tdfx video driver<br />
*'''xf86-video-trident''' &mdash; Trident video driver<br />
*'''xf86-video-tseng''' &mdash; tseng video driver<br />
*'''xf86-video-unichrome''' &mdash; VIA S3 Unichrome video drivers<br />
*'''xf86-video-v4l''' &mdash; v4l video driver<br />
*'''xf86-video-vesa''' &mdash; vesa video driver<br />
*'''xf86-video-vga''' &mdash; VGA 16 color video driver<br />
*'''xf86-video-vmware''' &mdash; vmware video driver<br />
*'''xf86-video-voodoo''' &mdash; voodoo video driver<br />
<br />
'''''Note''''': 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 />
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 />
*If you have an NVIDIA or ATI graphics card you may wish to install the proprietary NVIDIA or ATI drivers. '''Installing proprietary video drivers is covered below.'''.<br />
*If you do not want to install the proprietary drivers or do not have an NVIDIA or ATI graphics card, you should skip down to '''[[#Step 3: Configure X|Step 3: Configure X]]'''.<br />
<br />
-----<br />
<br />
<br />
=====NVIDIA Graphics 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 several different driver packages that each match a certain subset of Cards: <br />
<br />
'''1. nvidia-96xx''' ''slightly newer cards up to the GF 4.''<br />
<br />
'''2. nvidia-173xx''' ''Geforce FX series cards''<br />
<br />
'''3. nvidia''' ''newest GPUs after the GF FX''<br />
<br />
{{Box Note| Nvidia-71xx series proprietary drivers, which are required by extremely old cards like TNT and TNT2, have been removed because they do not work with the new Xorg that Arch makes use of and nvidia has discontinued support for such. You should use the xf86-video-nv or xf86-video-vesa drivers instead.}}<br />
<br />
Consult the NVIDIA website 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 &quot;RenderAccel&quot; &quot;true&quot;<br />
Option &quot;NoLogo&quot; &quot;true&quot;<br />
Option &quot;AGPFastWrite&quot; &quot;true&quot;<br />
Option &quot;EnablePageFlip&quot; &quot;true&quot;<br />
Make sure all instances of DRI are commented out:<br />
# Load &quot;dri&quot;<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 using <code>/sbin/depmod</code>:<br />
# depmod -a<br />
(A reboot may be necessary.)<br />
{{Tip|Advanced instructions for NVIDIA configuration can be found in the [[NVIDIA]] article.}}<br />
<br />
You may now continue with '''[[#Step 3: Configure X|Step 3: Configure X]]''' to familiarize yourself further, or continue the installation process with '''[[#C: Test X|Test X]]'''.<br />
<br />
=====ATI Graphics Cards=====<br />
ATI owners have multiple options for drivers. <br />
* The open source '''''radeon''''' driver provided by the '''xf86-video-ati''' package. <br />
** This is the original, reverse-engineered open source driver which fully supports Radeon chipsets up to X1950 (latest R500 chipsets). Cards up to the 9200 series are fully supported, stable, and provide full 2D and 3D acceleration. Cards from 9500 to X1950 feature full 2D acceleration, and good 3D acceleration, but lack certain features provided by the proprietary driver, (for example, powersaving is still in a testing phase). Cards from HD2xxx (R6xx) to the newest are supported by xf86-video-ati, but only offer 2d support at this time.<br />
* The open source '''''radeonhd''''' driver provided by the '''xf86-video-radeonhd''' package.<br />
** This driver supports ATI R500 chipsets (Radeon X1000 series) and newer. It is written by Novell with specifications provided to the public by AMD. It supports RandR 1.2 and development is currently very active. Therefore, functionality may be inconsistent across the spectrum of cards supported. (Some users report excellent performance and reliability while others experience trouble.) It also supports HDMI, with sound.<br />
* The proprietary '''''fglrx''''' driver provided by the Catalyst package located in the AUR. The proprietary driver is covered below.<br />
The open-source drivers will usually suit most needs along with being generally less problematic.<br />
<br />
Install the '''''radeon''''' ATI Driver with<br />
# pacman -S xf86-video-ati libgl ati-dri<br />
Install the '''''radeonhd''''' ATi Driver with<br />
# pacman -S xf86-video-radeonhd libgl ati-dri<br />
<br />
The proprietary ATI driver '''Catalyst''' was once a precompiled package offered by Arch in the <code>extra</code> repository, but as of March 2009, official support has been dropped because of dissatisfaction with the quality and speed of development of the proprietary driver.The catalyst driver is now available in [http://aur.archlinux.org/packages.php?ID=22899 AUR]. Installation information for Catalyst driver is available [[ATI#Proprietary_ATI_Catalyst_driver | here]]<br />
<br />
{{Warning| The proprietary ATI driver supports only R600 and newer devices (that means, HD2xxx and newer). The older ones (X1xxx and older) aren't supported.}}<br />
<br />
{{Tip|Advanced instructions for ATI configuration can be found in the [[ATI | ATI wiki article]].}}<br />
<br />
====C: Install Input Driver Packages====<br />
The latest X requires you to install drivers for your input devices, keyboard and mouse included. For a complete list of available input drivers,<br />
# pacman -Ss xf86-input | less<br />
<br />
For most users, xf86-input-keyboard and xf86-input-mouse should be sufficient for a basic setup. Use pacman to install your desired drivers for your input devices. e.g.:<br />
# pacman -S xf86-input-keyboard<br />
<br />
===Step 3: Configure X===<br />
<br />
====A: The xorg.conf file====<br />
<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 />
Since X11R7.2 the X.Org X Server features autoconfiguration. Therefore, it can function without an xorg.conf file in many cases. ''If'' the autoconfiguration ''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 />
=====Standard xorg.conf generation=====<br />
<br />
Advanced users may wish to manually create their own xorg.conf file. You may also use the <code>/usr/bin/Xorg</code> program with the -configure option 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 />
Copy the file to <code>/etc/X11/</code>:<br />
# cp /root/xorg.conf.new /etc/X11/xorg.conf<br />
<br />
=====Alternative xorg.conf generation=====<br />
<br />
Newer versions of the Xorg Server(>1.6) do not include the /usr/bin/xorgconfig or /usr/bin/xorgcfg scripts. If you run into problems generating/using an xorg.conf file, you might want to consider using this guide.<br />
<br />
See the [[Xorg#Without_xorg.conf|article on X.Org, section "Without xorg.conf"]].<br />
<br />
* Note that if you are in possession of a properly configured xorg.conf under another distribution and with the same Xorg version, you may easily copy it over to your current Arch system's <code>/etc/X11/</code> directory.<br />
<br />
<br />
{{Tip | For Intel graphics card, specific configuration may be necessary to get proper 2D or 3D performance, as stated in [[Intel_Graphics]] wiki article.}}<br />
<br />
====B: Input hotplugging====<br />
<br />
Input hotplugging is supported since the 1.4 version of the X.Org X Server and enabled by default. When enabled, X will utilize hal to allow for the hotplugging and removal of human interface devices without having to restart X. <br />
<br />
{{Warning | Starting the '''X''' server using input hotplugging without the '''HAL''' daemon installed and running may result in the inability to use the mouse and/or keyboard, and the '''X''' server appearing to freeze as a result .}}<br />
<br />
You must decide whether you will use input hotplugging (enabled by default), or disable it. Input hotplugging is convenient for many users, especially those with mobile machines like laptops and netbooks. Other users may wish to disable it in favor of manual or more static device configuration within /etc/xorg.conf.<br />
<br />
{{Tip | See the article on [[Xorg input hotplugging]] for full details.}}<br />
<br />
=====Using input hotplugging=====<br />
<br />
Install HAL, dbus and the evdev input driver:<br />
# pacman -S hal dbus xf86-input-evdev<br />
<br />
Set the keyboard layout (if you do not use a standard US keyboard)<br />
# cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/<br />
# nano /etc/hal/fdi/policy/10-keymap.fdi<br />
Edit the &quot;input.xkb.layout&quot; key and possibly the &quot;input.xkb.variant&quot; key in this file.<br />
<br />
Laptop users will also need the synaptics package to allow X to configure the touchpad:<br />
# pacman -S xf86-input-synaptics<br />
<br />
{{Tip|For instructions on fine tuning or troubleshooting touchpad settings, see the [[Touchpad Synaptics]] article.}}<br />
<br />
<br />
'''The HAL daemon'''<br />
<br />
The hal daemon '''must''' be started '''before''' the '''X''' server:<br />
# /etc/rc.d/hal start<br />
Add the hal daemon to the DAEMONS array in /etc/rc.conf to start it at every boot.<br />
<br />
=====Disable input hotplugging=====<br />
Disabling input hotplugging will skip devices detected by hal and will use the keyboard/mouse configuration from xorg.conf:<br />
# nano /etc/X11/xorg.conf<br />
add the following:<br />
Section &quot;ServerFlags&quot;<br />
Option &quot;AutoAddDevices&quot; &quot;False&quot;<br />
EndSection<br />
<br />
======Set the keyboard layout if not using a standard US keyboard======<br />
Add option lines in the &quot;InputDevice&quot; section of the /etc/X11/xorg.conf file specifying the keyboard layout and variant:<br />
Option &quot;XkbLayout&quot; &quot;be&quot;<br />
Option &quot;XkbVariant&quot; &quot;&quot;<br />
<br />
Alternative method using the setxkbmap command:<br />
# setxkbmap pl <br />
(with the proper keyboard layout instead of <code>pl</code> of course) should switch your keyboard layout in x.<br />
To make this permanent, add this command to <code>/home/<youruser>/.xinitrc</code> before starting the window manager (before command like <code>exec startxfce4</code>).<br />
<br />
==== C: Test X (method 1) ====<br />
<br />
First, read the warning about input hotplugging in the previous section. 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 successfully start '''X''' from the command line before installing a complete desktop environment, you can do so by configuring ~/.xinitrc to invoke '''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.<br />
<br />
===== Prepare for the test by configuring ~/.xinitrc=====<br />
<br />
One of the main functions of this file is to dictate what '''X''' Window client is invoked with the '''/usr/bin/startx''' and/or '''/usr/bin/xinit''' program ''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 and commands 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 &quot;Run Control&quot;.}}<br />
<br />
'''startx/xinit''' will start the '''X''' server and clients. To determine the client to run, '''startx/xinit''' will first look to parse 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.) Further details in the [[.xinitrc]] wiki entry.<br />
<br />
Switch to your '''''normal, non-root''''' user:<br />
<br />
# su - ''yourusername''<br />
<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 />
<br />
* If you installed from a fresh (Core) install, it does not include the X window manager, so .xinitrc does not exist in /etc/skel. Instead, use the sample provided [[Xinitrc#A_standard_.xinitrc | here]] <small>(If you've followed the guide step by step you should have a basic .xinitrc file in /etc/skel)</small>.<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 &quot;<code>exec xterm</code>&quot; 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 wmaker<br />
# exec startkde<br />
# exec icewm<br />
# exec blackbox<br />
# exec fluxbox<br />
#<br />
exec xterm<br />
<br />
{{Box Note | ''Be sure to have only '''one''' uncommented '''exec''' line in your ~/.xinitrc''.}}<br />
<br />
Below, we shall edit this file again to specify the appropriate desktop environment/window manager of your choice.<br />
<br />
===== Perform the test =====<br />
<br />
Test your configurations by starting '''X''' as '''normal, non-root''' user, with:<br />
<br />
$ startx<br />
or<br />
$ xinit<br />
<br />
You should have an '''xterm''' session open up. You can test your keyboard and its layout in it. You may have to move your mouse around until it enters the xterm area before you see the mouse cursor or xterm responds to your keyboard.<br />
<br />
You can exit the '''X''' Server with Ctrl+Alt+Backspace, or by typing &quot;exit&quot;. 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 />
{{Tip|Advanced instructions for Xorg configuration can be found in the [[Xorg]] article.}}<br />
<br />
==== C: Test X (method 2) ====<br />
To test the X server, run the '''X''' script with the ''-config'' flag against the ''path/to/xorg.conf'' file. e.g.:<br />
<br />
# X -config /etc/X11/xorg.conf<br />
<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 />
{{Box Note| With Xorg 1.6 CTRL-Alt-Backspace has been deprecated and will not work to exit out of this test. A somewhat messy work around is to switch to a different virtual console (CTRL-Alt-F2, for example) and then switch back to the console the test is running in (probably CTRL-Alt-F1). You will then be able to use CTRL-C to kill the X test. You can enable CTRL-Alt-Backspace by editing xorg.conf, as described [http://wiki.archlinux.org/index.php/Xorg#Ctrl-Alt-Backspace_doesn.27t_exit_X here].}}<br />
<br />
=====In case of errors=====<br />
<br />
Inspect the config file:<br />
<br />
# nano /etc/X11/xorg.conf<br />
<br />
Ensure the video driver is properly specified. e.g.:<br />
Section &quot;Device&quot;<br />
<br />
...<br />
Driver &quot;savage&quot;<br />
...<br />
<br />
EndSection<br />
<br />
Ensure there are horizontal sync and vertical refresh specs under section &quot;Monitor&quot;. If not, add them:<br />
Section &quot;Monitor&quot;<br />
Identifier &quot;Monitor0&quot;<br />
VendorName &quot;Monitor Vendor&quot;<br />
ModelName &quot;Monitor Model&quot;<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 these specs are unknown, consult the documentation of the computer monitor.)<br />
<br />
Specify your default color depth under section &quot;Screen&quot;:<br />
Section &quot;Screen&quot;<br />
Identifier &quot;Screen0&quot;<br />
Device &quot;Card0&quot;<br />
Monitor &quot;Monitor0&quot;<br />
DefaultDepth 24<br />
(Typically, this will be set to 24 for true color.)<br />
<br />
Also add your desired Modes to your &quot;Display&quot; subsection, at least under the Depth 24 header, e.g.:<br />
SubSection &quot;Display&quot;<br />
Viewport 0 0<br />
Depth 24<br />
Modes &quot;1024x768&quot; &quot;800x600&quot; &quot;640x480&quot;<br />
Add the following section, if eye candy which requires the composite extension is desired: <br />
Section &quot;Extensions&quot;<br />
Option &quot;Composite&quot; &quot;Enable&quot;<br />
EndSection<br />
Try the config again, after modifying:<br />
# X -config /etc/X11/xorg.conf<br />
Detailed instructions in the [[Xorg]] article.<br />
<br />
* '''Using wgetpaste'''<br />
If you are still having trouble after consulting the [[Xorg]] article and need assistance via the Arch forums, be sure to install and use wgetpaste:<br />
<br />
# pacman -S wgetpaste<br />
Use wgetpaste and provide links for the following files when asking for help in your forum post:<br />
* ~/.xinitrc<br />
* /etc/X11/xorg.conf<br />
* /var/log/Xorg.0.log.old<br />
Use wgetpaste like so:<br />
$ wgetpaste </path/to/file><br />
Post the corresponding links given within your forum post. Be sure to provide appropriate hardware and driver information as well.<br />
<br />
==Part IV: 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 a window manager, icons, applets, windows, toolbars, folders, wallpapers, a suite of 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 a minimal DE based on the Openbox window manager. It provides most things you need for a modern desktop while keeping relatively low system resource usage. LXDE is a good choice for those who want a quick way of setting up a pre-configured Openbox system.<br />
<br />
If you desire a lighter, less demanding GUI to configure manually, 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 include such features as panels, applets, icons, applications, etc., by default.<br />
* Lightweight floating WM's include: [[#Openbox|'''Openbox''']], [[#Fluxbox|'''Fluxbox''']], [[#fvwm2|'''fvwm2''']], [[PekWM|'''pekwm''']], [[Evilwm|'''evilwm''']], '''Windowmaker, and TWM'''.<br />
* If you need something completely different, try a tiling WM like [[Awesome|'''awesome''']], [[Ion3|'''ion3''']], [[Wmii|'''wmii''']], [[Dwm|'''dwm''']], [[Xmonad|'''xmonad''']], or [[Ratpoison|'''ratpoison''']].<br />
<br />
===Step 1: Install Fonts===<br />
At this point, you may wish to save time by installing 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 />
===Step 2: ~/.xinitrc (again)===<br />
<br />
As '''non-root user''', edit your /home/username/.xinitrc to specify 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 &quot;exec&quot; 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 />
If you have trouble with automounting, use the following command instead. Replace "startxfce4" with the command that is appropriate for your window manager.<br />
exec ck-launch-session startxfce4<br />
<br />
Remember to have only one uncommented '''exec''' line in your ~/.xinitrc.<br />
<br />
===Step 3: Install a Desktop Environment===<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. Some users prefer to use the '''hal''' daemon. 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''' can 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 />
<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 at boot:<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 />
Then edit your /etc/gdm/custom.conf and in the '''[servers]''' section add:<br />
0=Standard vt7<br />
<br />
As normal user, start X:<br />
$ startx<br />
or<br />
$ xinit<br />
If ~/.xinitrc is not configured for GNOME, you may always start it with '''xinit''', followed by the path to GNOME:<br />
$ xinit /usr/bin/gnome-session<br />
<br />
{{Tip|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 '''[[Beginners Guide Appendix#Tweaks.2FFinishing_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 />
By default, GNOME does not come with many themes and icons. You may wish to install some more attractive artwork for GNOME:<br />
<br />
A nice gtk (gui widget) theme engine (includes themes) is the murrine engine. Install with:<br />
# pacman -S gtk-engine-murrine<br />
<br />
Optional for more themes:<br />
# pacman -S murrine-themes-collection <br />
<br />
Once it has been installed, select it with System -> Preferences -> Appearance -> Theme tab.<br />
<br />
The Arch Linux repositories also have a few more nice themes and engines. Install the following to see for yourself:<br />
<br />
# pacman -S gtk-engines gtk-aurora-engine gtk-candido-engine gtk-rezlooks-engine<br />
<br />
You can find many more themes, icons, and wallpapers 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 />
Choose one of the following, then continue below with '''[[#Useful KDE DAEMONS|Useful KDE DAEMONS]]''': <br />
<br />
1. The package '''kde''' is the official and complete vanilla KDE 4.2 residing under the Arch [extra] repo.<br />
<br />
Install base kde:<br />
# pacman -S kdebase-workspace<br />
Install the whole Desktop Environment: <br />
# pacman -S kde<br />
''or'' <br />
# pacman -S kde-meta<br />
<br />
2. Alternatively, another KDE project exists called '''KDEmod''', part of the Chakra distribution. It is an Arch Linux (and spinoff) exclusive, community-driven package set designed for modularity and offers a choice between KDE 3.5.10 or 4.x.x. KDEmod can be installed with pacman, after adding the proper repositories to /etc/pacman.conf. The project website, including complete installation instructions, can be found at [http://www.chakra-project.org/ http://www.chakra-project.org/].<br />
<br />
=====Useful KDE DAEMONS=====<br />
<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services.<br />
<br />
KDE will require the '''hal''' ('''H'''ardware '''A'''bstraction '''L'''ayer) daemon for optimal functionality. The hal daemon, among other things, will facilitate the automatic mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The hal package is installed when you install xorg-server, but must be invoked to become useful.<br />
<br />
The '''kdm''' daemon is the '''K''' '''D'''isplay '''M'''anager, which provides a '''graphical login''', if desired.<br />
<br />
-----<br />
<br />
Start hal:<br />
# /etc/rc.d/hal start<br />
<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS array in /etc/rc.conf:<br />
# nano /etc/rc.conf<br />
Add '''hal''' to your DAEMONS array, to invoke it on boot. If you prefer a graphical login, add '''kdm''' as well: <br />
DAEMONS=(syslog-ng '''hal''' network crond alsa '''kdm''')<br />
{{Box Note|If you installed KDEmod3 instead of normal KDE, use kdm3 instead of kdm.}}<br />
<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 boot 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 a bang, ( ! ).<br />
<br />
Now try starting your X Server as normal user:<br />
$ startx<br />
or<br />
$ xinit<br />
{{Tip|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 '''[[Beginners Guide Appendix|The Beginners Guide Appendix]]''', 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 fast. Xfce is great for older hardware, and will perform excellently 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 />
Note: '''xfce4-xfapplet-plugin''' (a plugin that allows the use of GNOME applets in the Xfce4 panel) is part of the '''xfce4-goodies''' group and depends on '''gnome-panel''', which in turn depends on '''gnome-desktop'''. You may wish to take this into consideration before installing, since it represents a significant number of extra dependencies.<br />
<br />
If you get errors about dbus-launch then you need to install dbus aswell:<br />
# pacman -S dbus<br />
<br />
If you wish to admire 'Tips and Tricks' on login, install the '''fortune-mod''' package:<br />
# pacman -S fortune-mod<br />
<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. Some Xfce users prefer to use the '''hal''' daemon. 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 array in /etc/rc.conf:<br />
# nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS array, to invoke them at boot.<br />
<br />
{{Tip|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 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 focused on providing 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 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 />
{{Note|the lxde group DOES_NOT provide openbox as suggested as per 9/17/2009 so it must be installed specifically or you will end up with a desktop with no window management. install it with: pacman -S openbox}}<br />
Add:<br />
exec startlxde<br />
*If you plan on running '''nm-applet''', the following command should be used instead<br />
exec ck-launch-session startlxde<br />
to your ~/.xinitrc and start with ''startx'' or ''xinit''<br />
<br />
{{Tip | 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 />
# su - ''yourusername''<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 />
<br />
NOTE: If you plan on running dbus (which is required by hal) then make sure your ~/.xinitrc reads:<br />
<br />
exec dbus-launch --exit-with-session openbox-session<br />
<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, Tint2, 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 />
* Graveman for burning CD's or DVD's<br />
<br />
{{Tip | 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 />
==Useful Applications==<br />
To install useful apps, codecs and plugins, see [[Useful Applications]].<br />
<br />
=APPENDIX=<br />
See [[Beginners Guide Appendix]]</div>
Iphitus
https://wiki.archlinux.org/index.php?title=DeveloperWiki:Internal_Projects&diff=76340
DeveloperWiki:Internal Projects
2009-09-24T03:47:52Z
<p>Iphitus: /* Rebuild Team */</p>
<hr />
<div>= Introduction = <br />
This article is part of the [[DeveloperWiki]].<br />
<br />
This page is meant to list a lot of the projects Arch developers keep busy with. Yes, there are things to do outside of packaging. If you are interested in anything, this page should help you get in contact with the right people. If you are looking for something to do, this is always a good place to start.<br />
<br />
Some of these projects have dedicated discussion areas, such as the release engineering and pacman development mailing lists. Other ones are less formal- some of the communication may just be person to person emails or on the arch-dev lists if it appeals to a larger crowd. Remember that if you are interested in these less-formal projects, you should let the names listed below know so they will include you on any communication regarding the project.<br />
<br />
= Infrastructure Projects =<br />
<br />
== Developer Tooling ==<br />
Primarily developer-side tools (devtools, namcap) and server-side (db-scripts) work.<br />
* [[User:Phrakture|Aaron Griffin]]<br />
* [[User:Snowman|Eric Bélanger]]<br />
* [[User:Firmicus|François Charette]]<br />
<br />
=== TODO Items ===<br />
<br />
* dbscripts: Rewrite db-move to allow multiple packages, getting rid of the testing2* convienence scripts<br />
* dbscripts: Add community repo support to db-move to let us move packages from community to core/extra and vice versa.<br />
* dbscripts: Add community support to the sourceballs script - needs additional logic to use alternate SVN repos<br />
* dbscripts: When a package is completely removed from repo, e.g. amarok-base, its sourceball remains on the server.<br />
<br />
== Mirror Control ==<br />
Keep track of existing mirrors and ensure they are doing their job as good as possible (e.g. staying current). Ensure we have up to date contact information for as many mirrors as possible. Work on a tiered mirror system to relieve some stress from our primary rsync server.<br />
* [[User:Romashka|Roman Kyrylych]]<br />
=== Automated tests ===<br />
* sync state: http://users.archlinux.de/~gerbra/mirrorcheck.html<br />
* additional performance tests: http://www.archlinux.de/?page=MirrorStatus<br />
* [[User:Gerbra|Gerhard Brauer]]<br />
* [[User:Pierre|Pierre Schmitz]]<br />
<br />
== Packaging Automation ==<br />
Automatic package generation based on changes in svn trunk. Errors should be reported to some mailing list, successful builds moved to a staging directory. Some guidelines of package moving into [extra]/[testing] should be created, for [core] we can use the current signoff procedure. <br />
* [[User:pressh|Ronald van Haren]]<br />
<br />
== Server Administration ==<br />
* [[User:Brain0|Thomas Bächler]]<br />
* [[User:Phrakture|Aaron Griffin]]<br />
* [[User:JGC|Jan de Groot]]<br />
* [[User:Toofishes|Dan McGee]]<br />
* [[User:Pierre|Pierre Schmitz]]<br />
<br />
== Developer Communication Team ==<br />
This isn't quite infrastructure, but it almost belongs here. Responsible for organizing developer meetings and making sure people attempt to be present; you newer guys might have no idea, but we used to actually schedule and have 80% of the developer staff present in IRC for 1-2 hour meetings. Responsible for any other coordination between developers, TUs, and maybe even the front page news.<br />
* [[User:Iphitus|James Rayner]] -I can work on the Status Reports too if Aaron doesn't have time. I'll do dev meetings if nobody steps up.<br />
<br />
= Packaging Projects =<br />
<br />
== Bug Squashing ==<br />
Responsible for assigning bugs to package maintainers. If something is trivial and a fix can be easily made, then goes and does it. Organizes bug squashing days.<br />
* Andrea Scarpino<br />
* [[User:pjmattal|Paul Mattal]]<br />
* ...<br />
* (needs several people)<br />
<br />
== Rebuild Team ==<br />
Responsible for communicating and determining what rebuilds will cycle through [testing] and in what order. They are probably also the people doing large portions of the rebuilds.<br />
* [[User:Allan|Allan McRae]] (because my packages seem to cause big rebuilds...)<br />
* [[User:Snowman|Eric Bélanger]]<br />
* [[User:Iphitus|James Rayner]] - may be able to do some building for rebuilds if it's not near exams/assessment.<br />
<br />
== Package Review Team ==<br />
Some packages in our repos receive little attention due to not being updated frequently. These need to be checked for being able to build (especially after major toolchain updates) and compliance with current packaging standards. It would be good for packages that have not been rebuilt in a long time to be rebuilt to take advantage of new optimisations.<br />
* TODO fill me out please<br />
<br />
== Orphan Team ==<br />
Responsible for caring for those packages that no one seems to want and are being neglected. This may involve adoption by themselves or finding a foster caregiver, moving them to a willing maintainer in [community], or sending them to the AUR (or the trash).<br />
* [[User:Snowman|Eric Bélanger]] (for trivial upstream update)<br />
<br />
= Web Projects =<br />
<br />
This is meant to be a quick overview of the web projects we have and who works on them. For more technical details, you will want to check out the [[DeveloperWiki:Gudrun (web)]] and [[:Category:DeveloperWiki:Server Configuration]] pages.<br />
* [[User:Pierre|Pierre Schmitz]]<br />
<br />
== AUR ==<br />
Responsible for coding and deploying the AUR.<br />
* [[User:Louipc|Loui Chang]]<br />
<br />
== BBS ==<br />
Responsible for keeping our BBS install up to date and secure.<br />
* Andrea Scarpino<br />
<br />
== Flyspray (bugtracker) ==<br />
Responsible for keeping our flyspray install up to date and secure.<br />
* TBA?<br />
<br />
== Main Site ==<br />
* [[User:Dusty|Dusty Phillips]]<br />
<br />
== Planet ==<br />
Responsible for keeping the planet scripts updated and running.<br />
* Andrea Scarpino<br />
* Hugo Doria<br />
<br />
== Wiki ==<br />
Responsible for keeping our wiki install up to date and secure.<br />
* [[User:Pierre|Pierre Schmitz]]<br />
<br />
= Coding Projects =<br />
<br />
== Arch Linux Init Scripts ==<br />
The all-important scripts that make your machine go when you turn it on<br />
* [[User:Brain0|Thomas Bächler]]<br />
* [[User:Phrakture|Aaron Griffin]]<br />
<br />
== Arch Linux Release Engineering (Installer) ==<br />
The Arch Linux Install Framework (AIF) and official installation ISOs<br />
* [[User:Dieter_be|Dieter Plaetinck]]<br />
* [[User:Gerbra|Gerhard Brauer]]<br />
<br />
== mkinitcpio ==<br />
We have a program to create initrds for Arch systems.<br />
* [[User:Brain0|Thomas Bächler]]<br />
* [[User:Phrakture|Aaron Griffin]]<br />
<br />
== namcap ==<br />
Responsible for maintaining and adding features to namcap. <br />
* Hugo Doria<br />
<br />
== netcfg ==<br />
Network connection and profiles<br />
* [[User:Iphitus|James Rayner]]<br />
<br />
== Pacman ==<br />
<br />
=== Development Team ===<br />
This team is responsible for general development, including new features and bugfixes, for the package manager that is a core part of Arch. Although many people contribute patches and code, the people listed here are generally the people that will be reviewing patches and making the final say as to what gets in the codebase.<br />
<br />
* [[User:Toofishes|Dan McGee]]<br />
* Xavier Chantry<br />
* Nagy Gabor<br />
* [[User:Allan|Allan McRae]] (focusing on makepkg)<br />
<br />
=== Translation Team ===<br />
Pacman, as of September 2009, has been translated to 15 languages. The upkeep and maintenance of these translations is pretty much a job in itself, with the times immediately preceding a release being the busiest. Ideally this team is responsible for creating a translations branch when a string freeze is set, and then takes incoming translations, ensures they are valid, and merges them into their branch. When a release is not imminent, their focus may be on improving clarity and usefulness of existing messages.<br />
* [[User:Voidnull|Giovanni Scafora]]</div>
Iphitus
https://wiki.archlinux.org/index.php?title=DeveloperWiki:Internal_Projects&diff=76339
DeveloperWiki:Internal Projects
2009-09-24T03:46:20Z
<p>Iphitus: /* Rebuild Team */</p>
<hr />
<div>= Introduction = <br />
This article is part of the [[DeveloperWiki]].<br />
<br />
This page is meant to list a lot of the projects Arch developers keep busy with. Yes, there are things to do outside of packaging. If you are interested in anything, this page should help you get in contact with the right people. If you are looking for something to do, this is always a good place to start.<br />
<br />
Some of these projects have dedicated discussion areas, such as the release engineering and pacman development mailing lists. Other ones are less formal- some of the communication may just be person to person emails or on the arch-dev lists if it appeals to a larger crowd. Remember that if you are interested in these less-formal projects, you should let the names listed below know so they will include you on any communication regarding the project.<br />
<br />
= Infrastructure Projects =<br />
<br />
== Developer Tooling ==<br />
Primarily developer-side tools (devtools, namcap) and server-side (db-scripts) work.<br />
* [[User:Phrakture|Aaron Griffin]]<br />
* [[User:Snowman|Eric Bélanger]]<br />
* [[User:Firmicus|François Charette]]<br />
<br />
=== TODO Items ===<br />
<br />
* dbscripts: Rewrite db-move to allow multiple packages, getting rid of the testing2* convienence scripts<br />
* dbscripts: Add community repo support to db-move to let us move packages from community to core/extra and vice versa.<br />
* dbscripts: Add community support to the sourceballs script - needs additional logic to use alternate SVN repos<br />
* dbscripts: When a package is completely removed from repo, e.g. amarok-base, its sourceball remains on the server.<br />
<br />
== Mirror Control ==<br />
Keep track of existing mirrors and ensure they are doing their job as good as possible (e.g. staying current). Ensure we have up to date contact information for as many mirrors as possible. Work on a tiered mirror system to relieve some stress from our primary rsync server.<br />
* [[User:Romashka|Roman Kyrylych]]<br />
=== Automated tests ===<br />
* sync state: http://users.archlinux.de/~gerbra/mirrorcheck.html<br />
* additional performance tests: http://www.archlinux.de/?page=MirrorStatus<br />
* [[User:Gerbra|Gerhard Brauer]]<br />
* [[User:Pierre|Pierre Schmitz]]<br />
<br />
== Packaging Automation ==<br />
Automatic package generation based on changes in svn trunk. Errors should be reported to some mailing list, successful builds moved to a staging directory. Some guidelines of package moving into [extra]/[testing] should be created, for [core] we can use the current signoff procedure. <br />
* [[User:pressh|Ronald van Haren]]<br />
<br />
== Server Administration ==<br />
* [[User:Brain0|Thomas Bächler]]<br />
* [[User:Phrakture|Aaron Griffin]]<br />
* [[User:JGC|Jan de Groot]]<br />
* [[User:Toofishes|Dan McGee]]<br />
* [[User:Pierre|Pierre Schmitz]]<br />
<br />
== Developer Communication Team ==<br />
This isn't quite infrastructure, but it almost belongs here. Responsible for organizing developer meetings and making sure people attempt to be present; you newer guys might have no idea, but we used to actually schedule and have 80% of the developer staff present in IRC for 1-2 hour meetings. Responsible for any other coordination between developers, TUs, and maybe even the front page news.<br />
* [[User:Iphitus|James Rayner]] -I can work on the Status Reports too if Aaron doesn't have time. I'll do dev meetings if nobody steps up.<br />
<br />
= Packaging Projects =<br />
<br />
== Bug Squashing ==<br />
Responsible for assigning bugs to package maintainers. If something is trivial and a fix can be easily made, then goes and does it. Organizes bug squashing days.<br />
* Andrea Scarpino<br />
* [[User:pjmattal|Paul Mattal]]<br />
* ...<br />
* (needs several people)<br />
<br />
== Rebuild Team ==<br />
Responsible for communicating and determining what rebuilds will cycle through [testing] and in what order. They are probably also the people doing large portions of the rebuilds.<br />
* [[User:Allan|Allan McRae]] (because my packages seem to cause big rebuilds...)<br />
* [[User:Snowman|Eric Bélanger]]<br />
* [[User:Iphitus|James Rayner]] - can do some building for rebuilds.<br />
<br />
== Package Review Team ==<br />
Some packages in our repos receive little attention due to not being updated frequently. These need to be checked for being able to build (especially after major toolchain updates) and compliance with current packaging standards. It would be good for packages that have not been rebuilt in a long time to be rebuilt to take advantage of new optimisations.<br />
* TODO fill me out please<br />
<br />
== Orphan Team ==<br />
Responsible for caring for those packages that no one seems to want and are being neglected. This may involve adoption by themselves or finding a foster caregiver, moving them to a willing maintainer in [community], or sending them to the AUR (or the trash).<br />
* [[User:Snowman|Eric Bélanger]] (for trivial upstream update)<br />
<br />
= Web Projects =<br />
<br />
This is meant to be a quick overview of the web projects we have and who works on them. For more technical details, you will want to check out the [[DeveloperWiki:Gudrun (web)]] and [[:Category:DeveloperWiki:Server Configuration]] pages.<br />
* [[User:Pierre|Pierre Schmitz]]<br />
<br />
== AUR ==<br />
Responsible for coding and deploying the AUR.<br />
* [[User:Louipc|Loui Chang]]<br />
<br />
== BBS ==<br />
Responsible for keeping our BBS install up to date and secure.<br />
* Andrea Scarpino<br />
<br />
== Flyspray (bugtracker) ==<br />
Responsible for keeping our flyspray install up to date and secure.<br />
* TBA?<br />
<br />
== Main Site ==<br />
* [[User:Dusty|Dusty Phillips]]<br />
<br />
== Planet ==<br />
Responsible for keeping the planet scripts updated and running.<br />
* Andrea Scarpino<br />
* Hugo Doria<br />
<br />
== Wiki ==<br />
Responsible for keeping our wiki install up to date and secure.<br />
* [[User:Pierre|Pierre Schmitz]]<br />
<br />
= Coding Projects =<br />
<br />
== Arch Linux Init Scripts ==<br />
The all-important scripts that make your machine go when you turn it on<br />
* [[User:Brain0|Thomas Bächler]]<br />
* [[User:Phrakture|Aaron Griffin]]<br />
<br />
== Arch Linux Release Engineering (Installer) ==<br />
The Arch Linux Install Framework (AIF) and official installation ISOs<br />
* [[User:Dieter_be|Dieter Plaetinck]]<br />
* [[User:Gerbra|Gerhard Brauer]]<br />
<br />
== mkinitcpio ==<br />
We have a program to create initrds for Arch systems.<br />
* [[User:Brain0|Thomas Bächler]]<br />
* [[User:Phrakture|Aaron Griffin]]<br />
<br />
== namcap ==<br />
Responsible for maintaining and adding features to namcap. <br />
* Hugo Doria<br />
<br />
== netcfg ==<br />
Network connection and profiles<br />
* [[User:Iphitus|James Rayner]]<br />
<br />
== Pacman ==<br />
<br />
=== Development Team ===<br />
This team is responsible for general development, including new features and bugfixes, for the package manager that is a core part of Arch. Although many people contribute patches and code, the people listed here are generally the people that will be reviewing patches and making the final say as to what gets in the codebase.<br />
<br />
* [[User:Toofishes|Dan McGee]]<br />
* Xavier Chantry<br />
* Nagy Gabor<br />
* [[User:Allan|Allan McRae]] (focusing on makepkg)<br />
<br />
=== Translation Team ===<br />
Pacman, as of September 2009, has been translated to 15 languages. The upkeep and maintenance of these translations is pretty much a job in itself, with the times immediately preceding a release being the busiest. Ideally this team is responsible for creating a translations branch when a string freeze is set, and then takes incoming translations, ensures they are valid, and merges them into their branch. When a release is not imminent, their focus may be on improving clarity and usefulness of existing messages.<br />
* [[User:Voidnull|Giovanni Scafora]]</div>
Iphitus
https://wiki.archlinux.org/index.php?title=DeveloperWiki:Internal_Projects&diff=76338
DeveloperWiki:Internal Projects
2009-09-24T03:44:27Z
<p>Iphitus: /* Developer Communication Team */</p>
<hr />
<div>= Introduction = <br />
This article is part of the [[DeveloperWiki]].<br />
<br />
This page is meant to list a lot of the projects Arch developers keep busy with. Yes, there are things to do outside of packaging. If you are interested in anything, this page should help you get in contact with the right people. If you are looking for something to do, this is always a good place to start.<br />
<br />
Some of these projects have dedicated discussion areas, such as the release engineering and pacman development mailing lists. Other ones are less formal- some of the communication may just be person to person emails or on the arch-dev lists if it appeals to a larger crowd. Remember that if you are interested in these less-formal projects, you should let the names listed below know so they will include you on any communication regarding the project.<br />
<br />
= Infrastructure Projects =<br />
<br />
== Developer Tooling ==<br />
Primarily developer-side tools (devtools, namcap) and server-side (db-scripts) work.<br />
* [[User:Phrakture|Aaron Griffin]]<br />
* [[User:Snowman|Eric Bélanger]]<br />
* [[User:Firmicus|François Charette]]<br />
<br />
=== TODO Items ===<br />
<br />
* dbscripts: Rewrite db-move to allow multiple packages, getting rid of the testing2* convienence scripts<br />
* dbscripts: Add community repo support to db-move to let us move packages from community to core/extra and vice versa.<br />
* dbscripts: Add community support to the sourceballs script - needs additional logic to use alternate SVN repos<br />
* dbscripts: When a package is completely removed from repo, e.g. amarok-base, its sourceball remains on the server.<br />
<br />
== Mirror Control ==<br />
Keep track of existing mirrors and ensure they are doing their job as good as possible (e.g. staying current). Ensure we have up to date contact information for as many mirrors as possible. Work on a tiered mirror system to relieve some stress from our primary rsync server.<br />
* [[User:Romashka|Roman Kyrylych]]<br />
=== Automated tests ===<br />
* sync state: http://users.archlinux.de/~gerbra/mirrorcheck.html<br />
* additional performance tests: http://www.archlinux.de/?page=MirrorStatus<br />
* [[User:Gerbra|Gerhard Brauer]]<br />
* [[User:Pierre|Pierre Schmitz]]<br />
<br />
== Packaging Automation ==<br />
Automatic package generation based on changes in svn trunk. Errors should be reported to some mailing list, successful builds moved to a staging directory. Some guidelines of package moving into [extra]/[testing] should be created, for [core] we can use the current signoff procedure. <br />
* [[User:pressh|Ronald van Haren]]<br />
<br />
== Server Administration ==<br />
* [[User:Brain0|Thomas Bächler]]<br />
* [[User:Phrakture|Aaron Griffin]]<br />
* [[User:JGC|Jan de Groot]]<br />
* [[User:Toofishes|Dan McGee]]<br />
* [[User:Pierre|Pierre Schmitz]]<br />
<br />
== Developer Communication Team ==<br />
This isn't quite infrastructure, but it almost belongs here. Responsible for organizing developer meetings and making sure people attempt to be present; you newer guys might have no idea, but we used to actually schedule and have 80% of the developer staff present in IRC for 1-2 hour meetings. Responsible for any other coordination between developers, TUs, and maybe even the front page news.<br />
* [[User:Iphitus|James Rayner]] -I can work on the Status Reports too if Aaron doesn't have time. I'll do dev meetings if nobody steps up.<br />
<br />
= Packaging Projects =<br />
<br />
== Bug Squashing ==<br />
Responsible for assigning bugs to package maintainers. If something is trivial and a fix can be easily made, then goes and does it. Organizes bug squashing days.<br />
* Andrea Scarpino<br />
* [[User:pjmattal|Paul Mattal]]<br />
* ...<br />
* (needs several people)<br />
<br />
== Rebuild Team ==<br />
Responsible for communicating and determining what rebuilds will cycle through [testing] and in what order. They are probably also the people doing large portions of the rebuilds.<br />
* [[User:Allan|Allan McRae]] (because my packages seem to cause big rebuilds...)<br />
* [[User:Snowman|Eric Bélanger]]<br />
* (more)<br />
<br />
== Package Review Team ==<br />
Some packages in our repos receive little attention due to not being updated frequently. These need to be checked for being able to build (especially after major toolchain updates) and compliance with current packaging standards. It would be good for packages that have not been rebuilt in a long time to be rebuilt to take advantage of new optimisations.<br />
* TODO fill me out please<br />
<br />
== Orphan Team ==<br />
Responsible for caring for those packages that no one seems to want and are being neglected. This may involve adoption by themselves or finding a foster caregiver, moving them to a willing maintainer in [community], or sending them to the AUR (or the trash).<br />
* [[User:Snowman|Eric Bélanger]] (for trivial upstream update)<br />
<br />
= Web Projects =<br />
<br />
This is meant to be a quick overview of the web projects we have and who works on them. For more technical details, you will want to check out the [[DeveloperWiki:Gudrun (web)]] and [[:Category:DeveloperWiki:Server Configuration]] pages.<br />
* [[User:Pierre|Pierre Schmitz]]<br />
<br />
== AUR ==<br />
Responsible for coding and deploying the AUR.<br />
* [[User:Louipc|Loui Chang]]<br />
<br />
== BBS ==<br />
Responsible for keeping our BBS install up to date and secure.<br />
* Andrea Scarpino<br />
<br />
== Flyspray (bugtracker) ==<br />
Responsible for keeping our flyspray install up to date and secure.<br />
* TBA?<br />
<br />
== Main Site ==<br />
* [[User:Dusty|Dusty Phillips]]<br />
<br />
== Planet ==<br />
Responsible for keeping the planet scripts updated and running.<br />
* Andrea Scarpino<br />
* Hugo Doria<br />
<br />
== Wiki ==<br />
Responsible for keeping our wiki install up to date and secure.<br />
* [[User:Pierre|Pierre Schmitz]]<br />
<br />
= Coding Projects =<br />
<br />
== Arch Linux Init Scripts ==<br />
The all-important scripts that make your machine go when you turn it on<br />
* [[User:Brain0|Thomas Bächler]]<br />
* [[User:Phrakture|Aaron Griffin]]<br />
<br />
== Arch Linux Release Engineering (Installer) ==<br />
The Arch Linux Install Framework (AIF) and official installation ISOs<br />
* [[User:Dieter_be|Dieter Plaetinck]]<br />
* [[User:Gerbra|Gerhard Brauer]]<br />
<br />
== mkinitcpio ==<br />
We have a program to create initrds for Arch systems.<br />
* [[User:Brain0|Thomas Bächler]]<br />
* [[User:Phrakture|Aaron Griffin]]<br />
<br />
== namcap ==<br />
Responsible for maintaining and adding features to namcap. <br />
* Hugo Doria<br />
<br />
== netcfg ==<br />
Network connection and profiles<br />
* [[User:Iphitus|James Rayner]]<br />
<br />
== Pacman ==<br />
<br />
=== Development Team ===<br />
This team is responsible for general development, including new features and bugfixes, for the package manager that is a core part of Arch. Although many people contribute patches and code, the people listed here are generally the people that will be reviewing patches and making the final say as to what gets in the codebase.<br />
<br />
* [[User:Toofishes|Dan McGee]]<br />
* Xavier Chantry<br />
* Nagy Gabor<br />
* [[User:Allan|Allan McRae]] (focusing on makepkg)<br />
<br />
=== Translation Team ===<br />
Pacman, as of September 2009, has been translated to 15 languages. The upkeep and maintenance of these translations is pretty much a job in itself, with the times immediately preceding a release being the busiest. Ideally this team is responsible for creating a translations branch when a string freeze is set, and then takes incoming translations, ensures they are valid, and merges them into their branch. When a release is not imminent, their focus may be on improving clarity and usefulness of existing messages.<br />
* [[User:Voidnull|Giovanni Scafora]]</div>
Iphitus
https://wiki.archlinux.org/index.php?title=DeveloperWiki:Internal_Projects&diff=76336
DeveloperWiki:Internal Projects
2009-09-24T03:39:20Z
<p>Iphitus: /* Coding Projects */</p>
<hr />
<div>= Introduction = <br />
This article is part of the [[DeveloperWiki]].<br />
<br />
This page is meant to list a lot of the projects Arch developers keep busy with. Yes, there are things to do outside of packaging. If you are interested in anything, this page should help you get in contact with the right people. If you are looking for something to do, this is always a good place to start.<br />
<br />
Some of these projects have dedicated discussion areas, such as the release engineering and pacman development mailing lists. Other ones are less formal- some of the communication may just be person to person emails or on the arch-dev lists if it appeals to a larger crowd. Remember that if you are interested in these less-formal projects, you should let the names listed below know so they will include you on any communication regarding the project.<br />
<br />
= Infrastructure Projects =<br />
<br />
== Developer Tooling ==<br />
Primarily developer-side tools (devtools, namcap) and server-side (db-scripts) work.<br />
* [[User:Phrakture|Aaron Griffin]]<br />
* [[User:Snowman|Eric Bélanger]]<br />
* [[User:Firmicus|François Charette]]<br />
<br />
=== TODO Items ===<br />
<br />
* dbscripts: Rewrite db-move to allow multiple packages, getting rid of the testing2* convienence scripts<br />
* dbscripts: Add community repo support to db-move to let us move packages from community to core/extra and vice versa.<br />
* dbscripts: Add community support to the sourceballs script - needs additional logic to use alternate SVN repos<br />
* dbscripts: When a package is completely removed from repo, e.g. amarok-base, its sourceball remains on the server.<br />
<br />
== Mirror Control ==<br />
Keep track of existing mirrors and ensure they are doing their job as good as possible (e.g. staying current). Ensure we have up to date contact information for as many mirrors as possible. Work on a tiered mirror system to relieve some stress from our primary rsync server.<br />
* [[User:Romashka|Roman Kyrylych]]<br />
=== Automated tests ===<br />
* sync state: http://users.archlinux.de/~gerbra/mirrorcheck.html<br />
* additional performance tests: http://www.archlinux.de/?page=MirrorStatus<br />
* [[User:Gerbra|Gerhard Brauer]]<br />
* [[User:Pierre|Pierre Schmitz]]<br />
<br />
== Packaging Automation ==<br />
Automatic package generation based on changes in svn trunk. Errors should be reported to some mailing list, successful builds moved to a staging directory. Some guidelines of package moving into [extra]/[testing] should be created, for [core] we can use the current signoff procedure. <br />
* [[User:pressh|Ronald van Haren]]<br />
<br />
== Server Administration ==<br />
* [[User:Brain0|Thomas Bächler]]<br />
* [[User:Phrakture|Aaron Griffin]]<br />
* [[User:JGC|Jan de Groot]]<br />
* [[User:Toofishes|Dan McGee]]<br />
* [[User:Pierre|Pierre Schmitz]]<br />
<br />
== Developer Communication Team ==<br />
This isn't quite infrastructure, but it almost belongs here. Responsible for organizing developer meetings and making sure people attempt to be present; you newer guys might have no idea, but we used to actually schedule and have 80% of the developer staff present in IRC for 1-2 hour meetings. Responsible for any other coordination between developers, TUs, and maybe even the front page news.<br />
* TBA<br />
<br />
= Packaging Projects =<br />
<br />
== Bug Squashing ==<br />
Responsible for assigning bugs to package maintainers. If something is trivial and a fix can be easily made, then goes and does it. Organizes bug squashing days.<br />
* Andrea Scarpino<br />
* [[User:pjmattal|Paul Mattal]]<br />
* ...<br />
* (needs several people)<br />
<br />
== Rebuild Team ==<br />
Responsible for communicating and determining what rebuilds will cycle through [testing] and in what order. They are probably also the people doing large portions of the rebuilds.<br />
* [[User:Allan|Allan McRae]] (because my packages seem to cause big rebuilds...)<br />
* (more)<br />
<br />
== Package Review Team ==<br />
Some packages in our repos receive little attention due to not being updated frequently. These need to be checked for being able to build (especially after major toolchain updates) and compliance with current packaging standards. It would be good for packages that have not been rebuilt in a long time to be rebuilt to take advantage of new optimisations.<br />
* TODO fill me out please<br />
<br />
== Orphan Team ==<br />
Responsible for caring for those packages that no one seems to want and are being neglected. This may involve adoption by themselves or finding a foster caregiver, moving them to a willing maintainer in [community], or sending them to the AUR (or the trash).<br />
* [[User:Snowman|Eric Bélanger]] (for trivial upstream update)<br />
<br />
= Web Projects =<br />
<br />
This is meant to be a quick overview of the web projects we have and who works on them. For more technical details, you will want to check out the [[DeveloperWiki:Gudrun (web)]] and [[:Category:DeveloperWiki:Server Configuration]] pages.<br />
* [[User:Pierre|Pierre Schmitz]]<br />
<br />
== AUR ==<br />
Responsible for coding and deploying the AUR.<br />
* [[User:Louipc|Loui Chang]]<br />
<br />
== BBS ==<br />
Responsible for keeping our BBS install up to date and secure.<br />
* Andrea Scarpino<br />
<br />
== Flyspray (bugtracker) ==<br />
Responsible for keeping our flyspray install up to date and secure.<br />
* TBA?<br />
<br />
== Main Site ==<br />
* [[User:Dusty|Dusty Phillips]]<br />
<br />
== Planet ==<br />
Responsible for keeping the planet scripts updated and running.<br />
* Andrea Scarpino<br />
* Hugo Doria<br />
<br />
== Wiki ==<br />
Responsible for keeping our wiki install up to date and secure.<br />
* [[User:Pierre|Pierre Schmitz]]<br />
<br />
= Coding Projects =<br />
<br />
== Arch Linux Init Scripts ==<br />
The all-important scripts that make your machine go when you turn it on<br />
* [[User:Brain0|Thomas Bächler]]<br />
* [[User:Phrakture|Aaron Griffin]]<br />
<br />
== Arch Linux Release Engineering (Installer) ==<br />
The Arch Linux Install Framework (AIF) and official installation ISOs<br />
* [[User:Dieter_be|Dieter Plaetinck]]<br />
* [[User:Gerbra|Gerhard Brauer]]<br />
<br />
== mkinitcpio ==<br />
We have a program to create initrds for Arch systems.<br />
* [[User:Brain0|Thomas Bächler]]<br />
* [[User:Phrakture|Aaron Griffin]]<br />
<br />
== namcap ==<br />
Responsible for maintaining and adding features to namcap. <br />
* Hugo Doria<br />
<br />
== netcfg ==<br />
Network connection and profiles<br />
* [[User:Iphitus|James Rayner]]<br />
<br />
== Pacman ==<br />
<br />
=== Development Team ===<br />
This team is responsible for general development, including new features and bugfixes, for the package manager that is a core part of Arch. Although many people contribute patches and code, the people listed here are generally the people that will be reviewing patches and making the final say as to what gets in the codebase.<br />
<br />
* [[User:Toofishes|Dan McGee]]<br />
* Xavier Chantry<br />
* Nagy Gabor<br />
* [[User:Allan|Allan McRae]] (focusing on makepkg)<br />
<br />
=== Translation Team ===<br />
Pacman, as of September 2009, has been translated to 15 languages. The upkeep and maintenance of these translations is pretty much a job in itself, with the times immediately preceding a release being the busiest. Ideally this team is responsible for creating a translations branch when a string freeze is set, and then takes incoming translations, ensures they are valid, and merges them into their branch. When a release is not imminent, their focus may be on improving clarity and usefulness of existing messages.<br />
* [[User:Voidnull|Giovanni Scafora]]</div>
Iphitus
https://wiki.archlinux.org/index.php?title=ASUS_Eee_PC_1000HE&diff=73442
ASUS Eee PC 1000HE
2009-08-07T11:21:05Z
<p>Iphitus: iwpriv/config file backend is deprecated,</p>
<hr />
<div>[[Category:Getting and installing Arch (English)]]<br />
[[Category:HOWTOs (English)]]<br />
[[Category:Laptops (English)]]<br />
{| style="float:right; border: 1px solid #000;" <br />
| '''Device''' || '''Status''' || '''Modules'''<br />
|- <br />
| Intel 945GM || style="color:green" | '''Working''' || xf86-video-intel <br />
|- <br />
| Ethernet || style="color:green" | '''Working''' || atl1e<br />
|-<br />
| Wireless || style="color:green" | '''Working''' || ath9k or rt2860sta<br />
|-<br />
| Bluetooth || style="color:green" | '''Working''' || btusb<br />
|-<br />
| Audio || style="color:green" | '''Working''' || snd_hda_intel<br />
|-<br />
| Camera || style="color:green" | '''Working''' || uvcvideo <br />
|-<br />
| Card Reader || style="color:green" | '''Working''' || <br />
|-<br />
| Function Keys || style="color:green" | '''Working''' || <br />
|}<br />
<br />
=Introduction=<br />
First, feel free to help out!<br />
<br />
Secondly, this wiki page assumes you are using kernel 2.6.29 or greater.<br />
<br />
The stock 2.6.29 kernel works just fine. There is no need for a customized eeePC kernel. These customized kernels used to contain patches to allow the hotkeys and whatnot to work. All of these features have since been merged into the standard kernel.<br />
<br />
=Installation=<br />
Use the 2009.02 installation USB image (see [[Install_from_USB_stick]]). There is out-of-the-box support for the wired and wireless NICs. There are no special instructions for installation. For an in-depth guide on the installation see the [[Beginners_Guide]].<br />
<br />
=Xorg=<br />
This example uses hotplugging. Make sure that you have hal installed and started. Also, don't forget to add hal to the DAEMONS=() array in rc.conf!<br />
<br />
==Sample Config==<br />
Note: The 1000HE also functions correctly without using a xorg.conf!<br />
<br />
Here is a basic xorg config file. Using xrandr, you can switch between the lcd + external display.<br />
Section "ServerLayout"<br />
Identifier "X.org Configured"<br />
Screen 0 "Screen0"<br />
EndSection<br />
<br />
Section "ServerFlags"<br />
Option "DontZap" "false"<br />
EndSection<br />
<br />
Section "Files"<br />
ModulePath "/usr/lib/xorg/modules"<br />
FontPath "/usr/share/fonts/local"<br />
FontPath "/usr/share/fonts/misc"<br />
FontPath "/usr/share/fonts/100dpi:unscaled"<br />
FontPath "/usr/share/fonts/75dpi:unscaled"<br />
FontPath "/usr/share/fonts/TTF"<br />
FontPath "/usr/share/fonts/Type1"<br />
EndSection<br />
<br />
Section "Module"<br />
Load "dri"<br />
Load "glx"<br />
Load "extmod"<br />
Load "record"<br />
Load "dbe"<br />
Load "dri2"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "IntelCard"<br />
Driver "intel"<br />
VendorName "Intel Corporation"<br />
BoardName "Mobile 945GME Express Integrated Graphics Controller"<br />
BusID "PCI:0:2:0"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "ASUS"<br />
ModelName "eeePC 1000he"<br />
Modeline "1024x600" 48.86 1024 1064 1168 1312 600 601 604 622 -Hsync +Vsync<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "IntelCard"<br />
Monitor "Monitor0"<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 1<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 4<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 8<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 15<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 16<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Virtual 1280 1024 #Set to resolution of CRT/External<br />
EndSubSection<br />
EndSection<br />
<br />
==DPI Settings==<br />
In general the autodetected DPI does not fit the smaller resolution very well at all. A good comfortable setting would be 96dpi or 75dpi if you like your fonts really small. An easy way to set your DPI would be to add this to the end of your xserverrc (located in /etc/X11/xinit/).<br />
<br />
exec /usr/bin/X -nolisten tcp '''-dpi 96'''<br />
<br />
==Graphic Performance==<br />
With X.org's new 2D acceleration architecture, EXA, users of the intel driver may experience slowdown with window redrawing and scrolling. A possible solution to this is to override intel's default 2D acceleration, XXA, with the new X.org acceleration. Add this section to the device section of your xorg.conf.<br />
<br />
Option "AccelMethod" "exa" <br />
Option "MigrationHeuristic" "greedy"<br />
<br />
In addition to improving 2D graphics, the card's 3D performance can be [https://bugs.launchpad.net/xserver-xorg-video-intel/+bug/195843 greatly enhanced] by adding this line to your /etc/profile.<br />
<br />
export INTEL_BATCH=1<br />
<br />
See [[Intel_Graphics|Intel Graphics]] for more information.<br />
<br />
According to the intel driver documentation, X-Video Motion Compensation or "XvMC" is not enabled by default. Enabling this option can greatly reduce CPU utilization when playing back MPEG-2 video. To enable this option, two things need to be done; first, add this to the device section of your xorg.conf:<br />
<br />
Option "XvMC" "true"<br />
<br />
Lastly, create a config file to tell the X server where the XvMC library is:<br />
<br />
echo /usr/lib/libIntelXvMC.so > /etc/X11/XvMCConfig<br />
<br />
==Keyboard==<br />
#Copy /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi to /etc/hal/fdi/policy<br />
#Edit /etc/hal/fdi/policy/10-keymap.fdi and change '''<merge key="input.xkb.layout" type="string">us</merge>''' accordingly<br />
<br />
==Touchpad==<br />
#Install the xf86-input-synaptics package<br />
#Create /etc/hal/fdi/policy/11-x11-synaptics.fdi with the following contents:<br />
<?xml version="1.0" encoding="ISO-8859-1"?><br />
<deviceinfo version="0.2"><br />
<device><br />
<match key="info.product" contains="ETPS/2 Elantech Touchpad"><br />
<merge key="input.x11_driver" type="string">synaptics</merge><br />
<merge key="input.x11_options.SHMConfig" type="string">on</merge><br />
<merge key="input.x11_options.MaxSpeed" type="string">1.00</merge><br />
<merge key="input.x11_options.MinSpeed" type="string">0.75</merge><br />
<merge key="input.x11_options.Emulate3Buttons" type="string">on</merge><br />
<merge key="input.x11_options.VertTwoFingerScroll" type="string">1</merge><br />
<merge key="input.x11_options.HorizTwoFingerScroll" type="string">1</merge><br />
<merge key="input.x11_options.TapButton1" type="string">1</merge><br />
<merge key="input.x11_options.TapButton2" type="string">2</merge><br />
<merge key="input.x11_options.TapButton3" type="string">3</merge><br />
<merge key="input.x11_options.LockedDrags" type="string">1</merge><br />
</match><br />
</device><br />
</deviceinfo><br />
<br />
==xrandr==<br />
For a nice GUI tool, try '''lxrandr'''; it is very simple to use!<br />
<br />
Switch to External Monitor:<br />
xrandr --output LVDS --off --output VGA --auto<br />
<br />
Switch back to eeepc's LCD: <br />
xrandr --output LVDS --auto --output VGA --off<br />
<br />
=ACPI=<br />
<br />
=ACPI=<br />
<br />
==laptop-mode-tools==<br />
I got the best powersaving from a combination of laptop-mode-tools.<br />
<br />
* Use laptop-mode to control all power saving features. Enable bluetooth.conf, cpufreq.conf, hal-polling.conf, intel-hda-powersave.conf, usb-autosuspend.conf, lcd-brightness.conf<br />
** For lcd-brightness, use the following options. Adjust your max/min brightness as suits you. The maximums are located in the same directory as the control file.<br />
BATT_BRIGHTNESS_COMMAND="echo 3"<br />
LM_AC_BRIGHTNESS_COMMAND="echo 15"<br />
NOLM_AC_BRIGHTNESS_COMMAND="echo 15"<br />
BRIGHTNESS_OUTPUT="/sys/devices/virtual/backlight/eeepc/brightness"<br />
** The intel-hda-powersave has a side-effect. Short sounds such as IM notifications may not come through, or will be messed up as it starts playing the sound before the sound card wakes up.<br />
<br />
* The rt2860sta wireless has pretty good powersaving, but it's a tradeoff between throughput<->power usage. Minimum power usage gives a pretty low throughput of ~11KB/s when I would normally get >1MB/s.<br />
iwpriv ra0 set PSMode=MAX_PSP<br />
** MAX_PSP - maximum power saving<br />
** CAM - seems to be normal<br />
** FAST_PSP - ? untested, probably a medium value.<br />
<br />
* The eeepc "Super Hybrid Engine" as it's known under windows has a significant effect on powersaving. This underclocks the FSB for powersave/overclocks for performance and can be controlled via /sys/devices/platform/eeepc/cpufv which is provided by eeepc_laptop. The following is a laptop-mode configuration for it that controls it automatically.<br />
<br />
<pre><br />
#! /bin/sh<br />
<br />
if [ x$SUPERHE_CONTROL_FILE = x ]; then<br />
SUPERHE_CONTROL_FILE=/sys/devices/platform/eeepc/cpufv<br />
fi<br />
<br />
if [ x$CONTROL_SUPERHE = x1 ]; then<br />
if [ $ON_AC -eq 1 ]; then<br />
if [ $ACTIVATE -eq 1 ]; then<br />
SUPERHE_VALUE="$LM_AC_SUPERHE"<br />
else<br />
SUPERHE_VALUE="$NOLM_AC_SUPERHE"<br />
fi<br />
else<br />
SUPERHE_VALUE="$BATT_SUPERHE"<br />
fi<br />
echo $SUPERHE_VALUE > $SUPERHE_CONTROL_FILE<br />
fi<br />
</pre><br />
<pre><br />
#<br />
# Configuration file for Laptop Mode Tools module eee-superhe<br />
#<br />
# For more information, consult the laptop-mode.conf(8) manual page.<br />
#<br />
<br />
# Control FSB speed. Requires eeepc_laptop kernel module loaded.<br />
CONTROL_SUPERHE=1<br />
<br />
# 2 is powersave<br />
# 1 is normal<br />
# 0 is performance<br />
<br />
BATT_SUPERHE=2<br />
LM_AC_SUPERHE=0<br />
NOLM_AC_SUPERHE=0<br />
<br />
# If your system has the control file located at another point<br />
# configure it here<br />
# SUPERHE_CONTROL_FILE=<br />
</pre><br />
<br />
==acpi-eeepc-generic==<br />
Install the [http://aur.archlinux.org/packages.php?ID=23318 acpi-eeepc-generic package] from AUR (see [[AUR User Guidelines]]).<br />
You must install version 0.9 or greater, as previous versions do not have support for the 1000HE.<br />
<br />
==Sleep==<br />
Use '''pm-suspend''' instead of the script in acpi-eeepc-generic.<br />
The acpi-eeepc-generic suspend script will cause the system to<br />
re-suspend when being woken up or when exiting X!<br />
<br />
To substitute '''pm-suspend''' for the acpi sleep script, edit<br />
/etc/conf.d/acpi-eeepc-generic.conf and comment out the line that<br />
reads:<br />
<br />
COMMANDS_SLEEP=("/etc/acpi/eeepc/acpi-eeepc-generic-suspend2ram.sh")<br />
<br />
Replace it with:<br />
<br />
COMMANDS_SLEEP=("/usr/sbin/pm-suspend")<br />
<br />
==cpufrequtils==<br />
To scale the CPU and possibly save a bit of power, you will want to set up cpufrequtils.<br />
<br />
#pacman -Sy cpufrequtils<br />
#Edit /etc/conf.d/cpufreq <pre>min_freq="1000MHz" max_freq="1.67GHz"</pre> (or 1.60GHz if you have the Atom N270)<br />
#modprobe acpi-cpufreq cpufreq_ondemand cpufreq_powersave<br />
#Add these modules listed above to the MODULES=() array in rc.conf<br />
#/etc/rc.d/cpufreq start<br />
#Add cpufreq to the DAEMONS=() array in rc.conf<br />
<br />
=Hardware=<br />
==WiFi==<br />
WiFi should work out of the box with the stock kernel, but if you do have trouble, try upgrading the rt2860sta module by installing [http://aur.archlinux.org/packages.php?ID=14557 the rt2860 package].<br />
<br />
===Obsolete Methods===<br />
<br />
rt2860sta supports configuration by configuration or iwpriv. Both of these are obsolete and the standard wireless extension tools should be used instead (wireless_tools and wpa_supplicant). If you have an issue with these tools, then it is suggested that you file a bug with the rt2860sta driver.<br />
<br />
As a workaround, you can use the obsolete interfaces. If you still have difficulties associating with some networks, try installing the '''RT2860STA.DAT''' file into /etc/Wireless/RT2860STA/RT2860STA.DAT. You can find this file in the source tarball in the AUR's '''rt2860''' package. Wicd supports the iwpriv backend <br />
<br />
Notes: http://wiki.debian.org/rt2860sta#issues<br />
<br />
==Bluetooth==<br />
To turn the bluetooth radio on/off:<br />
<br />
# enable<br />
$ echo 1 > /sys/class/rfkill/rfkill1/state<br />
# disable<br />
$ echo 0 > /sys/class/rfkill/rfkill1/state<br />
<br />
Install the '''bluez-utils''' and '''bluez-libs''' packages, then <tt>modprobe btusb</tt>.<br />
<br />
''Note: in the test repository '''bluez-utils''' and '''bluez-libs''' are merged into a single package, '''bluez'''.''<br />
<br />
See the Arch Linux [[Bluetooth]] and [[Bluetooth Mouse]] wiki pages for more information about configuring and using Bluetooth devices.<br />
<br />
{{Box Note |'''''Switching the Bluetooth Radio on and off does not work on kernel 2.6.28 or below. You need to use kernel 2.6.29 or greater.'''''}}<br />
<br />
==Camera==<br />
<br />
To enable/disable the camera:<br />
<br />
# enable<br />
echo 1 > /sys/devices/platform/eeepc/camera<br />
# disable<br />
echo 0 > /sys/devices/platform/eeepc/camera<br />
<br />
Make sure that the module <tt>uvcvideo</tt> is loaded<br />
<br />
To record video and take photos, you may use '''cheese''' or the [http://aur.archlinux.org/packages.php?ID=15272 '''wxcam'''] package.<br />
<br />
To simply test the camera, you may use <tt>mplayer</tt>:<br />
<br />
mplayer -fps 15 tv://<br />
<br />
The webcam is reported to work with Skype.<br />
<br />
=Info=<br />
==lspci==<br />
00:00.0 Host bridge: Intel Corporation Mobile 945GME Express Memory Controller Hub (rev 03)<br />
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03)<br />
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)<br />
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)<br />
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)<br />
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)<br />
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)<br />
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)<br />
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)<br />
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)<br />
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)<br />
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)<br />
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)<br />
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)<br />
01:00.0 Network controller: Atheros Communications Inc. AR928X Wireless Network Adapter (PCI-Express) (rev 01)<br />
03:00.0 Ethernet controller: Attansic Technology Corp. L1e Gigabit Ethernet Adapter (rev b0)<br />
<br />
* lspci for another user produced "Network controller: RaLink RT2860" rather than the Atheros chipset in the output above<br />
<br />
=Issues=<br />
Laptop suspends while "waking up"<br />
*Use pm-suspend instead of acpi script<br />
<br />
If you have any other issues, make sure you are using kernel 2.6.29 or greater.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Downgrading_packages&diff=70230
Downgrading packages
2009-06-09T10:02:49Z
<p>Iphitus: just OCD about getting the text right...</p>
<hr />
<div>[[Category:Package management (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|:Downgrade packages}}<br />
{{i18n_entry|简体中文|:Downgrade packages (简体中文)}}<br />
{{i18n_links_end}}<br />
<br />
{{Note|Before downgrading, consider why you're downgrading. If it's because of a bug, please help both Arch and upstream developers by spending a mere 5 minutes of your time reporting the bug on a bug tracker somewhere. After all, Arch is on the cutting edge and bugs are inevitable.<br />
<br />
Both us and the upstream developers appreciate the effort. That extra bit of information could save us hours of testing and debugging and also helps us release more stable software. <br />
<br />
[[User:Iphitus|Iphitus]] 05:58, 9 June 2009 (EDT) }}<br />
<br />
== How to downgrade a package ==<br />
* Q: I just ran '''pacman -Syu''' and package XYZ was upgraded to version N from version M. This package is causing problems on my computer, how can I downgrade from version N to the older version M?<br />
*A: You may be able to downgrade the package trivially by visiting '''/var/cache/pacman/pkg''' on your system and seeing if the older version of the package is stored there. (If you haven't run '''pacman -Scc''' recently, it should be there). If the package is there, you can install that version using '''pacman -U pkgname-olderpkgver.pkg.tar.gz'''. If pacman complains about file conflicts, you could force it to do the installation anyway with '''pacman -Uf pkgname-olderpkgver.pkg.tar.gz'''.<br />
<br />
<br />
If you can't find older versions on your system, check if one of the mirrors is out of sync, and get it from there. Click here to see the [http://users.archlinux.de/~gerbra/mirrorcheck.html status of mirrors].<br />
<br />
You can also check one of these mirrors:<br />
* http://ftp.tu-chemnitz.de/pub/linux/sunsite.unc-mirror/distributions/archlinux/ [Err. 404]<br />
* http://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/archlinux/ [Good]<br />
* http://ftp.parrswood.manchester.sch.uk/Mirrors/ftp.archlinux.org/ [Err. 404]<br />
* http://archlinux.alouche.net [Good, has advanced search] (Note that this cannot be used as an Arch mirror in your pacman.conf, you have to manually download any packages.)<br />
* http://schlunix.org/archlinux/ [Good] (Stores old packages)<br />
<br />
If the package is not located there, you will need to compile the older version yourself. To do this you will need a PKGBUILD for the file; you could edit the existing PKGBUILD provided by ABS to use older sources, or you can visit http://www.archlinux.org/packages/ and search for the package you wish to downgrade. Once you find it, click "View SVN entries" and select a diff with a previous revision (ie: for the revision you are interested in). If you use a "side by side" diff, you can copy and paste the entire PKGBUILD into a file and build it with makepkg.<br />
<br />
The [http://arm.kh.nu/ Arch Rollback Machine] contains archived snapshots of all the repos going back to 1 October 2008. I've been using this site to manually locate and download older versions of packages. The urls are constructed in such a way to facility easy wget+pacman scripting to "roll back" your system to a particular date. The introductory forum thread is [http://bbs.archlinux.org/viewtopic.php?id=53665 here].<br />
<br />
== What about dependencies? ==<br />
* Q: I can't downgrade a package, because of dependencies.<br />
* A: You can ignore dependencies when upgrading or removing with 'd'. e.g. '''pacman -Ud pkgpkgname-olderpkgver.pkg.tar.gz'''.<br />
<br />
== Stopping Pacman from updating certain packages ==<br />
* Q: How do I stop Pacman from upgrading downgraded packages?<br />
* A: With the 'IgnorePkg' variable in your pacman.conf.<br />
<br />
'IgnorePkg = package1 package2 ...' in your pacman.conf instructs Pacman to ignore any upgrades for selected packages when performing a --sysupgrade.<br />
<br />
== Reverting to a Savepoint ==<br />
* Q: I want to go back to how my system was yesterday.<br />
* A: It's easy provided you enabled periodic snapshots.<br />
<br />
You can rely on a logical volume manager ([[LVM]]) for creating and maintaining snapshots. These snapshots should not be confused with CVS snapshots. LVM snapshots are kernel-level filesystem snapshots that, unlike a full backup, use a COW (copy-on-write) scheme which means that it occupies very little disk space so long as no files were modified, and if files were modified, the snapshot occupies only a little more than the disk space needed to store the pre-modified files. This usually means that you can snapshot a 35GB system with only 2GB free space, considering that pacman -Sy will likely modify far less than 2GB of data. If the state of your system after the upgrade is undesirable, you can quickly rollback to previous snapshot images of your system.<br />
<br />
== See Also ==<br />
* See [[ABS - The Arch Build System]] for more information.<br />
* See [[LVM]] for how to enable snapshots and how to revert to their state.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Downgrading_packages&diff=70229
Downgrading packages
2009-06-09T10:00:35Z
<p>Iphitus: </p>
<hr />
<div>[[Category:Package management (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|:Downgrade packages}}<br />
{{i18n_entry|简体中文|:Downgrade packages (简体中文)}}<br />
{{i18n_links_end}}<br />
<br />
{{Note|Before downgrading, consider why you're downgrading. If it's because of a bug please report the bug. Please help both Arch and upstream developers by spending a mere 5 minutes of your time reporting the bug. After all, Arch is on the cutting edge and bugs are inevitable.<br />
<br />
Both us and the upstream developers appreciate the effort. That extra bit of information could save us hours of testing and debugging and also helps us release more stable software. <br />
<br />
[[User:Iphitus|Iphitus]] 05:58, 9 June 2009 (EDT) }}<br />
<br />
== How to downgrade a package ==<br />
* Q: I just ran '''pacman -Syu''' and package XYZ was upgraded to version N from version M. This package is causing problems on my computer, how can I downgrade from version N to the older version M?<br />
*A: You may be able to downgrade the package trivially by visiting '''/var/cache/pacman/pkg''' on your system and seeing if the older version of the package is stored there. (If you haven't run '''pacman -Scc''' recently, it should be there). If the package is there, you can install that version using '''pacman -U pkgname-olderpkgver.pkg.tar.gz'''. If pacman complains about file conflicts, you could force it to do the installation anyway with '''pacman -Uf pkgname-olderpkgver.pkg.tar.gz'''.<br />
<br />
<br />
If you can't find older versions on your system, check if one of the mirrors is out of sync, and get it from there. Click here to see the [http://users.archlinux.de/~gerbra/mirrorcheck.html status of mirrors].<br />
<br />
You can also check one of these mirrors:<br />
* http://ftp.tu-chemnitz.de/pub/linux/sunsite.unc-mirror/distributions/archlinux/ [Err. 404]<br />
* http://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/archlinux/ [Good]<br />
* http://ftp.parrswood.manchester.sch.uk/Mirrors/ftp.archlinux.org/ [Err. 404]<br />
* http://archlinux.alouche.net [Good, has advanced search] (Note that this cannot be used as an Arch mirror in your pacman.conf, you have to manually download any packages.)<br />
* http://schlunix.org/archlinux/ [Good] (Stores old packages)<br />
<br />
If the package is not located there, you will need to compile the older version yourself. To do this you will need a PKGBUILD for the file; you could edit the existing PKGBUILD provided by ABS to use older sources, or you can visit http://www.archlinux.org/packages/ and search for the package you wish to downgrade. Once you find it, click "View SVN entries" and select a diff with a previous revision (ie: for the revision you are interested in). If you use a "side by side" diff, you can copy and paste the entire PKGBUILD into a file and build it with makepkg.<br />
<br />
The [http://arm.kh.nu/ Arch Rollback Machine] contains archived snapshots of all the repos going back to 1 October 2008. I've been using this site to manually locate and download older versions of packages. The urls are constructed in such a way to facility easy wget+pacman scripting to "roll back" your system to a particular date. The introductory forum thread is [http://bbs.archlinux.org/viewtopic.php?id=53665 here].<br />
<br />
== What about dependencies? ==<br />
* Q: I can't downgrade a package, because of dependencies.<br />
* A: You can ignore dependencies when upgrading or removing with 'd'. e.g. '''pacman -Ud pkgpkgname-olderpkgver.pkg.tar.gz'''.<br />
<br />
== Stopping Pacman from updating certain packages ==<br />
* Q: How do I stop Pacman from upgrading downgraded packages?<br />
* A: With the 'IgnorePkg' variable in your pacman.conf.<br />
<br />
'IgnorePkg = package1 package2 ...' in your pacman.conf instructs Pacman to ignore any upgrades for selected packages when performing a --sysupgrade.<br />
<br />
== Reverting to a Savepoint ==<br />
* Q: I want to go back to how my system was yesterday.<br />
* A: It's easy provided you enabled periodic snapshots.<br />
<br />
You can rely on a logical volume manager ([[LVM]]) for creating and maintaining snapshots. These snapshots should not be confused with CVS snapshots. LVM snapshots are kernel-level filesystem snapshots that, unlike a full backup, use a COW (copy-on-write) scheme which means that it occupies very little disk space so long as no files were modified, and if files were modified, the snapshot occupies only a little more than the disk space needed to store the pre-modified files. This usually means that you can snapshot a 35GB system with only 2GB free space, considering that pacman -Sy will likely modify far less than 2GB of data. If the state of your system after the upgrade is undesirable, you can quickly rollback to previous snapshot images of your system.<br />
<br />
== See Also ==<br />
* See [[ABS - The Arch Build System]] for more information.<br />
* See [[LVM]] for how to enable snapshots and how to revert to their state.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Downgrading_packages&diff=70228
Downgrading packages
2009-06-09T09:58:45Z
<p>Iphitus: </p>
<hr />
<div>[[Category:Package management (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|:Downgrade packages}}<br />
{{i18n_entry|简体中文|:Downgrade packages (简体中文)}}<br />
{{i18n_links_end}}<br />
<br />
{{Note|Before downgrading, consider why you're downgrading. If it's because of a bug please report the bug. Please help both Arch and upstream developers by spending a mere 5 minutes of your time reporting the bug. After all, Arch is on the cutting edge and bugs are inevitable.<br />
<br />
Both us and the upstream developers appreciate the effort - that extra bit of information could help us save hours of debugging, and helps us release more stable software.<br />
<br />
[[User:Iphitus|Iphitus]] 05:58, 9 June 2009 (EDT) }}<br />
<br />
== How to downgrade a package ==<br />
* Q: I just ran '''pacman -Syu''' and package XYZ was upgraded to version N from version M. This package is causing problems on my computer, how can I downgrade from version N to the older version M?<br />
*A: You may be able to downgrade the package trivially by visiting '''/var/cache/pacman/pkg''' on your system and seeing if the older version of the package is stored there. (If you haven't run '''pacman -Scc''' recently, it should be there). If the package is there, you can install that version using '''pacman -U pkgname-olderpkgver.pkg.tar.gz'''. If pacman complains about file conflicts, you could force it to do the installation anyway with '''pacman -Uf pkgname-olderpkgver.pkg.tar.gz'''.<br />
<br />
<br />
If you can't find older versions on your system, check if one of the mirrors is out of sync, and get it from there. Click here to see the [http://users.archlinux.de/~gerbra/mirrorcheck.html status of mirrors].<br />
<br />
You can also check one of these mirrors:<br />
* http://ftp.tu-chemnitz.de/pub/linux/sunsite.unc-mirror/distributions/archlinux/ [Err. 404]<br />
* http://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/archlinux/ [Good]<br />
* http://ftp.parrswood.manchester.sch.uk/Mirrors/ftp.archlinux.org/ [Err. 404]<br />
* http://archlinux.alouche.net [Good, has advanced search] (Note that this cannot be used as an Arch mirror in your pacman.conf, you have to manually download any packages.)<br />
* http://schlunix.org/archlinux/ [Good] (Stores old packages)<br />
<br />
If the package is not located there, you will need to compile the older version yourself. To do this you will need a PKGBUILD for the file; you could edit the existing PKGBUILD provided by ABS to use older sources, or you can visit http://www.archlinux.org/packages/ and search for the package you wish to downgrade. Once you find it, click "View SVN entries" and select a diff with a previous revision (ie: for the revision you are interested in). If you use a "side by side" diff, you can copy and paste the entire PKGBUILD into a file and build it with makepkg.<br />
<br />
The [http://arm.kh.nu/ Arch Rollback Machine] contains archived snapshots of all the repos going back to 1 October 2008. I've been using this site to manually locate and download older versions of packages. The urls are constructed in such a way to facility easy wget+pacman scripting to "roll back" your system to a particular date. The introductory forum thread is [http://bbs.archlinux.org/viewtopic.php?id=53665 here].<br />
<br />
== What about dependencies? ==<br />
* Q: I can't downgrade a package, because of dependencies.<br />
* A: You can ignore dependencies when upgrading or removing with 'd'. e.g. '''pacman -Ud pkgpkgname-olderpkgver.pkg.tar.gz'''.<br />
<br />
== Stopping Pacman from updating certain packages ==<br />
* Q: How do I stop Pacman from upgrading downgraded packages?<br />
* A: With the 'IgnorePkg' variable in your pacman.conf.<br />
<br />
'IgnorePkg = package1 package2 ...' in your pacman.conf instructs Pacman to ignore any upgrades for selected packages when performing a --sysupgrade.<br />
<br />
== Reverting to a Savepoint ==<br />
* Q: I want to go back to how my system was yesterday.<br />
* A: It's easy provided you enabled periodic snapshots.<br />
<br />
You can rely on a logical volume manager ([[LVM]]) for creating and maintaining snapshots. These snapshots should not be confused with CVS snapshots. LVM snapshots are kernel-level filesystem snapshots that, unlike a full backup, use a COW (copy-on-write) scheme which means that it occupies very little disk space so long as no files were modified, and if files were modified, the snapshot occupies only a little more than the disk space needed to store the pre-modified files. This usually means that you can snapshot a 35GB system with only 2GB free space, considering that pacman -Sy will likely modify far less than 2GB of data. If the state of your system after the upgrade is undesirable, you can quickly rollback to previous snapshot images of your system.<br />
<br />
== See Also ==<br />
* See [[ABS - The Arch Build System]] for more information.<br />
* See [[LVM]] for how to enable snapshots and how to revert to their state.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Music_Player_Daemon&diff=70191
Music Player Daemon
2009-06-08T11:45:29Z
<p>Iphitus: /* New Setup Instructions */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:Daemons and system services (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|MPD}}<br />
{{i18n_entry|Polski|mpd (polski)}}<br />
{{i18n_entry|Nederlands|Music Player Daemon (Nederlands)}}<br />
{{i18n_entry|Русский|MPD - Music Player Daemon (Русский)}}<br />
{{i18n_entry|简体中文|MPD(简体中文)}}<br />
{{i18n_entry|Türkçe|MPD (Türkçe)}}<br />
{{i18n_links_end}}<br />
<br />
==What is mpd?==<br />
'''mpd''' (Music Player Daemon) is an audio player that has a server-client architecture. mpd runs in the background as a daemon, manages playlists and a music database, and uses very few resources. In order to interface with it, you need a separate client. More information can be found on their [http://www.musicpd.org/ website]<br />
<br />
==Daemon Install Procedure==<br />
<br />
Sync and install with pacman:<br />
# pacman -S mpd<br />
<br />
==Configure mpd==<br />
<br />
For more information about mpd configuration visit http://mpd.wikia.com/wiki/Configuration<br />
<br />
===Timeline of mpd's behavior on a typical working setup===<br />
* mpd is started on boot by {{Filename|/etc/rc.conf}}, by including it in the DAEMONS array. (Or, this can be done manually each session by running {{Codeline|/etc/rc.d/mpd start}} with root privileges).<br />
* Since mpd is now started as root, it first reads the {{Filename|/etc/mpd.conf}} file.<br />
* mpd reads the user variable in the {{Filename|/etc/mpd.conf}} file, and changes from root to this user.<br />
* mpd then reads the contents of the {{Filename|/etc/mpd.conf}} file and configures itself accordingly.<br />
<br />
Notice that mpd changes the running user from root to the one named in the {{Filename|/etc/mpd.conf}} file. This way, uses of "~" in the configuration file point correctly to the home user's directory, and not root's directory. It may be worthwhile to change all uses of "~" to "/home/username" to avoid any confusion over this aspect of mpd's behavior.<br />
<br />
===Quick Single User Installation===<br />
<br />
* As root, check if {{Filename|/etc/mpd.conf}} exists and delete the file if it does. This is safe.<br />
<br />
Mpd comes with an example configuration file, available at {{Filename|/etc/mpd.conf.example}}. This file holds an abundance of information on mpd configuration, and holds default mixer values you can simply uncomment.<br />
<br />
* As root, copy this example file to {{Filename|/etc/mpd.conf}}.<br />
# cp /etc/mpd.conf.example /etc/mpd.conf<br />
<br />
Never put this file in the user's directory like some tutorials suggest. This would complicate things and most of the time doing this is useless (notice you're reading a quick installation howto). If you previously created a {{Filename|.mpdconf}} file in your home, remove it now. This is important to prevent conflicts. When placing it in /etc, like we do here, mpd will be able to run as a daemon at boot. Otherwise, a script would be needed to run mpd AFTER the user has logged (like kdm or ~/.fluxbox/startup) or it would require a manual move each time. For a single music collection, the method used here is simply better, even while the collection is shared to multiple users. Also, don't be afraid about root privileges: even while mpd runs as a daemon, it never completely runs as root since it automatically drops its root privileges after execution.<br />
<br />
To make audio output actually work ensure that you have setup audio card and mixer correctly. See [[ALSA]]. Do not forget to unmute the required channels in alsamixer, raise the volume and save changes with alsactl store. See {{Filename|~/.mpd/error}} if it still doesn't work.<br />
<br />
Make sure your card can do hardware mixing (most of them can, including onboard audio). Or else this could cause problems with multiple sound playback. For example, this can prevent Mplayer from playing back sound while the mpd daemon is running, returning an audio error message stating the device is busy.<br />
<br />
<br />
We can now move on to edit the file, once again, as root:<br />
# EDITOR /etc/mpd.conf<br />
<br />
===New Setup Instructions=== <br />
'''Keeps the setup in /var and uses "mpd" as default user instead of cluttering up ~/. This is the way the arch package is installed.'''<br />
<br />
Edit {{Filename|/etc/mpd.conf}} to reflect as such. Or for something easier, just copy /etc/mpd.conf.example and set your music directory in that as it has the same defaults.<br />
<br />
music_directory "/home/user/music" # Your music dir.<br />
playlist_directory "/var/lib/mpd/playlists"<br />
db_file "/var/lib/mpd/db"<br />
log_file "/var/log/mpd/mpd.log"<br />
error_file "/var/log/mpd/mpd.error"<br />
pid_file "/var/run/mpd/mpd.pid"<br />
state_file "/var/lib/mpd/mpdstate"<br />
user "mpd"<br />
# Binding to address and port causing problems in mpd-0.14.2 best to leave<br />
# commented.<br />
# bind_to_address "127.0.0.1"<br />
# port "6600"<br />
<br />
Read steps below carefully, permissions need to be set correctly.<br />
<br />
* Keep user as "mpd", double check to make sure user "mpd" home directory is set to /var/lib/mpd <br />
$ cat /etc/passwd | grep mpd<br />
* Also make sure /var/lib/mpd is owned by mpd:mpd.<br />
$ ls -l /var/lib/ | grep mpd<br />
* Now as root create the files you specified in {{Filename|/etc/mpd.conf}}, if directories do not exist, create those as well. This is not required if you use the defaults in the arch package.<br />
# touch /var/lib/mpd/db<br />
# touch /var/lib/mpd/mpdstate<br />
# touch /var/run/mpd/mpd.pid<br />
# touch /var/log/mpd/mpd.log<br />
# touch /var/log/mpd/mpd.error<br />
* MPD needs to have +x permissions on '''ALL''' parent directories to your music collection (ie. if it's located outisde of "mpd" home directory /var/lib/mpd). <br />
* By default useradd sets permissions on home dir to 1700 drwx------. So if your like me you will need to change permissions of /home/user <br />
* Example... my music collection is located /home/user/music. <br />
$ chmod a+x /home/user<br />
$ chmod -R a+x /home/user/music<br />
Note: This is not good security practice and may be unnecessary (YMMV). [[User:M1sha|M1sha]] 11:47, 7 June 2009 (EDT)<br />
* Now change the ownership of the directories and files you created to user "mpd"<br />
# chown -R mpd:mpd /var/lib/mpd<br />
# chown -R mpd:mpd /var/run/mpd<br />
# chown -R mpd:mpd /var/log/mpd<br />
* If your music collection is contained under multiple dir. you can make symbolic link under /var/lib/mpd then set 'music_dir' in mpd.conf to the directory holding the symbolic links. Remember to set permissions accordingly on the directories being linked. <br />
* Create mpd database as root.<br />
# mpd --create-db<br />
<br />
'''Continue below'''<br />
<br />
=== Alternative Setup ===<br />
'''Useful if you you want to run for example an icecast server.'''<br />
MPD neet not be started with root permissions. The only reason why MPD needs to be started as root (by being called from {{Filename|/etc/rc.conf}}) is because the default files and folders in the default configuration file points to directories owned by root (the /var directory). A less common, but perhaps more sensible, approach is to make MPD work with files and directories owned by a normal user. Running MPD as a normal user has several advantages: (1) can easily have a single directory ~/.mpd (or any other directory under /home/username) for all MPD configuration files, (2) no read/write permission errors, and (3) more flexible calls to MPD by using {{Filename|~/.xinitrc}} instead of including 'mpd' in the {{Filename|/etc/rc.conf}} DAEMONS array.<br />
<br />
The following steps shows how to run MPD as a normal user.<br />
<br />
* Copy the contents of the default MPD configuration file in {{Filename|/etc/mpd.conf.example}} to your home directory. A good place would be {{Filename|"/home/usr/.mpd/config"}}.<br />
* Follow the 'old setup instructions' from above, ignoring the first part about copying the config to {{Filename|/etc/mpd.conf}}. <br />
* Let MPD start on bootup by calling it from your {{Filename|~/.xinitrc}} as follows:<br />
$ mpd /home/username/.mpd/config<br />
* Note that you don't have to put a "&" at the end of the line here, since MPD will automatically daemonize itself.<br />
<br />
Lastly, delete the entry 'mpd' from your DAEMONS array in {{Filename|/etc/rc.conf}}, as we are not running it as root anymore.<br />
<br />
====Multi-MPD Setup====<br />
<br />
If you want a second MPD daemon (e.g., with icecast output to share music over the network) to use the same music and playlist as the one above, simply copy the above configuration file and make a new file (e.g., {{Filename|/home/username/.mpd/config-icecast}}), and only change the log_file, error_file, pid_file, and state_file parameters (e.g., {{Filename|mpd-icecast.log}}, {{Filename|mpd-icecast.error}}, and so on); using the same directory paths for the music and playlist directories would ensure that this second MPD daemon would use the same music collection as your first one (e.g., creating and editing a playlist under the first daemon would affect the second daemon as well, so that you don't have to create the same playlists all over again for the second daemon). Then, call this second daemon the same way from your {{Filename|~/.xinitrc}} above. (Just be sure to have a different port number, so as to not conflict with your first MPD daemon).<br />
<br />
==Troubleshooting==<br />
<br />
=== Autodetection failed ===<br />
<br />
During the start of mpd, it tries to autodetect your set-up and configure output and volume control accordingly. Though this mostly goes well, it will fail for some systems. It may help to tell mpd specifically what to use as output and mixer control. If you copied {{Filename|/etc/mpd.conf}} over from {{Filename|/etc/mpd.conf.example}} as mentionned above, you can simply uncomment:<br />
<br />
Example for alsa output type:<br />
audio_output {<br />
type "alsa"<br />
name "My ALSA Device"<br />
device "hw:0,0" # optional<br />
format "44100:16:2" # optional<br />
}<br />
<br />
Example for alsa mixer:<br />
mixer_type "alsa"<br />
mixer_device "default"<br />
mixer_control "PCM"<br />
<br />
'''Note:''' in case of permission problems when using ESD with mpd run this as root:<br />
# chsh -s /bin/true mpd<br />
<br />
===Tips===<br />
<br />
To get rid of timeouts (i.e. when you paused music for long time) in gpmc and other clients uncomment and increase {{Codeline|connection_timeout}} option in {{Filename|mpd.conf}}.<br />
<br />
If files and/or titles are shown in wrong encoding, uncomment and change {{Codeline|filesystem_charset}} and {{Codeline|id3v1_encoding}} options.<br />
Note that you cannot set encoding for ID3 v2 tags. To workaround this you may use [http://mpd.wikia.com/wiki/GenericDecoder#Generic_Tagreader external tag readers].<br />
<br />
If you want to use another computer to control mpd over a network, the {{Codeline|bind_to_address}} option in {{Filename|mpd.conf}} will need to be set to either your IP address, or {{Codeline|any}} if your IP address changes frequently. Remember to add mpd to the {{Filename|/etc/hosts.allow}} file to enable external access.<br />
<br />
==Client Install Procedure==<br />
<br />
Install a client program for mpd. Popular options are:<br />
<br />
* '''mpc''' &ndash; Command Line Client (you'll probably want this one no matter what)<br />
* '''ncmpc''' &ndash; NCurses Client (this one is very handy for running in a console) [http://hem.bredband.net/kaw/ncmpc/ Official Website of ncmpc]<br />
* '''ncmpcpp''' &ndash; Clone of ncmpc with some new features written in C++ [http://unkart.ovh.org/ncmpcpp/ Official website of ncmpcpp]<br />
* '''ario''' &ndash; GTK+ Client with a Rhythmbox like library browser [http://ario-player.sourceforge.net Official Website of Ario]<br />
* '''sonata''' &ndash; Python GTK+ Client [http://sonata.berlios.de/ Official Website of Sonata]<br />
* '''gmpc''' &ndash; GNOME Client [http://gmpcwiki.sarine.nl/index.php?title=GMPC Official Website of gmpc]<br />
<br />
<br />
Install with:<br />
# pacman -Sy mpc<br />
# pacman -Sy ncmpc<br />
# pacman -Sy ncmpcpp<br />
# pacman -Sy ario<br />
# pacman -Sy sonata<br />
# pacman -Sy gmpc<br />
<br />
==Extra stuff==<br />
<br />
===Last.fm scrobbling===<br />
<br />
To scrobble your songs to [http://www.last.fm Last.fm] using MPD there are several alternatives.<br />
<br />
====mpdscribble====<br />
mpdscribble is another daemon, but is only available in the [http://aur.archlinux.org/packages.php?ID=22274 AUR]. This is arguably the best alternative, because it's the semi-official MPD scrobbler and uses the new "idle" feature in MPD for more accurate scrobbling. Also, you don't need root access to configure it, because it doesn't need any changes to <tt>/etc</tt> at all. Visit [http://mpd.wikia.com/wiki/Client:Mpdscribble the official website] for more information.<br />
<br />
To install mpdscribble, just install it from the AUR and do the following (not as root):<br />
<br />
* {{Codeline|$ mkdir ~/.mpdscribble}}<br />
* Create the file {{Filename|~/.mpdscribble/mpdscribble.conf}} and add the following:<br />
username = <your last.fm username><br />
password = <md5 sum of your last.fm password> # Generated using "echo -n password | md5sum"<br />
host = <your mpd host> # defaults to $MPD_HOST or localhost<br />
port = <your mpd port> # defaults to $MPD_PORT or 6600<br />
log = ~/.mpdscribble/mpdscribble.log<br />
cache = ~/.mpdscribble/mpdscribble.cache<br />
verbose = 2<br />
sleep = 1<br />
musicdir = <your music directory><br />
* Add {{Codeline|mpdscribble}} to your {{Filename|~/.xinitrc}}.<br />
<br />
====Sonata====<br />
The easiest way, if you don't care about having to have a program window open all the time, is using Sonata which is a graphical frontend to MPD. It has built-in support for Last.fm scrobbling in its preferences. The downside of this is that Sonata doesn't cache your songs if for some reason you don't happen to have an Internet connection at the time of playing.<br />
<br />
====lastfmsubmitd====<br />
lastfmsubmitd is a daemon which is available in the "community" repository. To install it, first edit {{Filename|/etc/lastfmsubmitd.conf}} and add both {{Codeline|lastfmsubmitd}} and {{Codeline|lastmp}} to the {{Codeline|DAEMONS}} array in {{Filename|/etc/rc.conf}}.<br />
<br />
===Last.fm playback with lastfmproxy===<br />
lastfmproxy is a python script that streams a last.fm music stream to another media player. To setup, install from AUR: {{Codeline|yaourt -S lastfmproxy}} and then edit {{Filename|/usr/share/lastfmproxy/config.py}}. If you plan to only stream to mpd on the same host, just edit the login info.<br />
<br />
{{Note | Since it installs to a read only directory but it requires read/write access for features like saving previously listened to stations, it would be wise to copy {{Filename|/usr/share/lastfmproxy}} to your home directory.}}<br />
<br />
Start lastfmproxy with {{Codeline|lastfmproxy}} and visit http://localhost:1881/ in your web browser. To add a last.fm station navigate to http://localhost:1881/ followed by the lastfm:// url. Example: http://localhost:1881/lastfm://globaltags/punk . Navigate back to http://localhost:1881/ and download the m3u file by selecting the ''Start Listening'' link. Simply add it to your music library path.<br />
<br />
=== Never play on start ===<br />
If you don't want mpd to always play on your system start, but yet you want to preserve the other state information, add the following lines to your {{Filename|/etc/rc.d/mpd}} file:<br />
'' ...''<br />
'' stat_busy "Starting Music Player Daemon"''<br />
<br />
# always start in paused state<br />
awk '/^state_file[ \t]+"[^"]+"$/ {<br />
match($0, "\".+\"")<br />
sfile = substr($0, RSTART + 1, RLENGTH - 2)<br />
} /^user[ \t]+"[^"]+"$/ {<br />
match($0, "\".+\"")<br />
user = substr($0, RSTART + 1, RLENGTH - 2)<br />
} END {<br />
if (sfile == "")<br />
exit;<br />
if (user != "")<br />
sub(/^~/, "/home/" user, sfile)<br />
system("sed -i \x27s|^\\(state:[ \\t]\\{1,\\}\\)play$|\\1pause|\x27 \x27" sfile "\x27")<br />
}' /etc/mpd.conf<br />
<br />
'' /usr/bin/mpd /etc/mpd.conf &> /dev/null''<br />
'' ...''<br />
<br />
This will change the player status to "paused", if it was stopped while playing. Next, you want this file to be preserved, so mpd updates won't erase this edit. Add (or edit) this line to your {{Filename|/etc/pacman.conf}}:<br />
NoUpgrade = etc/rc.d/mpd<br />
<br />
=== MPD & Alsa ===<br />
<br />
Sometimes, when you use other audio output, e.g: some web pages containing Flash applets, mpd cannot reproduce anything anymore (until you restart). The error looks something like: (if you search the file {{Filename|/var/log/mpd/mpd.error}})<br />
<br />
Error opening alsa device "hw:0,0": Device or resource busy<br />
<br />
And here is the solution (dmix saving our life again). Apply these lines in your {{Filename|/etc/mpd.conf}}:<br />
<br />
<pre><br />
audio_output {<br />
type "alsa"<br />
name "Sound Card"<br />
options "dev=dmixer"<br />
device "plug:dmix"<br />
}<br />
</pre><br />
<br />
And then restart with {{Codeline|/etc/rc.d/mpd restart}}.<br />
<br />
Searching on Internet I found the reason for why that happens in Gentoo's wiki:<br />
* The sound card does not support hardware mixing (uses '''dmix''' plugin)<br />
* An application does not work with ALSA with it's default settings<br />
<br />
====High CPU usage with ALSA====<br />
When using MPD with ALSA, users may experience MPD taking up lots of CPU (around 20-30%). This is caused by most sound cards supporting 48kHz and most music being 44kHz, thus forcing MPD to resample it. This operation takes lots of CPU cycles and results into high usage.<br />
<br />
For most users the problem should be solved by telling MPD not to use resampling by adding {{Codeline|auto_resample "no"}} into audio_output-part of {{Filename|/etc/mpd.conf}}.<br />
<br />
Example from {{Filename|mpd.conf}}:<br />
<br />
audio_output {<br />
type "alsa"<br />
name "My ALSA Device"<br />
auto_resample "no"<br />
}<br />
<br />
Some users might also want to tell dmix to use 44kHz as well. More info about tuning performance of your MPD can be found from: [http://mpd.wikia.com/wiki/Tuning MPD wiki]<br />
<br />
=== Control mpd with lirc ===<br />
There are already some clients designe for communications between lircd and mpd, however, as far as the practical use, they aren't very useful since their functions are limited.<br />
<br />
It's recommended to use mpc with irexec. mpc is a command line player which only sends the command to mpd and exits immediately, which is perfect for irexec, the command runner included in lirc. What irexec does is that it runs a specified command once received a remote control button.<br />
<br />
First of all, please setup your remotes as referred to the '''[[Lirc]]''' article.<br />
<br />
Edit your favored lirc startup configuration file, default location is {{Filename|~/.lircrc}}.<br />
<br />
Fill the file with the following pattern:<br />
<br />
begin<br />
prog = irexec<br />
button = <button_name><br />
config = <command_to_run><br />
repeat = <0 or 1><br />
end<br />
<br />
An useful example:<br />
<br />
## irexec<br />
begin<br />
prog = irexec<br />
button = play_pause<br />
config = mpc toggle<br />
repeat = 0<br />
end<br />
<br />
begin<br />
prog = irexec<br />
button = stop<br />
config = mpc stop<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = previous<br />
config = mpc prev<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = next<br />
config = mpc next<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = volup<br />
config = mpc volume +2<br />
repeat = 1<br />
end<br />
begin<br />
prog = irexec<br />
button = voldown<br />
config = mpc volume -2<br />
repeat = 1<br />
end<br />
begin<br />
prog = irexec<br />
button = pbc<br />
config = mpc random<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = pdvd<br />
config = mpc update<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = right<br />
config = mpc seek +00:00:05<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = left<br />
config = mpc seek -00:00:05<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = up<br />
config = mpc seek +1%<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = down<br />
config = mpc seek -1%<br />
repeat = 0<br />
end<br />
<br />
There are more functions for mpc, run {{Codeline|man mpc}} for more info.<br />
<br />
==External links==<br />
<br />
* [http://www.musicpd.org/ Official Web Site]<br />
* [http://mpd.wikia.com/wiki/Main_Page Official Wiki]<br />
* [http://mpd.wikia.com/wiki/Clients Sorted List of MPD Clients]<br />
* [http://www.musicpd.org/forum/ MPD forum]</div>
Iphitus
https://wiki.archlinux.org/index.php?title=ASUS_Eee_PC_1000HE&diff=70184
ASUS Eee PC 1000HE
2009-06-08T01:09:01Z
<p>Iphitus: /* ACPI */</p>
<hr />
<div>[[Category:Getting and installing Arch (English)]]<br />
[[Category:HOWTOs (English)]]<br />
[[Category:Laptops (English)]]<br />
{| style="float:right; border: 1px solid #000;" <br />
| '''Device''' || '''Status''' || '''Modules'''<br />
|- <br />
| Intel 945GM || style="color:green" | '''Working''' || xf86-video-intel <br />
|- <br />
| Ethernet || style="color:green" | '''Working''' || atl1e<br />
|-<br />
| Wireless || style="color:green" | '''Working''' || ath9k or rt2860sta<br />
|-<br />
| Bluetooth || style="color:green" | '''Working''' || btusb<br />
|-<br />
| Audio || style="color:green" | '''Working''' || snd_hda_intel<br />
|-<br />
| Camera || style="color:green" | '''Working''' || uvcvideo <br />
|-<br />
| Card Reader || style="color:green" | '''Working''' || <br />
|-<br />
| Function Keys || style="color:green" | '''Working''' || <br />
|}<br />
<br />
=Introduction=<br />
First, feel free to help out!<br />
<br />
Secondly, this wiki page assumes you are using kernel 2.6.29 or greater.<br />
<br />
The stock 2.6.29 kernel works just fine. There is no need for a customized eeePC kernel. These customized kernels used to contain patches to allow the hotkeys and whatnot to work. All of these features have since been merged into the standard kernel.<br />
<br />
=Installation=<br />
Use the 2009.02 installation USB image (see [[Install_from_USB_stick]]). There is out-of-the-box support for the wired and wireless NICs. There are no special instructions for installation. For an in-depth guide on the installation see the [[Beginners_Guide]].<br />
<br />
=Xorg=<br />
This example uses hotplugging. Make sure that you have hal installed and started. Also, don't forget to add hal to the DAEMONS=() array in rc.conf!<br />
<br />
==Sample Config==<br />
Note: The 1000HE also functions correctly without using a xorg.conf!<br />
<br />
Here is a basic xorg config file. Using xrandr, you can switch between the lcd + external display.<br />
Section "ServerLayout"<br />
Identifier "X.org Configured"<br />
Screen 0 "Screen0"<br />
EndSection<br />
<br />
Section "ServerFlags"<br />
Option "DontZap" "false"<br />
EndSection<br />
<br />
Section "Files"<br />
ModulePath "/usr/lib/xorg/modules"<br />
FontPath "/usr/share/fonts/local"<br />
FontPath "/usr/share/fonts/misc"<br />
FontPath "/usr/share/fonts/100dpi:unscaled"<br />
FontPath "/usr/share/fonts/75dpi:unscaled"<br />
FontPath "/usr/share/fonts/TTF"<br />
FontPath "/usr/share/fonts/Type1"<br />
EndSection<br />
<br />
Section "Module"<br />
Load "dri"<br />
Load "glx"<br />
Load "extmod"<br />
Load "record"<br />
Load "dbe"<br />
Load "dri2"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "IntelCard"<br />
Driver "intel"<br />
VendorName "Intel Corporation"<br />
BoardName "Mobile 945GME Express Integrated Graphics Controller"<br />
BusID "PCI:0:2:0"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "ASUS"<br />
ModelName "eeePC 1000he"<br />
Modeline "1024x600" 48.86 1024 1064 1168 1312 600 601 604 622 -Hsync +Vsync<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "IntelCard"<br />
Monitor "Monitor0"<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 1<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 4<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 8<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 15<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 16<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Virtual 1280 1024 #Set to resolution of CRT/External<br />
EndSubSection<br />
EndSection<br />
<br />
==DPI Settings==<br />
In general the autodetected DPI does not fit the smaller resolution very well at all. A good comfortable setting would be 96dpi or 75dpi if you like your fonts really small. An easy way to set your DPI would be to add this to the end of your xserverrc (located in /etc/X11/xinit/).<br />
<br />
exec /usr/bin/X -nolisten tcp '''-dpi 96'''<br />
<br />
==Graphic Performance==<br />
With X.org's new 2D acceleration architecture, EXA, users of the intel driver may experience slowdown with window redrawing and scrolling. A possible solution to this is to override intel's default 2D acceleration, XXA, with the new X.org acceleration. Add this section to the device section of your xorg.conf.<br />
<br />
Option "AccelMethod" "exa" <br />
Option "MigrationHeuristic" "greedy"<br />
<br />
In addition to improving 2D graphics, the card's 3D performance can be [https://bugs.launchpad.net/xserver-xorg-video-intel/+bug/195843 greatly enhanced] by adding this line to your /etc/profile.<br />
<br />
export INTEL_BATCH=1<br />
<br />
See [[Intel_Graphics|Intel Graphics]] for more information.<br />
<br />
==Keyboard==<br />
#Copy /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi to /etc/hal/fdi/policy<br />
#Edit /etc/hal/fdi/policy/10-keymap.fdi and change '''<merge key="input.xkb.layout" type="string">us</merge>''' accordingly<br />
<br />
==Touchpad==<br />
#Install the xf86-input-synaptics package<br />
#Create /etc/hal/fdi/policy/11-x11-synaptics.fdi with the following contents:<br />
<?xml version="1.0" encoding="ISO-8859-1"?><br />
<deviceinfo version="0.2"><br />
<device><br />
<match key="info.product" contains="ETPS/2 Elantech Touchpad"><br />
<merge key="input.x11_driver" type="string">synaptics</merge><br />
<merge key="input.x11_options.SHMConfig" type="string">on</merge><br />
<merge key="input.x11_options.MaxSpeed" type="string">1.00</merge><br />
<merge key="input.x11_options.MinSpeed" type="string">0.75</merge><br />
<merge key="input.x11_options.Emulate3Buttons" type="string">on</merge><br />
<merge key="input.x11_options.VertTwoFingerScroll" type="string">1</merge><br />
<merge key="input.x11_options.HorizTwoFingerScroll" type="string">1</merge><br />
<merge key="input.x11_options.TapButton1" type="string">1</merge><br />
<merge key="input.x11_options.TapButton2" type="string">2</merge><br />
<merge key="input.x11_options.TapButton3" type="string">3</merge><br />
<merge key="input.x11_options.LockedDrags" type="string">1</merge><br />
</match><br />
</device><br />
</deviceinfo><br />
<br />
==xrandr==<br />
For a nice GUI tool, try '''lxrandr'''; it is very simple to use!<br />
<br />
Switch to External Monitor:<br />
xrandr --output LVDS --off --output VGA --auto<br />
<br />
Switch back to eeepc's LCD: <br />
xrandr --output LVDS --auto --output VGA --off<br />
<br />
=ACPI=<br />
<br />
=ACPI=<br />
<br />
==laptop-mode-tools==<br />
I got the best powersaving from a combination of laptop-mode-tools.<br />
<br />
* Use laptop-mode to control all power saving features. Enable bluetooth.conf, cpufreq.conf, hal-polling.conf, intel-hda-powersave.conf, usb-autosuspend.conf, lcd-brightness.conf<br />
** For lcd-brightness, use the following options. Adjust your max/min brightness as suits you. The maximums are located in the same directory as the control file.<br />
BATT_BRIGHTNESS_COMMAND="echo 3"<br />
LM_AC_BRIGHTNESS_COMMAND="echo 15"<br />
NOLM_AC_BRIGHTNESS_COMMAND="echo 15"<br />
BRIGHTNESS_OUTPUT="/sys/devices/virtual/backlight/eeepc/brightness"<br />
** The intel-hda-powersave has a side-effect. Short sounds such as IM notifications may not come through, or will be messed up as it starts playing the sound before the sound card wakes up.<br />
<br />
* The rt2860sta wireless has pretty good powersaving, but it's a tradeoff between throughput<->power usage. Minimum power usage gives a pretty low throughput of ~11KB/s when I would normally get >1MB/s.<br />
iwpriv ra0 set PSMode=MAX_PSP<br />
** MAX_PSP - maximum power saving<br />
** CAM - seems to be normal<br />
** FAST_PSP - ? untested, probably a medium value.<br />
<br />
* The eeepc "Super Hybrid Engine" as it's known under windows has a significant effect on powersaving. This underclocks the FSB for powersave/overclocks for performance and can be controlled via /sys/devices/platform/eeepc/cpufv which is provided by eeepc_laptop. The following is a laptop-mode configuration for it that controls it automatically.<br />
<br />
<pre><br />
#! /bin/sh<br />
<br />
if [ x$SUPERHE_CONTROL_FILE = x ]; then<br />
SUPERHE_CONTROL_FILE=/sys/devices/platform/eeepc/cpufv<br />
fi<br />
<br />
if [ x$CONTROL_SUPERHE = x1 ]; then<br />
if [ $ON_AC -eq 1 ]; then<br />
if [ $ACTIVATE -eq 1 ]; then<br />
SUPERHE_VALUE="$LM_AC_SUPERHE"<br />
else<br />
SUPERHE_VALUE="$NOLM_AC_SUPERHE"<br />
fi<br />
else<br />
SUPERHE_VALUE="$BATT_SUPERHE"<br />
fi<br />
echo $SUPERHE_VALUE > $SUPERHE_CONTROL_FILE<br />
fi<br />
</pre><br />
<pre><br />
#<br />
# Configuration file for Laptop Mode Tools module eee-superhe<br />
#<br />
# For more information, consult the laptop-mode.conf(8) manual page.<br />
#<br />
<br />
# Control FSB speed. Requires eeepc_laptop kernel module loaded.<br />
CONTROL_SUPERHE=1<br />
<br />
# 2 is powersave<br />
# 1 is normal<br />
# 0 is performance<br />
<br />
BATT_SUPERHE=2<br />
LM_AC_SUPERHE=0<br />
NOLM_AC_SUPERHE=0<br />
<br />
# If your system has the control file located at another point<br />
# configure it here<br />
# SUPERHE_CONTROL_FILE=<br />
</pre><br />
<br />
==acpi-eeepc-generic==<br />
Install the [http://aur.archlinux.org/packages.php?ID=23318 acpi-eeepc-generic package] from AUR (see [[AUR User Guidelines]]).<br />
You must install version 0.9 or greater, as previous versions do not have support for the 1000HE.<br />
<br />
==Sleep==<br />
Use '''pm-suspend''' instead of the script in acpi-eeepc-generic.<br />
The acpi-eeepc-generic suspend script will cause the system to<br />
re-suspend when being woken up or when exiting X!<br />
<br />
To substitute '''pm-suspend''' for the acpi sleep script, edit<br />
/etc/conf.d/acpi-eeepc-generic.conf and comment out the line that<br />
reads:<br />
<br />
COMMANDS_SLEEP=("/etc/acpi/eeepc/acpi-eeepc-generic-suspend2ram.sh")<br />
<br />
Replace it with:<br />
<br />
COMMANDS_SLEEP=("/usr/sbin/pm-suspend")<br />
<br />
==cpufrequtils==<br />
To scale the CPU and possibly save a bit of power, you will want to set up cpufrequtils.<br />
<br />
#pacman -Sy cpufrequtils<br />
#Edit /etc/conf.d/cpufreq <pre>min_freq="1000MHz" max_freq="1.67GHz"</pre> (or 1.60GHz if you have the Atom N270)<br />
#modprobe acpi-cpufreq cpufreq_ondemand cpufreq_powersave<br />
#Add these modules listed above to the MODULES=() array in rc.conf<br />
#/etc/rc.d/cpufreq start<br />
#Add cpufreq to the DAEMONS=() array in rc.conf<br />
<br />
=Hardware=<br />
==WiFi==<br />
WiFi should work out of the box with the stock kernel, but if you do have trouble, try upgrading the rt2860sta module by installing [http://aur.archlinux.org/packages.php?ID=14557 the rt2860 package].<br />
<br />
If you still have difficulties associating with some networks, try installing the '''RT2860STA.DAT''' file into /etc/Wireless/RT2860STA/RT2860STA.DAT. You can find this file in the source tarball in the AUR's '''rt2860''' package.<br />
<br />
==Bluetooth==<br />
To turn the bluetooth radio on/off:<br />
<br />
# enable<br />
$ echo 1 > /sys/class/rfkill/rfkill1/state<br />
# disable<br />
$ echo 0 > /sys/class/rfkill/rfkill1/state<br />
<br />
Install the '''bluez-utils''' and '''bluez-libs''' packages, then <tt>modprobe btusb</tt>.<br />
<br />
''Note: in the test repository '''bluez-utils''' and '''bluez-libs''' are merged into a single package, '''bluez'''.''<br />
<br />
See the Arch Linux [[Bluetooth]] and [[Bluetooth Mouse]] wiki pages for more information about configuring and using Bluetooth devices.<br />
<br />
{{Box Note |'''''Switching the Bluetooth Radio on and off does not work on kernel 2.6.28 or below. You need to use kernel 2.6.29 or greater.'''''}}<br />
<br />
==Camera==<br />
<br />
To enable/disable the camera:<br />
<br />
# enable<br />
echo 1 > /sys/devices/platform/eeepc/camera<br />
# disable<br />
echo 0 > /sys/devices/platform/eeepc/camera<br />
<br />
Make sure that the module <tt>uvcvideo</tt> is loaded<br />
<br />
To record video and take photos, you may use '''cheese''' or the [http://aur.archlinux.org/packages.php?ID=15272 '''wxcam'''] package.<br />
<br />
To simply test the camera, you may use <tt>mplayer</tt>:<br />
<br />
mplayer -fps 15 tv://<br />
<br />
The webcam is reported to work with Skype.<br />
<br />
=Info=<br />
==lspci==<br />
00:00.0 Host bridge: Intel Corporation Mobile 945GME Express Memory Controller Hub (rev 03)<br />
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03)<br />
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)<br />
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)<br />
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)<br />
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)<br />
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)<br />
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)<br />
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)<br />
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)<br />
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)<br />
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)<br />
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)<br />
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)<br />
01:00.0 Network controller: Atheros Communications Inc. AR928X Wireless Network Adapter (PCI-Express) (rev 01)<br />
03:00.0 Ethernet controller: Attansic Technology Corp. L1e Gigabit Ethernet Adapter (rev b0)<br />
<br />
=Issues=<br />
Laptop suspends while "waking up"<br />
*Use pm-suspend instead of acpi script<br />
<br />
If you have any other issues, make sure you are using kernel 2.6.29 or greater.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Rt2870&diff=70096
Rt2870
2009-06-06T09:55:49Z
<p>Iphitus: </p>
<hr />
<div>[[Category:Communication and network (English)]]<br />
[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
= Introduction =<br />
This entry is to aid you in configuring wireless settings for use with devices built with Ralink's rt2870 chipset. I hope that this entry will encourage further contribution regarding the configuration of ralink drivers.<br />
<br />
{{Box Note | This entry has been (so far) written with Infrastructure mode and WPA authentication in mind. Please contribute any other configurations.}}<br />
<br />
= Installation (kernels from 2.6.29) =<br />
Since 2.6.29 this driver has been included in the kernel<br />
<br />
<br />
= Installation - source =<br />
* Install the Drivers<br />
** Grab the tarball from AUR<br />
*** http://aur.archlinux.org/packages.php?ID=14558<br />
** Extract the Tarball<br />
*** tar xvf rt2870.tar.gz<br />
** Enter the rt2870 directory and build and install the driver; the driver installed will be called rt2870.ko<br />
*** makepkg -i<br />
<br />
* To simplify things, create a modprobe alias by editing /etc/modprobe.conf and entering the following line<br />
alias ra0 rt2860<br />
= Configuration = <br />
This driver is best configured using tools that utilise the standard wireless extensions, such as wpa_supplicant, iwconfig and their frontends.<br />
<br />
Various driver specific options can be configured using iwpriv.<br />
<br />
<br />
= Configuration - File (obsolete) =<br />
This section is to help you with the configuration file used to set the parameters of the device when it is brought up (e.g. ifconfig ra0 up).<br />
* First, go into the src/ directory where you built the package and into the source code's directory. For example<br />
cd ~/AUR/rt2870/src/2008_0925_RT2870_Linux_STA_v1.4.0.0<br />
* Copy the RT2870STA.dat file to /etc/Wireless/RT2870STA (if the directory doesn't exist, create it)<br />
cp RT2870STA.dat /etc/Wirless/RT2870STA<br />
<br />
== Initial Configuration ==<br />
* In this file, the first line must always contain the word Default, so it should be on the first line.<br />
Default<br />
* Change the country/region channel type to the ones that correspond to your network, with the use of integers 0-7: 0 for channels 1 through 11, 1 for channels 1 through 12, 2 for channels 10 and 11 (according to ralink), 3 for channels 10 through 13, 4 for channel 14, 5 for channels 1 through 14, 6 for channels 3 through 9, and 7 for channels 5 through 13.<br />
My configuration<br />
CountryRegion=0<br />
* Add your country code. Valid country codes include the following<br />
AG, AR, AW, AU, AT, BS, BB, BM, BR, BE, BG, CA, KY, CL, CN, CO, CR, CY, CZ, DK, DO, EC, SV, FI, FR, DE, GR, <br />
GU, GT, HT, HN, HK, HU, IS, IN, ID, E, IL, IT, JP, JO, LV, LI, LT, LU, MY, MT, MA, MX, NL, NZ, NO, PE, PT, <br />
PL, RO, RU, SA, CS, SG, SK, SI, ZA, KR, ES, SE, CH, TW, TR, GB, UA, AE, US, VE<br />
My configuration<br />
ConuntryCode=US<br />
* Edit the ssid to your network's ssid using either characters 0-z or 1~32 ascii characters<br />
For example<br />
SSID=mywirelessnetwork<br />
* Change the newtork type to whatever type of network you are using: Infrastructure (as Infra) or Adhoc (as Adhoc)<br />
My configuration<br />
NetworkType=Infra<br />
* Edit the wireless mode using numbers 0 through 10: 0 for legacy 11b/g mixed, 1 for legacy 11B only, 2 for legacy 11A only, 3 for legacy 11a/b/g mixed, 4 for legacy 11G only, 5 for 11ABGN mixed, 6 for 11N only, 7 for 11GN mixed, 8 for 11AN mixed, 9 for 11BGN mixed, and 10 for 11AGN mixed<br />
I use 0<br />
WirelessMode=0<br />
* Edit the channel number. This must correspond to the CountryRegion setting.<br />
My configuration<br />
Channel=10<br />
<br />
== Authentication ==<br />
{{Box Note | Because I use WPA and have not tested WEP configuration, the WEP configuration type explained is just a guess. If you use a rt2870 device with a WEP protected network, then by all-means correct me.}}<br />
<br />
* Set authmode to either Open (for WEP), WPA (WPA with WPA Supplicant), WPA2 (WPA2 with WPA supplicant), WPAPSK, or WPA2PSK. The WPA and WPA2 options should work with netcfg and networkmanager.<br />
I use WPA so,<br />
AuthMode=WPA<br />
* Set the encryption type to either WEP, TKIP, or AES (or None)<br />
I use TKIP, so<br />
EncrypType=TKIP<br />
<br />
=== WPA ===<br />
* If you're using WPA, set your WPAPSK<br />
WPAPSK=mysecretkey<br />
<br />
=== WEP ===<br />
* If you're using WEP, first set the key index using numbers 1 through 4<br />
For example,<br />
DefaultKeyID=1<br />
* Now, set the key type (of your corresponding key index) so it know what kind of key to look for. 0 for hex, 1 for ascii string.<br />
Key1Type=0<br />
* Provide your WEP key according to type, for example<br />
For a string key<br />
Key1Str=mysecretwepkey<br />
For a hex key<br />
Key1=01234<br />
<br />
== Examples ==<br />
Here are some example options for reference. <br />
<br />
RT2870STA.dat<br />
Default<br />
CountryRegion=0<br />
CountryRegionABand=7<br />
CountryCode=US<br />
ChannelGeography=1<br />
SSID=mywirelessnetwork<br />
NetworkType=Infra<br />
WirelessMode=0<br />
Channel=10<br />
BeaconPeriod=100<br />
TxPower=100<br />
BGProtection=0<br />
TxPreamble=1<br />
RTSThreshold=2347<br />
FragThreshold=2346<br />
TxBurst=0<br />
PktAggregate=0<br />
WmmCapable=0<br />
AckPolicy=0;0;0;0<br />
AuthMode=WPA<br />
EncrypType=TKIP<br />
WPAPSK=mysecretkey<br />
DefaultKeyID=1<br />
Key1Type=0<br />
Key1Str=<br />
Key2Type=0<br />
Key2Str=<br />
Key3Type=0<br />
Key3Str=<br />
Key4Type=0<br />
Key4Str=<br />
PSMode=CAM<br />
FastRoaming=0<br />
RoamThreshold=70<br />
APSDCapable=0<br />
APSDAC=0;0;0;0<br />
HT_RDG=1<br />
HT_EXTCHA=0<br />
HT_OpMode=1<br />
HT_MpduDensity=4<br />
HT_BW=1<br />
HT_AutoBA=1<br />
HT_BADecline=0<br />
HT_AMSDU=0<br />
HT_BAWinSize=64<br />
HT_GI=1<br />
HT_MCS=33<br />
HT_MIMOPSMode=3<br />
IEEE80211H=0<br />
TGnWifiTest=0<br />
WirelessEvent=0<br />
CarrierDetect=0<br />
<br />
<br />
And a netcfg profile<br />
<br />
CONNECTION="wireless"<br />
INTERFACE=ra0<br />
SCAN="no"<br />
SECURITY="wpa"<br />
ESSID=mywirelessnetwork<br />
KEY="mysecretkey"<br />
IP="dhcp"<br />
TIMEOUT=20<br />
DHCP_TIMEOUT=30<br />
<br />
No need to set the channel in the netcfg profile since the .dat file took care of it.<br />
<br />
= Troubleshooting =<br />
<br />
===dmesg:Bulk In Failed, CMDTHREAD_RESET_BULK_IN, etc===<br />
Bulk In Failed messages are not so bad, but a problem arises when and if the failed data leads to CMDTHREAD_RESET_BULK_IN which results in the module removing itself (e.g. modprobe -r rt2870sta). <br />
<br />
This probably happened because you created your own RT2870STA.dat file. Go into the rt2870 tarball directory, into the source code directory, and replace the RT2870STA.dat in /etc/Wireless/RT2870STA/ with the preconfigured .dat file in the 2008_0718_RT2870_Linux_STA_v1.3.1.0 directory. From there, set the options that correspond to your network without removing any of the options.<br />
<br />
===rt2870CmdThread is using a lot of CPU===<br />
I don't specifically know why this occurs, but I was able to fix this by connecting the device into one of the usb ports in the back.<br />
<br />
= What next? =<br />
<br />
Insert the device and try connecting. See the [http://wiki.archlinux.org/index.php/Wireless_Setup#Part_II:_Wireless_Management Wireless Management] section of [[Wireless_Setup]] for details on connection methods.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Network_configuration/Wireless&diff=70095
Network configuration/Wireless
2009-06-06T09:53:46Z
<p>Iphitus: duplicate of manual configuration later in the page.</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|Español|Wireless_Setup_(Español)}}<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_entry|Türkçe|Kablosuz Bağlantı}}<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 under the '''base-devel''' category. (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 the Linux kernel supports your hardware. You can find your card with 'lspci | grep -i net'. The [https://help.ubuntu.com/community/WifiDocs/WirelessCardsSupported Ubuntu Wiki] has an extensive list of wireless cards and whether or not they are supported by available linux kernel drivers.<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 />
#*Also, [http://wireless.kernel.org/en/users/Devices this page] has a matrix of supported 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 GNU/Linux (however, this is rarely the case)<br />
<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''. At boot, 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) under the '''base-devel''' category. <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 />
<br />
==Drivers and Firmware==<br />
Methods and procedures for installing drivers for various chipsets are covered below. In addition, certain chipsets require the installation of corresponding ''firmware''. (Also covered below).<br />
<br />
===wlan-ng===<br />
Packages: '''wlan-ng26-utils'''<br />
<br />
This driver support PRISM based cards, which are hard to find now. The PRISM card is an IEEE 802.11 compliant 2.4 GHz DSSS WLAN network interface card that uses the Intersil PRISM chipset for its radio functions and the AMD PCNet-Mobile chip (AM79C930) for its Media Access Controller (MAC) function. The supported adapters can be found from here: http://www.linux-wlan.org/docs/wlan_adapters.html.gz<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 />
See http://www.linux-wlan.org/<br />
<br />
===rt2860 and rt2870===<br />
In kernel since 2.6.29 and requires no extra packages. It can be configured using the standard wpa_supplicant and iwconfig tools.<br />
<br />
It has a wide range of options that can be configured with iwpriv. These are documented in the [http://www.ralinktech.com/ralink/Home/Support/Linux.html source tarballs] available from Ralink<br />
<br />
For rt2870sta, also see [[Rt2870]]<br />
<br />
<br />
===rtl8180===<br />
Realtek rtl8180 PCI/Cardbus 802.11b now fully supported in the kernel. It can be configured using the standard wpa_supplicant and iwconfig tools.<br />
<br />
<br />
===rt2x00===<br />
Unified driver for Ralink chipsets (replaces rt2500,rt61,rt73 etc). In kernel since 2.6.24, some devices require extra firmware. It can be configured using the standard wpa_supplicant and iwconfig tools.<br />
<br />
Some chips require a firmware file, which can be installed as follows, depending on the chipset: <br />
<pre>pacman -S rt2x00-rt71w-fw</pre><br />
<pre>pacman -S rt2x00-rt61-fw</pre><br />
<br />
See the [[Using_the_new_rt2x00_beta_driver|rt2x00 wiki page]].<br />
<br />
===rt2500, rt61, rt73 (obsolete)===<br />
For Ralink's <br />
* PCI/PCMCIA based rt2500 series chipsets.<br />
* PCI/PCMCIA based rt61 series chipsets<br />
* USB based rt73 series chipsets. <br />
<br />
Drivers are now '''obsolete''' and '''unsupported'''. The rt2x00 driver family is stable and to be used instead.<br />
<br />
Support standard iwconfig tools for unencrypted and WEP connections, although it can be quite sensitive to the order of commands.<br />
The driver does support WPA (using hardware encryption), but in a non-standard way. wpa_supplicant 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 />
<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-project.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 />
===ath9k===<br />
<br />
ath9k is Atheros' officially supported driver for the newer 11n chipsets. All of the chips with 11n capabilities are supported, with a maximum throughput around 180 Mbps. To see a complete list of supported hardware, check this [http://wireless.kernel.org/en/users/Drivers/ath9k page].<br />
<br />
Working modes: Station, AP and Adhoc.<br />
<br />
ath9k has been part of the kernel as of 2.6.27. But it has undergone some heavy development, and the changes haven't propagated to the mainline kernel tree yet.<br />
The best solution would be to use the [http://wireless.kernel.org/en/users/Download compat-wireless] package for now.<br />
A [https://lists.ath9k.org/mailman/listinfo/ath9k-devel mailing list] exists for support and development related discussions.<br />
<br />
===ipw2100 and ipw2200===<br />
Fully supported in the kernel, but requires additional firmware. It can be configured using the standard wpa_supplicant and iwconfig tools.<br />
<br />
Depending on which of the chips you have, use either:<br />
<br />
'''ipw2100-fw'''<br />
pacman -S ipw2100-fw<br />
<br />
or:<br />
<br />
'''ipw2200-fw'''<br />
pacman -S ipw2200-fw<br />
<br />
If installing after initial Arch installation, the module may need to be reloaded for the firmware to be loaded.<br />
<br />
To enable radiotap interface:<br />
# rmmod ipw2200<br />
# modprobe ipw2200 rtap_iface=1<br />
<br />
===iwl3945, iwl4965 and iwl5000-series===<br />
<br />
'''I'''ntel's open source '''W'''iFi drivers for '''L'''inux (See [http://intellinuxwireless.org iwlwifi]) will work for both the 3945 and 4965 chipsets since kernel v2.6.24. And iwl5000-series chipsets (including 5100BG, 5100ABG, 5100AGN, 5300AGN and 5350AGN) module has been supported since '''kernel 2.6.27''', by the intree driver '''iwlagn'''.<br />
<br />
{{Box Note | You must install the '''firmware''' that corresponds to your chipset. }}<br />
<br />
# pacman -S iwlwifi-3945-ucode<br />
or:<br />
# pacman -S iwlwifi-4965-ucode<br />
or:<br />
# pacman -S iwlwifi-5000-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 -a''' 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 -a''' 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 />
* By default iwl3945 is configured to only work with networks on channels 1-11. Higher ranges are not allowed in some parts of the world (US). In the EU however channels 12 and 13 are used quite common. To make iwl3945 scan for all channels, add "options cfg80211 ieee80211_regdom=EU" to /etc/modprobe.d/options. With "iwlist f" you can check which channels are allowed.<br />
* If you want to enable more channels on Intel Wifi 5100 (and quite possible other cards too) you can do that with the crda package. After install, edit /etc/conf.d/wireless-regdom and uncomment the line where your country code is found. Add wireless-regdom to your DAEMONS in rc.conf and restart (which is the easiest thing to do). You should now, when writing sudo iwlist wlan0 channel, have access to more channels (depending on your location).<br />
<br />
===ipw3945 (obsolete)===<br />
{{Box Note | ''The ipw3945 driver is no longer actively developed, and the iwlwifi driver (described above) should work perfectly, but may conflict with the former one. So, only one of them should be installed. If you choose to use the iwlwifi driver you still do need the '''ipw3945-ucode''' package though.''}}<br />
# pacman -S ipw3945 ipw3945-ucode ipw3945d<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 />
<br />
Note: Some orinoco chipsets are Hermes I/II. You can use http://aur.archlinux.org/packages.php?ID=9637 to replace the orinoco driver and gain WPA support. See http://ubuntuforums.org/showthread.php?p=2154534#post2154534 for more information.<br />
<br />
To use the driver I blacklisted orinoco_cs in rc.conf (!orinoco_cs in the modules array) and added wlags49_h1_cs to the modules array. Example:<br />
<br />
<pre>MODULES=(!snd_pcsp !eepro100 !orinoco_cs wlags49_h1_cs)</pre><br />
<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 />
If that didn't work, try this:<br />
<br />
*Reload the prism module (modprobe p54usb or modprobe p54pci, depending on your hardware)<br />
alternatively remove your wifi card and then reconnect it<br />
*Use the "dmesg" command, and look at the end of the output it prints out.<br />
Look for a section looking like this: <br />
<br />
firmware: requesting '''isl3887usb_bare'''<br />
p54: LM86 firmware<br />
p54: FW rev 2.5.8.0 - Softmac protocol 3.0<br />
<br />
and try renaming the firmware file to the name corresponding to the part bolded here.<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.<br />
<br />
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 />
For another way to determine which firmware revision number to use, see the [http://acx100.sourceforge.net/wiki/Firmware "Which firmware" section of the acx100.sourceforge wiki page] page. For ACX100, you can follow the links provided there, to a table of card model number vs. "firmware files known to work"; you can figure out the rev. number you need, by looking at the suffix there. E.g. a dlink_dwl650+ uses "1.9.8.b", in which case you'd do this:<br />
ln -s /usr/share/tiacx/acx100_1.9.8.b/* /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 />
'''NOTE:''' The open-source acx driver does not support WPA/RSN encryption. NDISWRAPPER will have to be used with the windows driver to enable the enhanced encryption. See ndiswrapper, this page, for more details.<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 b43-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 />
<br />
Either install the "b43-firmware" package from [http://aur.archlinux.org/packages.php?ID=21690 AUR], or perform the following steps manually.<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.<br />
You may want to add b43 into the modules section of your rc.conf file.<pre>MODULES=(...b43 !bcm43xx !ndiswrapper...)</pre><br />
Good luck!<br />
<br />
===broadcom-wl===<br />
For recent Broadcom 43xx cards not supported by bcm43xx or b43. Not just for 4312 cards. See the [[Broadcom_BCM4312|Broadcom 4312 wiki page]]. It is available in [http://aur.archlinux.org/packages.php?ID=19514 AUR]. These chipsets are used in most Dell laptops, among others.<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 />
--[[User:Willey|Willey]] 22:32, 20 September 2008 (EDT)<br />
<br />
==Test Installation==<br />
After loading your driver run<br />
iwconfig<br />
and see if a wireless interface (wlan''x'', eth''x'', ath''x'') is recognized<br />
<br />
If <code>iwlist scan</code> displays <code>Interface doesn't support scanning</code> then you probably forgot to install the firmware.<br />
<br />
= Part II: Wireless Management =<br />
<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 />
Procedure and tools you’ll need will depend on several factors:<br />
* The '''easiness of configuration management''', from a completely manual setup procedure that you’ll need to repeat at each boot to a software-managed, automatic, autostarting solution<br />
* The '''encryption type''' (or not) that protects the wireless network<br />
* If you need '''network profiles''', i.e. if your computer will frequently change networks (such as a laptop)<br />
<br />
== Management methods ==<br />
<br />
This table shows the different methods that can be used to activate and manage a wireless network connection, depending on the encryption and management types, and the various tools that are required. Although there may be other possibilities, these are the most frequently used:<br />
{| border="1"<br />
! Management || No encryption/WEP || WPA/WPA2 PSK<br />
|-<br />
| Manual, need to repeat at each computer reboot || <code>ifconfig + iwconfig + dhcpcd/ifconfig</code> || <code>ifconfig + iwconfig + wpa_supplicant + dhcpcd/ifconfig</code><br />
|-<br />
| Automatically managed, centralized without network profile support || define interface in <code>/etc/rc.conf</code> || not covered<br />
|-<br />
| Automatically managed, with network profiles support || colspan="2" align="center" | <code>Netcfg, wicd, NetworkManager, etc…</code><br />
|}<br />
<br />
<br />
Whatever your choice, you should try to connect using the manual method first. This will help you understand the different steps that are required and debug them in case a problem arose. Another tip: if possible (e.g. if you admin your wifi access point), try connecting with no encryption, to check everything works. Then try using encryption, either WEP (simpler to configure) or WPA.<br />
<br />
=== Manual setup ===<br />
<br />
The programs provided by the package '''wireless_tools''' are the basic set of tools to set up a wireless network. Moreover, if you use WPA/WPA2 encryption, you will need the package '''wpa_supplicant'''. These powerful userspace console tools work extremely well and allow complete, manual control from the shell.<br />
<br />
These examples assume your wireless device is <code>wlan0</code>. Replace <code>wlan0</code> with the appropriate device name.<br />
{{Box Note | Depending on your hardware and encryption type, some of these steps may not be necessary. Some cards are known to require interface activation and/or access point scanning before being associated to an access point and being given an IP address. Some experimentation may be required. For instance, WPA/WPA2 users may directly try to activate their wireless network from step 3.}}<br />
<br />
1. ''(Optional, may be required)'' Some cards require that the kernel interface be activated before you can use the wireless_tools:<br />
# ifconfig wlan0 up<br />
<br />
2. ''(Optional, may be required)'' See what access points are available:<br />
# iwlist wlan0 scan<br />
We assume you want to use the essid named <code>MyEssid</code>.<br />
<br />
3. Depending on the encryption, you need to associate your wireless device with the access point to use and pass the encryption key.<br />
* ''No encryption''<br />
# iwconfig wlan0 essid "MyEssid"<br />
* ''WEP''<br />
using an hexadecimal key:<br />
# iwconfig wlan0 essid "MyEssid" key 1234567890<br />
using an ascii key:<br />
# iwconfig wlan0 essid "MyEssid" key s:asciikey<br />
* ''WPA/WPA2''<br />
You need to edit the <code>/etc/wpa_supplicant.conf</code> file as described in [[WPA_Supplicant]]. Then, issue this command:<br />
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf<br />
This is assuming your device uses the <code>wext</code> driver. If this does not work, you may need to adjust these options. Check [[WPA_Supplicant]] for more information and troubleshooting.<br />
<br />
4. Finally, provide an IP address to the network interface. 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 />
{{Box Note | Although the manual configuration method will help troubleshoot wireless problems, you will have to retype every command each time you reboot.}}<br />
<br />
=== Automatic connection - Network daemon ===<br />
<br />
{{Box Note | This method and configuration examples are only valid for unencrypted or WEP-encrypted networks, which are particularly unsecure. To use WPA/WPA2, you'll need to use other solutions such as such as '''[[netcfg]]''' or '''[[wicd]]'''. Also, avoid mixing these methods as they may create a conflict and prevent the wireless card from functioning.}}<br />
<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>)'''. The name of the network goes in place of '''MyEssid'''.<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 />
<br />
Not all wireless cards are <code>wlan0</code>. Determine your wireless interface with ifconfig -a. <br />
Atheros-based cards, for example, are typically <code>ath0</code>, so change <code>wlan_wlan0</code> 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 />
{{Box Note | These solutions are limited: for a laptop which is always on the move it would be good to have multiple [[network profiles]] and be able to easily switch from one to another. That's the aim of network managers, such as '''[[netcfg]]'''.}}<br />
<br />
=== Automatic connection - [[Network Profiles|netcfg]] ===<br />
<br />
[[Network Profiles|netcfg]] provides a '''versatile, robust and fast''' solution to networking on Arch.<br />
<br />
It uses a profile based setup and is capable of detection and connection to a wide range of network types. This is no harder than using graphical tools. Following the directions above, you can get a list of wireless networks. Then, as with graphical tools, you will need a password.<br />
<br />
''Detailed documentation [[Network Profiles]]''<br />
<br />
''Notes for developmental version [[Network Profiles development]]''<br />
<br />
<br />
<br />
=== Other network managers ===<br />
<br />
There are a number of wireless management solutions available to Arch Linux users as an alternative to the above.<br />
<br />
====Autowifi====<br />
Autowifi is a daemon that configures your wireless network automatically depending on the ESSID. Once configured, no user interaction is necessary and no GUI tools are required.<br />
<br />
For more information, see the [[Autowifi]] wiki.<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 />
= See Also =<br />
*[[Sharing ppp connection with wlan interface]]<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 />
*[https://lists.anl.gov/mailman/listinfo/wifi-radar Wifi Radar] - Wifi Radar information page<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>
Iphitus
https://wiki.archlinux.org/index.php?title=Network_configuration/Wireless&diff=70094
Network configuration/Wireless
2009-06-06T09:51:16Z
<p>Iphitus: extra detail, add WPA information</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|Español|Wireless_Setup_(Español)}}<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_entry|Türkçe|Kablosuz Bağlantı}}<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 under the '''base-devel''' category. (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 the Linux kernel supports your hardware. You can find your card with 'lspci | grep -i net'. The [https://help.ubuntu.com/community/WifiDocs/WirelessCardsSupported Ubuntu Wiki] has an extensive list of wireless cards and whether or not they are supported by available linux kernel drivers.<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 />
#*Also, [http://wireless.kernel.org/en/users/Devices this page] has a matrix of supported 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 GNU/Linux (however, this is rarely the case)<br />
<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''. At boot, 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) under the '''base-devel''' category. <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 />
<br />
===Wireless Manual Quickstart===<br />
<br />
* Identify your interface and appropriate module:<br />
# hwdetect --show-net<br />
or<br />
# lspci | grep -i net <br />
* Ensure the module is loaded with <code>lsmod | grep <name_or_part_of_name_of_module></code> For example with the ath5k driver:<br />
# lsmod | grep ath<br />
* Ensure the driver has created a usable interface. Identify your drivers interface here, it may be ethX, wlanX, athX, raX (where X is a number) or something else. This quickstart uses ath0 as an example. <br />
# iwconfig<br />
* Bring the interface up with <code>ifconfig <interface> up</code>. <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>(give the essid (the 'network name') of the network in quotes).<br />
For example, if you use a WEP network using a hex key:<br />
# iwconfig ath0 essid "linksys" key 0241baf34c<br />
If your WEP key is ASCII, prefix with <code>s:</code>, e.g.:<br />
# iwconfig ath0 essid linksys key s:mywepkey<br />
If your network uses WPA, try<br />
# wpa_passphrase linksys "some hard to guess passphrase" > myconfig.conf<br />
# wpa_supplicant -B -iath0 -c myconfig.conf <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 />
<br />
Refer to [[#Part II: Wireless Management|Part II]] to ensure a permanent configuration solution for your system.<br />
<br />
==Drivers and Firmware==<br />
Methods and procedures for installing drivers for various chipsets are covered below. In addition, certain chipsets require the installation of corresponding ''firmware''. (Also covered below).<br />
<br />
===wlan-ng===<br />
Packages: '''wlan-ng26-utils'''<br />
<br />
This driver support PRISM based cards, which are hard to find now. The PRISM card is an IEEE 802.11 compliant 2.4 GHz DSSS WLAN network interface card that uses the Intersil PRISM chipset for its radio functions and the AMD PCNet-Mobile chip (AM79C930) for its Media Access Controller (MAC) function. The supported adapters can be found from here: http://www.linux-wlan.org/docs/wlan_adapters.html.gz<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 />
See http://www.linux-wlan.org/<br />
<br />
===rt2860 and rt2870===<br />
In kernel since 2.6.29 and requires no extra packages. It can be configured using the standard wpa_supplicant and iwconfig tools.<br />
<br />
It has a wide range of options that can be configured with iwpriv. These are documented in the [http://www.ralinktech.com/ralink/Home/Support/Linux.html source tarballs] available from Ralink<br />
<br />
For rt2870sta, also see [[Rt2870]]<br />
<br />
<br />
===rtl8180===<br />
Realtek rtl8180 PCI/Cardbus 802.11b now fully supported in the kernel. It can be configured using the standard wpa_supplicant and iwconfig tools.<br />
<br />
<br />
===rt2x00===<br />
Unified driver for Ralink chipsets (replaces rt2500,rt61,rt73 etc). In kernel since 2.6.24, some devices require extra firmware. It can be configured using the standard wpa_supplicant and iwconfig tools.<br />
<br />
Some chips require a firmware file, which can be installed as follows, depending on the chipset: <br />
<pre>pacman -S rt2x00-rt71w-fw</pre><br />
<pre>pacman -S rt2x00-rt61-fw</pre><br />
<br />
See the [[Using_the_new_rt2x00_beta_driver|rt2x00 wiki page]].<br />
<br />
===rt2500, rt61, rt73 (obsolete)===<br />
For Ralink's <br />
* PCI/PCMCIA based rt2500 series chipsets.<br />
* PCI/PCMCIA based rt61 series chipsets<br />
* USB based rt73 series chipsets. <br />
<br />
Drivers are now '''obsolete''' and '''unsupported'''. The rt2x00 driver family is stable and to be used instead.<br />
<br />
Support standard iwconfig tools for unencrypted and WEP connections, although it can be quite sensitive to the order of commands.<br />
The driver does support WPA (using hardware encryption), but in a non-standard way. wpa_supplicant 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 />
<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-project.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 />
===ath9k===<br />
<br />
ath9k is Atheros' officially supported driver for the newer 11n chipsets. All of the chips with 11n capabilities are supported, with a maximum throughput around 180 Mbps. To see a complete list of supported hardware, check this [http://wireless.kernel.org/en/users/Drivers/ath9k page].<br />
<br />
Working modes: Station, AP and Adhoc.<br />
<br />
ath9k has been part of the kernel as of 2.6.27. But it has undergone some heavy development, and the changes haven't propagated to the mainline kernel tree yet.<br />
The best solution would be to use the [http://wireless.kernel.org/en/users/Download compat-wireless] package for now.<br />
A [https://lists.ath9k.org/mailman/listinfo/ath9k-devel mailing list] exists for support and development related discussions.<br />
<br />
===ipw2100 and ipw2200===<br />
Fully supported in the kernel, but requires additional firmware. It can be configured using the standard wpa_supplicant and iwconfig tools.<br />
<br />
Depending on which of the chips you have, use either:<br />
<br />
'''ipw2100-fw'''<br />
pacman -S ipw2100-fw<br />
<br />
or:<br />
<br />
'''ipw2200-fw'''<br />
pacman -S ipw2200-fw<br />
<br />
If installing after initial Arch installation, the module may need to be reloaded for the firmware to be loaded.<br />
<br />
To enable radiotap interface:<br />
# rmmod ipw2200<br />
# modprobe ipw2200 rtap_iface=1<br />
<br />
===iwl3945, iwl4965 and iwl5000-series===<br />
<br />
'''I'''ntel's open source '''W'''iFi drivers for '''L'''inux (See [http://intellinuxwireless.org iwlwifi]) will work for both the 3945 and 4965 chipsets since kernel v2.6.24. And iwl5000-series chipsets (including 5100BG, 5100ABG, 5100AGN, 5300AGN and 5350AGN) module has been supported since '''kernel 2.6.27''', by the intree driver '''iwlagn'''.<br />
<br />
{{Box Note | You must install the '''firmware''' that corresponds to your chipset. }}<br />
<br />
# pacman -S iwlwifi-3945-ucode<br />
or:<br />
# pacman -S iwlwifi-4965-ucode<br />
or:<br />
# pacman -S iwlwifi-5000-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 -a''' 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 -a''' 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 />
* By default iwl3945 is configured to only work with networks on channels 1-11. Higher ranges are not allowed in some parts of the world (US). In the EU however channels 12 and 13 are used quite common. To make iwl3945 scan for all channels, add "options cfg80211 ieee80211_regdom=EU" to /etc/modprobe.d/options. With "iwlist f" you can check which channels are allowed.<br />
* If you want to enable more channels on Intel Wifi 5100 (and quite possible other cards too) you can do that with the crda package. After install, edit /etc/conf.d/wireless-regdom and uncomment the line where your country code is found. Add wireless-regdom to your DAEMONS in rc.conf and restart (which is the easiest thing to do). You should now, when writing sudo iwlist wlan0 channel, have access to more channels (depending on your location).<br />
<br />
===ipw3945 (obsolete)===<br />
{{Box Note | ''The ipw3945 driver is no longer actively developed, and the iwlwifi driver (described above) should work perfectly, but may conflict with the former one. So, only one of them should be installed. If you choose to use the iwlwifi driver you still do need the '''ipw3945-ucode''' package though.''}}<br />
# pacman -S ipw3945 ipw3945-ucode ipw3945d<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 />
<br />
Note: Some orinoco chipsets are Hermes I/II. You can use http://aur.archlinux.org/packages.php?ID=9637 to replace the orinoco driver and gain WPA support. See http://ubuntuforums.org/showthread.php?p=2154534#post2154534 for more information.<br />
<br />
To use the driver I blacklisted orinoco_cs in rc.conf (!orinoco_cs in the modules array) and added wlags49_h1_cs to the modules array. Example:<br />
<br />
<pre>MODULES=(!snd_pcsp !eepro100 !orinoco_cs wlags49_h1_cs)</pre><br />
<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 />
If that didn't work, try this:<br />
<br />
*Reload the prism module (modprobe p54usb or modprobe p54pci, depending on your hardware)<br />
alternatively remove your wifi card and then reconnect it<br />
*Use the "dmesg" command, and look at the end of the output it prints out.<br />
Look for a section looking like this: <br />
<br />
firmware: requesting '''isl3887usb_bare'''<br />
p54: LM86 firmware<br />
p54: FW rev 2.5.8.0 - Softmac protocol 3.0<br />
<br />
and try renaming the firmware file to the name corresponding to the part bolded here.<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.<br />
<br />
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 />
For another way to determine which firmware revision number to use, see the [http://acx100.sourceforge.net/wiki/Firmware "Which firmware" section of the acx100.sourceforge wiki page] page. For ACX100, you can follow the links provided there, to a table of card model number vs. "firmware files known to work"; you can figure out the rev. number you need, by looking at the suffix there. E.g. a dlink_dwl650+ uses "1.9.8.b", in which case you'd do this:<br />
ln -s /usr/share/tiacx/acx100_1.9.8.b/* /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 />
'''NOTE:''' The open-source acx driver does not support WPA/RSN encryption. NDISWRAPPER will have to be used with the windows driver to enable the enhanced encryption. See ndiswrapper, this page, for more details.<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 b43-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 />
<br />
Either install the "b43-firmware" package from [http://aur.archlinux.org/packages.php?ID=21690 AUR], or perform the following steps manually.<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.<br />
You may want to add b43 into the modules section of your rc.conf file.<pre>MODULES=(...b43 !bcm43xx !ndiswrapper...)</pre><br />
Good luck!<br />
<br />
===broadcom-wl===<br />
For recent Broadcom 43xx cards not supported by bcm43xx or b43. Not just for 4312 cards. See the [[Broadcom_BCM4312|Broadcom 4312 wiki page]]. It is available in [http://aur.archlinux.org/packages.php?ID=19514 AUR]. These chipsets are used in most Dell laptops, among others.<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 />
--[[User:Willey|Willey]] 22:32, 20 September 2008 (EDT)<br />
<br />
==Test Installation==<br />
After loading your driver run<br />
iwconfig<br />
and see if a wireless interface (wlan''x'', eth''x'', ath''x'') is recognized<br />
<br />
If <code>iwlist scan</code> displays <code>Interface doesn't support scanning</code> then you probably forgot to install the firmware.<br />
<br />
= Part II: Wireless Management =<br />
<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 />
Procedure and tools you’ll need will depend on several factors:<br />
* The '''easiness of configuration management''', from a completely manual setup procedure that you’ll need to repeat at each boot to a software-managed, automatic, autostarting solution<br />
* The '''encryption type''' (or not) that protects the wireless network<br />
* If you need '''network profiles''', i.e. if your computer will frequently change networks (such as a laptop)<br />
<br />
== Management methods ==<br />
<br />
This table shows the different methods that can be used to activate and manage a wireless network connection, depending on the encryption and management types, and the various tools that are required. Although there may be other possibilities, these are the most frequently used:<br />
{| border="1"<br />
! Management || No encryption/WEP || WPA/WPA2 PSK<br />
|-<br />
| Manual, need to repeat at each computer reboot || <code>ifconfig + iwconfig + dhcpcd/ifconfig</code> || <code>ifconfig + iwconfig + wpa_supplicant + dhcpcd/ifconfig</code><br />
|-<br />
| Automatically managed, centralized without network profile support || define interface in <code>/etc/rc.conf</code> || not covered<br />
|-<br />
| Automatically managed, with network profiles support || colspan="2" align="center" | <code>Netcfg, wicd, NetworkManager, etc…</code><br />
|}<br />
<br />
<br />
Whatever your choice, you should try to connect using the manual method first. This will help you understand the different steps that are required and debug them in case a problem arose. Another tip: if possible (e.g. if you admin your wifi access point), try connecting with no encryption, to check everything works. Then try using encryption, either WEP (simpler to configure) or WPA.<br />
<br />
=== Manual setup ===<br />
<br />
The programs provided by the package '''wireless_tools''' are the basic set of tools to set up a wireless network. Moreover, if you use WPA/WPA2 encryption, you will need the package '''wpa_supplicant'''. These powerful userspace console tools work extremely well and allow complete, manual control from the shell.<br />
<br />
These examples assume your wireless device is <code>wlan0</code>. Replace <code>wlan0</code> with the appropriate device name.<br />
{{Box Note | Depending on your hardware and encryption type, some of these steps may not be necessary. Some cards are known to require interface activation and/or access point scanning before being associated to an access point and being given an IP address. Some experimentation may be required. For instance, WPA/WPA2 users may directly try to activate their wireless network from step 3.}}<br />
<br />
1. ''(Optional, may be required)'' Some cards require that the kernel interface be activated before you can use the wireless_tools:<br />
# ifconfig wlan0 up<br />
<br />
2. ''(Optional, may be required)'' See what access points are available:<br />
# iwlist wlan0 scan<br />
We assume you want to use the essid named <code>MyEssid</code>.<br />
<br />
3. Depending on the encryption, you need to associate your wireless device with the access point to use and pass the encryption key.<br />
* ''No encryption''<br />
# iwconfig wlan0 essid "MyEssid"<br />
* ''WEP''<br />
using an hexadecimal key:<br />
# iwconfig wlan0 essid "MyEssid" key 1234567890<br />
using an ascii key:<br />
# iwconfig wlan0 essid "MyEssid" key s:asciikey<br />
* ''WPA/WPA2''<br />
You need to edit the <code>/etc/wpa_supplicant.conf</code> file as described in [[WPA_Supplicant]]. Then, issue this command:<br />
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf<br />
This is assuming your device uses the <code>wext</code> driver. If this does not work, you may need to adjust these options. Check [[WPA_Supplicant]] for more information and troubleshooting.<br />
<br />
4. Finally, provide an IP address to the network interface. 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 />
{{Box Note | Although the manual configuration method will help troubleshoot wireless problems, you will have to retype every command each time you reboot.}}<br />
<br />
=== Automatic connection - Network daemon ===<br />
<br />
{{Box Note | This method and configuration examples are only valid for unencrypted or WEP-encrypted networks, which are particularly unsecure. To use WPA/WPA2, you'll need to use other solutions such as such as '''[[netcfg]]''' or '''[[wicd]]'''. Also, avoid mixing these methods as they may create a conflict and prevent the wireless card from functioning.}}<br />
<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>)'''. The name of the network goes in place of '''MyEssid'''.<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 />
<br />
Not all wireless cards are <code>wlan0</code>. Determine your wireless interface with ifconfig -a. <br />
Atheros-based cards, for example, are typically <code>ath0</code>, so change <code>wlan_wlan0</code> 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 />
{{Box Note | These solutions are limited: for a laptop which is always on the move it would be good to have multiple [[network profiles]] and be able to easily switch from one to another. That's the aim of network managers, such as '''[[netcfg]]'''.}}<br />
<br />
=== Automatic connection - [[Network Profiles|netcfg]] ===<br />
<br />
[[Network Profiles|netcfg]] provides a '''versatile, robust and fast''' solution to networking on Arch.<br />
<br />
It uses a profile based setup and is capable of detection and connection to a wide range of network types. This is no harder than using graphical tools. Following the directions above, you can get a list of wireless networks. Then, as with graphical tools, you will need a password.<br />
<br />
''Detailed documentation [[Network Profiles]]''<br />
<br />
''Notes for developmental version [[Network Profiles development]]''<br />
<br />
<br />
<br />
=== Other network managers ===<br />
<br />
There are a number of wireless management solutions available to Arch Linux users as an alternative to the above.<br />
<br />
====Autowifi====<br />
Autowifi is a daemon that configures your wireless network automatically depending on the ESSID. Once configured, no user interaction is necessary and no GUI tools are required.<br />
<br />
For more information, see the [[Autowifi]] wiki.<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 />
= See Also =<br />
*[[Sharing ppp connection with wlan interface]]<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 />
*[https://lists.anl.gov/mailman/listinfo/wifi-radar Wifi Radar] - Wifi Radar information page<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>
Iphitus
https://wiki.archlinux.org/index.php?title=Network_configuration/Wireless&diff=70093
Network configuration/Wireless
2009-06-06T09:42:03Z
<p>Iphitus: </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|Español|Wireless_Setup_(Español)}}<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_entry|Türkçe|Kablosuz Bağlantı}}<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 under the '''base-devel''' category. (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 the Linux kernel supports your hardware. You can find your card with 'lspci | grep -i net'. The [https://help.ubuntu.com/community/WifiDocs/WirelessCardsSupported Ubuntu Wiki] has an extensive list of wireless cards and whether or not they are supported by available linux kernel drivers.<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 />
#*Also, [http://wireless.kernel.org/en/users/Devices this page] has a matrix of supported 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 GNU/Linux (however, this is rarely the case)<br />
<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''. At boot, 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) under the '''base-devel''' category. <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 />
<br />
===Wireless Quickstart===<br />
The general procedure will be:<br />
<br />
* Identify your interface and appropriate module:<br />
# hwdetect --show-net<br />
or<br />
# lspci | grep -i net <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>(give the essid (the 'network name') of the network in quotes), e.g.:<br />
# iwconfig ath0 essid "linksys" key 0241baf34c<br />
If your WEP key is ASCII, prefix with <code>s:</code>, e.g.:<br />
# iwconfig ath0 essid linksys key s:mywepkey<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 />
If you are using '''WPA''', refer to [[#WPA/WPA2|WPA/WPA2]] below.<br />
<br />
==Drivers and Firmware==<br />
Methods and procedures for installing drivers for various chipsets are covered below. In addition, certain chipsets require the installation of corresponding ''firmware''. (Also covered below).<br />
<br />
===wlan-ng===<br />
Packages: '''wlan-ng26-utils'''<br />
<br />
This driver support PRISM based cards, which are hard to find now. The PRISM card is an IEEE 802.11 compliant 2.4 GHz DSSS WLAN network interface card that uses the Intersil PRISM chipset for its radio functions and the AMD PCNet-Mobile chip (AM79C930) for its Media Access Controller (MAC) function. The supported adapters can be found from here: http://www.linux-wlan.org/docs/wlan_adapters.html.gz<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 />
See http://www.linux-wlan.org/<br />
<br />
===rt2860 and rt2870===<br />
In kernel since 2.6.29 and requires no extra packages. It can be configured using the standard wpa_supplicant and iwconfig tools.<br />
<br />
It has a wide range of options that can be configured with iwpriv. These are documented in the [http://www.ralinktech.com/ralink/Home/Support/Linux.html source tarballs] available from Ralink<br />
<br />
For rt2870sta, also see [[Rt2870]]<br />
<br />
<br />
===rtl8180===<br />
Realtek rtl8180 PCI/Cardbus 802.11b now fully supported in the kernel. It can be configured using the standard wpa_supplicant and iwconfig tools.<br />
<br />
<br />
===rt2x00===<br />
Unified driver for Ralink chipsets (replaces rt2500,rt61,rt73 etc). In kernel since 2.6.24, some devices require extra firmware. It can be configured using the standard wpa_supplicant and iwconfig tools.<br />
<br />
Some chips require a firmware file, which can be installed as follows, depending on the chipset: <br />
<pre>pacman -S rt2x00-rt71w-fw</pre><br />
<pre>pacman -S rt2x00-rt61-fw</pre><br />
<br />
See the [[Using_the_new_rt2x00_beta_driver|rt2x00 wiki page]].<br />
<br />
===rt2500, rt61, rt73 (obsolete)===<br />
For Ralink's <br />
* PCI/PCMCIA based rt2500 series chipsets.<br />
* PCI/PCMCIA based rt61 series chipsets<br />
* USB based rt73 series chipsets. <br />
<br />
Drivers are now '''obsolete''' and '''unsupported'''. The rt2x00 driver family is stable and to be used instead.<br />
<br />
Support standard iwconfig tools for unencrypted and WEP connections, although it can be quite sensitive to the order of commands.<br />
The driver does support WPA (using hardware encryption), but in a non-standard way. wpa_supplicant 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 />
<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-project.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 />
===ath9k===<br />
<br />
ath9k is Atheros' officially supported driver for the newer 11n chipsets. All of the chips with 11n capabilities are supported, with a maximum throughput around 180 Mbps. To see a complete list of supported hardware, check this [http://wireless.kernel.org/en/users/Drivers/ath9k page].<br />
<br />
Working modes: Station, AP and Adhoc.<br />
<br />
ath9k has been part of the kernel as of 2.6.27. But it has undergone some heavy development, and the changes haven't propagated to the mainline kernel tree yet.<br />
The best solution would be to use the [http://wireless.kernel.org/en/users/Download compat-wireless] package for now.<br />
A [https://lists.ath9k.org/mailman/listinfo/ath9k-devel mailing list] exists for support and development related discussions.<br />
<br />
===ipw2100 and ipw2200===<br />
Fully supported in the kernel, but requires additional firmware. It can be configured using the standard wpa_supplicant and iwconfig tools.<br />
<br />
Depending on which of the chips you have, use either:<br />
<br />
'''ipw2100-fw'''<br />
pacman -S ipw2100-fw<br />
<br />
or:<br />
<br />
'''ipw2200-fw'''<br />
pacman -S ipw2200-fw<br />
<br />
If installing after initial Arch installation, the module may need to be reloaded for the firmware to be loaded.<br />
<br />
To enable radiotap interface:<br />
# rmmod ipw2200<br />
# modprobe ipw2200 rtap_iface=1<br />
<br />
===iwl3945, iwl4965 and iwl5000-series===<br />
<br />
'''I'''ntel's open source '''W'''iFi drivers for '''L'''inux (See [http://intellinuxwireless.org iwlwifi]) will work for both the 3945 and 4965 chipsets since kernel v2.6.24. And iwl5000-series chipsets (including 5100BG, 5100ABG, 5100AGN, 5300AGN and 5350AGN) module has been supported since '''kernel 2.6.27''', by the intree driver '''iwlagn'''.<br />
<br />
{{Box Note | You must install the '''firmware''' that corresponds to your chipset. }}<br />
<br />
# pacman -S iwlwifi-3945-ucode<br />
or:<br />
# pacman -S iwlwifi-4965-ucode<br />
or:<br />
# pacman -S iwlwifi-5000-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 -a''' 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 -a''' 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 />
* By default iwl3945 is configured to only work with networks on channels 1-11. Higher ranges are not allowed in some parts of the world (US). In the EU however channels 12 and 13 are used quite common. To make iwl3945 scan for all channels, add "options cfg80211 ieee80211_regdom=EU" to /etc/modprobe.d/options. With "iwlist f" you can check which channels are allowed.<br />
* If you want to enable more channels on Intel Wifi 5100 (and quite possible other cards too) you can do that with the crda package. After install, edit /etc/conf.d/wireless-regdom and uncomment the line where your country code is found. Add wireless-regdom to your DAEMONS in rc.conf and restart (which is the easiest thing to do). You should now, when writing sudo iwlist wlan0 channel, have access to more channels (depending on your location).<br />
<br />
===ipw3945 (obsolete)===<br />
{{Box Note | ''The ipw3945 driver is no longer actively developed, and the iwlwifi driver (described above) should work perfectly, but may conflict with the former one. So, only one of them should be installed. If you choose to use the iwlwifi driver you still do need the '''ipw3945-ucode''' package though.''}}<br />
# pacman -S ipw3945 ipw3945-ucode ipw3945d<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 />
<br />
Note: Some orinoco chipsets are Hermes I/II. You can use http://aur.archlinux.org/packages.php?ID=9637 to replace the orinoco driver and gain WPA support. See http://ubuntuforums.org/showthread.php?p=2154534#post2154534 for more information.<br />
<br />
To use the driver I blacklisted orinoco_cs in rc.conf (!orinoco_cs in the modules array) and added wlags49_h1_cs to the modules array. Example:<br />
<br />
<pre>MODULES=(!snd_pcsp !eepro100 !orinoco_cs wlags49_h1_cs)</pre><br />
<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 />
If that didn't work, try this:<br />
<br />
*Reload the prism module (modprobe p54usb or modprobe p54pci, depending on your hardware)<br />
alternatively remove your wifi card and then reconnect it<br />
*Use the "dmesg" command, and look at the end of the output it prints out.<br />
Look for a section looking like this: <br />
<br />
firmware: requesting '''isl3887usb_bare'''<br />
p54: LM86 firmware<br />
p54: FW rev 2.5.8.0 - Softmac protocol 3.0<br />
<br />
and try renaming the firmware file to the name corresponding to the part bolded here.<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.<br />
<br />
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 />
For another way to determine which firmware revision number to use, see the [http://acx100.sourceforge.net/wiki/Firmware "Which firmware" section of the acx100.sourceforge wiki page] page. For ACX100, you can follow the links provided there, to a table of card model number vs. "firmware files known to work"; you can figure out the rev. number you need, by looking at the suffix there. E.g. a dlink_dwl650+ uses "1.9.8.b", in which case you'd do this:<br />
ln -s /usr/share/tiacx/acx100_1.9.8.b/* /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 />
'''NOTE:''' The open-source acx driver does not support WPA/RSN encryption. NDISWRAPPER will have to be used with the windows driver to enable the enhanced encryption. See ndiswrapper, this page, for more details.<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 b43-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 />
<br />
Either install the "b43-firmware" package from [http://aur.archlinux.org/packages.php?ID=21690 AUR], or perform the following steps manually.<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.<br />
You may want to add b43 into the modules section of your rc.conf file.<pre>MODULES=(...b43 !bcm43xx !ndiswrapper...)</pre><br />
Good luck!<br />
<br />
===broadcom-wl===<br />
For recent Broadcom 43xx cards not supported by bcm43xx or b43. Not just for 4312 cards. See the [[Broadcom_BCM4312|Broadcom 4312 wiki page]]. It is available in [http://aur.archlinux.org/packages.php?ID=19514 AUR]. These chipsets are used in most Dell laptops, among others.<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 />
--[[User:Willey|Willey]] 22:32, 20 September 2008 (EDT)<br />
<br />
==Test Installation==<br />
After loading your driver run<br />
iwconfig<br />
and see if a wireless interface (wlan''x'', eth''x'', ath''x'') is recognized<br />
<br />
If <code>iwlist scan</code> displays <code>Interface doesn't support scanning</code> then you probably forgot to install the firmware.<br />
<br />
= Part II: Wireless Management =<br />
<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 />
Procedure and tools you’ll need will depend on several factors:<br />
* The '''easiness of configuration management''', from a completely manual setup procedure that you’ll need to repeat at each boot to a software-managed, automatic, autostarting solution<br />
* The '''encryption type''' (or not) that protects the wireless network<br />
* If you need '''network profiles''', i.e. if your computer will frequently change networks (such as a laptop)<br />
<br />
== Management methods ==<br />
<br />
This table shows the different methods that can be used to activate and manage a wireless network connection, depending on the encryption and management types, and the various tools that are required. Although there may be other possibilities, these are the most frequently used:<br />
{| border="1"<br />
! Management || No encryption/WEP || WPA/WPA2 PSK<br />
|-<br />
| Manual, need to repeat at each computer reboot || <code>ifconfig + iwconfig + dhcpcd/ifconfig</code> || <code>ifconfig + iwconfig + wpa_supplicant + dhcpcd/ifconfig</code><br />
|-<br />
| Automatically managed, centralized without network profile support || define interface in <code>/etc/rc.conf</code> || not covered<br />
|-<br />
| Automatically managed, with network profiles support || colspan="2" align="center" | <code>Netcfg, wicd, NetworkManager, etc…</code><br />
|}<br />
<br />
<br />
Whatever your choice, you should try to connect using the manual method first. This will help you understand the different steps that are required and debug them in case a problem arose. Another tip: if possible (e.g. if you admin your wifi access point), try connecting with no encryption, to check everything works. Then try using encryption, either WEP (simpler to configure) or WPA.<br />
<br />
=== Manual setup ===<br />
<br />
The programs provided by the package '''wireless_tools''' are the basic set of tools to set up a wireless network. Moreover, if you use WPA/WPA2 encryption, you will need the package '''wpa_supplicant'''. These powerful userspace console tools work extremely well and allow complete, manual control from the shell.<br />
<br />
These examples assume your wireless device is <code>wlan0</code>. Replace <code>wlan0</code> with the appropriate device name.<br />
{{Box Note | Depending on your hardware and encryption type, some of these steps may not be necessary. Some cards are known to require interface activation and/or access point scanning before being associated to an access point and being given an IP address. Some experimentation may be required. For instance, WPA/WPA2 users may directly try to activate their wireless network from step 3.}}<br />
<br />
1. ''(Optional, may be required)'' Some cards require that the kernel interface be activated before you can use the wireless_tools:<br />
# ifconfig wlan0 up<br />
<br />
2. ''(Optional, may be required)'' See what access points are available:<br />
# iwlist wlan0 scan<br />
We assume you want to use the essid named <code>MyEssid</code>.<br />
<br />
3. Depending on the encryption, you need to associate your wireless device with the access point to use and pass the encryption key.<br />
* ''No encryption''<br />
# iwconfig wlan0 essid "MyEssid"<br />
* ''WEP''<br />
using an hexadecimal key:<br />
# iwconfig wlan0 essid "MyEssid" key 1234567890<br />
using an ascii key:<br />
# iwconfig wlan0 essid "MyEssid" key s:asciikey<br />
* ''WPA/WPA2''<br />
You need to edit the <code>/etc/wpa_supplicant.conf</code> file as described in [[WPA_Supplicant]]. Then, issue this command:<br />
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf<br />
This is assuming your device uses the <code>wext</code> driver. If this does not work, you may need to adjust these options. Check [[WPA_Supplicant]] for more information and troubleshooting.<br />
<br />
4. Finally, provide an IP address to the network interface. 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 />
{{Box Note | Although the manual configuration method will help troubleshoot wireless problems, you will have to retype every command each time you reboot.}}<br />
<br />
=== Automatic connection - Network daemon ===<br />
<br />
{{Box Note | This method and configuration examples are only valid for unencrypted or WEP-encrypted networks, which are particularly unsecure. To use WPA/WPA2, you'll need to use other solutions such as such as '''[[netcfg]]''' or '''[[wicd]]'''. Also, avoid mixing these methods as they may create a conflict and prevent the wireless card from functioning.}}<br />
<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>)'''. The name of the network goes in place of '''MyEssid'''.<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 />
<br />
Not all wireless cards are <code>wlan0</code>. Determine your wireless interface with ifconfig -a. <br />
Atheros-based cards, for example, are typically <code>ath0</code>, so change <code>wlan_wlan0</code> 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 />
{{Box Note | These solutions are limited: for a laptop which is always on the move it would be good to have multiple [[network profiles]] and be able to easily switch from one to another. That's the aim of network managers, such as '''[[netcfg]]'''.}}<br />
<br />
=== Automatic connection - [[Network Profiles|netcfg]] ===<br />
<br />
[[Network Profiles|netcfg]] provides a '''versatile, robust and fast''' solution to networking on Arch.<br />
<br />
It uses a profile based setup and is capable of detection and connection to a wide range of network types. This is no harder than using graphical tools. Following the directions above, you can get a list of wireless networks. Then, as with graphical tools, you will need a password.<br />
<br />
''Detailed documentation [[Network Profiles]]''<br />
<br />
''Notes for developmental version [[Network Profiles development]]''<br />
<br />
<br />
<br />
=== Other network managers ===<br />
<br />
There are a number of wireless management solutions available to Arch Linux users as an alternative to the above.<br />
<br />
====Autowifi====<br />
Autowifi is a daemon that configures your wireless network automatically depending on the ESSID. Once configured, no user interaction is necessary and no GUI tools are required.<br />
<br />
For more information, see the [[Autowifi]] wiki.<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 />
= See Also =<br />
*[[Sharing ppp connection with wlan interface]]<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 />
*[https://lists.anl.gov/mailman/listinfo/wifi-radar Wifi Radar] - Wifi Radar information page<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>
Iphitus
https://wiki.archlinux.org/index.php?title=Network_configuration/Wireless&diff=70092
Network configuration/Wireless
2009-06-06T09:28:52Z
<p>Iphitus: Redundant, covered below.</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|Español|Wireless_Setup_(Español)}}<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_entry|Türkçe|Kablosuz Bağlantı}}<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 under the '''base-devel''' category. (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 the Linux kernel supports your hardware. You can find your card with 'lspci | grep -i net'. The [https://help.ubuntu.com/community/WifiDocs/WirelessCardsSupported Ubuntu Wiki] has an extensive list of wireless cards and whether or not they are supported by available linux kernel drivers.<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 />
#*Also, [http://wireless.kernel.org/en/users/Devices this page] has a matrix of supported 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 GNU/Linux (however, this is rarely the case)<br />
<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''. At boot, 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) under the '''base-devel''' category. <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 />
<br />
===Wireless Quickstart===<br />
The general procedure will be:<br />
<br />
* Identify your interface and appropriate module:<br />
# hwdetect --show-net<br />
or<br />
# lspci | grep -i net <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>(give the essid (the 'network name') of the network in quotes), e.g.:<br />
# iwconfig ath0 essid "linksys" key 0241baf34c<br />
If your WEP key is ASCII, prefix with <code>s:</code>, e.g.:<br />
# iwconfig ath0 essid linksys key s:mywepkey<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 />
If you are using '''WPA''', refer to [[#WPA/WPA2|WPA/WPA2]] below.<br />
<br />
===Drivers and Firmware===<br />
Methods and procedures for installing drivers for various chipsets are covered below. In addition, certain chipsets require the installation of corresponding ''firmware''. (Also covered below).<br />
<br />
====wlan-ng====<br />
Packages: '''wlan-ng26-utils'''<br />
<br />
This driver support PRISM based cards, which are hard to find now. The PRISM card is an IEEE 802.11 compliant 2.4 GHz DSSS WLAN network interface card that uses the Intersil PRISM chipset for its radio functions and the AMD PCNet-Mobile chip (AM79C930) for its Media Access Controller (MAC) function. The supported adapters can be found from here: http://www.linux-wlan.org/docs/wlan_adapters.html.gz<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 />
See http://www.linux-wlan.org/<br />
<br />
====rt2860====<br />
In kernel since 2.6.29 and requires no extra packages. It can be configured using the standard wpa_supplicant and iwconfig tools.<br />
<br />
It has a wide range of options that can be configured with iwpriv. These are documented in the [http://www.ralinktech.com/ralink/Home/Support/Linux.html source tarballs] available from Ralink<br />
<br />
====rt2870====<br />
In kernel since 2.6.29 and requires no extra packages. It can be configured using the standard wpa_supplicant and iwconfig tools. <br />
<br />
It has a wide range of options that can be configured with iwpriv. These are documented in the [http://www.ralinktech.com/ralink/Home/Support/Linux.html source tarballs] available from Ralink<br />
<br />
Also see [[Rt2870]]<br />
<br />
====rtl8180====<br />
Realtek rtl8180 PCI/Cardbus 802.11b now fully supported in the kernel<br />
<pre>modprobe rtl8180</pre><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, which can be installed like this: <br />
<pre>pacman -S rt2x00-rt71w-fw</pre><br />
<pre>pacman -S rt2x00-rt61-fw</pre><br />
..depending on the chipset.<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 rt2x00 driver (rt2500pci module) is preferred and 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). "RT61" has now been made largely obsolete by the in-kernel rt2x00 driver (see above), although there may be cases where the legacy driver performs better.<br />
<br />
See the [[RT61_Wireless|RT61 wiki page]].<br />
<br />
====RT73 (ie Ralink RT2571)====<br />
For USB devices based on Ralink's later generation of 802.11g chipsets (including those supporting proprietary MIMO modes).<br />
<br />
Several USB WiFi dongles use this chipset, including the Linksys WUSB54GC and the Belkin Wireless G USB key (F5D7050 v3000) .<br />
<br />
"RT73" has now been made largely obsolete by the in-kernel rt2x00 driver (see above), although there may be cases where the legacy driver performs better. <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-project.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 />
====ath9k====<br />
<br />
ath9k is Atheros' officially supported driver for the newer 11n chipsets. All of the chips with 11n capabilities are supported, with a maximum throughput around 180 Mbps. To see a complete list of supported hardware, check this [http://wireless.kernel.org/en/users/Drivers/ath9k page].<br />
<br />
Working modes: Station, AP and Adhoc.<br />
<br />
ath9k has been part of the kernel as of 2.6.27. But it has undergone some heavy development, and the changes haven't propagated to the mainline kernel tree yet.<br />
The best solution would be to use the [http://wireless.kernel.org/en/users/Download compat-wireless] package for now.<br />
A [https://lists.ath9k.org/mailman/listinfo/ath9k-devel mailing list] exists for support and development related discussions.<br />
<br />
====ipw2100 and ipw2200====<br />
Depending on which of the chips you have, use either:<br />
<br />
'''ipw2100-fw'''<br />
pacman -S ipw2100-fw<br />
<br />
or:<br />
<br />
'''ipw2200-fw'''<br />
pacman -S 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 your kernel image with: <br />
<pre>mkinitcpio -g /boot/kernel26.img</pre><br />
<br />
To enable radiotap interface:<br />
# rmmod ipw2200<br />
# modprobe ipw2200 rtap_iface=1<br />
<br />
====iwl3945, iwl4965 and iwl5000-series====<br />
<br />
'''I'''ntel's open source '''W'''iFi drivers for '''L'''inux (See [http://intellinuxwireless.org iwlwifi]) will work for both the 3945 and 4965 chipsets since kernel v2.6.24. And iwl5000-series chipsets (including 5100BG, 5100ABG, 5100AGN, 5300AGN and 5350AGN) module has been supported since '''kernel 2.6.27''', by the intree driver '''iwlagn'''.<br />
<br />
{{Box Note | You must install the '''firmware''' that corresponds to your chipset. }}<br />
<br />
# pacman -S iwlwifi-3945-ucode<br />
or:<br />
# pacman -S iwlwifi-4965-ucode<br />
or:<br />
# pacman -S iwlwifi-5000-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 -a''' 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 -a''' 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 />
* By default iwl3945 is configured to only work with networks on channels 1-11. Higher ranges are not allowed in some parts of the world (US). In the EU however channels 12 and 13 are used quite common. To make iwl3945 scan for all channels, add "options cfg80211 ieee80211_regdom=EU" to /etc/modprobe.d/options. With "iwlist f" you can check which channels are allowed.<br />
* If you want to enable more channels on Intel Wifi 5100 (and quite possible other cards too) you can do that with the crda package. After install, edit /etc/conf.d/wireless-regdom and uncomment the line where your country code is found. Add wireless-regdom to your DAEMONS in rc.conf and restart (which is the easiest thing to do). You should now, when writing sudo iwlist wlan0 channel, have access to more channels (depending on your location).<br />
<br />
====ipw3945 (Deprecated Method)====<br />
{{Box Note | ''The ipw3945 driver is no longer actively developed, and the iwlwifi driver (described above) should work perfectly, but may conflict with the former one. So, only one of them should be installed. If you choose to use the iwlwifi driver you still do need the '''ipw3945-ucode''' package though.''}}<br />
# pacman -S ipw3945 ipw3945-ucode ipw3945d<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 />
<br />
Note: Some orinoco chipsets are Hermes I/II. You can use http://aur.archlinux.org/packages.php?ID=9637 to replace the orinoco driver and gain WPA support. See http://ubuntuforums.org/showthread.php?p=2154534#post2154534 for more information.<br />
<br />
To use the driver I blacklisted orinoco_cs in rc.conf (!orinoco_cs in the modules array) and added wlags49_h1_cs to the modules array. Example:<br />
<br />
<pre>MODULES=(!snd_pcsp !eepro100 !orinoco_cs wlags49_h1_cs)</pre><br />
<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 />
If that didn't work, try this:<br />
<br />
*Reload the prism module (modprobe p54usb or modprobe p54pci, depending on your hardware)<br />
alternatively remove your wifi card and then reconnect it<br />
*Use the "dmesg" command, and look at the end of the output it prints out.<br />
Look for a section looking like this: <br />
<br />
firmware: requesting '''isl3887usb_bare'''<br />
p54: LM86 firmware<br />
p54: FW rev 2.5.8.0 - Softmac protocol 3.0<br />
<br />
and try renaming the firmware file to the name corresponding to the part bolded here.<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.<br />
<br />
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 />
For another way to determine which firmware revision number to use, see the [http://acx100.sourceforge.net/wiki/Firmware "Which firmware" section of the acx100.sourceforge wiki page] page. For ACX100, you can follow the links provided there, to a table of card model number vs. "firmware files known to work"; you can figure out the rev. number you need, by looking at the suffix there. E.g. a dlink_dwl650+ uses "1.9.8.b", in which case you'd do this:<br />
ln -s /usr/share/tiacx/acx100_1.9.8.b/* /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 />
'''NOTE:''' The open-source acx driver does not support WPA/RSN encryption. NDISWRAPPER will have to be used with the windows driver to enable the enhanced encryption. See ndiswrapper, this page, for more details.<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 b43-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 />
<br />
Either install the "b43-firmware" package from [http://aur.archlinux.org/packages.php?ID=21690 AUR], or perform the following steps manually.<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.<br />
You may want to add b43 into the modules section of your rc.conf file.<pre>MODULES=(...b43 !bcm43xx !ndiswrapper...)</pre><br />
Good luck!<br />
<br />
====broadcom-wl====<br />
For recent Broadcom 43xx cards not supported by bcm43xx or b43. Not just for 4312 cards. See the [[Broadcom_BCM4312|Broadcom 4312 wiki page]]. It is available in [http://aur.archlinux.org/packages.php?ID=19514 AUR]. These chipsets are used in most Dell laptops, among others.<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 />
--[[User:Willey|Willey]] 22:32, 20 September 2008 (EDT)<br />
<br />
==Test Installation==<br />
After loading your driver run<br />
iwconfig<br />
and see if a wireless interface (wlan''x'', eth''x'', ath''x'') is recognized<br />
<br />
If <code>iwlist scan</code> displays <code>Interface doesn't support scanning</code> then you probably forgot to install the firmware.<br />
<br />
= Part II: Wireless Management =<br />
<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 />
Procedure and tools you’ll need will depend on several factors:<br />
* The '''easiness of configuration management''', from a completely manual setup procedure that you’ll need to repeat at each boot to a software-managed, automatic, autostarting solution<br />
* The '''encryption type''' (or not) that protects the wireless network<br />
* If you need '''network profiles''', i.e. if your computer will frequently change networks (such as a laptop)<br />
<br />
== Management methods ==<br />
<br />
This table shows the different methods that can be used to activate and manage a wireless network connection, depending on the encryption and management types, and the various tools that are required. Although there may be other possibilities, these are the most frequently used:<br />
{| border="1"<br />
! Management || No encryption/WEP || WPA/WPA2 PSK<br />
|-<br />
| Manual, need to repeat at each computer reboot || <code>ifconfig + iwconfig + dhcpcd/ifconfig</code> || <code>ifconfig + iwconfig + wpa_supplicant + dhcpcd/ifconfig</code><br />
|-<br />
| Automatically managed, centralized without network profile support || define interface in <code>/etc/rc.conf</code> || not covered<br />
|-<br />
| Automatically managed, with network profiles support || colspan="2" align="center" | <code>Netcfg, wicd, NetworkManager, etc…</code><br />
|}<br />
<br />
<br />
Whatever your choice, you should try to connect using the manual method first. This will help you understand the different steps that are required and debug them in case a problem arose. Another tip: if possible (e.g. if you admin your wifi access point), try connecting with no encryption, to check everything works. Then try using encryption, either WEP (simpler to configure) or WPA.<br />
<br />
=== Manual setup ===<br />
<br />
The programs provided by the package '''wireless_tools''' are the basic set of tools to set up a wireless network. Moreover, if you use WPA/WPA2 encryption, you will need the package '''wpa_supplicant'''. These powerful userspace console tools work extremely well and allow complete, manual control from the shell.<br />
<br />
These examples assume your wireless device is <code>wlan0</code>. Replace <code>wlan0</code> with the appropriate device name.<br />
{{Box Note | Depending on your hardware and encryption type, some of these steps may not be necessary. Some cards are known to require interface activation and/or access point scanning before being associated to an access point and being given an IP address. Some experimentation may be required. For instance, WPA/WPA2 users may directly try to activate their wireless network from step 3.}}<br />
<br />
1. ''(Optional, may be required)'' Some cards require that the kernel interface be activated before you can use the wireless_tools:<br />
# ifconfig wlan0 up<br />
<br />
2. ''(Optional, may be required)'' See what access points are available:<br />
# iwlist wlan0 scan<br />
We assume you want to use the essid named <code>MyEssid</code>.<br />
<br />
3. Depending on the encryption, you need to associate your wireless device with the access point to use and pass the encryption key.<br />
* ''No encryption''<br />
# iwconfig wlan0 essid "MyEssid"<br />
* ''WEP''<br />
using an hexadecimal key:<br />
# iwconfig wlan0 essid "MyEssid" key 1234567890<br />
using an ascii key:<br />
# iwconfig wlan0 essid "MyEssid" key s:asciikey<br />
* ''WPA/WPA2''<br />
You need to edit the <code>/etc/wpa_supplicant.conf</code> file as described in [[WPA_Supplicant]]. Then, issue this command:<br />
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf<br />
This is assuming your device uses the <code>wext</code> driver. If this does not work, you may need to adjust these options. Check [[WPA_Supplicant]] for more information and troubleshooting.<br />
<br />
4. Finally, provide an IP address to the network interface. 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 />
{{Box Note | Although the manual configuration method will help troubleshoot wireless problems, you will have to retype every command each time you reboot.}}<br />
<br />
=== Automatic connection - Network daemon ===<br />
<br />
{{Box Note | This method and configuration examples are only valid for unencrypted or WEP-encrypted networks, which are particularly unsecure. To use WPA/WPA2, you'll need to use other solutions such as such as '''[[netcfg]]''' or '''[[wicd]]'''. Also, avoid mixing these methods as they may create a conflict and prevent the wireless card from functioning.}}<br />
<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>)'''. The name of the network goes in place of '''MyEssid'''.<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 />
<br />
Not all wireless cards are <code>wlan0</code>. Determine your wireless interface with ifconfig -a. <br />
Atheros-based cards, for example, are typically <code>ath0</code>, so change <code>wlan_wlan0</code> 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 />
{{Box Note | These solutions are limited: for a laptop which is always on the move it would be good to have multiple [[network profiles]] and be able to easily switch from one to another. That's the aim of network managers, such as '''[[netcfg]]'''.}}<br />
<br />
=== Automatic connection - [[Network Profiles|netcfg]] ===<br />
<br />
[[Network Profiles|netcfg]] provides a '''versatile, robust and fast''' solution to networking on Arch.<br />
<br />
It uses a profile based setup and is capable of detection and connection to a wide range of network types. This is no harder than using graphical tools. Following the directions above, you can get a list of wireless networks. Then, as with graphical tools, you will need a password.<br />
<br />
''Detailed documentation [[Network Profiles]]''<br />
<br />
''Notes for developmental version [[Network Profiles development]]''<br />
<br />
<br />
<br />
=== Other network managers ===<br />
<br />
There are a number of wireless management solutions available to Arch Linux users as an alternative to the above.<br />
<br />
====Autowifi====<br />
Autowifi is a daemon that configures your wireless network automatically depending on the ESSID. Once configured, no user interaction is necessary and no GUI tools are required.<br />
<br />
For more information, see the [[Autowifi]] wiki.<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 />
= See Also =<br />
*[[Sharing ppp connection with wlan interface]]<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 />
*[https://lists.anl.gov/mailman/listinfo/wifi-radar Wifi Radar] - Wifi Radar information page<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>
Iphitus
https://wiki.archlinux.org/index.php?title=Rt2870&diff=70091
Rt2870
2009-06-06T09:20:13Z
<p>Iphitus: </p>
<hr />
<div>[[Category:Communication and network (English)]]<br />
[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Accuracy}}<br />
= Introduction =<br />
This entry is to aid you in configuring wireless settings for use with devices built with Ralink's rt2870 chipset. I hope that this entry will encourage further contribution regarding the configuration of ralink drivers.<br />
<br />
{{Box Note | This entry has been (so far) written with Infrastructure mode and WPA authentication in mind. Please contribute any other configurations.}}<br />
<br />
= Installation (kernels from 2.6.29) =<br />
Since 2.6.29 this driver has been included in the kernel<br />
<br />
<br />
= Installation - source =<br />
* Install the Drivers<br />
** Grab the tarball from AUR<br />
*** http://aur.archlinux.org/packages.php?ID=14558<br />
** Extract the Tarball<br />
*** tar xvf rt2870.tar.gz<br />
** Enter the rt2870 directory and build and install the driver; the driver installed will be called rt2870.ko<br />
*** makepkg -i<br />
<br />
* To simplify things, create a modprobe alias by editing /etc/modprobe.conf and entering the following line<br />
alias ra0 rt2860<br />
= Configuration = <br />
This driver is best configured using tools that utilise the standard wireless extensions, such as wpa_supplicant, iwconfig and their frontends.<br />
<br />
Various driver specific options can be configured using iwpriv.<br />
<br />
<br />
= Configuration - File (obsolete) =<br />
This section is to help you with the configuration file used to set the parameters of the device when it is brought up (e.g. ifconfig ra0 up).<br />
* First, go into the src/ directory where you built the package and into the source code's directory. For example<br />
cd ~/AUR/rt2870/src/2008_0925_RT2870_Linux_STA_v1.4.0.0<br />
* Copy the RT2870STA.dat file to /etc/Wireless/RT2870STA (if the directory doesn't exist, create it)<br />
cp RT2870STA.dat /etc/Wirless/RT2870STA<br />
<br />
== Initial Configuration ==<br />
* In this file, the first line must always contain the word Default, so it should be on the first line.<br />
Default<br />
* Change the country/region channel type to the ones that correspond to your network, with the use of integers 0-7: 0 for channels 1 through 11, 1 for channels 1 through 12, 2 for channels 10 and 11 (according to ralink), 3 for channels 10 through 13, 4 for channel 14, 5 for channels 1 through 14, 6 for channels 3 through 9, and 7 for channels 5 through 13.<br />
My configuration<br />
CountryRegion=0<br />
* Add your country code. Valid country codes include the following<br />
AG, AR, AW, AU, AT, BS, BB, BM, BR, BE, BG, CA, KY, CL, CN, CO, CR, CY, CZ, DK, DO, EC, SV, FI, FR, DE, GR, <br />
GU, GT, HT, HN, HK, HU, IS, IN, ID, E, IL, IT, JP, JO, LV, LI, LT, LU, MY, MT, MA, MX, NL, NZ, NO, PE, PT, <br />
PL, RO, RU, SA, CS, SG, SK, SI, ZA, KR, ES, SE, CH, TW, TR, GB, UA, AE, US, VE<br />
My configuration<br />
ConuntryCode=US<br />
* Edit the ssid to your network's ssid using either characters 0-z or 1~32 ascii characters<br />
For example<br />
SSID=mywirelessnetwork<br />
* Change the newtork type to whatever type of network you are using: Infrastructure (as Infra) or Adhoc (as Adhoc)<br />
My configuration<br />
NetworkType=Infra<br />
* Edit the wireless mode using numbers 0 through 10: 0 for legacy 11b/g mixed, 1 for legacy 11B only, 2 for legacy 11A only, 3 for legacy 11a/b/g mixed, 4 for legacy 11G only, 5 for 11ABGN mixed, 6 for 11N only, 7 for 11GN mixed, 8 for 11AN mixed, 9 for 11BGN mixed, and 10 for 11AGN mixed<br />
I use 0<br />
WirelessMode=0<br />
* Edit the channel number. This must correspond to the CountryRegion setting.<br />
My configuration<br />
Channel=10<br />
<br />
== Authentication ==<br />
{{Box Note | Because I use WPA and have not tested WEP configuration, the WEP configuration type explained is just a guess. If you use a rt2870 device with a WEP protected network, then by all-means correct me.}}<br />
<br />
* Set authmode to either Open (for WEP), WPA (WPA with WPA Supplicant), WPA2 (WPA2 with WPA supplicant), WPAPSK, or WPA2PSK. The WPA and WPA2 options should work with netcfg and networkmanager.<br />
I use WPA so,<br />
AuthMode=WPA<br />
* Set the encryption type to either WEP, TKIP, or AES (or None)<br />
I use TKIP, so<br />
EncrypType=TKIP<br />
<br />
=== WPA ===<br />
* If you're using WPA, set your WPAPSK<br />
WPAPSK=mysecretkey<br />
<br />
=== WEP ===<br />
* If you're using WEP, first set the key index using numbers 1 through 4<br />
For example,<br />
DefaultKeyID=1<br />
* Now, set the key type (of your corresponding key index) so it know what kind of key to look for. 0 for hex, 1 for ascii string.<br />
Key1Type=0<br />
* Provide your WEP key according to type, for example<br />
For a string key<br />
Key1Str=mysecretwepkey<br />
For a hex key<br />
Key1=01234<br />
<br />
== Examples ==<br />
Here are some example options for reference. <br />
<br />
RT2870STA.dat<br />
Default<br />
CountryRegion=0<br />
CountryRegionABand=7<br />
CountryCode=US<br />
ChannelGeography=1<br />
SSID=mywirelessnetwork<br />
NetworkType=Infra<br />
WirelessMode=0<br />
Channel=10<br />
BeaconPeriod=100<br />
TxPower=100<br />
BGProtection=0<br />
TxPreamble=1<br />
RTSThreshold=2347<br />
FragThreshold=2346<br />
TxBurst=0<br />
PktAggregate=0<br />
WmmCapable=0<br />
AckPolicy=0;0;0;0<br />
AuthMode=WPA<br />
EncrypType=TKIP<br />
WPAPSK=mysecretkey<br />
DefaultKeyID=1<br />
Key1Type=0<br />
Key1Str=<br />
Key2Type=0<br />
Key2Str=<br />
Key3Type=0<br />
Key3Str=<br />
Key4Type=0<br />
Key4Str=<br />
PSMode=CAM<br />
FastRoaming=0<br />
RoamThreshold=70<br />
APSDCapable=0<br />
APSDAC=0;0;0;0<br />
HT_RDG=1<br />
HT_EXTCHA=0<br />
HT_OpMode=1<br />
HT_MpduDensity=4<br />
HT_BW=1<br />
HT_AutoBA=1<br />
HT_BADecline=0<br />
HT_AMSDU=0<br />
HT_BAWinSize=64<br />
HT_GI=1<br />
HT_MCS=33<br />
HT_MIMOPSMode=3<br />
IEEE80211H=0<br />
TGnWifiTest=0<br />
WirelessEvent=0<br />
CarrierDetect=0<br />
<br />
<br />
And a netcfg profile<br />
<br />
CONNECTION="wireless"<br />
INTERFACE=ra0<br />
SCAN="no"<br />
SECURITY="wpa"<br />
ESSID=mywirelessnetwork<br />
KEY="mysecretkey"<br />
IP="dhcp"<br />
TIMEOUT=20<br />
DHCP_TIMEOUT=30<br />
<br />
No need to set the channel in the netcfg profile since the .dat file took care of it.<br />
<br />
= Troubleshooting =<br />
<br />
===dmesg:Bulk In Failed, CMDTHREAD_RESET_BULK_IN, etc===<br />
Bulk In Failed messages are not so bad, but a problem arises when and if the failed data leads to CMDTHREAD_RESET_BULK_IN which results in the module removing itself (e.g. modprobe -r rt2870sta). <br />
<br />
This probably happened because you created your own RT2870STA.dat file. Go into the rt2870 tarball directory, into the source code directory, and replace the RT2870STA.dat in /etc/Wireless/RT2870STA/ with the preconfigured .dat file in the 2008_0718_RT2870_Linux_STA_v1.3.1.0 directory. From there, set the options that correspond to your network without removing any of the options.<br />
<br />
===rt2870CmdThread is using a lot of CPU===<br />
I don't specifically know why this occurs, but I was able to fix this by connecting the device into one of the usb ports in the back.<br />
<br />
= What next? =<br />
<br />
Insert the device and try connecting. See the [http://wiki.archlinux.org/index.php/Wireless_Setup#Part_II:_Wireless_Management Wireless Management] section of [[Wireless_Setup]] for details on connection methods.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Rt2870&diff=70090
Rt2870
2009-06-06T09:17:28Z
<p>Iphitus: Article content details obsolete configuration method and is relates to older versions of the driver.</p>
<hr />
<div>[[Category:Communication and network (English)]]<br />
[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Accuracy}}<br />
= Introduction =<br />
This entry is to aid you in configuring wireless settings for use with devices built with Ralink's rt2870 chipset. I hope that this entry will encourage further contribution regarding the configuration of ralink drivers.<br />
<br />
{{Box Note | This entry has been (so far) written with Infrastructure mode and WPA authentication in mind. Please contribute any other configurations.}}<br />
<br />
= Installation =<br />
* Install the Drivers<br />
** Grab the tarball from AUR<br />
*** http://aur.archlinux.org/packages.php?ID=14558<br />
** Extract the Tarball<br />
*** tar xvf rt2870.tar.gz<br />
** Enter the rt2870 directory and build and install the driver; the driver installed will be called rt2870.ko<br />
*** makepkg -i<br />
<br />
* To simplify things, create a modprobe alias by editing /etc/modprobe.conf and entering the following line<br />
alias ra0 rt2860<br />
<br />
= The Configuration File =<br />
This section is to help you with the configuration file used to set the parameters of the device when it is brought up (e.g. ifconfig ra0 up).<br />
* First, go into the src/ directory where you built the package and into the source code's directory. For example<br />
cd ~/AUR/rt2870/src/2008_0925_RT2870_Linux_STA_v1.4.0.0<br />
* Copy the RT2870STA.dat file to /etc/Wireless/RT2870STA (if the directory doesn't exist, create it)<br />
cp RT2870STA.dat /etc/Wirless/RT2870STA<br />
<br />
= Editing the Configuration File =<br />
From here, you must configure the device's settings prior to bringing up the device. The options are found in the .dat file that you should have just copied. There are a lot of options (some with ambiguous documentation), but let's focus on the important ones.<br />
== Initial Configuration ==<br />
* In this file, the first line must always contain the word Default, so it should be on the first line.<br />
Default<br />
* Change the country/region channel type to the ones that correspond to your network, with the use of integers 0-7: 0 for channels 1 through 11, 1 for channels 1 through 12, 2 for channels 10 and 11 (according to ralink), 3 for channels 10 through 13, 4 for channel 14, 5 for channels 1 through 14, 6 for channels 3 through 9, and 7 for channels 5 through 13.<br />
My configuration<br />
CountryRegion=0<br />
* Add your country code. Valid country codes include the following<br />
AG, AR, AW, AU, AT, BS, BB, BM, BR, BE, BG, CA, KY, CL, CN, CO, CR, CY, CZ, DK, DO, EC, SV, FI, FR, DE, GR, <br />
GU, GT, HT, HN, HK, HU, IS, IN, ID, E, IL, IT, JP, JO, LV, LI, LT, LU, MY, MT, MA, MX, NL, NZ, NO, PE, PT, <br />
PL, RO, RU, SA, CS, SG, SK, SI, ZA, KR, ES, SE, CH, TW, TR, GB, UA, AE, US, VE<br />
My configuration<br />
ConuntryCode=US<br />
* Edit the ssid to your network's ssid using either characters 0-z or 1~32 ascii characters<br />
For example<br />
SSID=mywirelessnetwork<br />
* Change the newtork type to whatever type of network you are using: Infrastructure (as Infra) or Adhoc (as Adhoc)<br />
My configuration<br />
NetworkType=Infra<br />
* Edit the wireless mode using numbers 0 through 10: 0 for legacy 11b/g mixed, 1 for legacy 11B only, 2 for legacy 11A only, 3 for legacy 11a/b/g mixed, 4 for legacy 11G only, 5 for 11ABGN mixed, 6 for 11N only, 7 for 11GN mixed, 8 for 11AN mixed, 9 for 11BGN mixed, and 10 for 11AGN mixed<br />
I use 0<br />
WirelessMode=0<br />
* Edit the channel number. This must correspond to the CountryRegion setting.<br />
My configuration<br />
Channel=10<br />
<br />
== Authentication ==<br />
{{Box Note | Because I use WPA and have not tested WEP configuration, the WEP configuration type explained is just a guess. If you use a rt2870 device with a WEP protected network, then by all-means correct me.}}<br />
<br />
* Set authmode to either Open (for WEP), WPA (WPA with WPA Supplicant), WPA2 (WPA2 with WPA supplicant), WPAPSK, or WPA2PSK. The WPA and WPA2 options should work with netcfg and networkmanager.<br />
I use WPA so,<br />
AuthMode=WPA<br />
* Set the encryption type to either WEP, TKIP, or AES (or None)<br />
I use TKIP, so<br />
EncrypType=TKIP<br />
<br />
=== WPA ===<br />
* If you're using WPA, set your WPAPSK<br />
WPAPSK=mysecretkey<br />
<br />
=== WEP ===<br />
* If you're using WEP, first set the key index using numbers 1 through 4<br />
For example,<br />
DefaultKeyID=1<br />
* Now, set the key type (of your corresponding key index) so it know what kind of key to look for. 0 for hex, 1 for ascii string.<br />
Key1Type=0<br />
* Provide your WEP key according to type, for example<br />
For a string key<br />
Key1Str=mysecretwepkey<br />
For a hex key<br />
Key1=01234<br />
<br />
== Examples ==<br />
Here are some example options for reference. <br />
<br />
RT2870STA.dat<br />
Default<br />
CountryRegion=0<br />
CountryRegionABand=7<br />
CountryCode=US<br />
ChannelGeography=1<br />
SSID=mywirelessnetwork<br />
NetworkType=Infra<br />
WirelessMode=0<br />
Channel=10<br />
BeaconPeriod=100<br />
TxPower=100<br />
BGProtection=0<br />
TxPreamble=1<br />
RTSThreshold=2347<br />
FragThreshold=2346<br />
TxBurst=0<br />
PktAggregate=0<br />
WmmCapable=0<br />
AckPolicy=0;0;0;0<br />
AuthMode=WPA<br />
EncrypType=TKIP<br />
WPAPSK=mysecretkey<br />
DefaultKeyID=1<br />
Key1Type=0<br />
Key1Str=<br />
Key2Type=0<br />
Key2Str=<br />
Key3Type=0<br />
Key3Str=<br />
Key4Type=0<br />
Key4Str=<br />
PSMode=CAM<br />
FastRoaming=0<br />
RoamThreshold=70<br />
APSDCapable=0<br />
APSDAC=0;0;0;0<br />
HT_RDG=1<br />
HT_EXTCHA=0<br />
HT_OpMode=1<br />
HT_MpduDensity=4<br />
HT_BW=1<br />
HT_AutoBA=1<br />
HT_BADecline=0<br />
HT_AMSDU=0<br />
HT_BAWinSize=64<br />
HT_GI=1<br />
HT_MCS=33<br />
HT_MIMOPSMode=3<br />
IEEE80211H=0<br />
TGnWifiTest=0<br />
WirelessEvent=0<br />
CarrierDetect=0<br />
<br />
<br />
And a netcfg profile<br />
<br />
CONNECTION="wireless"<br />
INTERFACE=ra0<br />
SCAN="no"<br />
SECURITY="wpa"<br />
ESSID=mywirelessnetwork<br />
KEY="mysecretkey"<br />
IP="dhcp"<br />
TIMEOUT=20<br />
DHCP_TIMEOUT=30<br />
<br />
No need to set the channel in the netcfg profile since the .dat file took care of it.<br />
<br />
= Troubleshooting =<br />
<br />
===dmesg:Bulk In Failed, CMDTHREAD_RESET_BULK_IN, etc===<br />
Bulk In Failed messages are not so bad, but a problem arises when and if the failed data leads to CMDTHREAD_RESET_BULK_IN which results in the module removing itself (e.g. modprobe -r rt2870sta). <br />
<br />
This probably happened because you created your own RT2870STA.dat file. Go into the rt2870 tarball directory, into the source code directory, and replace the RT2870STA.dat in /etc/Wireless/RT2870STA/ with the preconfigured .dat file in the 2008_0718_RT2870_Linux_STA_v1.3.1.0 directory. From there, set the options that correspond to your network without removing any of the options.<br />
<br />
===rt2870CmdThread is using a lot of CPU===<br />
I don't specifically know why this occurs, but I was able to fix this by connecting the device into one of the usb ports in the back.<br />
<br />
= What next? =<br />
<br />
Insert the device and try connecting. See the [http://wiki.archlinux.org/index.php/Wireless_Setup#Part_II:_Wireless_Management Wireless Management] section of [[Wireless_Setup]] for details on connection methods.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Network_configuration/Wireless&diff=70089
Network configuration/Wireless
2009-06-06T09:15:23Z
<p>Iphitus: </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|Español|Wireless_Setup_(Español)}}<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_entry|Türkçe|Kablosuz Bağlantı}}<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 under the '''base-devel''' category. (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 the Linux kernel supports your hardware. You can find your card with 'lspci | grep -i net'. The [https://help.ubuntu.com/community/WifiDocs/WirelessCardsSupported Ubuntu Wiki] has an extensive list of wireless cards and whether or not they are supported by available linux kernel drivers.<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://wireless.kernel.org/en/users/Drivers/ath5k ath5k] is a completely FOSS driver (without a binary blob, unlike Madwifi) for Atheros chipsets.<br />
#*[http://wireless.kernel.org/en/users/Drivers/ath9k ath9k] is Atheros' official driver for the newer 11n chipsets (AR5416, AR5418, AR9160, AR9280, AR9281, AR9285).<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://intellinuxwireless.org/?p=iwlwifi/ iwlwifi-3945-ucode] for Intel Pro/Wireless 3945 AB/G Mini PCI-E<br />
#*[http://intellinuxwireless.org/?p=iwlwifi/ iwlwifi-4965-ucode] for Intel Pro/Wireless 4965 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 />
#*[http://www.broadcom.com/support/802.11/linux_sta.php broadcom-wl] for recent 43xx Broadcom cards not supported by bcm43xx or b43.<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 />
#*Also, [http://wireless.kernel.org/en/users/Devices this page] has a matrix of supported 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 GNU/Linux (however, this is rarely the case)<br />
<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''. At boot, 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) under the '''base-devel''' category. <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 />
<br />
===Wireless Quickstart===<br />
The general procedure will be:<br />
<br />
* Identify your interface and appropriate module:<br />
# hwdetect --show-net<br />
or<br />
# lspci | grep -i net <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>(give the essid (the 'network name') of the network in quotes), e.g.:<br />
# iwconfig ath0 essid "linksys" key 0241baf34c<br />
If your WEP key is ASCII, prefix with <code>s:</code>, e.g.:<br />
# iwconfig ath0 essid linksys key s:mywepkey<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 />
If you are using '''WPA''', refer to [[#WPA/WPA2|WPA/WPA2]] below.<br />
<br />
===Drivers and Firmware===<br />
Methods and procedures for installing drivers for various chipsets are covered below. In addition, certain chipsets require the installation of corresponding ''firmware''. (Also covered below).<br />
<br />
====wlan-ng====<br />
Packages: '''wlan-ng26-utils'''<br />
<br />
This driver support PRISM based cards, which are hard to find now. The PRISM card is an IEEE 802.11 compliant 2.4 GHz DSSS WLAN network interface card that uses the Intersil PRISM chipset for its radio functions and the AMD PCNet-Mobile chip (AM79C930) for its Media Access Controller (MAC) function. The supported adapters can be found from here: http://www.linux-wlan.org/docs/wlan_adapters.html.gz<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 />
See http://www.linux-wlan.org/<br />
<br />
====rt2860====<br />
In kernel since 2.6.29 and requires no extra packages. It can be configured using the standard wpa_supplicant and iwconfig tools.<br />
<br />
It has a wide range of options that can be configured with iwpriv. These are documented in the [http://www.ralinktech.com/ralink/Home/Support/Linux.html source tarballs] available from Ralink<br />
<br />
====rt2870====<br />
In kernel since 2.6.29 and requires no extra packages. It can be configured using the standard wpa_supplicant and iwconfig tools. <br />
<br />
It has a wide range of options that can be configured with iwpriv. These are documented in the [http://www.ralinktech.com/ralink/Home/Support/Linux.html source tarballs] available from Ralink<br />
<br />
Also see [[Rt2870]]<br />
<br />
====rtl8180====<br />
Realtek rtl8180 PCI/Cardbus 802.11b now fully supported in the kernel<br />
<pre>modprobe rtl8180</pre><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, which can be installed like this: <br />
<pre>pacman -S rt2x00-rt71w-fw</pre><br />
<pre>pacman -S rt2x00-rt61-fw</pre><br />
..depending on the chipset.<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 rt2x00 driver (rt2500pci module) is preferred and 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). "RT61" has now been made largely obsolete by the in-kernel rt2x00 driver (see above), although there may be cases where the legacy driver performs better.<br />
<br />
See the [[RT61_Wireless|RT61 wiki page]].<br />
<br />
====RT73 (ie Ralink RT2571)====<br />
For USB devices based on Ralink's later generation of 802.11g chipsets (including those supporting proprietary MIMO modes).<br />
<br />
Several USB WiFi dongles use this chipset, including the Linksys WUSB54GC and the Belkin Wireless G USB key (F5D7050 v3000) .<br />
<br />
"RT73" has now been made largely obsolete by the in-kernel rt2x00 driver (see above), although there may be cases where the legacy driver performs better. <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-project.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 />
====ath9k====<br />
<br />
ath9k is Atheros' officially supported driver for the newer 11n chipsets. All of the chips with 11n capabilities are supported, with a maximum throughput around 180 Mbps. To see a complete list of supported hardware, check this [http://wireless.kernel.org/en/users/Drivers/ath9k page].<br />
<br />
Working modes: Station, AP and Adhoc.<br />
<br />
ath9k has been part of the kernel as of 2.6.27. But it has undergone some heavy development, and the changes haven't propagated to the mainline kernel tree yet.<br />
The best solution would be to use the [http://wireless.kernel.org/en/users/Download compat-wireless] package for now.<br />
A [https://lists.ath9k.org/mailman/listinfo/ath9k-devel mailing list] exists for support and development related discussions.<br />
<br />
====ipw2100 and ipw2200====<br />
Depending on which of the chips you have, use either:<br />
<br />
'''ipw2100-fw'''<br />
pacman -S ipw2100-fw<br />
<br />
or:<br />
<br />
'''ipw2200-fw'''<br />
pacman -S 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 your kernel image with: <br />
<pre>mkinitcpio -g /boot/kernel26.img</pre><br />
<br />
To enable radiotap interface:<br />
# rmmod ipw2200<br />
# modprobe ipw2200 rtap_iface=1<br />
<br />
====iwl3945, iwl4965 and iwl5000-series====<br />
<br />
'''I'''ntel's open source '''W'''iFi drivers for '''L'''inux (See [http://intellinuxwireless.org iwlwifi]) will work for both the 3945 and 4965 chipsets since kernel v2.6.24. And iwl5000-series chipsets (including 5100BG, 5100ABG, 5100AGN, 5300AGN and 5350AGN) module has been supported since '''kernel 2.6.27''', by the intree driver '''iwlagn'''.<br />
<br />
{{Box Note | You must install the '''firmware''' that corresponds to your chipset. }}<br />
<br />
# pacman -S iwlwifi-3945-ucode<br />
or:<br />
# pacman -S iwlwifi-4965-ucode<br />
or:<br />
# pacman -S iwlwifi-5000-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 -a''' 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 -a''' 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 />
* By default iwl3945 is configured to only work with networks on channels 1-11. Higher ranges are not allowed in some parts of the world (US). In the EU however channels 12 and 13 are used quite common. To make iwl3945 scan for all channels, add "options cfg80211 ieee80211_regdom=EU" to /etc/modprobe.d/options. With "iwlist f" you can check which channels are allowed.<br />
* If you want to enable more channels on Intel Wifi 5100 (and quite possible other cards too) you can do that with the crda package. After install, edit /etc/conf.d/wireless-regdom and uncomment the line where your country code is found. Add wireless-regdom to your DAEMONS in rc.conf and restart (which is the easiest thing to do). You should now, when writing sudo iwlist wlan0 channel, have access to more channels (depending on your location).<br />
<br />
====ipw3945 (Deprecated Method)====<br />
{{Box Note | ''The ipw3945 driver is no longer actively developed, and the iwlwifi driver (described above) should work perfectly, but may conflict with the former one. So, only one of them should be installed. If you choose to use the iwlwifi driver you still do need the '''ipw3945-ucode''' package though.''}}<br />
# pacman -S ipw3945 ipw3945-ucode ipw3945d<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 />
<br />
Note: Some orinoco chipsets are Hermes I/II. You can use http://aur.archlinux.org/packages.php?ID=9637 to replace the orinoco driver and gain WPA support. See http://ubuntuforums.org/showthread.php?p=2154534#post2154534 for more information.<br />
<br />
To use the driver I blacklisted orinoco_cs in rc.conf (!orinoco_cs in the modules array) and added wlags49_h1_cs to the modules array. Example:<br />
<br />
<pre>MODULES=(!snd_pcsp !eepro100 !orinoco_cs wlags49_h1_cs)</pre><br />
<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 />
If that didn't work, try this:<br />
<br />
*Reload the prism module (modprobe p54usb or modprobe p54pci, depending on your hardware)<br />
alternatively remove your wifi card and then reconnect it<br />
*Use the "dmesg" command, and look at the end of the output it prints out.<br />
Look for a section looking like this: <br />
<br />
firmware: requesting '''isl3887usb_bare'''<br />
p54: LM86 firmware<br />
p54: FW rev 2.5.8.0 - Softmac protocol 3.0<br />
<br />
and try renaming the firmware file to the name corresponding to the part bolded here.<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.<br />
<br />
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 />
For another way to determine which firmware revision number to use, see the [http://acx100.sourceforge.net/wiki/Firmware "Which firmware" section of the acx100.sourceforge wiki page] page. For ACX100, you can follow the links provided there, to a table of card model number vs. "firmware files known to work"; you can figure out the rev. number you need, by looking at the suffix there. E.g. a dlink_dwl650+ uses "1.9.8.b", in which case you'd do this:<br />
ln -s /usr/share/tiacx/acx100_1.9.8.b/* /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 />
'''NOTE:''' The open-source acx driver does not support WPA/RSN encryption. NDISWRAPPER will have to be used with the windows driver to enable the enhanced encryption. See ndiswrapper, this page, for more details.<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 b43-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 />
<br />
Either install the "b43-firmware" package from [http://aur.archlinux.org/packages.php?ID=21690 AUR], or perform the following steps manually.<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.<br />
You may want to add b43 into the modules section of your rc.conf file.<pre>MODULES=(...b43 !bcm43xx !ndiswrapper...)</pre><br />
Good luck!<br />
<br />
====broadcom-wl====<br />
For recent Broadcom 43xx cards not supported by bcm43xx or b43. Not just for 4312 cards. See the [[Broadcom_BCM4312|Broadcom 4312 wiki page]]. It is available in [http://aur.archlinux.org/packages.php?ID=19514 AUR]. These chipsets are used in most Dell laptops, among others.<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 />
--[[User:Willey|Willey]] 22:32, 20 September 2008 (EDT)<br />
<br />
==Test Installation==<br />
After loading your driver run<br />
iwconfig<br />
and see if a wireless interface (wlan''x'', eth''x'', ath''x'') is recognized<br />
<br />
If <code>iwlist scan</code> displays <code>Interface doesn't support scanning</code> then you probably forgot to install the firmware.<br />
<br />
= Part II: Wireless Management =<br />
<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 />
Procedure and tools you’ll need will depend on several factors:<br />
* The '''easiness of configuration management''', from a completely manual setup procedure that you’ll need to repeat at each boot to a software-managed, automatic, autostarting solution<br />
* The '''encryption type''' (or not) that protects the wireless network<br />
* If you need '''network profiles''', i.e. if your computer will frequently change networks (such as a laptop)<br />
<br />
== Management methods ==<br />
<br />
This table shows the different methods that can be used to activate and manage a wireless network connection, depending on the encryption and management types, and the various tools that are required. Although there may be other possibilities, these are the most frequently used:<br />
{| border="1"<br />
! Management || No encryption/WEP || WPA/WPA2 PSK<br />
|-<br />
| Manual, need to repeat at each computer reboot || <code>ifconfig + iwconfig + dhcpcd/ifconfig</code> || <code>ifconfig + iwconfig + wpa_supplicant + dhcpcd/ifconfig</code><br />
|-<br />
| Automatically managed, centralized without network profile support || define interface in <code>/etc/rc.conf</code> || not covered<br />
|-<br />
| Automatically managed, with network profiles support || colspan="2" align="center" | <code>Netcfg, wicd, NetworkManager, etc…</code><br />
|}<br />
<br />
<br />
Whatever your choice, you should try to connect using the manual method first. This will help you understand the different steps that are required and debug them in case a problem arose. Another tip: if possible (e.g. if you admin your wifi access point), try connecting with no encryption, to check everything works. Then try using encryption, either WEP (simpler to configure) or WPA.<br />
<br />
=== Manual setup ===<br />
<br />
The programs provided by the package '''wireless_tools''' are the basic set of tools to set up a wireless network. Moreover, if you use WPA/WPA2 encryption, you will need the package '''wpa_supplicant'''. These powerful userspace console tools work extremely well and allow complete, manual control from the shell.<br />
<br />
These examples assume your wireless device is <code>wlan0</code>. Replace <code>wlan0</code> with the appropriate device name.<br />
{{Box Note | Depending on your hardware and encryption type, some of these steps may not be necessary. Some cards are known to require interface activation and/or access point scanning before being associated to an access point and being given an IP address. Some experimentation may be required. For instance, WPA/WPA2 users may directly try to activate their wireless network from step 3.}}<br />
<br />
1. ''(Optional, may be required)'' Some cards require that the kernel interface be activated before you can use the wireless_tools:<br />
# ifconfig wlan0 up<br />
<br />
2. ''(Optional, may be required)'' See what access points are available:<br />
# iwlist wlan0 scan<br />
We assume you want to use the essid named <code>MyEssid</code>.<br />
<br />
3. Depending on the encryption, you need to associate your wireless device with the access point to use and pass the encryption key.<br />
* ''No encryption''<br />
# iwconfig wlan0 essid "MyEssid"<br />
* ''WEP''<br />
using an hexadecimal key:<br />
# iwconfig wlan0 essid "MyEssid" key 1234567890<br />
using an ascii key:<br />
# iwconfig wlan0 essid "MyEssid" key s:asciikey<br />
* ''WPA/WPA2''<br />
You need to edit the <code>/etc/wpa_supplicant.conf</code> file as described in [[WPA_Supplicant]]. Then, issue this command:<br />
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf<br />
This is assuming your device uses the <code>wext</code> driver. If this does not work, you may need to adjust these options. Check [[WPA_Supplicant]] for more information and troubleshooting.<br />
<br />
4. Finally, provide an IP address to the network interface. 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 />
{{Box Note | Although the manual configuration method will help troubleshoot wireless problems, you will have to retype every command each time you reboot.}}<br />
<br />
=== Automatic connection - Network daemon ===<br />
<br />
{{Box Note | This method and configuration examples are only valid for unencrypted or WEP-encrypted networks, which are particularly unsecure. To use WPA/WPA2, you'll need to use other solutions such as such as '''[[netcfg]]''' or '''[[wicd]]'''. Also, avoid mixing these methods as they may create a conflict and prevent the wireless card from functioning.}}<br />
<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>)'''. The name of the network goes in place of '''MyEssid'''.<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 />
<br />
Not all wireless cards are <code>wlan0</code>. Determine your wireless interface with ifconfig -a. <br />
Atheros-based cards, for example, are typically <code>ath0</code>, so change <code>wlan_wlan0</code> 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 />
{{Box Note | These solutions are limited: for a laptop which is always on the move it would be good to have multiple [[network profiles]] and be able to easily switch from one to another. That's the aim of network managers, such as '''[[netcfg]]'''.}}<br />
<br />
=== Automatic connection - [[Network Profiles|netcfg]] ===<br />
<br />
[[Network Profiles|netcfg]] provides a '''versatile, robust and fast''' solution to networking on Arch.<br />
<br />
It uses a profile based setup and is capable of detection and connection to a wide range of network types. This is no harder than using graphical tools. Following the directions above, you can get a list of wireless networks. Then, as with graphical tools, you will need a password.<br />
<br />
''Detailed documentation [[Network Profiles]]''<br />
<br />
''Notes for developmental version [[Network Profiles development]]''<br />
<br />
<br />
<br />
=== Other network managers ===<br />
<br />
There are a number of wireless management solutions available to Arch Linux users as an alternative to the above.<br />
<br />
====Autowifi====<br />
Autowifi is a daemon that configures your wireless network automatically depending on the ESSID. Once configured, no user interaction is necessary and no GUI tools are required.<br />
<br />
For more information, see the [[Autowifi]] wiki.<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 />
= See Also =<br />
*[[Sharing ppp connection with wlan interface]]<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 />
*[https://lists.anl.gov/mailman/listinfo/wifi-radar Wifi Radar] - Wifi Radar information page<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>
Iphitus
https://wiki.archlinux.org/index.php?title=Network_configuration/Wireless&diff=70088
Network configuration/Wireless
2009-06-06T09:09:37Z
<p>Iphitus: Adds nothing useful to the wiki, incorrect, out of place. Undo revision 68759 by Linfan (Talk)</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|Español|Wireless_Setup_(Español)}}<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_entry|Türkçe|Kablosuz Bağlantı}}<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 under the '''base-devel''' category. (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 the Linux kernel supports your hardware. You can find your card with 'lspci | grep -i net'. The [https://help.ubuntu.com/community/WifiDocs/WirelessCardsSupported Ubuntu Wiki] has an extensive list of wireless cards and whether or not they are supported by available linux kernel drivers.<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://wireless.kernel.org/en/users/Drivers/ath5k ath5k] is a completely FOSS driver (without a binary blob, unlike Madwifi) for Atheros chipsets.<br />
#*[http://wireless.kernel.org/en/users/Drivers/ath9k ath9k] is Atheros' official driver for the newer 11n chipsets (AR5416, AR5418, AR9160, AR9280, AR9281, AR9285).<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://intellinuxwireless.org/?p=iwlwifi/ iwlwifi-3945-ucode] for Intel Pro/Wireless 3945 AB/G Mini PCI-E<br />
#*[http://intellinuxwireless.org/?p=iwlwifi/ iwlwifi-4965-ucode] for Intel Pro/Wireless 4965 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 />
#*[http://www.broadcom.com/support/802.11/linux_sta.php broadcom-wl] for recent 43xx Broadcom cards not supported by bcm43xx or b43.<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 />
#*Also, [http://wireless.kernel.org/en/users/Devices this page] has a matrix of supported 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 GNU/Linux (however, this is rarely the case)<br />
<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''. At boot, 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) under the '''base-devel''' category. <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 />
<br />
===Wireless Quickstart===<br />
The general procedure will be:<br />
<br />
* Identify your interface and appropriate module:<br />
# hwdetect --show-net<br />
or<br />
# lspci | grep -i net <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>(give the essid (the 'network name') of the network in quotes), e.g.:<br />
# iwconfig ath0 essid "linksys" key 0241baf34c<br />
If your WEP key is ASCII, prefix with <code>s:</code>, e.g.:<br />
# iwconfig ath0 essid linksys key s:mywepkey<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 />
If you are using '''WPA''', refer to [[#WPA/WPA2|WPA/WPA2]] below.<br />
<br />
===Drivers and Firmware===<br />
Methods and procedures for installing drivers for various chipsets are covered below. In addition, certain chipsets require the installation of corresponding ''firmware''. (Also covered below).<br />
<br />
====wlan-ng====<br />
Packages: '''wlan-ng26-utils'''<br />
<br />
This driver support PRISM based cards, which are hard to find now. The PRISM card is an IEEE 802.11 compliant 2.4 GHz DSSS WLAN network interface card that uses the Intersil PRISM chipset for its radio functions and the AMD PCNet-Mobile chip (AM79C930) for its Media Access Controller (MAC) function. The supported adapters can be found from here: http://www.linux-wlan.org/docs/wlan_adapters.html.gz<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 />
See http://www.linux-wlan.org/<br />
<br />
====rt2870====<br />
See [[Rt2870]]<br />
<br />
====rtl8180====<br />
Realtek rtl8180 PCI/Cardbus 802.11b now fully supported in the kernel<br />
<pre>modprobe rtl8180</pre><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, which can be installed like this: <br />
<pre>pacman -S rt2x00-rt71w-fw</pre><br />
<pre>pacman -S rt2x00-rt61-fw</pre><br />
..depending on the chipset.<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 rt2x00 driver (rt2500pci module) is preferred and 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). "RT61" has now been made largely obsolete by the in-kernel rt2x00 driver (see above), although there may be cases where the legacy driver performs better.<br />
<br />
See the [[RT61_Wireless|RT61 wiki page]].<br />
<br />
====RT73 (ie Ralink RT2571)====<br />
For USB devices based on Ralink's later generation of 802.11g chipsets (including those supporting proprietary MIMO modes).<br />
<br />
Several USB WiFi dongles use this chipset, including the Linksys WUSB54GC and the Belkin Wireless G USB key (F5D7050 v3000) .<br />
<br />
"RT73" has now been made largely obsolete by the in-kernel rt2x00 driver (see above), although there may be cases where the legacy driver performs better. <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-project.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 />
====ath9k====<br />
<br />
ath9k is Atheros' officially supported driver for the newer 11n chipsets. All of the chips with 11n capabilities are supported, with a maximum throughput around 180 Mbps. To see a complete list of supported hardware, check this [http://wireless.kernel.org/en/users/Drivers/ath9k page].<br />
<br />
Working modes: Station, AP and Adhoc.<br />
<br />
ath9k has been part of the kernel as of 2.6.27. But it has undergone some heavy development, and the changes haven't propagated to the mainline kernel tree yet.<br />
The best solution would be to use the [http://wireless.kernel.org/en/users/Download compat-wireless] package for now.<br />
A [https://lists.ath9k.org/mailman/listinfo/ath9k-devel mailing list] exists for support and development related discussions.<br />
<br />
====ipw2100 and ipw2200====<br />
Depending on which of the chips you have, use either:<br />
<br />
'''ipw2100-fw'''<br />
pacman -S ipw2100-fw<br />
<br />
or:<br />
<br />
'''ipw2200-fw'''<br />
pacman -S 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 your kernel image with: <br />
<pre>mkinitcpio -g /boot/kernel26.img</pre><br />
<br />
To enable radiotap interface:<br />
# rmmod ipw2200<br />
# modprobe ipw2200 rtap_iface=1<br />
<br />
====iwl3945, iwl4965 and iwl5000-series====<br />
<br />
'''I'''ntel's open source '''W'''iFi drivers for '''L'''inux (See [http://intellinuxwireless.org iwlwifi]) will work for both the 3945 and 4965 chipsets since kernel v2.6.24. And iwl5000-series chipsets (including 5100BG, 5100ABG, 5100AGN, 5300AGN and 5350AGN) module has been supported since '''kernel 2.6.27''', by the intree driver '''iwlagn'''.<br />
<br />
{{Box Note | You must install the '''firmware''' that corresponds to your chipset. }}<br />
<br />
# pacman -S iwlwifi-3945-ucode<br />
or:<br />
# pacman -S iwlwifi-4965-ucode<br />
or:<br />
# pacman -S iwlwifi-5000-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 -a''' 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 -a''' 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 />
* By default iwl3945 is configured to only work with networks on channels 1-11. Higher ranges are not allowed in some parts of the world (US). In the EU however channels 12 and 13 are used quite common. To make iwl3945 scan for all channels, add "options cfg80211 ieee80211_regdom=EU" to /etc/modprobe.d/options. With "iwlist f" you can check which channels are allowed.<br />
* If you want to enable more channels on Intel Wifi 5100 (and quite possible other cards too) you can do that with the crda package. After install, edit /etc/conf.d/wireless-regdom and uncomment the line where your country code is found. Add wireless-regdom to your DAEMONS in rc.conf and restart (which is the easiest thing to do). You should now, when writing sudo iwlist wlan0 channel, have access to more channels (depending on your location).<br />
<br />
====ipw3945 (Deprecated Method)====<br />
{{Box Note | ''The ipw3945 driver is no longer actively developed, and the iwlwifi driver (described above) should work perfectly, but may conflict with the former one. So, only one of them should be installed. If you choose to use the iwlwifi driver you still do need the '''ipw3945-ucode''' package though.''}}<br />
# pacman -S ipw3945 ipw3945-ucode ipw3945d<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 />
<br />
Note: Some orinoco chipsets are Hermes I/II. You can use http://aur.archlinux.org/packages.php?ID=9637 to replace the orinoco driver and gain WPA support. See http://ubuntuforums.org/showthread.php?p=2154534#post2154534 for more information.<br />
<br />
To use the driver I blacklisted orinoco_cs in rc.conf (!orinoco_cs in the modules array) and added wlags49_h1_cs to the modules array. Example:<br />
<br />
<pre>MODULES=(!snd_pcsp !eepro100 !orinoco_cs wlags49_h1_cs)</pre><br />
<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 />
If that didn't work, try this:<br />
<br />
*Reload the prism module (modprobe p54usb or modprobe p54pci, depending on your hardware)<br />
alternatively remove your wifi card and then reconnect it<br />
*Use the "dmesg" command, and look at the end of the output it prints out.<br />
Look for a section looking like this: <br />
<br />
firmware: requesting '''isl3887usb_bare'''<br />
p54: LM86 firmware<br />
p54: FW rev 2.5.8.0 - Softmac protocol 3.0<br />
<br />
and try renaming the firmware file to the name corresponding to the part bolded here.<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.<br />
<br />
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 />
For another way to determine which firmware revision number to use, see the [http://acx100.sourceforge.net/wiki/Firmware "Which firmware" section of the acx100.sourceforge wiki page] page. For ACX100, you can follow the links provided there, to a table of card model number vs. "firmware files known to work"; you can figure out the rev. number you need, by looking at the suffix there. E.g. a dlink_dwl650+ uses "1.9.8.b", in which case you'd do this:<br />
ln -s /usr/share/tiacx/acx100_1.9.8.b/* /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 />
'''NOTE:''' The open-source acx driver does not support WPA/RSN encryption. NDISWRAPPER will have to be used with the windows driver to enable the enhanced encryption. See ndiswrapper, this page, for more details.<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 b43-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 />
<br />
Either install the "b43-firmware" package from [http://aur.archlinux.org/packages.php?ID=21690 AUR], or perform the following steps manually.<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.<br />
You may want to add b43 into the modules section of your rc.conf file.<pre>MODULES=(...b43 !bcm43xx !ndiswrapper...)</pre><br />
Good luck!<br />
<br />
====broadcom-wl====<br />
For recent Broadcom 43xx cards not supported by bcm43xx or b43. Not just for 4312 cards. See the [[Broadcom_BCM4312|Broadcom 4312 wiki page]]. It is available in [http://aur.archlinux.org/packages.php?ID=19514 AUR]. These chipsets are used in most Dell laptops, among others.<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 />
--[[User:Willey|Willey]] 22:32, 20 September 2008 (EDT)<br />
<br />
==Test Installation==<br />
After loading your driver run<br />
iwconfig<br />
and see if a wireless interface (wlan''x'', eth''x'', ath''x'') is recognized<br />
<br />
If <code>iwlist scan</code> displays <code>Interface doesn't support scanning</code> then you probably forgot to install the firmware.<br />
<br />
= Part II: Wireless Management =<br />
<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 />
Procedure and tools you’ll need will depend on several factors:<br />
* The '''easiness of configuration management''', from a completely manual setup procedure that you’ll need to repeat at each boot to a software-managed, automatic, autostarting solution<br />
* The '''encryption type''' (or not) that protects the wireless network<br />
* If you need '''network profiles''', i.e. if your computer will frequently change networks (such as a laptop)<br />
<br />
== Management methods ==<br />
<br />
This table shows the different methods that can be used to activate and manage a wireless network connection, depending on the encryption and management types, and the various tools that are required. Although there may be other possibilities, these are the most frequently used:<br />
{| border="1"<br />
! Management || No encryption/WEP || WPA/WPA2 PSK<br />
|-<br />
| Manual, need to repeat at each computer reboot || <code>ifconfig + iwconfig + dhcpcd/ifconfig</code> || <code>ifconfig + iwconfig + wpa_supplicant + dhcpcd/ifconfig</code><br />
|-<br />
| Automatically managed, centralized without network profile support || define interface in <code>/etc/rc.conf</code> || not covered<br />
|-<br />
| Automatically managed, with network profiles support || colspan="2" align="center" | <code>Netcfg, wicd, NetworkManager, etc…</code><br />
|}<br />
<br />
<br />
Whatever your choice, you should try to connect using the manual method first. This will help you understand the different steps that are required and debug them in case a problem arose. Another tip: if possible (e.g. if you admin your wifi access point), try connecting with no encryption, to check everything works. Then try using encryption, either WEP (simpler to configure) or WPA.<br />
<br />
=== Manual setup ===<br />
<br />
The programs provided by the package '''wireless_tools''' are the basic set of tools to set up a wireless network. Moreover, if you use WPA/WPA2 encryption, you will need the package '''wpa_supplicant'''. These powerful userspace console tools work extremely well and allow complete, manual control from the shell.<br />
<br />
These examples assume your wireless device is <code>wlan0</code>. Replace <code>wlan0</code> with the appropriate device name.<br />
{{Box Note | Depending on your hardware and encryption type, some of these steps may not be necessary. Some cards are known to require interface activation and/or access point scanning before being associated to an access point and being given an IP address. Some experimentation may be required. For instance, WPA/WPA2 users may directly try to activate their wireless network from step 3.}}<br />
<br />
1. ''(Optional, may be required)'' Some cards require that the kernel interface be activated before you can use the wireless_tools:<br />
# ifconfig wlan0 up<br />
<br />
2. ''(Optional, may be required)'' See what access points are available:<br />
# iwlist wlan0 scan<br />
We assume you want to use the essid named <code>MyEssid</code>.<br />
<br />
3. Depending on the encryption, you need to associate your wireless device with the access point to use and pass the encryption key.<br />
* ''No encryption''<br />
# iwconfig wlan0 essid "MyEssid"<br />
* ''WEP''<br />
using an hexadecimal key:<br />
# iwconfig wlan0 essid "MyEssid" key 1234567890<br />
using an ascii key:<br />
# iwconfig wlan0 essid "MyEssid" key s:asciikey<br />
* ''WPA/WPA2''<br />
You need to edit the <code>/etc/wpa_supplicant.conf</code> file as described in [[WPA_Supplicant]]. Then, issue this command:<br />
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf<br />
This is assuming your device uses the <code>wext</code> driver. If this does not work, you may need to adjust these options. Check [[WPA_Supplicant]] for more information and troubleshooting.<br />
<br />
4. Finally, provide an IP address to the network interface. 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 />
{{Box Note | Although the manual configuration method will help troubleshoot wireless problems, you will have to retype every command each time you reboot.}}<br />
<br />
=== Automatic connection - Network daemon ===<br />
<br />
{{Box Note | This method and configuration examples are only valid for unencrypted or WEP-encrypted networks, which are particularly unsecure. To use WPA/WPA2, you'll need to use other solutions such as such as '''[[netcfg]]''' or '''[[wicd]]'''. Also, avoid mixing these methods as they may create a conflict and prevent the wireless card from functioning.}}<br />
<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>)'''. The name of the network goes in place of '''MyEssid'''.<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 />
<br />
Not all wireless cards are <code>wlan0</code>. Determine your wireless interface with ifconfig -a. <br />
Atheros-based cards, for example, are typically <code>ath0</code>, so change <code>wlan_wlan0</code> 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 />
{{Box Note | These solutions are limited: for a laptop which is always on the move it would be good to have multiple [[network profiles]] and be able to easily switch from one to another. That's the aim of network managers, such as '''[[netcfg]]'''.}}<br />
<br />
=== Automatic connection - [[Network Profiles|netcfg]] ===<br />
<br />
[[Network Profiles|netcfg]] provides a '''versatile, robust and fast''' solution to networking on Arch.<br />
<br />
It uses a profile based setup and is capable of detection and connection to a wide range of network types. This is no harder than using graphical tools. Following the directions above, you can get a list of wireless networks. Then, as with graphical tools, you will need a password.<br />
<br />
''Detailed documentation [[Network Profiles]]''<br />
<br />
''Notes for developmental version [[Network Profiles development]]''<br />
<br />
<br />
<br />
=== Other network managers ===<br />
<br />
There are a number of wireless management solutions available to Arch Linux users as an alternative to the above.<br />
<br />
====Autowifi====<br />
Autowifi is a daemon that configures your wireless network automatically depending on the ESSID. Once configured, no user interaction is necessary and no GUI tools are required.<br />
<br />
For more information, see the [[Autowifi]] wiki.<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 />
= See Also =<br />
*[[Sharing ppp connection with wlan interface]]<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 />
*[https://lists.anl.gov/mailman/listinfo/wifi-radar Wifi Radar] - Wifi Radar information page<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>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=70087
Netcfg
2009-06-06T07:06:08Z
<p>Iphitus: /* Step 1 */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Network Profiles}}<br />
{{i18n_entry|简体中文|Netcfg2网络配置}}<br />
{{i18n_entry|Türkçe|Ağ Profilleri}}<br />
{{i18n_links_end}}<br />
<br />
==Quickstart==<br />
===Step 1===<br />
# pacman -Sy core/netcfg<br />
or<br />
# pacman -Sy testing/netcfg<br />
<br />
{{Box Note | Presently the [testing] version is recommended as it contains many fixes and improved documentation, however this document is equally applicable for the [core] version -- iphitus }}<br />
<br />
===Step 2===<br />
Copy an example configuration from /etc/network.d/examples/ to /etc/network.d/mynetwork. You may use another name instead of "mynetwork".<br />
<br />
Depending on your security and connection, use the following examples from /etc/network.d/examples/<br />
* '''WEP hex key''' wireless-wep<br />
* '''WEP string key''' wireless-wep-string-key<br />
* '''WPA passphrase''' wireless-wpa<br />
* '''WPA enterprise''' wireless-wpa-config<br />
* '''Wired connection - dhcp''' ethernet-dhcp<br />
* '''Wired connection - static IP''' ethernet-static<br />
* '''Wired connection - iproute configuration''' ethernet-iproute<br />
<br />
===Step 3===<br />
Modify your configuration file new configuration file, /etc/network.d/mynetwork<br />
<br />
* Set INTERFACE= to your wireless or ethernet interface. This can be checked with ifconfig and iwconfig.<br />
* '''Wireless''' - Make sure you set your ESSID and KEY correctly. Typos in these are common errors.<br />
* '''Wireless - WPA Enterprise''' - You'll need to use an external wpa_supplicant configuration.<br />
<br />
===Step 4===<br />
To connect, simply execute:<br />
# netcfg mynetwork<br />
<br />
If it does not work, have a look at the [[Network Profiles#Troubleshooting|troubleshooting section]] for solutions and how to get help.<br />
<br />
If all goes to plan, you can configure it to [[Network Profiles#Step 4: Connecting on boot|connect automatically or on boot]].<br />
<br />
==Step 1: Install==<br />
Network profiles are handled by the bash scripts available in the netcfg package.<br />
<br />
# pacman -Sy testing/netcfg<br />
<br />
For information relating to the latest development version of netcfg, see [[Network Profiles development]]<br />
<br />
==Step 2: Create the profile(s)==<br />
A profile is a single text file in /etc/network.d which defines variables used by netcfg. The file name will become the name of the profile, and can be anything you wish, it is not a setting involved in the connection.<br />
<br />
The easiest way to create a new profile is to copy one of the example profiles from /etc/network.d/examples and edit it to fit with your network.<br />
<br />
{{Box Note | Example profiles are located in /etc/network.d/examples/. Modifying an example from here is the best way to ensure that you have a configuration suitable for your version of netcfg. }}<br />
<br />
{{Box Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created /etc/network.d/*.conf file (e.g. <tt>chmod 0600 /etc/network.d/*.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
===Configuration Notes===<br />
====Using a string WEP key====<br />
This is for a STRING WEP key, not a HEX WEP key, not a WPA key.<br />
KEY="s:Somepasskey"<br />
<br />
====Ralink legacy drivers rt2500, rt2400 that use iwpriv====<br />
There is no plans to add WPA support to these drivers. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed iwpriv commands and put its path in PRE_UP=""<br />
<br />
====Passing arguments to iwconfig before connecting====<br />
Simply:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where <arguments> can be any valid iwconfig argument. The script then runs "iwconfig $INTERFACE $IWCONFIG"<br />
<br />
For example, setting bssid/ap mac:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supercedes the IWOPTS and WEP_OPTS options which were incompletely implemented.<br />
<br />
==Step 3: Connect==<br />
To connect to a profile just execute the following command ''as root'':<br />
# netcfg <profile-name><br />
To disconnect from a profile:<br />
# netcfg down <profile-name><br />
<br />
Where <profile-name> is the name of the file created in /etc/network.d. For example /etc/network.d/homewireless would simply have a profile name of homewireless<br />
<br />
==Step 4: Connecting on boot==<br />
===net-profiles===<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array, eg: DAEMONS=(... '''net-profiles''' ...).<br />
<br />
====Display a menu at boot====<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu (ie <code>NETWORKS=menu</code>).<br />
<br />
You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
===Automatic detection===<br />
====net-auto====<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line, eg: DAEMONS=(... '''net-auto''' ...).<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
==Troubleshooting==<br />
===Wireless connections===<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
===netcfg error messages===<br />
====Network unavailable====<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue (See Driver Quirks above)<br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
====Wireless Association failed====<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem (See Driver Quirks above)<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
====Unable to get IP address with DHCP====<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
====Not a valid connection, check spelling or look at examples====<br />
You must set CONNECTION= to one of the connection types in /usr/lib/network/connections/. Alternatively use one of the provided configuration examples in /etc/network.d/examples.<br />
<br />
===Driver Quirks (netcfg 2.1 and later)===<br />
{{Box Note | You most likely do NOT need these. Ensure your configuration is correct before considering these. They are for a small range of drivers with unusual issues, many of them older versions. These are workarounds, not solutions. }}<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
===It still doesn't work, what do I do ?===<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely cruicial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also cruicial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
==GUI==<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
==Supplementary tools==<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convinient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in AUR (<code>yaourt -S wifi-select</code>).<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
==FAQ==<br />
===Why doesnt netcfg do ''x''?===<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
===Why doesn't netcfg behave in this way? It makes more sense===<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
===Do I still need ''x'' when I'm using netcfg?===<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=70086
Netcfg
2009-06-06T07:05:51Z
<p>Iphitus: /* Step 1 */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Network Profiles}}<br />
{{i18n_entry|简体中文|Netcfg2网络配置}}<br />
{{i18n_entry|Türkçe|Ağ Profilleri}}<br />
{{i18n_links_end}}<br />
<br />
==Quickstart==<br />
===Step 1===<br />
# pacman -Sy core/netcfg<br />
# pacman -Sy testing/netcfg<br />
<br />
{{Box Note | Presently the [testing] version is recommended as it contains many fixes and improved documentation, however this document is equally applicable for the [core] version -- iphitus }}<br />
<br />
===Step 2===<br />
Copy an example configuration from /etc/network.d/examples/ to /etc/network.d/mynetwork. You may use another name instead of "mynetwork".<br />
<br />
Depending on your security and connection, use the following examples from /etc/network.d/examples/<br />
* '''WEP hex key''' wireless-wep<br />
* '''WEP string key''' wireless-wep-string-key<br />
* '''WPA passphrase''' wireless-wpa<br />
* '''WPA enterprise''' wireless-wpa-config<br />
* '''Wired connection - dhcp''' ethernet-dhcp<br />
* '''Wired connection - static IP''' ethernet-static<br />
* '''Wired connection - iproute configuration''' ethernet-iproute<br />
<br />
===Step 3===<br />
Modify your configuration file new configuration file, /etc/network.d/mynetwork<br />
<br />
* Set INTERFACE= to your wireless or ethernet interface. This can be checked with ifconfig and iwconfig.<br />
* '''Wireless''' - Make sure you set your ESSID and KEY correctly. Typos in these are common errors.<br />
* '''Wireless - WPA Enterprise''' - You'll need to use an external wpa_supplicant configuration.<br />
<br />
===Step 4===<br />
To connect, simply execute:<br />
# netcfg mynetwork<br />
<br />
If it does not work, have a look at the [[Network Profiles#Troubleshooting|troubleshooting section]] for solutions and how to get help.<br />
<br />
If all goes to plan, you can configure it to [[Network Profiles#Step 4: Connecting on boot|connect automatically or on boot]].<br />
<br />
==Step 1: Install==<br />
Network profiles are handled by the bash scripts available in the netcfg package.<br />
<br />
# pacman -Sy testing/netcfg<br />
<br />
For information relating to the latest development version of netcfg, see [[Network Profiles development]]<br />
<br />
==Step 2: Create the profile(s)==<br />
A profile is a single text file in /etc/network.d which defines variables used by netcfg. The file name will become the name of the profile, and can be anything you wish, it is not a setting involved in the connection.<br />
<br />
The easiest way to create a new profile is to copy one of the example profiles from /etc/network.d/examples and edit it to fit with your network.<br />
<br />
{{Box Note | Example profiles are located in /etc/network.d/examples/. Modifying an example from here is the best way to ensure that you have a configuration suitable for your version of netcfg. }}<br />
<br />
{{Box Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created /etc/network.d/*.conf file (e.g. <tt>chmod 0600 /etc/network.d/*.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
===Configuration Notes===<br />
====Using a string WEP key====<br />
This is for a STRING WEP key, not a HEX WEP key, not a WPA key.<br />
KEY="s:Somepasskey"<br />
<br />
====Ralink legacy drivers rt2500, rt2400 that use iwpriv====<br />
There is no plans to add WPA support to these drivers. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed iwpriv commands and put its path in PRE_UP=""<br />
<br />
====Passing arguments to iwconfig before connecting====<br />
Simply:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where <arguments> can be any valid iwconfig argument. The script then runs "iwconfig $INTERFACE $IWCONFIG"<br />
<br />
For example, setting bssid/ap mac:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supercedes the IWOPTS and WEP_OPTS options which were incompletely implemented.<br />
<br />
==Step 3: Connect==<br />
To connect to a profile just execute the following command ''as root'':<br />
# netcfg <profile-name><br />
To disconnect from a profile:<br />
# netcfg down <profile-name><br />
<br />
Where <profile-name> is the name of the file created in /etc/network.d. For example /etc/network.d/homewireless would simply have a profile name of homewireless<br />
<br />
==Step 4: Connecting on boot==<br />
===net-profiles===<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array, eg: DAEMONS=(... '''net-profiles''' ...).<br />
<br />
====Display a menu at boot====<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu (ie <code>NETWORKS=menu</code>).<br />
<br />
You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
===Automatic detection===<br />
====net-auto====<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line, eg: DAEMONS=(... '''net-auto''' ...).<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
==Troubleshooting==<br />
===Wireless connections===<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
===netcfg error messages===<br />
====Network unavailable====<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue (See Driver Quirks above)<br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
====Wireless Association failed====<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem (See Driver Quirks above)<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
====Unable to get IP address with DHCP====<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
====Not a valid connection, check spelling or look at examples====<br />
You must set CONNECTION= to one of the connection types in /usr/lib/network/connections/. Alternatively use one of the provided configuration examples in /etc/network.d/examples.<br />
<br />
===Driver Quirks (netcfg 2.1 and later)===<br />
{{Box Note | You most likely do NOT need these. Ensure your configuration is correct before considering these. They are for a small range of drivers with unusual issues, many of them older versions. These are workarounds, not solutions. }}<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
===It still doesn't work, what do I do ?===<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely cruicial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also cruicial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
==GUI==<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
==Supplementary tools==<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convinient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in AUR (<code>yaourt -S wifi-select</code>).<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
==FAQ==<br />
===Why doesnt netcfg do ''x''?===<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
===Why doesn't netcfg behave in this way? It makes more sense===<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
===Do I still need ''x'' when I'm using netcfg?===<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=70085
Netcfg
2009-06-06T07:04:42Z
<p>Iphitus: /* Step 1 */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Network Profiles}}<br />
{{i18n_entry|简体中文|Netcfg2网络配置}}<br />
{{i18n_entry|Türkçe|Ağ Profilleri}}<br />
{{i18n_links_end}}<br />
<br />
==Quickstart==<br />
===Step 1===<br />
# pacman -Sy testing/netcfg<br />
<br />
{{Box Note | Presently the testing version is recommended as it contains many fixes and improved documentation -- iphitus }}<br />
<br />
===Step 2===<br />
Copy an example configuration from /etc/network.d/examples/ to /etc/network.d/mynetwork. You may use another name instead of "mynetwork".<br />
<br />
Depending on your security and connection, use the following examples from /etc/network.d/examples/<br />
* '''WEP hex key''' wireless-wep<br />
* '''WEP string key''' wireless-wep-string-key<br />
* '''WPA passphrase''' wireless-wpa<br />
* '''WPA enterprise''' wireless-wpa-config<br />
* '''Wired connection - dhcp''' ethernet-dhcp<br />
* '''Wired connection - static IP''' ethernet-static<br />
* '''Wired connection - iproute configuration''' ethernet-iproute<br />
<br />
===Step 3===<br />
Modify your configuration file new configuration file, /etc/network.d/mynetwork<br />
<br />
* Set INTERFACE= to your wireless or ethernet interface. This can be checked with ifconfig and iwconfig.<br />
* '''Wireless''' - Make sure you set your ESSID and KEY correctly. Typos in these are common errors.<br />
* '''Wireless - WPA Enterprise''' - You'll need to use an external wpa_supplicant configuration.<br />
<br />
===Step 4===<br />
To connect, simply execute:<br />
# netcfg mynetwork<br />
<br />
If it does not work, have a look at the [[Network Profiles#Troubleshooting|troubleshooting section]] for solutions and how to get help.<br />
<br />
If all goes to plan, you can configure it to [[Network Profiles#Step 4: Connecting on boot|connect automatically or on boot]].<br />
<br />
==Step 1: Install==<br />
Network profiles are handled by the bash scripts available in the netcfg package.<br />
<br />
# pacman -Sy testing/netcfg<br />
<br />
For information relating to the latest development version of netcfg, see [[Network Profiles development]]<br />
<br />
==Step 2: Create the profile(s)==<br />
A profile is a single text file in /etc/network.d which defines variables used by netcfg. The file name will become the name of the profile, and can be anything you wish, it is not a setting involved in the connection.<br />
<br />
The easiest way to create a new profile is to copy one of the example profiles from /etc/network.d/examples and edit it to fit with your network.<br />
<br />
{{Box Note | Example profiles are located in /etc/network.d/examples/. Modifying an example from here is the best way to ensure that you have a configuration suitable for your version of netcfg. }}<br />
<br />
{{Box Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created /etc/network.d/*.conf file (e.g. <tt>chmod 0600 /etc/network.d/*.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
===Configuration Notes===<br />
====Using a string WEP key====<br />
This is for a STRING WEP key, not a HEX WEP key, not a WPA key.<br />
KEY="s:Somepasskey"<br />
<br />
====Ralink legacy drivers rt2500, rt2400 that use iwpriv====<br />
There is no plans to add WPA support to these drivers. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed iwpriv commands and put its path in PRE_UP=""<br />
<br />
====Passing arguments to iwconfig before connecting====<br />
Simply:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where <arguments> can be any valid iwconfig argument. The script then runs "iwconfig $INTERFACE $IWCONFIG"<br />
<br />
For example, setting bssid/ap mac:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supercedes the IWOPTS and WEP_OPTS options which were incompletely implemented.<br />
<br />
==Step 3: Connect==<br />
To connect to a profile just execute the following command ''as root'':<br />
# netcfg <profile-name><br />
To disconnect from a profile:<br />
# netcfg down <profile-name><br />
<br />
Where <profile-name> is the name of the file created in /etc/network.d. For example /etc/network.d/homewireless would simply have a profile name of homewireless<br />
<br />
==Step 4: Connecting on boot==<br />
===net-profiles===<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array, eg: DAEMONS=(... '''net-profiles''' ...).<br />
<br />
====Display a menu at boot====<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu (ie <code>NETWORKS=menu</code>).<br />
<br />
You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
===Automatic detection===<br />
====net-auto====<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line, eg: DAEMONS=(... '''net-auto''' ...).<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
==Troubleshooting==<br />
===Wireless connections===<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
===netcfg error messages===<br />
====Network unavailable====<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue (See Driver Quirks above)<br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
====Wireless Association failed====<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem (See Driver Quirks above)<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
====Unable to get IP address with DHCP====<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
====Not a valid connection, check spelling or look at examples====<br />
You must set CONNECTION= to one of the connection types in /usr/lib/network/connections/. Alternatively use one of the provided configuration examples in /etc/network.d/examples.<br />
<br />
===Driver Quirks (netcfg 2.1 and later)===<br />
{{Box Note | You most likely do NOT need these. Ensure your configuration is correct before considering these. They are for a small range of drivers with unusual issues, many of them older versions. These are workarounds, not solutions. }}<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
===It still doesn't work, what do I do ?===<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely cruicial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also cruicial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
==GUI==<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
==Supplementary tools==<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convinient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in AUR (<code>yaourt -S wifi-select</code>).<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
==FAQ==<br />
===Why doesnt netcfg do ''x''?===<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
===Why doesn't netcfg behave in this way? It makes more sense===<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
===Do I still need ''x'' when I'm using netcfg?===<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=70084
Netcfg
2009-06-06T06:57:30Z
<p>Iphitus: added quickstart</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Network Profiles}}<br />
{{i18n_entry|简体中文|Netcfg2网络配置}}<br />
{{i18n_entry|Türkçe|Ağ Profilleri}}<br />
{{i18n_links_end}}<br />
<br />
==Quickstart==<br />
===Step 1===<br />
# pacman -Sy testing/netcfg<br />
<br />
{{Box Note | Presently the testing version is recommended -- iphitus }}<br />
===Step 2===<br />
Copy an example configuration from /etc/network.d/examples/ to /etc/network.d/mynetwork. You may use another name instead of "mynetwork".<br />
<br />
Depending on your security and connection, use the following examples from /etc/network.d/examples/<br />
* '''WEP hex key''' wireless-wep<br />
* '''WEP string key''' wireless-wep-string-key<br />
* '''WPA passphrase''' wireless-wpa<br />
* '''WPA enterprise''' wireless-wpa-config<br />
* '''Wired connection - dhcp''' ethernet-dhcp<br />
* '''Wired connection - static IP''' ethernet-static<br />
* '''Wired connection - iproute configuration''' ethernet-iproute<br />
<br />
===Step 3===<br />
Modify your configuration file new configuration file, /etc/network.d/mynetwork<br />
<br />
* Set INTERFACE= to your wireless or ethernet interface. This can be checked with ifconfig and iwconfig.<br />
* '''Wireless''' - Make sure you set your ESSID and KEY correctly. Typos in these are common errors.<br />
* '''Wireless - WPA Enterprise''' - You'll need to use an external wpa_supplicant configuration.<br />
<br />
===Step 4===<br />
To connect, simply execute:<br />
# netcfg mynetwork<br />
<br />
If it does not work, have a look at the [[Network Profiles#Troubleshooting|troubleshooting section]] for solutions and how to get help.<br />
<br />
If all goes to plan, you can configure it to [[Network Profiles#Step 4: Connecting on boot|connect automatically or on boot]].<br />
<br />
==Step 1: Install==<br />
Network profiles are handled by the bash scripts available in the netcfg package.<br />
<br />
# pacman -Sy testing/netcfg<br />
<br />
For information relating to the latest development version of netcfg, see [[Network Profiles development]]<br />
<br />
==Step 2: Create the profile(s)==<br />
A profile is a single text file in /etc/network.d which defines variables used by netcfg. The file name will become the name of the profile, and can be anything you wish, it is not a setting involved in the connection.<br />
<br />
The easiest way to create a new profile is to copy one of the example profiles from /etc/network.d/examples and edit it to fit with your network.<br />
<br />
{{Box Note | Example profiles are located in /etc/network.d/examples/. Modifying an example from here is the best way to ensure that you have a configuration suitable for your version of netcfg. }}<br />
<br />
{{Box Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created /etc/network.d/*.conf file (e.g. <tt>chmod 0600 /etc/network.d/*.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
===Configuration Notes===<br />
====Using a string WEP key====<br />
This is for a STRING WEP key, not a HEX WEP key, not a WPA key.<br />
KEY="s:Somepasskey"<br />
<br />
====Ralink legacy drivers rt2500, rt2400 that use iwpriv====<br />
There is no plans to add WPA support to these drivers. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed iwpriv commands and put its path in PRE_UP=""<br />
<br />
====Passing arguments to iwconfig before connecting====<br />
Simply:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where <arguments> can be any valid iwconfig argument. The script then runs "iwconfig $INTERFACE $IWCONFIG"<br />
<br />
For example, setting bssid/ap mac:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supercedes the IWOPTS and WEP_OPTS options which were incompletely implemented.<br />
<br />
==Step 3: Connect==<br />
To connect to a profile just execute the following command ''as root'':<br />
# netcfg <profile-name><br />
To disconnect from a profile:<br />
# netcfg down <profile-name><br />
<br />
Where <profile-name> is the name of the file created in /etc/network.d. For example /etc/network.d/homewireless would simply have a profile name of homewireless<br />
<br />
==Step 4: Connecting on boot==<br />
===net-profiles===<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array, eg: DAEMONS=(... '''net-profiles''' ...).<br />
<br />
====Display a menu at boot====<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu (ie <code>NETWORKS=menu</code>).<br />
<br />
You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
===Automatic detection===<br />
====net-auto====<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line, eg: DAEMONS=(... '''net-auto''' ...).<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
==Troubleshooting==<br />
===Wireless connections===<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
===netcfg error messages===<br />
====Network unavailable====<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue (See Driver Quirks above)<br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
====Wireless Association failed====<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem (See Driver Quirks above)<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
====Unable to get IP address with DHCP====<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
====Not a valid connection, check spelling or look at examples====<br />
You must set CONNECTION= to one of the connection types in /usr/lib/network/connections/. Alternatively use one of the provided configuration examples in /etc/network.d/examples.<br />
<br />
===Driver Quirks (netcfg 2.1 and later)===<br />
{{Box Note | You most likely do NOT need these. Ensure your configuration is correct before considering these. They are for a small range of drivers with unusual issues, many of them older versions. These are workarounds, not solutions. }}<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
===It still doesn't work, what do I do ?===<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely cruicial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also cruicial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
==GUI==<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
==Supplementary tools==<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convinient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in AUR (<code>yaourt -S wifi-select</code>).<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
==FAQ==<br />
===Why doesnt netcfg do ''x''?===<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
===Why doesn't netcfg behave in this way? It makes more sense===<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
===Do I still need ''x'' when I'm using netcfg?===<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Wpa_supplicant&diff=69953
Wpa supplicant
2009-06-03T10:46:06Z
<p>Iphitus: /* netcfg */ no wonder it didnt work, that config was a mess.... redirect to updated and more accurate info.</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 myssid mypassphrase > /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 />
{{Box Note | Your network information will be stored in plain text format, so you may want to 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 />
===[[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 />
<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>
Iphitus
https://wiki.archlinux.org/index.php?title=ASUS_Eee_PC_1000HE&diff=68865
ASUS Eee PC 1000HE
2009-05-17T08:59:07Z
<p>Iphitus: </p>
<hr />
<div>[[Category:Getting and installing Arch (English)]]<br />
[[Category:HOWTOs (English)]]<br />
[[Category:Laptops (English)]]<br />
{| style="float:right; border: 1px solid #000;" <br />
| '''Device''' || '''Status''' || '''Modules'''<br />
|- <br />
| Intel 945GM || style="color:green" | '''Working''' || xf86-video-intel <br />
|- <br />
| Ethernet || style="color:green" | '''Working''' || atl1e<br />
|-<br />
| Wireless || style="color:green" | '''Working''' || ath9k or rt2860sta<br />
|-<br />
| Bluetooth || style="color:green" | '''Working''' || btusb<br />
|-<br />
| Audio || style="color:green" | '''Working''' || snd_hda_intel<br />
|-<br />
| Camera || style="color:green" | '''Working''' || uvcvideo <br />
|-<br />
| Card Reader || style="color:green" | '''Working''' || <br />
|-<br />
| Function Keys || style="color:green" | '''Working''' || <br />
|}<br />
<br />
=Introduction=<br />
First, feel free to help out!<br />
<br />
Secondly, this wiki page assumes you are using kernel 2.6.29 or greater.<br />
<br />
The stock 2.6.29 kernel works just fine. There is no need for a customized eeePC kernel. These customized kernels used to contain patches to allow the hotkeys and whatnot to work. All of these features have since been merged into the standard kernel.<br />
<br />
=Installation=<br />
Use the 2009.02 installation USB image (see [[Install_from_USB_stick]]). There is out-of-the-box support for the wired and wireless NICs. There are no special instructions for installation. For an in-depth guide on the installation see the [[Beginners_Guide]].<br />
<br />
=Xorg=<br />
This example uses hotplugging. Make sure that you have hal installed and started. Also, don't forget to add hal to the DAEMONS=() array in rc.conf!<br />
<br />
==Sample Config==<br />
Note: The 1000HE also functions correctly without using a xorg.conf!<br />
<br />
Here is a basic xorg config file. Using xrandr, you can switch between the lcd + external display.<br />
Section "ServerLayout"<br />
Identifier "X.org Configured"<br />
Screen 0 "Screen0"<br />
EndSection<br />
<br />
Section "ServerFlags"<br />
Option "DontZap" "false"<br />
EndSection<br />
<br />
Section "Files"<br />
ModulePath "/usr/lib/xorg/modules"<br />
FontPath "/usr/share/fonts/local"<br />
FontPath "/usr/share/fonts/misc"<br />
FontPath "/usr/share/fonts/100dpi:unscaled"<br />
FontPath "/usr/share/fonts/75dpi:unscaled"<br />
FontPath "/usr/share/fonts/TTF"<br />
FontPath "/usr/share/fonts/Type1"<br />
EndSection<br />
<br />
Section "Module"<br />
Load "dri"<br />
Load "glx"<br />
Load "extmod"<br />
Load "record"<br />
Load "dbe"<br />
Load "dri2"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "IntelCard"<br />
Driver "intel"<br />
VendorName "Intel Corporation"<br />
BoardName "Mobile 945GME Express Integrated Graphics Controller"<br />
BusID "PCI:0:2:0"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "ASUS"<br />
ModelName "eeePC 1000he"<br />
Modeline "1024x600" 48.86 1024 1064 1168 1312 600 601 604 622 -Hsync +Vsync<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "IntelCard"<br />
Monitor "Monitor0"<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 1<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 4<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 8<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 15<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 16<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Virtual 1280 1024 #Set to resolution of CRT/External<br />
EndSubSection<br />
EndSection<br />
<br />
==DPI Settings==<br />
In general the autodetected DPI does not fit the smaller resolution very well at all. A good comfortable setting would be 96dpi or 75dpi if you like your fonts really small. An easy way to set your DPI would be to add this to the end of your xserverrc (located in /etc/X11/xinit/).<br />
<br />
exec /usr/bin/X -nolisten tcp '''-dpi 96'''<br />
<br />
==Graphic Performance==<br />
With X.org's new 2D acceleration architecture, EXA, users of the intel driver may experience slowdown with window redrawing and scrolling. A possible solution to this is to override intel's default 2D acceleration, XXA, with the new X.org acceleration. Add this section to the device section of your xorg.conf.<br />
<br />
Option "AccelMethod" "exa" <br />
Option "MigrationHeuristic" "greedy"<br />
<br />
In addition to improving 2D graphics, the card's 3D performance can be [https://bugs.launchpad.net/xserver-xorg-video-intel/+bug/195843 greatly enhanced] by adding this line to your /etc/profile.<br />
<br />
export INTEL_BATCH=1<br />
<br />
See [[Intel_Graphics|Intel Graphics]] for more information.<br />
<br />
==Keyboard==<br />
#Copy /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi to /etc/hal/fdi/policy<br />
#Edit /etc/hal/fdi/policy/10-keymap.fdi and change '''<merge key="input.xkb.layout" type="string">us</merge>''' accordingly<br />
<br />
==Touchpad==<br />
#Install the xf86-input-synaptics package<br />
#Create /etc/hal/fdi/policy/11-x11-synaptics.fdi with the following contents:<br />
<?xml version="1.0" encoding="ISO-8859-1"?><br />
<deviceinfo version="0.2"><br />
<device><br />
<match key="info.product" contains="ETPS/2 Elantech Touchpad"><br />
<merge key="input.x11_driver" type="string">synaptics</merge><br />
<merge key="input.x11_options.SHMConfig" type="string">on</merge><br />
<merge key="input.x11_options.MaxSpeed" type="string">1.00</merge><br />
<merge key="input.x11_options.MinSpeed" type="string">0.75</merge><br />
<merge key="input.x11_options.Emulate3Buttons" type="string">on</merge><br />
<merge key="input.x11_options.VertTwoFingerScroll" type="string">1</merge><br />
<merge key="input.x11_options.HorizTwoFingerScroll" type="string">1</merge><br />
<merge key="input.x11_options.TapButton1" type="string">1</merge><br />
<merge key="input.x11_options.TapButton2" type="string">2</merge><br />
<merge key="input.x11_options.TapButton3" type="string">3</merge><br />
<merge key="input.x11_options.LockedDrags" type="string">1</merge><br />
</match><br />
</device><br />
</deviceinfo><br />
<br />
==xrandr==<br />
For a nice GUI tool, try '''lxrandr'''; it is very simple to use!<br />
<br />
Switch to External Monitor:<br />
xrandr --output LVDS --off --output VGA --auto<br />
<br />
Switch back to eeepc's LCD: <br />
xrandr --output LVDS --auto --output VGA --off<br />
<br />
=ACPI=<br />
==acpi-eeepc-generic==<br />
Install the [http://aur.archlinux.org/packages.php?ID=23318 acpi-eeepc-generic package] from AUR (see [[AUR User Guidelines]]).<br />
You must install version 0.9 or greater, as previous versions do not have support for the 1000HE.<br />
<br />
==Sleep==<br />
Use '''pm-suspend''' instead of the script in acpi-eeepc-generic.<br />
The acpi-eeepc-generic suspend script will cause the system to re-suspend when being woken up or when exiting X!<br />
<br />
==cpufrequtils==<br />
To scale the CPU and possibly save a bit of power, you will want to set up cpufrequtils.<br />
<br />
#pacman -Sy cpufrequtils<br />
#Edit /etc/conf.d/cpufreq <pre>min_freq="1000MHz" max_freq="1.67GHz"</pre> (or 1.60GHz if you have the Atom N270)<br />
#modprobe acpi-cpufreq cpufreq_ondemand cpufreq_powersave<br />
#Add these modules listed above to the MODULES=() array in rc.conf<br />
#/etc/rc.d/cpufreq start<br />
#Add cpufreq to the DAEMONS=() array in rc.conf<br />
<br />
=Hardware=<br />
==Bluetooth==<br />
To turn the bluetooth radio on/off:<br />
<br />
# enable<br />
$ echo 1 > /sys/class/rfkill/rfkill1/state<br />
# disable<br />
$ echo 0 > /sys/class/rfkill/rfkill1/state<br />
<br />
Install the '''bluez-utils''' and '''bluez-libs''' packages, then <tt>modprobe btusb</tt>.<br />
<br />
''Note: in the test repository '''bluez-utils''' and '''bluez-libs''' are merged into a single package, '''bluez'''.''<br />
<br />
See the Arch Linux [[Bluetooth]] and [[Bluetooth Mouse]] wiki pages for more information about configuring and using Bluetooth devices.<br />
<br />
{{Box Note |'''''Switching the Bluetooth Radio on and off does not work on kernel 2.6.28 or below. You need to use kernel 2.6.29 or greater.'''''}}<br />
<br />
==Camera==<br />
<br />
To enable/disable the camera:<br />
<br />
# enable<br />
echo 1 > /sys/devices/platform/eeepc/camera<br />
# disable<br />
echo 0 > /sys/devices/platform/eeepc/camera<br />
<br />
Make sure that the module <tt>uvcvideo</tt> is loaded<br />
<br />
To record video and take photos, you may use '''cheese''' or the [http://aur.archlinux.org/packages.php?ID=15272 '''wxcam'''] package.<br />
<br />
To simply test the camera, you may use <tt>mplayer</tt>:<br />
<br />
mplayer -fps 15 tv://<br />
<br />
The webcam is reported to work with Skype.<br />
<br />
=Info=<br />
==lspci==<br />
00:00.0 Host bridge: Intel Corporation Mobile 945GME Express Memory Controller Hub (rev 03)<br />
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03)<br />
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)<br />
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)<br />
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)<br />
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)<br />
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)<br />
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)<br />
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)<br />
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)<br />
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)<br />
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)<br />
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)<br />
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)<br />
01:00.0 Network controller: Atheros Communications Inc. AR928X Wireless Network Adapter (PCI-Express) (rev 01)<br />
03:00.0 Ethernet controller: Attansic Technology Corp. L1e Gigabit Ethernet Adapter (rev b0)<br />
<br />
=Issues=<br />
Laptop suspends while "waking up"<br />
*Use pm-suspend instead of acpi script<br />
<br />
If you have any other issues, make sure you are using kernel 2.6.29 or greater.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=68624
Netcfg
2009-05-12T13:19:32Z
<p>Iphitus: /* Step 3: Connect */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Network Profiles}}<br />
{{i18n_entry|简体中文|Netcfg2网络配置}}<br />
{{i18n_entry|Türkçe|Ağ Profilleri}}<br />
{{i18n_links_end}}<br />
<br />
==Step 1: Install==<br />
Network profiles are handled by the bash scripts available in the netcfg package.<br />
<br />
# pacman -Sy core/netcfg<br />
<br />
For information relating to the latest development version of netcfg, see [[Network Profiles development]]<br />
<br />
==Step 2: Create the profile(s)==<br />
A profile is a single text file in /etc/network.d which defines variables used by netcfg. The file name will become the name of the profile, and can be anything you wish, it is not a setting involved in the connection.<br />
<br />
The easiest way to create a new profile is to copy one of the example profiles from /etc/network.d/examples and edit it to fit with your network.<br />
<br />
{{Box Note | Example profiles are located in /etc/network.d/examples/. Modifying an example from here is the best way to ensure that you have a configuration suitable for your version of netcfg. }}<br />
<br />
{{Box Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created /etc/network.d/*.conf file (e.g. <tt>chmod 0600 /etc/network.d/*.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
===Configuration Notes===<br />
====Using a string WEP key====<br />
This is for a STRING WEP key, not a HEX WEP key, not a WPA key.<br />
KEY="s:Somepasskey"<br />
<br />
====Ralink legacy drivers rt2500, rt2400 that use iwpriv====<br />
There is no plans to add WPA support to these drivers. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed iwpriv commands and put its path in PRE_UP=""<br />
<br />
====Passing arguments to iwconfig before connecting====<br />
Simply:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where <arguments> can be any valid iwconfig argument. The script then runs "iwconfig $INTERFACE $IWCONFIG"<br />
<br />
For example, setting bssid/ap mac:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supercedes the IWOPTS and WEP_OPTS options which were incompletely implemented.<br />
<br />
==Step 3: Connect==<br />
To connect to a profile just execute the following command ''as root'':<br />
# netcfg <profile-name><br />
To disconnect from a profile:<br />
# netcfg down <profile-name><br />
<br />
Where <profile-name> is the name of the file created in /etc/network.d. For example /etc/network.d/homewireless would simply have a profile name of homewireless<br />
<br />
==Step 4: Connecting on boot==<br />
===net-profiles===<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array, eg: DAEMONS=(... '''net-profiles''' ...).<br />
<br />
====Display a menu at boot====<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu (ie <code>NETWORKS=menu</code>).<br />
<br />
You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
===Automatic detection===<br />
====net-auto====<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line.<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
<br />
==Troubleshooting==<br />
===Wireless connections===<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
===netcfg error messages===<br />
====Network unavailable====<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue (See Driver Quirks above)<br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
====Wireless Association failed====<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem (See Driver Quirks above)<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
====Unable to get IP address with DHCP====<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
====Not a valid connection, check spelling or look at examples====<br />
You must set CONNECTION= to one of the connection types in /usr/lib/network/connections/. Alternatively use one of the provided configuration examples in /etc/network.d/examples.<br />
<br />
===Driver Quirks (netcfg 2.1 and later)===<br />
{{Box Note | You most likely do NOT need these. Ensure your configuration is correct before considering these. They are for a small range of drivers with unusual issues, many of them older versions. These are workarounds, not solutions. }}<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
===It still doesn't work, what do I do ?===<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely cruicial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also cruicial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
==GUI==<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
==Supplementary tools==<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convinient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in AUR (<code>yaourt -S wifi-select</code>).<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
==FAQ==<br />
===Why doesnt netcfg do ''x''?===<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
===Why doesn't netcfg behave in this way? It makes more sense===<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
===Do I still need ''x'' when I'm using netcfg?===<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=68607
Netcfg
2009-05-12T05:03:29Z
<p>Iphitus: /* Step 2: Create the profile(s) */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Network Profiles}}<br />
{{i18n_entry|简体中文|Netcfg2网络配置}}<br />
{{i18n_entry|Türkçe|Ağ Profilleri}}<br />
{{i18n_links_end}}<br />
<br />
==Step 1: Install==<br />
Network profiles are handled by the bash scripts available in the netcfg package.<br />
<br />
# pacman -Sy core/netcfg<br />
<br />
For information relating to the latest development version of netcfg, see [[Network Profiles development]]<br />
<br />
==Step 2: Create the profile(s)==<br />
A profile is a single text file in /etc/network.d which defines variables used by netcfg. The file name will become the name of the profile, and can be anything you wish, it is not a setting involved in the connection.<br />
<br />
The easiest way to create a new profile is to copy one of the example profiles from /etc/network.d/examples and edit it to fit with your network.<br />
<br />
{{Box Note | Example profiles are located in /etc/network.d/examples/. Modifying an example from here is the best way to ensure that you have a configuration suitable for your version of netcfg. }}<br />
<br />
{{Box Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created /etc/network.d/*.conf file (e.g. <tt>chmod 0600 /etc/network.d/*.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
===Configuration Notes===<br />
====Using a string WEP key====<br />
This is for a STRING WEP key, not a HEX WEP key, not a WPA key.<br />
KEY="s:Somepasskey"<br />
<br />
====Ralink legacy drivers rt2500, rt2400 that use iwpriv====<br />
There is no plans to add WPA support to these drivers. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed iwpriv commands and put its path in PRE_UP=""<br />
<br />
====Passing arguments to iwconfig before connecting====<br />
Simply:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where <arguments> can be any valid iwconfig argument. The script then runs "iwconfig $INTERFACE $IWCONFIG"<br />
<br />
For example, setting bssid/ap mac:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supercedes the IWOPTS and WEP_OPTS options which were incompletely implemented.<br />
<br />
==Step 3: Connect==<br />
To connect a profile just execute the following command ''as root'':<br />
# netcfg <profile-name><br />
<br />
==Step 4: Connecting on boot==<br />
===net-profiles===<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array, eg: DAEMONS=(... '''net-profiles''' ...).<br />
<br />
====Display a menu at boot====<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu (ie <code>NETWORKS=menu</code>).<br />
<br />
You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
===Automatic detection===<br />
====net-auto====<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line.<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
<br />
==Troubleshooting==<br />
===Wireless connections===<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
===netcfg error messages===<br />
====Network unavailable====<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue (See Driver Quirks above)<br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
====Wireless Association failed====<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem (See Driver Quirks above)<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
====Unable to get IP address with DHCP====<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
====Not a valid connection, check spelling or look at examples====<br />
You must set CONNECTION= to one of the connection types in /usr/lib/network/connections/. Alternatively use one of the provided configuration examples in /etc/network.d/examples.<br />
<br />
===Driver Quirks (netcfg 2.1 and later)===<br />
{{Box Note | You most likely do NOT need these. Ensure your configuration is correct before considering these. They are for a small range of drivers with unusual issues, many of them older versions. These are workarounds, not solutions. }}<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
===It still doesn't work, what do I do ?===<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely cruicial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also cruicial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
==GUI==<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
==Supplementary tools==<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convinient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in AUR (<code>yaourt -S wifi-select</code>).<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
==FAQ==<br />
===Why doesnt netcfg do ''x''?===<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
===Why doesn't netcfg behave in this way? It makes more sense===<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
===Do I still need ''x'' when I'm using netcfg?===<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=68606
Netcfg
2009-05-12T05:03:03Z
<p>Iphitus: /* Configuration Notes */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Network Profiles}}<br />
{{i18n_entry|简体中文|Netcfg2网络配置}}<br />
{{i18n_entry|Türkçe|Ağ Profilleri}}<br />
{{i18n_links_end}}<br />
<br />
==Step 1: Install==<br />
Network profiles are handled by the bash scripts available in the netcfg package.<br />
<br />
# pacman -Sy core/netcfg<br />
<br />
For information relating to the latest development version of netcfg, see [[Network Profiles development]]<br />
<br />
==Step 2: Create the profile(s)==<br />
A profile is a single text file in /etc/network.d which defines variables used by netcfg. The file name will become the name of the profile, and can be anything you wish, it is not a setting involved in the connection.<br />
<br />
The easiest way to create a new profile is to copy one of the example profiles from /etc/network.d/examples and edit it to fit with your network.<br />
<br />
{{Box Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created /etc/network.d/*.conf file (e.g. <tt>chmod 0600 /etc/network.d/*.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
{{Box Note | Example profiles are located in /etc/network.d/examples/. Modifying an example from here is the best way to ensure that you have a configuration suitable for your version of netcfg. }}<br />
<br />
===Configuration Notes===<br />
====Using a string WEP key====<br />
This is for a STRING WEP key, not a HEX WEP key, not a WPA key.<br />
KEY="s:Somepasskey"<br />
<br />
====Ralink legacy drivers rt2500, rt2400 that use iwpriv====<br />
There is no plans to add WPA support to these drivers. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed iwpriv commands and put its path in PRE_UP=""<br />
<br />
====Passing arguments to iwconfig before connecting====<br />
Simply:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where <arguments> can be any valid iwconfig argument. The script then runs "iwconfig $INTERFACE $IWCONFIG"<br />
<br />
For example, setting bssid/ap mac:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supercedes the IWOPTS and WEP_OPTS options which were incompletely implemented.<br />
<br />
==Step 3: Connect==<br />
To connect a profile just execute the following command ''as root'':<br />
# netcfg <profile-name><br />
<br />
==Step 4: Connecting on boot==<br />
===net-profiles===<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array, eg: DAEMONS=(... '''net-profiles''' ...).<br />
<br />
====Display a menu at boot====<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu (ie <code>NETWORKS=menu</code>).<br />
<br />
You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
===Automatic detection===<br />
====net-auto====<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line.<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
<br />
==Troubleshooting==<br />
===Wireless connections===<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
===netcfg error messages===<br />
====Network unavailable====<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue (See Driver Quirks above)<br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
====Wireless Association failed====<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem (See Driver Quirks above)<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
====Unable to get IP address with DHCP====<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
====Not a valid connection, check spelling or look at examples====<br />
You must set CONNECTION= to one of the connection types in /usr/lib/network/connections/. Alternatively use one of the provided configuration examples in /etc/network.d/examples.<br />
<br />
===Driver Quirks (netcfg 2.1 and later)===<br />
{{Box Note | You most likely do NOT need these. Ensure your configuration is correct before considering these. They are for a small range of drivers with unusual issues, many of them older versions. These are workarounds, not solutions. }}<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
===It still doesn't work, what do I do ?===<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely cruicial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also cruicial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
==GUI==<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
==Supplementary tools==<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convinient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in AUR (<code>yaourt -S wifi-select</code>).<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
==FAQ==<br />
===Why doesnt netcfg do ''x''?===<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
===Why doesn't netcfg behave in this way? It makes more sense===<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
===Do I still need ''x'' when I'm using netcfg?===<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=68605
Netcfg
2009-05-12T05:02:36Z
<p>Iphitus: /* Troubleshooting */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Network Profiles}}<br />
{{i18n_entry|简体中文|Netcfg2网络配置}}<br />
{{i18n_entry|Türkçe|Ağ Profilleri}}<br />
{{i18n_links_end}}<br />
<br />
==Step 1: Install==<br />
Network profiles are handled by the bash scripts available in the netcfg package.<br />
<br />
# pacman -Sy core/netcfg<br />
<br />
For information relating to the latest development version of netcfg, see [[Network Profiles development]]<br />
<br />
==Step 2: Create the profile(s)==<br />
A profile is a single text file in /etc/network.d which defines variables used by netcfg. The file name will become the name of the profile, and can be anything you wish, it is not a setting involved in the connection.<br />
<br />
The easiest way to create a new profile is to copy one of the example profiles from /etc/network.d/examples and edit it to fit with your network.<br />
<br />
{{Box Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created /etc/network.d/*.conf file (e.g. <tt>chmod 0600 /etc/network.d/*.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
{{Box Note | Example profiles are located in /etc/network.d/examples/. Modifying an example from here is the best way to ensure that you have a configuration suitable for your version of netcfg. }}<br />
<br />
===Configuration Notes===<br />
<br />
==Step 3: Connect==<br />
To connect a profile just execute the following command ''as root'':<br />
# netcfg <profile-name><br />
<br />
==Step 4: Connecting on boot==<br />
===net-profiles===<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array, eg: DAEMONS=(... '''net-profiles''' ...).<br />
<br />
====Display a menu at boot====<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu (ie <code>NETWORKS=menu</code>).<br />
<br />
You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
===Automatic detection===<br />
====net-auto====<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line.<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
<br />
==Troubleshooting==<br />
===Wireless connections===<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
===netcfg error messages===<br />
====Network unavailable====<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue (See Driver Quirks above)<br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
====Wireless Association failed====<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem (See Driver Quirks above)<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
====Unable to get IP address with DHCP====<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
====Not a valid connection, check spelling or look at examples====<br />
You must set CONNECTION= to one of the connection types in /usr/lib/network/connections/. Alternatively use one of the provided configuration examples in /etc/network.d/examples.<br />
<br />
===Driver Quirks (netcfg 2.1 and later)===<br />
{{Box Note | You most likely do NOT need these. Ensure your configuration is correct before considering these. They are for a small range of drivers with unusual issues, many of them older versions. These are workarounds, not solutions. }}<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
===It still doesn't work, what do I do ?===<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely cruicial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also cruicial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
==GUI==<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
==Supplementary tools==<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convinient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in AUR (<code>yaourt -S wifi-select</code>).<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
==FAQ==<br />
===Why doesnt netcfg do ''x''?===<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
===Why doesn't netcfg behave in this way? It makes more sense===<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
===Do I still need ''x'' when I'm using netcfg?===<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=68604
Netcfg
2009-05-12T05:02:11Z
<p>Iphitus: /* Step 2: Create the profile(s) */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Network Profiles}}<br />
{{i18n_entry|简体中文|Netcfg2网络配置}}<br />
{{i18n_entry|Türkçe|Ağ Profilleri}}<br />
{{i18n_links_end}}<br />
<br />
==Step 1: Install==<br />
Network profiles are handled by the bash scripts available in the netcfg package.<br />
<br />
# pacman -Sy core/netcfg<br />
<br />
For information relating to the latest development version of netcfg, see [[Network Profiles development]]<br />
<br />
==Step 2: Create the profile(s)==<br />
A profile is a single text file in /etc/network.d which defines variables used by netcfg. The file name will become the name of the profile, and can be anything you wish, it is not a setting involved in the connection.<br />
<br />
The easiest way to create a new profile is to copy one of the example profiles from /etc/network.d/examples and edit it to fit with your network.<br />
<br />
{{Box Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created /etc/network.d/*.conf file (e.g. <tt>chmod 0600 /etc/network.d/*.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
{{Box Note | Example profiles are located in /etc/network.d/examples/. Modifying an example from here is the best way to ensure that you have a configuration suitable for your version of netcfg. }}<br />
<br />
===Configuration Notes===<br />
<br />
==Step 3: Connect==<br />
To connect a profile just execute the following command ''as root'':<br />
# netcfg <profile-name><br />
<br />
==Step 4: Connecting on boot==<br />
===net-profiles===<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array, eg: DAEMONS=(... '''net-profiles''' ...).<br />
<br />
====Display a menu at boot====<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu (ie <code>NETWORKS=menu</code>).<br />
<br />
You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
===Automatic detection===<br />
====net-auto====<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line.<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
<br />
==Troubleshooting==<br />
===Wireless connections===<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
===netcfg error messages===<br />
====Network unavailable====<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue (See Driver Quirks above)<br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
====Wireless Association failed====<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem (See Driver Quirks above)<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
====Unable to get IP address with DHCP====<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
====Not a valid connection, check spelling or look at examples====<br />
You must set CONNECTION= to one of the connection types in /usr/lib/network/connections/. Alternatively use one of the provided configuration examples in /etc/network.d/examples.<br />
<br />
===Using a string WEP key===<br />
This is for a STRING WEP key, not a HEX WEP key, not a WPA key.<br />
KEY="s:Somepasskey"<br />
<br />
===Ralink legacy drivers rt2500, rt2400 that use iwpriv===<br />
There is no plans to add WPA support to these drivers. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed iwpriv commands and put its path in PRE_UP=""<br />
<br />
===Passing arguments to iwconfig before connecting===<br />
Simply:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where <arguments> can be any valid iwconfig argument. The script then runs "iwconfig $INTERFACE $IWCONFIG"<br />
<br />
For example, setting bssid/ap mac:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supercedes the IWOPTS and WEP_OPTS options which were incompletely implemented.<br />
<br />
===Driver Quirks (netcfg 2.1 and later)===<br />
{{Box Note | You most likely do NOT need these. Ensure your configuration is correct before considering these. They are for a small range of drivers with unusual issues, many of them older versions. These are workarounds, not solutions. }}<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
===It still doesn't work, what do I do ?===<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely cruicial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also cruicial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
==GUI==<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
==Supplementary tools==<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convinient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in AUR (<code>yaourt -S wifi-select</code>).<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
==FAQ==<br />
===Why doesnt netcfg do ''x''?===<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
===Why doesn't netcfg behave in this way? It makes more sense===<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
===Do I still need ''x'' when I'm using netcfg?===<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=68603
Netcfg
2009-05-12T05:01:38Z
<p>Iphitus: re-order page.</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Network Profiles}}<br />
{{i18n_entry|简体中文|Netcfg2网络配置}}<br />
{{i18n_entry|Türkçe|Ağ Profilleri}}<br />
{{i18n_links_end}}<br />
<br />
==Step 1: Install==<br />
Network profiles are handled by the bash scripts available in the netcfg package.<br />
<br />
# pacman -Sy core/netcfg<br />
<br />
For information relating to the latest development version of netcfg, see [[Network Profiles development]]<br />
<br />
==Step 2: Create the profile(s)==<br />
===Introduction===<br />
A profile is a single text file in /etc/network.d which defines variables used by netcfg. The file name will become the name of the profile, and can be anything you wish, it is not a setting involved in the connection.<br />
<br />
The easiest way to create a new profile is to copy one of the example profiles from /etc/network.d/examples and edit it to fit with your network.<br />
<br />
{{Box Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created /etc/network.d/*.conf file (e.g. <tt>chmod 0600 /etc/network.d/*.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
{{Box Note | Example profiles are located in /etc/network.d/examples/. Modifying an example from here is the best way to ensure that you have a configuration suitable for your version of netcfg. }}<br />
<br />
==Step 3: Connect==<br />
To connect a profile just execute the following command ''as root'':<br />
# netcfg <profile-name><br />
<br />
==Step 4: Connecting on boot==<br />
===net-profiles===<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array, eg: DAEMONS=(... '''net-profiles''' ...).<br />
<br />
====Display a menu at boot====<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu (ie <code>NETWORKS=menu</code>).<br />
<br />
You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
===Automatic detection===<br />
====net-auto====<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line.<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
<br />
==Troubleshooting==<br />
===Wireless connections===<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
===netcfg error messages===<br />
====Network unavailable====<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue (See Driver Quirks above)<br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
====Wireless Association failed====<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem (See Driver Quirks above)<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
====Unable to get IP address with DHCP====<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
====Not a valid connection, check spelling or look at examples====<br />
You must set CONNECTION= to one of the connection types in /usr/lib/network/connections/. Alternatively use one of the provided configuration examples in /etc/network.d/examples.<br />
<br />
===Using a string WEP key===<br />
This is for a STRING WEP key, not a HEX WEP key, not a WPA key.<br />
KEY="s:Somepasskey"<br />
<br />
===Ralink legacy drivers rt2500, rt2400 that use iwpriv===<br />
There is no plans to add WPA support to these drivers. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed iwpriv commands and put its path in PRE_UP=""<br />
<br />
===Passing arguments to iwconfig before connecting===<br />
Simply:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where <arguments> can be any valid iwconfig argument. The script then runs "iwconfig $INTERFACE $IWCONFIG"<br />
<br />
For example, setting bssid/ap mac:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supercedes the IWOPTS and WEP_OPTS options which were incompletely implemented.<br />
<br />
===Driver Quirks (netcfg 2.1 and later)===<br />
{{Box Note | You most likely do NOT need these. Ensure your configuration is correct before considering these. They are for a small range of drivers with unusual issues, many of them older versions. These are workarounds, not solutions. }}<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
===It still doesn't work, what do I do ?===<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely cruicial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also cruicial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
==GUI==<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
==Supplementary tools==<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convinient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in AUR (<code>yaourt -S wifi-select</code>).<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
==FAQ==<br />
===Why doesnt netcfg do ''x''?===<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
===Why doesn't netcfg behave in this way? It makes more sense===<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
===Do I still need ''x'' when I'm using netcfg?===<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=68602
Netcfg
2009-05-12T05:00:12Z
<p>Iphitus: /* Driver Quirks (netcfg 2.1 and later) */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Network Profiles}}<br />
{{i18n_entry|简体中文|Netcfg2网络配置}}<br />
{{i18n_entry|Türkçe|Ağ Profilleri}}<br />
{{i18n_links_end}}<br />
<br />
==Step 1: Install==<br />
Network profiles are handled by the bash scripts available in the netcfg package.<br />
<br />
# pacman -Sy core/netcfg<br />
<br />
For information relating to the latest development version of netcfg, see [[Network Profiles development]]<br />
<br />
==Step 2: Create the profile(s)==<br />
===Introduction===<br />
A profile is a single text file in /etc/network.d which defines variables used by netcfg. The file name will become the name of the profile, and can be anything you wish, it is not a setting involved in the connection.<br />
<br />
The easiest way to create a new profile is to copy one of the example profiles from /etc/network.d/examples and edit it to fit with your network.<br />
<br />
{{Box Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created /etc/network.d/*.conf file (e.g. <tt>chmod 0600 /etc/network.d/*.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
{{Box Note | Example profiles are located in /etc/network.d/examples/. Modifying an example from here is the best way to ensure that you have a configuration suitable for your version of netcfg. }}<br />
<br />
==Step 3: Connect==<br />
To connect a profile just execute the following command ''as root'':<br />
# netcfg <profile-name><br />
<br />
==Troubleshooting==<br />
===Wireless connections===<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
===netcfg error messages===<br />
====Network unavailable====<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue (See Driver Quirks above)<br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
====Wireless Association failed====<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem (See Driver Quirks above)<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
====Unable to get IP address with DHCP====<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
====Not a valid connection, check spelling or look at examples====<br />
You must set CONNECTION= to one of the connection types in /usr/lib/network/connections/. Alternatively use one of the provided configuration examples in /etc/network.d/examples.<br />
<br />
===Using a string WEP key===<br />
This is for a STRING WEP key, not a HEX WEP key, not a WPA key.<br />
KEY="s:Somepasskey"<br />
<br />
===Ralink legacy drivers rt2500, rt2400 that use iwpriv===<br />
There is no plans to add WPA support to these drivers. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed iwpriv commands and put its path in PRE_UP=""<br />
<br />
===Passing arguments to iwconfig before connecting===<br />
Simply:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where <arguments> can be any valid iwconfig argument. The script then runs "iwconfig $INTERFACE $IWCONFIG"<br />
<br />
For example, setting bssid/ap mac:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supercedes the IWOPTS and WEP_OPTS options which were incompletely implemented.<br />
<br />
===Driver Quirks (netcfg 2.1 and later)===<br />
{{Box Note | You most likely do NOT need these. Ensure your configuration is correct before considering these. They are for a small range of drivers with unusual issues, many of them older versions. These are workarounds, not solutions. }}<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
===It still doesn't work, what do I do ?===<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely cruicial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also cruicial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
==Step 4: Connecting on boot==<br />
===net-profiles===<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array, eg: DAEMONS=(... '''net-profiles''' ...).<br />
<br />
====Display a menu at boot====<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu (ie <code>NETWORKS=menu</code>).<br />
<br />
You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
===Automatic detection===<br />
====net-auto====<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line.<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
==GUI==<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
==Supplementary tools==<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convinient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in AUR (<code>yaourt -S wifi-select</code>).<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
==FAQ==<br />
===Why doesnt netcfg do ''x''?===<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
===Why doesn't netcfg behave in this way? It makes more sense===<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
===Do I still need ''x'' when I'm using netcfg?===<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=68601
Netcfg
2009-05-12T04:57:23Z
<p>Iphitus: /* Troubleshooting */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Network Profiles}}<br />
{{i18n_entry|简体中文|Netcfg2网络配置}}<br />
{{i18n_entry|Türkçe|Ağ Profilleri}}<br />
{{i18n_links_end}}<br />
<br />
==Step 1: Install==<br />
Network profiles are handled by the bash scripts available in the netcfg package.<br />
<br />
# pacman -Sy core/netcfg<br />
<br />
For information relating to the latest development version of netcfg, see [[Network Profiles development]]<br />
<br />
==Step 2: Create the profile(s)==<br />
===Introduction===<br />
A profile is a single text file in /etc/network.d which defines variables used by netcfg. The file name will become the name of the profile, and can be anything you wish, it is not a setting involved in the connection.<br />
<br />
The easiest way to create a new profile is to copy one of the example profiles from /etc/network.d/examples and edit it to fit with your network.<br />
<br />
{{Box Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created /etc/network.d/*.conf file (e.g. <tt>chmod 0600 /etc/network.d/*.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
{{Box Note | Example profiles are located in /etc/network.d/examples/. Modifying an example from here is the best way to ensure that you have a configuration suitable for your version of netcfg. }}<br />
<br />
==Step 3: Connect==<br />
To connect a profile just execute the following command ''as root'':<br />
# netcfg <profile-name><br />
<br />
==Troubleshooting==<br />
===Wireless connections===<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
===netcfg error messages===<br />
====Network unavailable====<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue (See Driver Quirks above)<br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
====Wireless Association failed====<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem (See Driver Quirks above)<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
====Unable to get IP address with DHCP====<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
====Not a valid connection, check spelling or look at examples====<br />
You must set CONNECTION= to one of the connection types in /usr/lib/network/connections/. Alternatively use one of the provided configuration examples in /etc/network.d/examples.<br />
<br />
===Using a string WEP key===<br />
This is for a STRING WEP key, not a HEX WEP key, not a WPA key.<br />
KEY="s:Somepasskey"<br />
<br />
===Ralink legacy drivers rt2500, rt2400 that use iwpriv===<br />
There is no plans to add WPA support to these drivers. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed iwpriv commands and put its path in PRE_UP=""<br />
<br />
===Passing arguments to iwconfig before connecting===<br />
Simply:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where <arguments> can be any valid iwconfig argument. The script then runs "iwconfig $INTERFACE $IWCONFIG"<br />
<br />
For example, setting bssid/ap mac:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supercedes the IWOPTS and WEP_OPTS options which were incompletely implemented.<br />
<br />
===Driver Quirks (netcfg 2.1 and later)===<br />
'''''You probably do not need these, ensure your configuration is correct and sane before you attempt to use any quirks'''''<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
===It still doesn't work, what do I do ?===<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely cruicial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also cruicial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
==Step 4: Connecting on boot==<br />
===net-profiles===<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array, eg: DAEMONS=(... '''net-profiles''' ...).<br />
<br />
====Display a menu at boot====<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu (ie <code>NETWORKS=menu</code>).<br />
<br />
You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
===Automatic detection===<br />
====net-auto====<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line.<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
==GUI==<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
==Supplementary tools==<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convinient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in AUR (<code>yaourt -S wifi-select</code>).<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
==FAQ==<br />
===Why doesnt netcfg do ''x''?===<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
===Why doesn't netcfg behave in this way? It makes more sense===<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
===Do I still need ''x'' when I'm using netcfg?===<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=68600
Netcfg
2009-05-12T04:54:36Z
<p>Iphitus: Proxy settings removed, as this would not even work. Bash exports are only seen by child processes, netcfg spawns none that need proxy info.</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Network Profiles}}<br />
{{i18n_entry|简体中文|Netcfg2网络配置}}<br />
{{i18n_entry|Türkçe|Ağ Profilleri}}<br />
{{i18n_links_end}}<br />
<br />
==Step 1: Install==<br />
Network profiles are handled by the bash scripts available in the netcfg package.<br />
<br />
# pacman -Sy core/netcfg<br />
<br />
For information relating to the latest development version of netcfg, see [[Network Profiles development]]<br />
<br />
==Step 2: Create the profile(s)==<br />
===Introduction===<br />
A profile is a single text file in /etc/network.d which defines variables used by netcfg. The file name will become the name of the profile, and can be anything you wish, it is not a setting involved in the connection.<br />
<br />
The easiest way to create a new profile is to copy one of the example profiles from /etc/network.d/examples and edit it to fit with your network.<br />
<br />
{{Box Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created /etc/network.d/*.conf file (e.g. <tt>chmod 0600 /etc/network.d/*.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
{{Box Note | Example profiles are located in /etc/network.d/examples/. Modifying an example from here is the best way to ensure that you have a configuration suitable for your version of netcfg. }}<br />
<br />
==Step 3: Connect==<br />
To connect a profile just execute the following command ''as root'':<br />
# netcfg <profile-name><br />
<br />
==Troubleshooting==<br />
===Wireless connections===<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
<br />
===Network unavailable===<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue (See Driver Quirks above)<br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
===Wireless Association failed===<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem (See Driver Quirks above)<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
===Unable to get IP address with DHCP===<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
===Not a valid connection, check spelling or look at examples===<br />
You must set CONNECTION= to "ethernet", "ppp", or "wireless".<br />
<br />
===Using a string WEP key===<br />
This is for a STRING WEP key, not a HEX WEP key, not a WPA key.<br />
KEY="s:Somepasskey"<br />
<br />
===Ralink legacy drivers rt2500, rt2400 that use iwpriv===<br />
I have no intention of supporting these. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed iwpriv commands and put its path in PRE_UP=""<br />
<br />
===Passing arguments to iwconfig before connecting===<br />
Simply:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where <arguments> can be any valid iwconfig argument. The script then runs "iwconfig $INTERFACE $IWCONFIG"<br />
<br />
For example, setting bssid/ap mac:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supercedes the IWOPTS and WEP_OPTS options which were incompletely implemented.<br />
<br />
===Driver Quirks (netcfg 2.1 and later)===<br />
'''''You probably do not need these, ensure your configuration is correct and sane before you attempt to use any quirks'''''<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
===It still doesn't work, what do I do ?===<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely cruicial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also cruicial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
==Step 4: Connecting on boot==<br />
===net-profiles===<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array, eg: DAEMONS=(... '''net-profiles''' ...).<br />
<br />
====Display a menu at boot====<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu (ie <code>NETWORKS=menu</code>).<br />
<br />
You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
===Automatic detection===<br />
====net-auto====<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line.<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
==GUI==<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
==Supplementary tools==<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convinient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in AUR (<code>yaourt -S wifi-select</code>).<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
==FAQ==<br />
===Why doesnt netcfg do ''x''?===<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
===Why doesn't netcfg behave in this way? It makes more sense===<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
===Do I still need ''x'' when I'm using netcfg?===<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Netcfg&diff=68599
Netcfg
2009-05-12T04:52:40Z
<p>Iphitus: Remove example, as they are included with netcfg</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Network Profiles}}<br />
{{i18n_entry|简体中文|Netcfg2网络配置}}<br />
{{i18n_entry|Türkçe|Ağ Profilleri}}<br />
{{i18n_links_end}}<br />
<br />
==Step 1: Install==<br />
Network profiles are handled by the bash scripts available in the netcfg package.<br />
<br />
# pacman -Sy core/netcfg<br />
<br />
For information relating to the latest development version of netcfg, see [[Network Profiles development]]<br />
<br />
==Step 2: Create the profile(s)==<br />
===Introduction===<br />
A profile is a single text file in /etc/network.d which defines variables used by netcfg. The file name will become the name of the profile, and can be anything you wish, it is not a setting involved in the connection.<br />
<br />
The easiest way to create a new profile is to copy one of the example profiles from /etc/network.d/examples and edit it to fit with your network.<br />
<br />
{{Box Note | Your network information (e.g. wireless passkey) will be stored in plain text format, so you may want to change the permissions on the newly created /etc/network.d/*.conf file (e.g. <tt>chmod 0600 /etc/network.d/*.conf</tt> to make it readable by root only), depending upon how security conscious you are. }}<br />
<br />
{{Box Note | Example profiles are located in /etc/network.d/examples/. Modifying an example from here is the best way to ensure that you have a configuration suitable for your version of netcfg. }}<br />
<br />
===Proxy settings===<br />
Just use the PRE_UP value to set environment variables as described in [[Proxy settings]]. Here is an example:<br />
<pre><nowiki><br />
PRE_UP="http_proxy=http://10.203.0.1:5187/; export http_proxy;"<br />
</nowiki></pre><br />
{{Note|using POST_DOWN to unset the ''protocol''_proxy variable(s) might not be a good idea because, given two profiles "a" and "b" which both set and "clean" the http_proxy variable:<br />
*you up a then b<br />
*you down a<br />
the result is that the http_proxy variable is empty even if b is still up and need its proxy.}}<br />
<br />
==Step 3: Connect==<br />
To connect a profile just execute the following command ''as root'':<br />
# netcfg <profile-name><br />
<br />
==Troubleshooting==<br />
===Wireless connections===<br />
For wireless connections, make sure the required drivers and firmwares are installed as explained in [[Wireless Setup]].<br />
<br />
===Network unavailable===<br />
This is typically one of:<br />
* Out of range<br />
* Driver issue (See Driver Quirks above)<br />
* Trying to connect to a hidden network<br />
<br />
If you know your network is hidden, set <br />
SCAN=no <br />
<br />
===Wireless Association failed===<br />
This is typically one of:<br />
* Out of range/reception<br />
* Incorrect configuration<br />
* Invalid key<br />
* Driver problem (See Driver Quirks above)<br />
<br />
If it is a range problem, increasing TIMEOUT= can help.<br />
<br />
===Unable to get IP address with DHCP===<br />
This is typically one of:<br />
* Out of range/reception<br />
<br />
Try increasing DHCP_TIMEOUT<br />
<br />
===Not a valid connection, check spelling or look at examples===<br />
You must set CONNECTION= to "ethernet", "ppp", or "wireless".<br />
<br />
===Using a string WEP key===<br />
This is for a STRING WEP key, not a HEX WEP key, not a WPA key.<br />
KEY="s:Somepasskey"<br />
<br />
===Ralink legacy drivers rt2500, rt2400 that use iwpriv===<br />
I have no intention of supporting these. rt2x00 is supported, however, and will replace these.<br />
<br />
If you must use them, create a shell script that runs the needed iwpriv commands and put its path in PRE_UP=""<br />
<br />
===Passing arguments to iwconfig before connecting===<br />
Simply:<br />
<br />
IWCONFIG="<arguments>"<br />
<br />
Where <arguments> can be any valid iwconfig argument. The script then runs "iwconfig $INTERFACE $IWCONFIG"<br />
<br />
For example, setting bssid/ap mac:<br />
IWCONFIG="ap 12:34:56:78:90:12"<br />
<br />
This supercedes the IWOPTS and WEP_OPTS options which were incompletely implemented.<br />
<br />
===Driver Quirks (netcfg 2.1 and later)===<br />
'''''You probably do not need these, ensure your configuration is correct and sane before you attempt to use any quirks'''''<br />
<br />
Some drivers behave oddly and need workarounds to connect. These have to be enabled manually. They're best determined by reading the forums, seeing what others have used, and, if that fails, trial and error. They '''can''' be combined.<br />
<br />
* prescan - Run "iwlist $INTERFACE scan" before attempting to connect (Some broadcom)<br />
* preessid - Run "iwconfig $INTERFACE essid $ESSID" before attempting to connect. (Some ipw3945 and Intel PRO/Wireless 4965AGN)<br />
* wpaessid - Same as previous, run before starting wpa_supplicant<br />
* predown - Take interface down before association and then restore it after. (madwifi)<br />
* postsleep - Sleep 1 second before checking if the association was successful<br />
* postscan - Run "iwlist scan" after associating <br />
<br />
For example<br />
QUIRKS=(prescan preessid)<br />
<br />
If you are having problems with DNS and DHCP, try adding to your profile:<br />
DHCLIENT=no<br />
This will tell netcfg to use dhcpcd instead of dhclient<br />
<br />
If you get "Wireless Network Not Found" or "Association Failed" and have tried the above, try:<br />
SCAN=no<br />
<br />
===It still doesn't work, what do I do ?===<br />
If the FAQs below didn't solve your problem the next best place to go is the forums, or the mailing list. <br />
<br />
To be able to determine what's wrong, we need information so when you post, make sure that you provide the following output:<br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' <br />
* '''''ALL OUTPUT FROM netcfg''''' - this is absolutely cruicial to be able determine what went wrong. The message might be short or nonexistant, but it can mean a great deal. <br />
* '''''Your /etc/network.d network profiles''''' - Also cruicial as many problems are simple config issues. Feel free to censor your wireless key.<br />
* '''''netcfg version'''''<br />
* lsmod<br />
* iwconfig<br />
<br />
==Step 4: Connecting on boot==<br />
===net-profiles===<br />
<code>net-profiles</code> allows you to start some profiles on boot.<br />
<br />
In order to do that you need to list the /etc/network.d/ profiles you want netcfg to try at boot in the <code>NETWORKS=()</code> line in /etc/rc.conf. <br />
<br />
NETWORKS=(home mywireless)<br />
<br />
You also need to add <code>net-profiles</code> to the DAEMONS array, eg: DAEMONS=(... '''net-profiles''' ...).<br />
<br />
====Display a menu at boot====<br />
<code>net-profiles</code> can also display a menu so you can pick which profile you want to set up. For that you just need to set NETWORKS= to menu (ie <code>NETWORKS=menu</code>).<br />
<br />
You can also access that menu at any time by running <code>netcfg-menu</code> in a terminal.<br />
<br />
The dialog package is needed.<br />
<br />
===Automatic detection===<br />
====net-auto====<br />
<code>net-auto</code> is the second boot-time script of the netcfg package. Its function is to determine automatically which profile should be started.<br />
<br />
<code>net-auto</code> reads the AUTO_NETWORKS=() line in /etc/rc.conf. For example:<br />
AUTO_NETWORKS=(auto-wireless wlan0)<br />
<br />
Like <code>net-profiles</code> it needs to be added to the DAEMONS=() line.<br />
<br />
To run after boot:<br />
# /usr/bin/netcfg-auto-wireless $interface<br />
<br />
==GUI==<br />
<br />
A Qt-based netcfg frontend called ArchAssistant exists. It proposes to manage & connect/disconnect profiles from a systray icon. Automatic wireless detection is also available. This tool is particularly useful for laptop users.<br />
<br />
Links:<br />
[http://aur.archlinux.org/packages.php?ID=15655 archassistant on AUR] | [http://www.kde-apps.org/content/show.php/ArchAssistant?content=76760 archassistant on kde-apps.org] | archassistant package on archlinux.fr [http://repo.archlinux.fr/i686/ i686] and [http://repo.archlinux.fr/x86_64/ x86_64]<br />
<br />
==Supplementary tools==<br />
<br />
There is a console tool for selecting wireless networks "in real-time" (in NetworkManager manner) called <code>wifi-select</code>. The tool is convinient for use in wifi-cafe or another places you are visiting for the first (and maybe the last) time. Then you don't need to create the file-profile for a new network, just type <code>sudo wifi-select wlan0</code> and choose the network you need. <br />
<br />
The tool is currently packaged and available in AUR (<code>yaourt -S wifi-select</code>).<br />
<br />
It works as follows:<br />
* parses <code>iwlist scan</code> results and presents list of networks along with its security settings (wpa/wep/none) using <code>dialog</code><br />
* if user selects network with existing profile -- just use this profile to connect with <code>netcfg</code><br />
* if user selects a new network (for example network from wifi-cafe he currently visited), <code>wifi-select</code> automatically generates new profile with corresponding <code>$SECURITY</code> and asks for the key (if needed). It uses DHCP as <code>$IP</code> by default<br />
* then, if connection succeeds, profile is saved for later usage<br />
* if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change <code>$IP</code> to static or adjust some additional options)<br />
<br />
Links: <br />
[http://bbs.archlinux.org/viewtopic.php?id=63973 Forum thread] related to development of <code>wifi-select</code> | [http://aur.archlinux.org/packages.php?ID=23471 wifi-select on AUR] | [http://hg.horna.org.ua/wifi-select/ wifi-select mercurial repository]<br />
<br />
==FAQ==<br />
===Why doesnt netcfg do ''x''?===<br />
netcfg doesn't need to. It connects to networks.<br />
<br />
But netcfg is super modular and re-usable. Have a look at /usr/lib/networks/ -- heaps of reusable functions for your own scripts. <br />
<br />
===Why doesn't netcfg behave in this way? It makes more sense===<br />
netcfg doesn't enforce any rules. It's task is to connect to networks. It doesn't impose any heuristics, like 'disconnect from wireless if ethernet is connected'.<br />
<br />
If you want behaviour like that, it'd be really easy to write a separate tool over netcfg. See the question above.<br />
<br />
===Do I still need ''x'' when I'm using netcfg?===<br />
* /etc/hosts: Yes, you still need this, this is important. Don't remove your hostname from this otherwise you'll have some odd problems. <br />
* HOSTNAME= in /etc/rc.conf: It's strongly recommended you keep this, otherwise no hostname will be set if a profile fails<br />
* DAEMONS=(network) and INTERFACES=() in /etc/rc.conf: If you've setup all your networks with netcfg instead, yes, you can remove this. You can also safely remove lo, it's been moved into rc.sysinit.<br />
* lo: This is now in rc.sysinit, you don't need to configure it anywhere.</div>
Iphitus
https://wiki.archlinux.org/index.php?title=Network_configuration/Wireless&diff=67869
Network configuration/Wireless
2009-04-29T09:37:44Z
<p>Iphitus: Remove uneccesary depth and correct errors</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|Español|Wireless_Setup_(Español)}}<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_entry|Türkçe|Kablosuz Bağlantı}}<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 under the '''base-devel''' category. (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 your card with 'lspci | grep -i net'. The [https://help.ubuntu.com/community/WifiDocs/WirelessCardsSupported Ubuntu Wiki] has an extensive list of wireless cards and whether or not they are supported by available linux kernel drivers.<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://wireless.kernel.org/en/users/Drivers/ath5k ath5k] is a completely FOSS driver (without a binary blob, unlike Madwifi) for Atheros chipsets.<br />
#*[http://wireless.kernel.org/en/users/Drivers/ath9k ath9k] is Atheros' official driver for the newer 11n chipsets (AR5416, AR5418, AR9160, AR9280, AR9281, AR9285).<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://intellinuxwireless.org/?p=iwlwifi/ iwlwifi-3945-ucode] for Intel Pro/Wireless 3945 AB/G Mini PCI-E<br />
#*[http://intellinuxwireless.org/?p=iwlwifi/ iwlwifi-4965-ucode] for Intel Pro/Wireless 4965 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 />
#*[http://www.broadcom.com/support/802.11/linux_sta.php broadcom-wl] for recent 43xx Broadcom cards not supported by bcm43xx or b43.<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 />
#*Also, [http://wireless.kernel.org/en/users/Devices this page] has a matrix of supported 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 />
<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''. At boot, 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) under the '''base-devel''' category. <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 />
<br />
===Wireless Quickstart===<br />
The general procedure will be:<br />
<br />
* Identify your interface and appropriate module:<br />
# hwdetect --show-net<br />
or<br />
# lspci | grep -i net <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>(give the essid (the 'network name') of the network in quotes), e.g.:<br />
# iwconfig ath0 essid "linksys" key 0241baf34c<br />
If your WEP key is ASCII, prefix with <code>s:</code>, e.g.:<br />
# iwconfig ath0 essid linksys key s:mywepkey<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 />
If you are using '''WPA''', refer to [[#WPA/WPA2|WPA/WPA2]] below.<br />
<br />
===Drivers and Firmware===<br />
Methods and procedures for installing drivers for various chipsets are covered below. In addition, certain chipsets require the installation of corresponding ''firmware''. (Also covered below).<br />
<br />
====wlan-ng====<br />
Packages: '''wlan-ng26-utils'''<br />
<br />
This driver support PRISM based cards, which are hard to find now. The PRISM card is an IEEE 802.11 compliant 2.4 GHz DSSS WLAN network interface card that uses the Intersil PRISM chipset for its radio functions and the AMD PCNet-Mobile chip (AM79C930) for its Media Access Controller (MAC) function. The supported adapters can be found from here: http://www.linux-wlan.org/docs/wlan_adapters.html.gz<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 />
See http://www.linux-wlan.org/<br />
<br />
====rt2870====<br />
See [[Rt2870]]<br />
<br />
====rtl8180====<br />
Realtek rtl8180 PCI/Cardbus 802.11b now fully supported in the kernel<br />
<pre>modprobe rtl8180</pre><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, which can be installed like this: <br />
<pre>pacman -S rt2x00-rt71w-fw</pre><br />
<pre>pacman -S rt2x00-rt61-fw</pre><br />
..depending on the chipset.<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 rt2x00 driver (rt2500pci module) is preferred and 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). "RT61" has now been made largely obsolete by the in-kernel rt2x00 driver (see above), although there may be cases where the legacy driver performs better.<br />
<br />
See the [[RT61_Wireless|RT61 wiki page]].<br />
<br />
====RT73 (ie Ralink RT2571)====<br />
For USB devices based on Ralink's later generation of 802.11g chipsets (including those supporting proprietary MIMO modes).<br />
<br />
Several USB WiFi dongles use this chipset, including the Linksys WUSB54GC and the Belkin Wireless G USB key (F5D7050 v3000) .<br />
<br />
"RT73" has now been made largely obsolete by the in-kernel rt2x00 driver (see above), although there may be cases where the legacy driver performs better. <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-project.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 />
====ath9k====<br />
<br />
ath9k is Atheros' officially supported driver for the newer 11n chipsets. All of the chips with 11n capabilities are supported, with a maximum throughput around 180 Mbps. To see a complete list of supported hardware, check this [http://wireless.kernel.org/en/users/Drivers/ath9k page].<br />
<br />
Working modes: Station, AP and Adhoc.<br />
<br />
ath9k has been part of the kernel as of 2.6.27. But it has undergone some heavy development, and the changes haven't propagated to the mainline kernel tree yet.<br />
The best solution would be to use the [http://wireless.kernel.org/en/users/Download compat-wireless] package for now.<br />
A [https://lists.ath9k.org/mailman/listinfo/ath9k-devel mailing list] exists for support and development related discussions.<br />
<br />
====ipw2100 and ipw2200====<br />
Depending on which of the chips you have, use either:<br />
<br />
'''ipw2100-fw'''<br />
pacman -S ipw2100-fw<br />
<br />
or:<br />
<br />
'''ipw2200-fw'''<br />
pacman -S 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 your kernel image with: <br />
<pre>mkinitcpio -g /boot/kernel26.img</pre><br />
<br />
====iwl3945, iwl4965 and iwl5000-series====<br />
<br />
'''I'''ntel's open source '''W'''iFi drivers for '''L'''inux (See [http://intellinuxwireless.org iwlwifi]) will work for both the 3945 and 4965 chipsets since kernel v2.6.24. And iwl5000-series chipsets (including 5100BG, 5100ABG, 5100AGN, 5300AGN and 5350AGN) module has been supported since '''kernel 2.6.27''', by the intree driver '''iwlagn'''.<br />
<br />
{{Box Note | You must install the '''firmware''' that corresponds to your chipset. }}<br />
<br />
# pacman -S iwlwifi-3945-ucode<br />
or:<br />
# pacman -S iwlwifi-4965-ucode<br />
or:<br />
# pacman -S iwlwifi-5000-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 -a''' 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 -a''' 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 />
* By default iwl3945 is configured to only work with networks on channels 1-11. Higher ranges are not allowed in some parts of the world (US). In the EU however channels 12 and 13 are used quite common. To make iwl3945 scan for all channels, add "options cfg80211 ieee80211_regdom=EU" to /etc/modprobe.d/options. With "iwlist f" you can check which channels are allowed.<br />
<br />
====ipw3945 (Deprecated Method)====<br />
{{Box Note | ''The ipw3945 driver is no longer actively developed, and the iwlwifi driver (described above) should work perfectly, but may conflict with the former one. So, only one of them should be installed. If you choose to use the iwlwifi driver you still do need the '''ipw3945-ucode''' package though.''}}<br />
# pacman -S ipw3945 ipw3945-ucode ipw3945d<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 />
<br />
Note: Some orinoco chipsets are Hermes I/II. You can use http://aur.archlinux.org/packages.php?ID=9637 to replace the orinoco driver and gain WPA support. See http://ubuntuforums.org/showthread.php?p=2154534#post2154534 for more information.<br />
<br />
To use the driver I blacklisted orinoco_cs in rc.conf (!orinoco_cs in the modules array) and added wlags49_h1_cs to the modules array. Example:<br />
<br />
<pre>MODULES=(!snd_pcsp !eepro100 !orinoco_cs wlags49_h1_cs)</pre><br />
<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 />
If that didn't work, try this:<br />
<br />
*Reload the prism module (modprobe p54usb or modprobe p54pci, depending on your hardware)<br />
alternatively remove your wifi card and then reconnect it<br />
*Use the "dmesg" command, and look at the end of the output it prints out.<br />
Look for a section looking like this: <br />
<br />
firmware: requesting '''isl3887usb_bare'''<br />
p54: LM86 firmware<br />
p54: FW rev 2.5.8.0 - Softmac protocol 3.0<br />
<br />
and try renaming the firmware file to the name corresponding to the part bolded here.<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.<br />
<br />
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 />
For another way to determine which firmware revision number to use, see the [http://acx100.sourceforge.net/wiki/Firmware "Which firmware" section of the acx100.sourceforge wiki page] page. For ACX100, you can follow the links provided there, to a table of card model number vs. "firmware files known to work"; you can figure out the rev. number you need, by looking at the suffix there. E.g. a dlink_dwl650+ uses "1.9.8.b", in which case you'd do this:<br />
ln -s /usr/share/tiacx/acx100_1.9.8.b/* /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 b43-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 />
<br />
Either install the "b43-firmware" package from [http://aur.archlinux.org/packages.php?ID=21690 AUR], or perform the following steps manually.<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.<br />
You may want to add b43 into the modules section of your rc.conf file.<pre>MODULES=(...b43 !bcm43xx !ndiswrapper...)</pre><br />
Good luck!<br />
<br />
====broadcom-wl====<br />
For recent Broadcom 43xx cards not supported by bcm43xx or b43. Not just for 4312 cards. See the [[Broadcom_BCM4312|Broadcom 4312 wiki page]]. It is available in [http://aur.archlinux.org/packages.php?ID=19514 AUR]. These chipsets are used in most Dell laptops, among others.<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 />
--[[User:Willey|Willey]] 22:32, 20 September 2008 (EDT)<br />
<br />
==Test Installation==<br />
After loading your driver run<br />
iwconfig<br />
and see if a wireless interface (wlan''x'', eth''x'', ath''x'') is recognized<br />
<br />
If <code>iwlist scan</code> displays <code>Interface doesn't support scanning</code> then you probably forgot to install the firmware.<br />
<br />
= Part II: Wireless Management =<br />
<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 />
Procedure and tools you’ll need will depend on several factors:<br />
* The '''easiness of configuration management''', from a completely manual setup procedure that you’ll need to repeat at each boot to a software-managed, automatic, autostarting solution<br />
* The '''encryption type''' (or not) that protects the wireless network<br />
* If you need '''network profiles''', i.e. if your computer will frequently change networks (such as a laptop)<br />
<br />
== Management methods ==<br />
<br />
This table shows the different methods that can be used to activate and manage a wireless network connection, depending on the encryption and management types, and the various tools that are required. Although there may be other possibilities, these are the most frequently used:<br />
{| border="1"<br />
! Management || No encryption/WEP || WPA/WPA2 PSK<br />
|-<br />
| Manual, need to repeat at each computer reboot || <code>ifconfig + iwconfig + dhcpcd/ifconfig</code> || <code>ifconfig + iwconfig + wpa_supplicant + dhcpcd/ifconfig</code><br />
|-<br />
| Automatically managed, centralized without network profile support || define interface in <code>/etc/rc.conf</code> || not covered<br />
|-<br />
| Automatically managed, with network profiles support || colspan="2" align="center" | <code>Netcfg, wicd, NetworkManager, etc…</code><br />
|}<br />
<br />
<br />
Whatever your choice, you should try to connect using the manual method first. This will help you understand the different steps that are required and debug them in case a problem arose. Another tip: if possible (e.g. if you admin your wifi access point), try connecting with no encryption, to check everything works. Then try using encryption, either WEP (simpler to configure) or WPA.<br />
<br />
=== Manual setup ===<br />
<br />
The programs provided by the package '''wireless_tools''' are the basic set of tools to set up a wireless network. Moreover, if you use WPA/WPA2 encryption, you will need the package '''wpa_supplicant'''. These powerful userspace console tools work extremely well and allow complete, manual control from the shell.<br />
<br />
These examples assume your wireless device is <code>wlan0</code>. Replace <code>wlan0</code> with the appropriate device name.<br />
{{Box Note | Depending on your hardware and encryption type, some of these steps may not be necessary. Some cards are known to require interface activation and/or access point scanning before being associated to an access point and being given an IP address. Some experimentation may be required. For instance, WPA/WPA2 users may directly try to activate their wireless network from step 3.}}<br />
<br />
1. ''(Optional, may be required)'' Some cards require that the kernel interface be activated before you can use the wireless_tools:<br />
# ifconfig wlan0 up<br />
<br />
2. ''(Optional, may be required)'' See what access points are available:<br />
# iwlist wlan0 scan<br />
We assume you want to use the essid named <code>MyEssid</code>.<br />
<br />
3. Depending on the encryption, you need to associate your wireless device with the access point to use and pass the encryption key.<br />
* ''No encryption''<br />
# iwconfig wlan0 essid "MyEssid"<br />
* ''WEP''<br />
using an hexadecimal key:<br />
# iwconfig wlan0 essid "MyEssid" key 1234567890<br />
using an ascii key:<br />
# iwconfig wlan0 essid "MyEssid" key s:asciikey<br />
* ''WPA/WPA2''<br />
You need to edit the <code>/etc/wpa_supplicant.conf</code> file as described in [[WPA_Supplicant]]. Then, issue this command:<br />
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf<br />
This is assuming your device uses the <code>wext</code> driver. If this does not work, you may need to adjust these options. Check [[WPA_Supplicant]] for more information and troubleshooting.<br />
<br />
4. Finally, provide an IP address to the network interface. 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 />
{{Box Note | Although the manual configuration method will help troubleshoot wireless problems, you will have to retype every command each time you reboot.}}<br />
<br />
=== Automatic connection - Network daemon ===<br />
<br />
{{Box Note | This method and configuration examples are only valid for unencrypted or WEP-encrypted networks, which are particularly unsecure. To use WPA/WPA2, you'll need to use other solutions such as such as '''[[netcfg]]''' or other network managers '''[[wicd]]'''. Also, avoid mixing these methods as they may create a conflict and prevent the wireless card from functioning.}}<br />
<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>)'''. The name of the network goes in place of '''MyEssid'''.<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 />
<br />
Not all wireless cards are <code>wlan0</code>. Determine your wireless interface with ifconfig -a. <br />
Atheros-based cards, for example, are typically <code>ath0</code>, so change <code>wlan_wlan0</code> 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 />
{{Box Note | These solutions are limited: for a laptop which is always on the move it would be good to have multiple [[network profiles]] and be able to easily switch from one to another. That's the aim of network managers, such as '''[[netcfg]]'''.}}<br />
<br />
<br />
=== Automatic connection - [[Network Profiles|netcfg]] ===<br />
<br />
[[Network Profiles|netcfg]] provides a '''versatile, robust and fast''' solution to networking on Arch.<br />
<br />
It uses a profile based setup and is capable of detection and connection to a wide range of network types. This is no harder than using graphical tools. Following the directions above, you can get a list of wireless networks. Then, as with graphical tools, you will need a password.<br />
<br />
''Detailed documentation [[Network Profiles]]''<br />
<br />
''Notes for developmental version [[Network Profiles development]]''<br />
<br />
<br />
<br />
=== Other network managers ===<br />
<br />
There are a number of wireless management solutions available to Arch Linux users as an alternative to the above.<br />
<br />
====Autowifi====<br />
Autowifi is a daemon that configures your wireless network automatically depending on the ESSID. Once configured, no user interaction is necessary and no GUI tools are required.<br />
<br />
For more information, see the [[Autowifi]] wiki.<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 />
= See Also =<br />
*[[Sharing ppp connection with wlan interface]]<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 />
*[https://lists.anl.gov/mailman/listinfo/wifi-radar Wifi Radar] - Wifi Radar information page<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>
Iphitus