Toggle btw compiz&metacity with fusion-icon in Ubuntu Hardy

Since gusty, compiz-fusion will start by default. I love eye candy but for resource shortage reason on my old box, sometime i need to switch to metacity. with alt-f2 and run 'metacity replace' is just work but not convenion. Thank for Tom that point me . Fusion-icon is use to switch between compiz and metacity window manager. For hardy, fusion-icon is in repos. installation is easy like

pnix@pnix-a7n:~$ sudo aptitude install fusion-icon
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
The following NEW packages will be installed:
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 29.8kB of archives. After unpacking 270kB will be used.
Building tag database... Done

alt-F2 and type 'fusion-icon -n' or if you want this everytime logging in add 'fusion-icon -n' to 'Sessions preference' in System->Preferences->Sessions.


sudo: timestamp too far in the future

I just finish build the new hardy box at my office. then I go to open the file '/etc/network/interfaces' to add internal ip address and forget something. When I try to open it again, I got this.

pnix@hardy-dev:~$ sudo nano /etc/network/interfaces
sudo: timestamp too far in the future: Apr 29 01:41:32 2008
pnix@hardy-dev:~$ date
Mon Apr 28 18:48:21 ICT 2008
I'm not sure why this happen may be some parts of the system using UTC, other parts using timezone-adjusted time. To fix this try code below to clear timestamp.
pnix@hardy-dev:~$ sudo -k
pnix@hardy-dev:~$ sudo nano /etc/network/interfaces
[sudo] password for pnix:


Are you Hardy??

Ubuntu 8.04 LTS code name Hardy Heron just released yesterday. Until now the server still busy, network upgrade[for me] need about 9xx MB download and will take about 1 days and something to do that[on 1mb ADSL from Thailand can you believe? :P].

So I try go for alternative CD. This is pretty much help, download time[for CD] reduce to 2 hours for 700MB. After burning, pop it into CD Drive, it will ask about "Do I want latest pakage from internet?". "Yes" will need more 300MB to download. Anyway it'not a day, estimate time are about 2-3 hours for upgrading.

Hope that tomorow I will see hardy desktop on my box.


R4FXO channel did not hang up

Last time, configure r4fxo on trixbox using genzaptelconf command will generate zapata-channels like this.

;;; line="4 FXO/1/3 FXSKS (In use)"
channel => 4

This look ok except context is set to 'from-pstn', I can make outbound and inbound call with out any problem except the call will never hang up!!!. To fix this problem[from this post], change 'context=from-pstn'[bold above] to 'context=from-zaptel'.


Running Oracle DBCA(Database Confguration Assistance) remotely

There are two ways to create a new database on existing oracle db server. One is using 'CREATE DATABASE' sql statement[this is too long,hard for me]. Another is using DBCA(Database Confguration Assistance), GUI Base Program. This way is more easy and I choose this way:). One note here is DBCA need X to run and I want to remote login to db server and run dbca from ssh, so ssh need '-X' for X11 forward[assume that DISPLAY variable on server is set, if not try 'export DISPLAY=localhost:0.0' on the server].

[poj@fedev ~]$ ssh -X -l oracle
oracle@'s password:
Last login: Wed Apr 16 15:11:14 2008 from
/usr/X11R6/bin/xauth: creating new authority file /home/oracle/.Xauthority
[oracle@k8n ~]$ cd /u01/app/oracle/product/10.1.0/db_1/bin
[oracle@k8n bin]$ dbca


export,import data in oracle with exp/imp command

One of database box hang today. It doesn't let me ssh to see what happen, so I just shut it down and try to reboot again. But during boot process, I got "Kernel panic: VFS: Unable to mount root fs on...". err.. look like the disk is gone.
Anyway, after few time of cold boot it give me a chance to backup my data:). I don't need all data in database[too many outdate data], so I decide to move some importance table to another database. Oracle has exp and imp utility to do this job. To export table test123 to file test123.dmp type follwing command.

[oracle@Oracle-1 oracle]$ exp username/password TABLES=test123 FILE=test123.dmp

Export: Release - Production on Mon Apr 7 13:22:01 2008

(c) Copyright 2000 Oracle Corporation. All rights reserved.

Connected to: Oracle8i Enterprise Edition Release - Production
With the Partitioning option
JServer Release - Production
Export done in US7ASCII character set and US7ASCII NCHAR character set

About to export specified tables via Conventional Path ...
. . exporting table TEST123 1 rows exported
Export terminated successfully without warnings.
[oracle@Oracle-1 oracle]$

then ftp dump file[test123.dmp] to new database[make sure that using binary on transfer]. To import dump file into new database see below.
[oracle@ora10g ~]$ imp username/password FILE=test123.dmp fromuser=username touser=username

Import: Release - Production on Mon Apr 7 13:29:40 2008

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release - Production
With the Partitioning, OLAP and Data Mining options

Export file created by EXPORT:V08.01.07 via conventional path
import done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
export client uses US7ASCII character set (possible charset conversion)
export server uses US7ASCII NCHAR character set (possible ncharset conversion)
. . importing table "TEST123" 1 rows imported
Import terminated successfully without warnings.
[oracle@ora10g ~]$

note: when move data DOWN a version(s). you may need to export using that lower versions EXP tool and IMP using that lower versions tool.[more detail]