Search This Blog

Showing posts with label debian. Show all posts
Showing posts with label debian. Show all posts

Saturday, March 22, 2008

accessing wpa wireless networks

This article explains accessing a wireless connection with WPA TKIP encryption using a Dell Inspiron E1505 laptop running Debian Etch. The final network connection is going to look like

ISP <---> wrt54g router <---> Dell Inspiron E1505 laptop

where ISP is the Internet Service Provider such as roadrunner, comcast etc., (and in my case "clarity connect").

The main steps involved are
  1. configure the router
  2. Install the necessary software packages on the Debian machine
  3. encrypt the password (if necessary)
  4. add a network stanza in /etc/network/interfaces
  5. restart the network

The information about the wireless card can be found by using
sudo lspci --vv
In this case, we have
0b:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
The router is configured as shown below.





The SSID stands for "Service Set Identifier". It is basically the name of the wireless network. In this example, it is set to "Raju_and_Satish". Change the SSID according to your network.

A list of available networks and their SSIDs can be obtained by using
iwlist scan

As can be seen from snapshot 2, the router is configured to use TKIP as its WPA encryption algorithm.

The "WPA Shared Key" (snapshot 2) is the place holder for setting a password to the network. Since the password is usually a bunch of ASCII characters, it is also referred as a "passphrase". In this example, the password for the network is "strongpassword". Change it according to your network.


Install the necessary software by using the apt-get command. I have installed
  • firmware-ipw3945
  • ipw3945-modules-2.6-686
  • ipw3945-modules-2.6.18-6-686
  • ipw3945d
  • wpasupplicant
I am not sure if all the above packages are needed for the network configuration, but I know that they are sufficient. If anyone knows a leaner version of the necessary packages, please let me know and I will update this list.


The next step is to generate an encrypted string known as the pre-shared key (PSK) from the ASCII password and the SSID. This can be achieved using the wpa_passphrase command.
$wpa_passphrase Raju_and_Satish strongpassword
network={
ssid="Raju_and_Satish"
#psk="strongpassword"
psk=604d8887badd597a8647f65b98c3c504ad29ba352211033adfed01cd8c3034a0
}

After this, add the following stanza to the /etc/network/interfaces.

# wireless setup
auto eth2
iface eth2 inet dhcp
wpa-conf managed
wpa-ssid Raju_and_Satish
wpa-key-mgmt WPA-PSK
wpa-psk 604d8887badd597a8647f65b98c3c504ad29ba352211033adfed01cd8c3034a0

Replace the wpa-ssid, wpa-psk with the values corresponding to your network configuration.

Then restart the network connections by doing
$sudo /etc/init.d/networking restart

Now the network should be up and running. Its status can be tested by using host, ping commands.

$host www.google.com
www.google.com CNAME www.l.google.com
www.l.google.com A 216.239.51.104
www.l.google.com A 216.239.51.99

$ping -c3 www.google.com
PING www.l.google.com (216.239.51.99) 56(84) bytes of data.
64 bytes from 216.239.51.99: icmp_seq=1 ttl=242 time=40.7 ms
64 bytes from 216.239.51.99: icmp_seq=2 ttl=242 time=40.9 ms
64 bytes from 216.239.51.99: icmp_seq=3 ttl=242 time=39.6 ms

--- www.l.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 10124ms
rtt min/avg/max/mdev = 39.616/40.437/40.985/0.635 ms

Tuesday, June 12, 2007

which manpage am I looking at?

Q. which manpage am I looking at?
A.

man -w keyword

gives the filename of the manpage that would be displayed when

man keyword

is entered at the commandline.

To get a list of all plausible manpages use

man -aw keyword

The -w option works for info also.

Q. which info page am I using?
A.

info -w keyword

gives the path of the info file that would have been displayed if the command "info keyword" is used.

Ref :- The manpages of man, info!

Tuesday, May 15, 2007

updating texmacs to new upstream release

As of Tue, May 15, 2007 Debian contains the following versions of Texmacs.

Stable (Etch) : 1:1.0.6-10
Testing (Lenny) : 1:1.0.6-11
Unstable (Sid) : 1:1.0.6.9-4

On my system, I am using Debian Etch, texmacs 1.0.6.9-2. Couple of days back, texmacs released 1.0.6.10. As a maintainer of this package, I want to build the 1.0.6.10 package which can eventually be uploaded to Debian Sid. This document provides a recipe of commands to achieve this goal.

Here I assumed that you are using pdebuild for the first time. If you have used it before, skip the appropriate steps.

$cp /usr/share/doc/pbuilder/examples/pbuilder-distribution.sh ~/bin/pbuilder-sid
$mkdir -p ~/pbuilder/result
$sudo aptitude install cdebootstrap
$pbuilder-sid create # if second time, use 'pbuilder-sid update'

$cat ~/bin/pdebuild-distribution.sh
#!/bin/sh

DISTRIBUTION=`basename $0 | cut -f2 -d '-'`
BASE_DIR="$HOME/pbuilder"
pdebuild --buildsourceroot fakeroot \
--buildresult $BASE_DIR/result \
--auto-debsign \
-- --basetgz $BASE_DIR/$DISTRIBUTION-base.tgz \
--distribution $DISTRIBUTION $@

$cp ~/bin/pdebuild-distribution.sh ~/bin/pdebuild-sid
$chmod +x ~/bin/pdebuild-sid

$cd ~/practice/

Obtain the latest source from texmacs website

$wget ftp://ftp.texmacs.org/pub/TeXmacs/targz/TeXmacs-1.0.6.10-src.tar.gz

Rename the upstream sources

$tar xzvf TeXmacs-1.0.6.10-src.tar.gz -C .
$mv TeXmacs-1.0.6.10-src texmacs-1.0.6.10
$tar czvf texmacs_1.0.6.10.orig.tar.gz texmacs-1.0.6.10
$rm -rf TeXmacs-1.0.6.10-src.tar.gz texmacs-1.0.6.10
$ls texmacs*
texmacs_1.0.6.10.orig.tar.gz

Obtain the latest sources available in Debian Sid

wget http://ftp.debian.org/debian/pool/main/t/texmacs/texmacs_1.0.6.9.orig.tar.gz
wget http://ftp.debian.org/debian/pool/main/t/texmacs/texmacs_1.0.6.9-4.dsc
wget http://ftp.debian.org/debian/pool/main/t/texmacs/texmacs_1.0.6.9-4.diff.gz

Create the corresponding Debian source for 1.0.6.10

$dpkg-source -x texmacs_1.0.6.9-4.dsc
$cd texmacs-1.0.6.9/
$uupdate -u ../texmacs_1.0.6.10.orig.tar.gz
New Release will be 1:1.0.6.10-1.
-- Untarring the new sourcecode archive ../texmacs_1.0.6.10.orig.tar.gz
Success! The diffs from version 1:1.0.6.9-4 worked fine.
Remember: Your current directory is the OLD sourcearchive!
Do a "cd ../texmacs-1.0.6.10" to see the new package
$cd ..
$rm -rf texmacs-1.0.6.9/

Update the changelog and do other necessary stuff

$cd texmacs-1.0.6.10/debian/
$dch
...
$cd ..
...

Build the package. The final packages will be in ~/pbuilder/result

$pdebuild-sid
$cd ~/pbuilder/result
$ls texmacs*1.0.6.10*
texmacs_1.0.6.10-1.diff.gz texmacs_1.0.6.10-1_i386.changes texmacs_1.0.6.10.orig.tar.gz
texmacs_1.0.6.10-1.dsc texmacs_1.0.6.10-1_i386.deb texmacs-common_1.0.6.10-1_all.deb
$linda texmacs_1.0.6.10-1.dsc
$lintian texmacs_1.0.6.10-1.dsc

Tuesday, April 24, 2007

gnuplot with GNU readline and history support

By default, the gnuplot packages in Debian are not built with libreadline (GNU readline). This is due to licensing issues (see /usr/share/doc/gnuplot/README.Debian for more info). Having the libreadline support is useful as it enables tab completion of file names inside gnuplot. Using GNU readline, one can also access the commands used in previous gnuplot sessions. The recipe for recompiling the gnuplot packages (in the Debian way) with support for GNU readline and history file is given below.


$cat ~/makefiles/gnuplot.install
#add the following or similar entry into the /etc/apt/sources.list
deb-src http://ftp.us.debian.org/debian/ etch main contrib non-free
# other possible entries look like
# deb-src http://ftp.us.debian.org/debian/ unstable main contrib non-free

# install packages necessary for building gnuplot
sudo apt-get install fakeroot
sudo apt-get build-dep gnuplot
# see the versions of gnuplot available
rmadison gnuplot
# I decided to use gnuplot 4.0.0-5

# go to the place where you normally compile packages
cd /home/software/compileHere/gnuplot

# (optional) move files from previous versions/compilations if they exist
# mv gnuplot-4.0.0/ /tmp
# (optional) move old binary deb files also if necessary
# mv gnuplot*deb /tmp

apt-get source gnuplot=4.0.0-5
dpkg-source -x gnuplot_4.0.0-5.dsc
cd gnuplot-4.0.0/debian/

# Edit the file named "rules" and change
--without-gnu-readline
TO
--with-readline=gnu

# Enable the history file by adding
--enable-history-file

cd ..
dpkg-buildpackage -us -uc -rfakeroot
cd ..

ls gnuplot*deb
gnuplot_4.0.0-5_all.deb gnuplot-nox_4.0.0-5_i386.deb
gnuplot-doc_4.0.0-5_all.deb gnuplot-x11_4.0.0-5_i386.deb

sudo dpkg -i gnuplot*deb

apt-cache showsrc gnuplot

Monday, March 05, 2007

various ways of reading man pages

There are many ways to read man pages in Debian.

  1. man pagename
  2. In konqueror, man:pagename
  3. In vim, :Man pagename
  4. use vman, wman as described in Using vim as a man page reader
  5. In emacs, M-x man
  6. Install man2html and then go to http://localhost/cgi-bin/man/man2html in any browser
  7. xman -notopbox -bothshown &

Friday, January 26, 2007

input telugu characters in firefox

Reading telugu characters in firefox is good, but if you can write in telugu it would be much more cool! This, for example, would come in handy when searching in google for documents containing certain telugu words, when writing telugu scraps in orkut etc.,


The following screenshot shows how to select "తెలుగు - RTS" and search for documents containing "తెలుగు" in them.



Tested on Debian Etch (testing), firefox 1.5.dfsg+1.5.0.7-2, Indic Input Extension 1.0

Saturday, December 23, 2006

Burning ISO files in Windows XP

Imagine you are on a machine running Windows XP. Now you want to install Debian on that and make it a dual boot so that you can use both Windows and Debian as and when the need arises. There are many ways to do this. Most people start by downloading the net install image from http://www.debian.org/devel/debian-installer/ . However Windows XP, AFAIK, does not come with an iso image burning software. In order to burn the .iso file on to a CD/DVD, you can use any one of

  1. DeepBurner Free
  2. CDBurnerXP Pro
softwares.

Both softwares are free (but not opensource). The only problem with "CDBurnerXP Pro" is that it does not work with files larger than 4.2 GB. So you cannot really burn a DVD images of say Etch distribution which are normally greater than 4.2 GB and less than 4.7 GB. However, "DeepBurner Free" has no such restriction.

According to http://www.cleansoftware.org/utility/#cddvd , "CDBurnerXP PRO" is also free from adware, spyware etc.,

PS: I was not able to find any free CD/DVD burning software for Windows XP, which has the facility to burn iso files and is released under GPL or is opensource. If you know of any, please let me know.

Wednesday, May 31, 2006

Getting a GUI

After installing Debian, often one is left with just a command line prompt waiting for the user to enter login and password. If you are coming from Microsoft Windows environment, this command line prompt looks similar to the DOS prompt. This article explains how to get a GUI environment after installing basic Debian.

Since I have experience only with KDE, I will try to focus just on installing KDE.

In order to get a working GUI as quickly as possible, run the following two commands as root.

apt-get update
apt-get install xorg kde kdm

This will fetch all the required packages necessary to run KDE.

During the installation of the packages, there will be some questions regarding configuring X environment etc., Once you finish answering all the questions, you will get a working KDE environment.

Last activity: Jan 24, 2007

Thursday, April 20, 2006

bug reports summary

The reports are organized in reverse chronological order so that the latest stay on the top.

Bugs reported and not yet fixed
Bugs reported and fixed (sorted in the order when they are fixed).
This post is last updated on Jan 18, 2007.

Followers