Wednesday, December 3, 2008

How file association works in LINUX?

Am being so comfortable with VLC Media Player on Windows, I decided to use the same on Ubuntu Linux. But the problem was, whenever I try to browse a movie double-click on the file, it would open with the default Totem Movie Player. It seemed so simple to modify the file association and set out to give it a try just like in windows. And ofcourse this wasn't anywhere similar to the Windows registry stuff.

This irritated me for a couple of weeks, I knew it would be some stupid settings somewhere deep inside the folders which I just couldn't find. So, I set to find the answer.. After few days of internet research, this topic was created, so you don't need to waste time as I did.

This topic gives you an insight on which files are needed to be modified to change the system file associations. All the below listed modifications requires root access.

1) /usr/share/applications/defaults.list
This file contains the applications which cause a double-click success. All Mime types will point to a desktop file (A desktop file is nothing but an ascii file one for each application with some standard information about the application like category it belongs to, mime types it supports etc.,)

2) /usr/share/applications/[application_name].desktop
This is the file where "defaults.list" will point to. One of the most important things inside this file is the entry "MimeType=".

3) /usr/share/applications/mimeinfo.cache
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.

4) /usr/share/mime (Directory)
This directory contains several information. The sub-directories - excluding packages - contain information about given mime types. You'll see that many mime types already exist.

5) /usr/share/mime/globs
This file contains the file extensions, associated to the mime-types.

Example: VLC Player should start .avi files by Double-Click

Creating the desktop file
If it is not already existing, create the file "/usr/share/applications/vlc.desktop" like this:

[Desktop Entry]
Name=VLC Movie Player
Comment=Play multimedia files and media
Icon=vlc
Exec=vlc %f
Terminal=false
MimeType=video/x-avi;video/x-msvideo;video/quicktime;video/x-ms-asf;video/x-ms-wmv
Type=Application
Categories=Application;AudioVideo;
Encoding=UTF-8

Modify defaults.list
This file will init our DEFAULT application. It ONLY contains ONE desktop file for EACH mime type:

video/x-msvideo=vlc.desktop
video/x-avi=vlc.desktop


Modify mimeinfo.cache
To take effect as default application and init the double-click feature, we need to modify the mimeinfo.cache also:

video/x-msvideo=vlc.desktop
video/x-avi=vlc.desktop

This file can use MORE then ONE desktop file. If you want to be able to handle - for example - avi files with different players, a line like this is also acceptable:

video/x-msvideo=vlc.desktop;totem.desktop

This will change the right-click-menu and insert Totem Movie Player, while vlc is still default (with double-click)

After modification, log out and log in again... and there you are all set.

You can get a much cleaner filetype association tool by ’sudo apt-get assogiate’.

Monday, November 10, 2008

I Hate Myself

Not my original composition. Found somewhere in the net. Seems good. ;)

I hate myself
more and more each day
as my feelings are torn
and ripped apart.

I hate myself little by little
and want to die
just to escape all this
pain and suffering inside.

I hate myself now
because of emotions in me
that only lead to lies
and hurt each time.

I hate myself more
and more each day
as I scream out loud
for losing everything.

Saturday, September 13, 2008

An Eternal Falsity

All of our life, we've been lied to.

We've always been told what life is about and how its supposed to be. Take birth and grow up well. Do best in school, make lot of friends, find a girl/boy friend, enjoy schooling/college hood, get a well paid job, buy a nice house, marry a beautiful boy/girl, have kids, find some hobbies to entertain you, watch tv, go to temple, do some charity, go on a vacation, retire after few years, spend your oldage time with grand kids, look back into your life in nostalgia and look forward to death.

This is what we are supposed to do, to make ourselves happy, to make every one else happy... this is what normal people do.. this is what everyone else is doing. Oh yeh, some times there are few aberrations here and there, people some times slip off, but you can get back on track any time.

The biggest lie is that in the course of life, all the time you feel that you will be happier by achieving one or more of the above listed things, but the reality is the more you get the more you feel depressed. The more you crave, the more you cry. And after all, this is what has been expected from a human being for centuries and will be expected for centuries to go.

Human beings seem to have a basic design flaw. We're fucked up species, striving to be healthy and happy while simultaneously destroying ourselves and each other in million possible ways.















Custom Search

Wednesday, September 10, 2008

ఆయ్ మేమంటే అంత చులకనా!!

సాఫ్టువేరు ఇంజనీర్లంటే అందరికి ఎంత లోకువో.

సినిమాలోళ్ళ దెగ్గర నుంచి దారిన పోయే దానయ్యల వరకు అందరికీ వీరి మీద వారి వారి అభిప్రాయాలే.
అవునయ్య నేనూ సాఫ్టువేరు ఇంజనీర్ నే, అందుకే డిఫెండ్ చేసుకుంటున్నా... ఏం తప్పా??
ఒకడిని చూస్తే బ్రాహ్మి సాఫ్టువేర్ ఇంజనీరని, ఏజ్ బార్ ఐన ఒక
డొక్కు గాన్ని చూపించి సాఫ్టువేర్ ఇంజనీర్ కి ప్రతీక గానిలబెట్టేస్తారు.

ఇంకొకడిని చూస్తే పనికిరాని వెధవలందరూ సాఫ్టువేర్ లోనే తగలడినట్టు, చటుక్కున జాబు తెచ్చుకొని లటుక్కున ఫారిన్ఛాన్స్ కొట్టేసి, ఆడపిల్లల వెంట పడేటట్టు చూపిస్తాడు.

గుడ్డిలో మెల్ల లా ఒక్కో సినిమాలో సంతోషంగా ఉన్నట్టు కూడా చూపిస్తారనుకోండి.

ఇక సినిమాలిలా ఉన్నాయి అనుకుంటే బయట అడుగు పెడితే చాలు ఆటో వాడి దగ్గర నుండి, ఇల్లద్దెకిచ్చే వాడి వరకూసాఫ్టువేర్ ఇంజనీర్ని దోచుకోవాలనుకునేవాడే.

మా కంపెనీ ఎదురుగా ఆటోలుంటాయి. ఎక్కడికయినా వెళదామని వాడినడిగామా మీటరు మీద ఇరవై రూపాయలుసార్ అని పళ్లికలిస్తాడు , వెనక కంపెనీ వంక చూస్తూ, సర్లే పక్కనోదేమైనా వస్తాడేమో కనుక్కుందాం అనుకుంటేవాళ్ళంతా ఒకటే (ఇలాంటి వాటిల్లో మాత్రం సంఘటితంగా ఉంటారు). అప్పటికే రెండున్నర రెట్ల వేగంతో తిరుగుతున్నమీటర్ మీద ఇరవై రూపాయలు ఎక్కువ సమర్పించుకొని పక్కనున్న ఐదు కిలోమీటర్ల దూరం వెళ్ళాలి.

ఇక ఇంటద్దె కోసం స్నేహితులు వెళ్తే ఎక్కడ పని చేస్తున్నావని అడిగి, సాఫ్టువేర్ అని వినపడగానే దొరికాడురా బకరా అనిఅనుకుంటారు. అదీ బాచిలర్ అయితే ఇక వాళ్ల పంట పండినట్టే. సడన్ గా ఇంటద్దె రెట్టింపయిపోతుంది. ఏం అంతసంపాదిస్తున్నవుగా ఇవ్వడానికేం దురద అని చూస్తారు. ఇంకొందరయితే మీకు కంపెనీ లీజు వస్తుందిగా అని రేట్లు ఇంకాపెంచేస్తారు, ఏదో కంపెనీ మనకు ఫ్రీ గా ఇచ్చేస్తున్నట్టు, మనం సిటిసి చక్రం లో ఉన్నట్టు తెలీనట్టు నటిస్తారు.

ఇక సర్లే ముగ్గురం కదా పదిహేనువేలు వాటాలో ఐదు వేలేగా అని జనాలు సమాధాన పరచుకొని వారికి బంగారుబాతులవుతారు.

ఇదంతా ఒక ఎత్తైతే.. ఇక బట్టలు, సినిమాలు, మాల్స్, తిండి ఏది చూసినా బొక్కే. ఇవ్వన్ని చెయ్యకుంటే సాఫ్టువేర్ఇంజనీర్ కాదన్నట్టే లెక్క జనాలకి మరి. మల్టిప్లెక్సు లోనే సినిమాలు చూడాలి. లీ, లేవిస్ జీన్స్ కట్టాలి. పిజ్జా, బర్గర్, కాఫీ, షాపులలోనే వీకెండ్స్ తిండి తినాలి. మాల్స్ లోనే షాపింగ్ కి వెళ్ళాలి.

ఏదైనా చెయ్యకపోతే మళ్ళి పక్కనోళ్ళు
వెర్రి వాజమ్మ కింద జమకట్టేస్తారో అని భయం.

ఇకపోతే ఇంటిపక్కనోళ్ళు, బంధువులు, స్నేహితులు వీరి పైన పెట్టె ప్రెస్సర్ చూడాలి. అదేంటి బాబు నువ్వప్పుడేఉద్యోగంలో జాయిన్ అయ్యి మూడేళ్లు అయ్యింది. ఒక్క జాబు కూడా మారలేదా? మా వాడు అప్పుడే నాలుగు ఉద్యోగాలుమారిపోయాడు తెలుసా.

ఇంకోడు అర్రే ఇంత ఎక్స్పీరియన్స్ ఉంది ఇంతేనా వచ్చేది. మా చుట్టాలబ్బాయికి ఐతే పది లక్షల జీతం వస్తుంది అని జాలిచూపుతాడు.

ఇంకోడేంట్ర అంటే నేను కనిపించగానే తెలుగులో కాక ఇంగ్లీషులో మాట్లాడతాడు, నేను తెలుగుగో మాట్లాడినా .. ఇదెక్కడిగొడవరా బాబు నేను సాఫ్టువేర్ ఇంజనీర్ నేనా అన్నట్టు డౌట్ గా చూస్తాడు.

ఇక స్నేహితులు కలిస్తే నీకెంత రా నాకెంతరా లు మామూలే.

ఇక మామూలోళ్ళు అందరూ నీకేంటి ఐదు రోజులే పని, రోజుకెనిమిది గంటలే పని వేలలు అని ఎక్కించేస్తుంటారు. అక్కడవారానికి పది రోజుల పని చేస్తూ, రాత్రి నిద్రపోకుండా పని చేసేవాడు ఎక్కడ చెబితే అలుసైపోతామేమో అని ఎహేహే అనిఒక పిచ్చి నవ్వు నవ్వుతాడు.

ఇవ్వన్నీ తట్టుకొని ఎక్కడికక్కడ జేబులు గుల్ల చేసుకొని, మాటలు పడి నెగ్గుకురావడం అంత ఈజీ కాదని మనవి. కాబట్టి సారి మీకో సాఫ్టువేర్ ఇంజనీర్ కనిపిస్తే బ్రాహ్మి సాఫ్టువేర్ ఇంజనీర్ ని కాకుండా
బిల్ గేట్స్ నో, స్టీవ్ జాబ్స్ నో గుర్తుతెచ్చుకోమని మనవి.

Sunday, August 31, 2008

Install Cygwin with KDE Desktop

This tutorial is mainly aimed at all those frustrated souls who made several futile attempts of installing Cygwin with KDE Desktop environment. I am one of those frustrated souls who finally succeeded in installing the same and would like to help my fellow netizens to be successful. Long before, during my internship I used to work on unix using Cygwin with KDE desktop on top of it and was totally impressed by the flexibility and the user friendly features it provides which is the only reason for struggling almost 2 weeks to install the same on my machine.

I would like to put this tutorial in such a way even a novice programmer or even a fresh man of the college can install Cygwin with KDE desktop. So, I am making some that the person reading this tutorial no experience of installing either Cygwin or KDE. The latest Cygwin DLL release version I used is
1.5.25-15.

So, lets start the installation. Just blindly follow the instructions listed below:

1) Download the Cygwin installation executable from
http://www.cygwin.com/ . (I assume that you are intelligent enough to download the setup.exe file from this site)

2) The setup.exe itself is a very small file, the installation downloads all the required files from the internet and does the setup.

3) Start the setup.exe - you should encounter something as shown in Image 1.

Cygwin Installation - Image 1

4) Click "Next" and proceed.

5) In the next screen, you will encounter three options, the first option is actually combination of the next two options. If you are reading this blog, I suppose you are installing Cygwin for the first time and advice you to select option 1. Cygwin setup first downloads all the requried files and later installs them one by one. Select required option and proceed further by clicking "Next".

Cygwin Installation - Image 2

6) In the next screen you will be asked to give the location of the root directory, leaving the default values doesn't do any harm. So, don't touch any thing and lets proceed.


Cygwin Installation - Image 3

7) Next, location where to store the downloaded files, its a personal preference, give any location where you want to store the installation files.


Cygwin Installation - Image 4

8) In the next screen, select the option based on your internet settings.

Cygwin Installation - Image 5

9) After clicking Next, the installer downloads the list of mirrors from where the packages for Cygwin will be downloaded. Choose the mirror closes to you for faster download time. Please note that these files are very large, so spare some time to choose a mirror nearer to your location. The list of mirrors locations are given at http://www.cygwin.com/mirrors.html .Check out this page to make a decision on the list of mirrors nearer to your location.


Cygwin Installation - Image 6

10) On clicking Next, the installer downloads the information files from each of the selected mirros and shows a page with all the available packages. This is the most crucial and difficult part of the installation. To make things easier, just do as listed, If you are making any other choice, I assume that you know what you are doing. Click "View" button, to show the "Categorical" view of all the available packages. In the top node, of the tree, you will find node "All" and "Default" next to it. Just click on "Default" untill you get "Install" in the location of "Default". Install being just blindly install all the available packages. If you are intelligent enough to make a right decision on what packages you require, then you are most welcome to do so.



Cygwin Installation - Image 7


Cygwin Installation - Image 8

11) This time, when you click "Next", the installer will start downloading and unpacking the packages. Once all the downlading is done (Go and have a jog or some snacks or atleast have a cup of tea.. ;)) it will take some time.. (not some, a long time to download and install all the packages).

12) Be prepared to encounter few error messages, but donot panic. ;) (I encountered this error message a lot of times saying "Error while downloading the packages" at 99%, you can imagine how irritating it would be after waiting for 5-6 hours for complete download)

13) After step 12, you are all set with the Cygwin installation, but you still need to set some environment variables to finish the Cygwin installation.

14) Right Click on the "My Computer" icon and select Properties from context menu and select "Advanced" tab. At the right bottom corner, you will find a button "Environment Variables".

15) Click the button and you will find the "Environment Variables" page.


Cygwin Installation - Image 9

16) Under the System Variables, you need to add the cygwin path to the "Path" variable.
Edit the "Path" variable and add the following locations to that.

c:\cygwin\bin;c:\cygwin\usr\bin;c:\cygwin\usr\X11R6\bin

17) Add a new variable, with Variable name : "DISPLAY" and Variable value : "127.0.0.1:0.0".

18) Now you are totally done with Cygwin Installation. Lets proceed with installation of KDE Desktop.

19) Now, follow this link http://webdev.cegit.de/snapshots/kde-cygwin/kde/kde3.4/ and download the required packages.
Note: The next few steps need to be executed in Cygwin bash shell
20) Open the Cygwin Bash Shell, and download the required packages.
wget -nd http://webdev.cegit.de/snapshots/kde-cygwin/kde/kde3.4/qt-x11-free-3.3.4-1.tar.bz2
wget -nd http://webdev.cegit.de/snapshots/kde-cygwin/kde/kde3.4/kdelibs-3.4.1-0.tar.bz2
wget -nd http://webdev.cegit.de/snapshots/kde-cygwin/kde/kde3.4/kdebase-3.4.1-0.tar.bz2
wget -nd http://webdev.cegit.de/snapshots/kde-cygwin/kde/kde3.4/kdepim-3.4.1-0.tar.bz2
wget -nd http://webdev.cegit.de/snapshots/kde-cygwin/kde/kde3.4/kdesdk-3.4.1-0.tar.bz2

tar -C / -xjf qt-x11-free-3.3.4-1.tar.bz2
tar -C / -xjf kdelibs-3.4.1-0.tar.bz2
tar -C / -xjf kdebase-3.4.1-0.tar.bz2
tar -C / -xjf kdepim-3.4.1-0.tar.bz2
tar -C / -xjf kdesdk-3.4.1-0.tar.bz2


21) Make sure that no Cygwin process is running.
1. create file list
find /opt/qt/3.3 /opt/kde3.4 -name '*.dll' >/tmp/files.lst
2. close *ALL* cygwin processes
3. open a windows command shell (cmd.exe) from Start/Run and goto cygwin installation root
cd c:\cygwin bin\ash bin/rebaseall -b 0x61000000 -v -T tmp/files.lst

22) With this now we are done with the KDE installation. But we need to write a small script to start KDE desktop.

cat >~/startkde #!/bin/bash
cygserver &
export CYGWIN=server
export SHELL=/bin/bash
xwin -fullscreen -noreset &
xwinclip &
xhost +
/opt/kde3.4/bin/startkde
kdeinit_shutdown
taskkill /IM xwin
taskkill /IM xwinclip
taskkill /IM cygserver

[press ENTER, then CTRL-D]

chmod a+x ~/startkde

now you can start kde with

~/startkde &

23) To display only kicker (uses Xwin multiwindow mode)

cat >~/startkde
/usr/sbin/cygserver &
export CYGWIN=server
export DISPLAY=127.0.0.1:0
xwin -multiwindow &
xwinclip &
xhost +
export SHELL=/bin/bash
kdeinit +kicker &

[press ENTER, then CTRL-D]

chmod a+x ~/startkde

now you can start kde with

~/startkde &

stop kde - run

kdeinit_shutdown

then close the bash window

24) This ends the tutorial for Installing Cygwin with KDE Desktop. Have fun.



Friday, August 1, 2008

Emptiness

I don't know how common this is, but for me, the main problem is that I feel disconnected from everyone and everything.

I have a few people out there who I care about, or who care about me, but no real intimacy with anyone. Worse yet, this is a long term pattern with me, it's been going on for enough years yet that it's quite possible I will be alone for the rest of my life.

This totally sucks.

I would like to have friends I could be truly close to, someone that I could be in love with, but I'm psychologically fucked up enough that I don't know how to make this happen.

I like to think that if I had love and intimacy in my life, life wouldn't suck nearly as much.

And hell, I think I've reached the point where I'm jealous of cult members. Those poor deluded fuckers who shave their heads and dance around in public begging for donations, or the heaven's gate suicide cult, at least they have a sense of purpose, of belonging. They must have a sense of devotion for their beloved cult leaders.

Is there any way of having meaning in life when I am disconnected from everyone and everything? I don't think so.










Custom Search



Whats common between Girls & Drugs?

Girls are very similar to Drugs, they are same genre,

1) Drugs are expensive
So are girls, ;) poor guys right from the day one of courting or living together, all the expenses of coffe shops, movie tickets, snacks, gifts ... (god knows where the list ends) should and will be borne by the poor chaps - Now I can understand why every father feels so happy after getting her daughter married, as a fellow being, we should understand the pain in supporting expenses of two ppl at a time, wife and daughter - feels good if some pain is relieved or passed on ;) As the Law of Physics says material cannot be destroyed or created, similarly the pain (of having a girl friend or a wife) cannot be created or destroyed, it can only be passed on.

2) Drugs are harmful to health
Needless to quote any illustrations.

3) Drugs are addictive
This is the only reason why even after centuries have passed adding more and more examples to the above two facts; still we find a lot of couples on this planet.

4) Once addicted to drugs, very difficult to recuperate
Once you feel the warmth of a woman's love, its very difficult to recover from it, and ultimately man has to succumb to the above three hazards.


Life Sucks...

We're all trapped.

Each of us is stuck being who we are. Sometimes we fight to change ourselves, but ultimately this has little effect. We can change what we do, but we cannot change who we are.

If you're a happy person, you don't feel trapped. If you're surrounded by people who you love and who love you, if you can do what you want to do in life, if you are at peace with who you are, why would you ever feel trapped? You wouldn't want to change yourself, you wouldn't need to try.

If you're a happy person, hey, you got lucky! Go back to the previous page, you'll find nothing of interest here.

I am not a happy person. Maybe you're not either. Maybe you're too fat, or too thin, too old, or too young. Maybe you're ugly and nobody wants to sleep with you. Maybe everyone wants to sleep with you, but nobody loves you and it's all meaningless. Maybe your body is fucked up and you're in pain all the time. Maybe your mind is fucked up and you're in pain all the time.

So you struggle with all these problems year after year, and you're getting nowhere, and you wonder if anything will ever change. And the unavoidable reality of it all is that, for you, life sucks.

But of course you're not going to give up so easily, you're going to keep struggling to solve your problems, to change yourself, to find happiness, wherever it is, whatever it is. But still, life sucks.

And you see all these people out there who are blissfully free of your problems, and if they can do it, there must be some way for you to as well. But they aren't doing you any good at all, they don't understand what it's like being you, and what good would it do you if they did understand?

So, the forces which created you, random or otherwise, have spoken. And they've determined that, for you, life sucks.



Suicide

I am not suicidal. My life sucks and I hate the way I am, but I don't feel the need to forcibly end it. Life is pretty short anyway, and I'm 23 already, so I don't see what the hurry is. Forty or fifty more years will go by soon enough. If people lived for thousands of years, that would seem unbearably long, but I can certainly do 80 years. Besides, I still have the hope, realistic or not, that someday I'll manage to find some happiness in my life.

Anti-suicide efforts often tend to irritate me, in a way. Society doesn't want people to kill themselves, but I suspect this is mostly for practical reasons. After spending two decades raising, clothing, feeding, and educating you, society expects to get many more decades of work out of you in return. If you die early, everyone else has been cheated of the payback they were expecting for all that effort they put into raising you. You can be as miserable as you want, but for God's sake, don't kill yourself.

Now, all of that said, as for what people who are suicidal should do, I can't give you some well thought out, logical answer as to the right course of action. I can only relate my own feelings on it.

I've known two people in my life who did commit suicide. Both were women who I'd only had a small amount of contact with, I didn't really know either of them. Both times, I heard about it afterwards, and I had the same reaction. I was very sad about it, I wished I had gotten to know them, I felt that if I had, I could have helped them somehow.

So I don't want anyone to kill themselves, and I guess I feel that no matter how much pain someone is in, their pain can be made bearable by talking about it with someone who cares about them.

Alright now, those last few paragraphs were far too positive and lacking in cynicism for me.




Unknown..

Maybe life sucks because we're all really just big brained primates who were meant to be living in small tribal groups hunting and gathering food, and our pain is the natural result of our living in an unnatural environment.

Maybe life sucks because we haven't turned our lives over to some cultural deity or whoever the One True God happens to be.

Maybe life sucks because we all have chemical imbalances in our brains.

The first proposition implies that the answer to life's problems is to abandon technology. This was put forth recently by the Unabomber, and before that by the Khmer Rouge of Cambodia.

The second is claimed by hundreds of different groups of religious fundamentalists, all of which disagree on the identity and nature of this One True God.

The third is put forth by psychiatrists.

I'm not sure which of the above groups is worse, but given their accomplishments or lack thereof, I highly doubt they have any answers for us.

So, I don't know the ultimate cause of, or the solution to, life's problems. I don't know how to end this with any helpful advice or words of wisdom. If you think you do, email me and let me know.



Grass isn't always greener on the other side

If its true, then there wouldn't be ny job hoppings in this world

Why am I so fucked up?

Why does life suck so much. What am I? What is the motive in life? Shouldn't there be some purpose of living this life. What do I need and what do I expect from life? Do I really deserve what I got? Am I worthy enough for all what I got? Is it something wrong to expect things from life? Is it wrong to crave for something better always? What if the crave for something better turns out to be the only reason for unhappiness?