Sunday, 27 October 2013

Problems in life and Bhagawad gita


Problem by nature are never ending. You solve one problem with lot of effort and thought and then in no time a unseen problem emerges and you work hard to solve that problem and this vicious cycle ends only when you die.

Solving problems in life is not going to make life any better. So instead of solving problem it would be much wiser to live with the problems and be able to see happiness even in these troubles. 

This problem is not new. Though i realised only recently. Many great men had thought about and have given discourse at length on how to handle this situation. God Krishna in his famous discourse called bhagawad gita talks about all this to warrior Arjuna. Bhagawad gita is awesome for (though i haven't completed reading it yet) many reasons. One , i thought it would something out of this world conversation. But to my pleasant surprise, i found that arjuna talks about the real problems the commonly encountered humans. Arjuna in his conversation completely reflects my thoughts. Considering the ages it is old, i am surprised to see we are still solving the same problem. Technology has taken us no where. I feel like we are busy running at the same place. 
Krishna has talks about 2 ways in specific order to come out of problems. One, do your duty to your best, without expecting it results and also without the thought that you did it, rather it was done through you with the help of so many people. This should not be interpreted as no ownership, but at the fact that world functions via interdependence. The 2nd way can be started only if you are successful in the 1st way above. which is devotion to god. Devotion to god means you are so god loving that other worldly things like money, fame, etc no longer interest you and only God interest you. You see god in everything and no longer differences matter to you as everybody are equal in your eyes as all are forms of god.
The first part i described is called karma yoga and part of first and whole second forms what is called bhakti yoga.
Some fools who wanted to make money have equated yoga to a form of physical exercises. But as far as i know in bhakthi yoga does not prescribe you any physical exercises. I am not a authority on this subject, but i know one thing for sure, yoga is not equal to exercise but much beyond that.

Sunday, 20 October 2013

Is mainframe worth the money ?

I am not even a beginner on mainframe. But recent announcement by the big blue (IBM) attracted my attention. Mainframe is not a great performance machine. Since a super computer out performs a mainframe in terms of computing powers. Mainframe seems to do well in high transaction processing. But i see that regular server grade Xeon based pc provides good performance for the money. While a regular mainframe costs 62 lacs INR (100K USD), a mid level xeon server can be bought at fraction of that price. If the redundancy and performance are its usp, then we can achieve the same via stacking together couple of more servers and still have huge savings. Further even if mainframe makes sense then hiring mainframe administrators may be costly affair. I do see that you would typically require minuscule number of administrators. So i am wondering is mainframe worth the money ? Is it still relevant in these days of  cloud computing and virtualisation crazy.

arch linux, awesomewm, screensaver and lightdm

I did extensive study on options available in arch linux in comination with awesome as my window manager under Xorg without any DE running. Usually linux users of Xorg run a DE like gnome or kde. My case is different in that I have decided to go without a DE. I am happy after removing gnome-shell. I see my apps are faster without the memory hogs of gnome and also i like the tiling option of awesome and also awesomewm allows you to use the old method of stacking window for the apps that dont work well on tiling. I read windows 8 also trying make users to switch to tiling window management. Tiling is great but web browser aren't made for tiling. For example some website wants to do pop-up with their definition of window measurement in pop up. Common example of where it happens is banking websites upon trying to login they throw a custom measured popup. One application that works fantastically in tiling is the terminal emulator. Some terminal emulator like terminator has this feature build in to them. So they act like tiling even without a tiling wm. But that is not perfect. A tiling wm handles perfectly ,  than a build in feature of terminator to split windows.
I was using xautolock and slock combination to lock screen. It worked fine (but not perfect). I had a keybinding in awesomewm to trigger a screen lock. That also worked. It worked till I had xdm as display manager. xdm is not very pretty and lacks many basic features like passwordless account login, autologin. I am not a fan of auto login, but i strongly feel, you should be allowed to login with a account that has no password. So i decided the xdm is a legacy software and i ditched it in favour of lightdm. As far as i can see lightdm has more features than xdm, like passwordless account login , autologin and also it has the xdm feature of XDMCP . But the bad thing is , it no longer invokes ~/.xinitrc . So my xautolock failed to invoke. Since xautolock is not running, keybinding in awesomewm to lock screen fails (as expected). So i tried write a service unit file for running xautolock via systemd. I wrote xautolock.service and the service almost worked. It failed becuase it tried to connect to X display as root and I was running the display as ashwin. So it failed to connect and it exited with failure error code. Workaround would be disable the auth check for X. But it is a ugly solution , possible brining in host of other problems. So I dont want to do that. I dont want to run it as ashwin user , since i am looking for a generic solution that will work for any user. The other solution also shares the same problem being this incident specific. The other solution is to write a xautolock.desktop file in /home/ashwin/.config/autostart/xautolock.desktop. This solution is user specific. If I put the file in global path then it would invoked as root and wont be able to connect to display and fail as in the systemd problem. So the best solution is to invoke it via lightdm configuration file to autostart when greeter starts and have the locking mechanism in my old way as keybinding. Since the xautolock is invoked in greeter level , it will work for all user. Then i hit upon another problem, which is similar to xdm problem. I haven't found if my suspect is true. My suspect is slock invoked via xautolock wont unlock for passwordless account and it will keep prompting for password which does not exists. So the passwordless user in my PC is again in a bad problem. I found a better way. Instead of screenlocking after a period of inactivity, i realised the better way would be turn off the display after a period of inactivity.There are many benefits to it. Like saving on power consumption and no hacks, simply works. the setting i am trying to implement is like sleep 5;xset dpms force off.