June 25, 2012

Create Hyperlink to the part of the image in HTML using AREA tag

Hi everyone,

Its been a long time that I have been posted a new one. This time I would like share with you the information to create or make some part of the image as hyperlink.

Source:
<img src="image.jpg" usemap="#areal" />
<map name="areal">
<area shape="rect" coords="0,0,50,50" href="http://www.pillisureshraju.info/" target="_blank"></area>
</map>

Important values to observe:
image.jpg -- Image name
areal -- map area name
rect -- Shape type
0,0,50,50 -- x1,y1,x2,y2 coordinates of the shape
href -- hyperlink reference

Now, the hyperlink is been created for your image with the specified coordinates.

Please send your comments and feedback to psrdotcom@gmail.com

June 07, 2012

Ubuntu Linux Free and Best Audio (MP3, Ogg, etc.) and Video (AVI, MP4, etc.) Editors, Cutter, Joiner

Hi folks,

I would like share some best audio and video editors in Ubuntu Linux. Install common-codecs to use these Audio/Video editors.

In Ubuntu Software Center, search for Ubuntu restricted extras and install.

Audio Editors:
  • Audacity
  • Command Tools for MP3 Cutter and Joiner: mp3split, mp3wrap
  • Jokosher
  • Grip
  • Hydrogen
  • Sound Converter (Extract Audio from a Video File)
  • Muse
  • RoseGarden
  • Ardour
  • SoundKonverter
  • StreamRipper
  • LLMS

Video Editors:
  • Openshot
  • AvideMux
  • Cinelerra
  • Kino
  • Jahshakha
  • Pitvi
  • Lives
  • Vivia
  • FFMpeg
  • Handbreak
  • VLC Media Player (Don't get surprise, see the 4th Reference link)

Most of the above mentioned softwares can be downloaded from the Ubuntu Software Center/Synaptic Package Manager.

Download the editor(s) and, be creative in your own way.

References:

http://ubuntup.blogspot.in/2010/09/best-audio-mp3-cutter-converter-editor.html
http://techcityinc.com/2009/04/14/10-best-audio-editors-for-linux/
http://techcityinc.com/2009/02/04/top-10-free-video-editors-for-ubuntu-linux/
http://ubuntup.blogspot.in/2010/10/best-video-editor-converter-splitter.html

June 02, 2012

Live CD Ubuntu Customization Kit (UCK) without Internet

Hi friends,

As many of you know that, UCK (Ubuntu Customization Kit) requires Internet when customizing the Live CD.

Why we need Internet while customization?

  • To get the updates from the repositories we need the internet.
  • To install any software using apt-get/synaptic package manager.
Do we need Internet all the time?

According to me, We may not need the Internet for small updates.
So, I have modified the customization scripts to work without Internet.


Pre-requisites:

Please download the following files.

sources.gz: 
According the ubuntu distro, we need to get the sources.gz from the link
http://archive.ubuntu.com/ubuntu/ubuntu/ubuntu/dists/$DISTRO_CODENAME/main/source/Sources.gz

gfxboot-theme-ubuntu_x.x.x:
http://archive.ubuntu.com/ubuntu/ubuntu/ubuntu/pool/main/g/gfxboot-theme-ubuntu/

Please place these two files in ~/Softwares/UCK/ directory

Note: ~ is home directory of the user.

Apply Patches

If you installed UCK, you will having the /usr/lib/uck/customization-profiles/localized_cd/ directory
In that directory, you will be having customize and customize_iso scripts.

Those two scripts will be copies to /home//tmp folder while running the UCK.

So, please apply the following patches in /usr/lib/uck/customization-profiles/localized_cd/ 

Now apply the patch as shown below

$ patch -u customize customize.patch
$ patch -u customize_iso customize_iso.patch

customize.patch


--- customize 2012-06-01 21:47:31.905741928 +0530
+++ customize_old 2012-06-01 21:46:03.509742149 +0530
@@ -121,8 +121,7 @@
arch=`if [ -d /lib64 ]; then echo x86_64; else echo i586; fi`
echo ">> Customizing: $rel, $kernel $arch"

-# Commented by PSR
-#prepare_install || failure "Preparing installation failed, error=$?"
+prepare_install || failure "Preparing installation failed, error=$?"

# List of packages to install to support the selected languages:
PACKAGES_TO_INSTALL=""
@@ -153,16 +152,16 @@
fi
done

-# Commented by PSR
- #install_packages $PACKAGES_TO_INSTALL || failure "Installing language packs failed, error=$?"
+ install_packages $PACKAGES_TO_INSTALL ||
+ failure "Installing language packs failed, error=$?"

# NOTE: we first install selected language packs, then remove others as
# installing a language pack might pull in packages that were not
# previously present
echo "Removing unnecessary language packages..."
REMOVED_PACKAGES=`dpkg-query --show | cut -f1 | grep -E '^(language-pack|language-support|firefox-locale)' | grep -Ev "[-]($LANGPACKS_CONCATENATED)\>"`
-# Commented by PSR
-# remove_packages $REMOVED_PACKAGES || failure "Removing packages failed, error=$?"
+ remove_packages $REMOVED_PACKAGES ||
+ failure "Removing packages failed, error=$?"
fi

if [ "$RUN_MANUAL_CUSTOMIZATIONS" = "yes" ] ; then

customize_iso.patch


--- customize_iso 2012-06-01 21:47:38.369741917 +0530
+++customize_iso_old 2012-06-01 21:46:00.441742156 +0530
@@ -50,9 +50,6 @@
REMASTER_DIR="$REMASTER_HOME/remaster-root"
BOOT_LANG=`cat "$SCRIPT_DIR/livecd_locale"`

-# Added by PSR
-SOURCES_DIR="/home/user/Softwares/UCK"
-
function failure()
{
echo "$@"
@@ -83,21 +80,12 @@
DISTRO_CODENAME=`cd "$ISO_REMASTER_DIR"/dists && find . -maxdepth 1 -type d | grep '/' | cut -d '/' -f2` || failure "Unable to identify Ubuntu distro codename"
APT_SOURCES_TMP_DIR=`mktemp -d`
-# Commented by PSR
-# wget -c http://archive.ubuntu.com/ubuntu/ubuntu/ubuntu/dists/$DISTRO_CODENAME/main/source/Sources.gz -O "$APT_SOURCES_TMP_DIR"/Sources.gz
-
-# Added by PSR
- cp "$SOURCES_DIR"/"$DISTRO_CODENAME"_Sources.gz "$APT_SOURCES_TMP_DIR"/Sources.gz
-
-# Commented by PSR
-# GFXBOOT_THEME_UBUNTU_SOURCE_PACKAGE=http://archive.ubuntu.com/ubuntu/ubuntu/ubuntu/pool/main/g/gfxboot-theme-ubuntu/$(zgrep gz "$APT_SOURCES_TMP_DIR"/Sources.gz | grep gfxboot-theme-ubuntu | sed -n 1p | awk '{ print $3 }')
+ wget -c http://archive.ubuntu.com/ubuntu/ubuntu/ubuntu/dists/$DISTRO_CODENAME/main/source/Sources.gz -O "$APT_SOURCES_TMP_DIR"/Sources.gz
+ GFXBOOT_THEME_UBUNTU_SOURCE_PACKAGE=http://archive.ubuntu.com/ubuntu/ubuntu/ubuntu/pool/main/g/gfxboot-theme-ubuntu/$(zgrep gz "$APT_SOURCES_TMP_DIR"/Sources.gz | grep gfxboot-theme-ubuntu | sed -n 1p | awk '{ print $3 }')

-# Commented by PSR
-# wget $GFXBOOT_THEME_UBUNTU_SOURCE_PACKAGE || -# failure "Unable to download gfxboot-theme-ubuntu source package from $GFXBOOT_THEME_UBUNTU_SOURCE_PACKAGE"
+ wget $GFXBOOT_THEME_UBUNTU_SOURCE_PACKAGE || + failure "Unable to download gfxboot-theme-ubuntu source package from $GFXBOOT_THEME_UBUNTU_SOURCE_PACKAGE"

-# Added by PSR
- cp "$SOURCES_DIR"/gfxboot-theme-ubuntu_0.14.2.tar.gz .
tar xfz *.tar.gz || failure "Unable to extract gfxboot-theme-ubuntu source package"
fi

Please apply the patch files and run the UCK without Internet.

Enjoy a quick Ubuntu Customization.

Please send you comments and feedback

June 01, 2012

Create and Apply Patch file in Linux using Diff command

Hi friends,

When I was updating one file, I have taken backup as filename_old.

After updating (adding and removing line) the current file, I thought let me see what are all the updates I have done to the current file. Then I thought, there is a concept call patch file.

Then I decided to create the patch file.

I have searched and surprised that "diff" command is able to do that.

Procedure:

Files: 1.txt (Original File), 2.txt (Modified File), diff.patch (Patch File)


1.txt 2.txt
a a
b b
c c
d e
e f
f g
1


Create Patch


Syntax: diff -Naur Original_File Modified_File > Patch_File

In terminal window, execute the following command

$ diff -Naur 1.txt 2.txt >> diff.patch


Output:

diff.patch


--- 1.txt 2012-06-01 23:25:02.713727335 +0530
+++ 2.txt 2012-06-01 23:25:09.833727317 +0530
@@ -1,7 +1,6 @@
 a
 b
 c
-d
 e
 f
-1
+g




Apply Patch

Syntax: patch -u Original_File Patch_File


$ patch -u 1.txt diff.patch


Output:



1.txt
a
b
c
e
f
g


Now, we have successfully applied the patch to the old (Original) file.

Please send your feedback to psrdotcom@gmail.com or write comments

Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com