25 October 2008

Fedora is good!

Installed Fedora 9 on the same laptpo. works like a charm. There was some problem configuring the Synaptic touchpad. It would not take the taps but track the movement, that is solved.
Hooray!

25 May 2008

The travails of installing Ubuntu or why I hate Ubuntu

I have a Compaq 6720S laptop on which XP came preinstalled. I wanted to install some GNU/Linux distribution on it. I generally use Slackware or Fedora/Centos, hence there was no idea of Ubuntu creeping in at all. In fact, I loathed Ubuntu for its "dumbing down" of things to the point that system administration has beome a drag. Unfortunately, neither slackware 12.0 nor fedora could be used. Slackware had problems with the network and fedora 8 gave up on the display. Ridiculous i thought.
Anyway, I put in the 8.04 ubuntu DVD, it has about 3.5 GB of stuff in it. I ran it in the Live CD mode, things looked fine. So i pressed the install button on the desktop. No problem! The installer asked me the usual questions on language, time zone, partitioning and few other steps. I was expecting it to ask about the packages to be installed, but no it started installing. I thought that it would install everything on DVD, and groaned mentally on the time lost. I was checking the partition it had made as root, and i found the usage climbing steadily to 5GB. Then, to my utter surprise, the installation manager told me that it was uninstalling packages and the usage steadily went down from 5.0GB to 2.3GB. What stupidity and waste of time!
Ok, i waited till everything was over and configured the ethernet. The Wireless networks weer detected automatically, which is good. However, as i was switching between wireless and wired, the ethernet stopped working. Rebooting did not help and I left things as they were as it was getting late. In the morning, i began where i had stoped. I disabled the wireless, and still no ethernet. I went to administration settings and disabled and enabled the wired network, and it has started working. I am not sure if it will work on the next reboot though!
ok, i enabled NIS and NFS, no problem there. Though for mounting NFS, the timeout i think is set to be very long. I had forgotten to enable permissions on the NFS servers, for this new IP, but the timeout did not happen. anyway, not a major problem there.
Coming onto the fun part, which really pissed me off, i typed emacs..... and got a terminal (NO X11 emacs). I checked the file emacs, it was a sym. link to /etc/alternative/emacs! wow! what a bright idea! non standardise or Ubuntise! anyway, that was a link back to /usr/bin/emacs22 which again led to /etc/alternative/emacs22 and which again led back to /usr/bin/emacs-nox, that is NO X11. great!! so, i went again to package manager and selected emacs X11, but i got the strangest message that emacs is not supported or not available. hmmm. i guess the magicians at ubuntu find emacs to be dispensable.
of courswe, i had to install tetex and many other stuff.
i thought i would install opencv, ffmpeg, mplayer and also emacs from source. ffmpeg went off without a hitch, surprisingly. opencv configure script gave no errors, but the final status message showed that it did not find gtk+ 2.0 header files nor it could use libpng,libjpeg. the development files needed for usage apparently are not considered useful enough to be put in in the 3.5GB package!! i should have to download them from some repsitory, using the magic mantra chanted by millions of ubuntu fanboys everytime they want to install a simple software. i believe they get multiple orgasms this way, otherwise the rotten inconvenience of the thing would have convinced any sane user to give negative feedback to the developers.
ok i thought, at least let me try ICEWM. of course, the packages are not available, only 300-400 MB KDE/GNOME are available on the dVD, small sized desktops are passe, gimme big fat bloatware with plenty of eye candy and fancy window motion(which cause headache and eye strain) but nothing useful. i guess that unless some software ahs 50% bloat, it does not pass the ubuntu test for acceptance. compiling icewm from source is another bit of fun. configure script gives error on many development files, i do not have the patience to mention them here. i had to abandon the plan.
finally emacs from source! config. script shows non availability of xaw3dmdbus,png,jpg,xft,xpm,jerror,libpng,tiffio,gif_lib. the script gave up at this point, which leads to the question: WHAT THE FUCK IS 3.0 GB of SOFTWARE DOING ON MY HARD DISK?
this may seem to be an over-reaction but when one has to manage 20 computers, this is simply ridiculous.

30 March 2008

Blogged using Elinks

I have been trying out the elinks browser since a couple of days now. I had wanted to use a text browser for quite sometime now. Initially i started off with Lynx. However, I found links and Elinks especially to be very useful. Why a text based browser? well, pages load faster, lesser distraction from images( in some ways easier on the eye ), and also one can read the content with more concentration. One major drawback was the most email services would not open in a text browser. Thankfully, GMail now works very well in elinks. Unfortunately, Yahoo and rediffmail perform much poorly using this. rediff is practically useless. some important buttons in yahoo mail do not work. well, let me see how it goes! Three cheers for the developers and many heartfelt thanks!

02 March 2008

ICEWM

I have been using the ICEWM window manager for quite sometime now. The configuration is very simple, the themes are very nice and it is very fast. The hotkeys make perfect sense. Many thanks to the developers, may their tribe increase! Slackware should seriously consider adding ICEWM as the default desktop, XFCE-4 is also quite nice but nothing like ICEWM.

Virumandi, Traffic and Snatch

No Country for Old Men........

I personally thought that this movie was a bit overrated. Javier is sufficiently cool as the killer, though his novel way of dispatching people with the pressurised bolt struck me as a bit "novel", to borrow from Yes Minister. As an aside, the Indian critics who have been drooling over this would have ripped apart any Hindi movie if the villain in it would do some such antics. Tommy Lee Jones is also nice as the aged policeman and Josh Brolin is very good too. The most memorable scene for me is the one where he loads the gun after reaching the bank of the lake and gunning down the chaing dog at the last moment. The scene had me wondering if he would make it! However, all said and done the movie is a bit strange, the unsatisfying ending has been commented on by so many people. I personally did not like it very much; from what I read on IMDB etc. he plugs the guy's wife too at the end. It could have been made clearer. The looooong speech by Mr.Jones' character could have been cut down. However in my opinion the biggest spoilsport is the villain himself. He is too cold and robotic, does not make any sense to me. However, who am I to speak against the great Oscar judge coterie......

25 October 2007

OpenCV Problem with offset into video files.

OpenCV is unable to open into video files with offset. Guess we have to do it ourselves. The code which should take care of the offset is

/****************************************************************************/
#include
#include

int main()
{
CvCapture *video;
IplImage *im;
double wait;

cvNamedWindow("Video",1);
cvMoveWindow("Video",200,200);

video = cvCaptureFromFile("/home/sysad/Misc/Snatch.avi");
if(video==NULL)
{
abort();
}
cvSetCaptureProperty(video,CV_CAP_PROP_POS_AVI_RATIO,(double)0.75); // DOES NOT WORK CURRENTLY
im = cvQueryFrame(video);
wait = 1000.0/cvGetCaptureProperty(video,CV_CAP_PROP_FPS);

while(im!=NULL)
{
cvShowImage("Video",im);
cvWaitKey((int)wait);
im = cvQueryFrame(video);
}
cvReleaseCapture(&video);

return 0;
}

/************************************************************************/

Simplest workaround is to skip frames till one reaches the frame of interest!

21 October 2007

Pandal hopping in Mumbai

Yesterday night, 14 of us from the hostel went pandal hopping at major places in Mumbai. We started at 6:30 PM and returned at 2AM. We covered Vashi, Chembur, Shivaji Park(Dadar), Bandra, Santa Cruz and finally Lokhandwala. The crowds are certainly much lesser than in Calcutta but still impressive. The expat Bong population in Bombay is impressive and from all walks and classes of life. I have put up the photos here. All comments welcome! Note that I have not added the captions for the photos. One would notice that almost all of the goddess idols look the same. This is possibly due to the fact that at least at three of the places, the supplier of the idols was same person.

03 September 2007

Visit to Kanheri Caves

There were finally 11 of us who went to the Kanheri Caves, located within the Sanjay Gandhi National Park in Mumbai, starting from the 6. I can claim to have recruited 2 of them myself !! The more the merrier as they say. Well, the place was ok, bus ride took 1.5 hours. We had to wait for sometime inside for getting the internal transport. It takes approximately 20 minutes to reach the caves from the park gate and costs Rs.20/-. The caves are carved from rock. the photos are here. Apparently there is waterfall, but i found it less than good. We went over a short distance on extremely slippery surface, i myself plopped down while coming down an incline!!
Too tired to go for the Lion/Tiger Safari, two fellows who had taken the trip earlier assured us that it had a couple of mangy creatures.
The toilets are in a horrible condition, even for an Indian used to such things, its a shocker. Also, I am reliably told by people that in the off-season, couples have been robbed of belongings by squatters inside. There is nothing on a major scale and it is completely safe if one travels in the internal vehicle, but trekkers beware unless you are travelling in a big group.
Also, we found the usual set of smooching , grabbing,cooing frustrated couples who infest every possible public place cuddling each other in the latest romantic movie style. It is ironic that they seek "privacy", as they are wont to explain their frustrated antics, in the most public places. However, such is life.

31 July 2007

My .emacs file

I have been using emacs extensively for programming. While text editors are a matter of taste and getting used to the quirks, i find emacs very useful useful. For editing linux system files, I generally prefer vim for its speed.

Here is my .emacs file. The matlab.el file can be found easily by googling. Just copy paste below to enable, ruby mode, matlab mode, auto-indentation etc. If the font(bitstream vera sans mono) is not available on your system is not available, just change the font to "terminal", i find that tolerable for programming. Acknowledgments are due to the different people on the Internet for posting their .emacs file, unfortunately i never did remember the URLs from which i took the code snippets.

;;[C .emacs

;;; uncomment this line to disable loading of "default.el" at startup
(setq inhibit-default-init t)

;; turn on font-lock mode
(when (fboundp 'global-font-lock-mode)
(global-font-lock-mode t))

;; enable visual feedback on selections
;(setq transient-mark-mode t)

;; default to better frame titles
(setq frame-title-format
(concat "%b - emacs@" system-name))

;; default to unified diffs
(setq diff-switches "-u")
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(case-fold-search t)
'(current-language-environment "Latin-1")
'(default-input-method "latin-1-prefix")
'(global-font-lock-mode t nil (font-lock))
'(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify)))
'(transient-mark-mode t)
'(visible-cursor t))
(set-default-font "-bitstream-bitstream vera sans mono-medium-r-normal-*-12-*-75-75-m-*-*-*")
;; Make text mode as default and turn on Auto Fill
(setq default-major-mode 'text-mode)
(setq text-mode-hook 'turn-on-auto-fill)
;; For ruby
(autoload 'ruby-mode "ruby-mode" "Mode for editing ruby source files")
(add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
(add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode))
(autoload 'run-ruby "inf-ruby" "Run an inferior Ruby process")
(autoload 'inf-ruby-keys "inf-ruby" "Set local key defs for inf-ruby in ruby-mode")
(setq scroll-step 1)
(setq scroll-conservatively 1)
(global-set-key "\em" 'goto-line)
(global-set-key (read-kbd-macro "<delete>") 'delete-char)
;;(load "/usr/local/share/lush/etc/lush.el")
(add-to-list 'load-path "/nfs1/krishnan/.emacs.d/")
(autoload 'matlab-mode "/nfs1/krishnan/.emacs.d/matlab.el" "Matlab Editing Mode" t)
(add-to-list 'auto-mode-alist '("\\.m$" . matlab-mode))
(setq matlab-indent-function t)
(autoload 'matlab-shell "matlab" "Interactive MATLAB mode." t)
(setq matlab-shell-command-switches '("-nojvm"))

(global-set-key [(f9)] 'compile)
(setq compilation-window-height 8 )
(setq compilation-finish-function
(lambda (buf str)
(if (string-match "exited abnormally" str)
;;there were errors
(message "compilation errors, press C-x ` to visit")
;;no errors, make the compilation window go away in 0.5 seconds
(run-at-time 0.5 nil 'delete-windows-on buf)
(message "NO COMPILATION ERRORS!"))))

(set-cursor-color "wheat")
(autoload 'python-mode "python-mode" "Python Mode." t)
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
(add-to-list 'interpreter-mode-alist '("python" . python-mode))

(add-hook 'python-mode-hook
(lambda ()
(set (make-variable-buffer-local 'beginning-of-defun-function)
'py-beginning-of-def-or-class)
(setq outline-regexp "def\\|class ")))

(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:stipple nil :background "gray20" :foreground "wheat" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 120 :width normal :family "bitstream-bitstream vera sans mono")))))

Blogged with Flock