blah.... blah.... blah...

My blah....blah....blah....
My Photo
Name:
Location: Delhi, Delhi, India

I'm a hacker, a free software advocate, and a student.

10 May 2006

 

Blog @ Blogger ends here....

No more blogging on Blogger, coz my blog contains invalid stuff. Will post new link, if I found a successfully validatable blog.

Credits: JavaShit emitted by Blogger.

Good Bye World


 

ReactOS

ReactOS, a Free and Open Source OS, compatible with Windows NT.

ReactOS Boot Loader Screen
ReactOS Boot Loader Screen
ReactOS Splash Screen
ReactOS Splash Screen
ReactOS Command Prompt
ReactOS Command Prompt
ReactOS Registry Editor
ReactOS About box
ReactOS About box
ReactOS Registry Editor

Screen shots of ReactOS, taken by me, on QEmu. There are more screenshots available at: http://www.reactos.org/xhtml/en/screenshots.html .


27 April 2006

 

Even I worked on PA-RISC too

Well, today I worked on PA-RISC processor based system, like one of my friend Gautam who worked on it @ his university.

Well, I was looking for some information on PA-RISC processors. I was surprised to know that most of its processors (forgot to mention, it is actually a family of processors) don't have L2 caches, recent ones (so big, 64 MiB L2 cache of PA-RISC vs. my 2 MiB L2 Cache of Pentium 4 ;-) ), and 2 processors in mid generation have L2 caches. Anyways, you can read more about PA-RISC processors, @.....

Now, comes to the GNU/Linux play with the box. The PA-RISC box runs Debian GNU/Linux (Linux pa64 2.6.15-1-parisc64 #2 Mon Mar 6 17:39:49 GMT 2006 parisc64 GNU/Linux). A session with box is displayed below:

21287@pa64:~$ cat /proc/cpuinfo
processor       : 0
cpu family      : PA-RISC 2.0
cpu             : PA8600 (PCX-W+)
cpu MHz         : 400.000000
model           : 9000/785/B2000
model name      : Kazoo W+
hversion        : 0x00005d00
sversion        : 0x00000481
I-cache         : 512 KB
D-cache         : 1024 KB (WB, 0-way associative)
ITLB entries    : 160
DTLB entries    : 160 - shared with ITLB
bogomips        : 796.67
software id     : 2003331839

21287@pa64:~$ cat /proc/meminfo
MemTotal:      1793744 kB
MemFree:         33096 kB
Buffers:         67936 kB
Cached:         917148 kB
SwapCached:          0 kB
Active:         784156 kB
Inactive:       715640 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:      1793744 kB
LowFree:         33096 kB
SwapTotal:      524280 kB
SwapFree:       524192 kB
Dirty:             352 kB
Writeback:           0 kB
Mapped:         586212 kB
Slab:           226992 kB
CommitLimit:   1421152 kB
Committed_AS:   839260 kB
PageTables:      10520 kB
VmallocTotal:   245728 kB
VmallocUsed:      3764 kB
VmallocChunk:   241600 kB
21287@pa64:~$ mount
/dev/sda5 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev type tmpfs (rw,size=10M,mode=0755)
/dev/sda1 on /mnt/sda1 type ext3 (rw)
21287@pa64:~$ /sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 00:10:83:FF:6D:23
          inet addr:192.168.1.7  Bcast:255.255.255.255  Mask:255.255.255.0
          inet6 addr: fe80::210:83ff:feff:6d23/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:54875344 errors:1 dropped:0 overruns:0 frame:0
          TX packets:93060665 errors:415 dropped:0 overruns:0 carrier:243
          collisions:5825773 txqueuelen:1000
          RX bytes:15922891349 (14.8 GiB)  TX bytes:41259342948 (38.4 GiB)
          Interrupt:65 Base address:0xf00

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1281187 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1281187 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:118301798 (112.8 MiB)  TX bytes:118301798 (112.8 MiB)

21287@pa64:~$ ping -b 192.168.1.255
WARNING: pinging broadcast address
PING 192.168.1.255 (192.168.1.255) 56(84) bytes of data.
64 bytes from 192.168.1.5: icmp_seq=1 ttl=255 time=0.624 ms
64 bytes from 192.168.1.4: icmp_seq=1 ttl=64 time=1.11 ms (DUP!)
64 bytes from 192.168.1.3: icmp_seq=1 ttl=255 time=2.04 ms (DUP!)
64 bytes from 192.168.1.6: icmp_seq=1 ttl=64 time=3.27 ms (DUP!)
64 bytes from 192.168.1.5: icmp_seq=2 ttl=255 time=0.482 ms
64 bytes from 192.168.1.4: icmp_seq=2 ttl=64 time=0.645 ms (DUP!)
64 bytes from 192.168.1.3: icmp_seq=2 ttl=255 time=0.880 ms (DUP!)
64 bytes from 192.168.1.6: icmp_seq=2 ttl=64 time=1.06 ms (DUP!)

--- 192.168.1.255 ping statistics ---
2 packets transmitted, 2 received, +6 duplicates, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.482/1.266/3.271/0.884 ms
21287@pa64:~$ lspci
0000:00:0c.0 Ethernet controller: Digital Equipment Corporation DECchip 21142/43 (rev 41)
0000:00:0d.0 Multimedia audio controller: Analog Devices AD1889 sound chip
0000:00:0e.0 IDE interface: National Semiconductor Corporation 87415/87560 IDE (rev 03)
0000:00:0e.1 Bridge: National Semiconductor Corporation 87560 Legacy I/O (rev 01)
0000:00:0e.2 USB Controller: National Semiconductor Corporation USB Controller (rev 02)
0000:00:0f.0 SCSI storage controller: LSI Logic / Symbios Logic 53c895a (rev 01)
0000:01:00.0 3D controller: Hewlett-Packard Company Visualize FXe (rev 03)
21287@pa64:~$ who
the1     pts/0        Apr 19 13:12 (192.168.1.5)
the1     pts/11       Apr 17 19:12 (192.168.1.11)
21233    pts/53       Apr 26 13:51 (dslb-082-083-234-190.pools.arcor-ip.net)
the1     pts/36       Apr 17 19:13 (192.168.1.11:0.0)
1444     pts/72       Apr 26 11:02 (80-219-149-147.dclient.hispeed.ch)
the1     pts/80       Apr 26 14:30 (adsl-68-23-47-109.dsl.chcgil.ameritech.net)
21287    pts/2        Apr 26 15:01 (61.246.76.12)
21225    pts/77       Apr 20 02:07 (s010600045a2d8536:S.0)
21225    pts/69       Apr 20 02:19 (s010600045a2d8536:S.1)
21287@pa64:~$ lsusb
Bus 001 Device 002: ID 05a4:9760 Ortek Technology, Inc.
Bus 001 Device 001: ID 0000:0000

And hey, I even ran a X application (xedit) also, not on my DISPLAY but some other user's ;-) . I even tried to sudo, but I'm not in /etc/sudoers ;-) . I even have a webpage of mine hosted there @ http://unixclan.no-ip.org/~21287/. And I even worked on Compaq Alpha (when ?? guess...).

Although, I dream to have one day my own PA-RISC box, my own Alpha box, my own IA-64 box, my own MIPS box, my own PowerPC box, my own PowerPC (64bit) box, my own Sparc box, any other processor box you can think of, and my own processor box. BTW, I'm not interested in processors, but in their boxes ;-) .

This post is dedicated to Gautam (the person who always inspire me).

Good Morning


23 April 2006

 

What is your good name ?

Today, while talking to Gautam, I came to know common mistakes I used to made while speaking in English. It's not just bad pronounciation, but some other mistakes also. e.g.

  1. I'm giving (taking) examination.
  2. Today, I'm going to give (take) an interview ?
  3. What's your good name ? (What is your name ?)
  4. and tons of more...

This usage of English is wrong. But, I still don't know which body governs English language ? There is more than this explained in the Wiki article titled Indian English.

Thanks to Gautam, for pointing out

There might be some other grammatical mistakes in this blog entry or some of my other writings, so please forgive me for my English ;-)


22 April 2006

 

Internet Radio, Podcast on GNU/Linux

Yesterday, I've experienced my first Internet Radio show on GNU/Linux. This show's invitation I've received from GPLv3 site. Though, I've not listened to the full show, but it was really cool show (covering some good topics from Java to Free software), available @ http://gplv3.fsf.org/av.

Well, there are other sites also which offer Internet Radio shows. One such site is ShoutCast.com, which maintains a registry of internet radio stations. The applications in GNU/Linux which support listening to Internet Radio shows are Rhythmbox, based on GStreamer, and amaroK based on GStreamer, Xine etc. The amaroK RPMs available from Fedora Extras, comes with only GStreamer backend, where support for Internet Radio is broken. So you can go for Xine backend, which can be downloaded as amarok-extras-nonfree RPM package from Livna RPM repository.

Podcasting support is also there. But in Rhythmbox, support for podcasting is broken, so I've opted for amaroK. A good podcast source is The Podcast Network, and a good podcast available is GNU/Linux User Show, but unfortunately it is available only in MP3 codec (advertised through RSS feed), not Ogg as I expected it to be. :-(

In case streaming audio (or video) is MPEG III (or any other patented codec), you also need appropriate codec plugins for the audio backend engines you're using.


13 April 2006

 

Wah Fedora Core 5 "Bordeaux" !!

Fedora Core 5 Desktop: Running X-CHAT on GNOME

Fedora Core 5 "Bordeaux", I recently installed this distribution. It consists of 5 discs, which I downloaded in 11 days on 128 Kbps (though not continuous running). Installation of it consisted of several hacks for me. But, I love hacks. ;-)

Initially, after download is over, I was unable to burn any ISOs as my CD-R/W is bad currently, so have to install (clean install I mean because upgrade creates some glitches :-(, so it is recommended that you keep a separate partition for /home) from hard disk. So, in order to bootstrap installation, I've loop mounted first disc, and extracted kernel (vmlinuz) and initrd (initrd.img) from /isolinux directory and copied it on hard disk. I copied on /boot partition. But make sure, wherever you copy this you won't overwrite any files with the same name. Now, restarted my machine. I'm on GRUB. So, at GRUB I switched to command line mode and did:

> kernel (hd0,1)/fc5/vmlinuz
> initrd (hd0,1)/fc5/initrd.img
> boot

This'll boot system from the hard disk using linux kernel copied from the CD. After booting, it starts Anaconda, and asks where to install from. I select Hard Disk and then it asks for the partition where CD ISOs are , and the directory where CD ISOs under that partition. Here I located my /home, and directory where I kept my ISOs. After some Next, Next. Next, it prompted for partitions where I want to install. I selected the /, /home, /boot, which I was previously using with Fedora Core 4 "Stentz". But there it gave me error that my /home can't be used. Why ?? because it's already mounted and is in use. So, I've to restart my old Linux kernel, and copied it to my FAT32 partition. And then re-started installation in the same way. Now, after this I selected a basic packages (including GNOME UI). And then finally, I installed my Fedora Core 5.

But story doesn't end here. Now, my X server display was not well, as I was expecting 1024x768 but I'm getting it also but only 800x600 at a time (rest is out of screen and I've to scroll). Checked my xorg.conf, it uses i810 driver. Being on 800x600 I'm happy to see that DRI support is working fine. So, anyhow, I changed "i810" driver to "vesa" in my xorg.conf. And restarted X, now it started in 1024x768, but oops no DRI, because it is VBE calls :-((

So, now here is another hack, I looked on several sites about this kind of problem, I found that I need to manually set my display mode timings that should work on my monitor. I found a tool xtimings, that generates appropriate modeline based on certain parameters. But that didn't work either as modeline it generated my monitor can't handle, and hence same problem. Finally, I entered IRC channel #fedora on irc.freenode.net, there I found a hacker RizeNine who suggested too many things but nothing worked. Finally, I asked him if there is any tool which can print current modeline, he suggested xvidtune. I started my X server with "vesa" driver into 1024x768 mode. From the shell, I executed this command:

[wahjava@homepc ~]$ xvidtune -show
"1024x768"     0   1024 0 0 0    768  0  0  0 -hsync -vsync

I copy pasted this modeline into my xorg.conf and reset display driver to "i810" and restarted X. Yippee!!, it worked and DRI is working too.

Now, the final hack. I'm unable to install rest of the packages from ISO images I downloaded, becuase the Fedora Core team, removed system-config-packages utility, and replaced it with pirut, and GUI for yum. Anyways, I've not hacked in this yet. So, might hack very soon

But, Fedora Core 5 is really very-very improved esp. with application like Beagle, searching is very fast. The improvements are great. And forgot to mention an important thing. Well, in other Fedora Core has undergone a great change except the installation problem.

And, BTW X11 progressed to X11R7.


26 March 2006

 

Outlook Express to mbox conversion

Yesterday, I was at my dad's office. He recently migrated some of his office PCs to Linux. One of the big problems encountered after transition to Linux is migration of e-mails from his previous e-mail client Microsoft Outlook Express 6 (on Microsoft Windows). I'm already using Evolution since November' 2005 (since I got an internet connection at my place :-D). I've heard of Outport for export of mails from Microsoft Outlook Express. So, I downloaded and installed it on his Windows OS. And then started it but it terminated with an error saying Microsoft Outlook is not installed. Oops, but we're not using Microsoft Outlook. So, all the hope of exporting mail from Outlook Express was lost till I got an idea

The idea to export a folder was to select all mails in any folder, and then using DnD feature provided by Windows (drag-and-drop), drag them to a Explorer window and drop them (a CommonDialog will work too but I've not tried that). This will copy all mails in as .EML files in the current directory in Explorer window. The good thing about these .EML files are they're plain text files representing a mail in MIME format which mbox file uses.

An mbox file looks like below. When mbox is passed to file utility for recognition it recognizes as ASCII mail text, with very long lines. Whenever a new mail arrives it is appended to mbox with a starting line similar to From tycoon@someorganization.tld Tue Jul 31 13:21:11 2008. This line is not part of MIME specification.

From evolution@novell.com Tue Sep 25 07:45:12 2001
Return-Path: <evolution@novell.com>
Received: from pop.novell.com (IDENT:mail@localhost [127.0.0.1]) by
        pop.novell.com (8.9.3/8.9.3) with ESMTP id HAA20680; Tue, 25 Sep 2001
        07:45:12 -0400
Received: from smtp.novell.com (smtp.novell.com [141.154.95.10]) by
        pop.novell.com (8.9.3/8.9.3) with ESMTP id HAA20659 for
        <evolution@novell.com>; Tue, 25 Sep 2001 07:45:10 -0400
Received: (qmail 5610 invoked from network); 25 Sep 2001 11:45:02 -0000
Received: from smtp.novell.com (HELO localhost) (141.154.95.10) by
        pop.novell.com with SMTP; 25 Sep 2001 11:45:02 -0000
From: "The Evolution Team" <evolution@novell.com<
To: Evolution Users <evolution@novell.com>
Content-Type: multipart/related; type="multipart/alternative"; boundary="=-t4dRE6cqcdSBHOrMdTQ1"
X-Mailer: Evolution/1.1.99 (Preview Release)
Date: 7 September 2005 14:45:00 +0300
Message-Id: <1001418302.27070.20.camel@spectrolite>
Mime-Version: 1.0
Subject: Welcome to Evolution!
Sender: evolution@novell.com
Errors-To: evolution@novell.com
....
....

So, now you know where to hack. ;-). Just wrote a simple shell script (or an operating system driver ;-) ) that concatenates each file and delimits them with the line similar to From tycoon@someorganization.tld Tue Jul 31 12:40:33 2008. Most of the mail programs doesn't consider this line to be meaningful (I think so) and consider it as a mail delimiter. So a fake line need resembling above needs to added before each mail entry. The from address and date are instead extracted from From: and Date: MIME headers. So basic pseudocode is

  1. Create a empty [mbox file]
  2. Initialize default delimiter [line]
  3. For each [file] in [list of files] do {
  4. Echo [line] to the [mbox file] in append mode1.
  5. Type [file] to the [mbox file] in append mode1.
  6. }

I'm not providing any shell script to do this job for you. Since one of the major pillars in GNU/Linux is Software Toolbox philosphy. And if you're learning these utilities, this might be a good project for you. If you're lucky enough somebody might have posted the script as comment in my blog. ;-)

1HINT: cat abcd.txt >>file_opened_in_append_mode.


 

A useful thought

The only key to success (or precisely optimised life) is precision. It doesn't matter with how much hardwork you achieved that precision. If you never achieved that precision you're not living optimally. In field of algorithms analysis, it is known as tightly bounding, running time of algorithm. In troubleshooting field, it means accurately identifying problems. Optimization of code depends on precise definition of what is the objective of code. Different words in different fields but the same meaning.

precision


11 March 2006

 

an AWKward day

A day towards learning AWK. Although I've not planned my day to learn AWK, but it happened accidentally (or by chance ;-)). Today, I was in my practical class, and there I saw an old machine is running Fedora Core 1. I thought what I can do with that system, since the system doesn't has any development tools. It has tools without documentation. Then I thought AWK might be there so, why not learn AWK. Because, I've tried learning AWK previously too many times, but wasn't successful (it was not tough, but because I don't know what to do with that language). So today, I thought why not XMLify, the /etc/passwd (one of the primary target of awk tutorials) and /etc/group. And then, I opened its infopages by executing info awk. but oops info is displaying its manpages. Then I recalled that on GNU/Linux machines AWK comes GAWK, so I did info gawk. And started reading Getting started.

So, within half-an hour I've produced my AWK script to XMLify /etc/passwd and /etc/group. Here I'm giving my AWK script to /etc/passwd.

# passwd2xml.awk: An AWK script to transform /etc/passwd file into passwd.xml
BEGIN { 
 FS=":";
 print "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<passwd>";
}
/:/  {
 printf "\t<user id=\"%s\" uid=\"%s\" gid=\"%s\" home=\"%s\" comment=\"%s\" password=\"%s\" shell=\"%s\"/>\n", $1, $3, $4, $6, $5, $2, $7;
}
END {
 print "</passwd>";
}

You can execute this script and then pipe that output to xmllint to check for well-formedness of the document as shown below:

[wahjava@pc awk]$ awk -f passwd2xml.awk /etc/passwd |xmllint -

GAWK also comes for Windows and available here.

BTW, this script is not the correct way to XMLify the /etc/passwd since XMLifying needs entitifying some characters e.g. <, > etc.


Archives

200601   200602   200603   200604   200605  

This page is powered by Blogger. Isn't yours?

There are some of my webpages tooo...

This blog is [ INVALID XHTML v1.0 ] [ INVALID CSS v2.0 ]