jump to navigation

Share folders between Windows host and Linux guest in VirtualBox September 15, 2009

Posted by razasayed in Uncategorized.
Tags: , ,
1 comment so far

1. Start the Linux virtual machine. If you have Guest Additions installed go to step 5 directly.
2. Click on the Devices menu and choose Install Guest Additions…
3. Now, run the following commands as root at the terminal.

 cd /media/cdrom0

Note: The VBoxLinuxAdditions.run file may be called VBoxLinuxAdditions-x86 or something similar on your system. So, please verify before you execute the file.
4. Reboot the virtual machine
5. From the Devices menu, choose Shared Folders… and add any folder or drive from your Windows host. Make sure that the Make Permanent checkbox is ticked . For example, add D:\VirtualBoxShared with the name VirtualBoxShared.
6. Now, on your Linux guest create the directory to mount your shared folder from Windows on. For example,say a user foo,wants to mount the shared folder from Windows on /home/foo/vbox_shared . So, on your Linux guest run the following command at the terminal.

mkdir /home/foo/vbox_shared

7. Now, we need to mount the shared folder from the Windows host i.e. D:\VirtualBoxShared on the folder in the Linux guest we created in the previous step i.e. /home/foo/vbox_shared . To do that run the following command as root on the terminal.

mount.vboxsf VirtualBoxShared /home/foo/vbox_shared

Note: mount and vboxsf are separated by a period.
8.But, there is a problem . If you now reboot the virtual machine, the shared folder wont be accessible, as the mount is valid only for the current session.So,to mount the shared folder every time your Linux guest boots, edit the file /etc/rc.local and put the following line at the start:

mount.vboxsf VirtualBoxShared /home/foo/vbox_shared

Voila !, you now have a folder shared between your Windows host and Linux guest with full read write access from each ! 🙂

Master Foo and Unix December 25, 2008

Posted by razasayed in programming.
Tags: , ,
add a comment

The Unix operating system has been greatly influenced by the Zen philosophy . A “Koan” is a puzzling, often paradoxical statement or story, used in Zen Buddhism as an aid to meditation and a means of gaining spiritual awakening.The  Rootless Root has some wonderful unix koans which is a must read . These koans would help you find the way. And, if  you mock at them you’ll lose merit and be reborn as beasts or MCSE/MCSD/MCTS etc 😉 . Here are a couple of samples .

1. Master Foo and the Graphical User Interface

One evening, Master Foo and Nubi attended a gathering of programmers who had met to learn from each other. One of the programmers asked Nubi to what school he and his master belonged. Upon being told they were followers of the Great Way of Unix, the programmer grew scornful.
“The command-line tools of Unix are crude and backward”, he scoffed. “Modern, properly designed operating systems do everything through a graphical user interface”.
Master Foo said nothing, but pointed at the moon. A nearby dog began to bark at the master’s hand.
“I don’t understand you!” said the programmer.
Master Foo remained silent, and pointed at an image of the Buddha. Then he pointed at a window.
“What are you trying to tell me?” asked the programmer.
Master Foo pointed at the programmer’s head. Then he pointed at a rock.
“Why can’t you make yourself clear?” demanded the programmer.
Master Foo frowned thoughtfully, tapped the the programmer twice on the nose, and dropped him in a nearby trashcan.
As the programmer was attempting to extricate himself from the garbage, the dog wandered over and piddled on him.
At that moment, the programmer achieved enlightenment

Heres one more 🙂 . Master Foo and the Script Kiddie

A stranger from the land of Woot came to Master Foo as he was eating the morning meal with his students.
“I hear y00 are very l33t”, he said. “Pl33z teach m3 all y00 know”.
Master Foo’s students looked at each other, confused by the stranger’s barbarous language. Master Foo just smiled and replied: “You wish to learn the Way of Unix?”
“I want to b3 a wizard hax0r”, the stranger replied, “and 0wn ever3one’s b0xen”.
“I do not teach that Way”, replied Master Foo.
The stranger grew agitated. “D00d, y00 r nothing but a p0ser”, he said. “If y00 n00 anything, y00 wud t33ch m3”.
“There is a path”, said Master Foo, “that might bring you to wisdom”. The master scribbled an IP address on a piece of paper. “Cracking this box should pose you little difficulty, as its guardians are incompetent. Return and tell me what you find”.
The stranger bowed and left. Master Foo finished his meal.
Days passed, then months. The stranger was forgotten.
Years later, the stranger from the land of Woot returned.
“Damn you!” he said, “I cracked that box, and it was easy like you said. But I got busted by the FBI and thrown in jail”.
“Good”, said Master Foo. “You are ready for the next lesson”. He scribbled an IP address on another piece of paper and handed it to the stranger.
“Are you crazy?” the stranger yelled. “After what I’ve been through, I’m never going to break into a computer again!”
Master Foo smiled. “Here”, he said, “is the beginning of wisdom”.
On hearing this, the stranger was enlightened.

And finally for all the programmers out there, The Tao Of Programming is a must read !

Thus spake the master programmer:

“It is time for you to leave.”

Windows mimicking Linux ? November 25, 2008

Posted by razasayed in general.
Tags: ,
1 comment so far

Came across this screenshot of Windows 7 . Doesnt the desktop bear an interesting resemblance to KDE 3 ?

Also , heres a screenshot of Windows PowerShell running on a Windows 7 machine . Linux users have always enjoyed a powerful command line and Windows PowerShell , is Microsofts attempt to provide a powerful command line interface to Windows . However,as the below screenshot suggests there seems to be more in common 😉

Dont Preach Linux. Just Mention it ! October 9, 2008

Posted by razasayed in general.
add a comment

Im a big fan of GNU/Linux , but if there is one thing that is a huge turn off for me , is seeing some people preach Linux, as if its a religion . These people bash those who use Windows . They allege Windows users to be “Sheep” and refer to Microsoft as “M$” or “Windoze”, which i think more often than not is plain bragging.

But i think this reflects bad on the Linux community , and by forcing people to convert to Linux we might end up intimidating them and hurting their sentiments which might result in them rejecting or even hating it.  I think , a person who has been using Windows all the time will switch over to an entirely new OS, not if it is forced upon him, or if he is ridiculed for using the system he uses, but only if he is truly convinced that the new operating system would work for him .

Here is a nice blog post , i came across which highlights this issue : http://dogbuntu.wordpress.com/2008/07/27/dont-preach-linux-just-mention-it/

So, lets invite people to Linux , instead of ridiculing them for using Windows . We dont need religious zealots , to each one his own…..Free as in freedom 😉 .

Code::Blocks, a good C/C++ IDE for Linux October 2, 2008

Posted by razasayed in programming.
Tags: ,

Just some time back my brother who was using a Linux machine, asked me how he could do C/C++ development on that platform . Most colleges here in Mumbai teach students how to use the Borlands Turbo C++ IDE, a.k.a TC which i think by now is pretty outdated and can well be classified as an antique piece of software . Also, its a Windows only program , and when it comes to C/C++ programming on “Windows” most students never look beyond “toy” programs like prime numbers, factorial, matrix operations etc and use Microsoft Visual Studio for doing GUI stuff.

I think Linux is a good platform for budding C/C++ developers to hack on , where C/C++ are still the main “programming” languages used by developers , in addition to “scripting” languages like Python , PHP etc..

While there are numerous alternatives for C/C++ programming on Linux as far as IDE’s are concerned , for example, Eclipse , Anjuta , KDevelop etc, Code::Blocks according to me appears to be a really easy to use and lightweight IDE . Also just like Eclipse, Code::Blocks is also plugin based, and supports a lot of cool features we expect out of IDE’s like integrated debugger ,syntax highlighting, code completion , class browsers etc..

To install Code::Blocks on my bros machine running Ubuntu i performed the following procedure :

Step 1) Code:Blocks requires the wxWidgets , a cross-platform C++ GUI toolkit to be installed, so first install that by issuing the following command at the terminal :

sudo apt-get install libwxgtk2.8-0

Step 2) Download the Code::Blocks binary for Ubuntu from http://www.codeblocks.org/downloads/binaries

Step 3) Unzip the archive. Now , you will get a set of deb files.

Step 4) Finally, run the following command to install :

sudo dpkg -i *.deb

Thats it . You should now see the icon for Code::Blocks in your Programming Menu.

Note : I was facing some issues while trying to build gtk+ programs in Code::Blocks v8.02 , inspite of having the libgtk1.2-dev package installed .  However, the problems were resolved once i installed the libgtk2.0-dev package .

Happy Hacking ! 🙂

Linus uses Fedora August 18, 2008

Posted by razasayed in general.
add a comment

I recently came across an interesting interview of Linus Torvalds, where he says that the distro he uses is Fedora Core 9 . Being a person who has a very specialized area of work i.e. the Linux kernel, he says he doesnt care much about distros as long as they are easy to install and use, so that he can focus on his core line of work instead of bothering with the rest of the details.

He also added that as far as user friendliness goes there are others also like Ubuntu, and now Debian also, but the reason he uses Fedora is purely historic as it had good support for PowerPC back when he was using one.

You can check out the interview at http://www.simple-talk.com/opinion/geek-of-the-week/linus-torvalds,-geek-of-the-week/.

Hope u enjoy reading it 🙂

In the beginning was the command line…. August 3, 2008

Posted by razasayed in general.
Tags: , ,
add a comment

I stumbled across an interesting piece of essay called “In the beginning was the command line” by Neal Stephenson . It deals with the ongoing clash between proprietary and free software and also analyzes the corporate/collective culture of the Microsoft, Macintosh, and free software communities .

This book was published in 1999, even before Mac OS X came out, so it does not deal with things as they are today, but it does induce some nostalgia in the reader by offering an interesting glimpse into the past of proprietary and free software  . I havent read it completely yet, but its been pretty engrossing so far 🙂

This essay has been published in the form of a book, and has also been made available online for free download .To whet your appetite , you can check out the Wikipedia entry for the book.

To download it visit http://www.cryptonomicon.com/beginning.html

Access the GPRS service of your cellphone on a Linux machine via bluetooth July 16, 2008

Posted by razasayed in Hacks, programming.
Tags: ,
add a comment

Sometimes when im on the move and also there is no wifi nearby I find it convenient to access the Internet using the GPRS service on my phone . And even more convenient is accessing the same on my laptop. So,here are four simple steps for using the GPRS service of your cellphone on your Linux box via bluetooth. Actually, as they say in Linux “theres more than one way to do it “, there could be other ways of going about this, but this one works for me (and also the only one i tried 😉 ). So here we go…

Step 1) Make sure you have the bluez-utils package installed . If your bluetooth dongle is recognized as soon as you plug it in then you already have this package installed. If not install it from synaptic or by using the following command.

sudo apt-get install bluez-utils

Step 2) Plugin the bluetooth dongle and activate the bluetooth on your mobile.

Step 3) Now, the first time you setup your Linux machine to access the GPRS service on your mobile phone via bluetooth, there are quite a few steps involved , so i wrote a simple shell script for automating the connection setup. Now all that needs to be done is run this script , and voila !, our connection is ready 🙂 .

You can access the script over here. Save it as connect_gprs.sh on your machine . After you run this script , minimize the terminal window where this script is running. To disconnect press Ctrl-C at the terminal.

Step 4) Now, in your browser, assuming you are using Firefox, go to Tools->Options->Advanced->Network. Click on Settings. Then from the menu select Manual proxy configuration . And enter the value for the Http Proxy and Port . Since you are following this tutorial, i assume you already have the GPRS service on your phone . And in that case you can get the values for the Http proxy and port by looking at the access point settings on your phone.

Thats it . Have fun 🙂

Bill recommends Ubuntu July 12, 2008

Posted by razasayed in general.
Tags: ,
add a comment

Hey,this is top secret stuff, but anyways…. 😉

Making Compiz effects of Hardy work with Via Graphics Chip June 6, 2008

Posted by razasayed in Hacks.

I recently got my hands on Ubuntu v8.04 (Hardy Heron) and installed it on my laptop . However, i was disappointed to see that the compiz effects were not working . Also, there were other problems like doing a log off just gave me a black screen and i had to manually reboot my machine.

The reason was my Via Chrome9 HC IGP graphics chip which is not directly supported by Linux, and requires proprietary drivers provided by Via to be installed .  So , after some googling around for the solution and a lil bit of hacking on my part i finally got it to work . So, here im posting the steps i followed :

Step 1) Download the chrome9.83.40558 driver from Via Linux Portal.

Step 2) Install the driver.

But, after installing the driver, when i restarted X-server (Ctrl+Backspace), i just got an orange screen with yellow stripes and a bigger than normal mouse cursor. The desktop just wont come up.

So, the next steps were…

Step 3) In xorg.conf (located in /etc/X11) , under the “Screen” section , add a new subsection  “Display” as follows :

Section “Screen”

SubSection “Display”

Modes “1280×800″
Virtual 1280 800

Depth 24



Step 4) Now save the file and reboot your machine or restart X.

Thats it ! . The via drivers were successfully installed and all the display problems which i was facing earlier were gone and the compiz effects now worked like a charm.

I hope this works for you too 🙂 .