Monday, 28 April 2008

Ubuntu 8.04 guest on VirtualBox 1.5.5 on Solaris: a problem with the screen resolution

I just installed an Ubuntu 8.04 guest on top of my VirtualBox 1.5.5 (with guest additions 1.5.6) on Solaris Express Developer Edition. As soon as I logged in, I wanted to change the screen resolution and I realized that the maximum resolution allowed was 800x600. It's not clear to me yet if the problem is related with the guest additions, but it was easily solved by adding:
Driver "vboxvideo"
to the device section. Doing so, Xorg now recognizes 1024x768 as a valid resolution, too. If you need higher resolutions you can add a Display subsection in the Screen section and manually specify the modes, as in:
Section "Screen"
Identifier "Default Screen"
Device "VirtualBox graphics card"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "2048x800" "1024x768" "800x600" "640x480"
EndSubSection
EndSection

Thursday, 24 April 2008

Ubuntu Hardy Heron - 8.04 LTS Desktop and Server Edition Released

The next major release of Ubuntu has taken place. The new name being Hardy Heron. It is released as a Long Term Support (LTS) version. Ubuntu 8.04 LTS Desktop edition is supported till year 2011 (3 year support) and the server version is supported till 2013 (5 year support).

Some of the features that will be big draw for any Linux enthusiast are as follows :
  • Wubi Windows Installer - This allows any Windows user to install Ubuntu on their hard disk without any partitioning what so ever and run it from a folder in the 'C:\' drive. It allows you to install and uninstall Ubuntu as any other Windows application, in a simple and safe way.
  • Enhanced security via SELinux
  • Integration with Microsoft Active Directory
  • Support for KVM out of the box. KVM, or kernel-based virtual machine, is a device driver and userspace component for Linux that utilizes hardware virtualization extensions such as Intel's VT to create virtual machines running on a Linux host.
You can read the main features of the Desktop edition of Ubuntu Hardy Heron here.

If you are as excited as I am in this new release, then choose a mirror close to your geographic location and start downloading this excellent Linux distribution. On the other hand, if you already have Ubuntu installed, you can also upgrade following the steps detailed here.

Wednesday, 23 April 2008

Solaris Zones on different network interfaces: setting up the routing table

For the reasons I explained here I created a zone to install Blastwave's software. Furthermore, as I usually use ssh to connect to this machine from the outside of my LAN, I'm running the ssh service on another non-global zone. My Sun Ultra 20 M2 has two NICs, and the two zones share a physical NIC (nge1), while the global zones uses both nge0 and nge1, as shown in the following two fragment of the zone configuration file.

Everything was working OK and I usually use zlogin when I connect to a zone. I had no reason, either, to connect to the Blastwave's zone using ssh because I loopback mounted the /opt/csw filesystem so that it's available to desktop users who log in the global zone.

When I tried to ssh a zone, I realized that I couldn't! A quick check with netstat told me why:
bash-3.2# netstat -r

Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ---------- ---------
default speedtouch.lan UG 1 58 nge0
default speedtouch.lan UG 1 108 nge1
192.168.0.0 solaris.lan U 1 19 nge0
192.168.0.0 Unknown-00-14-4f-80-d6-b1.lan U 1 3 nge1
solaris solaris UH 3 561 lo0

Routing Table: IPv6
Destination/Mask Gateway Flags Ref Use If
--------------------------- --------------------------- ----- --- ------- -----
::1 ::1 UH 1 35 lo0
The zones' IP addresses (192.168.0.132 and 192.168.0.140) are indeed not reacheable. The quick fix was updating the routing table:
route add 192.168.0.132 192.168.0.130
route add 192.168.0.140 192.168.0.130
An OpenSolaris project named Crossbow will solve this kind of problem by fully virtualizing the network interfaces.

Sunday, 20 April 2008

Running Windows on Solaris with VirtualBox

Sun Microsystems acquired InnoTek. InnoTek is the creator of VirtualBox, a family of virtualization products.

I'd been wandering how I would have run an instance of Windows (sigh) on top of Solaris Express Developer Edition but because the processor of my Sun Ultra 20 M2 does not have virtualization extensions (is not HVM capable), I wasn't left with many options.

But when I read about VirtualBox, I decided to give it a try and I must say that I was impressed. Installation was straightforward and Windows was installing (sigh) just after few minutes after downloading the package.

I downloaded the OpenSolaris distribution of VirtualBox and installed it with pkgadd. Once the package was installed, I tried to run VirtualBox but it couldn't find some libraries. A quick ldd showed that:
$ ldd /opt/VirtualBox/VirtualBox | grep found
VBoxKeyboard.so => (file not found)
libqt-mt.so.3 => (file not found)
VBoxRT.so => (file not found)
VBoxREM.so => (file not found)
VBoxVMM.so => (file not found)
VBoxXPCOM.so => (file not found)
Finding missing libraries was easy and the script I wrote to solve the problem is the following no-brainer:
$ cat ./bin/prepare-vb-env
#!/bin/bash
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/VirtualBox:/opt/VirtualBox/qtgcc/lib
export LD_LIBRARY_PATH
PATH=$PATH:/opt/VirtualBox
export PATH
Sourcing this script into your shell will prepare the environment and VirtualBox will run. Creating a new virtual machine was straight forward. After pressing the "New" button, this welcome screen was shown:



This is the typical useless welcome screen in which you've no choice but pressing "Next" or "Cancel".



In this screen, you can set the name of the virtual machine and choose the guest operating system from a pretty rich list which includes:
  • DOS
  • Windows 3.1
  • Windows 95
  • Windows 98
  • Windows ME
  • Windows NT 4
  • Windows 2000
  • Windows XP
  • Windows Server 2003
  • Windows Vista
  • OS/2 WARP 3
  • OS/2 WARP 4
  • OS/2 WARP 4.5
  • Linux 2.2
  • Linux 2.4
  • Linux 2.6
  • FreeBSD
  • OpenBSD
  • NetBSD
  • Netware
  • Solaris
  • L4


In this screen, you can choose the amount of memory you want to assign to the virtual machine. For a Windows XP instance, 512 MB works pretty well. Please consider that VirtualBox is going to reserve this amount of memory for itself and unless you want your Solaris host and your Windows guest starting to swap (even if long time Windows users may be used to it), check that your machine has a proper amount of RAM available for the virtual machine.



The last step is creating a file which will be used by VirtualBox to mimic hard disks for Windows. You can create a maximum of 4 disks, the typical master or slave disks attached to the primary and secondary IDE bus channels.

The first time the virtual machine is run, it will ask for an installation CD or an ISO image of it and the installation will start.

I really liked VirtualBox ease of installation and ease of management and suggest it to everybody wants to run a Windows instance on its Solaris. As far as it's concerned the other supported operating systems, I just tried a Linux 2.6 installation of both Ubuntu and Slackware with no problem. I'm using this image, instead of a lx branded zone, because I'm an old Slackware user and I wanted to run a 2.6 kernel, whose support is (still) experimental. If a 2.4 kernel is no issue for you and you don't need a desktop installation, I would recommend installing a CentOS image on a Solaris lx branded zone. Even if you need a GUI application, you can connect with ssh -X to your linux zone and user your Solaris Xorg instance as a server.

The fundamental laws of human stupidity

I spent half a day figuring how to answer the stupidest email I've ever received. This mail was sent to me by a person I'd been discussing with hours at least three times, and the subject was always the same: covered and hidden below a shelter of slight modifications, the goal this person wanted to accomplish was basically that I said he was right. But right about what?

Let's see. I usually don't spend my precious spare time quarreling with a person I met at most twice in my life, talking about a discussion he had with a friend of mine. Unfortunately, my "education" sort of... obliged me to sit and listen to him, even if he was wounding my friend's privacy. After illustrating my (pretty detached) point of view from the subject, which I'm no way involved with, he sent me a long email. The beginning of the mail was:
"I hope this mail will change your basic ideas about the subject. I think you're wrong."
Well, whether I'm right or wrong it's my problem, and I find pretty "unkind" trying to change my opinions, because this violates the basic assumption of human communication: communicating! I'm not interested to a three-hours one-way "communication", I would rather call it a monologue. A monologue about something which annoys me most.

Fortunately, Carlo Maria Cipolla came to my mind and solved all of my problems. My anger wouldn't let me focus about the biggest problem of all, which unfortunately can't be solved: I was (trying to) communicate with a stupid person. Carlo Maria Cipolla, an eclectic economist, published a collection of essays titled "Allegro ma non troppo". In one of them, "The fundamental laws of human stupidity", Cipolla explores the nature of stupidity. It's a funny and enlightening read, I would suggest this book to every(non-stupid)body.

According to Cipolla, these are the five fundamental laws of stupidity:
  1. Always and inevitably each of us underestimates the number of stupid individuals in circulation.
  2. The probability that a given person is stupid is independent of any other characteristic possessed by that person.
  3. A person is stupid if they cause damage to another person or group of people without experiencing personal gain, or even worse causing damage to themselves in the process.
  4. Non-stupid people always underestimate the harmful potential of stupid people; they constantly forget that at any time anywhere, and in any circumstance, dealing with or associating themselves with stupid individuals invariably constitutes a costly error.
  5. A stupid person is the most dangerous type of person there is.
Thanks to the fourth law, and because of the golden first law, I recognized the costly error I was going to make! I moved the suffered email draft to the trash, and went out for a beer with a (non-stupid)friend.

100 of the Best Open Source Applications

The following is a list of about 100 of the best open source applications, that actually help make Linux more usable for people. This list aims to show potential Linux users that there is really a pile of large, effective, productive and usable range of free, Open Source applications. This list tends to lean towards tools which are invaluable in web development related work.

Read the whole list of 100 open source applications. You will definitely find some very useful applications which you did not know existed.

Saturday, 19 April 2008

Setting up a Solaris zone for Blastwave software

When I first installed Blastwave software on Solaris 10 or Solaris Express, I just installed it on the global zone. I soon realized that this decision would cause some problems. Blastwave packages were replicated in every Solaris zone I created and, letting aside the waste of disk space, the process of upgrading Blastwave's packages was painful because:
  • it propagated changes to every non-global zone by default
  • it complained about packages dependencies with messages such as:
# /opt/csw/bin/pkg-get -u
## Verifying package dependencies in zone
## Verifying package dependencies in zone

The package depends on package currently
being removed from zone .

The package depends on package currently
being removed from zone .

The package depends on package currently
being removed from zone .

The package depends on package currently
being removed from zone .

Dependency checking failed for package on zones
.

Do you want to continue with the removal of [y,n,?]
One solution to avoid propagating packages to non-global zones would be using the -G pkgadd flag, which Blastwave packages use indirectly, and this can be achieved by setting the ADMINFLAG variable:
export ADMINFLAG=' -G'
Thanks to some suggestion by the LQ guys, I also discovered that, to comply with Solaris/SVR4 standards, Blastwave CSW packages should (but don't) separate configuration files by providing the /var/opt/csw and /etc/opt/csw directories.

The solution I chose was creating a non-global zone to install Blastwave's software and loopback mount /opt/csw in the other zones. I then created a sparse zone and installed all the Blastwave's packages I needed there. The last thing I had to do was loopback mounting the non-global zone's /opt/csw directory into the global zone (to give desktop users access to the software) just adding this line in /etc/vfstab:
/export/home/zones/blastwave/root/opt/csw - /opt/csw lofs - yes
Blastwave's packages are now isolated in their zone and management is straightforward via Blastwave's pkg-get command.


Configuring Squid web proxy server on Solaris Express Developer Edition 01/08

Even if it really is a production machine, it's running Solaris Express Developer Edition 01/08. I decided to deploy a web proxy to save and control access to the network bandwith of my office and started looking for Sun Microsystem's solution: Sun Java System Web Proxy Server. Before downloading, I started to read the official documentation at Sun documentation center when I discovered that Solaris Express Developer Edition 01/08 ships with Squid.

I decided to spare a download and (yet another) setup giving Squid a try. Starting and configuring the service was really easy. The service is disabled by default and can be started with the SMF command:

# svcadm enable svc:/network/http:squid

Before doing that, you must configure Squid. I'm now just testing with the default values but at the very least you must grant access to the client machines. Squid configuration file is not complicated and, with the help of some googling (for example, this old O'Reilly article), I just ended up defining an ACL and granting access to it. I opened Squid configuration file, /etc/squid/squid.conf, with my favorite editor (vi) and added the following lines:

acl our_networks src 192.168.0.0/24
http_access allow our_networks

just before the last "deny all the rest" directive,

http_access deny all

The first line just defines an acl for my entire office network, which happens to be 192.168.0.0/24 and the second line grants HTTP access to all clients on that range. I then started Squid and tested that it worked examining its access log file, /var/squid/logs/access.log. If you see lines like this:

1208657695.111 239 192.168.0.128 TCP_MISS/304 255 GET http://www-cdn.sun.com/share/metrics/metrics_group1.js - DIRECT/87.248.220.12 text/javascript

it means that Squid is serving an unmodified page from its cache. The HTTP 304 status code indicates indeed that a "Not modified" page has been requested.

Thursday, 17 April 2008

The 7 Habits of Highly Effective People who are Linux Users

I once read a book called "7 Habits of Highly Effective People" by Stephen Covey which explains the qualities that a person has to imbibe to be highly successful in life. It is a great book which provides inspiration to people to act and make positive changes in their lives.

Guess what, Rami Taibah has compiled a set of 7 habits that Linux users can use to be highly effective which makes a great read. The list goes as follows :
  1. Never login as root - This is redundant if you are using a Linux distribution such as Ubuntu which uses sudo to elevate a user temporarily to super user mode. Nevertheless a valid point.
  2. Properly name your files - I usually stick with that but even if you have spaces in the names of your files, bash completion helps you in getting the names of the files right.
  3. Place /home in its own partition - I concur with that wholeheartedly. Read this article to know more about partitions.
  4. Proper crash management - Use xkill and the likes to close a misbehaving application.
  5. Try out multiple distributions - You have got a whole lot of them to choose from.
  6. Brush up your command line skills - Learn to use command line tools to accomplish complex tasks. It is a big time saver. Don't forget to pick up some bash scripting skills on the way.
  7. And finally, always be ready to unleash the power within - in other words experiment.

Tuesday, 15 April 2008

HP 2133 sub-notebook powered by Linux

When Asus rolled out the eeePC, it received rave reviews. Now it is the turn of HP to jump into the sub-notebook market. HP has unveiled a laptop with 8.9" high resolution WXGA display, 92% full size QWERTY keyboard and touch pad. It comes with an optional solid state drive, weighs just 1.19 KG and is just 1.05 inches thick.



HP 2133 Sub Notebook Specification
  • VIA C7-M ULV processor
  • 512 - 1 GB 667 MHz DDR2 SDRAM
  • 120 - 160 GB SATA hard drive
  • USB 2.0 ports - 2 Nos
  • VGA External monitor port
  • Audio in/ Microphone Jack
  • Audio out/ Headphone Jack
  • Express Card 54 Slot
  • SD Card slot
  • RJ-45 network jack
  • 1 AC Power connector
  • Kensington Lock slot
  • VGA webcam (Optional)
  • Stereo speakers and
  • Stereo microphones and
  • is wireless enabled
It's all aluminium case makes it sleek, sturdy and lightweight. HP has targeted this sub-notebook at the education segment namely the students and it will compete directly with other sub-notebooks such as Asus eeePC. The HP 2133's price starts at US $499.


A video of HP 2133 Sub-Notebook - Courtesy: Notebook.com


But the one thing which excites me the most is that HP sells this sub-notebook with SuSE Linux Enterprise Desktop 10 as an option.

Xavier has written an indepth review of this eye catching notebook with plenty of pictures to supplement his narration.

Monday, 14 April 2008

Adobe AIR for Linux - An Overview

If you had anything to do with software development, you may be familiar with the saying - "Develop once and run on any platform". This quote was made popular by Sun Microsystems when it created the Java language. Any application developed using Java can be compiled on any platform and made to run on any other platform without any recompilation. In other words Java applications are OS and architecture independent as long as there is a Java runtime environment (or JRE) installed on the targeted platform in which you decide to run the application.

When I first read about Adobe AIR, the one thing that struck me was its similarity with JRE. But if you negate the "compile once run anywhere" aspect, there is little in common between Adobe AIR and Java (JRE). Adobe AIR is a runtime environment which allows rich internet applications developed using HTML, JavaScript, Flash or Flex to be deployed on the client machines and to run them seamlessly.

The advantage for the end user is that he can install and run an AIR application irrespective of the type of OS he uses as long as he has Adobe AIR installed on his machine.

Two weeks back, Adobe released a version of Adobe AIR for Linux. While this is cause for much rejoicing, the package is still in alpha stage and is not feature complete. More over, there are a few prerequisites in installing Linux version of AIR, them being :

Fig: Adobe AIR installation setup for Linux

Fig: Installing an AIR application
  • Officially, it can be installed only on the following Linux distributions : Red Hat Enterprise Linux, SuSE and Ubuntu. But since Ubuntu is derived from Debian, I presume, Debian users can also install it on their machine (I haven't checked). And so should numerous other Linux distributions derived from Debian.
  • AIR currently supports only Gnome or KDE desktop environments.
  • Only RPM and Debian package management systems are supported.
  • There is support for transparency in AIR applications but you have to enable Compiz or equivalent compositing window managers.
I was able to install Adobe AIR on my machine running Ubuntu Gutsy and it was a seamless process. The runtime installer is a binary file for which I had to give executable privileges. Double clicking on it started the installation process. Once it was finished, I was able to install AIR applications on Linux in the same way you install software on Windows. AIR application setups all have a '.air' extension and they are owned by Adobe AIR. You can also uninstall the application by running the installer again. In Ubuntu, the AIR applications are installed in the /opt directory by default though you can provide an alternate path too.

Fig: An RSS reader AIR application running on Ubuntu

Adobe AIR for Linux alpha will expire on March 1st 2009 but a final Linux version of AIR which is at par with the ones on Windows and Mac can be expected some time in the second half of this year.

Linux version of Adobe AIR does not run all AIR applications yet. A list of AIR applications which are known to run on Linux can be found here.

Wednesday, 9 April 2008

How to Create Dropdown Menu

What is dropdown menu?
Dropdown menu is like this :



Here is the trick how to create dropdown menu :

Copy the code below and put it on your page elements.


<select onChange="document.location.href=this.options[this.selectedIndex].value;">
<option value="0" selected>Blog Archive</option>
<option value="Links 1">Text 1</option>
<option value="Links 2">Text 2</option>
</select>

The red text is links, change it with your links.
The blue text is Anchor text. Yau must change it.

For example :


<select onChange="document.location.href=this.options[this.selectedIndex].value;">
<option value="0" selected>Blog Archive</option>
<option value="http://trick-blog.blogspot.com/2008/02/tutorial-to-create-dtree-menu.htmll"> How to Create Dtree Menul </option>
<option value="http://trick-blog.blogspot.com/2008/01/how-to-create-search-engine-in-blogger.html"> How to Create Search Engine </option>
</select>

The result would be like this:



To add more menu/item, put a code like below

<option value="Links 3">Text 3</option>

before this code </select>

If you want the links opened in new window, change the code below

<select onChange="document.location.href=this.options[this.selectedIndex].value;">

with this code ::

<select onchange="javascript:window.open(this.options[this.selectedIndex].value);">

The resul would be like this:



How to Create Dropdown Menu

What is dropdown menu?
Dropdown menu is like this :



Here is the trick how to create dropdown menu :

Copy the code below and put it on your page elements.


<select onChange="document.location.href=this.options[this.selectedIndex].value;">
<option value="0" selected>Blog Archive</option>
<option value="Links 1">Text 1</option>
<option value="Links 2">Text 2</option>
</select>

The red text is links, change it with your links.
The blue text is Anchor text. Yau must change it.

For example :


<select onChange="document.location.href=this.options[this.selectedIndex].value;">
<option value="0" selected>Blog Archive</option>
<option value="http://trick-blog.blogspot.com/2008/02/tutorial-to-create-dtree-menu.htmll"> How to Create Dtree Menul </option>
<option value="http://trick-blog.blogspot.com/2008/01/how-to-create-search-engine-in-blogger.html"> How to Create Search Engine </option>
</select>

The result would be like this:



To add more menu/item, put a code like below

<option value="Links 3">Text 3</option>

before this code </select>

If you want the links opened in new window, change the code below

<select onChange="document.location.href=this.options[this.selectedIndex].value;">

with this code ::

<select onchange="javascript:window.open(this.options[this.selectedIndex].value);">

The resul would be like this:



Thursday, 3 April 2008

Free Unlimited File Hosting Service

If we have a web/blog especially about downloading like mp3, video, ebook etc, it’s need a webhost to put these files, and usually we like a free webhosting rather than paying. But there are some problems/limitations if we chose a free file hosting like :Bingung Cari Tempat Hosting Gratis Dan Unlimited?

- Limited capacity/storage.
- No store big files bigger than 5 MB (Usually).
- traffic limitation (base on time)
- etc.

Now I have a solution to solve the problems. Try to use ziddu. ziddu is one of the free unlimited file hosting service. What will you get from ziddu? here is :

- Unlimited storage, (you can upload your files as much as possible).
- maximum file size to uploaded is 200 MB (it’s big enough)
- No huorly traffice limitation.
- Get paid everytime others download your files.
For the last poin, is it true that we will get paid everytime others download files?
Yes, it’s 100% true. You will get paid $0.001 per unique download. Cash will be transfered via paypal.

If you interesting SIGN UP HERE

Free Unlimited File Hosting Service

If we have a web/blog especially about downloading like mp3, video, ebook etc, it’s need a webhost to put these files, and usually we like a free webhosting rather than paying. But there are some problems/limitations if we chose a free file hosting like :Bingung Cari Tempat Hosting Gratis Dan Unlimited?

- Limited capacity/storage.
- No store big files bigger than 5 MB (Usually).
- traffic limitation (base on time)
- etc.

Now I have a solution to solve the problems. Try to use ziddu. ziddu is one of the free unlimited file hosting service. What will you get from ziddu? here is :

- Unlimited storage, (you can upload your files as much as possible).
- maximum file size to uploaded is 200 MB (it’s big enough)
- No huorly traffice limitation.
- Get paid everytime others download your files.
For the last poin, is it true that we will get paid everytime others download files?
Yes, it’s 100% true. You will get paid $0.001 per unique download. Cash will be transfered via paypal.

If you interesting SIGN UP HERE

Tuesday, 1 April 2008

Tip : Quickly open special locations in Nautilus

It is really amazing that in many ways than one, it is the open source software developers who are in the forefront of innovation the most. If you ask me, one reason may be because they listen to the end users more than any proprietary software developers. Secondly, the open source programmers are not tied down by the bureaucratic hurdles that weigh down on their closed source counterparts. But in my opinion, the most pertinent reason is that creating open source software is purely a labour of love - a love of coding and creating something of real value to themselves and to others.

Take Nautilus file manager for instance, it has a plethora of hooks built in which allow a user to navigate to different locations by just typing in a name. For example, to get network locations, you type in network:/// in the location bar of nautilus.

There are a number of such shortcuts which allow an end user to navigate to different locations with ease. Shankar has compiled a set of nautilus shortcuts which throw light on the in-built versatility of Nautilus.