6

When I boot my laptop into Ubuntu 10.10, the wireless won't automatically connect; it is configured, and I can get a connection using "Connect to Hidden Wireless Network..." and selecting the name from the drop-down - however, the first time (per boot) I do this, it asks me to elevate myself. The connection works if I then surrender the elevated privilege. The connection is set as available to all users, and to connect automatically.

What I would like is that it silently and automatically connect to the wireless. How can I do that?

Zanna
  • 72,312

3 Answers3

6

If even after all warnings about using a hidden SSID you still want to use it, this is how you can do it.

Create a script, e.g. ~/bin/nm-connect-me.sh with the follwing contents:

#!/bin/sh
#
# Automatically try to connect to 'MyWiFi' when WiFi is enabled
#

# the output of nmcli should be in English
LC_ALL=C

# loop for a while until NetworkManager is accepting commands
while [ "$(nmcli -t -f WIFI,STATE nm)" = 'enabled:disconnected' ]
do
 nmcli con up id MyWiFi
 sleep 5
done

exit 0

Then add it to your list of startup applications.

Of course you have to replace MyWiFi by your SSID name.

This information has been extracted from: http://blog.nixpanic.net/2011/01/connect-automatically-and-immediately.html

adosaiguas
  • 399
  • 3
  • 14
2

I'd recommend not to use hidden network settings, because you'll have nothing but trouble from it (I am telling you this from my own personal experience).

It is not a security feature, in fact, if you google it a bit, you'll discover that your network can actually be less secure with hidden SSID. It may also be the cause you need to elevate..

See http://brighthub.com/computing/smb-security/articles/1211.aspx

1

You can set the keystore password to blank, therefore you will not be asked for a password anymore (I mean the keystore password, not your account password, obviously).