Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

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.