Monday, May 26, 2014

How to add CD/DVD entry into Debian Linux source.list file

In Debian based linux(deb package management system) Linux "/etc/apt/sources.list" is the file which tells your linux box where the repository.  Regardless of the new packages installation mode (whether via terminal with apt-get command or with synaptic package manager) this file is referenced to fetch the needed .deb files.  For this method you need to have a good internet connection.

If you have installation CD/DVD you can add this to the source.list file and use that as your repository(only to install the packages available in the CD/DVD).  how to do that?

[What apt tool actually needs is a catalog file to use (packages.gz) and the original .deb packages.  As the installation CD/DVD contains it we can use the same as like online repo.]

1. Insert your CD/DVD into the drive and ensure it is mounted properly

2. Go to terminal by
Applications -> Accessories -> Terminal (Steps for BOSS GNU/Linux)

3. Type the following command

$sudo apt-cdrom add

This command will add the cdrom entry into the /etc/apt/sources.list.

4. Now update your apt file with the following command

$sudo apt-get update

5. Install the packages you need by

$sudo apt-get install

Friday, May 23, 2014

How to build a debian package from source?

1. download the source from the repository

 $apt-get source    Ex. $apt-get source scimsource

 This command will fetch the source code of the package you specified in , which will contain .dsc, .orig.tar.gz, sometimes .diff.gz.

2. Apply changes/differences with the original source

[Assume that I downloaded the packages under ~/Download/scimsource.]

$cd ~/Download/scimsource

apply the diff (changes) to the orig source by

$dpkg-source -x .dsc

[For further details about unpacking debian source you can refer this crisp & simple howto.]

Now, the changes will be applied to the source. 

3. Build/Compile the source to build installable deb package.

   a)  If you want to add some changes in the source code or add some features to the existing source code proceed with the extracted source & then update the Changelog* file accordingly. 
  b) If your aim is just to build the deb package from the source you need not to touch the Changelog file.

For building the source to deb package you need to

  i). Build dependency

  $sudo apt-get build-dep

  This command will install the needed libraries, other packages that are
  essential for compiling/building the source into deb.

  ii). Build the source by,


  $sudo dpkg-buildpackage -rfakeroot -us -uc -sa

Note:  you must issue the above command provided that you are inside the package's source directory. (first do $cd ~/Download/scimsource/scim).



* -> changelog file will be available in the extracted source under "/debian/Changelog"



Wednesday, May 21, 2014

Gpick - A Color picker for debian based GNU/Linux .

Screenshot of gpicker 
   After a long time again tried to create web page with HTML5 & CSS3.  As the work progressed as usual endup with doubts/needs/queries.   This time it is about getting the hexadecimal code of a color for using in CSS.  Some of friends told that to know the color code, first take screenshot of a we page or the desktop application & open the same in gimp then using the color picker tool find the color code.  This is one kind of solution (like going around one's head to touch one's nose... :p).

I came across this awesome desktop applicaiton called "Gpick" home page of Gpick (Yes, for GNOME Desktop environment).   Its just cool, I need not even to explain how to use this application, it as simple.  Just install by

$sudo apt-get install gpick

and give a try.

Note: I am using BOSS GNU/Linux a indian version debian linux.