Tuesday, November 17, 2009

Set up a PDF Printer in your Linux box

Do you wish to take a pdf copy of the pages or convert a document into a .pdf file? or you do not have a printer and wish to print a web-page?

You can install a PDf printer in your linux machine, so that all you need (to convert a document into a pdf file) is to print the document and choose your PDF printer instead of your usual printer.

By default, CUPS-PDF is not installed, so grab it by using
$ sudo apt-get install cups-pdf
You should then be able to add a fake printer that will convert print jobs to PDF files.

Go to System -> Administration -> Printing to bring up the Printer configuration dialog. Select New Printer from the toolbar, and walk through the New Printer Wizard. You can give the printer pretty much any name you want. PDF seems like a logical choice. The Description and Location fields are optional.

On the next screen, when asked to select a connection, choose Virtual Printer, and leave the device URI as it is: cups-pdf:/. Next, on the screen where you can select a Printer from the database, choose Generic. On the next screen, choose PostScript as the Model and as the driver for the printer. Then you'll see a screen that says "Going to create a new printer PDF at cups-pdf:/." Click Apply and you should have a virtual PDF printer.

Now you should be able to create PDF files from most Linux apps by sending your print jobs to the PDF printer. When you send jobs to the printer, they'll be saved to a directory under your home directory that's named after the virtual printer -- so if you choose PDF as the name of your virtual printer, then the jobs will be sent to /home/yourusername/PDF.

Happy printing :)

Thursday, November 12, 2009

Install Google Chrome browser in Ubuntu Linux

Here is a way to run your favourite Google Chrome browser in your Ubuntu Linux desktop.

(Note: Athough there are other ways of installing Chrome on Wine, I have found that is not very efficient.)

So here is a quick and dirty way :)

Open apt sources file
$ sudo nano /etc/apt/sources.list
Add these lines at the end

deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main

Save (Ctrl+O) and Exit (Ctrl+X) nano.

Update apt
$ sudo apt-get update
Then install Chrome browser with the following command
$ sudo apt-get install chromium-browser
Enjoy ! ;)

___________________________________

Incase you get the following error (while running apt-get update):
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5A9BF3BB4E5E17B5

(It means you need to import the key for "Launchpad PPA for chromium-daily")

Resolution: Run the following command
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5A9BF3BB4E5E17B5

---------------------------------------

Installing Java in Ubuntu Linux

One of the reasons I love Ubuntu (Linux) is because it comes with a great number of packages.

Ubuntu has the following Java packages

sun-java6-bin – Contains the binaries
sun-java6-demo – Contains demos and examples
sun-java6-doc – Contains the documentation
sun-java6-fonts – Contains the Lucida TrueType fonts from the JRE
sun-java6-jdk – Contains the metapackage for the JDK
sun-java6-jre – Contains the metapackage for the JRE
sun-java6-plugin – Contains the plug-in for Mozilla-based browsers
sun-java6-source – Contains source files for the JDK

Here is a quick and dirty way to install Java in your Ubuntu desktop / server

Edit the sources list
$ sudo nano /etc/apt/sources.list
Insert the following lines at the end of the file

deb http://us.archive.ubuntu.com/ubuntu dapper main restricted
deb http://us.archive.ubuntu.com/ubuntu dapper universe multiverse

Save (Ctrl+O ) and Exit (Ctrl+X) the file.

Update apt
$ sudo apt-get update
Now in terminal run the command line
$ sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
Agree to the terms and java will install automatically.


Test that Java install is successful
Run command
$ java -version
You will get something like
java version “1.6.0″
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
________________________________________________________

For manually installing java, you may follow the instructions here
http://sites.google.com/site/easylinuxtipsproject/java#TOC-HOW-TO-FOR-32-BIT-UBUNTU
________________________________________________________

Monday, November 2, 2009

Hamachi gets killed in Ubuntu 9.10

Problem: Hamachi gets Killed after upgrading to Ubuntu 9.10

Cause: Hamachi's binary is compressed with upx. You just need to uncompress it.

Resolution:
Assuming /usr/bin is were hamachi's binary is in the computer, run the following commands

# sudo apt-get install upx-ucl
# cd /usr/bin    [Assuming /usr/bin is were hamachi's binary is]
# sudo upx -d hamachi
Ultimate Packer for eXecutables
Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007
UPX 3.01        Markus Oberhumer, Laszlo Molnar & John Reiser   Jul 31st 2007
File size         Ratio      Format      Name
--------------------   ------   -----------   -----------
830676 <-    331144   39.86%    linux/386    hamachi
Unpacked 1 file.

Try starting hamachi after that.