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.

Tuesday, September 27, 2011

Quicktip: Setting keyboard layout in GNOME via CLI

Since I tend to break my installation quite often while testing new stuff, I'm always looking for more agile way of re-setting my system quicky. Of course backups could do the job, but I find a clean install much cleaner and safer for my purposes.
So, here is a tip how to set keyboard layouts from the command line using GNOME - very useful if  you speak more than one language:


gconftool-2  -R /desktop/gnome/peripherals/keyboard/kbd
gconftool-2 --recursive-unset /desktop/gnome/peripherals/keyboard/kbd
gconftool-2 -s /desktop/gnome/peripherals/keyboard/kbd/layouts -t list \
--list-type=string [us,de]
gconftool-2 -s /desktop/gnome/peripherals/keyboard/kbd/options -t list \
 --list-type=string ["grp	grp:alt_shift_toggle,terminate	terminate:ctrl_alt_bksp"]
Do notice: there are TABS in the empty spaces up there. GNOME's xml was intolerant for my attempts to replace them with spaces, and really only worked with the braces.

Monday, September 26, 2011

Linux users: stop whining about UEFI Secure booting!

Sorry for the provocative title, but I think Linux and other FOSS Operating System should really stop whining about the UEFI secure booting.
I see no difference between someone who buys a laptop made by Apple and a someone who buys a Laptop with Windows OS. As the saying goes: "If you sleep with dogs, you wake up with flees". For a very long time the Linux Community ignored the WINTEL monopoly and did very little to support free hardware manufacturers. Many people would invest tons of time in hacking and patching Linux and drivers where they where manufacturers ignored deliberately or unintentionally Linux.
I don't buy hardware very often. And so most people who use Linux don't need to. But when I do buy hardware or asked to recommend hardware, I never do buy anything with Windows, or NVIDIA, or ATI.
I won't even answer friends or family question in the style "can you recommend this WinLaptop or that WinLaptop?". Sounds extreme, I know. But in fact, my strategy works. I have successfully bought my own Laptop from a small company that sells Clevo laptops with out windows. And more than 5 friends of mine who saw "Linux Just Works" out of the box, decided to buy these laptops too. I think it shows that there is a Market for people who are not interested in Windows. Even if it is small, it is growing.
But besides looking for a Laptop which does not come with Windows. You can specifically buy Hardware from manufacturers that do support Linux. Nowadays the ARM architecture is  rising, and provides computational power which is enough for most home users. In fact, the beagleboard provided more computational power than my 6 years old Laptop which still works. Not only that, the architecture is completely open, so I know, no UEFI Secure boot will shit on my head from the manufacturer.
There are a few more hardware manufacturers which make nice and OPEN hardware. To mention a few:
gumstix, opencircuits, hawkboard, pandaboard, igep and even more.
And there is even a whole Laptop/Tablet based on beagle board. 
You might mock the  "lousy" or humble hardware offering in this free field. But in fact it is enough for text processing and multimedia. It is enough for me, and I know, my next laptop, will be based on ARM, because I give a #!$% about UEFI, and I don't care what Microsoft does. Instead of fighting it directly, I will give my money to companies which promote my computational freedom.
I hope this post will encourage at least one extra person to re-consider his next WINTEL/AMD/NVIDIA buying.