Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use my mobile (Samsung Corby GT-S3653) to connect to the internet and my mobile network gets automatically disconnected periodically when I'm using it for GPRS so I always have to click that notification icon and click "Tata Docomo Internet" for reconnecting it. Sometimes I have to repeat the process a couple of times until it properly connects. I want to know if there's a way to automate this process with the command line (or any other program) so I don't have to keep doing this all the time it disconnects.

share|improve this question

In the case of you, I suggest to create a custom shortcut key:

go to System Settings > Keyboard > Shortcuts [tab] > Custom Shortcuts and clicking on the + button to create a new one.

Enter nmcli -t con up id "Tata Docomo Internet" for the command, and the name as you wish.

Create new custom shortcut

Then click on it and assign your desired shortcut key. Now when it gets disconnected, you can connect simply with the shortcut key.

If you want to use more complex script you can see this question.

share|improve this answer

Your Answer


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.