Script to speed up mobile internet connexion in Linux
For people who use an USB stick or mobile phone to surf the internet on the go, it’s often reported that the connection is sloppy or unresponsive. Wireless features pings over 200 ms as it is, however, it’s not that what causes this ‘lag’.
For example, if you open an audio stream from the internet and then decide to browse some pages, you’ll notice that your connection behaves in a much more responsive manner.
One way to fix this issue is having a ‘ping’ command running in the background which probes a host (eg. Google.com) continuously. This keeps the connection ‘active’ as it always sends a few packets of data.
We’re going to be creating a script that will keep the connexion active.
To begin, get your favorite text editor and open up a random file in your system. I’m going to choose /opt/stayonline.sh for this tutorial.
$ sudo nano /opt/stayonline.sh
Copy/ past the following onto the file.
# /bin/bash while  do /bin/ping -c 3 -s 1 google.com sleep 30 done
Save it and close. We now need to make this file executeable. Just run the following.
$ sudo chmod +x /opt/stayonline.sh
All we need to do now is set it up in such a way where it gets called every time a network connection is established.
Open up your /etc/ppp/ip-up file for editing. Add ‘/opt/stayonline.sh’ at the very end of it (Be careful not to remove anything from the file). Here’s a screenshot if you’re confused -
That’s it. Now each time your connection is active, it’ll maintain a constant ping command with a remote host and hopefully, make your online experience more fluid and responsive.
Learn about high speed business DSL options that may be available.
Usefull links: lffl.org
Like us on Facebook
We need your assistance to stay live
This week Top Posts
- Top Things To Do After Installing Ubuntu 13.10 'Saucy Salamander' : Ubuntu 13.10 Saucy Salamander will be released on coming October 17th with many new salient featur...0 comments |
- News from Kaspersky Lab: Tor is protecting criminals : In a previous article I wrote a bit about Tor. Free browser, relays bouncing your IP all over the ...0 comments |
- Grive: An Unofficial, Open Source Linux Client For Google Drive : A couple of months before, we have featured a Linux client for Google Drive named Syncdrive, which w...0 comments |
- How To Access A LVM Drive / Partition in Ubuntu : Hey Guys, I installed Fedora on an external drive (LVM) recently and was trying to access it from U...0 comments |
- Adding and Deleting Cluster Resources (corosync pacemaker) : In our previous tutorial, we have shown you how to install corosync and pacemaker. We will show y...0 comments |
- Install Satis On Ubuntu Sever 13.10/13.04 : Satis is a simple static composer repository generator. It is used in any composer.json file as i...0 comments |
- Download 11 Community Wallpapers Chosen For Ubuntu 14.04 “Trusty Tahr”
- Ubuntu 14.04 LTS “Trusty Tahr” Default Wallpaper Revealed!
- Canonical Works with Cisco!
- Android Intercom: An Excellent Intercom App For Bikers Or Hiking Fans
- Install Google Talk Plugin In Fedora 20
- Adding and Deleting Cluster Resources (corosync pacemaker)
- News from Kaspersky Lab: Tor is protecting criminals
- Install Satis On Ubuntu Sever 13.10/13.04
- How To Access A LVM Drive / Partition in Ubuntu
- How To Disable Remember Open Files in Sublime Text 3
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .