tag:blogger.com,1999:blog-82458152024-03-13T07:39:41.853-07:00Linux by Sankar SanI'm learning how to fall..Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.comBlogger45125tag:blogger.com,1999:blog-8245815.post-27598411148676984112007-02-08T16:19:00.000-08:002007-02-08T16:24:23.945-08:00Perl-ExpectIt's been a long time since I actually wrote a program to solve a problem. Ditch the previous post, 'cuz I found a much better SSH daemon for Win called <a href="http://www.freesshd.com/">FreeSSHD</a> which lets you run it with "ssh host command" just like I wanted. But even with a help page I found on the topic, I was unable to configure it to work without requiring a password, so I decided to finally get down to Expect (something I've claimed to know, tho' I never got it working to simulate a telnet job like I wanted) and found out that this code works!<br /><br />#!/usr/bin/perl<br />use Expect;<br />my $timeout=2;<br />my $exp=Expect->spawn("ssh xtp2 \"cmd.exe /c dir\"");<br />$exp->expect($timeout,<br /> [ "password:" => sub { my $self = shift;<br /> $self->send("root123\n")<br /> } ]<br /> );<br />$exp->soft_close();Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com1tag:blogger.com,1999:blog-8245815.post-79394168032610721972007-01-23T12:39:00.000-08:002007-01-23T12:58:06.111-08:00SSH on Windows!Oh yes, I got <a href="http://caspian.dotconf.net/menu/Software/SSHD-NT/">this package</a> and actually used PuTTY to ssh to my Windows machine and ran dir! :) <a href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/rexec.mspx?mfr=true">rexec</a> would work, but I couldn't find rexecd.Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com0tag:blogger.com,1999:blog-8245815.post-1157978562087274162006-09-11T05:25:00.000-07:002007-07-18T02:30:08.147-07:00Ubuntu<div align="justify">Its been all of seven months off this blog, but get ready for its rebirth 'cuz <a href="http://www.ubuntu.com/" title="linux for human beings">Ubuntu</a> has breathed a new lease of life into my Linux World! All you have to do is enter your postal address <a href="https://shipit.ubuntu.com/">here</a> (which is what I did) and they send you free CDs within a month! <b>I'm impressed!!</b><br /><br />I cannot but regale you with the exciting new features you have, which leaves Fedora way behind. 6.06 LTS (Long Term Support) was released in June '06. It comes with:<br /><br /><b>1. Firefox Version 1.5.0.3</b><br />Get <a href="http://www.google.com/tools/firefox/browsersync/">Google Browser Sync</a> to get all your settings (saved passwords, bookmarks, etc.) from Windows to Ubuntu.<br /><br /><b>2. Evolution with MS Exchange support</b><br />No more entering <i>hajjar</i> server hostnames/IP addresses and obscure username/password combinations to get it working. All it asks for is your OWA (Outlook Web Access) URL and your login/password and tada! Its all there up and running. What's more, the GAL (Global Address List) works.<br /><br /><b>3. Rhythmbox</b><br />iTunes-like music player which has Library, Podcasts, Sharing and even support for your iPod, from which it lets you play off everything (once you have the codecs installed, which I'll describe how to do shortly) even (I suspect) if your PC is not synced with the iPod (!!!)<br /><br />The first thing you have to do after you've installed it, is to get <a href="http://easyubuntu.freecontrib.org/">Easy Ubuntu</a> or <a href="http://www.getautomatix.com/">Automatix</a>, which gives you all the codecs you need to get started on MP3s, DVDs and whatnot. For this, I faced huge difficulties to configure my HTTP Proxy with Authentication. Finally, I put this in my .bashrc:<br /><br />export http_proxy= <br />"http://(workgroup)\\(username):(password)@(proxy):(port)/"<br />export ftp_proxy= <br />"http://(workgroup)\\(username):(password)@(proxy):(port)/"<br /><br />and PHEW! Its working now! Here's a screenshot by the way:<br /><a href="http://www.flickr.com/photos/snkutty/241438338/" title="Photo Sharing"><img src="http://static.flickr.com/93/241438338_06443bd555.jpg" width="500" height="375" alt="Ubuntu Screenshot" /></a><br /><br />More later...</div>Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com0tag:blogger.com,1999:blog-8245815.post-1139552355708326362006-02-09T22:05:00.001-08:002006-02-09T22:42:30.653-08:00HashMy new teammate is a Mandhala-like Gulti character. Quite fundoo (Thank God I didn't get some dumbass) and (almost;) as fast as I am. I've had a lot of technical quarrels with him and most are left hanging. One conclusive blow from either of us would settle all in one's favor.<br /><br />We are dealing with associative arrays today at the advanced perl session. My teammate stated that the hash key contains the memory location of the corresponding hash value. I retorted that this need not be true. He was supported by the facilitator too. This <a href="http://72.14.207.104/search?q=cache:QsHYgMVwzwEJ:docs.sun.com/app/docs/doc/817-6223/6mlkidlg8%3Fa%3Dview+associative+array+key+contains+the+address+of+the+value&hl=en&gl=in&ct=clnk&cd=2">SUN docs page cache</a> saved face!Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com0tag:blogger.com,1999:blog-8245815.post-1139408571211392942006-02-08T06:22:00.000-08:002006-02-08T06:22:51.296-08:00Forgot root password?<div align="justify">Gaurav gave me this useful tip:<br /><br />Allow the system to reboot to the GRUB splash screen, and then press "e". Select the line containing "kernel", and press "e" again. GRUB will display the line in edit mode. Add "single" to the end of the line, and press return. GRUB will return you to the previous screen. Press "b" to boot the system into what will now be single user mode. The system will come part of the way up, and then drop you into a root shell - the prompt will look like this: sh-2.05# _<br />Type "passwd" and set a new password. Type "exit"</div><br /><div class="media">[Listening to: Led Zeppelin - Physical Graffiti - Kashmir (8:32)]</div><br />Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com0tag:blogger.com,1999:blog-8245815.post-1133345157489274762005-11-30T02:05:00.000-08:002005-11-30T02:07:41.426-08:00SSH without passwordRealised that if they took this page off, we'd be done for, so I've decided to duplicate it here.<br />Courtesy: <a href="http://www.csua.berkeley.edu/~ranga/notes/ssh_nopass.html" title="SSH without password">Ranga</a><br /><br />The following steps can be used to ssh from one system to another without specifying a password.<br /><br /><span style="font-weight:bold;"> 1.</span><br /> On the client run the following commands:<br /><br /><i>$ mkdir -p $HOME/.ssh<br />$ chmod 0700 $HOME/.ssh<br />$ ssh-keygen -t dsa -f $HOME/.ssh/id_dsa -P ''</i><br /><br /> This should result in two files, $HOME/.ssh/id_dsa (private key) and $HOME/.ssh/id_dsa.pub (public key).<br /><br /><span style="font-weight:bold;"> 2.</span><br /> Copy $HOME/.ssh/id_dsa.pub to the server.<br /><br /><span style="font-weight:bold;"> 3.</span><br /> On the server run the following commands:<br /><br /><i>$ cat id_dsa.pub >> $HOME/.ssh/authorized_keys2<br />$ chmod 0600 $HOME/.ssh/authorized_keys2</i><br /><br /> Depending on the version of OpenSSH the following commands may also be required:<br /><br /><i>$ cat id_dsa.pub >> $HOME/.ssh/authorized_keys<br />$ chmod 0600 $HOME/.ssh/authorized_keys</i><br /><br /> An alternative is to create a link from authorized_keys2 to authorized_keys:<br /><br /><i>$ cd $HOME/.ssh && ln -s authorized_keys2 authorized_keys</i><br /><br /><span style="font-weight:bold;"> 4.</span><br /> On the client test the results by ssh'ing to the server:<br /><br /><i>$ ssh -i $HOME/.ssh/id_dsa server</i><br /><br /><span style="font-weight:bold;"> 5.</span><br /> (Optional) Add the following $HOME/.ssh/config on the client:<br /><br />Host server<br /> IdentityFile ~/.ssh/id_dsa<br /><br /> This allows ssh access to the server without having to specify the path to the id_dsa file as an argument to ssh each time.<br /><br />Helpful manpages:<br /><br /> * ssh(1)<br /> * ssh-keygen(1)<br /> * ssh_config(5)Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com2tag:blogger.com,1999:blog-8245815.post-1130375829669563252005-10-26T18:15:00.000-07:002005-11-03T01:43:36.750-08:00File associations in Fedora<div align="justify">Needed to open MP3 files with XMMS by just double-clicking them in Nautilus, so I looked up on how to change file associations. The Fedora Forum rocks! I <a href="http://forums.fedoraforum.org/showthread.php?t=26875" title="How-To: Mime Types and file associations with FC3 - Gnome 2.8">learnt</a> its quite a task! Here's how (with mplayer as example):<br /><br />-> /usr/share/applications/[application_name].desktop<br />This is the file where "defaults.list" will point to. One of the most important things inside this file is the entry "MimeType=".<br /><br /><i>E.g:</i> vi /usr/share/applications/mplayer.desktop<br /><i>[Desktop Entry]<br />Name=Movie Player<br />Comment=Play multimedia files and media<br />Icon=mplayer.xpm<br />Exec=mplayer %f<br />Terminal=false<br />MimeType=video/mpeg;video/x-msvideo;video/quicktime;video/x-ms-asf;video/x-ms-wmv<br />Type=Application<br />Categories=Application;AudioVideo;<br />Encoding=UTF-8</i><br /><br />-> /usr/share/applications/defaults.list<br />This file contains the applications which cause a double-click success. All Mime types will point to a desktop file. <br /><br /><i>E.g:</i> Separate multiple app names with ;'s.<br /><br /><i>video/x-ms-asf=mplayer.desktop<br />video/x-ms-wmv=mplayer.desktop</i><br /><br />-> /usr/share/applications/mimeinfo.cache<br />Contains information in similar form shown for file "defaults.list" in same directory. This file contains ALL associations given to a mime type. There is no need for a specified order of desktop files. <i>E.g:</i> Repeat above<br /><br />To do the same for XMMS, replace <i>realplayer.desktop</i> with <i>redhat-audio-player.desktop</i> in all these files..</div>Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com2tag:blogger.com,1999:blog-8245815.post-1129666181529213102005-10-18T13:03:00.000-07:002005-10-18T13:11:13.040-07:00Perfect bootAdded these lines to my /etc/grub.conf and now its booting Windows too!<br /><br /><i>title Windows XP<br /> map (hd0) (hd1)<br /> map (hd1) (hd0)<br /> rootnoverify (hd1,0)<br /> makeactive<br /> chainloader +1</i><br /><br />Also copied <a href="http://www.linuxquestions.org/questions/showthread.php?threadid=368226" title="pppoe-start as user">scripts</a> to let everyone connect to the net. <br />With it, I've gotten mom up to speed as well..Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com0tag:blogger.com,1999:blog-8245815.post-1129503521152738622005-10-16T15:15:00.000-07:002005-10-16T16:06:20.256-07:00Fedora Core 4<div align="justify">When I got FC3, I configured it to multi-boot, which caused a terrible <a href="http://sanlinux.blogspot.com/2005_01_01_sanlinux_archive.html" title="grub: WinXP/FC3 combo problems">problem</a> to crop up later. I didn't want to risk it happening again, so I decided I'd explore the possibilities of installing FC4 without letting it affect my Windows <a href="http://www.wdc.com/" title="Western Digital Hard Drives">hard drive</a>. <br /><br />There was only way I could leave the boot sector unchanged; Change the boot-up sequence in the BIOS and install GRUB and FC4 on my secondary hard drive. However, the kernel panicked while booting from the CD, saying "RAMDISK: Couldn't find valid ramdisk image starting at 0." It took me a while to find the <a href="https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=159026" title="machine oopses on booting from CD">fix</a>. <br /><br />I came across the usual network configuration issue next. I'm using a BSNL DataOne ADSL Internet connection now, with a Huawei SmartAX MT880. I had no idea how to configure it, until I stumbled upon this <b>amazing</b> <a href="http://www.roaringpenguin.com/penguin/open_source_rp-pppoe.php" title="Roaring Penguin - PPPoE for Linux">client</a>!<br /><br />The next problem was accessing my Windows volumes; NTFS is not supported, as usual. I got that <a href="http://linux-ntfs.sourceforge.net/rpm/instructions.html" title="NTFS RPMs for Fedora & RedHat">resolved</a> in a jiffy, after which I started on MP3 support and XMMS download. The XMMS site didn't give me any leads for FC4 though.<br /><br />Thats when I came across <a href="http://linux.duke.edu/projects/yum/" title="Yellow dog Updater, Modified">YUM</a>, which I'll rate the best thing ever made to help Fedora users! This behaves like a charm unlike up2date, probably thanks to the BSNL PPPoE connection. All thats left now is to save my WinAMP EQF settings and import them, and I'll be up n' running on all cylinders..!<br /><br />[Listening to Eric Clapton - Bell Bottom Blues]</div>Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com0tag:blogger.com,1999:blog-8245815.post-1121172950124859112005-07-12T05:55:00.000-07:002005-07-12T05:56:56.176-07:00ControllerI found <a href="http://www.acnc.com/04_01_00.html" title="Advanced Computer & Networking Corporation">the best RAID page</a> yet. I'm back to RAID for my new project which involves automating tests somehow, for Controller Firmware. I also have to study <a href="http://www.telelogic.com/products/synergy/cmsynergy/index.cfm" title="Telelogic">CM Synergy</a>, a Config Mgmt tool.Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com0tag:blogger.com,1999:blog-8245815.post-1120643166362535472005-07-06T02:46:00.000-07:002005-07-06T02:51:49.720-07:00ssh -nAfter y'day's <a href="http://snkutty.blogspot.com/2005/07/promotion.html" title="Insult wrapped as a hIKE">fiasco</a>, today was a rewarding day. I made a <a href="http://sanlinux.blogspot.com/2005/04/fast.html" title="Framework to Automate SNKutty's Tests">test framework</a> in April (just a month :-), tho' testing n' debugging took another month, 'cuz there were 100+ bugs. Its been two months since then.. n' y'day I was called to deploy it in the biggest project ($1m) in the RnD services part of my company. Its working perfectly, i.e. ZERO bugs! <br /><br />I encountered a major problem tho', 'cuz <a href="http://unixhelp.ed.ac.uk/CGI/man-cgi?ssh+1" title="UNIX man pages : ssh (1)">SSH commands</a> were causing the shellscript (thats what the framework is, a 700-line one at that!!) to exit! I broke my head for 24 hours since then till now, to discover the <b>'-n'</b> switch! Only the <a href="http://bama.ua.edu/cgi-bin/man-cgi?rsh+1" title="UNIX man pages : rsh (1)">Solaris rsh page</a> told me what <i>"avoids unfortunate interactions between rsh and the shell which invokes it"</i>. I tried it for ssh and thankfully, it worked!!Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com0tag:blogger.com,1999:blog-8245815.post-1120105983717254572005-06-29T21:33:00.000-07:002005-06-29T21:34:58.706-07:00PythonI've started learning <a href="http://python.org/" title="Python Programming Language">Python</a>.. looks good. There's a nice guide <a href="http://wiki.python.org/moin/BeginnersGuide/Programmers" title="Python Tutorial">here</a>.Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com1tag:blogger.com,1999:blog-8245815.post-1113915491773801162005-04-19T05:58:00.000-07:002005-04-28T00:12:36.416-07:00FASTThat stands for <b>Framework to Automate SNKutty's Tests</b>. I just finished its BASH shell script implementation and will soon be putting up the code. I found a <a href="http://www.csua.berkeley.edu/~ranga/notes/ssh_nopass.html" title="SSH Without a Password">good page</a> here on how to configure SSH.. which I needed to do to capture server log files. I'll be posting links to more resources soon..<br /><br /><b><u>Update:</u></b> <br /><a href="http://geocities.com/snkutty/fast/design.doc" title="Word document">FAST documentation</a><br /><a href="http://geocities.com/snkutty/fast/fast.doc" title="TAR file">FAST code</a> (tar xvf fast.doc)<br /><br />To convert Excel-copy-textfile-pasted stuff to configuration file format, run this script on it:<br /><br /><i>#!/bin/bash<br />while read line<br />do<br /> if [[ $line == TC_UC* ]]<br /> then<br /> num=1<br /> ucid=$line<br /> ufil="${ucid}_Test.cfg"<br /> elif [[ x$line != x ]]<br /> then<br /> if [ ! -e $ufil ]<br /> then<br /> echo "Default_Verify_String=" >> $ufil<br /> echo "[Default_Cleanup]" >> $ufil<br /> echo "[@Default_Cleanup]" >> $ufil<br /> fi # End of if file doesn't exist<br /> echo "TCID@${ucid}_${num}" >> $ufil<br /> echo "[Test_Body]" >> $ufil<br /> echo "$line" >> $ufil<br /> echo "VERIFY@" >> $ufil<br /> echo "[@Test_Body]" >> $ufil<br /> echo " " >> $ufil<br /> let "num+=1"<br /> fi # End of line identify process<br />done<$1</i>Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com0tag:blogger.com,1999:blog-8245815.post-1111480589787333632005-03-22T00:36:00.000-08:002005-03-22T00:36:29.786-08:00BASHAfter Expect, its now time for me to learn <a href="http://www.gnu.org/software/bash/bash.html" title="BASH">Bash</a> [Bourne-Again Shell] n' shellscripting.. I found this excellent <a href="http://www.tldp.org/LDP/abs/html/part1.html" title="Advanced Bash-Scripting Guide">guide</a> which I'm looking through. As I'm sure you all know, bash is the command prompt or shell that is mainly used by Linux, so its really the most essential thing for someone who's going to work on such UNIX-like OSes..Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com0tag:blogger.com,1999:blog-8245815.post-1111134648234968442005-03-18T00:30:00.000-08:002005-03-18T00:30:48.233-08:00ExpectIts been a long time. I'm in a new project again, where I've to automate interactive applications as part of testing. I'm consulting my ex-PM (an outside resource) to work and he suggested <a href="http://expect.nist.gov/" title="The Expect Home Page">Expect</a> as a solution. Its done for the US Govt., viz. <a href="http://www.nist.gov/" title="National Institute of Standards and Technology">NIST</a> by this <a href="http://www.mel.nist.gov/msidstaff/libes/" title="Don Libes">dude</a>. To start off, I found this really helpful <a href="http://www.csc.calpoly.edu/~dbutler/tutorials/winter96/expect/" title="Expect Tutorial">tutorial</a>, with which I wrote my first Expect script. Besides, I found a good <a href="http://www.cotse.com/dlf/man/expect/index.html" title="Index of Expect commands">index</a> at another <a href="http://www.cotse.com/dlf/man/expect/bulletproof1.htm" title="Expect Reference">resource</a> on the <a href="http://www.cotse.net/" title="Church Of The Swimming Elephant">Cotse site</a>.. I'll keep this updated.Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com0tag:blogger.com,1999:blog-8245815.post-1107333322809197562005-02-02T00:35:00.000-08:002005-02-02T00:36:13.286-08:00MakefileHere's what your makefile (<i>with dmalloc support</i>) should look like..<br /><i>DMALLOC = ../dmalloc-5.4.2</i><br /><br />CC = gcc<br />INCLUDE = ./include<br />SOURCE = ./src<br />BIN = ./bin<br />OBJ = ./object<br />CFLAGS = -g -Wall -Werror -I$(INCLUDE) <i>-I$(DMALLOC) -DDMALLOC</i><br /><br />OBJECTS = file1.o file2.o ... <br /><br />vpath %.h $(INCLUDE)<br />vpath %.c $(SOURCE)<br /><br />binary: $(OBJECTS)<br /> $(CC) -o $(BIN)/binary $(OBJECTS) <i>${DMALLOC}/libdmalloc.a</i><br /> mv *.o $(OBJ)<br /><br />$(OBJECTS): common.h<br /><br />file1.o: file1.h<br />file2.o : file2.h<br />main.o : main.h<br /><br />clean :<br /> rm -f $(BIN)/binary<br /> rm -f $(OBJ)/*.oAslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com0tag:blogger.com,1999:blog-8245815.post-1107320317659114042005-02-01T20:58:00.000-08:002005-02-01T20:58:37.660-08:00Scripting and dmallocYou've to save it and make it executable: <i>chmod 775 modreg.tcl</i><br />I wrote an ordinary shellscript too.. start off with <i>#!/bin/sh</i> or wherever sh exists. Running it with sh filename also works, just like tcl filename will..<br /><br />I also learnt how to test for memory leaks with <b>dmalloc</b>. All you need is a folder dmalloc containing the program. Then..<br /><br />dmalloc-5.4.2]$ sh ./configure<br />dmalloc-5.4.2]$ make (make threadssl and make shlib)<br />dmalloc-5.4.2]$ cd ../Feb1/<br />Feb 1]$ alias dmalloc=../dmalloc-5.4.2/dmalloc<br />Feb 1]$ export DMALLOC_OPTIONS=log-stats,log-non-free,log-trans,log=logfile,inter=1 <br />Feb 1]$ dmalloc<br /><br />The output should contain the line: <br />Logpath 'logfile'<br /><br />Feb 1]$ make -f Makefile.dmalloc<br />Feb 1]$ ./bin/binary<br /><br />I'll supply details of the dmalloc Makefile shortly..<br />Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com0tag:blogger.com,1999:blog-8245815.post-1107319779263328122005-02-01T20:49:00.000-08:002005-02-01T20:49:39.263-08:00TCLI've been looking up a lot of TCL lately. Wrote my first script. Its for <b>modreg.tcl</b>, which modifies a field within a register without disturbing surrounding bits. Assume commands <b>readreg</b> (which reads the contents of a register, specified by its hexadecimal address in memory) and <b>writereg</b> (which writes a value to a register).<br /><br />#!/usr/bin/tclsh<br />#<br /># Usage : modreg.tcl reg value low high<br />#<br /># Example : modreg.tcl 0x340 0x11 3 7<br />#<br /># Now, this would read register 0x340, write the value 0x11 into<br /># bits 3 through 7 and write this back into register 0x340.<br />#<br /><br /># Power procedure<br />proc power {base p} {<br /> set res 1<br /> while {$p>0} {<br /> set res [expr $res*$base]<br /> set p [expr $p-1]<br /> }<br /> return $res<br />}<br /><br /># Check arguments<br />if {$argc != 4} {<br /> puts "Invalid arguments!"<br /> return 0<br />}<br /><br /># Read arguments into variables<br />set reg [lindex $argv 0]<br />set new [lindex $argv 1]<br />set low [lindex $argv 2]<br />set high [lindex $argv 3]<br /><br /># Swap low and high if user entered them backwards<br />if {$low > $high} {<br /> set temp $low<br /> set low $high<br /> set high $temp<br />}<br /><br /># Process high<br />set high [expr $high+1]<br /><br /># Read register value into 'val' with the 'readreg' command<br />set val [exec readreg $reg]<br /><br /># Process variables 'highp' and 'lowp' from low bits and high bits<br />set highp [expr {[power 2 $high]-1}]<br /><br />if {$low == 0} {<br /> set lowp 0<br />} else {<br /> set lowp [expr {[power 2 $low]-1}]<br />}<br /><br /># Find number to AND with 'val' to clear the appropriate bits<br />set and [expr {0xffffffff - $highp + $lowp}]<br /><br /># Clear the appropriate bits<br />set clear [expr {$val & $and}]<br /><br /># Left-shift the value to be written to the field by appropriate amount<br />set or [expr {$new << $low}]<br /><br /># Find result by ORing this with 'clear'<br />set result [expr {$clear | $or}]<br /><br /># Write this result into the register with the 'writereg' command<br />set ret [exec writereg $reg $result]Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com0tag:blogger.com,1999:blog-8245815.post-1105944838544377442005-01-16T22:53:00.000-08:002005-01-16T22:55:24.520-08:00grub: updateDarn, I just found <a href="http://forums.techguy.org/archive/index.php/t-259611.html" target="_blank">this page</a> which possibly has a fix to the problem mentioned below! Omigosh, what would people do without the Internet?! Format the C drive and re-install Windows probably!! Just like the dunce did on my home PC :`-(Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com1tag:blogger.com,1999:blog-8245815.post-1105944571029312142005-01-16T22:49:00.000-08:002005-01-16T22:53:04.240-08:00grub: WinXP/FC3 combo problemsA major <a href="https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=115980" target="_blank">problem</a> cropped up on the PC at home. <br />Grub stopped booting WinXP, saying:<br /><br />rootnoverify (hd0,0)<br />chainloader +1<br />Error 13: Invalid or unsupported executable format<br /><br />They got a technician, who knew zilch about Linux. He tried repairing WinXP, which I knew wouldn't work. Finally, he had to format C drive and re-install Windows, overwriting the MBR n' removing access to FC3.<br /><br /><u>My advice:</u> If you're installing Fedora on a system which already has Redhat, do NOT upgrade grub- leave it as it is..Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com2tag:blogger.com,1999:blog-8245815.post-1105441501354398442005-01-11T03:05:00.000-08:002005-01-11T03:09:10.586-08:00strtodFunny.. <i><b>strtod</b></i> doesn't support hexadecimal in <i>FreeBSD</i>. Use this instead:<br /><br />/*************************************************************************<br /> * NAME: strtodec <br /> * SUMMARY: Converts string to decimal number<br /> * RETURNS: Returns the decimal number.<br /> * AUTHOR: Sankar N.<br /> ************************************************************************/<br />int strtodec (const CHAR8 *src) {<br /> /* Integer to hold resulting value */<br /> int dec;<br /> <br /> /* Check if the string contains a hexadecimal number */<br /> if ( ('0' == *(src)) && ( ('x' == *(src+1)) || ('X' == *(src+1)) ) ) {<br /> sscanf (src, "%x", &dec);<br /> } else {<br /> /* String contains decimal number */<br /> sscanf (src, "%d", &dec);<br /> }<br /> return (dec);<br />}Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com0tag:blogger.com,1999:blog-8245815.post-1105441120244800582005-01-11T02:58:00.000-08:002005-01-11T03:00:13.586-08:00smpI read that a Linux kernel suffix of <i>smp</i> implies a multi-processor system. Funny.. FC3 installed 2.6.9-1.667smp on my Intel P4 @ 2.8GHz (with HT)..<br /><br /><i>(Listening to Temple of the dog - Say hello to heaven...)</i>Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com0tag:blogger.com,1999:blog-8245815.post-1105356812017686252005-01-10T03:26:00.000-08:002005-01-10T03:33:32.016-08:00automountHave been battling with /etc/fstab to automount the ntfs partitions at startup and make them accessible to ordinary users. Almost had to admit defeat, when I came across <a href="http://www.mjmwired.net/resources/mjm-fedora-fc3.shtml#ntfs">the key</a>.
<br />
<br />/dev/hda1 /mnt/C ntfs ro,user,umask=0222 0 0
<br />/dev/hda5 /mnt/F ntfs ro,user,umask=0222 0 0
<br />
<br /><i>(Listening to Collective Soul - The world I know...)</i>Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com0tag:blogger.com,1999:blog-8245815.post-1105089038091776152005-01-07T01:02:00.000-08:002005-01-07T01:10:38.090-08:00MusicI was stunned when XMMS didn't play MP3, popping up some message about copyright/patent issues. Well, I found the solution by doing an <a href="http://rpm.pbone.net/">rpm search</a> for xmms-mpg123. The XMMS site showed me <a href="http://www.xmms.org/faq.php#General3">where to get winamp equalizer presets</a>. Useful!
<br />
<br /><i>(Listening to Eric Clapton - My Father's Eyes...)</i>Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com0tag:blogger.com,1999:blog-8245815.post-1105083795800671782005-01-06T23:30:00.000-08:002005-01-07T00:35:37.006-08:00FC3I was home last week. I didn't have Linux, so I thought I'd install it. The ISO images were there at the <a href="http://www.redhat.com/fedora/">Fedora site</a>.. for 3 CD's! My connection doesn't let me download that much, so I went to a shop and found just what I wanted! <a href="http://www.linuxforu.com/">LFY</a> were giving a <b><i>Fedora Core 3 DVD</i></b> with their mag! Everything worked fine- sound, cable modem, etc. all detected..
<br />
<br />What's more, my dream came true.. It packaged Ximian Connector (MS Exchange support) with <a href="http://www.novell.com/products/desktop/features/evolution.html">Evolution</a>. Back at work, I had to check it out pronto, so with the CDs, I installed it over Redhat and got the usual problem with the sound card, resolved from the <a href="http://www.alsa-project.org/">ALSA site</a>.
<br />
<br />Next, the <i>mount: ntfs not supported by kernel</i>. I followed instructions and downloaded the rpm from the <a href="http://linux-ntfs.sf.net/">Linux-NTFS site</a>. Now thats working too! :)
<br />Put the icing on the cake by configuring the drives to automount by editing the <a href="http://www.humbug.org.au/talks/fstab/fstab.html">/etc/fstab</a> file. Ready to rock n' roll!!Aslanhttp://www.blogger.com/profile/03049266073181850129noreply@blogger.com0