Archive for the ‘linux’ Category

SMR with | htiw RMS

Thursday, February 10th, 2005

RMS was in Hyderabad, and I attended his talk at Hara Hara Kala Bhavan, near Parasize.

I was late, but thank god, I missed a part of the Telagu intorduction which continued for about half an hour.

Then something strange happened. RMS fells off his chair. That looked strange to me. Looked like he was trying to bend for something and suddenly he gets up rubbing his knee. Was he asleep, dont know. Can be coz of that telagu speech. I hope I will get the video of that. His reaction was great. He was kind of dancing on one feet, after getting up, and rotating. I can’t just explain. But it was funny.

Then he starts his speech with the words “He needs 10 cup of this tea, to keep awake for his talk”, and he really constantly kept on taking sips of tea during his 2 hrs+ talk.

He started his talk with the description of four freedoms -

0.) The freedom to run the program, for any purpose.
1.) The freedom to study how the program works, and adapt it to your needs. (Access to the source code is a precondition for this.)
2.) The freedom to redistribute copies so you can help your neighbor.
3.) The freedom to improve the program, and release your improvements to the public, so that the whole community benefits. (Access to the source code is a precondition for this.)

He explains the importance of these freedom as -
Your friend comes and asks your for a copy of a proprietory software you have. Now you have two evils to choose. First to give him the copy and break the lincence and the Second to keep the agreement but deny your friend. Thus proprietory software is anti society and should not be used/promoted.

Talked about spywares, with examples like WindowsXP (sends what you search to site, send the list of installed softwares while asking for upgrade), Windows Media Player and RealPlayer (send all that you see to its site).

Talked about DRM ( Digital Restriction Rights Management ), when the software refuses to work. funny.

Told abot Backdoor entry points in proprietary softwares. The incident that an Indian working for MS was caught with an agreement with AlQueda for installing backdoor entry point in XP. Said dont know how much tries were alreay successful.

“If you see someone drowning and if you know how to swin, and if you are not Bush then you have the moral duty to save him”. That was about stoping others from getting into the mess of proprietary software, but a nice comment.

Then the told why the name as kept GNU ?
Coz there was kind of trend of keeping acronym names, (Emacs example), and found gnu word interesting. He looked for 4 letter words like GINU, KINU, PINU but didnot get good word. gnu is a animal, funny word, and featured in a song. so GNU.

Fatta of “tea copier” for distributing tea.

It was followed by a real important message -
“We have spent 21 years on developing it, and we call it GNU, so please dont call it Linux by mistake”
“For all that we have done, give us some credit by calling it GNU/Linux”
“Credit is all about ego, but there is something more important, the vision. If you call it Linux, the concept of free software will not spread. only GNU brings that feeling. People call it Linux and miss the vision of free software”
“Linux was not free when it was released, it was licensed under GPL after 1992 only”

Some anti US comments. DVD playing software can not be free in US.

Then he stared anti patent talk. Mentiions progress bar, and help icon patent. Talks about india interest in Software+Hardware patent interests. Said its going to be a disaster if it happens. There will be patents for certain set of instructions.

Talks about MS giving free softwares to schools. Compared it to tobacco addiction. Schoold should refuse to it.

Then he wore a saint dress and did some bc like ” I am saint on the church of Emacs…. tbc “

A nice comment “You never know who US is going to invade next” It was about using proprietray software from some american company, that may install some backdoor entries.

Which dirstribution to follow - something pronounced as “oo-tu-to”. Strange but said that it is the only that comes with only free softwares.

“You can’t run Linux. you can’t just run the kernel. You need GNU to run it”

KDE was deveoped in 1996, based on Qt which was not free, so there was a possible trap, so they started the Gnome project in 1997. Now Qt is free so KDE too is fine.

“I dont favour Open Source. It doesn’t talk about freedom”

[The “quotes” are as I remember them, but more or less what RMS said ]

I had some confusion about Free and Open Source, and thought them as two names for the same things. But RMS just doesn’t want to hear the word “Open Source”. It doesn’t talk about freedom at all.

His definition of Free Software is really very strict and very difficult to follow. You can’t even sell it. Whats the use, the other guy can distribute it for free or fairly less cost.

I want a license like you can edit the source, distribute it, use it for non commercial puropose, but can get licence to use commercially only he pays me. I guess thats what Open Source is all about. I dont know exactly. Sometimes money too is important. Everyone can’t be saint like RMS.

I would like to be in Free Software movement as far as possible, I mean for every small scale project I do, or atleast that is for every individual. But for a bigger project I need to rethink. The funda of Brian’s CollabNet is also great. It works for Free softwares and get money from support like thigs.

I will change my objective in cv from “To own a patent of a very hot technology of the future” to “To own a copyright of a very hot technology of the future”.

I asked him for a autograph on the GNU tshirt I bought for 250 bucks.(pretty cheap as compared to $18 from gnu.org). He denied saying “I can’t give an autograph to you, coz there are hundreds others too, I am sorry”. Whatever, more important is I talked to him. He was about to leave, was sitting in the vehicle. I entered from the drivers window, and asked him (Driver’s seat was empty). I was really so close to him.

new signature –
I always proofread carefully to make sure I didn’t any words out

printer @ command line

Monday, February 7th, 2005

Add a printer using
$ lpadmin -p printer -E -v device -P ppd
I never before understool what to do with the ppd file. Now I understood, the best way to install a printer is get the ppd file from http://www.linuxprinting.org and use the above command.

arguments : E for Enable, P for ppdfile, D for info, L for location, d for default, x for delete, o for options (man 8 lpadmin)
You need to add the /etc/printcap line, and create spool entry manually.

It even allows things like user-level access control and quota settings.

Doug Gwyn put it best “GUIs make simple things simple, and complex things impossible”.
( I thought it was Linus who said it, but found some unknown guy after googling)
I remembered ESR’s frustation on trying cups. ESR is the “I’m your worst nightmare!… (my fav grin)” guy in RevolutionOS video.

other useful commands are enable, disable, accept, reject, lp/lpr, lpq, lprm/cancel, lpstat. (see man 8)

Links :
http://www.linux.com/howtos/Printing-HOWTO/setup.shtml
http://www.linux.com/howtos/Debian-and-Windows-Shared-Printing/getting_started.shtml

how to : GNU autotoolset [ autoconf + automake ]

Friday, January 28th, 2005

what is GNU autotoolset aka GNU Development tools ?
- for automatic compilation/linking/license/documentation with ease.
- simplify the development of portable programs and simplify the building of programs that are distributed as source code

After you have the source code, you just need to edit one configure.ac at top directory and a Makefile.am at every directory.

autotoolset
[the autotoolkit dependency chart]

aclocal will create a aclocal.m4 which contains the definitions of autoconf macros. Now autoheader will create a config.h.in using aclocal.m4 and configure.ac(configure.in). autoconf will then generate the configure script from configure.ac. automake will create a Makefile.in file from Makefile.am. By running the configure script created above, Makefile will be created from Makefile.in. Also congig.h is created from configure.h.in by running the configure script. Now we have got the Makefile. We can run make or make install/uninstall/whatever and get our job done.

Ok. Try this example.

Say we have a directory structure -

..\helloworld………\–src………….\—-hello.c………….\—-hello.h………….\—-main.cc………….\foofiles………………\—-foo.c………………\—-foo.h

The dependency for creating the binary is like -

foo.c is compiled into a library called libfoo.a
This library is linked with main.cc and hello.cc to
create the binary called helloworld

You need to create configure.ac and Makefile.am
whereever needed such that the above binary helloworld
is creating using autotoolkit.

The above directory can be downloaded from here

The solution follows, but you should give it a try.

helloworld/configure.ac
configure will always remain more or less same most of the times. So do not get afraid by its complexity. Use it as a template. Just that you have to add all directories in AC_CONFIG_FILES.

AC_INIT( [HelloWorld], [0.1], [smr], [helloworld])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_CONFIG_FILES( Makefile src/Makefile src/foofiles/Makefile)
AC_OUTPUT

helloworld/Makefile.am
Coz there is no source at the top level directory, So we only specify the subdirectory.

SUBDIRS = src

helloworld/src/Makefile.am
Here we have hello.cc and main.cc to compile using library foofiles/libfoo.a and again specify the subdirectories to consider.

bin_PROGRAMS = helloworld
helloworld_SOURCES = hello.h hello.cc main.cc
SUBDIRS = foofiles
LDADD = foofiles/libfoo.a

bin_PROGRAMS => all executable files to be compiled
lib_LIBRARIES = all libraries to be compile
prog_SOURCES, prog_LDADD, prog_LDFLAGS etc specifies the source files, libraries, and link flags for generation of executable named prog.
but for bin_PROGRAMS, lib_LIBRARIES, noinst_LIBRARIES the field before _ ie bin, lib or noinst, means the place used by make install/uninstall to store the binary or the library.

helloworld/src/foofiles/Makefile.am
Here we just create the libfoo.a directory. The macro AC_PROG_RANLIB defined in configure.ac will take care

noinst_LIBRARIES = libfoo.a
libfoo_a_SOURCES = foo.h foo.cc

thats it. after creating these file start compiling
$ aclocal
$ autoconf
$ autoheader
$ touch NEWS README AUTHORS ChangeLog
$ automake -a
$ ./configure
$ make
$ make install/uninstall/whatever

Isn’t it easy. Just go through the following links to get more on it -
GNU Automake By Example
autotut: Using GNU auto{conf,make,header}
Using Automake and Autoconf with C++
sources.redhat.com/autobook
Learning GNU development tools
How to : GNU Make environment

(c) 2005, smr

no audio while recording tv tuner using ffmpeg/mencoder

Wednesday, January 12th, 2005

it was strange. /dev/video and /dev/audio looked fine. i mean showed some flowing data on cat command. but both ffmpeg and mencoder failed to record the audio while video was being recorded correctly. most important the audio was going to speakers. guessed the problem might be in mixer. the line was on recording mode. so i guess thats fine.
Help please….
System Statistics : Fedora Core 3. tuner works fine with mplayer or xawtv.