You are currently browsing the category archive for the ‘Howto's’ category.

Few days back I bought Reliance Netconnect Broadband+ Data-card( Huawei EC1262) and as usual it had support only for Windows and Mac. I asked the tech support and they clearly mentioned me that they dont support Linux. So now I was on my own. I looked over the Internet and found many tutorials to get it to work on Ubuntu. None of them worked for me perfectly. So I changed few things mentioned in those tutorials and got my datacard to work perfectly on Ubuntu 10.04 . Now I am going to list the steps that I followed to get my datacard to work on Ubuntu. So here I go:

1. First of all open up the terminal and run the following command

sudo apt-get update

2. Now we need to install wvdial so run the following command

sudo apt-get install wvdial

3. Now we need to install libusb-dev so run the following command

sudo apt-get install libusb-dev

4. Now we need to download usb-modeswitch and usb-modeswitch-data so go to the following links

usb-modeswitch usb-modeswitch-data . Download both the files and save them on your computer .

5. Now extract both the files and and go to extracted directories on by one (first go to usb-modeswitch). and run the following command as root

sudo make install

6. Now run the following command

sudo gedit /etc/usb_modeswitch.conf

and it will open gedit and paste the following text in it and save the file

# Configuration for the usb-modeswitch package, a mode switching tool for
# USB devices providing multiple states or modes
# This file is evaluated by the wrapper script "usb_modeswitch" in /lib/udev
# To enable an option, set it to "1", "yes" or "true" (case doesn't matter)
# Everything else counts as "disable"
# Disable automatic mode switching globally (e.g. to access the original
# install storage)
DisableSwitching=0
# Enable logging (results in a extensive report file in /var/log, named
# "usb_modeswitch_"
EnableLogging=1
# Huawei, newer modems
DefaultVendor= 0x12d1
DefaultProduct=0x1446
TargetVendor= 0x12d1
TargetProduct=140b
CheckSuccess=5

Now run the following command and it will again open gedit and paste the above text in it again and save it

sudo gedit /etc/usb-modeswitch.conf

7. Now run the following commands

sudo gedit /etc/wvdial.conf

it will again open gedit and you need to paste the following text in it.

[Dialer netconnect]
New PPPD = yes
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyUSB0
ISDN = 0
Username = 93********
Password = 93*********
Phone = #777
Stupid Mode = 1
Auto DNS = 1
Check Def Route = 1

change the username and password with your 10 digit MDN number given on the box of datacard.
8. Now Save the file and reboot the computer. After reboot plugin your datacard and wait for 5 to 6 seconds . Now run the following command

sudo wvdial netconnect

you should see something like below after running the above command

--> Using interface ppp0
--> local  IP address 115.242.127.250
--> remote IP address 220.224.141.129
--> primary   DNS address 202.138.97.193
--> secondary DNS address 202.138.117.60

If you see this, that means you are connected to the internet. Now open the firefox and go to File menu and remove the offiline mode and enjoy. But if you dont see this then there is something wrong you are doing.
Original tutorial can be found here but it did not worked for me. So I suggest you that first you follow my tutorial and if it dont work for you only then follow the other tutorial.

P.S: If you dont understand instructions above then ask me for help in the comments. Remember there are no dumb questions. Good Luck.

Advertisements

This blog has been moved and new updated post can be found here

Introduction (From Wikipedia) :

Alpine is a free software e-mail client developed at the University of Washington.Alpine 1.0 was publicly released on December 20, 2007.Alpine is a rewrite of the Pine Message System that adds support for Unicode and other features. Alpine is meant to be suitable for both inexperienced email users and the most demanding of power users. Alpine is developed at the University of Washington, as was Pine before it. Alpine can be learned by exploration and the use of context-sensitive help. The user interface can be customized.
Alpine shares a lot of common feature of console applications, like a rich set of shortcut keys, using keyboard instead of mouse to do all navigation and operation. In fact all operations in Alpine have corresponding shortcut keys.
Unlike other console applications targeting developers and experienced users, which often require users to edit a configuration file, Alpine allows the user to change most configuration options within the software. This makes alpine one of the most easy to learn console-based email clients.
Alpine supports IMAP, POP, SMTP and LDAP protocol natively. Although it does not support composing HTML email, it can display emails that only have HTML content as text.
Linus Torvalds, the primary force behind the development of Linux, has stated in an interview published by the Lifehacker  weblog on 31 January 2008 that he uses Alpine as his email client.E-mail headers confirm this.

Configuration :

First of you have to download and install Alpine from here . If you are using debian or ubuntu simple type

 sudo apt-get install alpine

and it will be automatically install for you .
Now open your terminal and type

alpine

and you will see a screen like the one below .

Now move your cursor up and down to the option S SETUP or simply press S from your keyboard and you will see a next screen like the one below

Now press L from your keyboard and go to the configuration screen like as shown in the next screen

Now press A and you will be presented with a screen like below

In the Nickname field put anything you want and in Server field put this

imap.gmail.com/ssl/user=username@gmail.com

Replace “username” with your gmail username.

Now press Ctrl+X and you will be asked for your password (dont worry if not), just give your password and hit enter . In the next screen you will see the new list just created by you .

Now press left arrow and you will be back to the main screen . From here again press S and then press C and you will see a screen almost similar to one below

From the start of the screen go slowly down and you will see SMTP server field and Inbox Path field. Now put the following details in both the fields respectively ( press enter to add detail)

smtp.gmail.com/tls/user=username@gmail.com 
{pop.gmail.com/pop3/ssl/user=username@gmail.com}Inbox

and then hit enter and give your password if you are asked for . Thats it now you must be able to read your emails and send emails from your Gmail account .
Remember Password
Now if you want that your password should be saved on your computer (dont worry its totally safe) , then open the terminal and if you are in your home directory then give the following command

touch .pine-passfile

How to read email
To read your email just type alpine in the terminal and from the menu select FOLDER LIST and there you will see the list created by you so select it and now you can read your emails .

If you have any problem , you can ask me for help through comments .

This blog has been moved and new updated post can be found here

In this post I am going to explain about how to enable Grayscale Printing in Canon Pixma MP250 series printer . You can refer to my tutorial here in case you want to install the printer and scanner on Ubuntu and any other Linux distro .

To enable the Grayscale printing just follow the following steps .

1. Click System –> Administration –> Printing .

2. Now right click on your printer and select properties .

3. Now select Job Options

4 . Now scroll down to the bottom .

5. At the bottom you will see a text box . In that text box add “CNGrayscale” (without qoutes) and click on Add button .

6. Once you click add there will appear another text box right above the first text box . So in the second text box add “TRUE” and click on apply .

Thats all , now your printer will print in Grayscale mode . In case you want to print in color mode just change the TRUE to FALSE .

If there is something that you did not understand , you can ask me in the comments .

I have used most of the torrent clients out there for Windows ( utorrent , vuze , Mainline , bittornado , etc)   and I have also used most of the torrent clients available for Linux(Transmission , Deluge , halite , Ktorrent , qbittorrent , rtorrent) . Out of all these the one that I used most of the times in Utorrent on Windows XP . There is no match for Utorrent on Windows XP or any other Windows based operating System because its light and fast . While using Windows I having Ubuntu installed on other partition . But I never actually used it for using bit-torrent . One day I decided to completely switch to the Linux as I found myself using it most (98%) of the time . I removed the Windows XP and now Ubuntu is the only OS on my machine . As a regular Bittorrent user I felt completely lost as I could not found the proper alternative to utorrent as I was addicted to it and I knew it completely from inside out . Ubuntu came with transmission by default . But I did not liked it much as it was not upto my expectations . Then I tried few others and I found myself settled with the Vuze as I was familiar with it and I was getting decent speeds . But one after an update it started to annoying me , It was eating my  memory like a crazy and such a behavior is just not acceptable . So i dumped it and started looking for something else . One day at some forum I read a post about rtorrent and It actually attracted me as I feel quite comfortable with the command line . So I installed it and started playing with it . But my initial experience with it was not so good and it took me about one week to completely understand it and use it efficiently .  Now I am using rtorrent on daily basis without any problem and I was never been this much satisfied with a torrent client before . It just blows away every other client with with its speed , efficiency and elegance . I am going to write this tutorial so that others can benefit from my experience and they dont have face the problems that i faced . My this tutorial will be mainly targeted towards Ubuntu users but it will be equally helpful for the users of any other Linux distro . This tutorial is divided into 3 sections i.e. Installation , Configuration and Usage . So here I go :

INSTALLATION :

Installation of rtorrent is very simple , simple follow the following steps

1. For Ubuntu and Debian users just issue the following command :

sudo apt-get update
sudo apt-get install rtorrent

And this will install the rtorrent for you .
2. For Fedora users just issue the following command :

sudo yum install rtorrent

Now rtorrent is installed on your system .
3. For those who want to install by compiling from source can download the latest version from here

If there is any problem installing it from source then ask me for help in the comments .

4. To check if rtorrent is correctly installed you can run from terminal by typing

rtorrent

When you will first start it , it will show a warning that configuration file .rtorrent.rc not found .Just ignore it .
I suggest that you never run rtorrent as a root .

CONFIGURATION :

Before we begin configuration you need to create few directories which will be used by rtorrent . Suppose that your user name is foo . Then the user foo will create the following directories .

1. Default directory to save the downloaded torrents. Open your terminal and issue the following command without root (sudo) .

mkdir /home/foo/rDownloads

The above command will create a directoy named rDownloads in your home directory where your dowloaded torrents will be saved automatically . Remeber that you must change foo with your own username .

2. Default session directory . This is very important as it will contain data related to your download , paused , completely torrents .

mkdir /home/foo/session

This will create a directory in your home directory of name session and it will be used by rtorrent to save its current session .

Alright now you have created the directories required so now we can move on to the actual configuration part . So first of all download this files and save it on your computer.

Now open the file with your favorite text editor . You will a long file with some stuff in it . Well all this stuff is what we are going to configure now . The first thing that you will see is something like this :

# Maximum and minimum number of peers to connect to per torrent.
#min_peers = 40
#max_peers = 100

Now change it to exactly as shown below

# Maximum and minimum number of peers to connect to per torrent.
min_peers = 50
max_peers = 80

Now the next thing to change is this :

# Maximum number of simultanious uploads per torrent.
#max_uploads = 15

change it to this :

# Maximum number of simultanious uploads per torrent.
max_uploads = 4

Now change this :

# Global upload and download rate in KiB. "0" for unlimited.
#download_rate = 0
#upload_rate = 0

Into this :

# Global upload and download rate in KiB. "0" for unlimited.
download_rate = 0
upload_rate = 50

Now change this :

# Default directory to save the downloaded torrents.
#directory = ./

Into this :

# Default directory to save the downloaded torrents.
directory = /home/foo/rDownloads

(replace foo with your username)

Now change this :

# Default session directory. Make sure you don't run multiple instance
# of rtorrent using the same session directory. Perhaps using a
# relative path?
#session = ./session

Into this :

# Default session directory. Make sure you don't run multiple instance
# of rtorrent using the same session directory. Perhaps using a
# relative path?
session = /home/foo/session

(replace foo with your username)

Now change this :

# Port range to use for listening.
#port_range = 6890-6999

Into This :

# Port range to use for listening.
port_range = 60125-64125

Now change this :

# Start opening ports at a random position within the port range.
#port_random = no

Into This :

# Start opening ports at a random position within the port range.
port_random = yes

Now change This :

# Check hash for finished torrents. Might be usefull until the bug is
# fixed that causes lack of diskspace not to be properly reported.
#check_hash = no

Into This :

# Check hash for finished torrents. Might be usefull until the bug is
# fixed that causes lack of diskspace not to be properly reported.
check_hash = yes

Now change this :

# encryption = allow_incoming,enable_retry,prefer_plaintext

Into This:

 encryption = allow_incoming,try_outgoing ,enable_retry

Now change this :

# dht = auto

# UDP port to use for DHT.
#
# dht_port = 6881

# Enable peer exchange (for torrents not marked private)
#
# peer_exchange = yes

Into This:

dht = auto

# UDP port to use for DHT.
#
 dht_port = 63425

# Enable peer exchange (for torrents not marked private)
#
 peer_exchange = yes

Alright now your configuration is complete . Now save the file and copy the file into your home (/home/foo) directory . And issue the following command .

 mv rtorrent.rc /home/foo/.rtorrent.rc

This command is simply to hide the rtorrent.rc file

USAGE :
Now using rtorrent is very simple . Open your terminal and write

rtorrent

without root and hit enter
you will see a screen like below

The above screenshot is having the following useful information .

To demonstrate the usage to rtorrent we will download the latest version of Ubuntu from here via torrent . So download the torrent file and save it in your computer . I downloaded the file and saved it in /home/harbhag/ where harbhag is my username for the system .

Now hit ENTER and the above screen will change to the one like below :

Here you can see that in the end of the screen is load> , so here rtorrent is asking to load the torrent file to start download .

Now press TAB and you will a screen like the one below

Here it is showing the list of all the Directories and files present in my home directory . Now you can see that in the end of the list it is showing torrent file that i just downloaded . If you also saved the file in your home directory then you will also see this file (ubuntu-10.04-desktop-i386.iso[www.tuxdistro.com].torrent) along with the other files and directories present in your home directory .

Now enter u (first letter for the torrent file) and hit TAB and it will automatically load the torrent file for you like below .

Now hit ENTER and your screen change to the one like below :

your torrent is loaded now but its not downloading yet to start the download press UP or DOWN arrow and you will see stars in front of the name of torrent you just added like below :

Now press Ctrl key and s key together (i.e. Ctrl+s) and your torrent will start downloading and the numbers on the bottom of the screen will start changing . Congratulations now your have successfully loaded your first torrent in the rtorrent .

To stop the downloading press Ctrl+d and your torrent will stop and if you press Ctrl+d the torrent will got deleted . To quit the rtorrent first stop all the torrents you are downloading by pressing Ctrl+d and then press Ctrl+q to quit the rtorrent . If you will press the RIGHT arrow key while the stars are in front of the torrent , then you will see a screen like below :

Here you can find lots of information regarding peers and trackers and many more . To exit from this screen to go back to previous screen just press the LEFT arrow key .

So thats all for now . If you have any problem regarding this tutorial or you are having slow speed or your are not able to do anything i explained here then you can ask me for help in the comments . Good luck ,cheers .

Improvements :

Well one of my reader(Ellidi) suggested me in comments that torrents should be loaded in to rtorrent automatically as adding them manually is little more overhead . So now I am going to explain how to do it . You need to change the file (rtorrent.rc to make this feature work . So open the file and change it as below :

gedit /home/foo/.rtorrent.rc

and change this :

# Watch a directory for new torrents, and stop those that have been
# deleted.
#schedule = watch_directory,5,5,load_start=./watch/*.torrent
#schedule = untied_directory,5,5,stop_untied=

Into this :

# Watch a directory for new torrents, and stop those that have been
# deleted.
schedule = watch_directory,5,5,load_start=/home/foo/watch/*.torrent
#schedule = untied_directory,5,5,stop_untied=

And then create the watch directory

mkdir /home/foo/watch

And dont forget to replace foo with you username .
So from now on rtorrent will automatically start downloading the torrents that you will save in watch (/home/foo/watch) directory . And if you will delete the torrent from the rtorrent , it will be automatically deleted from the watch directory .

This blog has been moved and new updated post can be found here

If you are using any Debian Based distro like Ubuntu then you need to follow the following steps .
1. Download the driver from Here
2. Open the archieve and there will be two .deb files (cnijfilter-common_3.40-1_i386.deb(for 32 bit)/cnijfilter-common_3.40-1_amd64.deb(for 64 bit) AND cnijfilter-mp250series_3.40-1_i386.deb(for 32 bit)/cnijfilter-mp250series_3.40-1_amd64.deb(for 64 bit) ) , now install them and connect your Printer and print the test page .

if you are using RPM based distro then you need to follow the following steps .
1. Download the drivers from Here
2. Open the archieve and there will be two .rpm files , now install them and connect your Printer and print the test page .

For Arch Linux ( 32bit only)
1. Download PKGBUILD file Here
2. Open the archieve and you will get a folder named “cnijfilter-mp250” , now open the terminal and cd to that folder and issue the following commands
(a) makepkg -s –asroot
(b) pacman -U filename.pkg (where “filename” is the name of the file that is just created in the “cnijfilter-mp250” folder with extension .pkg)
Now connect your printer and print the test page

Getting Scanner To Work in Ubuntu

I have noticed that some users are not able to get their scanner to work while the printer is working fine . So i found the solution online and here I am going to share that solution with you guys . All you need to do is just to issue the following commands in the order shown below :

Update : With the new Drivers from Canon There is no need to follow the steps below, just install the new drivers and restart your computer. But if your scanner is not identified even after installing the new drivers then follow the steps below.

1 . Download the scanner drivers for for Ubuntu here .

2. Extract the package by double clicking it and you will find two .deb files (scangearmp-common_1.40-1_i386.deb and scangearmp-mp250series_1.40-1_i386.deb) in it . Just install both the files .

3. Now open your terminal and issue the following command

sudo apt-get install libusb-dev build-essential

4. Now we need to get sane-backened so issue the following commands .

sudo apt-get install git-core
git clone git://git.debian.org/sane/sane-backends.git

completion of this step depends upon the speed of your internet and it may take some time if you are on slow connection so pls be patient

5. The above command will save the sane backend in your home directory with the name sane-backends . So now you need to go to that directory . If you are already in your home directory then issue the following command .

cd sane-backends

6. No we can run the configuration of the package with the following command:

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var

7. Once the configuration is complete we need to compile the package so issue the following command .

make

This process may take a while to complete .

8. The last step is to install the package so issue the following command :

sudo make install

9.  The scanner is now installed, however the permissions still need to be set. To set the permissions we will create a new file that will allow usage of the scanner. In the terminal, open Gedit:

sudo gedit

Once the gedit is open copy paste the following text in it

SUBSYSTEM==”usb”, ENV{DEVTYPE}==”usb_device”, MODE:=”0666″

SUBSYSTEM==”usb_device”,MODE:=”0666″

and save this file in your /etc/udev/rules.d directory with the name 40-scanner-permissions.rules

Your PIXMA MP250 scanner is now installed. You many now start scanning using Xsane scanning-utility .

Note : If you have any problem with the following procedure and you still cant get your printer/scanner to work then ask me for help in the comments I am always ready to help, and you can do me favor by linking this blog to your site and recommending it to your friends .

Note: Canon Now provides drivers for 64Bit Version of Ubuntu also.