Monday 27 August, 2007

Extract the RAR file in Linux

If you are using ubutu/debian, install the unrar package using apt-get

# apt-get install unrar


List the files in RAR archive

$ unrar l file.rar

To test the integrity of the RAR archive

$ unrar t file.rar

To extract the files into the current directory

$ unrar e file.rar

To extract the files into the some other directory(use full path)

$ unrar x file.rar

Debian/Ubutnu run levels(Using inittab)

In ubuntu, you can't find any file name inittab under /etc.
ubuntu call it as UpStart(http://upstart.ubuntu.com/)

First, we look at the run levels in ubuntu


* 0 - Halt
* 1 - Single
* 2 - Full multi-user with display manager (GUI)
* 3 - Full multi-user with display manager (GUI)
* 4 - Full multi-user with display manager (GUI)
* 5 - Full multi-user with display manager (GUI)
* 6 - Reboot

refer the following link and look at the section 10.5

http://www.debian.org/doc/FAQ/ch-customizing.en.html

If you want to know the current runlevel, just give

zoobave@zoobave-desktop:~$ runlevel
N 5

There are two ways are available to change the current runlevel
I)use the telinit command

zoobave@zoobave-desktop:~$ sudo telinit 3


II) Create/Edit the /etc/initab file and change the the initdefault value in the
id:3:initdefault entry

# /etc/inittab: init( configuration.
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $

# The default runlevel.
id:3:initdefault:

# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS

# What to do in single-user mode.
~~:S:wait:/sbin/sulogin

# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.

l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6
# Normally not reached, but fallthrough in case of emergency.
z6:6:respawn:/sbin/sulogin

# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

# Action on special keypress (ALT-UpArrow).
#kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work."

# What to do when the power fails/returns.
pf:owerwait:/etc/init.d/powerfail start
pn:owerfailnow:/etc/init.d/powerfail now
po:owerokwait:/etc/init.d/powerfail stop

# /sbin/getty invocations for the runlevels.
#
# The "id" field MUST be the same as the last
# characters of the device (after "tty").
#
# Format:
# :::
#
# Note that on most Debian systems tty7 is used by the X Window System,
# so if you want to add more getty's go ahead but skip tty7 if you run X.
#
1:2345:respawn:/sbin/mingetty --noclear --autologin matt tty1
2:23:respawn:/sbin/mingetty tty2
3:23:respawn:/sbin/mingetty tty3
4:23:respawn:/sbin/mingetty tty4
5:23:respawn:/sbin/mingetty tty5
6:23:respawn:/sbin/mingetty tty6


But, there is no difference between runlevels 2,3,4 and 5. If you want to customize, add/remove the entries in /etc/rcN.d/ directory
For, example, if you don't want to start your X server during runlevel 3, just remove the S13gdm file under /etc/rc3.d/ directory

zoobave@zoobave-desktop:~$ sudo rm /etc/rc5.d/S13gdm

Thursday 23 August, 2007

Manually change the default login session

1) Goto the user's home directory
  $ cd

2) edit the file .dmrc
  $ gedit .dmrc 

3) change the session to kde (or) gnome
[Desktop]
Session=kde
4) save the file and logout

Force file system check during next boot

Its very simple, just create a "forcefsck" in root (/) directory
$ sudo touch /forcefsck

Google Talk (gtalk) for Linux

I have been searching a long time for google talk for linux. Somebody suggest me to use gaim (or) pidgin jabber account. But, i couldn't make a call to gtalk users.
I found two packages to make the voip calls to gtalk users in linux

1) Gizmo (http://gizmoproject.com/)
2) Jabbin (http://www.jabbin.com/int/index.php/configure-jabbin-for-google-talk/)

Scons

http://www.scons.org/
SCons is an Open Source software construction tool—that is, a next-generation build tool. Think of SCons as an improved, cross-platform substitute for the classic Make utility with integrated functionality similar to autoconf/automake and compiler caches such as ccache. In short, SCons is an easier, more reliable and faster way to build software.

Some Popular Linux IDEs

jedit(PHP, Python)
vim, gvim
Emacs, XEmacs
Elipse
MonoDevelop(C#)
Kdevelop
gedit
bluefish(HTML, CSS, PHP)
netbeans (Java)
quanta (HTML, CSS)
Anjuta (C, C++)
nano (PERL, CGI)
nvu (HTML)
Glade
JBuilder
nvi
screem (HTML, XML)
freeRIDE (Ruby)
wing IDE (Python)
Zend Studio (PHP)
Dev-PHP (PHP)
IntelliJ IDEA (Java)
SciTE
Kate
Kylix
eric3 (Python, Ruby)
NEdit
JGRASP (Java, C++)
Geany
Code::Blocks (C++)

Wednesday 22 August, 2007

Run the shell scripts like batch file in M$ Windows

Add the current directory to the $PATH environment variable

$ PATH = .:$PATH
$ export $PATH

$ file.sh
(instead of [./file.sh] or [sh file.sh] )

Web 2.0 ... The Machine is Us/ing Us

Writing Portable Code

In 'C' or some other programming languages like C++, we often used to declare a variable like this

int a;

we still assume that the size of the integer is 2 bytes (16 bits). But it is not in all cases. The size of the integer depends on the word size of a corresponding processor.
So, This kind of variable declaration leads to the non portable code across different hardware. So, we should declare the variables only based on WORD size of the processor

We may try the following code

typedef char int8_t; (for 8 bit interger)
typedef unsigned char uint8_t; (for 8 bit unsigned interger)

uint8_t a;

we can make use of stdint.h for other size variables.

Fastest KDE Distro

Nimblex sub100 was released yesterday. From the release notes :
"It was just released - the smallest live CD in the world with KDE.
It's just under 100 MB and gathers together Linux kernel 2.6.21, KDE
3.5.7, xine media player, XMMS, GIMP and other software. NimbleX
sub100 is most likely the fastest distro to boot in KDE and from the
tests that where performed so far the fastest boot time was 35
seconds. You can get it from nimblex.net and use it as your portable
OS. ... This is not a new version of NimbleX; it's just a different
edition that has the technology that will be at the base of the next
version."

Tuesday 21 August, 2007

How Windows Users Survive

http://www.tuxgirl.com/archive.php?id=33

IE 4 Linux

http://www.tatanka.com.br/ies4linux/page/Main_Page
IEs4Linux
is the simpler way to have Microsoft Internet Explorer running on Linux (or any OS running Wine).

Download BitTorrent Files through Your Browser without a Client Installed


Let's say you're sitting in an Internet cafe or public library computer, and you want to download a file using BitTorrent. Most likely, a BitTorrent client like µTorrent or Azureus hasn't been installed so you might think you're out of luck.

There are actually two things you can do at this point. If you want to schedule a download to your home computer remotely, you can use µTorrent's WebUI feature to control µTorrent over the Internet. You can manage all aspects of downloading a BitTorrent file using WebUI.

Alternatively, if you want to download a file to a public computer where there are administrative restrictions on installing additional software, you can use BitLet. It's a completely browser-based BitTorrent client and probably the simplest way yet to download torrents.

All you need to do is point to a torrent file's URL and hit "Download torrent" to get started. For instance, let's say we want to download Lawrence Lessig's book Free Culture in PDF format.

The URL to the torrent can be found on Legaltorrents. Just paste it into the URL field, hit Download, and select the directory where you want to save the ebook. Then the download will start automatically. You can even resume downloads.

The only troublesome thing about BitLet is that you need to have Java installed and enabled in your browser for it to work.

Listen to Local Radio Stations

Tune directly with Amarok (Ctrl-O, followed by URL)

English:
http://www.class95.sg/asx/fm950.asx
http://www.987fm.sg/asx/fm987.asx
http://www.938live.sg/asx/fm933.asx
http://www.gold90.sg/asx/fm905.asx
http://www.symphony.sg/asx/fm924.asx
http://www.lush995.sg/asx/fm995.asx
http://www.international963.sg/asx/fm963.asx

Chinese:
http://www.yes933.sg/asx/fm933.asx
http://www.love972.sg/asx/fm972.asx
http://www.capital958.sg/asx/fm958.asx

Malay:
http://www.ria.sg/asx/fm897.asx
http://www.warna.sg/asx/fm942.asx

Tamil:
http://www.oli.sg/asx/fm968.asx

Smart DAB (Digital)
Cruise: http://www.smartradio.sg/asx/dab02.asx
ClubPlay: http://www.smartradio.sg/asx/dab01.asx
JKPop: http://www.smartradio.sg/asx/dab03.asx

ChineseEverGreens: http://www.smartradio.sg/asx/dab05.asx
PlanetBollyWood: http://www.smartradio.sg/asx/dab04.asx

Friday 17 August, 2007

cdecl

Cdecl (and c++decl) is a program for encoding and decoding C (or C++) type declarations. The C language is based on the (draft proposed) X3J11 ANSI Standard;

root@dvm-desktop:/home/dvm# cdecl

Type `help' or `?' for help
cdecl> ?
[] means optional; {} means 1 or more; <> means defined elsewhere
commands are separated by ';' and newlines
command:
declare as
cast into
explain
set or set options
help, ?
quit or exit
english:
function [( )] returning
array [] of
[{ const | volatile | noalias }] pointer to

type:
{[] [{}] []}
{ struct | union | enum }
decllist: a comma separated list of , or as
name: a C identifier
gibberish: a C declaration, like 'int *x', or cast, like '(int *)x'
storage-class: extern, static, auto, register
C-type: int, char, float, double, or void
modifier: short, long, signed, unsigned, const, volatile, or noalias
cdecl>
cdecl> declare fptab as array of pointer to function returning pointer to char
char *(*fptab[])()
cdecl>

Thursday 16 August, 2007

Blackle - Black Google

This is really interesting indeed!!!
http://www.blackle. com
A few months ago, TreeHugger Mark Ontkush wrote a post on his blog
EcoIron titled Black Google Would Save 750 Megawatt-hours a Year. The post
lays out the following train of thought. "An all white web page uses
about 74 watts to display, while an all black page uses only 59 watts."
Google, which has a white background and gets about " 200 million
queries a day " could reduce global energy use by 750 Megawatt-hours a year
by simply changing the color of its homepage to black. (For more
detailed calculations and assumptions check out the original post here .)
In response to this post a black version of Google emerged called
Blackle.com. According to Blackle's homepage at publication time, 4,408.917
Watt hours have been saved by. The site encourages users to "make a
difference today [by] … Blackling "energy saving tips" or visit[ing]
treehugger.com a great blog dedicated to environmental awareness." Nice
ideas. But how does the search measure up? Very well indeed. Give it a
whirl yourself and start saving energy one search at a time. ::
Blackle.com

Nokia recalls batteries; at risk to explode

http://www.nokia.com/batteryreplacement/en/

Tuesday 14 August, 2007

Monday 6 August, 2007

Sunday 5 August, 2007

Switch to Linux!

GNU/Linux, or simply Linux, is an alternative to Microsoft Windows. It is easy to use and gives more freedom to users. Anyone can install it: Linux is free as in freedom, and often available free of charge.

http://www.getgnulinux.org/

Ubuntu Easter Eggs

http://www.astralsin.com/archives/tech/linux/ubuntu-easter-eggs/

50 things you need to know about Ubuntu

http://techiqmag.com/2007/07/22/50-things-you-need-to-know-about-ubuntu-50-41/

Differences Between Google and Yahoo

http://answers.yahoo.com/question/index;_ylt=AgYzmRSUjk1bMGwiobRa4AEjzKIX?qid=20070801025806AAY1ThB

ThisNickIsTaken: "Google has a philosophy of keeping things simple so that people who are technically challenged can use it without getting confused, Also that simple things are fast.. Yahoo believes in feature rich application.. their products are more customizable and complex."

Gags: "It's a difficult one to answer since both companies are positioned very very differently; on face value, Yahoo looks hip and colorful, whereas Google looks simple and elegant; (...) Google is more thoughtful and strategic, Yahoo is flamboyant and more reactive; Google concentrates on value added solutions rather than presentation and Yahoo concentrates on superb presentation followed by value creation."

Ravelin101: "Yahoo has tons of media and ADS (loads slower). Google search is better (faster) only text ads. I started with Yahoo since I've known it first: Mail, Photos (now Flickr), Geocities but since Google's introduction, I've been moving things to Google Mail, Photos (Picasa), Googlepages."

So Google is strongly associated with simplicity, usefulness, pages that load fast (in one word: text), while Yahoo is connected with rich interfaces, complex designs, pages that load slowly (in one word: multimedia). Gags even called Yahoo flamboyant, which means "elaborately and heavily ornamented". It will be interesting to see if the acquisitions of YouTube and DoubleClick will change people's perception about Google.

Differences Between Google and Yahoo

http://answers.yahoo.com/question/index;_ylt=AgYzmRSUjk1bMGwiobRa4AEjzKIX?qid=20070801025806AAY1ThB

ThisNickIsTaken: "Google has a philosophy of keeping things simple so that people who are technically challenged can use it without getting confused, Also that simple things are fast.. Yahoo believes in feature rich application.. their products are more customizable and complex."

Gags: "It's a difficult one to answer since both companies are positioned very very differently; on face value, Yahoo looks hip and colorful, whereas Google looks simple and elegant; (...) Google is more thoughtful and strategic, Yahoo is flamboyant and more reactive; Google concentrates on value added solutions rather than presentation and Yahoo concentrates on superb presentation followed by value creation."

Ravelin101: "Yahoo has tons of media and ADS (loads slower). Google search is better (faster) only text ads. I started with Yahoo since I've known it first: Mail, Photos (now Flickr), Geocities but since Google's introduction, I've been moving things to Google Mail, Photos (Picasa), Googlepages."

So Google is strongly associated with simplicity, usefulness, pages that load fast (in one word: text), while Yahoo is connected with rich interfaces, complex designs, pages that load slowly (in one word: multimedia). Gags even called Yahoo flamboyant, which means "elaborately and heavily ornamented". It will be interesting to see if the acquisitions of YouTube and DoubleClick will change people's perception about Google.