Sunday, March 15, 2009

Linux in Virtualbox with Windows XP as host system

1. Software we need:

Virtualbox to install Linux and X server running on Windows XP to enable X11 forwarding

Pietty:
http://www.csie.ntu.edu.tw/~piaip/pietty/

Virtualbox:
http://www.virtualbox.org/

Xming:
http://sourceforge.net/projects/xming

Linux (Ubuntu, in this example):
http://www.ubuntu.com/

3. Install all software and Linux system

4. In Virtualbox control window:
a. add a new netwotk adapter with "HOST interface" option

5. Login Linux system and get local IP address binding on "HOST interface" network adapter using "ifconfig" command

6. Make sure that SSH server deamon is listening on specific port

7. Login Linux system using pietty by guest IP address and SSH protocol

8. Modify .bashrc as below:
alias v='gvim -font "Monospace 16"'
alias c='clear'
alias l='ls --color'
alias cl='clear; ls -la'
alias gcc='gcc -Wall'
alias h='history'

You will get "small" font size on gvim probably if you do not set fontsize option

9. Modify .vimrc as below:
behave mswin "enable MS windows hbehavior
syntax on "enable syntax
colors desert "color scheme setting
filetype on "enable file type
set number "enable line number
set tabstop=4 "set soft tab space
set cindent "set auto indent
set ignorecase "set case-insensitive search
set hls "highlight search result
set ruler "show current cursor position
set mousef "focus follows mouse
set nocompatible "enable backspace
set backspace=indent,eol,start "enable backspace
nnoremap q :quit "quit by typing 'q' only

You can get more information at this --> http://www.vim.org/

10. Change pietty setting:
connection --> SSH --> X11
Enable X11 forwarding and set display location as "localhost:0.0"

11. Start Xming, login guest Linux system, try "xeyes &" to hceck X window forwarding

No comments: