I would like to permanently check "Enable mobile broadband" so I don't have to check it after every boot.
6 Answers
This problem is subject to a bug-report
Thus, until it is resolved upstream, a work around such as enabling mobile broadband on login will probably have to suffice.
Credit for the answer below goes to one of the bug contributors - if you have any additional information, add your details to the bug-report. Note - the subscribers dont like "me too" answers so dont just add "me too" - just click the subscribe button for updates.
Enable your broadband by clicking "enable broadband" in the network manager indicator.
In a terminal list the configured connections in your Network Manager:
nmcli con list
This show show the following example output:
NAME UUID TYPE TIMESTAMP-REAL
Tele2 Default 1 93c93207-adce-40e4-beb5-d9f9c830d474 gsm Sat 25 Feb 2012 01:27:42 PM CET
Vipnet connection 1 054bdd1f-34e3-4db1-b18b-d38e885276c8 gsm never
In the example look for your mobile broadband - it will have gsm
in the line of text. In the example above, the first item in a row contains the gsm
text and at the beginning of the line is the connection name that you will need below i.e. Tele2 Default 1
Now, create a text file (for example using gedit
) that starts one of your connections after a delay of e.g. 10 seconds (maybe you'll need a longer delay if your broadband device needs more time to initialize):
#!/bin/sh
sleep 10
nmcli nm wwan on
nmcli con up id "Tele2 Default 1"
i.e. change Tele2 Default 1
for your mobile broadband name
Save the file as start_my_connection
in your home folder.
Next move this file to somewhere you and others using your computer can access:
sudo mv ~/start_my_connection /usr/local/bin/start_my_connection
set the file permissions as follows:
sudo chmod 775 /usr/local/bin/start_my_connection
Finally, configure starting the script after login:
in Startup Applications Preferences add an item and enter the script path (/usr/local/bin/start_my_connection
) as the program command.

- 172,746
-
1I have the same issue with Ubuntu 14.04 LTS. I understand I can fix the problem with your solution but I wonder why the bug in network-manager has not been fixed ? – Romain Sep 08 '15 at 10:02
I have another easy solution for this if anybody out there is still looking for it. In most of the cases, the mobile broadband connection, for example from above question "Airtel connection" is set to connect automatically.
So the only thing left to do is check "Enable Mobile Broadband" to make it connect. But we usually have to do it manually after every boot.
For this, we add a command to work at startup:
In a terminal,
sudo gedit /etc/rc.local
Now add this line above exit 0
(while :; do nmcli -t nm wwan on; sleep 1; done)&
Save the file and exit.
Thats it..
This not only starts up the connection but if connection drops, it reconnects

- 379
The above response by @SriramKannan works perfectly. It did work after I restarted Ubuntu.
In a terminal,
sudo gedit /etc/rc.local
Now add this line above exit 0
(while :; do nmcli -t nm wwan on; sleep 1; done)&
Save the file and exit.

- 35,660

- 21
- 1
Thanks to Brahim's answer above I have shortened the autostart script there as the following, and it works very well for me as I don't use jdownloader:
#!/bin/bash
while true; do
LC_ALL=C nmcli -t -f TYPE,STATE dev | grep -q "^gsm:disconnected$"
if [ $? -eq 0 ]; then
nmcli -t nm wwan on
sleep 10
fi
sleep 5
done

- 10,996
-
Would be great to run this script when device is connected and repeat until internet conn. Don't know how to tap onto Ubuntu events though (like USB just connected). – Esamo May 26 '15 at 13:18
-
1@Esamo I have a card in my laptop, and not a USB device to work out/test this but maybe you can make use of the answer here: http://askubuntu.com/questions/284224/autorun-a-script-after-i-plugged-or-unplugged-a-usb-device/347971#347971 – Sadi May 29 '15 at 20:58
I found the best solution here. This script here works like a charm http://community.linuxmint.com/tutorial/view/1456

- 1
-
2Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Eric Carvalho Nov 11 '13 at 00:11
Reffer to this How to auto connect

- 1
-
3Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Nanne Mar 08 '13 at 13:12