Sunday, December 28, 2008

VMWare arrow keys problem

I found some problems with arrow keys, insert/delete, pg up/pg down and home/end keys with vmware 6.5. When I press these keys, my Windows opens the Start Menu. So I always have to use the keypad's arrow keys. -_-..

Actually the solution is very simply, close the vmware and create a config file in ~/.vmware directory (gedit ~/.vmware/config)

and add this:-

xkeymap.keycode.108 = 0x138 # Alt_R
xkeymap.keycode.106 = 0x135 # KP_Divide
xkeymap.keycode.104 = 0x11c # KP_Enter
xkeymap.keycode.111 = 0x148 # Up
xkeymap.keycode.116 = 0x150 # Down
xkeymap.keycode.113 = 0x14b # Left
xkeymap.keycode.114 = 0x14d # Right
xkeymap.keycode.105 = 0x11d # Control_R
xkeymap.keycode.118 = 0x152 # Insert
xkeymap.keycode.119 = 0x153 # Delete
xkeymap.keycode.110 = 0x147 # Home
xkeymap.keycode.115 = 0x14f # End
xkeymap.keycode.112 = 0x149 # Prior
xkeymap.keycode.117 = 0x151 # Next
xkeymap.keycode.78 = 0x46 # Scroll_Lock
xkeymap.keycode.127 = 0x100 # Pause
xkeymap.keycode.133 = 0x15b # Meta_L
xkeymap.keycode.134 = 0x15c # Meta_R
xkeymap.keycode.135 = 0x15d # Menu

Friday, December 26, 2008

Reinstall Ubuntu...

My Ubuntu having big trouble! CPU usage too high... totally don't know what happen. The system monitor showing the CPU usages very high... 50%~100%. After rebooting few time, eventhough my system is apparently idle (only running the system monitor) the CPU usage still very high. The Compiz effect is lagging (switching the 3D desktop). Strange thing is all the processes showing in system monitor is very low. Totally can't find any process that cause this problem.

Okay... let me recall what had I done...

1. Install MPlayer and its codec.
2. Installed Compiz fusion Icon.
3. Installed Apache2, MySQL and php.
4. Live update via Update Manager.
5. Installed VirtualBox and modify the /etc/init.d/mountdevsubfs.sh

Everything seen fine for me. I don't think these applications or services were too heavy for my quad core processor. Could it be the updates crashed with something? Really no idea.

It's time to find the answer from the www. Surprisingly there are some report of this bugs (Try google with the keyword "ubuntu cpu usage"). After reading few article, I learnt something new... Zombie Process! OMG... my system got zombie!!!

What is the zombie process? Go read the wikipedia... http://en.wikipedia.org/wiki/Zombie_process

How to see the zombie? The simple way is use the top command in the terminal.


Notice the second line, "Tasks: 165 total, .... ... ... ... 1 zombie". To find that zombie process, just run the system monitor, click on the Processes tab and look for "Zombie" in the status column. The other way is the command "ps aux" in the terminal.

Anyway, I still don't know how to solve the high load problem. So I decided to reinstall my Ubuntu. Then monitor the CPU usage each time I install an application or update.


OK, just after the installation, without any updating, seen fine, although the CPU4 showing 46.7% but I think its normal.

Then I tried to install Compiz and I moved the "Add/Remove Application" window around while installing.


OMG, see that graph of the CPU History? A downloading process plus moving window task only... I really don't understand why so heavy load? hmm... Never mind, just continue the updating... after everything done (all the updates including NVidia driver and Compiz), I restart the Ubuntu. And here is the result:-


Seen OK. All Compiz effect very smooth. Well... I guess this CPU high load problem need some time to figure out. Ubuntu (linux) is still like an alien to me. ):=|

EDIT: I just found a program that will cause the 100% CPU usage problem! The openOffice!!! Just after I published this article, I closed the openOffice and immediately I switched to another desktop and closed the GIMP. And bingo, guess what, 100% CPU usage:-


System monitor shows that 4 CPU 100%, top shows that 99.6%us, soffice.bin: 392%. But strange thing is the Compiz still running smoothly!? Anyway, this problem I still can solve it, just kill the soffice.bin process. Then CPU back to normal again.


Conclusion, need more time to understand this alien.

Thursday, December 25, 2008

VirtualBox 2.1 in Ubuntu

VirtualBox finally support Accelerated 3D Graphics via OpenGL. The latest released on the 17th December 2008, version, 2.1.0, has a lot new features. See the changelog for more information. Must try it~

Basically the interface is about the same like previous version.


But there is a little problem with the USB. When I want to do come configuration, an error popup:-


Well, this problem can be easily solve, VirtualBox FAQ has the answer.

USB on Ubuntu/Intrepid:-

Add these lines to at the end of the start() function of /etc/init.d/mountdevsubfs.sh. (before the } )

mkdir -p /dev/bus/usb/.usbfs
domount usbfs "" /dev/bus/usb/.usbfs usbfs
-obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount --rbind /dev/bus/usb /proc/bus/usb

After that I try to enable the 3D Acceleration.


No error.... OK then lets install a Windows XP pro and see.


No Direct3D acceleration support. But the OpenGL screen saver work fine. I didn't try any 3D game that support OpenGL yet. (Recently busy with my project) So...

to be continue ...

Tuesday, December 23, 2008

Playing Movie in Ubuntu

Ubuntu default player is Totem Movie Player, however it only can support few video/audio format such as AVI and MP3 by default installation. To make it support more format, open then Package Manager, click the Sound and Video category, search the key word GStreamer. Tick all the GStreamer plugins and install them. Then you can play almost all kind of video with Totem Movie Player except RMVB/RM (Real alternative).



To play RMVB/RM format, I found one video player which as these codecs. The MPlayer. First of all, use the Package Manager to install the MPlayer Movie Player. Then download and MPlayer Binary Codec Packages. Extract them...

command for 32bit user:-

tar xvjf essential-20071007.tar.bz2

cd essential-20071007



command for 64bit user:-

tar xvjf essential-amd64-20071007.tar.bz2

cd essential-amd64-20071007



and copy them into /usr/lib/codecs. If /usr/lib/codecs directory does not exist then create it.

sudo mkdir /usr/lib/codecs

sudo cp * /usr/lib/codecs



NOTE: you may need to install libstdc++5 to get .rmvb files to play. Even though it might not be necessary for you, it can’t hurt to install (the package isn’t very big). Run the command: sudo apt-get install libstdc++5 in a Terminal.

Now open the MPlayer (Applications->Sound and Video->MPlayer Movie Player) . Right click in the Mplayer and select Preferences from the menu.


Go to the Video tab, set the Available drivers: xv X11/Xv.

Then at the Codecs & demuxer tab, set the Video codec family to RealVideo decoder and Audio codec family to FFmpeg/libavcodec audio decoders.


Restart your MPlayer, and test play a RMVB/RM file.



Additional information:-

The Flash plugin for Firefox may be overwrite after installed these codecs, so you have to redo the Flash plugin again. (Refer to Installing Flash Player 10 64bit) If you still have the Flash plugin file - libflashplayer.so, then just simply copy it to /usr/lib/mozilla/plugins/ and redo the nspluginwrapper again.

Sample code:-

sudo cp libflashplayer.so /usr/lib/mozilla/plugins/

sudo nspluginwrapper -i /usr/lib/mozilla/plugins/libflashplayer.so

sudo ln -sf /usr/lib/nspluginwrapper/plugins/npwrapper.libflashplayer.so /usr/lib/mozilla/plugins/


sud
o ln -sf /usr/lib/nspluginwrapper/plugins/npwrapper.libflashplayer.so /usr/lib/firefox-addons/plugins/

Sunday, December 21, 2008

little problem with PhpMyAdmin

When I go to phpMyAdmin page, I notice there is an error message on the bottom "Cannot load mcrypt extension. Please check your PHP configuration".
*Note: Please refer to previous article last picture
.

Well, to solve this just install the php-mcrypt then restart apache2.

sudo apt-get install php5-mcrypt

sudo /etc/init.d/apache2 restart

Friday, December 12, 2008

LAMP in Ubuntu Desktop

Desktop version of Ubuntu by default doesn't include "AMP" (Apache, MySQL, php), so you have to install them yourself. And I notice that these packages can't use package manager to install. So the only way is use the command in terminal.


1. Apache

Install Apache version 2

sudo apt-get install apache2


Install php as module

sudo apt-get install libapache2-mod-php5


To test the Apache, just open your Firefox, go to http://localhost

if you saw

It works!

meaning... it works...


2. MySQL

Install MySQL server (you will ask to enter a password for the root user during the installation)

sudo apt-get install mysql-server

Install MySQL Administrator (GUI Administrator tools)

sudo apt-get install mysql-admin


Install the php support on MySQL

sudo apt-get install php5-mysql


To test the MySQL, open the Applications->Programming->MySQL Administrator. Server Host is localhost, port is 3306, username is root and your password and click connect. If success you will see this.


3. phpMyAdmin

phpMyAdmin is a powerful web-base MySQL administrator interface.

Download the program from here

http://www.phpmyadmin.net/home_page/downloads.php

The extract it (for English version)

tar -xzvf phpMyAdmin-3.1.1-english.tar.gz


Move it to WWW root folder

sudo mv phpMyAdmin-3.1.1-english /var/www


mv phpMyAdmin-3.1.1-english phpMyAdmin

To test it, open the Firefox and go to http://localhost/phpMyAdmin and you will see something like this

Wednesday, December 10, 2008

Installing Flash Player 10 64bit

Actually 64bit OS sometimes give a lot trouble, such as driver or plug-in problem, especially Adobe Flash Player and Java Virtual Machine. After I installed 64bit Ubuntu 8.10, everything is fine, I am happy with it, but then I notice that Adobe Flash Player not support 64bit. Damn... can't watch youtube in Firefox anymore. I had tried both automatic and manual install the flash player, but fail. It kept popup an error message. After that I tried some third party flash player plugins, totally BUSTED!

Finally, Adobe release the Flash Player 10 Alpha for 64bit. I quickly download and try to plug it into my Firefox. But fail too! I found a lot howto on the net, the step is simple, but how come kept busted?! (OK.. OK ... I agreed that I am still a noob in Ubuntu :P~ ) Finally, I found one clear, simple, direct, ultimate howto!!!
http://www.myscienceisbetter.info/2008/05/install-adobe-flash-player-10-on-ubuntu-using-nspluginwrapper.html.

*Thanks to Romeo Adrian Cioaba.


I want to highlight one thing first according to the howto:

1. Make sure you don't have any other flash plugin installed on your system:
sudo apt-get remove -y --purge flashplugin-nonfree gnash gnash-common mozilla-plugin-gnash swfdec-mozilla libflashsupport nspluginwrapper

Yes... the reason I fail because I had installed some third party flash plugins and even though I had removed them using the package manager... somehow, I not sure are they fully removed? The command above is quite complete. It did removed all the xxx and yyy flash plugins.

Next step is to double confirm you don't any other flash plugins.

sudo rm -f /usr/lib/mozilla/plugins/*flash*

sudo rm -f ~/.mozilla/plugins/*flash*

sud
o rm -f /usr/lib/firefox/plugins/*flash*

sudo rm -rfd /usr/lib/nspluginwrapper


Then get the nspluginwrapper. (*Note: Adobe didn't provide the installation files, in stead, it just release a plugin library file. nspluginwrapper is needed to plug the library file into Firefox)

sudo apt-get install ia32-libs nspluginwrapper

Now you can download the 64bit flash plugin from here:

http://labs.adobe.com/downloads/flashplayer10.html

Extract it to your desktop and then copy to the mozilla plugin folder:

sudo cp libflashplayer.so /usr/lib/mozilla/plugins/

Final step. Use the nspluginwrapper to plug it into Firefox. :)

sudo nspluginwrapper -i /usr/lib/mozilla/plugins/libflashplayer.so

sudo ln -sf /usr/lib/nspluginwrapper/plugins/npwrapper.libflashplayer.so /usr/lib/mozilla/plugins/


sud
o ln -sf /usr/lib/nspluginwrapper/plugins/npwrapper.libflashplayer.so /usr/lib/firefox-addons/plugins/

Close and open your Firefox and you can go to youtube now.



Additional information:-

Please take note that some media player has flash plugin bundled with it. I just facing this problem! I installed VLC media player last night, and this morning I found out that my Firefox fail to play flash again.

If this happen, just repeat the whole step again except this:

X sudo rm -rfd /usr/lib/nspluginwrapper

You already installed the nspluginwrapper, so do not remove it and reinstall again!

Tuesday, December 9, 2008

aMSN

I had tried few MSN program and I like aMSN the most. Is just like Windows Live Messenger, you won't feel too strange with it.

Basically, this is how aMSN looks like. This is the default skin. You can download the skin from their website and change it.

It has drawing plugin too. You can install the plugin at the aMSN menu -> Account->Select Plugins.Select the Inkdraw, the click Load.

Then you can trigger the drawing now by clicking the Inkdraw button. Too bad it only support black color.

Thursday, December 4, 2008

Setup Chinese Input

First of all, go to System->Administration->Language support, enabled the Chinese support and click apply. Then it will starting download the files itself.


Next step is to configure the SCIM. Open gedit (Applications->Accessories->Text Editor) and type in these code:

scim -d
export XMODIFIERS=@im=scim
export GTK_IM_MODULE=scim
gnome-session


Save the file as .xsession (make sure it is save under your home directory)

Then open a terminal and type:

sudo chmod +x .xsession

Finally, restart the session and you will see an icon that looks like a keyboard on the system tray bar. Now you can press ctrl+space to trigger the Chines input. Then the keyboard icon will change to "" and you will see something like this on the bottom right of your desktop which similarly to other Chinese input program in Windows.
Now you can type 中文 in any application. Have funz~~

Wednesday, December 3, 2008

Installing Windows XP in Ubuntu

1. Installing VMWare

I am using VMWare Workstation 6.5.1 because it has more function and easy to use by its GUI interface. Trial version can be download from here. You have to register an account (or login if you have one) in order to download it. Download the Linux bundle (32but or 64bit depending on your Ubuntu). VMWare Workstation 6.5.1 is quite powerful. If you like it you can buy it.

To install it, you can use this command in the terminal,

sudo sh VMware-Workstation-6.5.1-126130.i386.bundle

or this for 64Bit platform.

sudo sh VMware-Workstation-6.5.1-126130.x86_64.bundle

A GUI installation will appear and just follow the instruction given.


2. Creating Windows XP Pro guest

Launch the VMWare Workstation which located in Applications->System Tools. Then click the "Create a new virtual machine".Select "Typical" and next.If you want to install your Windows XP from a CD, select "I Will install the operating system later".

No need to explain for this... Give a nice name for your virtual machine and set the location of it. Lazy? then just click Next.Set the size of your virtual machine's hard disk. Later you can increase your disk size by using the vmware-vdiskmanager command in the terminal, for example:-

vmware-vdiskmanager -x 20GB "vmware/Windows XP Professional/Windows XP Professional.vmdk"

Finally, the summary. If you OK with it, then click Finish. If you want to change some hardware setting, click "Customize Hardware".


3. Hardware Customization

Normally I only customize the Memory, Processors and the Network adapter. The rest, just use default setting.
  • Memory
By default is 512MB. You can make it higher if you want to. I had tried running two MMORPG games in XP pro using 512MB RAM, no problem at all. Anyway, this can be change in future.
  • Processors
It support 2 processors and the Intel VT-x / AMD-V engine. You can enable if your processor support it. (You can check your processor specification in Intel or AMD website)
  • Network Adapter
The easiest way is set to Bridged. Don't think too much. :P~

4. Power On

Finally, insert your Windows' CD and Power On. Then install your Windows... then ... ... ... finish. To install the driver, go to the VMWare's menu VM->Install VMWare Tools. Then focus on your Windows, a program will startup. Just follow the step and everything will be done after the restart. Now you can install the DirectX 9.0c and test it!

Tuesday, December 2, 2008

Window's game in Ubuntu

I am using VMWare workstation 6.51 which support the DirectX9c. Installed a Windows XP guest and run a MMORPG game. It works fine! :D~


OOO... wait a minute... I found a little problem with the 3D rendering. The picture below shows that my legs were missing... lol... And I feel little lag if too high resolution or too high quality. Anyway, it is just a starting of 3D in virtualization. I believe it will getting better in future. Well done to VMWare. :)


Warcraft III - Frozen Throne can simply use wine to open it. But unfortunately GGClient can not start with wine.



Monday, December 1, 2008

I'm back!

Yes~ I am back!! With Ubuntu 8.10 64bit now. The graphics driver is solved!!! Ubuntu banzai ~~~ Intrepid Ibex banzai ~~~~

Last few months I was busy with my project, no time to test the 8.10 version. And this blog was suspended too. lol... But starting from today, I will slowly update this blog since the driver problem had solved. Project "Throwing My Windows Away" will be continue! hahahaha!

I installed Compiz and play around with the 3D effect. Totally working fine!

Compiz banzai ~~~

More screenshots:-

Cube Reflection and Deformation effect
Water effect
p/s: Now Compiz can support more than 4 desktops. See my 3D desktop becomes pentagon if I have 5 desktops... cool .... :D ~