Skip to main content

Experimenting with Ubuntu...establishing internet

Hi there! Finally a post after a long time!
I have been experimenting with ubuntu these days! The first thing we need is internet. Perpetual connectivity is one thing we strive for!

So this post intends to cover two major issues I came against while establishing internet on Ubuntu. Ubuntu works in quite different way than windows so the BSNL or ISPs might not help you much in this case!

Initially, I tried establishing mobile internet (!dea Netconnect dongle), recently I tried establishing BSNL Broadband Connection.

Lets first talk about what is still fresh:


If you have already experimented a lot then you might be suffering a problem where wired network is  "unmanaged".


First, remove the existing network configurations for eth* from /etc/network/interfaces. So the resulting /etc/network/interfaces will only has the following loopback interface.

auto lo
iface lo inet loopback

PS: If you are new to Ubuntu you might be finding difficulty to edit the file due to read only rights. Only root can modify the file. So I would suggest opening the file through terminal using this command:

$sudo gedit /etc/network/interfaces


Note: sudo helps you to access files as root.You are asked to enter the password before the file opens. Make the asked changes. The changes can be saved now.

Now, enable wired network settings on NetworkManager by changing "managed=false" to "managed=true" in /etc/NetworkManager/NetworkManager.conf.

NOte: Open the file in the same way as above.

Finally, restart NetworkManager to reload its configuration.

$ sudo service network-manager restart
Once you restart NetworkManager, you will be able to edit wired network settings in System Settings -> Network -> Wired.

Next , issue you would face is configuring the modem and defining the access point. Here it goes:

  1. Connect your ethernet wire to the port at the back of your computer.
  2. Fire up the terminal and type in sudo pppoeconf
  3. It should detect your modem.
  4. Keep on pressing enter. Fill in your user name and password when indicated.
  5. It should be easy to stick on to defaults.
  6. You should be prompted back to your terminal when it would say pppoe loaded. Simple. That's the end of terminal. Now go to System>Networking. Click on it
  7. Activate the Wired connection.
  8. Highlight the wired connection and click on properties.
  9. Check the box "enable the connection"

These would definitely sort out the issue for you. Let's come to establishing net connectivity via mobile internet:

1- get the a readymade Script

If the link doesn't works, make a file named
with this Script:


while true; do
    LC_ALL=C nmcli -t -f TYPE,STATE dev | grep -q "^gsm:disconnected$"
    if [ $? -eq 0 ]; then
        #jdownloader is still in the download status so stop it because
        #internet is disconnected and jdownloader won't resume download
        #when connected again
        #jdownloader --stop-download
        #sometimes I can not get connected after disconnection when
        #I click on <name of the network connection>. I have to disable
        #and enable Mobile Broadband
        nmcli -t nm wwan off
        sleep 1
        nmcli -t nm wwan on
        sleep 1
        nmcli -t con up id "Tunisie Télécom / TUNTEL WEB DATA"
        #wait approximately 15 sec to get connected
        #if anyone can add better command to check for it just comment it :-p
        sleep 15
        #now connected to internet so start download
        #jdownloader --start-download
    #it does not worth keep it checking every millisecond.
    #my connection will be reestablished within 5-15 seconds
    sleep 2
    #if anyone can code it better please feel free to comment
    #TO-DO:: check for data received. if data < 15 KB after 20 seconds of connection
    #reconnect mobile broadband connection 

2- extract it to your home folder (or somewhere safe) and make it hidden by placing a period before it like this (so that you won't accidentally delete it)

3- Give it execution permission like this: right click on it, go to "properties", then navigate to "permissions" then tick "Allow executing file as program"

4- go to t/media/infinite/New Volume/100/MobileBroadband-autoconnect.shhe Mint menu and type "startup applications"

5- click on "add" then "browse" opposite to "command" field to give the directory of the script (your home folder or wherever you've placed it) then give it a name in the "name" field, for example mine is "Tunisie Télécom / TUNTEL WEB DATA".

That's it guys!
Hope this may help you and you have your internet up and running!
Do drop by queries if you have any! :)


Popular posts from this blog

Duh - Saves you the trouble to correct your command


This is no more an expression for me but a command now. Thanks to the hack I have been doing for past couple of days.

What's it about? Well, here it goes.

How many times it happens that we screw up commands on terminal?
A typo, a syntax mistake or jumbled up arguments. The command doesn't run and then we spend time retyping it ensuring everything is in place this time.
Quite time consuming, eh?

My laziness simply denied me such a behaviour. So I coded up a powershell cmdlet which can do this for me.
Now if I mess up a command, I just have to type 'Duh' and the right command will be displayed on the prompt for you to check and execute (press ENTER).

How Duh operates internally?
Well, guess what. Answer lies in the "tries".
We have a trie and we do closest match using Leveinshtein Distance.
In short, how to figure out how close two strings are?  Find the no of letters you need to remove/insert/replace in order to attain string 2 from string 1.
This is wha…

How would you make an HTML Parser?

Hola folks,

Here we will be walking through how html is being parsed by a widely popular parser: Angle Sharp
You can find it here !
This is just a walkthrough and gives an idea on the breadth of issues  one has to deal with while designing a parser.

Let's sneak peek into what kind of data structures are used and how is the code structured.

It all begins with this line:
var parser = new HtmlParser();
We have folowing variations in constructing the HtmlParser object:

  public HtmlParser()
            : this(Configuration.Default)

        /// <summary>
        /// Creates a new parser with the custom options.
        /// </summary>
        /// <param name="options">The options to use.</param>
        public HtmlParser(HtmlParserOptions options)
            : this(options, Configuration.Default)

        /// <summary>
        /// Creates a new parser with the custom configuration.
        /// </summary&…

What emotions run through your playlist?

Hola !!

Long time. So I was upto creating this application one night , I named: "Playlist Emotions" , "What does the song says" :P , "PlayWithEmotions" and what not, each project of a failed experimentation.


The project took way too long. Thanks to the noble idea of making and deploying it as a GWT application and then to improve upon the GUI of the app.
FYI , I tried but done neither of the things above. My Google Console developers trial account  supposedly has some issues with this app, yet to be resolved. So before the entire idea behind the app and the excitement of results it displays fades out , I thought, lemme write a blog post on the same.

So what is this all about?

The idea originated from a candid discussion with my friend on how songs influence our moods and also how our emotions affect the type of songs we listen to.

Being fascinated about knowing what kinds of songs I listen to, I thought of creating an application where I would just e…