Wednesday, May 12, 2010

HOWTO : phpmyadmin on Ubuntu 10.04 LTS Server

Since there is a bug in PHP5 on Ubuntu 10.04 LTS, the sessions are saved at /tmp instead of /var/lib/php5. Some PHP applications may not encountered any problem. However, phpmyadmin do run into problem - cannot login. Don't panic, I will show you how to solve this problem at ease.

Bug fix on PHP5

Do one of the following command depends on your situation.

sudo nano /etc/php5/cgi/php.ini


sudo nano /etc/php5/apache2/php.ini


sudo nano /etc/php5/cli/php.ini

Make the following changes to php.ini.

session.save_path = /tmp
session.auto_start = 1

Installation of phpmyadmin

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install phpmyadmin

Make sure mysql and php5 are already installed.

Configuration file of Apache2 and lighttp will be setup automatically after answering several questions. Write down what password you have entered.

sudo cp /usr/share/phpmyadmin/ /usr/share/phpmyadmin/

sudo cp /usr/share/phpmyadmin/ /usr/share/phpmyadmin/

sudo nano /usr/share/phpmyadmin/

Locate $cfg['blowfish_secret']='' and enter some password like string, e.g. dlhw034tu034F&W.

The outcome will be :

Save and then reboot your server. Or,

sudo /etc/init.d/php-fcgi restart
sudo /etc/init.d/php restart

Then, restart Apache or your web server
sudo /etc/init.d/apache2 restart

Access phpmyadmin with your browser and point the url to :

username is "root" while the password is what you have entered during installation.

This bug has been reported by someone else. I think the fix will be released soon.

That's all! See you.

Saturday, May 08, 2010

HOWTO : Docky on Ubuntu 10.04

Do you think that a Mac OS style dock is wonderful? Yes, you can have one on your Ubuntu 10.04 desktop.

However, make sure your display card can run Compiz or say 3D desktop. Most recent built (2 to 3 years time) display cards can run Compiz flawlessly.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install docky gnome-do-docklets

Here is the demo of Docky.

That's all! See you.

HOWTO : Ubuntu 10.04 runs more faster

Ubuntu 10.04 is running quiet fast. However, you want more speed ....

Step 1 :

sudo nano /etc/fstab

Step 2 :
Append "norelatime" to the mount parameter and the outcome may be as the following -

proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=26c0248f-a2a8-41bf-8222-37cba4e419db / ext4 errors=remount-ro,norelatime 0 1
# swap was on /dev/sda5 during installation
UUID=1c2f38cb-2c0e-4d2f-9055-e0643a970b1f none swap sw 0 0

Step 3 :

sudo mount -a

If there is no error, go ahead to next step. Otherwise, fix the typing error if any.

Step 4 :

sudo mount -o remount /

YouTube demo

That's all! See you.

HOWTO : Fix blank screen on Ubuntu 10.04

You may experienced blank screen when bootup a Live CD of Ubuntu 10.04 if you have legacy display card no matter it is an Intel, nVidia, ATi or others. You can fix it by adding a Kernel parameter.

The Kernel parameter for different display cards is :

Intel display card - i915.modeset=1
nVidia display card - nomodeset
Generic - xforcevesa

Boot up - Live CD

Step 1 :
Bootup and press any key at the screen of a little keyboard and a human with a circle at the bottom of the screen.

Step 2 :
Press F6 and then Esc.

Step 3 :
Append one of the above Kernel parameter at the end of the command line.

Step 4 :
Select try out Ubuntu (i.e. the first option of the boot menu).

Boot up - after installation

You may also encounter blank screen after installation with the above method.

Step a :
Bootup with Live CD and follows the Step (1) to (4) as above mentioned.

Step b :
After bootup, mount the hard drive at the "Place".

Step c :
Open a terminal and issue the following command -

sudo nano /etc/default/grub

Step d :
Locate the following line and append the Kernel parameter and make the output looking like as the following if you have an Intel display card -

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.modeset=1"


Step d(1) : (Optional)

sudo nano /boot/grub/grub.cfg

Locate the "linux" tag and add the parameter at the end of "quiet splash". Then jump to Step f.

Step e :
Save and exit. Then issue the following command -

sudo update-grub

Step f :
Then reboot the system without Live CD.

If Step a to f does not work, just do Step a, b, d(1) and then jump to Step f.

That's all! See you.

Tuesday, May 04, 2010

HOWTO : RealTek 8192SU USB dongle (RTL8192SU) on Ubuntu 10.04

D-Link DWA-131 Nano USB Wireless N adapter (USB dongle) is using RealTek 8192SU chip. However, it does not work on Ubuntu 10.04. This chip does work on Kernel 2.6.33. That is, this chip may work on Ubuntu 10.10 or later.

The current version of RealTek 8192SU Linux driver is 0006 which is for Kernel 2.6.18 to 2.6.31 and dated 2010-03-25. However, Ubuntu 10.04 is using Kernel 2.6.32. You may encounter compile errors under Ubuntu 10.04. Don't panic, I have the solution.

Step 1 :

RealTek 8192SU driver from official site

or download it from here.


Step 2 :

sudo apt-get install unzip


cd rtl8712_8188_8191_8192SU_usb_linux_v2.6.0006.20100226/driver

tar -xvzf rtl8712_8188_8191_8192SU_usb_linux_v2.6.0006.20100226.tar.gz

cd rtl8712_8188_8191_8192SU_usb_linux_v2.6.0006.20100226

Step 3 :

cd include

nano osdep_service.h

add "#include <linux/sched.h>" to the file "osdep_service.h"

the result looks like this :

#ifndef __OSDEP_SERVICE_H_
#define __OSDEP_SERVICE_H_

#include <drv_conf.h>
#include <basic_types.h>
#include <linux/sched.h>
//#include <rtl871x_byteorder.h>

Step 4 :

cd ..

nano Makefile

add "nullstring :=" under "export TOPDIR := $(PWD)"

locate "ifeq ($(CONFIG_BUILT_IN), y)" and make changes to this ifeq block. The result looks like this :

ifeq ($(CONFIG_BUILT_IN), y)
include $(src)/config
ifeq ($(TOPDIR), $(nullstring))
include config
include $(TOPDIR)/config

The result of the first 19 lines is as the following :

EXTRA_CFLAGS += -O1 -Wno-unused-variable -Wno-unused-value -Wno-unused-label -W$
EXTRA_CFLAGS += -I$(src)/include -Wno-unused -Wno-unused-function


export TOPDIR := $(PWD)
nullstring :=

ifeq ($(CONFIG_BUILT_IN), y)
include $(src)/config
ifeq ($(TOPDIR), $(nullstring))
include config
include $(TOPDIR)/config

ifeq ($(CONFIG_RTL8711), y)

Step 5 :

make clean
sudo make install

Step 6 :
sudo modprobe 8712u
echo "8712u" | sudo tee -a /etc/modules

The dongle will work now. Be keep in mind that when the Kernel is updated, you may require to re-compile the driver at Step 5.

That's all! See you.

Sunday, May 02, 2010

Apps on my Nexus One

The following are the list of the applications that I installed to my Nexus One. Some applications are for Hong Kong only.

Android Web Desktop - SmartDog Studio
DNS Lookup - Magnus Eriksson
Network Speed - pt
Webshot - Liqiang
HowSteep LiteWeight - Smallbouldering Projects
Penetrate - Diogo Ferreira
GPS Essentials - mictale
APN Backup & Restore - Ritesh Sahu
Useful Numbers - KArKiN
Network Info - alt236
IPdroid - Bo Yan
Quick Uninstaller - (B&B (Bread & Butter) Tool
StopWatch -
香港通宵交通 - hkmung
Metro Radio - Metro Broadcast Corp.
大牛新聞 - NubiNews
EStrongs Task Manager - EStrongs
GoMarks - AndroAppsDev
Mind Map Memo - takahicorp
Mark Six Widget (六合彩) - bitartist
ConnectBot - Kenny Root and Jeffrey Sharkey
am730 - Nuthon IT Solutions Ltd
HK Weather Widget - Tako Au
ColorNote Notepad Notes - Notes
EStrongs File Explorer - EStrongs
aFirewall - Lucky-dog Xing
Compass - Snaptic
ShopSavvy - Big in Japan, Inc.
QR Code - DrHu
Tip Calculator by TradeFields - iStockManager
Agile Stock for Hong Kong - Francis Chong
IP Address Calculator - Slackey Software
Dictionary - ZH-EN - CallSpark

That's all! See you.