How to install and configure NetworkManager and network-manager-applet on Arch Linux with Gnome3

In this article I will describe how to make networkmanager and the network-manager-applet (aka nm-applet) work on Arch Linux with GNOME3. Of course there are other networking-tools available, however I prefer the use of networkmanager and network-manager-applet, because they integrate them selves very well into GNOME3.

Please notice that some parts of this how to were taken from Arch-Wiki-Networkmanager and Arch-Wiki-Beginners-Guide and I highly recommend reading those two articles.

0. Preparations
1. Installation
2. Configuration
3. Wireless troubleshooting

0. Preparations

      1. Hosts
        check the configuration of your /etc/hosts file, a valid configuration looks like this:

        #<ip-address>    <>    <hostname>      localhost.localdomain    yourHostname
        ::1            localhost.localdomain    yourHostname
      2. Devices
        You can identify your networking-devices like this:

        $ lspci | grep -i net

        If your device is not listed, it is maybe an usb-device, so try this command:

        $ lsusb 

        With the following command you can check the current state of all your network-devices:

        $ ip link

1. Installation

      1. Install the wpa_supplicant tools
        $ sudo pacman -S wpa_supplicant
      2. Install the wireless tools
        $ sudo pacman -S wireless_tools
      3. Install the networkmanager
        $ sudo pacman -S networkmanager
      4. Install the network-manager-applet aka nm-applet
        $ sudo pacman -S network-manager-applet
      5. Install gnome-keyring
        $ sudo pacman -S gnome-keyring

2. Configuration

Attention: This is the old and by now depricated way, continue at step 4.:

          1. Daemons
            Deactivate or remove the previously used network daemon from /etc/rc.conf and add instead the networkmanager daemon, also make sure to comment the network section at the end of the file. It is very important to place the networkmanager after dbus and before any network-services like ntpd. Before applying any of the changes the contents of /etc/rc.conf will look similar to this:

            # /etc/rc.conf - configuration file for initscripts
            # Most of rc.conf has been replaced by various other configuration
            # files. See archlinux(7) for details.
            # For more details on rc.conf see rc.conf(5).
            DAEMONS=(hwclock syslog-ng network crond acpid dbus 
                     ntpd avahi-daemon cupsd)
            # Storage
            # USEDMRAID="no"
            # USELVM="no"
            # Network
            # interface=eth0
            # address=
            # netmask=
            # gateway=

            After applying the mentioned changes the file should look like this:

            # /etc/rc.conf - configuration file for initscripts
            # Most of rc.conf has been replaced by various other configuration
            # files. See archlinux(7) for details.
            # For more details on rc.conf see rc.conf(5).
            DAEMONS=(hwclock syslog-ng crond acpid dbus networkmanager
                     ntpd avahi-daemon cupsd)
            # Storage
            # USEDMRAID="no"
            # USELVM="no"# Network
            # interface=eth0
            # address=
            # netmask=
            # gateway=
          2. Stop the network daemon:
            $ sudo rc.d stop network
          3. Create a new PolicyKit rule
            Create the file /etc/polkit-1/localauthority/50-local.d/org.freedesktop.NetworkManager.pkla with the following contents:

          4. Attention: This is the new and right way, so leave step 1), 2) and 3) out:

          5. Make the networkmanager start on boot:
            $ sudo systemctl enable NetworkManager.service
          6. Disable dhcpcd
            Since networkmanager wants to be the one who handles the dhcpcd related stuff, you have to disable and stop dhcpcd:

            $ sudo systemctl disable dhcpcd.service
            $ sudo systemctl disable dhcpcd@.service
            $ sudo systemctl stop dhcpcd.service
            $ sudo systemctl stop dhcpcd@.service
          7. Enable wpa_supplicant, if you want to use your wireless connection:
            $ sudo systemctl enable wpa_supplicant.service
          8. Add your user to the network group:
            $ gpasswd -a USERNAME network
          9. Turn off network interface controllers:
            Turn off your network interface controllers, in my case eth0 and wlan0:

            $ ip link set down eth0
            $ ip link set down wlan0
          10. Now start wpa_supplicant:
            $ sudo systemctl start wpa_supplicant.service
  • Finally start the networkmanager:
    $ sudo systemctl start NetworkManager.service

    If you get an error about unreachable D-Bus, just ignore it.
    If the networkmanager is not running and network-manager-applet does not show up in your upper GNOME3 panel, try this:

    $ sudo Networkmanager
    $ nm-applet

Now at least your wired connection should be working correctly. If not reboot your system. If you have problems with your wireless connection, read the next part of this post 3. Wireless troubleshooting.

3. Wireless troubleshooting

          It is very likely that your wireless connection will not work out of the box.
        In my case the network-manager-applet asked me in an endless loop for the WPA/WPA2 PSK of my router.

      1. Take a look at the logs
        If you take a look at /var/log/daemon.log you will find many repeating entrys like these:

        NetworkManager[799]: (wlan0): supplicant interface state: associating -> associated
        NetworkManager[799]: (wlan0): supplicant interface state: associated -> disconnected
        NetworkManager[799]: (wlan0): supplicant interface state: disconnected -> scanning
        NetworkManager[799]: (wlan0): supplicant interface state: scanning -> authenticating
        NetworkManager[799]: (wlan0): supplicant interface state: authenticating -> associating
        NetworkManager[799]: (wlan0): supplicant interface state: associating -> 4-way handshake
        NetworkManager[799]: (wlan0): supplicant interface state: 4-way handshake -> disconnected

        The entrys correspond to the repeated requests of the network-manager-applet for the PSK.

      2. run the following command:
        sudo ck-list-sessions

        If the output shows you at least two sessions e.g. called Session1 and Session2, than there is something wrong.

      3. Edit .xinitrc
        To fix this problem open your ~/.xinitrc and change the line:

        exec ck-launch-session gnome-session


        exec dbus-launch gnome-session

This should solve the problem with the multiple sessions and your wireless connection should work correctly after rebooting your system. At least this is how I was able to fix my wireless connection.

About M0nk3ym0nk3y

M0nk3ym0nk3y is one of the three LinuxM0nk3ys from Linux M0nk3ys @ WordPress Linux M0nk3ys @ YouTube Linux M0nk3ys @ Twitter

Posted on September 15, 2012, in Configure, Install, Network, Troubleshooting and tagged , , , , , , , , , , , , , , , , , , , . Bookmark the permalink. 24 Comments.

  1. Network-Manager is troublesome and can be completely bypassed by using command-line. It doesn’t do a good job. If anything it’s a hindrance. I couldn’t uninstall it – dependencies – unfortunately but I was able to disable it. I am using Arch Linux and would like a guide on how to remove it completely. Sorry if I sound pissed but I never liked it as it failed repeatedly to connect to wpa2 psk, and almost always breaks for no reason I can figure out taking my whole connection down. I use wpa_supplicant, dhclient, and openvpn all from command-line without problems at all.

    • Yes you are right. Like nearly every application with a GUI you can bypass it by using the command-line. However I only installed networkmanager because it is gnomes standard “networkmanager”. I also had a lot of difficulties trying to make networkmanager work properly, but since then I have absolutely no problems. Now lets see how to remove networkmanager together with its gnome-applet:

      If I try to remove nm-applet and networkmanager:
      sudo pacman -R network-manager-applet networkmanager

      pacman tells me that it is not possible, because of the following dependencies:
      :: gnome-shell: needs networkmanager
      :: libsocialweb: needs networkmanager
      :: telepathy-mission-control: needs networkmanager

      What you could try to do, is to remove networkmanager and nm-applet, without removing the dependent packages.
      But be careful, it is possible that you will break your System or at least your installation of Gnome. So I take absolutely no responsibility for any damage to your System:
      sudo pacman -Rdd network-manager-applet networkmanager

      A more safe way would be to just deactivate networkmanager. If you are using the /etc/rc.conf to start your daemons, just remove networkmanager from the daemons-list of that file. If you are already using systemd to start your daemons you can use the following two commands to prevent networkmanager from starting at boot:
      sudo systemctl stop NetworkManager
      sudo systemctl disable NetworkManager

      I hope this informations will help you to solve your problem🙂

  2. Thanks! This was very helpful, although I found that I also needed the gnome-keyring package to make the wireless connection work (it seems that is not installed by default)

    • Drunk3nm0nk3y

      You’re welcome! Glad I could help and thanks for the hint about the gnome-keyring package (I thout it is installed by default). I will add it to the list of needed packages. Have an awesome day!

  3. thx man, I tried all day to figure this out, and now its all woking, nice post.

  4. Thank you, thank you, thank you!
    I have had so much trouble to get wireless working on my laptop but your guide got it working!

  5. pedja-portugal

    Thank you 1000x. Since 2 days I am not sleeping because of this issue, now it work like charm.

  6. Thank you very much mate!

  7. Thanks a lot!

    Didn’t know that I had to disable dhcp daemon in order to avoid a conflict with the NetworkManager!

  8. Thank you for your excellent tutorial! I am an Arch Linux beginner and I configured my WiFi interface successfully by following your tutorial,



  9. Thanks, great tutorial. Helped me when I lost wireless connectivity after switching from wicd!

  10. Another Arch beginner here. I struggled through the docs for about seven hours until googling some arcane instruction landed me here. Ten minutes later, I was connected. Great job!

  11. Thanks from an Arch Beginner. THIS IS EXACTLY WHAT I NEEDED.

  12. Thank you! I’ve beeing struggling with it for almost an hour.

  13. Thank you. It’s very useful ! You helped me a lot.

  14. thank you very much
    your article realy help to solved my problem.
    i’m struggling with wifi problem for 2 days. Googling around the webpages, and found your article, testing, and voila!!!

    please keep this article up on your blog.


  1. Pingback: MarcelFox | Gnome Based Wireless | Arch

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: