Wednesday, July 4, 2012

create debian package out of installed packages

dpkg-repack:-

dpkg-repack creates Debian package file out of a package that has already been installed. If any changes have been made to the package while it was unpacked (e.g., files in /etc were modified), the new package will inherit the changes.

This utility can make it easy to copy packages from one computer to another, or to recreate packages which are installed on your system but no longer available elsewhere, or to save the current state of a package before you upgrade it. 


Example situation:-

-> install great game non free from game writer company
-> game writer company goes bankrupt & your CD-ROM is lost.
-> Buy a new computer , want to play great game non free




use dpkg-repack to create a new package to install on new computer


install dpkg-repack:-  apt-get install dpkg-repack

 dpkg-repack coreutils


 mine:~# dpkg --contents coreutils_5.97-5.3_amd64.deb 
drwxr-xr-x root/root         0 2007-02-17 01:44 ./
drwxr-xr-x root/root         0 2007-02-17 01:44 ./bin/
-rwxr-xr-x root/root     69104 2007-01-30 20:38 ./bin/mv
-rwxr-xr-x root/root     15560 2007-01-30 20:38 ./bin/false
-rwxr-xr-x root/root     40128 2007-01-30 20:38 ./bin/touch
-rwxr-xr-x root/root     36072 2007-01-30 20:38 ./bin/chmod
-rwxr-xr-x root/root     21448 2007-01-30 20:38 ./bin/cat


If you don't wish to run the rebuild as root, and you have the fakeroot package installed you can do so as follows:

skx@mine:~$ fakeroot -u dpkg-repack bash
dpkg-deb: building package `bash' in `./bash_3.1dfsg-8_amd64.deb'.


for more options see man dpkg-repack

dpkg-repack [--root=dir] [--arch=architecture] [--generate] packagename [packagename ...]



Examples:-

sudo dpkg-repack --arch=amd64
dpkg-repack --help


HOWTO: Backup all installed programs/packages

soln: fakeroot -u dpkg-repack `dpkg --get-selections | grep install | cut -f1`

Saturday, June 9, 2012

how to install microsoft fonts in ubuntu




  method 1 :-

              sudo apt-get install ubuntu-restricted-extras


  method 2:-  

 If you have Windows, you may copy your ttf fonts in
  C:\Windows\Fonts to /usr/share/fonts/truetype/ folder.

    Then run the command sudo fc-cache -f -v

How to find which package is taking a lot of space in ubuntu ?

rscgl@debian:~$ dpkg-query --show --showformat='${Package; -50}\t${Installed-Size}\n' | sort -k 2 -n | grep -v deinstall | awk '{ printf "%.3f MB \t %s \n", $2/(1024),$1}'| tail -n 10

IRC How to ?


How to insert Rupee symbol


 Press CTRL + SHIFT + U

type  20b9 then press space


checked in ubuntu 12.04, for lucid (10.04) update ubuntu font family and try

How to use graphicsmagick package to convert jpg to pdf ?

1) graphicsmagick package gm convert name.jpg output.pdf


 2) gm convert *.jpeg 1400 x 1600 filename.pdf


3) gm convert *.jpg -adjoin sample.pdf gm convert [0-9][0-9][0-9].jpg -adjoin hhh.pdf


gm convert 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg 6.jpg 7.jpg 8.jpg 9.jpg 10.jpg -adjoin hhh.pdf

 gm convert 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg 6.jpg -adjoin hhh.pdf



gm convert 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg 6.jpg 7.jpg 8.jpg 9.jpg 10.jpg 11.jpg 12.jpg 13.jpg 14.jpg 15.jpg 16.jpg 17.jpg 18.jpg 19.jpg 20.jpg 21.jpg 22.jpg 23.jpg 24.jpg 25.jpg -adjoin hhh.pdf


 gm convert 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg 6.jpg 7.jpg 8.jpg 9.jpg 10.jpg 11.jpg 12.jpg 13.jpg 14.jpg 15.jpg 16.jpg 17.jpg 18.jpg 19.jpg 20.jpg 21.jpg 22.jpg 23.jpg 24.jpg 25.jpg 26.jpg 27.jpg 28.jpg 29.jpg 30.jpg 31.jpg 32.jpg 33.jpg 34.jpg 35.jpg 36.jpg 37.jpg 38.jpg 39.jpg 40.jpg 41.jpg 42.jpg 43.jpg 44.jpg 45.jpg 46.jpg 47.jpg 48.jpg -adjoin hhh.pdf

How to enable compiz effects

compiz :- step 1:- install the following packages:- compiz, compiz-plugins, compiz-extra, compiz-fusion-plugins-main,compiz-fusion-plugins-extra, compiz-core,compiz-gnome,fusion-icon, compizconfig-settings-manager  


step 2:- ALT-F2 run compiz --replace (replacing metacity and run compiz as window manager)  


step 3:- Set up compiz effects:- System -> preferences -> "Compiz Config Settings Manager"

i) Search for "animations" -> "enable Regex matching" -> also check animations add on click animations icon -> Open Animation -> Open effect "zoom" Duration "585" "close Animation" - zoom close Effect -> Burn , Duration - 619 Minimize animation -> minimize effect -> "explode" Duration 654

 ii) Filter for cube:- Desktop cube , Rotate cube (tick) General options -> desktop size 4 Rotate cube (CTRL -ALT + LEFT/RIGHT ARROW)

 iii) Filter for "move" , tick "move window" iv) Filter for "decorate" , tick "window decoration" (title bar , xbutton)  

v) Desktop effects (a) "Enhanced zoom desktop" turn it on (Super key + mouse wheel) (b)  

vi) Effects section:- (a) 3D windows (CTRL + ALT + MOUSE) (b) Wobbly -> "wobbly window"



NB:- Tested in Debian Squeeze Make sure that you have graphics card installed in your machine