Randomness

Hello world!

Yamaha Oak Custom, Silver Sparkle

Yamaha Oak Custom, Silver Sparkle

Yamaha Oak Custom, Musashi Black

Tags:

A Google Analytics buster?

Woopra, now in beta.

Using openfiler with vmware infrastructure.

FOSSwire has a great reference sheet for Ubuntu.

Original article.

Updated for 8.04

********************************************************************

Privileges
sudo command – run command as root
sudo su – open a root shell
sudo su user – open a shell as user
sudo -k – forget sudo passwords
gksudo command – visual sudo dialog (GNOME)
kdesudo command – visual sudo dialog (KDE)
sudo visudo – edit /etc/sudoers
gksudo nautilus – root file manager (GNOME)
kdesudo konqueror – root file manager (KDE)
passwd – change your password


Display

sudo /etc/init.d/gdm restart – restart X (GNOME)
sudo /etc/init.d/kdm restart – restart X (KDE)
(file) /etc/X11/xorg.conf – display configuration
sudo dpkg-reconfigure -phigh xserver-xorg – reset X configuration
Ctrl+Alt+Bksp – restart X display if frozen
Ctrl+Alt+FN – switch to tty N
Ctrl+Alt+F7 – switch back to X display


System Services¹

start service – start job service (Upstart)
stop service – stop job service (Upstart)
status service – check if service is running (Upstart)
/etc/init.d/service start – start service (SysV)
/etc/init.d/service stop – stop service (SysV)
/etc/init.d/service status – check service (SysV)
/etc/init.d/service restart – restart service (SysV)
runlevel – get current runlevel
Package Management¹
apt-get update – refresh available updates
apt-get upgrade – upgrade all packages
apt-get dist-upgrade – upgrade Ubuntu version
apt-get install pkg – install pkg
apt-get remove pkg – uninstall pkg
apt-get autoremove – remove obsolete packages
apt-get -f install – try to fix broken packages
dpkg –configure -a – try to fix broken packages
dpkg -i pkg.deb – install file pkg.deb
(file) /etc/apt/sources.list – APT repository list
Network
ifconfig – show network information
iwconfig – show wireless information
sudo iwlist scan – scan for wireless networks
sudo /etc/init.d/networking restart – reset network
(file) /etc/network/interfaces – manual configuration
ifup interface – bring interface online
ifdown interface – disable interface
Special Packages
ubuntu-desktop – standard Ubuntu environment
kubuntu-desktop – KDE desktop
xubuntu-desktop – XFCE desktop
ubuntu-minimal – core Ubuntu utilities
ubuntu-standard – standard Ubuntu utilities
ubuntu-restricted-extras – non-free, but useful
kubuntu-restricted-extras – KDE of the above
xubuntu-restricted-extras – XFCE of the above
build-essential – packages used to compile programs
linux-image-generic – latest generic kernel image
linux-headers-generic – latest build headers
Firewall¹
ufw enable – turn on the firewall
ufw disable – turn off the firewall
ufw default allow – allow all connections by default
ufw default deny – drop all connections by default
ufw status – current status and rules
ufw allow port – allow traffic on port
ufw deny port – block port
ufw deny from ip – block ip adress
Application Names
nautilus – file manager (GNOME)
dolphin – file manager (KDE)
konqueror – web browser/filemanager (KDE)
kate – text editor (KDE)
gedit – text editor (GNOME)


System

Recovery – Type the phrase “REISUB” while
holding down Alt and SysRq (PrintScrn) with
about 1 second between each letter. Your system
will reboot.

lsb_release -a – get Ubuntu version
uname -r – get kernel version
uname -a – get all kernel information

My issues have been resolved.

Google is having issues with IMAP in Gmail. The fallback for now is the web interface.

Others are seeing the same thing, including premier subscribers.

IMAP broken

One person has reported that IMAP is fixed. I am not seeing this fix yet. UPDATE! Once I logged out and then back in, I could see the new interface again with IMAP enabled.

IMAP fixed

Here is the official Gmail blog, though there is no word yet about the outage.

Gmail blog

The Digg – nation has caught on.

digg.com

CentOS

Copy your eth0 config file located at /etc/sysconfig/network-scripts/
(you need to be root to do most of these commands)

cd /etc/sysconfig/network-scripts/
cp eth0 eth0:1

Now we need to edit this new file. You will need to …escape.. the colon. Neither eth0 or eth0:1 can be set by DHCP, you must setup a static address. The “HWADDR=” needs to be deleted from eth0:1 since it is the same physical device as eth0.

vi eth0\:1
DEVICE=eth0:1
BOOTPROTO=static
BROADCAST=192.168.0.255
IPADDR=192.168.0.5
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes
TYPE=Ethernet

Now you should be able to issue the ifup <device> command to bring up the virtual device and confirm with an ifconfig.

ifup eth0:1
ifconfig

Ubuntu

================================================

UNFINISHED
WILL UPDATE SOON.

This was taken from Abby Workshop with the intention of modifying it for both OSX and Ubuntu if needed.

===============================================

This Subversion cheat sheet was created during the initial setup of Subversion on Apache 2.0 on Windows and Mac OS X. A detailed tutorial covering most of the features of Subversion can be found in the online Subversion book. However, to make Subversion more useful for me, I created this Readers’ Digest version.

Create a Repository

To store projects in Subversion, first you must create a repository. This must be done to a local drive on a local machine. Creating a repository on a network drive is not supported. To create a repository type:

UNIX

svnadmin create /path/to/repository

Windows

svnadmin create d:/path_to_repository

By default this sets up a Berkeley database to store the repository. Individual projects should be created as subdirectories of the repository directory (see the next section). Notice that the Windows version includes a drive letter, but also uses forward slashes instead of back slashes. The forward slashes are required even on Windows.

Add a New Project – svn import

To add a project, the Subversion documentation suggests that you create a directory structure like the following:

Picture of the Directory Structure

A root project directory contains three subdirectories, branches, tags, and trunk. Your files and directories are stored under the trunk directory.

Create the directories as described. Assuming the project directory is a subdirectory of the current directory, you would enter the following command

UNIX

svn import project file:///repository_name/project -m "First Import"

Windows

svn import project file:///d:/repository_name/project -m "First Import"

Network

svn import project http://host_name/svn_dir/repository_name/project -m "First Import"

Notice the Network example includes an svn_dir. This assumes you are using Apache 2.0 and the Subversion modules. When setting up Subversion on Apache, a virtual directory is created on the server that points to your repository directory. More information on Apache 2 setup is described later in this document.

This creates the initial project which you can work from. To get the files under version control, you must checkout a project to begin working on it.

Checking Out a Project – svn checkout

To start using the version control features check out a project into your local working directory. This is done with the following command:

UNIX

svn checkout file:///repository_name/project/trunk project

Windows

svn checkout file:///d:/repository_name/project/trunk project

Network

svn checkout http://host_name/svn_dir/repository_name/project/trunk project

In these examples, project is the name of the directory where you want to store the checked out project on your local file system.

Getting a List of Projects – svn list

To get a list of the current projects stored in a repository, you can use the following command.

UNIX

svn list --verbose file:///repository_name/project

Network

svn list --verbose http://host_name/svn_dir/repository_name/project

This will show you a list of each project directory in that repository.

Reviewing Changes – svn status

To see what files you have changed or added to your checked out work, use the update command:

UNIX

svn status

This command will give you a listing of new files, files that have been changed, and files that have been deleted. New files or deleted files must be added or removed using the add and delete commands (see more below.)

Adding New Files and Directories – svn add

When you add a new file or directory to a project that has been checked out, you must tell Subversion to include that file or directory in its version control.

UNIX

svn add file_or_dir_name

Adding a directory will add the directory and all the files and directories in it. However, this does not add the file or directory to the repository, you must still issue a commit to update the repository.

Deleting Files and Directories – svn delete

If you can add, you can also delete. If you wish to remove a file your directory from be versioned, you use the delete command:

UNIX

svn delete file_or_dir_name

Like add, you must perform a commit before the file is actually deleted from the repository.

However, the delete command does have another option not found in add. With the delete command you can remove files or directories from the repository. For example, the following command would remove a project and all the files under it.

Network

svn delete -m "Deleting project dir" http://localhost/svn_dir/repository/project_dir

This version of the command comes in particulary useful if someone has accidently imported files into the wrong place (I wouldn’t know about that myself of course.)

Committing Changes – svn commit

Once you have added, deleted, or changed files or directories, you can then commit those changes to the repository. This command is pretty straightforward:

Network

svn commit -m "Saving recent changes" http://localhost/svn_dir/repository/project_dir

Updating Your Local Files – svn update

If you have a set of files checked out and would like to update them to the most recent version of files in the repository, use the update command.

Network

svn update

If there are newer files in the repository, they will overwrite any files you have locally. Before using this command, you may want to use the svn diff command to find out what the differences are between your local files and the repository.

Tagging Projects or Creating Project Specific Versions

Subversion does not track the version numbers for individual projects automatically. Instead, it tracks each update to the repository and tracks the versions of these updates. To create interim project releases, you must create “Tags” which identify a specify version of a project. This is done by making a virtual copy of a project in the tags directory. For example:

svn copy http://host_name/repos/project/trunk http://host_name/repos/project/tags/0.1.0 -m "Tagging the 0.1.0 release of the project"

This creates a sort of bookmark or snapshot which records the current state of the project. Then, you can checkout the project in this state at any time by simply referring to that release number.

To get a list of the releases for a project.

svn list http://192.168.0.4/svn/repos/prj1/tags
0.1.0/

Then to check out a release you would type:

svn list http://192.168.0.4/svn/repos/prj1/tags/0.1.0

A  0.1.0\dir1

A  0.1.0\dir1\file3

A  0.1.0\dir1\file4

A  0.1.0\file1

A  0.1.0\file2

A  0.1.0\textfile.txt

A  0.1.0\file3

 	Checked out revision 13.

Since the project has been saved in the tags directory. Release 0.1.0 can be retrieved at any time in the future.

Basic Apache Setup

You must use Apache 2.0 to install Subversion. Just compile and copy or copy the Subversion Apache module into the Apache modules directory. The following two files must be uncommented or added to the httpd.conf file:

		LoadModule dav_module         modules/mod_dav.so

 	LoadModule dav_svn_module     modules/mod_dav_svn.so

Next, you must setup a location directive in the httpd.conf file to associate a directory with Subversion repositories. This example uses the SVNParentPath setting to point to a parent directory which contains repository subdirectories. This is convenient as it allows you to add as many repositories as you need without having to restart Apache or modify the httpd.conf file.

		<Location /svn>

 		DAV svn			# All repos subdirs of d:/svn

 		SVNParentPath D:/svn

 	</Location>

Note:When using Fink to install Subversion on Mac OS X, the Subversion Apache module is stored in the Fink package listing with the prefix: libapache2. The package full name is libapache2-mod-svn. If you are using Fink, it will automatically install the modules into the correct directory.

General Notes

Below are a list of notes from initial setup and testing.

  • Subversion versions the repository, not individual projects. For example, I have two projects, project 1 and project 2, and check out each project when the current repository version is 3. I make changes to each project and commit those changes back to the repository. For each change, the revision number is incremented in the repository and its current version is now 5. The current revision of each project will also be 5 as they have no separate revision number.
  • To setup the Subversion module on Apache for Windows, I had to give the Apache Service access to the local file system. This is done on Windows by setting up a login account for the service. Setup an account in the Users application in Control Panel, make sure to set the password. Once this is done, go to the Services tool in Control Panel. Change the login for the Service to the account you created. XP will automatically give the Login as a Service privilege to the account (the OS must do this as the tools are not available XP Home, only in XP Pro). Once you do this and start and stop the Apache Service, you should be able to read and write to the repository directories. Note: Setting up a log in account for a Service can create a security hole. Consider your security requirements before doing this.
  • Individual files and directories that did not exist during the initial import, must be added individually using the svn add command.

This was copied from the Johnny Chadda blog.

=================================

 

When you are out traveling or just at work, the need sometimes arises when you have to access your computer at home. This article will show you how to access your computer in a simple and secure way. The article is focused on Ubuntu, but can just as well be used with the remote desktop features of Windows XP.

We first of all want to create a secure channel between your current computer and your machine at home, and what better tool for the job than OpenSSH. In Ubuntu, you may install the SSH server by installing the packet called “openssh-server” like so:

sudo apt-get install openssh-server

This will enable remote connections into your computer on port 22, which is the standard SSH port. If your computer sits behind a router, you must forward the port to the computer from the router.

The next step is to enable the remote desktop facilities of the Gnome desktop in Ubuntu, by opening the “System” menu, “Preferences” and then selecting “Remote desktop”. You will be presented with a dialog like the following:

gnome-vnc.png
The options are self-explanatory, and since you will be connecting to it when you yourself are not around, be sure to untick “Ask you for confirmation”. This will start the VNC server at port 5900, which you should not expose to the internet. Instead, here is where SSH comes into play.

The primary purpose of SSH is to allow secure text-based remote management capabilities to servers. It can however tunnel arbitrary traffic over it too, and VNC traffic is of course not an exception. The endpoint should be to be able to connect to port 5900 which runs the VNC server, so we need to tell SSH to create a tunnel from the current computer to the home computer and then on to the VNC server. Let’s select port 50000 for the start of the tunnel, but it can be any free port between 1024 and 65535. If you are fortunate enough to be running Linux on your work computer, connect to your home computer using the following command:

ssh -l username -L 50000:localhost:5900 your.home.pc

Let’s take a minute to analyze this command. You issue the ssh command, and -l lets you specify which user-name to connect as. -L is the magic part where we specify endpoints of our SSH tunnel. The tunnel starts at port 50000 of the local computer, then travels to the SSH server on the other side. It then looks at the endpoint which is localhost port 5900, which happens to be the VNC server! The last part is to specify a host-name or IP-address to your home computer. It can of course also be done in Windows using the popular PuTTY terminal:

putty-host.png

putty-forward.png

On the first screenshot we specify which host to connect to, and the tunnel is set using the tunnel settings. The screenshots should be self-explanatory. Just don’t forget to click the add button to actually enable the tunnel.

After logging into the server either using a Linux or Windows machine, the time has come to actually try this out by connecting a VNC client to the server. Ubuntu users have a VNC client installed under “Applications” – “Internet” – “Terminal Server Client”, and Window users may for example download UltraVNC viewer. If you don’t want to install anything, choose the “Ultr@VNC Standalone Viewer” package, which only contains a zipped viewer.

To connect, we only need to specify the start of the SSH tunnel and it should take the data to its destination automatically.

ultravnc.png

Connect to localhost port 50000 like we specified for the start of the tunnel earlier. Notice the extra colon – we need to write this way since we are not connecting to a particular display. Remember to set the quick options in UltraVNC to “MEDIUM” if you have slow connection to make the interface relatively snappy and useful.

Click connect, and if everything works you should be prompted for the password you specified when configuring the VNC server earlier.

The SSH tunnel can of course also be used to secure Windows Remote Desktop access. It uses port 3389 by default and you might not have an SSH server running on a Windows client, but perhaps you have another Linux machine on your network? In that case, you can connect to the Linux server using SSH and set the endpoint of the tunnel to your Windows client. The following is an example in the Linux SSH notation:

ssh -l username -L 50000:192.168.0.10:3389 my.home.linux.server.pc

It works just like before, but instead of just looping the connection to localhost, it will forward the connection to 192.168.0.10 port 5900 on your network, and if that happens to be your Windows client you should be able to connect.

Linux.com

Everything Linux and Open Source

Turn Vim into a bash IDE

June 11, 2007 (9:01:00 PM) – 4 months, 3 weeks ago By: Joe ‘Zonker’ Brockmeier

By itself, Vim is one of the best editors for shell scripting. With a little tweaking, however, you can turn Vim into a full-fledged IDE for writing scripts. You could do it yourself, or you can just install Fritz Mehner’s Bash Support plugin.

To install Bash Support, download the zip archive, copy it to your ~/.vim directory, and unzip the archive. You’ll also want to edit your ~/.vimrc to include a few personal details; open the file and add these three lines:

let g:BASH_AuthorName   = 'Your Name'
let g:BASH_Email        = 'my@email.com'
let g:BASH_Company      = 'Company Name'

These variables will be used to fill in some headers for your projects, as we’ll see below.

The Bash Support plugin works in the Vim GUI (gVim) and text mode Vim. It’s a little easier to use in the GUI, and Bash Support doesn’t implement most of its menu functions in Vim’s text mode, so you might want to stick with gVim when scripting.

When Bash Support is installed, gVim will include a new menu, appropriately titled Bash. This puts all of the Bash Support functions right at your fingertips (or mouse button, if you prefer). Let’s walk through some of the features, and see how Bash Support can make Bash scripting a breeze.

Header and comments

If you believe in using extensive comments in your scripts, and I hope you are, you’ll really enjoy using Bash Support. Bash Support provides a number of functions that make it easy to add comments to your bash scripts and programs automatically or with just a mouse click or a few keystrokes.

When you start a non-trivial script that will be used and maintained by others, it’s a good idea to include a header with basic information — the name of the script, usage, description, notes, author information, copyright, and any other info that might be useful to the next person who has to maintain the script. Bash Support makes it a breeze to provide this information. Go to Bash -> Comments -> File Header, and gVim will insert a header like this in your script:

#!/bin/bash
#===============================================================================
#
#          FILE:  test.sh
#
#         USAGE:  ./test.sh
#
#   DESCRIPTION:
#
#       OPTIONS:  ---
#  REQUIREMENTS:  ---
#          BUGS:  ---
#         NOTES:  ---
#        AUTHOR:  Joe Brockmeier, jzb@zonker.net
#       COMPANY:  Dissociated Press
#       VERSION:  1.0
#       CREATED:  05/25/2007 10:31:01 PM MDT
#      REVISION:  ---
#===============================================================================

You’ll need to fill in some of the information, but Bash Support grabs the author, company name, and email address from your ~/.vimrc, and fills in the file name and created date automatically. To make life even easier, if you start Vim or gVim with a new file that ends with an .sh extension, it will insert the header automatically.

As you’re writing your script, you might want to add comment blocks for your functions as well. To do this, go to Bash -> Comment -> Function Description to insert a block of text like this:

#===  FUNCTION  ================================================================
#          NAME:
#   DESCRIPTION:
#    PARAMETERS:
#       RETURNS:
#===============================================================================

Just fill in the relevant information and carry on coding.

The Comment menu allows you to insert other types of comments, insert the current date and time, and turn selected code into a comment, and vice versa.

Statements and snippets

Let’s say you want to add an if-else statement to your script. You could type out the statement, or you could just use Bash Support’s handy selection of pre-made statements. Go to Bash -> Statements and you’ll see a long list of pre-made statements that you can just plug in and fill in the blanks. For instance, if you want to add a while statement, you can go to Bash -> Statements -> while, and you’ll get the following:

while _; do
done

The cursor will be positioned where the underscore (_) is above. All you need to do is add the test statement and the actual code you want to run in the while statement. Sure, it’d be nice if Bash Support could do all that too, but there’s only so far an IDE can help you.

However, you can help yourself. When you do a lot of bash scripting, you might have functions or code snippets that you reuse in new scripts. Bash Support allows you to add your snippets and functions by highlighting the code you want to save, then going to Bash -> Statements -> write code snippet. When you want to grab a piece of prewritten code, go to Bash -> Statements -> read code snippet. Bash Support ships with a few included code fragments.

Another way to add snippets to the statement collection is to just place a text file with the snippet under the ~/.vim/bash-support/codesnippets directory.

Running and debugging scripts

Once you have a script ready to go, and it’s testing and debugging time. You could exit Vim, make the script executable, run it and see if it has any bugs, and then go back to Vim to edit it, but that’s tedious. Bash Support lets you stay in Vim while doing your testing.

When you’re ready to make the script executable, just choose Bash -> Run -> make script executable. To save and run the script, press Ctrl-F9, or go to Bash -> Run -> save + run script.

Bash Support also lets you call the bash debugger (bashdb) directly from within Vim. On Ubuntu, it’s not installed by default, but that’s easily remedied with apt-get install bashdb. Once it’s installed, you can debug the script you’re working on with F9 or Bash -> Run -> start debugger.

If you want a “hard copy” — a PostScript printout — of your script, you can generate one by going to Bash -> Run -> hardcopy to FILENAME.ps. This is where Bash Support comes in handy for any type of file, not just bash scripts. You can use this function within any file to generate a PostScript printout.

Bash Support has several other functions to help run and test scripts from within Vim. One useful feature is syntax checking, which you can access with Alt-F9. If you have no syntax errors, you’ll get a quick OK. If there are problems, you’ll see a small window at the bottom of the Vim screen with a list of syntax errors. From that window you can highlight the error and press Enter, and you’ll be taken to the line with the error.

Put away the reference book…

Don’t you hate it when you need to include a regular expression or a test in a script, but can’t quite remember the syntax? That’s no problem when you’re using Bash Support, because you have Regex and Tests menus with all you’ll need. For example, if you need to verify that a file exists and is owned by the correct user ID (UID), go to Bash -> Tests -> file exists and is owned by the effective UID. Bash Support will insert the appropriate test ([ -O _]) with your cursor in the spot where you have to fill in the file name.

To build regular expressions quickly, go to the Bash menu, select Regex, then pick the appropriate expression from the list. It’s fairly useful when you can’t remember exactly how to express “zero or one” or other regular expressions.

Bash Support also includes menus for environment variables, bash builtins, shell options, and a lot more.

Hotkey support

Vim users can access many of Bash Support’s features using hotkeys. While not as simple as clicking the menu, the hotkeys do follow a logical scheme that makes them easy to remember. For example, all of the comment functions are accessed with \c, so if you want to insert a file header, you use \ch; if you want a date inserted, type \cd; and for a line end comment, use \cl.

Statements can be accessed with \a. Use \ac for a case statement, \aie for an “if then else” statement, \af for a “for in…” statement, and so on. Note that the online docs are incorrect here, and indicate that statements begin with \s, but Bash Support ships with a PDF reference card (under .vim/bash-support/doc/bash-hot-keys.pdf) that gets it right.

Run commands are accessed with \r. For example, to save the file and run a script, use \rr; to make a script executable, use \re; and to start the debugger, type \rd. I won’t try to detail all of the shortcuts, but you can pull up a reference using :help bashsupport-usage-vim when in Vim, or use the PDF. The full Bash Support reference is available within Vim by running :help bashsupport, or you can read it online.

Of course, we’ve covered only a small part of Bash Support’s functionality. The next time you need to whip up a shell script, try it using Vim with Bash Support. This plugin makes scripting in bash a lot easier.

Every Monday we highlight a different extension, plugin, or add-on. Write an article of less than 1,000 words telling us about one that you use and how it makes your work easier, along with tips for getting the most out of it. If we publish it, we’ll pay you 0. (Send us a query first to be sure we haven’t already published a story on your chosen topic recently or have one in hand.)

<!– Ad block?? –>

Read in the original layout at: http://www.linux.com/articles/114359

Orginal post can be found here;

Lorenzo Ferrara’s Blog

==============================================

VMware Player is the new free (as in beer) great tool released a few days ago by VMware.
It can be used to run virtual machines made with VMware Workstation, VMware GSX Server, and VMware ESX Server but it can’t create them.

The 24th October Eliot Phillips wrote about how to create virtual machines with VMware Player.

There is also another, maybe more simple, way to create virtual machines using VMware Player.The problem is to understand how the vmx file works. A vmx file is the configuration file used by the VMware Player to launchvirtual machines. This article explains how to create a vmx configuration file, a hard disk image and how to install a GNU/Linux OS using VMware Player. At the end of the article you can find a tar.gz file containing a complete working configuration with clean hd images ready to be used.

To create an hard disk image you need qemu-img for GNU/Linux or qemu-img.exe for Windows. Just run:

qemu-img create -f vmdk hda.vmdk 100M

to create a file called hda.vmdk of 100 Megs. If you want, say a 5 Gigs hard disk, just use

qemu-img create -f vmdk hda.vmdk 5G

Next thing you need is a new configuration file so VMware Player can install your new GNU/Linux distribuntion on the hard disk image. The file can be created using a normal text editor. This is a sample of a working configuration file:

------------------------------------------------------------------------------
## VMware Player Configuration File

## This indicates the version of the virtual machine.
## Compatible VMs are the ones created by Workstation 4.x and 5.x, GSX Server
## 3.x, and ACE 1.x.
## Valid entires are 7 and 8. We will use 8.
config.version = "8"

## This seems to indicate the version of the VMware hardware.  Valid values
## are from 0 to 4. But to set value 4 you need to make the configuration
## file not writable because VMware Player will change it automaticaly to 3.
virtualHW.version = "3"

## This will specify how much ram will be used by VMware Player.
memsize = "128"

## This variables are used to configure the primary master ide channel.
## You must assign to ide0:0.fileName the name of the hard disk image created
## with qemu-img. ide0:0.present = "TRUE" means that the device shoul be
## connected on system startup.
ide0:0.present = "TRUE"
ide0:0.fileName = "hda.vmdk"
ide0:0.deviceType = "disk"
ide0:0.redo = ""

## No configuration for the primary slave ide channel.
## ide0:1.present = "TRUE"
## Configure the secondary master ide channel.
## This time you want to configure a cdrom.
## This configuration uses the cdrom.iso file as cdrom drive.
## If you want to use your phisical cdrom drive set
##      ide1:0.filename = "auto detect"
##      ide1:0.deviceType = "cdrom-raw"
ide1:0.present = "TRUE"
ide1:0.fileName = "cdrom.iso"
ide1:0.deviceType = "cdrom-image"
ide1:0.autodetect = "TRUE"

## No configuration for the secondary slave ide channel
## ide1:1.present = "TRUE"

## This section configures the floppy drive.
##  change "/dev/fd0" to "A:" if you run VMware Player on Windows.
## You could also use an image of a floppy disk.
floppy0.present = "FALSE"
floppy0.fileName = "/dev/fd0"

## Ethernet configuration.
## Activate on startup and set a nat connection.
ethernet0.present = "TRUE"
ethernet0.connectionType = "nat"
ethernet0.addressType = "generated"
ethernet0.generatedAddress = "00:0c:29:7f:26:09"
ethernet0.generatedAddressOffset = "0"

## Usb configuration.
## Activate usb on system startup.
usb.present = "TRUE"

## This configuration makes VMware Player emulate an es1371 sound card.
sound.present = "TRUE"
sound.virtualDev = "es1371"

## This is just to set tile of the VMware Player window.
displayName = "Virtual OS"

## Here you need to specify the guest os, that is the os that
## VMware Player  will run. Possible choices are:
##  "dos"
##  "freebsd" ............ generic freebsd distribution
##  "netware6" ........... netware 6
##  "other24xlinux" ...... generic distribution with the linux 2.4.x kernel
##  "other26xlinux ....... generic distribution with the linux 2.6.x kernel
##  "otherlinux" ......... generic distribution with the linux kernel
##  "redhat" ............. red hat linux (fedora?)
##  "solaris10" .......... solaris 10
##  "suse" ............... suse linux
##  "win95" .............. windows 95
##  "win98" .............. windows 98
##  "winme" .............. windows me
##  "winnt" .............. windows nt
##  "winnetstandard" ..... windows server 2003 standard edition
##  "winxphome" .......... windows xp home
##  "winxppro" ........... windows xp professional
guestOS = "otherlinux"

## Set the Non Volatile Random Access Memory file which contains information
## about BIOS settings.
nvram = "bios.nvram"
-------------------------------------------------------------------------------

Using this file as template you can install any operating system.

If you want a fully functional configuration, just download virtual_machine.tar.gz. The file contains a working configuration and some blank hard disk images created with qemu-img. The “hd/” directory containsthe hard disk images. Each image has different size. Just copy the desired image in the “../hda.vmdk” file.Also, the configuration reads cdrom.iso file as input for the cdrom drive, so, if you want to install your favorite distribution,rename the .iso file in cdrom and place it in the directory containing the VMware Player configuration file. To create aniso image from a cdrom/dvdrom just run

dd if=/dev/cdrom of=cdrom.iso

where /dev/cdrom is you cdrom/dvd reader device. Then launch

vmplayer start_linux.vmx

and install your GNU/Linux distibution.

LINKS:
VMware Player
QEMU for Linux (contains qemu-img)
QEMU for Windows (contains qemu-img.exe)