Debian is the biggest community run GNU/Linux distribution running since 1993. Some information can also be got at http://newbiedoc.berlios.de/wiki/Debian_newbie_help_documentation You are free to add to this help page.
Concept of Root in Linux
Root is the superuser or administrator of the system. He has the priviliges for doing all system administration tasks. Only he can access the system configuration files also. To become root in console type the command su. On pressing enter on being prompted enter the root password. then you will have root priviliges. to know which user you are 'whoami' command can be used. if it says root you have root writes else of the user specified. To directly become root in gui Konsole allows you to open root terminal. Direct links are also available for root terminals.
Concept of repositories/package system in Debian
1. Repositories are the source for packages(programs). These maybe on your dvd/cd or from a website.
2. To add web repositories you have to add them by editing the /etc/apt/sources.list file as ROOT
3. If you want packages from your CD/DVD put them in your drive and run the command 'apt-cdrom add'
4. Every time you edit the /etc/apt/sources.list file you must run 'apt-get update' run as ROOT to update the system
5. You can install a package by the command 'aptitude install -y <packagename>' run as ROOT.
6. You can remove a package by the command 'aptitude remove -y <packagename>' run as ROOT.
7. To search for a packagename run the command 'apt-cache search <keyword>'
8. To see details of a file run the command 'apt-cache show <packagename>'
9. If you have directly deb files to be installed run 'dpkg -i <packagename>' run as ROOT.
10. dpkg -L <package> to see what files are installed by that package.
11. To see list of packages in your repositories use the command: apt-cache dumpavail | grep "Package: "
12. To identify the package that produced the file named foo execute either:
- dpkg --search filename
This searches for filename in installed packages. (This is (currently) equivalent to searching all of the files having the file extension of .list in the directory /var/lib/dpkg/info/, and adjusting the output to print the names of all the packages containing it, and diversions.)
A faster alternative to this is the dlocate tool.
dlocate -S filename
- zgrep foo Contents-ARCH.gz
This searches for files which contain the substring foo in their full path names. The files Contents-ARCH.gz (where ARCH represents the wanted architecture) reside in the major package directories (main, non-free, contrib) at a Debian FTP site (i.e. under /debian/dists/lenny). A Contents file refers only to the packages in the subdirectory tree where it resides. Therefore, a user might have to search more than one Contents files to find the package containing the file foo.
This method has the advantage over dpkg --search in that it will find files in packages that are not currently installed on your system.
- apt-file search foo
If you install the apt-file, similar to the above, it searches files which contain the substring or regular expression foo in their full path names. The advantage over the sample above is that there is no need to retrieve the Contents-ARCH.gz files as it will do this automatically for all the sources defined in /etc/apt/sources.list when you run (as root) apt-file update.
More useful apt/dpkg commands can be seen in the quick reference here
Using apt-get over proxy
Put the line - export http_proxy="http://username:passw...@10.10.3.14:3128" - in the /root/.bashrc (~/.bashrc for normal user) file. Then you will be able to run all aptitude related commands through the proxy.
The same command - export http_proxy="http://username:email@example.com:3128" can be run in any terminal to give proxy access for that console only. Note that synaptic package manager allows you to set the proxy for the same. The setting can be reached through Settings->Network. Select Manual connection there, add 10.10.3.14 as http proxy and 3128 as port. Click on authentication to set the username and password. Click ok and it will take proxy from now on. (When you want to turn off proxy, choose direct connection to the internet at the same location).
Installing Debian Lenny
Refer to this link: http://www.howtoforge.com/the-perfect-desktop-debian-lenny
Note that the above is for a debian only system. Make appropriate / and swap drive during partitioning if wanting dual boot. The CD/DVD has installation manual which is useful to read.
Installing Opera on Debian lenny
Please note that its a non-free browser. Use other free browsers. This section added to benefit webmasters who want to check compatibility. Follow the procedure on the Debian wiki here: http://wiki.debian.org/Opera
Resetting forgotten root password
i type 'e' to edit the default kernel line then 'e' again on the line that starts with 'kernel' add 'init=/bin/bash' to the end of the 'kernel' line
type 'b' to boot it
once i am at a /bin/bash prompt...
remounting the filesystem read/write (will be ro when bin/bash'ing)
- mount -o remount,rw /
Then type the command /usr/sbin/passwd root
and change your password!
Configuring your /etc/fstab file for vfat and ntfs partitions
1. As root run a 'fdisk -l ' to recognise the partition numbers and types. Note these.
2. For all vfat partitions make a new entry in the /etc/fstab file as follows:-
/dev/sda3 /mnt/f vfat users,rw,auto,iocharset=utf8,umask=000 0 0
The above means that the partition /dev/sda3 should be mounted to /mnt/f. It shall be a utf8 charset and shall be accessible to all users. You must make the /mnt/f directory too after making the entry in the file.
3. For the ntfs partitions which you want read write the ntfs-3g driver package must be installed (instructions given below). Once that is done make an entry like this:-
/dev/sda2 /mnt/c ntfs-3g defaults 0 0
The above means that the ntfs partition /dev/sda2 shall be mounted to /mnt/c.
4. Repeat the same procedure for all the partitions that you have. Make sure that the mounting directories are created by you.
5. After next reboot all ntfs and vfat shall be mounted in r-w for all users! (Ignore the warning about utf8 you get in bootup for vfat. Thats the only charset that works). Enjoy
How to set up Partitions for Linux
You will get many options. Unless you are planning to have only Linux on the system DO NOT select the automatic options. Always do manual partitioning. You must make an ext3 root partition (atleast 5 GB in size, more the better, 10 GB is good). Also make a swap partition. (a thumb rule goes that size should be double the RAM size but in general more than 1-2 GB is not much).
Some people also like to make separate partitions for /home and /usr.
Adding Debian etch Repo of 10.10.4.1
- Edit your /etc/apt/sources.list file as root and add these lines
deb http://10.10.4.1/pub/Linux/Debian/release/current/i386/iso-dvd/repo1 etch main contrib deb http://10.10.4.1/pub/Linux/Debian/release/current/i386/iso-dvd/repo2 etch main deb http://10.10.4.1/pub/Linux/Debian/release/current/i386/iso-dvd/repo3 etch main
- Now run this command
as usual. This will make packages available for you.
Adding Ubuntu Hardy Heron 8.04 Repo from CSE
- sudo gedit /etc/apt/sources.list
- Add the following lines to it :-
deb http://poorvi.cse.iitd.ernet.in:80/ubuntu hardy main restricted universe multiverse deb-src http://poorvi.cse.iitd.ernet.in:80/ubuntu hardy main restricted universe multiverse deb http://poorvi.cse.iitd.ernet.in:80/ubuntu hardy-proposed main restricted universe multiverse deb-src http://poorvi.cse.iitd.ernet.in:80/ubuntu hardy-proposed main restricted universe multiverse deb http://poorvi.cse.iitd.ernet.in:80/ubuntu hardy-updates main restricted universe multiverse deb-src http://poorvi.cse.iitd.ernet.in:80/ubuntu hardy-updates main restricted universe multiverse deb http://poorvi.cse.iitd.ernet.in:80/ubuntu hardy-security main restricted universe multiverse deb-src http://poorvi.cse.iitd.ernet.in:80/ubuntu hardy-security main restricted universe multiverse deb http://poorvi.cse.iitd.ernet.in:80/ubuntu hardy-backports main restricted universe multiverse deb-src http://poorvi.cse.iitd.ernet.in:80/ubuntu hardy-backports main restricted universe multiverse
- sudo apt-get update
Adding Ubuntu Jaunty Jackalope 9.04 Repo from CSE
- sudo gedit /etc/apt/sources.list
- Add the following lines to it :-
deb http://poorvi.cse.iitd.ernet.in:80/ubuntu jaunty main restricted universe multiverse deb-src http://poorvi.cse.iitd.ernet.in:80/ubuntu jaunty main restricted universe multiverse deb http://poorvi.cse.iitd.ernet.in:80/ubuntu jaunty-proposed main restricted universe multiverse deb-src http://poorvi.cse.iitd.ernet.in:80/ubuntu jaunty-proposed main restricted universe multiverse deb http://poorvi.cse.iitd.ernet.in:80/ubuntu jaunty-updates main restricted universe multiverse deb-src http://poorvi.cse.iitd.ernet.in:80/ubuntu jaunty-updates main restricted universe multiverse deb http://poorvi.cse.iitd.ernet.in:80/ubuntu jaunty-security main restricted universe multiverse deb-src http://poorvi.cse.iitd.ernet.in:80/ubuntu jaunty-security main restricted universe multiverse deb http://poorvi.cse.iitd.ernet.in:80/ubuntu jaunty-backports main restricted universe multiverse deb-src http://poorvi.cse.iitd.ernet.in:80/ubuntu jaunty-backports main restricted universe multiverse
- sudo apt-get update
- Please note that CSE provides Ubuntu CDs at this location:-
- Also, the medibuntu repository is available at this location: http://poorvi.cse.iitd.ernet.in/ubuntu-mirror/packages.medibuntu.org/
Adding Ubuntu 9.10 Repo from CSE
- sudo gedit /etc/apt/sources.list
- Add the following lines to it :-
deb http://poorvi.cse.iitd.ernet.in:80/ubuntu karmic main restricted universe multiverse deb-src http://poorvi.cse.iitd.ernet.in:80/ubuntu karmic main restricted universe multiverse deb http://poorvi.cse.iitd.ernet.in:80/ubuntu karmic-proposed main restricted universe multiverse deb-src http://poorvi.cse.iitd.ernet.in:80/ubuntu karmic-proposed main restricted universe multiverse deb http://poorvi.cse.iitd.ernet.in:80/ubuntu karmic-updates main restricted universe multiverse deb-src http://poorvi.cse.iitd.ernet.in:80/ubuntu karmic-updates main restricted universe multiverse deb http://poorvi.cse.iitd.ernet.in:80/ubuntu karmic-security main restricted universe multiverse deb-src http://poorvi.cse.iitd.ernet.in:80/ubuntu karmic-security main restricted universe multiverse deb http://poorvi.cse.iitd.ernet.in:80/ubuntu karmic-backports main restricted universe multiverse deb-src http://poorvi.cse.iitd.ernet.in:80/ubuntu karmic-backports main restricted universe multiverse
- disable the proxy to use repository at poorvi, to disable the proxy in terminal give the command
- export http_proxy=""
- export ftp_proxy=""
- sudo apt-get update
How can I get the latest kernel
- One way is to get a vanilla kernel from kernel.org . Compile it yourself and install it. Its recommended to not bypass the package managing system and use the utilities in the kernel-package package.
- Get packages from the Debian Kernel team repository
- deb http://kernel-archive.buildserver.net/debian-kernel trunk main
- Get keyring with the command: wget -q -O - http://kernel-archive.buildserver.net/key | apt-key add -
- If you are using stable version, newer kernels should be available from the backports.org, testing or sid distribution. If using the last two don't
forget to remove them from sources after upgrade to avoid troubles!
- Kenshi Muto, a Japanese developer makes backported installation images available with newer kernels at this link which you can use:-
Configuring Boot Loader Grub
- All the configuration is available in the /etc/boot/grub/menu.lst file. The timeout value, default OS and other settings can be changed by simply editing this file. From next boot the settings are effective.
- GRUB 17 Error - Solving it
Basically you need to configure grub (also /etc/fstab for mounting purposes) with the updated partitioning numbers Refer to these links:-
ubuntuforums.org/showthread.php?t=442945 has some nice discussions on the topic. www.youtube.com/watch?v=GjzFU6rXwLo
Using iso images as a repository source in Debian Etch
Not recommended , as you have already added the 10.10.4.1 repo, so this is not needed if you are inside IITD
If you've iso images of Debian Etch and want to use them as a repository source then following are the steps to follow:
- Create a directory named say /media/isoimages1. All the iso images will be mounted to this directory.
mkdir /media/isoimages1 -p
- Mount it (method one)
mount <path to iso image> /media/isoimages1 -o loop
- / */ */ */*/
For e.g. in my case the iso image of 1st DVD is located in /data/DebEtchDVD1.iso so I'll issue
mount /data/DebEtchDVD1.iso /media/isoimages1 -o loop
- Repeat the same procedure to mount DVD2 and DVD3.
- Mount it (method two)
Please edit the /etc/fstab file to add a permanent entry so that you need to mount these files again n again.
/home/deepak/linux/debian-40r2-i386-DVD-2.iso /media/isoimages1 iso9660 loop 0 2 /home/deepak/linux/debian-40r2-i386-DVD-1.iso /media/isoimages2 iso9660 loop 0 2 /home/deepak/linux/debian-40r2-i386-DVD-3.iso /media/isoimages3 iso9660 loop 0 2
- Edit /etc/apt/sources.list file and add
deb file:/media/isoimages1 etch main contrib deb file:/media/isoimages2 etch main deb file:/media/isoimages3 etch main
to end of the file.
The system is now ready to use the iso image mounted on /media/isoimages as a repository, so use apt or Synaptics Package Manager to install the softwares.
backports.org is a good site for getting some newer packages to work with stable libraries for Debian Users. Do the following as root.
(For example ntfs-3g to get ntfs partitions in r/w mode and java 1.6 packages)(already available for lenny users)
- Add the following line to your /etc/apt/sources.list file.
deb http://www.backports.org/debian etch-backports main contrib non-free
If you are running Debian Lenny you need the following line:-
deb http://www.backports.org/debian lenny-backports main contrib non-free
- For adding the keyring run
apt-get install debian-backports-keyring
- All backports are deactivated by default. If you want to install something from backports run:
apt-get -t etch-backports install "package" Of course, you can use aptitude as well: aptitude -t etch-backports install "package"
Lenny backports users should run the following instead:-
apt-get -t lenny-backports install “package” Of course, you can use aptitude as well: aptitude -t lenny-backports install “package”
aptitude -t etch-backports install ntfs-3g.
This package is needed to have read write support for users on ntfs partitions.
Java1.6 and OpenJDK
aptitude install -y eclipse aptitude -t etch-backports install sun-java6-bin sun-java6-jdk sun-java6-jre sun-java6-plugin update-java-alternatives -s java-6-sun
Note that in ubuntu you do not need the backports repository. These packages are available in universe same commands as above work except that in the second one -t etch-backports is no longer needed.
These packages are non-free versions of Java. For Debian Lenny and Ubuntu Intrepid Ibex (8.10) the free openjdk available. These are the instructions for installing it
aptitude install -y eclipse aptitude install openjdk-6-jre openjdk-6-jdk update-java-alternatives -s java-6-openjdk
- Next, edit the JVM configuration (as )
If this file is not available create it.
and add the following to the top of the file
For open jdk the line to be added is
to the top of the file
For open jdk the line to be added is
With this you will be able to use eclipse with java 1.6. Also with the plugin (in package sun-java6-plugin for older versions and icedtea-gcjwebplugin for Debian Lenny / Ubuntu Intrepid Ibex) installed applets will work with iceweasel. If you want the sun-java6-doc package also. it will give error on installation. you need to get the doc file from java site which it mentions in the error. (You can also download it from http://10.10.4.1/pub/Linux/Debian/misc/jdk-6-doc.zip within IIT Campus).
Copy it to /tmp and make its group + user as root. do in gui or simply do
chown root:root /tmp/filename
then run installation it will do it properly.
Note that this exercise is only for sun's java. For openjdk only the openjdk-6-doc package needs to be installed.
Getting openoffice.org 3 for Debian Lenny from Backports
he backports.org now has openoffice.org for lenny-backports, so it's real easy to install. Better too, since Debian versions are based upon go-oo.org with its extra features.
Follow the instructions above to add backports.org repository and install away:
aptitude install -t lenny-backports openoffice.org aptitude install -t lenny-backports openoffice.org-emailmerge openoffice.org-filter-mobiledev openoffice.org-help-en-us openoffice.org-report-builder-bin rsyslog ttf-opensymbol aptitude install openclipart
Getting KDE 4 for Debian Lenny
Follow the instructions here: http://kde4.debian.net/
To get multimedia codecs for playing certain realmedia, quicktime and divx files
do the following as root:-
1. Add the following to your /etc/apt/sources.list file:- deb http://www.debian-multimedia.org etch main 2. run apt-get update 3. install codecs using aptitude install -y w32codecs libdvdcss2
you can take other packages also from these repositories as per need.
These will work with mplayer, totemplayer, xfmedia and kaffeine.
Note that mplayer menu has a bug which prevents videos to be opened from it
inorder to do that edit the menu to read 'gmplayer -vo xv' and it will work for
you for videos also.
w32 codecs support the following formats:- ATI VCR-2 video codec. Cinepak video codec DivX ;-) video codec, ver. 3.11 DivX ;-) video codec, ver. 4.x Indeo Video 3.2/4.1/5.0/4.1 quick/5.0 quick codecs. Intel 263 video codec. Microsoft MPEG-4 video codec, beta version 188.8.131.5200 Morgan Multimedia Motion JPEG video codec. QuickTime RealAudio RealVideo 8 RealVideo 9 Windows Media Video 9
You can also install these files from the deb packages available in debian/misc folder on 10.10.4.1 (works for ubuntu also)
If you want to use repository for getting packages in ubuntu use the medibuntu repository whose details are available here https://help.ubuntu.com/community/Medibuntu
An example /etc/apt/sources.list file
You can have these entries in your file:-
deb http://security.debian.org/ etch/updates main contrib
deb-src http://security.debian.org/ etch/updates main contrib
deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
deb http://www.backports.org/debian etch-backports main contrib non-free
deb http://www.debian-multimedia.org etch main
deb http://ftp.debian.org/debian/ etch main contrib non-free
deb-src http://ftp.debian.org/debian/ etch main contrib non-free
If you are planning to use lug repos also replace last two lines with
deb http://ftp.debian.org/debian/ etch non-free
deb-src http://ftp.debian.org/debian/ etch non-free
By doing this packages will be taken from faster lug repo for main, contrib and only non-free packages will come from debian site.
Installing LAMP and Wikimedia on Debian GNU/Linux
This is to help people set up LAMP on their desktops. Ubuntu server edition comes with LAMP but desktop users must download all the necessary files. This tutorial owes its credits to Ubuntu Community Docs and lots of people around the world who enlightened me about LAMP and Ubuntu. Let’s start.We first need some important packages. These are:
apache2 php5-mysql libapache2-mod-php5 mysql-server
You can get these via apt-get or from your Synaptics Package Manager. For getting via apt-get you must have an active internet connection. Type this command in the terminal:
sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server
If you are in the Packages Manager, just search the packages and select them. This is the easiest method.
You may want to configure your LAMP, but before starting it is advisable to change the installation defaults. The default root user of MySQL has no password or a blank string as password. This should be changed. It is always advisable to create another user with full privileges as that as root. Use this alternate user instead as root. Root is the superuser.
Go to terminal: Type
mysql -u root
At MySQL console type
SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(’yourpassword’);
Just put your password instead of yourpassword within single quotes as shown above.
After setting the password if you want to login as root,just enter this at the terminal:
mysql -u root -p
Create a new user and give all the privliges to it as explained above:
grant all privileges on *.* to ‘yourusername’@'localhost’
identified by ‘yourpassword’ with grant option;
Replace yourusername with the username you want and yourpassword with a proper password. If you want this user to deny Grant Option just remove WITH GRANT OPTION from the above statement.
Run, Stop, Test, And Restart Apache:
Start: sudo /usr/sbin/apache2ctl start
Stop: sudo /usr/sbin/apache2ctl stop
Test: sudo /usr/sbin/apache2ctl test
Retart: sudo /usr/sbin/apache2ctl restart
There is an excellent tutorial for installing LAMP and Mediawiki here: http://www.mediawiki.org/wiki/Manual:Running_MediaWiki_on_Debian_GNU/Linux
You may find this link useful: http://www.howtoforge.com/ubuntu_debian_lamp_server
Which is the fastest repository for me?
which repository should one put in debian/ubuntu repo sources file? This is a common question I have heard. There are many mirrors which are available and you can use any one theoretically. But you would definitely want a fast one. There is an interesting package netselect which tells the best server (by measuring ping times). Put any mirror as source.
Install the netselect package (aptitude install -y netselect) Then command as netselect <list of mirrors separated by name> It will show the best one. (if all are equal no result).
netselect -vv ftp.debian.org http.us.debian.org ftp.at.debian.org download.unesp.br ftp.debian.org.br 10.10.4.1 0 10.10.4.1 by doing netselect -vv <list of mirrors separated by name> you will get times for individual servers also.
netselect -vv ftp.debian.org http.us.debian.org ftp.at.debian.org download.unesp.br ftp.debian.org.br Running netselect to choose 1 out of 8 addresses. ftp.debian.org 9999 ms 30 hops 0% ok 184.108.40.206 9999 ms 30 hops 0% ok 220.127.116.11 9999 ms 30 hops 0% ok 18.104.22.168 9999 ms 30 hops 0% ok 22.214.171.124 9999 ms 30 hops 0% ok ftp.at.debian.org 9999 ms 30 hops 0% ok download.unesp.br 8999 ms 30 hops 0% ok ftp.debian.org.br 9999 ms 30 hops 0% ok
So you can select the fastest one you have.
Some important packages
- flashplugin-nonfree (to install flash player to make youtube work in iceweasel). The free plugin for Debian Lenny/ Ubuntu Intrepid Ibex is in the package mozilla-plugin-gnash
- xchm to view windows help file in chm format.
- djview to see djview files.
- unrar to be able to extract rar archives. (non-free)(You may also find p7zip-full package useful which works with many rar files and also 7z files).
- libcv-dev to install opencv.
- manpages-posix, manpages-posix-dev , gcc-doc , manpages-dev , manpages and
- glibc-doc are some packages you should install to get documentation. (GFDL is considered non-free as per current debian guidelines so it is not installed by default and must be put from non-free repository).
- For using wireless 3945abg cards you should install these packages firmware-ipw3945,
- ipw3945d and ipw3945-modules-2.6.18-4-686.
- linuxdcpp0.691 and valknut are packages you can use for ODC.
- sun-java6-plugin needs to be installed for java to work in firefox/iceweasel. Debian etch has sun-java5-plugin while the other one
is available from backports. The free icedtea-gcjwebplugin is available for Debian Lenny and Ubuntu Intrepid Ibex 8.10
All these packages can be installed in the usual way i.e. aptitude install -y <packagename> The packages must be in the repo list. some of these are from the non-free category available from debian repo. So make sure these are part of your /etc/apt/sources.list and run apt-get update before trying to install these.
DHCP does not get configured by server correctly if you want to use that type
following commands everytime u boot as root or edit your config files of them to do
it for you:-
route add -net 10.64.0.0/16 eth1
route add default gw 10.64.1.1 eth1
(Change your device no if it is different). This has to be done for dhcp in campus
for both wireless and wired connections when you use dhcp.
This link may also be useful for hardcoding these values http://siddhesh.in/foreign-gateway.php
If you have got newer system you should use the newer kernel which is available
in etch custom cd got from kenshi muto's site.
To use it write the cd. Add the cd to your repo as apt-cdrom (as root).
Then install the newer image by typing aptitude install -y linux-image-2.6.23-1-686
(for headers put the package linux-headers-2.6.23-1-686)
For cameras you will need to install the linux-uvc-source. It will install to
your /usr/src directory as a tar file. extract it . goes to modules. go to its folder
run make followed by make install. From next boot camera will be available.
ffmpeg program can be installed to grab video. For photos use luvcview which has to be
got from http://www.google.com/support/talk/bin/answer.py?hl=en&answer=57557 mxhaard.free.fr/download.html. There is a program with ubuntu called cheese which does both jobs
but due to use of newer libraries its not available for us yet.
http://www.debianhelp.org/node/10252 has more details.
For always running a script at startup
Follow these steps
1. put your script file in /etc/init.d say FOO
2. update-rc.d FOO defaults
There is a nice tutorial on youtube on this. See it here http://www.youtube.com/watch?v=d39izaupvEg
For installing skype on Debian
Since kopete doesn't yet support voice chat you can use skype for voice chats with your friends
The procedure for installation is to do the following as ROOT:-
1. run: aptitude install -y libqt4-gui libqt4-core (These are its dependencies which you may need to install if not done already libasound2 (>> 1.0.12), libc6 (>= 2.3.6-6), libgcc1 (>= 1:4.1.1-12), libqt4-core (>= 4.2.1), libqt4-gui (>= 4.2.1), libsigc++-2.0-0c2a (>= 2.0.2), libstdc++6 (>= 4.1.1-12), libx11-6 )
2. wget http://10.10.4.1/pub/Linux/Debian/misc/skype-debian_126.96.36.199-1_i386.deb or download the debian etch version from skype.com
3. dpkg -i skype-debian_188.8.131.52-1_i386.deb
Messengers In Debian
Kopete and gaim are available as messengers. For configuring kopete refer http://www.google.com/support/talk/bin/answer.py?hl=en&answer=57557 Only set port no as 443 instead of 5223 for it to work in hostel. (the latter works in academic area). gaim procedure is also available on google site but i don't know if it works.
- If you are getting an error like: X11 error: BadAlloc (insufficient resources for operation), you'll need to edit the device section of your /etc/X11/xorg.conf and add three lines
Option "Accelmethod" "exa" Option "MigrationHeuristic" "greedy" Option "ExaNoComposite" "false"
- Also follow the workarounds for mplayer, totem, etc mentioned for blackwindows problem in next window if necessary.
- You are facing blackwindows and other problems
- Refer to this wiki: http://ubuntuguide.org/wiki/Ubuntu:Feisty
- Sometimes the best way to sort out xorg configuration problems is to replace your /etc/X11/xorg.conf with that made by the nearest Knoppix to your version of distro. It has one of the best autodetection capabilities around. Don't forget to take backup of your old file just in case though.
Restoring Grub with Debian CD/DVD
1) Press ALT+F2 (or ALT+CTRL+F2) to get shell prompt
2) Then get the partition tables for the devices using fdisk command:
- fdisk -l
3)When you type fdisk -l, you should see your partition name: /dev/scsi/host0/bus0/target0/lun0/part1 (for IDE disk it display same device file in IDE directory)
4)Once you identified your device file, mount disk using mount command:
- mkdir /mydisk
- mount /dev/scsi/host0/bus0/target0/lun0/part1 /mydisk
5) Next use chroot command to start interactive shell with special root directory i.e. /mydisk will act as root directory.
- chroot /mydisk
6)Use grub-install command to reinstall grub (SCSI disk):
- grub-install /dev/sda
If you have IDE device following command :
- grub-install /dev/hda
Again replace /dev/hda and /dev/sda with your actual device names.
7)Type exit and reboot the system. You should see your GRUB and Linux again.
Debian Lenny has a special rescue mode for doing this job. Run the rescue or rescuegui command at bootup and follow the simple instructions! all you need to do is remember the root partition number.
Restoring Grub with Knoppix Live CD/DVD
1. Set your system to boot from CD as first option. Put in knoppix CD/DVD in drive.
2. A prompt for knoppix affects. Just press enter. (see F2/F3 here for any cheatcodes you need).
3. System will boot inside giving a nice gui. All your partitions shall be shown on desktop as unmounted.
4. Right click(without mounting/left click) on the drive with /boot directory and uncheck read-only in third tab. Note its no e.g. sda9
5. Click on the icon to mount it. (Gets mounted to /media/sda9 in read-write mode).
6. Open root terminal. (Available from Second icon on toolbar.)
7. Give the command: grub-install --root-directory=/media/sda9 /dev/sda (Note that in later portion 9 is not to
be mentioned since grub is given for full disk(.
Now the grub install is done. (Yes, its that simple.) Reboot (without knoppix CD) and your grub should be back.
Installing Webilder (webshots like software for linux)
1. Download the tar file from webilder.org or 10.10.4.1 and extract it.
(tar -xvzf Webilder-0.6.2.tar.gz or use gui)
2. You need to install some extra packages for the installation on gnome
apt-get install python python-gtk2-dev python-gnome2 python-gnome2-dev \ libglib2.0-dev python-gnome2-extras python-gnome2-extras-dev python-imaging
3. If you want kde also:
apt-get install python-kde3
4. To install for gui go to extracted folder and run the command: python setup.py install
5. To install gui for kde go to the folder and run the command: python setup.py install --with-kde
6. Installation completed successfully.
GNOME Users: Right-click on the GNOME panel, choose "Add to panel", and select "Webilder Webshots Applet". If it is not in the list - log off and log in again.
KDE Users: From the graphics menu, start KWebilder.
If you prefer the command line, you can run webilder_desktop to configure Webilder and manage your photos. It is also possible to start photo downloading from the command line by starting webilder_downloader.
7. The files which you want to be circulated as wallpaper should be in ~/.webilder/Collection. You can always select that folder for screensaver settings of Slide Show screensaver.
8. There is separate setting for it to rotate wallpapers for kde and gnome. Ensure that the correct one is selected. This software can take pictures out of webshots archives also. It is also capable of downloading wallpapers from webshots and flickr.
Alternative Option for Debian/Ubuntu:
1. Add the appropriate source line to /etc/apt/sources.list:
* For Debian sid (i386, amd64, powerpc or sparc):
deb http://debian.websterwood.com/ sid main deb-src http://debian.websterwood.com/ sid main
* For Debian etch (i386, amd64, powerpc or sparc):
deb http://debian.websterwood.com/ etch main deb-src http://debian.websterwood.com/ etch main
* For Ubuntu Hardy (i386, amd64, powerpc of sparc):
deb http://debian.websterwood.com/ hardy main deb-src http://debian.websterwood.com/ hardy main
* For Ubuntu Feisty (i386, amd64, powerpc of sparc):
deb http://debian.websterwood.com/ feisty main deb-src http://debian.websterwood.com/ feisty main
2.Then do the following:
# apt-get update # apt-get install webilder webilder-gnome webilder-kde
Point You should remember: 1.Install all the dependencies according to your distribution.Otherwise it may create hurdle to run it properly. 2.Always check the directory where you have to download the photos.It should be in line with ./webilder/(directory where you want to download your photos.)
Installing Debian on a USB Drive
It is possible to install on a USB drive. Follow normal installation procedure. Do the necessary partitions on the usb drive during installation. Carry on normally till you reach the stage for installing grub. Go to advanced option and ensure that it is installed on /dev/sdb (not on a partition number for the pen drives). On reboot it may give error 16. To resolve it ensure booting entry is hd(0,partition no) and not hd(1,partitionno).
Running Virtualbox on Debian
First ensure that you are updated with the debian lenny repository.
1. apt-get install virtualbox-ose virtualbox-ose-source virtualbox-ose-modules-2.6-486 module-assistant
This will install the necessary software including the 486 image. Install appropriate module as per your need and ensure you are in that kernel after reboot.
2. module-assistant prepare
This prepares your module setup ensuring that your headers package is alright because this is the one against whom all the modules are compiled.
3. module-assistant auto-install virtualbox-ose
This installs the necessary modules.
4. modprobe vboxdrv
This loads the module.
5. Open the virtualbox software and follow the gui for making machines. Put type as XP. Ensure you have allowed CDs mounting. You can add XP installation CD and install it.
The new version allows shared folders also. In virtualbox you can decide the shared folders. These can be accessed by settings in My Network places.
1. go to 'My Computer' in WinXP and click on 'My Network Places'
2. select 'Choose another network location' and click 'Next' in service providers.
3. Browse to 'My Network Places' >> 'Entire Network' >> 'VirtualBox Shared Folders'. Here you will find the folder that you shared earlier using 'Devices' menu in VirtualBox VM as '\\VBOXSVR\...' Choose that folder and then click 'OK' to exit. And 'Next' to continue
4, Give a name to it and you are in business!
Note that the shared folders are writable both in host and virtual machine.
In order to share pen drives /media should be shared. Removing to be done in host
you may also need to install the guest extensions for that machine.
Virtualbox-ose is also available for etch from backports.org where in the first step you have to get the
packages virtualbox-ose and virtualbox-ose-source in addition to module-assistant.
The instructions are got from the following pages and some of my experience with it.
The instructions for having host networking is given at the following links:-
- Setting up host only networking
- Setting up faster access to shared folders on virtualbox
- The above two links have been summarised at this blog as well:-
Debian Lenny Samba Standalone Server Configuration
Audio/Video Manipulation/Conversion using ffmpeg
- http://lj4newbies.blogspot.com/2007/06/converting-dat-to-mpeg-file-to-burn-vcd.html (without ffmpeg)
Configuring sound for Certain Laptops
Sound doesn't work out of the box for some laptops (with 82801H ICH8 HD Audio Controller. You can see chipset by typing 'lspci|grep -i audio' in console). To sort out the problem
add the following lines in your /etc/modprobe.conf file :-
alias snd-card-0 snd-hda-intel options snd-card-0 index=0 options snd-hda-intel index=0 model=fujitsu
Then from next boot it will work. On some laptops just putting
options snd-hda-intel model=fujitsu
shall also do.
Configuring your network settings manually in command line
- If your I.P. is a.b.c.d, your subnet mask is e.f.g.h and your gateway is i.j.k.l enter the following commands as root
- ifconfig eth0 inet a.b.c.d
- ifconfig eth0 netmask e.f.g.h
- route add default gw i.j.k.l
- Ubuntu users must use sudo before above commands. If your ethernet interface is other than eth0 use appropriate interface name.
- Don't forget modifying the /etc/resolv.conf with the DNS info as given in next section.
- Commands for wireless (to be run as root in debian or with sudo in ubuntu)
- Tutorial on wireless commands: http://wirelessdefence.org/Contents/LinuxWirelessCommands.htm
- For using IITDWimax in academic area the following two commands in succession are enough
iwconfig wlan0 essid "IITD_WiMAX" dhclient wlan0
- To turn off your wireless/wired link command is: ifconfig <wlan0 or other id name of wireless> down
- To turn on your wireless/wired link command is: ifconfig <wlan0 or other id name of wireless> up
- Note that the dhclient command can be used to get dhcp configuration for any interface if you have a dhcp server in your network.
- You can see the networks available to you with the command: iwlist <wlan0 or your interface> scanning
Editing Network settings Manually
- The network settings (ip, gateway etc) are to be done in the /etc/network/interfaces file.
iface eth0 inet static address <your ip address> netmask <your mask> gateway <your gateway> auto eth0
If your ethernet port is other than eth0 make changes accordingly.
- Enter DNS information in /etc/resolv.conf (format is nameserver <ipaddress> for each name server).
domain dhcpnew.iitd.ac.in nameserver 10.10.1.2 nameserver 10.10.2.2
- To scan for networks for your wireless card on eth1 in commandline as ROOT
iwlist eth1 scanning
- To select a particular network which has a password to go with it as ROOT
iwconfig eth1 essid <network-name> key s:<password>
- To select a particular network without a password
- More detailed configuration can be read here: http://www.debian.org/doc/manuals/reference/ch05.en.html
Using VNCViewer to remotely manage your machine
Please refer to this wonderful article: http://www.debianadmin.com/remotely-manage-machines-using-vnc.html
Eclipse + Qt + OpenCV
- http://www.qtsoftware.com/developer/eclipse-integration has the download (ubuntu has package for this.
The required download is available on 10.10.4.1 = http://10.10.4.1/pub/Linux/software/qt-eclipse-integration-linux.x86-1.4.1.tar.gz)
- Installation instructions available at: http://www.qtsoftware.com/developer/eclipse-integration/installation-instructions-for-linux-systems
Getting the perfect server with Debian Lenny
Solving the error rc-default main process (4885) terminated with status 127 on Ubuntu
Changing your keyboard layout using command line
- Command is: setxkbmap -layout us (no root permission needed)
- You may use these codes, among others
- us - US keyboard
- es - Spain
- la - Latin America
- fr - French keyboard layout
- dvorak - dvorak keyboard layout
Installing aMSN Messenger
Opening multiple gmail accounts in Iceweasel/Firefox
Getting wireless to work on Debian lenny with wireless card from Broadcom BCM 4312
Keyboard Switching in KDE and GNOME
This helps getting different languages (including major indian languages) typing:-