Wednesday, October 26, 2011

Analyst my S

Sometimes I just can't wonder ... An idiot posts a blog which shows the guy has no clue what he's talking about. And people actually make such a fuss about it.

The guy writes here:

Sure, Android is built on top of Linux, but Linux is only one of many piece parts of the Android mobile operating system. It is not Linux.

Anyone who knows what a Linux distribution is, would agree that no Linux distribution is Linux according to this definition. 

So, Mr. Analyst my S. Next time I meet people with your title, I will seriously think how I should tag them. I would even bother suggesting this guy takes a "Non-Linux" like Debian or Ubuntu for a try. Idiots like this guy deserve to punished for the rest of their lives sitting in front of a computer with Windows 7. 

Sunday, October 23, 2011

More GCONF Fun: Setting display backlight

In my Clevo notebook all the Fn keys work, except the Brightness keys. So,
after search quite long, I have found that the only solution that really works for me
is "xbacklight".
So, here is how to map the "Special Key " and alt together with F8 and F9 to reduce or
increase screen brightness.
First, install xbacklight:
aptitude install xbacklight
Decide where you want the custom script to reside (see bellow) and export the following bash variable:
export PATHWHEREYOUWANTYOURSCRIPT=/usr/local/bin/increasebacklight.sh
Then create custom keybindings:
#setting to decrease
gconftool-2 -s /desktop/gnome/keybindings/custom1/action -t string "xbacklight -dec 14"
gconftool-2 -s /desktop/gnome/keybindings/custom1/binding -t string "F8"
gconftool-2 -s /desktop/gnome/keybindings/custom1/name -t string "Reduce Backlight"

#setting to increase backlight
gconftool-2 -s /desktop/gnome/keybindings/custom2/action -t string "$PATHWHEREYOUWANTYOURSCRIPT"
gconftool-2 -s /desktop/gnome/keybindings/custom2/binding -t string "F9"
gconftool-2 -s /desktop/gnome/keybindings/custom2/name -t string "Increase Backlight"

And finally, setup the the script which increases the screen brightness:


#note: if you chose like me /usr/local/bin/increasebacklight.sh
#run the following as root.
#you can also have it in ~/bin/increasebacklight.sh, just make
#sure ~/bin/ is in your PATH

cat >> $PATHWHEREYOUWANTYOURSCRIPT <<EOF
#!/bin/bash

# a simple script to avoid the fact 
# that it is impossile to increase 0 precent
# by add more precent ...

LEVEL=`xbacklight -get`

if [ $LEVEL == "0.000000" ]; then
    xbacklight -set 15
else
    xbacklight -inc 15
fi
EOF

chmod +x $PATHWHEREYOUWANTYOURSCRIPT

That is all.

P.S.
Yariv,
If you are reading this, thanks for introducing me to xbacklight.

Wednesday, October 19, 2011

When friends spit FUD

Warning: This is not a technical post, rather just a boring rant and a call for advice. A friend of mine asked me what programming language he should learn. He was thinking of dwelling into modeling after doing some programming with R and Matlab. Then, I suggested he should give Python a spin. I think python has much nicer syntax than R or Matlab. Regarding speed, I have seen many many times that Python is simply faster than Matlab and R when using modules written in C or Fortran (which is the case for Numpy and most of scipy). And finally, both R and Python are FREE, so their amount of packages is extensive so every user has a great choice of ready made recipes. So, it seemed my friend was kind of convinced and thought of trying Python. But a couple of days later, when we chatted, he told me the following sentence:  

"2. anything that's open source is inherently less user friendly than commercial products."

Now, I am a dickhead, so I get mad when friends of mine, whom I consider to be smart, say stuff like that. Especially, when they sound so convinced. If you read my blog, you are likely to label this sentence as FUD. And you are likely to disagree like me. Personally, I don't know how to change a man's opinion who is so convinced. I also don't know if I should try. But it sure does piss me off and sets me on angry mode. It would be nice to know what other people do in such cases. I just don't want to be an evangelist anymore.

So, please give me and advice how to fight FUD when it comes from friends you really love.

Finally, apologies to my friend who got quoted without reference, and had to experience me getting upset.

Thursday, October 06, 2011

Another crack in the Windows hagmony

For about 4 years now there is a possibility to get a Netbook with Linux. Now, there are many of them coming with Android and Meego. Asus has been shipping Linux for quite some times. Unfortunately, always as a second citizen in it's laptops. The better models always come with Windows. IMHO, it's stupid, because WIN7 just kills the system - i.e. WIN7 Boots slower than WINXP although the hardware today is MUCH faster. But back to what I wanted to write about. Today this really caught my eyes browsing some laptops:

A Windows agnostic "WIN" button. I've seen that already in laptops which come with Ubuntu pre-installed, but first time I see it with a main line manufacturer! Such a shame that the same model which comes in white does have the Win button. The laptop by the way is ASUS Eee PC X101-BLK022G which comes pre-installed with Intel's Meego Linux distribution.

Monday, October 03, 2011

Quicktip: make gedit more sane

Continuing the agile setup of GNOME desktop using gconftool-2. Here's a snippet to make tab width 4 spaces, insert spaces instead of tabs and enable automatic indentation:
gconftool-2  --set /apps/gedit-2/preferences/editor/tabs/insert_spaces --type bool 1
gconftool-2  --set /apps/gedit-2/preferences/editor/tabs/tabs_size --type int 4
gconftool-2  --set /apps/gedit-2/preferences/editor/auto_indent/auto_indent --type bool 1
Well, GNOME 2 isn't that evil. Let's hope the Mate Desktop Environment really catches.