Pages

Monday, May 25, 2009

Virtual social 3D World

Today, I take a look on SecondLife and its competitors.

http://en.wikipedia.org/wiki/SecondLife


I notice 2 things related to business in this article:

"In September 2008, over 15 million accounts were registered" => this is a good community and good place for business.

 

"In 2007, Brazil became the first country to have its own independently-run portal to Second Life, operated by an intermediary—although the actual Second Life grid accessed through the Brazilian portal is the same as that used by the rest of the worldwide customer base" => Localizaiton is one of trends in SecondLife

 

Below is  the list of competitor with SecondLife:

 

Virtual social 3D World is one of trends in the future and going to be a rich land for business. Why don't we start something with it from now?

Friday, May 22, 2009

Ubuntu 9.0.4 shutdown dialog - who wants?

In previous version (Ubuntu 8.10), when you shutdown your computer - no dialog appears. I am happy with this. I think many users also like this - same to me. In Windows, if you shutdown - it asks you for confirmation. It makes us confuse a lot and take time for an action to choose OK - I REALLY WANT TO SHUTDOWN - BECAUSE I FEEL SO TIRED - I WANT TO LEAVE MY COMPUTER AS SOON AS POSSIBLE.


To improve it, MS Vista and Windows 7 do not show this dialog any more. Why Ubuntu 9.0.4 does a backward thing? Why they don't research common behavior of end user? I don't know. It's quite difficult to understand.

Wednesday, May 20, 2009

Augmented reality - do you want to take a photo with a real dinosaur?

Augmented reality (AR) is a field of computer research which deals with the combination of real-world and computer-generated data (virtual reality), where computer graphics objects are blended into real footage in real time.

At present, most AR research is concerned with the use of live video imagery which is digitally processed and "augmented" by the addition of computer-generated graphics. Advanced research includes the use of motion-tracking data, fiducial markers recognition using machine vision, and the construction of controlled environments containing any number of sensors and actuators.
From wikipedia

And this is what we use with this technology in R&D division:

Take a photo qwith a real dinosaur
 


If you want to take a photo with this nice dinosaur, contact me!

Install Magento on Ubuntu - problems and solutions

Magento is one of best open source e-commerce systems at this time. So, I decide to install and play around with it to understand deeply its business concepts and the system architecture behind.

When install Magento on my Ubuntu, I met several problems. To save your time - if you want to play with magento, I share to you my experience to solve them here.

Problem 1: curl module loading error
You will meet this problem at beginning steps of installation. The root cause is: you haven't installed curl module for php. To solve this, please install php curl module.
I am using PHP5, so the easiest way to solve this for my case is: install php5-curl by apt-get

sudo apt-get install php5-curl
Restart apache and try again.

Problem 2: Can not login to both backend and front end with localhost
The problem occurs because magneto could not store cookies. We run it as localhost and localhost is not true domain but to store cookies we need a domain. That’s why login stops without saying any word.

There are 2 solutions to solve this
1. Use 127.0.0.1 instead of localhost: you can choose this if you just want to play with Magento - not deploying on production. Actually, this error never happens on live site (because on live site, we use true domain)
2. Go to magento/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory.

-Find the code,
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath(),
$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()
);
-Replace above code by,
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
//$this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()
);

Problem 3: Can not rewrite url
Solution: load rewrite module in apache2. You can do this by add this line into /etc/apache2/apache2.conf at the end of file
LoadModule rewrite_module modules/mod_rewrite.so

Hope this helps.

Tuesday, May 19, 2009

Setup TWiki 4.3.1 on Ubuntu for newbie

Today, I have to setup a demo version of TWiki for R&D devision. It is used as a new channel for centralizing information of all technical staff.

I choose the latest TWiki version (4.3.1) to deploy. Actually, I am very disappointed with the configuration guideline on this version. I follow up all steps there but it takes to many problems.

After solving all of them, I decide to write another installation guide version here (for newbie and stupid one - like me).
My environment:
+ Ubuntu 9.0.4
+ Apache 2.2
+ Perl 5.0

TWiki is developed in Perl. However, you do not need to install Perl on Ubuntu 9.0.4 because it has a built-in installation of Perl there.

Step 1: install Apache Perl mod
You need to install the following package
sudo aptitude install libapache2-mod-perl2

After this, restart Apache: service apache2 restart (this command is only used in Ubuntu 9.0.4)

Step 2: Download TWiki and copy to installation folder

+ Download TWiki (4.3.1)
+ Unzip it and rename it to twiki
+ Copy to /var/www/twiki folder. Actually, you can change the location, but please follow this because it helps us reduce complexity in later steps


Step 3: Change configuration files on TWiki
+ Go to /var/www/twiki copy twiki_httpd_conf.txt to /etc/apache2/ (I installed Apache in this location). Rename this file to: twiki.conf
+ Open twiki.conf, go to this section:

AllowOverride None
Order Allow,Deny
Allow from all
Deny from env=blockAccess

Options ExecCGI FollowSymLinks
SetHandler cgi-script

# Password file for TWiki users
AuthUserFile /var/www/twiki/data/.htpasswd
AuthName 'trandangkhoa'
AuthType Basic
...

Change AuthName value by a username in your .htpasswd file. To create this file, please use htpasswd command on Ububtu.

Go to another section:

SetHandler cgi-script
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 192.168.1.10
Require user trandangkhoa
Satisfy Any


Change value of Require user with the name same as above step.

+ Open: /etc/apache2/apache2.conf and add below line into the end of this file:
Include /etc/apache2/twiki.conf

After this, restart Apache: service apache2 restart

Step 4: Create the file LocalLib.cfg located as twiki/bin/LocalLib.cfg

+ There is a template for this file in twiki/bin/LocalLib.cfg.txt. Simply copy LocalLib .cfg.txt to LocalLib .cfg. Make sure the ownership and access rights of the copy are the same as LocalLib .cfg.txt

+ The file twiki/bin/LocalLib.cfg must contain a setting for $twikiLibPath, which must point to the absolute file path of your twiki/lib e.g. /var/www/twiki/lib.

Step 5: Fix TWiki error with Unicode path
Open /var/www/twiki/lib/TWiki/Render.pm file:(you must change the mode of this file to edit - it is read-only by default)
1. Remove this line:
use Unicode::String qw(utf8 latin1 utf16be);
2. Replace the following two lines:
my $utf8AnchorName = Unicode::String->new($anchorName);
    $anchorName = $utf8AnchorName->substr(0, 32);
with this line:
$anchorName =~ s/^(.{32})(.*)$/$1/; # limit to 32 char

Step 6: Change access mode for files/folders in twiki

+ Change owner for the twiki folder:
chown -R www-data:www-data /path/to/twiki 
(Note: in order to see www-data you may need to modify root's /apps/gnome-system-tools/users/showall GConf setting; see GConfEditor)

+ Change access mode (this step is VERY IMPORTANT)
cd /var/www/twiki


find . -type d -print -exec chmod -v 755 {} \;
find data -name '*.txt' -type f -exec chmod -v 644 {} \;
find data pub -name '*,v' -type f -exec chmod -v 444 {} \;
find lib -type f -exec chmod -v 444 {} \;
find locale -type f -exec chmod -v 444 {} \;
find pub -type f -exec chmod -v 644 {} \;
find bin -type f -exec chmod -v 555 {} \;
find bin/logos -type f -exec chmod -v 444 {} \;
find templates -type f -exec chmod -v 444 {} \;
find tools -type f -exec chmod -v 555 {} \;
chmod -v 644 lib/LocalSite.cfg
chmod -v 644 data/.htpasswd
chmod -v 644 data/mime.types
chmod -v 644 bin/LocalLib.cfg.txt bin/.htaccess.txt
chmod -v 444 bin/setlib.cfg
chmod -v 444 tools/extender.pl
chmod -v 444 working/tmp/README working/README working/registration_approvals/README working/work_areas/README
chmod -v 660 working/.htaccess
chmod -v 444 AUTHORS COPYING COPYRIGHT index.html INSTALL.html LICENSE pub-htaccess.txt readme.txt robots.txt root-htaccess.txt subdir-htaccess.txt TWikiHistory.html twiki_httpd_conf.txt TWikiReleaseNotes04x02.html

Step 7: Setup TWiki settings
Open this link on your web browser http://localhost/twiki/bin/configure




In the Store Settings section, choose: RCSLite for StoreImpl

At the next step, TWiki will ask you to type password for doing configuring in the future.





After this step, you can go to the home page of TWiki:
http://localhost/twiki/bin/login/Main/WebHome

Done!
All above steps are just the fundamental steps that you can set up TWiki in an easiest way.

If you want to do more thing, please read its manual document.

It takes me over 2 hours to fix all problems with TWiki deployment. I hope this helps you also.