Install Packages in Linux without an internet connection

Yup, you read it right. It’s possible to install various packages in Linux even when you don’t have an internet connection on the computer.

I had trashed my Ubuntu 8.04 Hardy Heron LTS and installed a fresh copy of 8.10 Intrepid Ibex over the same drive recently. But the following option helped me get all my favorite applications in the new system with just a few clicks. Applications can be installed from the following sources:

1> From Live CDs.
This method requires the installation cds of any distro of linux (not necessarily ubuntu). Click here for step by step procedure on how to do so.

2> From other CDs that can be used to install packages. These can be enabled as follows.

To enable Synaptic and other package managers to install software from CDs which contain packages in Ubuntu:

1.Press System → Administration → Software Sources.
2.Go to the Third Party Software tab and click on the Add CD-ROM button.
3.Insert the CD.

The packages should then be listed. To have Synaptic only list packages from the CD, click the Origin button on the lower left corner of Synaptic Package Manager, then find the name of the CD on the list in the upper left corner of Synaptic.

3> And now my favorite. From a computer already having these applications installed (Works great if the version of linux on both the PCs is the same).

Here you’ll need a package called APTonCD installed in this case (More details here). It’s freely available here. It can be directly installed from the terminal using the following command.

$ sudo apt-get install aptoncd

We’ll need a cd for the transfer of this program. But if you don’t want to waste one or want to copy it on a usb drive or hard disk, you’ll need a .iso image mounting program. I used GMount ISO (More details here). It can be directly installed from the terminal using the following command.

$ sudo apt-get install gmountiso

You’ll also need a .deb installer. For Ubuntu, GDebi Package Installer is installed by default, so don’t worry if you have Ubuntu or Kubuntu.

Working:

APTonCD is a tool with a graphical interface which allows you to create one or more CDs or DVDs with all of the packages you’ve downloaded via APT-GET or APTITUDE (or even Synaptic), creating a removable repository that you can use on other computers. APTonCD will also allow you to automatically create media with all of your .deb packages located in one especific repository.

From the source computer, open the APTonCD application (I’m using version 0.1.98-0) and choose the option to Create an installation disk. On the next menu, you’re asked to choose the various packages you want to create a backup of. You can uncheck the packages that you don’t want to transfer. It’s usually not recommended to deselect library packages. Shared libraries are needed by some program or the other. You can use the Add option to add other .deb packages or folders. Save the .iso image to a desired location on your computer or burnt (written) over the cd.

Great, how you are halfway. Go to the computer where you want the program installed. We’ll now need the cd or the .iso image. We need to mount the image using GMount ISO. Just mount the image in a free folder. You’ll see that the virtual folder now contains another folder named packages. Same is true with the cd. This folder packages contains the .deb files that are used to installed a program. Now just doubleclick on the .deb file of the program that you want to install. You may get errors regarding installation of dependencies. Don’t worry, you’ll find all the dependencies as .deb files in the same folder. Once the dependencies are all satisfied, you can install the program.

Kewl! Isn’t it?

I actually copied all applications and games worth 2.8 Gb from a friend of mine without downloading a single file from the net. And it took me a fraction of the time it would have taken me had I downloaded them (thanks to my pathetic download speed)!

Thank you for reading this post. Your comments, pingbacks, ratings, reviews and any other contributions are greatly appreciated.

Creating Rememberable Passwords

There are many sites available online where one needs to provide a password or passcode. With the advent of e-mail, passwords became an integral part of our e-life. They not only protect our privacy but also our identity on the internet. But with the evolution of security systems, we also see an increase in sophistication of password hacking / cracking tools. So, we need to make our passwords as ‘strong‘ as possible. Are the passwords that we normally use strong enough. A trip to the password checker will give a better idea. So, how do I make a strong password?

Microsoft has given a good explanation. Wikipedia has taken a dig on this hereCryptosmith is another site which gives more information on the issue. One can also make use of random password generators.

These sites give you enough information only on how to create a strong password. Now, you may ask, “I’ve got a great password that follows all the rules that strong passwords must follow. It’s the most obscure alphanumeric sequence containing all funny symbols. And on top of it, it’s bigger than the topic of my latest business meet. So, how the heck am I supposed to remember it?“.

So, I’ve invented a great way to increase the obscurity to your old passwords, thus making them a bit stronger. For this we use a convert the original rememberable password into an obscure one. This is particularly helpful as most password hackers use tools with a ‘dictionary‘, that checks for day to day words like names, places, nicknames, etc.

For this post I’m only using a substitution on the text matter of a password.

Let us take a long phrase as a password – SanketIsAGoodPasswordHacker. Now this phrase consists general words – is a good password hacker, and a name – Sanket. This password is very easy to crack. So, we need to substitute each letter with another to increase obscurity.

For this, we’ll need a phrase which has all the letters of our password. Now pangrams can be very useful in this respect as they contain all the letters of the alphabet. A good list of pangrams can be found here.

I’m chosing this pangram as it’s the most known one – The quick brown fox jumps over the lazy dog. We’ll start  substituting each letter from this pangram with the alphabet. A repetition may have different letters. A space may increment our sequence. It all depends upon you. For this article, I’m using it without considering spaces or repetitions. Deleting the repetitions and spaces, we get – thequickbrownfxjmpsvlazydg. We, now substitute the alphabet for each letter.

Thus,
T becomes A, H becomes B, E becomes C, Q becomes D,
U becomes E, I becomes F, C becomes G, K becomes H,
B becomes I, R becomes J, O becomes K, W becomes L,
N becomes M, F becomes N, X becomes O, J becomes P,
M becomes Q, P becomes R, S becomes S, V becomes T,
L becomes U, A becomes V, Z becomes W, Y becomes X
D becomes Y, G becomes Z

Thus our phrase

SanketIsAGoodPasswordHacker becomes
SvmhcaFsVZkkyRvsslkjyBvghcj or by reverse substitution
StfouvBsTCxxqJtsszxpqKteoup.

Now, SvmhcaFsVZkkyRvsslkjyBvghcj or StfouvBsTCxxqJtsszxpqKteoup are very difficult to crack compared to SanketIsAGoodPasswordHacker.

And it’s also eazy to remember this password if you remember the pangram.

One can experiment with a number of pangrams and phrases to make different combinations. A password for a site could be easily made by transforming the sitename using this technique. Thus a wordpress password may become lkjyrjcss or zxpqjpuss which is not only difficult to crack but also easy to remember.

I’ve explored only the area for substituting text here. If I get a good response for this article, I’ll post another about numbers and special characters.

Thank you for reading this post. Your comments, pingbacks, ratings, reviews and any other contributions are greatly appreciated.

Promote Intrepid Ibex on your WordPress blog

Hi and Happy Diwali to all!

It’s been a long time I posted on my blog. Have been a bit busy. Being an avid fan of Ubuntu, my comeback post is about the same. It’s on the same lines as my few previous posts.

Ubuntu has come up with a new version 8.10 Intrepid Ibex. More info can be found here. So, obviously I wanted to promote my favourite distro. A fellow blogger Peng had given a great idea for uploading the Intrepid Ibex countdown images on your site. But now October 30 has elapsed and I wanted to upload new images. Hence, the post.

The Ubuntu website has a couple of cool images by  Thorsten Wilms (thorwil) which can be used for this purpose. They can be seen here. You can simply paste the respective codes to get these images in your sidebar or posts. :-)

To get this image:

Intrepid Ibex is here!

Paste this code:

<a href=”http://www.ubuntu.com” title=”Intrepid Ibex is here!”> <img src=”http://fasterthanlight.files.wordpress.com/2008/11/countdown_8_10_c_00_days_a_here2.png” width=”180″ height=”150″ border=”0″ alt=”Intrepid Ibex is here!” /></a>

For the lighter image:

Intrepid Ibex is here!

Use the following code:

<a href=”http://www.ubuntu.com” title=”Intrepid Ibex is here!”> <img src=”http://fasterthanlight.files.wordpress.com/2008/11/countdown_8_10_a_00_days_a_here.png” width=”180″ height=”150″ border=”0″ alt=”Intrepid Ibex is here!” /></a>

Enjoy!

If you need help for other images, please contact me. Hope this post has been helpful for you.

:-)

Man vs. Machines

Many among us have heard of Technological singularity.  It’s been a prominent element in many books as well as movies. Theoretically, at the speed with which we are creating machines, this concept looks possible in the very near future.  So, what’s really freaky about it? Read on…

In thousands of years of civilization, man has been able to invent and build several machines. Starting from the simple wheel to the complex humanoids of today, we have been able to build machines that are stronger, faster, tougher and some of them even more intelligent than man. But there is always a threat that these machines will become too smart and overpower us. Thus men will become slaves or be killed leading to the end of mankind.

But there is another case to it. The robots that we have made, machines, automobiles and all other contraptions are our discoveries. We have made only what we have seen, heard, smelt, tasted, touched or felt. Only our experience has helped us in making these things.

For eg. Man thought and created a flying machine only because we’ve been seeing birds flying from several years. If there were no flying beasts, we’d never thought of creating an airplane!

And in the pursuit of ‘advancement of technology’, we have ended up creating robots. We have induced a great similarity in our systems and robotic systems. Humanoids now look like us, talk like us, and in a few years will alos be able to feel and emote like us. Then, in a few years we’ll have robots which can replicate themselves. Thus robots will be able to do everything that humans can do, and sometimes in a better way. So, it is obvious that some of us fear the very machines that we build. There’s nothing wrong to it.

But a very interesting proposition occurs to me. I’ll like to illustrate it with an example. Imagine that we have created machines that are capable of doing a lot more than we are. And then, there’s a great war. We are all wiped out and only the machines remain! So, what happens then?
The machines will keep on advancing and some day might create other beings or artificial machines! Or maybe these machines were what really evolved on Earth and we are the artificial beings created by them. After all we don’t have real proof about our evolution, just theories?

So, can this be really possible. Why not? There have been many evidences in the past of great wars fought. It is human tendency to not let anyone rule us.

This does raise many more questions
Where do we come from? What are our motives of existence?
Did other intelligent species really exist? What were they like?
And in the process of becoming the ‘ultimate on this planet’, have we ended up destroying our creators?

If we were created by some beings, it’s safe to presume that they made us replicas of their own kind.
But, won’t It be really absurd if we find that our inventors were none other than machines itself !!!

WordPress Blog Random Post Button In Sidebar

WordPress has a very cool feature which allows the author to showcase a random post on the blog. All one needs to do is add ?random to the end of the wordpress URL. Thus, for this site the link is
http://fasterthanlight.wordpress.com/?random

Putting the above url in the title bar will result in any random post being picked and displayed. So, at first I put in a link for the above in my sidebar. It serves the purpose but doesn’t look chic. So I tried to make a button for the link. But, the button tag is not allowed in wordpress. The list of Allowed HTML tags on WordPress blogs can be viewed here. So, But I still had one cool option left. The table tag is allowed here. So I created a ‘button’ for the same.

Here’s my code:

<div id=”gmdp”>
<div id=”tx1.”>
<table id=”cen-” style=”color:#000000;height:32px;” border=”1″ cellspacing=”2″ cellpadding=”3″ width=”160″ bgcolor=”#eeeeff”>
<tbody>
<tr>
<td style=”padding-left:10px;” width=”100%”><span style=”font-size:105%;”><a title=”Opens a Random Post on this WebLog…” href=”http://fasterthanlight.wordpress.com/?random” target=”_self”>Read a Random Post</a></span></td>
</tr>
</tbody></table>
</div>
<span style=”font-size:110%;”> </span></div>

Get this Button Now: ;-)

For using a similar button on your site, you simply need paste the above code as a text widget in your sidebar. Select the whole code and choose the ‘copy‘ option. Then go to the ‘Widgets‘ page under ‘Design‘ for your blog. Choose your ‘sidebar‘ and insert the widget ‘text‘.In the ‘Text Edit‘ section just ‘paste‘ this code in the space provided. Replace fasterthanlight with your blog’s domain name! Click on ‘Save Changes‘. Done!:-)

Isn’t that easy? If you want to modify various parameters like button size, background color, font options, hover options, etc. just type in your issue as a comment to this post. I’ll get back to you asap.

Thank you for reading this post. Your comments, pingbacks, ratings, reviews and any other contributions are greatly appreciated.

Create your own GRUB Splash Image

In my last post, I’ve written a howto on beefing up your GRUB loader by using a splash image. But, you’re not restricted to just using the few images given in the packages or the ones available on other sites. You can infact create your own!

First let’s see the few requirements for creating them:

1> The file should be of the type .xpm.gz only.
2> The xpm file should have a resolution of exactly 640 x 480.
3> Only, the xpm files with 14 colors are supported.

To create a new file in Gimp use this howto.

But if you want to use an existing image like a wallpaper or a photograph, you’ll need to modify it.

Open your image using GIMP.
Choose Image >> Scale Image.
In the dialog box that opens, put Width as 640 and Height as 480 pixels.

If you want to convert your image into Grayscale (i.e. Black, White and Gray format) go to
Colors >> Desaturate…

Now convert the image into 14 colors by going to
Image >> Mode >> Indexed

In Generate optimum palette, choose 14 as the Maximum number of colors.

Now right-clck on the image and select
File >> Save As

In the dialog box, choose the type as X Pixmap image i.e. .xpm and name the image as sankz.xpm and save it to the desktop.

Open a terminal, change directory to the desktp using the following command:

$ cd Desktop

Then compress it using GNU-zip

$ gzip sankz.xpm

This’ll create sankz.xpm.gz file! That’s just what we need. Copy this file to the /boot/grub/splashimages folder and use it as explained in my previous post.

Done! Restart you computer and see the cool new Grub Loader with splash image of your choice!

Thank you for reading this post. Your comments, pingbacks, ratings, reviews and any other contributions are greatly appreciated.

Beef up your Grub Loader

I’m currently dual booting Ubuntu Hardy Heron and Windows XP Professional from my computer. So, I have to use a multiboot loader like Grub. So, everytime I boot, a text based screen comes up asking me the operating system my computer should boot into. Works fine for me.

A couple of days ago, I met a friend who’s running OpenSUSE on his computer and was shocked to see his GRUB loader screen. It had a nice graphical image in the background while mine was just a plain text screen. I checked the GRUB loaders of other popular distros and came up with a conclusion:  When we compare it to the beautiful grub of distros like OpenSUSE, Fedora and PCLinuxOS, Ubuntu default grub screen looks ugly. Ubuntu is one of the most popular distros but nobody provided any ‘GRUBsplash images’ for it by default. So, I decided to take the matter into my hands and get a GRUB splash image for my computer.

There is a package available for Ubuntu called the GRUB-splashimages. It can be installed using the Synaptic Package Manager or using the following command in the Terminal:

$ sudo apt-get install grub-splashimages

For Kubuntu, typ the following in the Konsole:

$ sudo apt-get install kubuntu-grub-splashimages

This package is provided by ‘The Linux Bootsplash Project’ Their home page is located here.

After installing the package, visit the /boot/grub/splashimages folder using your file browser. You’ll see a collection of .gz files each containing a .xpm image. Take a look at all the images and select the best one. However the current package comes with only 16 images (most of which are boring). There’s a nice collection available at schragehome too. Or you can create your own! Just copy the .xpm.gz files to /boot/grub/splashimages folder.

To set a Splash Image:

Open the Terminal / Konsole:

Go to the folder.

$ cd /boot/grub

Then, link the chosen image using:

$ sudo ln -s splashimages/mummy.xpm.gz splash.xpm.gz

Note: I’m using the mummy.xpm.gz. If you want to use another, just replace mummy with the name of your image package!

Sometimes you may get an error:

ln: creating symbolic link `splash.xpm.gz’: File exists

Don’t panic, This means that there’s already a link present. Just go to the /boot/grub folder and delete the splash.xpm.gz link! Run the command again. You should not receive any errors.

Now to update the GRUB package.

$ sudo apt-get install grub-splashimages

Restart you computer and see the cool new Grub Loader with splash image of your choice!

Thank you for reading this post. Your comments, pingbacks, ratings, reviews and any other contributions are greatly appreciated.

Convert Photo into a Sketch

From past many days, I’d been unsuccessfully trying to convert a few of my photos into sketches. I think sketches look real good and can be effectively used especially to beef up one’s profile in social networking sites!

After a variety of attempts, I gave up & searched for external help. Google came up with many results for the same but none of them suited my needs. Then a couple of days back I asked a BlogCatalog friend for some help in the matter. She’s a pro at this stuff and has posted various articles about Photoshop on her site. She not only helped me in this matter, but also posted a walkthru for all to see. The original post can be viewed here. I’m very thankful to her for helping me out.

Here is one of the images that I converted to a sketch.

Original Image:

My photo at Rohtang Pass, where I’d been sometime back…

The Original Photo

The Original Photo

Converted Sketch using Trisna’s Tutorial:

This was done on Adobe Photoshop CS 2 on Windows XP:

Sketch using Photoshop

Sketch using Photoshop

I’ve used the same values as recommended by Trisna here.

Converted Sketch using Gimp:

This was done on Gimp 2.4.5 on Ubuntu 8.04 Hardy Heron having Gnome 2.22.1:

Sketch using Gimp

Sketch using Gimp

I’ve used similar values as recommended by Trisna but had to change a few options.

PS: Most people find it hard to buy Photoshop as it’s quite expensive (even I’m using a trial version that’ll expire in a few days). The best free alternative that I found for Photoshop is Gimp. One can download it’s windows installer here.

Thank you for reading this post. Your comments, pingbacks, ratings, reviews and any other contributions are greatly appreciated.

Install applications from Live CD

To install applications from another computer without using an internet connection, sneak peek here.

I’ve been using Ubuntu as well as Kubuntu for quite some time now. The debate about using GNOME or KDE is a never ending one. Both the desktops have some pros and cons. GNOME gives you a super look with beautiful effects but KDE has the best set of applications. My choice is to use GNOME along with some KDE applications.

Synaptic Manager allows one to easily install KDE applications too. Applications like Amarok and k3b easily integrate into the GNOME desktop. Thanks to my very pathetic internet connection, I had to request cds for Ubuntu as well as Kubuntu.

I recently installed the new version Hardy Heron 8.04 and wanted to install my favourite KDE applications on it (especially Amarok and k3b). It’s really not worth installing the complete Kubuntu system just for using a few applications. Or downloading them if you allready So, I played around with the system a bit, and came up with a solution which I would like to share with all. I installed applications from the Kubuntu Live CD onto my GNOME Desktop. And they Worked!

Let’s see how to go about it. Do read the site disclaimer before going ahead.

Firstly, go through this post for mounting the File System in a folder.

Note that we’ll need to have administrator privileges for this hack, so it’s better to open the folder in file manager as root.

$ gksudo nautilus/home

One needs to select the applications to be installed from this folder ’sfsmount’. A complete list of the packages can be found in the folder ’sfsmount/var/lib/dpkg/info’. Open this folder using the following command. Being root, we’ll have to navigate to the ‘/home/username/sfsmount/var/lib/dpkg/info’. Choose the packages to be installed and open the .list files in a text editor (gedit or kate).

The .list file contains a list of files and directories associated with the application. For Amarok, it looks somewhat like this:

/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/k3b
/usr/share/doc/k3b/FAQ



/usr/share/doc/k3b/TODO
/usr/share/doc/k3b/AUTHORS
/usr/share/doc/k3b/changelog.Debian.gz
/usr/share/doc/kde/HTML/en/k3b/common

This means that for the Amarok to be installed the above list of files should be present in the user session. Simply copy the files from the directory ’sfsmount’ to the present filesystem. After copying all the files, type in the command for the application. (eg. for Amarok)

$ amarok

Amarok will initialise and can be used just as any other installed application! There is also a shortcut at Applications >> Sound & Video >> Amarok.

Thus we’ve successsfully installed an application from a Live CD onto the Linux environment.

This hack is also very useful for people with no internet connection. One can also upgrade the applications in the same way. Although, I’ve tried this on GNOME, I’m sure the same is possible on any version of Linux.

PS: I’ve tested Amarok and k3b. If anyone installs any other applications do let me know by commenting on this post. Also please inform if you encounter any errors in the operation.

Thank you for reading this post. Your comments, pingbacks, ratings, reviews and any other contributions are greatly appreciated.

Mount Live CD in User Session

I always wondered if it was possible to copy the contents of the Ubuntu Linux live cd filesystem without booting in it. A quick search and some playing with the system revealed that it is possible to do so using the following hack.

Requirements for this hack:

1> Ubuntu / Kubuntu Live CD

The CD contains the file system in SquashFS format. I found this by the fact that the file ‘cd/casper/filesystem.squashfs’ is the heaviest file on the CD (about 683 Mb on Ubuntu Hardy Heron AMD 64 Live CD). SquashFS is a highly compressed read-only filesystem for Linux. It uses zlib compression to compress both files, inodes and directories.

2> About 2 Gb hard disk space.

As we’ll be copying the contents of the Live CD as well as the filesystem onto the HD.

3> squashfs-tools

This is a set of tools required for mounting this file system in the User Session. More information about this package can be found here.

>> You can install it by simply typing the following in the terminal:

$ sudo apt-get install squashfs-tools

>> Or open Synaptic Package Manager, and search for ’squashfs’. You should find ’squashfs-tools’ in the list. Install it using synaptic.

Once the tools are installed, we go back to the terminal. We’ll be creating 2 temporary directories named ’sfstemp’ and ’sfsmount’ using the following commands:

$ mkdir ~/sfstemp$ mkdir ~/sfsmount

Copy the entire contents from the Live CD to the ’sfstemp’ directory.

Now we’ll load the squashfs-tools and mount the filesystem onto the other directory ’sfsmount’:

$ sudo modprobe squashfs

$ sudo mount -t squashfs -o loop sfstemp/casper/filesystem.squashfs ~/sfsmount

This will mount the Live CD filesystem into the folder ’sfsmoun’t. You can open the folder using any file manager (eg. nautilus, konqueror, dolphin) and view its contents. These contents will be same as the contents of the Live CD File System.

Cool, Now we have the filesystem on our HD. But what can we do with it? This is very useful while installing applications from the Live CD. Check out this post for more info.

Thank you for reading this post. Your comments, pingbacks, ratings, reviews and any other contributions are greatly appreciated.