Thursday, July 1, 2010

Idiots crash course in solving Tweetdeck link open problem

Hi there my imaginary green fellas!

I feel quite mad right now as everytime I browse the web there's a noobuntu related post on how to do things the wrong way.

Be mature and don't get touchy with that comment. I don't hate newbies, I hate n00bs because they mislead newbies.

You, my little green newbie, will enjoy this post.

OK! Lets get our hands dirty:

PROBLEM:

Tweetdeck doesn't open links in our preferred browser.

BREAK IT DOWN:

  1. It is not Tweetdeck's problem but Adobe Air instead
  2. libCore.so has a hardcoded call which doesn't work
  3. The call is made to kfmclient, an Adobe Air imaginary friend.
  4. Most people, except Adobe Air engineers doesn't have that client program installed.

SOLUTION:

Let's cheat Mr. Air and create the client he wants so hard.

Create a file in your text editor of choice named -guess what- kfmclient, whose contents are

#!/bin/sh

shift 1

mybrowser=/usr/bin/chromium

test -x $mybrowser && exec $mybrowser $@

Notice #!/bin/sh "shabang" must start from the first character. Also, you should replace chromium with your browser of choice, perhaps firefox 3.6 or alpha 4 ;)

Done! Save that file, copy to /usr/local/bin and then give it permission to be executed as a normal system program.

sudo cp kfmclient /usr/local/bin

sudo chmod +x /usr/local/bin/kfmclient

Done! enjoy! I'll try to update this post with a link pointing to a new script I'm gonna write for automatic discovery of your default browser in KDE and Gnome too if I've not lost my skills.

For those butchering libCore.so file ¡SHAME ON YOU!

Saturday, October 24, 2009

A little superficial Linux research if you ask me...

In a recent ComputerWorld article, which is available online, I posted quite a long answer to a question many people new to GNU/Linux is eager to answer. Although people like me preffers ignoring in the name of "chose what you want, do whatever you want and leave me alone". However I took my time to answer due to the inconsistencies and wrong statements the author managed to fall in. So here is my answer: 2 Years ago, my wife's laptop had 256Mb of RAM and a 1.6GHz Pentium M processor. It is no surprise for me that I managed to install a Linux distribution in it with no effort and much more eye-candy and simplicity than Windows 7 has to offer today (Arch Linux, but most distributions are easy as well). Linux distributions have matured a lot in this little time. There is more stability and even more extravaganza and usability in the eye-candy department at this time. You can say I am an expert. That is no true if you see my mother enjoying openSUSE 11.1 everyday. She is an utter computers illiterate and already performs many tasks the author of this review considers "challenging" for average users... It is important to trust users i.e., not treating them as if they were all oligophrenic maniacs. In my own experience, what they need is clear instructions the "first days" and then they start flying by themselves. No virus, no spyware, no DRM, no extra payments. All of your machine resources for you. Do you remember how much time took you learning to handle Windows (any version)? Perhaps you got accustomed to do some tasks there but, that does not make its interfaces intuitive at all... Or even a handy, responsive, stable and, most importantly, efficient tool. For me, personally, Windows was always an obstacle to accomplish my goals. That's why I switched to never return. In another point, all Linux distributions are complete and don't push users to install untrusted sources at random places. Most Linux based distributions have to offer pretty easy to use installers (i.e., openSUSE 1-Click install, the top of the top in every OS I know of) Thus, I can't see where empowering users can go wrong. Unless, of course, instead of helping them you want them to go ignorant so that you can exploit them... Linux is not the absolute perfection. But I will always be an advocate of better standards. It is the most important thing when you think of computers in the days to come. I really spoke my mind there. So, I hope I can copy-paste this whenever I am asked the old question...

Wednesday, October 14, 2009

The fastest program for acquiring system information

While developing oddfx I've come to the conclusion I should start a second project. A very brief one for sure. But, after seeing the numbers myself, I found oddfx's linuxrules too compelling to be taken vainly. [...] And I am quite sure many people will want this. I hope they get notice soon. You see, linuxrules is a POSIX awk compliant set of rules for reading as much Linux system information as we can. And I was talking to my wife about how great could be doing all of this in one pass whilst, normally, you should issue a lot of programs for achieving the same effect. I'll give you an ordinary example, here are the numbers in a simple comparison... Comparing program times uptime
time uptime 02:42:28 up 42 min, 3 users, load average: 0.00, 0.00, 0.00 real 0m0.009s user 0m0.003s sys 0m0.007s
linux rules
time linuxrules.awk CPU_0=800 CPU_1=800 MEMF=3437 SWAP=0 UPTIME=00:00:45 IDLE=01:28 LOAD="0.00 0.00 0.00" PROCS=3/186 USERS=3 LID=open TIME=02:45:54 DATE=2009-10-14 GPU_TH=54 real 0m0.012s user 0m0.003s sys 0m0.000s
Numbers speak for themselves, uptime gets overtaken. Linux rules proves to be an excellent choice for resources savvy people. I think that many sysadmins, general geeky users and WMII alike people could benefit a lot from this little utility. NOTE: The present test was run with mawk (not gawk, for obvious reasons) uptime results were the best from a series of tries. No effort was made to favour linuxrules.awk, all the contrary.

Friday, September 25, 2009

Saving CPU clock for those tasks which worth the power on [Part 1]

Paving the way for an old thought

I've found an outdated text of mine, barely reformatted to fit this Blog. Oh! Gods, how much I hate blogs... It is from a visit I paid the last year to linuxhaxor.com. Quite a pretentious name but really a site one wants to visit from time to time.
Personal note: Aggregated --> to the feeds

Yeah, it works my way ..or not

Indeed I've found a nice article which made me think I was facing an unique proof of desktop cluttering, since a guy named Pavs had a Core 2 Duo processor running slower than my modest Turion ML-34 (1.8Ghz 32 bits mode) in crafty's CPU test. Yep! Childish assumption. My thought was his Desktop was draining bogomips from the test. However this is true, the difference in performance turned out to be that he had run the test in a single core, thus exhibiting the power of just one of the guns in his arsenal.
Core 2 Duo 1.6G (No more info) Total nodes: 36247629 Raw nodes per second: 1169278 Total elapsed time: 31
Anyway, the lesson learned from that simple "benchmark" test was that my processor was running quite well comparing some results I achieved from a virtual console:
Turion 64 ML-34 Console Total nodes: 36247629 Raw nodes per second: 1249918 Total elapsed time: 29
Then a pleasing ratpoison visual environment with nine Firefox tabs opened, three terminals and another two applications which I cannot recall at this very moment gave good results too:
Turion 64 ML-34 Visual Environment Total nodes: 36247629 Raw nodes per second: 1208254 Total elapsed time: 30

My final thoughts

It appears that Turions aren't as slow as some popular benchmark sites claim anyway [...] In this days of falling markets, non -even- 65nm AMDs are yet useful enough to power home servers ;) Whereas they are not so wattage conscious, the computing power they drive make them more than acceptable for those tasks. My lovely HP Pavilion dv8000 series whose display is not in use anymore, provides good backup, monitoring and farming capabilities whenever I am or not at home. Besides, nowadays, I hate HP notebooks and laptops with passion (El Cheap'O components and an extreme tendency to failure in all cases I am aware of). That's the magic of free *nixes anyway. Extensive Intel products aimed at gamers and moronic business people ie. i7 are just great this days. Tough, for the sake of money consciousness, computers out of market are a terrific service for those who can squish the juice out of them (eg. Linus Torvalds and his Pentium III laptop exhibited at googletalks git conference) You don't have to be a Linus to do greater than that. Final note: Crafty chess engine is currently available for most BSD and Linux distributions. If you want to compile from source yourself, get the code from: www.craftyches.com Tests for different processors and architectures are to be found in: craftybenchmarks This sources provide an excellent base to check out whether you are missing bogomips because of your *nix distribution. Enjoy breaking your neck!

Wednesday, July 29, 2009

Found it!!

Who the heck could have figured out that Python needed a system module in order to show its own version?
python -c "import sys; print (sys.version[:3])"
I humbly think this is pure madness!

Is there a better way to do this shit!?
Your comments are very appreciated!!
And sorry for the fucking language. As you may have noticed, English is not my native tongue and this is not a god day.

Final comments...
No more coffee for today. Rum and expanding my iptables knowledge sounds just fine [WINK!]

Python bites! Sometimes..?

As I am a Perl, Lua and shell utilities typical fan-boy; that is to say, a weird but committed KISS advocate; I will make this post as minimal as possible. Today, I was trying to package a little something for openSUSE. There were missing dependencies as usual so I went for it! Firstly libgmail, but then, mechanize. Crossed fingers at this time hoping for the build server to quit complaining about missing dependencies in an endless, tedious, time killing spiral... Finally, all went fine, but then I tried to adjust little details here and there in the spec file. e.g. python --version. As I am no expert in Python and surely I will never be, just tried to check out what is the better way to get the actual language version without the kludges of our beloved AWK! for just a single piece of information like this: 'Python 2.6'1. That said, I went with the major here: Python 2.6 (r26:66714, Feb 3 2009, 20:49:49) [GCC 4.3.2 [gcc-4_3-branch revision 141291]] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> help help> modules Please wait a moment while I gather a list of all available modules... Segmentation fault Fascinating!! So, after that shame, I don't really know who is the people to blame about this... The SUSE people or the Pythonic ones? For an indented style yet powerful program (even a shell script) I will always pick Haskell!!

Hi there Richard Stallman... It's me!!

Personal Notes...

I am finishing a personal script which I will publish here later. Its main function is updating some hg (mercurial) and svn (subversion) repositories weekly, checking out if there are any changes to commit them to the openSUSE build service for compiling and updating my personal RPM repository.

It is rater simple as for the code implied. Though, I was not aware of any utility like that in the openSUSE realm.

So, it is already written.

But that is not my main preoccupation. You see:

Writing it made me wonder about whether it is possible creating a GPL++ license so that we, GPL ass licking advocates can avoid updating our code every time by just putting GPL++ in it so that Richard and those helpful lawyers at the fsf.org can decide what's next in "Free"sofware without user intervention.

I know, I know there is already a GPL version X or superior stanza just like You require a super server or superior machine in order to run Vista. But creating the GPL++ convention will worth language economy and yet less machine resources.

Self updating RPMS and what not!!

If you don't got it yet. Fuck you (..with a smile) ;)

That is not for you RMS. I love you.