Network Manager 0.9 – a tutorial (KDE version)
This is intended as a guide for configuring WiFi networks with NetworkManager 0.9, which is the version that is in the openSUSE 12.1 Beta and is likely to be the version included in the 12.1 release (probably next month). This post is mostly about configuring NM via the KDE applet. I plan another post on using the gnome applet to configure NM. It is possible to use the gnome applet with KDE, if you happen to prefer that.
This NM version is significantly different from earlier versions. There are some things about it that are annoying, particularly the frequent demand for the root password. I have already posted a gripe about that. With the exception of that problem, the newer version is improved over earlier versions.
The biggest change from earlier versions, is that the network definition files are now stored centrally instead of being stored individually for each user. The definition files are all located in “/etc/NetworkManager/system-connections” where they are readable/writable only by root. This is probably why there are annoying requests for the root password.
You can still have individual connections for a particular user. The saved definition files contain a tag line, indicating for which user the definition is valid.
The main benefit of centrally located network definition files, is that you can now have a definition that is shared by all users. And whether you define a network with the KDE applet or the gnome applet, you will get the same file. So a network defined in KDE is automatically accessible by the same users in gnome or XFCE or LXDE.
First things first
Before you start configuring networks, click on the network icon in your tray. Use an ordinary left click. A window will show up showing your current connections (if any). Click on Manage Connections toward the bottom right. The connection management window that opens has two entries in the left margin. Click on other to allow some basic settings for the applet. The most important setting here is the one for “Store connection secrets”. There are three possible choices. They are:
- Do not store (always prompt)
- In file (unencrypted)
- In secure storage (encrypted)
Be sure to select the second of these (“in file”). If you mistakenly select the first, you will be asked for the network key every time. If you mistakenly select the third, you will be asked for your kwallet password every time. As mentioned above, the network definition file, which normally includes the key, is actually stored in a root owned file. If you select “in secure storage” that does not change where the key is really stored. It only affects where the applet stores some auxiliary data. Presumably, if you select “do not store” then the key won’t be stored in the root file, though I have not tested this.
Save your changes (click Apply), then click on Network Connections in the left margin.
Defining a connection
Now click the Wireless tab, if that is not already selected.
To create a new connection, click on the Add button toward the right. You will then need to select either “Wireless” or “Shared”. You should normally select “Wireless”. It turns out that if you mistakenly select “shared” you will setup an ad hoc network, which is probably not what you want.
In the resulting screen, fill in the SSID name first. If the network is currently broadcasting, you can use “Scan” and click on the network name in the scan result. Otherwise you will have to type in the SSID. Next, fill in the connection name near the top of the screen. It might default to the SSID, and you can leave it that way if you wish.
If this is a network that you regularly use, then select “Connect Automatically.” Otherwise, leave that box unchecked.
Select “System connection” if you want all users of the computer to be able to share this network definition. If you are the only user, then it is best to check this box for convenience. If, instead, you click “Advanced Permissions”, then you can choose which users of the computer may use the connection definition. The default is for you to be the only user of this connection.
Next click the Wireless security tab, and fill in your wifi security information and network key. Finally, hit Apply to record the changes. That is where you will probably be prompted for the root password and perhaps for the kwallet password.
My personal practice is to define all networks as system connections, but to only set “Automatically connect” for the networks that I regularly use. If I am visiting a relative, I’ll switch to making their network connect automatically. Then, when I return home, I go back to my home network. This is probably not necessary, and defining them all to connect automatically should work.
If you have a network with hidden SSID, you can configure it in the same way as described above, except that scanning for the SSID won’t work. The problem I have had, is that I can define the network with hidden SSID, but I cannot connect. You can usually get it to connect with the command (run as root)
iwlist wlan0 scanning essid 'the-hidden-ssid'
Here, replace “wlan0” with the proper name for your wireless device, and insert the actual hidden ssid name where indicated. I tried that with a network that I had set to connect automatically. Shortly after using that command, it connected. And I should not have to use that command again, unless perhaps the wireless router for the network is replaced.
The other option is to try using the gnome network manager applet. It does not seem to have problems with hidden ssids.
Using the gnome applet in KDE
It isn’t too hard to use the gnome applet in KDE. First make sure that “nm-applet” is installed on your system. Next, go to your tray settings, and uncheck the box to show the network manager icon. Then open “Personal settings” –> “Startup and Shutdown” –> “Service Manager”. Uncheck the box for running the network manager settings daemon.
When you logout, then log back in to KDE, the KDE applet will no longer be running. You can start the gnome applet with
in a terminal window if you want to run it as a one shot run. Or, to start it any time, you can set it up as an automatically started program.
I’ll discuss using nm-applet in a future post.