Location of PDF files

All of you must be knowing already that in Ubuntu, we can install a printer that generates PDF focument through installing cups-pdf. But, normally, when you print, the output is saved in a folder called ‘PDF’ in your home folder.

I personally feel that it is better to have the destination as the Desktop. If any of you want to change the default destination location, it can be done through these steps :

  • Open the /etc/cups/cups-pdf.conf file using any text editor. As an administrator.
  • Look for a line something like Out ${HOME}/PDF
  • You can change it to Out ${HOME}/Desktop
  • Save and close.
  • Open the /etc/apparmor.d/usr.sbin.cupsd file using any text editor. As an administrator.
  • Look for two lines like the following :   @{HOME}/PDF/ rw,
    @{HOME}/PDF/* rw,
  • Change them to :   @{HOME}/Desktop/ rw,
    @{HOME}/Desktop/* rw,
  • Save the file.
  • Reboot. (Though the cups file can be restarted from terminal, the changes in apparmor.d folder takes effect only when we restart. So, it is better to restart).
  • Now, if you print anything using the PDF printer, the outputs will be saved in the Desktop

I find this very useful. So, thought of sharing with everyone.

Published in: on July 3, 2010 at 1:53 am  Leave a Comment  

Mounting USB manually

Question

How do I manually mount a USB drive in Ubuntu ?

Answer

In the Terminal, you can type the following command :

sudo mount /dev/sdc1 /mnt

Then, you plug your USB drive.

Published in: on June 5, 2008 at 3:28 am  Leave a Comment  

Terminal commands for Package Manager

Question

What are the Terminal Commands for managing the Packages ?

Answer

In the Terminal, you can type the following commands :

sudo apt-get update   (to get the package database uptodate)
sudo apt-get -f install  (to remove add any pending software installation/removal
sudo apt-get upgrade ( to get the updates of packages)

Published in: on May 7, 2008 at 3:56 am  Leave a Comment  

Hosting sites in local server

Question

How to host sites in Local Server ?

Answer

The folder /var/www contains the websites that are hosted in the local server. For example, let us say that you have your website called MySite in a folder called Websites, within your home folder; and you want to host this site in the local server.

In the Terminal, first you go to the /var/www folder. Then, type the following command :

ln -s /home/YourName/Websites/MySite

Now, in your web browser (like firefox), if you type http://localhost/MySite, then its index file will be shown.

Published in: on April 30, 2008 at 1:50 am  Leave a Comment  

Shortcuts for Partitions

Question

How can we create shortcuts for Partitions in the Desktop ?

Answer

For example, let us say you want to create a shortcut for the partition hdb3 in the Media folder. First, in the Terminal, go to Desktop and then type the following command:

-ln -sf /media/hdb3/ .

Published in: on April 25, 2008 at 1:47 am  Leave a Comment  

Creating Shortcuts

Question

How to create Shortcuts for files / folders ?

Answer

For example, let us say you want to create a shortcut for the folder /var/www in the Desktop and want to call it MyFolder.
In the Terminal, first go to Desktop. Then, type the following command :

ln -s /var/www MyFolder

Published in: on April 20, 2008 at 1:44 am  Leave a Comment  

Deleting Files

Question

What is the terminal command for deleting files / folders ?

Answer

In the Terminal, first go to parent folder containing the file / folder that you want to delete. Then, type the following command in the terminal :

rm -r name_of_file

Here, you replace the name_of_file with the name of the file / folder that you want to delete.

Published in: on April 12, 2008 at 1:41 am  Leave a Comment  

Read and Write Permissions

Question

How to make a folder Read and Write ?

Answer

In the Terminal, first go to that folder. Then,  type the following command :

sudo chmod -R 777 .

Published in: on April 10, 2008 at 1:38 am  Leave a Comment