LinuxPlanet Blogs

By Linux Geeks, For Linux Geeks.

Archive for the ‘All Distros’ Category

How to configure BSNL EVDO on Linux

without comments

BSNL EVDO was India's first 3G wireless broadband service. I have been a fan of EV-DO for a long time. BSNL by default doesn't have any support for linux. In this howto, I will show two ways to configure BSNL EVDO USB modem on your Linux system - a Graphical method using Network Manager and other using wvdial.

So, lets begin with the easiest and the fastest way, using Network Manager.

Configure and Setup EVDO on Ubuntu or Fedora using Network Manager.

Before beginning, please note that this method is only applicable to Network Manager 0.7.x and 0.8 or above. Now, follow the steps below to get it running.

1. First of all we need to install the usb-modeswitch package to make our device being detected as a usb modem. Issue the following command to install the packages.

[chia]$ sudo apt-get install usb-modeswitch usb-modeswitch-data   # For Debian/Ubuntu Based distro

[chia]$ su -c 'yum install usb_modeswitch usb_modeswitch-data'    # For Fedora Based distro

2. Now, right click on the Network Manger icon (at the top panel, right corner) and click edit connections.

Configure BSNL EVDO

3. Select the mobile broadband tab and click add. This will start a wizard. If the wizard shows the name of your device then it means, it is able to detect it. Wait for the Network Manager to detect your modem.

4. Now, proceed and select the country and the connection ( in our case India and BSNL respectively) and finish the setup.

Select Network Provider

4. Now you will be able to run your internet. Optionally you can add nameservers, by editing the network connections.

Add nameservers

In case the above method doesn't work for you - an old Network Manager or if you are working on console, you can use wvdial to setup the EVDO usb modem.

Setup BSNL EVDO USB modem on your Ubuntu or Fedora using wvdial

1. Install wvdial on your linux.

[chia]$ su -c 'yum install wvdial'

If you don't have access to internet through linux yet, download the wvdial rpm for your distro. You have to install libpcap, libwvstreams, ppp as its dependency.

2. Once you are finished installing wvdial we can now configure the settings. Edit the wvdial configuration file, /etc/wvdial.conf

[chia]$ su -c 'vim /etc/wvdial.conf'

3. Exactly copy paste the following lines

[Dialer Defaults]

Modem=/dev/ttyUSB0
Baud=115200
Dial Command = ATDT
Baud=115200
Dial Command = ATDT
init1=ATZ
init2=AT+CRM=1
Flow Control= Hardware (CRTSCTS)
Username = username
Password = password
Phone = #777
Stupid Mode = 1

4. Replace the username and phone password with the evdo no.

5. Now open resolv.conf

[chia]$ vim /etc/resolv.conf

6. Add the following lines

nameserver 218.248.240.181
nameserver 208.67.220.220

Now run the wvdial command and enjoy :)

[chia]$ wvdial

 

Written by chia

June 11th, 2010 at 7:41 am

Convert any software packages to formats recognized by your distro using Alien

without comments

Alien is a program that is used to inter convert software packages from different distributions e.g  a deb to rpm, deb to solaris pkg packages etc. Although most of the popular softwares will be available as a package in your linux distribution too but if that's not the case then you can use alien to convert a package available in some other file format to the one used by your distro.

Before proceeding to the how to part, you should be aware that many system essential packages like glibc etc. are packaged to work for that specific distro. So, converting them into yours and installing that package might be troublesome. Although using it to install regular softwares usually work, but just don't use alien to install such important packages otherwise you might end up breaking your system.

Alright, so lets get started with some examples.

Convert an rpm package into debian

Convert into debian is the default feature so you don't need to use any flags.

[shredder12]$ alien package.rpm

If you want to install it rightaway, use -i option.

[shredder12]$ sudo alien -i package.rpm

Convert a debian into rpm

You need to use the --to-rpm or just -r option to do that.

[shredder12]$ alien  --to-rpm package.deb

For installation again use -i flag.

Similary, for other package formats you can use --to-deb, --to-pkg, --to-tgz to convert into debian, Solaris pkg format and tgz formats respectively.

You can even convert multiple packages into multiple formats at the same time.

[shredder12]$ alien --to-deb --to-tgz --to-rpm  p1.deb p2.tgz p3.rpm

This will generate 6 packages and at the end all the three packages will be available in all three formats.

Written by shredder12

June 8th, 2010 at 5:14 am

Backup your MySQL databases automatically using Automysqlbackup

without comments

When I started managing a server, due to small database I always took manual backups, scarcely though. And because of my laziness in doing so, my fellow author, shredder12 constantly bugged me to do so. So, I started with weird entries in cron until I find this awesome script.

Automysqlbackup is a shell script that lets you take monthly, weekly and daily backup of your MySQL databases. It uses mysqldump to backup your database. With mysqldump you can set an entry in cron to backup your database as well, and there may be many script already available for that. But this script lets you backup multiple databases and compress it using gzip or bzip2. It will rotate the backup, thus not filling your harddisk and if you enable weekly backup, then it will have one for every week.

When using mysqldump for backup of MySQL, by default the master-data option will execute a FLUSH TABLES WITH READ LOCK command which disallows writes to any tables. This will keep the read lock for the entire duration of the dump to ensure that replication position won't change during the dump. This can be a problem when you are running High traffic websites with a large database. As mysqldump might take from a second to few minutes depending on the size of the database. And any user, at this time carring operations that require write to tables during the dump process are locked out. This may not be a problem with InnoDB engine, but with MyISAM (default) this is necessary.

Configuring automysqlbackup

The script is well documented. Download the script, give the +x permission and add the following line on cron

#Daily DBBackup
15 12 * * *   root    /path/to/automysqlbackup.sh >/dev/null 2>&1

Some variables that I set up in the script.

# Username to access the MySQL server e.g. dbuser
USERNAME=chia_sitex

# Username to access the MySQL server e.g. password
PASSWORD=password

# Host name (or IP address) of MySQL server e.g localhost
DBHOST=localhost

# List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3" or all
DBNAMES="db_linuxers"

# Backup directory location e.g /backups
BACKUPDIR="~/sites/db_backup"

MAILCONTENT="quiet"

# Email Address to send mail to? (user@domain.com)
MAILADDR="user@domain.com"

#Now, since I use Drupal I will use drush to set the site in maintenance mode before taking the backup. Just figure out something similar for your CMS :P

# Again this is not necessary but if you are running high traffic site this can help a log

# Command to run before backups
PREBACKUP="drush eval \"variable_set('site_offline',TRUE)\""

# Command run after backups (uncomment to use)
POSTBACKUP="drush eval \"variable_set('site_offline',FALSE)\""

 

Written by chia

April 16th, 2010 at 1:07 pm

Linux Mint 8 “Helena” Xfce released

without comments

The Xfce version of Linux Mint 8 Community Edition has released. Linux Mint 8 is based upon Ubuntu 9.10 thus making this Xfce release based on Xubuntu 9.10, Karmic Koala. With Linux Kernel 2.6.31, Xfce 4.6.1 "Helena" Xfce CE comes with a lot of improvements and the latest open source softwares. Check them out.

What's New in Linux Mint 8 Xfce

Software and Update Manager Improvements

This release comes with a bunch of nice feature additions in Software and Update Manager. Now, the layout of the software manager(Xfce-mintInstall) is changed. The screenshot of applications is now available in its bottom corner.

In addition to this, now you won't have to worry about hitting the refresh button for updating. In case of new updates, you will be notified by the update manager of a new version of 'mintinstall-data'.

In the Update Manager preferences, there is not a section "ignored packages" which lets you specify packages you don't wish to update. You can even use wildcard characters to define group of packages you want to ignore.

The new Upload Manager

The previos mintUpload is divided into two applications: the upload manager and the file uploader. The upload manager lets you define the upload services, say http or ftp. So, when you launch the file uploader these services are accessible from the system tray, selecting any of them will open the upload zone for that respective service.

Artwork Improvements

In the artwork section, Linux Mint 8 comes default with Shiki theme. The default background is called "Fresh" designed by Zwopper. Firefox comes bundled with stylish addons which gives it better integration with the overall theme.

Source: LinuxMint Blog

Written by shredder12

April 2nd, 2010 at 8:45 pm

Posted in All Distros,Linux

IE9 preview ties the fight between H.264 and Ogg Theora

without comments

With the ongoing fight about the codec technology to be used for the built-in video feature of HTML5, the decision of Microsoft for IE9 was looked upon as the major decider to bridge this major technology divide. But in IE9's preview this Tuesday, their decision to adopt H.264 technology proved to be heart breaker for Ogg Theora and open-source fan camp. Although this is not the final decision, but it is still a major chance that Microsoft can go with the proprietary H.264.

In case your memory needs a little refreshment, HTML5 introduced the <video> tag to provide built in video capability in browser and to get rid of the browser crasher flash softwares. Even though a browser updated to work with HTML5 still needs a codec technology like opensource and free Ogg Theora or proprietary H.264 to play the videos. Firefox and Opera decided to go with Ogg Theora, Safar wouldn't play anything other than H.264 encoded videos and the Grand Google Chrome is happy to support both of them. So, the score till now was in favour of Ogg Theora, 3-2. But IE9's decision to adopt H.264 has tied the whole scenario.

But this decision of Microsoft was anticipated. Just think, why would they not want to go with H.264. Consider the following points.

Finally, after all the improvements done in HTML5 for a better web, it seems that the inbuilt video technology brought by <video> tag might take some time to be widely accepted because of this unanswered question, "which codec?". 

Written by chia

March 17th, 2010 at 1:29 pm

Firefox 3.0 comes to an end

without comments

The great era of Firefox 3.0 finally comes to an end with Mozilla calling off further updates for the release. "There will be no more updates for Firefox 3.0.x", said mozilla. The final update, according to mozilla, will be Firefox 3.0.19, due March 30.

Support for Firefox 3.0 was planned to be discontinued in January but due to late release of Firefox 3.6 , it was delayed.

Nicely explained by Stephen Shankland, there seems to be a recent trend in the browsers, trying to frequently upgrade browsers. One of the reasons behind this is to use the energy, time and resources spent in maintaining the old releases in improving the latest ones. Google seems to be the beginner of this shift, Chrome browser automatically updates to the latest version in background.

Browsers are probably the most used softwares in the world. And there is always some tension in the vendors' camp to make their product better than better. So, using most of the man power in developing and improving the browser further looks like a better choice than maintaining oldies.

Written by shredder12

March 17th, 2010 at 5:37 am

Get ready Developers for Firefox Mobile Add-on Challenge

without comments

Mozilla has launched a contest to speed up the add-ons development for the newly released Firefox for Mobile Browser. Add-on developers all around the world are challenged to use their innovation and skills to come up with some great add-ons for the Mobile browser keeping in mind the mobile context (small screen size, touch screen, etc.). Top 10 winners will be awarded a N900 + some great mobile merchandise.

The challenge has already started on 11th March and the last date to come up with your addon is 12th April. This is actually a second competition of this type, with the first one resulted in some fantastic addons. Here is a list of the winners of the previous competition, held last year. But there is still a lot that can be done to enhance the look and functionality of firefox for mobile.

Mozilla mobile team has shown some interest in the following themes.

  • Using device APIs: js-ctypes (Fennec 1.0) might be used to hook into the device (addressbook or camera) and add functionality to a Web app by making a pagemod (jetpack- or greasemonkey-like add-on)
  • Photo, media, social and sharing tools: Create a social aggregator for quickly viewing streams from Twitter, Facebook, etc; Create a tool for sharing images, links and text
  • Saving files and Session Restore: Save as PDF, Save Image, Remember last open tabs, etc.

So developers, buckle up for the challenge. Start building your add-on today and you can win a N900 along with some cool mobile merchandise and ofcourse the honour to see your creation used by people worldwide. You can find more information regarding the challenge here.

Written by shredder12

March 15th, 2010 at 11:26 pm

VLC 1.1.0 is going to be the Fastest of all

without comments

Everytime I read something about VLC 1.1.0, I always find something new about it, making it better and better. You would have read my previous posts about its amazing new features along with some cool facts. This time Jean-Baptiste Kempf, one of the developer, showed in his blog, how VLC 1.1.0, codenamed the luggage, is going to be faster than all of the previous versions. 

Lets take a look at the main improvements which will contribute to its Fast functionality.

Faster Decoding of HD videos

With the world moving towards high-definition, its a must for all the media players to have fast encodings for HD videos. And lets say VLC was a little behind in this aspect, which the developers plan to fix in the new release using the following methods:

  • GPU decoding
  • fast CPU decoding, especially windows.
  • DSP decoding using OpenMax IL on embedded Linux, like Maemo.
  • Better audio pipeline, making it a better audio player too.
  • Less use of RAM and threads.

With its new capability to do the decoding part on a GPU, VLC takes loads of processing from the CPU. And its even better and faster when you are using a compatible GPU, like nVidia. VLC will then hardly consume 10% of the CPU.

In some more improvements, VLC will be using less RAM and threads than the previous releases. So, as you can see, the new VLC 1.1.0 is going to be way faster, lesser resource intensive and better than ever.

Written by shredder12

March 15th, 2010 at 3:08 pm

Posted in All Distros,Linux,vlc

VLC 1.1.0 is going to be the Fastest of all

without comments

Everytime I read something about VLC 1.1.0, I always find something new about it, making it better and better. You would have read my previous posts about its amazing new features along with some cool facts. This time Jean-Baptiste Kempf, one of the developer, showed in his blog, how VLC 1.1.0, codenamed the luggage, is going to be faster than all of the previous versions. 

Lets take a look at the main improvements which will contribute to its Fast functionality.

Faster Decoding of HD videos

With the world moving towards high-definition, its a must for all the media players to have fast encodings for HD videos. And lets say VLC was a little behind in this aspect, which the developers plan to fix in the new release using the following methods:

  • GPU decoding
  • fast CPU decoding, especially windows.
  • DSP decoding using OpenMax IL on embedded Linux, like Maemo.
  • Better audio pipeline, making it a better audio player too.
  • Less use of RAM and threads.

With its new capability to do the decoding part on a GPU, VLC takes loads of processing from the CPU. And its even better and faster when you are using a compatible GPU, like nVidia. VLC will then hardly consume 10% of the CPU.

In some more improvements, VLC will be using less RAM and threads than the previous releases. So, as you can see, the new VLC 1.1.0 is going to be way faster, lesser resource intensive and better than ever.

Written by shredder12

March 15th, 2010 at 3:08 pm

Posted in All Distros,Linux,vlc

Manage your ssh tunnel redirects graphically using Gnome SSH Tunnel Manager

without comments

gSTM provides you with a graphical front-end to manage various ssh tunnels easily. This tool is ofcourse useful for people who have to deal with ssh tunnels all the time but even if you don't use tunnels frequently or you can hardly remember the ssh flags while creating one, this tool might be able to help you out with quick creation of any type of tunnel redirects you want.

The configuration for each tunnel is saved in XML format and it provides with a single interface to manage all of the tunnels(start or stop). So, if you have been using tunnels this tool may prove to be a good way of manage them.

How to install gSTM in Ubuntu

gSTM is available in the repos. Either click this link or enter this command in the terminal to install it.

[shredder12]$ sudo apt-get install gstm

You can even directly install it from the software center.

How to install gSTM in Fedora or directly from source

gSTM is not available in Fedora repos, so you will have to install it from the source. First of all, download the source of the software from here. Now, just enter the following 3 magical commands of most of the source code installations.

[shredder12]$ ./configure

[shredder12]$ make

[shredder12]$ sudo checkinstall

You can easily creat and configure ssh tunnels using this tool any way you want. It provides you with a nice and simple interface to easily handle them.

Written by shredder12

March 14th, 2010 at 2:38 pm

Posted in All Distros,Linux,ssh