Friday, December 21, 2007

Live to the present

Borrowed from the Charvak;

While life is yours live joyously;
No one can avoid Death's searching eye:
When this body of ours is burnt,
How can it ever return again?


Or the very popular saying of Charvak:

Jab tuk jiyo sukh se jiyo
Chahe udhaar le ke Ghee piyo

Tuesday, November 27, 2007

A quick note on how to install Alfresco

1. Install (if not already there) jre/jdk1.5x (no jdk-1.4x)

2. Set JAVA_HOME environment variable
In the .bash_profile file of root add these line at the last
JAVA_HOME=/Path_Of_Jdk1.5
export JAVA_HOME

3. Create a dir 'alfresco' in /opt

$cd /opt
$ mkdir alfresco

4. Download this file 'alfresco-community-tomcat-2.0.0.tar.gz' from
sourceforge
http://sourceforge.net/project/showfiles.php?group_id=143373

5. Untar the tar file at /opt/alfresco
$ cd /opt/alfresco
$tar -xzf /Path/alfresco-community-tomcat-2.0.0.tar.gz

6. Create one mysql database
$ cd alfresco/extras/databases/mysql
$ mysql -u root -p < db_setup.sql

7. Remove 3 files (default for HSQL) from here

$ cd /opt/alfresco/tomcat/shared/classes/alfresco/extension

custom-db-and-data-context.xml
custom-db-connection.properties
custom-hibernate-dialect.properties

8. Start the tomcat server and run the alfresco
$cd /opt/alfresco
$ alfresco.sh start


9. Point browser at
http://localhost:8080/alfresco

10. Stop alfresco
$cd /opt/alfresco
$ alfresco.sh stop

Thursday, October 25, 2007

NetBeans IDE on Linux

The NetBeans IDE is a free, open-source Integrated Development Environment for software developers.
The NetBeans IDE provides developers with all the tools they need to create professional
cross-platform desktop, enterprise, web and mobile applications.

To install NetBeans IDE on Linux (Steps given here are performed on FC7):

It needs Java SDK-1.5.x so first install Java SDK-1.5.x and the JAVA_HOME in the environment variable in the .bash_profile file

# Download NetBeans IDE from here.

Downloaded file be like this: netbeans-x_x_x-linux.bin

# Make the file executable

$ chmod +x netbeans-x_x_x-linux.bin
Run this file
$ ./netbeans-x_x_x-linux.bin

It will open the Launcher, accept the License and click Next.
Select the Java version you want to use with the IDE, specify the path where you want to install the NetBeans IDE.

It will install all the files in the selected folder to run the NetBeans IDE cd to the bin directory and run the command:

$ ./netbeans

Wednesday, October 17, 2007

Could not find default font "fixed" . X Server not starting

If you encountered this problem in your linux then most probably this is because of there is no enough space left in your hard disk

Login as root in the text mode and check the hard disk space:

$ df -h

If available space is very low then delete some unwanted files/folder and make more space.

Restart your machine.

Monday, October 15, 2007

Breakout game for Linux


Want to play your favorite BREAKOUT game on Linux box. Its open source clone version is available.

Download the sorce code from here .
Open the tar file and run the following commands in the terminal.

$cd lbreakout-x-xx
$ ./configure
$ make
$ make install

The executale will be installed at /usr/local/bin

Thursday, September 27, 2007

RMagick installation on Fedoras

RMagick requires ImageMagick and ImageMagick-devel libraries.
Your distribution may include at least some of these libraries by default and probably provides pre-built packages for the others. If not, these are available as source code tarballs from http://www.imagemagick.org/pub/delegates/.

Or you can install these using the yum command:

$yum install ImageMagick

$yum install ImageMagick-devel

RMagick also needs Windows TureType font, download the rpm from here:

http://www.zacharywhitley.com/linux/rpms/fedora/core/6/i386/msttcorefonts-2.0-1.noarch.rpm

Install this:
$ rpm -ivh msttcorefonts-2.0-1.noarch.rpm

Make a symbolic link the font dir to the place rmagick expects them:

ln -s /usr/share/fonts/msttcorefonts /usr/share/fonts/default/TrueType

Some applications based on RMagick also requires freeimage header files.
Download freeimage from here
http://freeimage.sourceforge.net/download.html
Unzip the file and cd to the freeimage dir and run following commands

# make
# make install

Now install RMagic using the gem

$ gem install RMagick --include-dependencies

Thursday, August 30, 2007

Connecting Bluetooth devices

Tested on FC7 running on Compaq Presario and Nokia-N73 and Sony w300i

Start the bluetooth device like mobile phone having bluetooth support.
Oviously device should have in-front of the Laptop.

Start the Bluetooth service on FC7.
System => Administration => Server Settings => Services => Bluetooth
Turn on the Wireless on FC7

Run the Bluetooth File Sharing
Applications => System Tools => Bluetooth File Sharing

To check whether FC7 is able to scan the mobile devices
Run at terminal:

$ hcitool scan

It will display the mobile name.

Now open the file browser to send file to mobile.

Right click on file => Send to => Bluetooth => Select the mobile name

In the Mobile it will ask for confirmation, click yes to accept the file from computer.

Wednesday, August 22, 2007

running mp3 and video on Fedora

As default Fedora installation does not support player for MP3 and some video format like avi and MP4, we have to install either MPlayer or VLC to play these files.

To install MPlayer and VLC:

Copy the freshrpm from here

Install this rpm:

$rpm -ivh freshrpms-release-1.1-1.fc.noarch.rpm

Now install MPlayer and VLC

$ yum -y install mplayer vlc

After successful installation you get the 'MPlayer' and 'VLC media player' menu in the Applications => Sound and Video

Wednesday, August 8, 2007

installing and running memcached

memcached is a general-purpose distributed memory caching system.
It is often used to speed up dynamic database-driven websites by caching data and objects in memory to reduce the amount the database needs to be read.

memcached is dependent on libevent library, so firstly download the source files for Libevent
from http://www.monkey.org/~provos/libevent/

Install libevent:

$ tar -xvf libevent-1.3c.tar.gz
$ cd libevent-1.3c
$ ./configure
$ make
$ make install

In Fedora the library (libevent-1.3c.so.1.0.3) will be installed at
/usr/local/lib
Create a link or copy this file to standard libarary location (/lib) of Fedora
$ cd /lib
$ ln -s /usr/local/lib/libevent-1.3c.so.1.0.3 libevent-1.3c.so.1

Download the latest memcached from http://www.danga.com/memcached/download.bml


$ tar -xzf memcached-1.2.2.tar.gz
$ cd memcached-1.2.2
$ ./configure
$ make
$ make install

Running:
$ memcached -h
(Will display various options)

To run as a deoman
$ memcached -d -u apache
Will start as daemon with default options Port(p): 11211 and Max memory (m) to use: 64MB

Wednesday, August 1, 2007

Create swap file in Fedora- Linux

Swap file is used by the Kernel for Virtual Memory.
It is recommended to have swap size double of the RAM but if RAM is more than enough (>512 MB) then
smaller swap has no issue.

To know the actual memory (RAM) and already swap on a Linux box use the free command.

$ free
total used free shared buffers cached
Mem: 507956 489860 18096 0 9580 76876
-/+ buffers/cache: 403404 104552
Swap: 1012084 69668 942416

Now to create extra swap file follow the steps:
(To create swap file of approx 1GB)

$ dd if=/dev/zero if=/usr/more_swap bs=1000000 count=1024

(It will create one swap file more_swap in /usr)

$ chmod 600 /usr/more_swap
$ mkswap /usr/more_swap
$ swapon /usr/more_swap


Now add this file to the /etc/fstab file (at last)
$ vi /etc/fstab

/usr/more_swap swap swap defaults 0 0

Whats new in Ajuby 0.5