I am able to connect to a wireless network using nm-applet when running it in lightdm, however, it does not work in an openBox session that I start as myself (a user started X Session), but am not able to do so using nmcli.

I am running nmcli using sudo. After 90 seconds, I get a time out message. What could be wrong?

This is the configuration I must use - http://www.depts.ttu.edu/ithelpcentral/solutions/wireless/

share|improve this question
    
did you check this question askubuntu.com/q/8322/169736 ? – Braiam Nov 15 '13 at 22:27
    
From the man page of cnetworkmanager, I gather that it does nto support WPA2 enterprise. – Lord Loh. Nov 16 '13 at 2:31
    
Can you edit your question and add that? Since nobody would figure out why for them works and yours don't. Also I recommend editing the title so people are able to find it easier. Then post your answer below ;). – Braiam Nov 16 '13 at 2:42
    
added link with my network info. – Lord Loh. Nov 16 '13 at 4:06
    
And the answer? – Braiam Nov 16 '13 at 11:26

To turn on WiFi

sudo rfkill unblock wifi
nmcli nm wifi on

To list WiFi Networks

nmcli c show

Output should be something like this

NAME                      UUID                                   TYPE              TIMESTAMP-REAL                    
Rishbh-Q1000              cd79a7a1-1cf4-49c3-ad58-21ab17d1ba05   802-11-wireless   Thursday 18 September 2014 05:32:34 PM IST

ncmli allows you to connect via The UUID or ID (NAME)

Usage :

 nmcli connection { COMMAND | help }
   COMMAND := { list | status | up | down | delete }

   list [id <id> | uuid <id>]
   status [id <id> | uuid <id> | path <path>]
   up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [--nowait] [--timeout <timeout>]
   down id <id> | uuid <id>
   delete id <id> | uuid <id>

Example Usage in this case

  • Connect :

    nmcli c up uuid cd79a7a1-1cf4-49c3-ad58-21ab17d1ba05
    

    or

    nmcli c up id Rishbh-Q1000
    
  • Connect on specific wlan interface :

    nmcli c up id Rishbh-Q1000 iface wlan1
    

    or

    nmcli c up uuid cd79a7a1-1cf4-49c3-ad58-21ab17d1ba05 iface wlan1
    
  • Disconnect :

    nmcli c down id Rishbh-Q1000
    

    or

    nmcli c down uuid cd79a7a1-1cf4-49c3-ad58-21ab17d1ba05
    
share|improve this answer
    
Error: 'list' is not valid 'connection' command. (nmcli tool, version 1.2.6) – Mariano Dupont Apr 18 '17 at 20:59
    
'list' has been replaced with 'show' in newer version of nmcli – RishbhSharma Apr 28 '17 at 6:42

Tested in Ubuntu 16.04 LTS

In case the wireless interface is already connected to some other AP, first disconnect it using

nmcli con down <AP name>

Example: Supposing interface is already connected to 'PreviousAP', then disconnect it using

nmcli con down PreviousAP

Now for Connecting to new AP

Considering you know the AP name and password.

nmcli device wifi connect <AP name> password <password>

Example: AP name : Connect-to-this

WPA/WPA2 PSK : iampassword123

nmcli device wifi connect Connect-to-this password iampassword123

This will automatically create a file in /etc/NetworkManager/system-connections/ with the APname, which will contain the configuration.

ls /etc/NetworkManager/system-connections/Connect-to-this
share|improve this answer
    
Thanks for explaining how to connect to a new wifi network – Normadize Sep 26 '17 at 14:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.