Tips and Tricks

How to copy CD/DVD Disk in Ubuntu

Duplicating CD or DVD in Ubuntu is so easy.

First we create an image of the CD/DVD to your hard disk drive.

sudo umount /dev/cdrom
readcd dev=/dev/cdrom f=file.iso

And then, we finally burn the iso image file to blank or writable CD/DVD .

Right click on Image (ISO) file -> Write to Disc... -> Write

PHP5 for CentOS 4.4

I’m using right now CentoS 4.4 and PHP5 is not yet part of the rpm package. I can always download the source and compile it or search some pre-pack PHP5 RPM and install it.

Alternatively, here’s how to do it using the good old yum one liner command.

  1. Edit CentOS-Base.repo
    vi /etc/yum.repos.d/CentOS-Base.repo
  2. Enable CentOSPlus by changing:

    #additional packages that extend functionality of existing packages
    [centosplus]

Restrict printing time

Sometimes there are some requirements that you want to restrict the time a printer can print. Here’s how to do it:

  1. Open the Printers and Faxes Control Panel.
  2. Right-click the printer you want to configure in this manner and select Properties.
  3. Go to the Advanced tab, and then click Available From.
  4. To set the time period that the printer is available, click the up or down arrows, or alternatively, type a start and end time, such as "7:00 a.m. to 4:00 p.m."
  5. Click OK to finish the wizard.

How to blank CD-RW/DVD-RW in Linux (Ubuntu)


sudo umount /dev/cdrom
cdrecord dev=/dev/cdrom blank=fast

How to create CD/DVD Copy in Linux (Ubuntu)

  1. Create an ISO image first of your CD/DVD.

  2. sudo umount /dev/cdrom
    dd if=/dev/cdrom of=file.iso bs=1024

  3. Burn the ISO image to blank or rewritable CD/DVD

  4. Right click on Image (ISO) file -> Write to Disc... -> Write

Xaraya and Drupal Cron Setup

  1. Create a text file

    vi crons.txt
  2. Write your cron job on the first line, it should read something like this:

    For Drupal:

    0 * * * * lynx http://www.yourdomain.com/cron.php

    or
    For Xaraya:

    0 * * * * lynx http://www.yourdomain.com/?module=scheduler

    Select one, as what you need; and line break is only at the end of the cron job.

  3. Type in:

    crontab crons.txt
  4. Optionally, you can verify if all went well:

    crontab -l

Tar: Linux Archiving and Compression

Creating a TAR archive:

tar -cf archive.tar DirectoryNeedToArchive/

Listing the contents of TAR archive:

tar -tf archive.tar

Extracting files from TAR archive:

tar -xf archive.tar

Compressing the TAR archive:

gzip archive.tar

Decompressing and extracting tar/gzipped archive:

tar -xzvf archive.tar.gz

How to hide user accounts from other users in Windows XP

If you want to hide the User Accounts in Control from those who don't need to have access to it, here's how:

  1. Click Start | Run.
  2. Enter gpedit.msc in the Run box to open the Group Policy Editor.
  3. In the left console tree, expand User Configuration | Administrative Templates | Control Panel.
  4. In the right details pane, doubleclick "Hide specified Control Panel applets."
  5. Click the Enabled option.
  6. Click the Show button.
  7. Click the Add button.
  8. In the Add field, enter nusrmgt.cpl

Chikka on Linux (Ubuntu)

Java Runtime Environment (JRE) is not installed by default in Ubuntu.

Java-based Chikka uses JRE so if you are using Ubuntu and want to use Chikka, here's my quick guide.

  1. Edit your /etc/apt/sources.list

    $ sudo vi /etc/apt/sources.list
  2. Add “deb http://ubuntu.tower-net.de/ubuntu/ hoary java” from list of exisiting repositories.
  3. Install sun-j2sdk1.5

    $ sudo apt-get update
    $ sudo apt-get install sun-j2sdk1.5
  4. Create a soft link to your firefox plugin
Syndicate content