tag:blogger.com,1999:blog-299198332024-03-05T14:35:06.624-08:00Linux, pixies and stuffJust another blog about GNU software, and other stuff ...linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.comBlogger55125tag:blogger.com,1999:blog-29919833.post-88465971904286371072012-11-25T05:24:00.000-08:002012-11-25T05:24:14.727-08:00I don't live here anymoreMy new blog address is oz123.github.com.<br />
<br />
My new blog has feeds for each category, so If you are only interested in following a certain topic that occupies me, and you don't want to hear about my radical opinions about cycling or politics, subscribe to the appropriate feeds:<br />
<br />
http://oz123.github.com/tags/python/atom.xml<br />
http://oz123.github.com/tags/debian/atom.xml<br />
<br />
etc.<br />
<br />
You are also welcomed to subscribe to my main feed:<br />
http://oz123.github.com/atom.xml<br />
<br />
Oz.linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com0tag:blogger.com,1999:blog-29919833.post-38987553487971451282012-08-09T12:55:00.001-07:002012-08-09T12:59:50.424-07:00GNU vs CanonLinux does not exist in American conusmer market. At least not for Canon. <br />
<br />
<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAPXqbPEcirfWpU6CJ0zr4TlYx3Z4psEnI7a5KMhDTZ1WofFodqt1lMQ1xeIImG9h2X7XVflN4QT7b1yrTZQJBxs5HBrNAiG8VlufiTai-EjfrhsBtM0XNl1xEKtMQJJHfVV8u/s1600/Screenshot-22.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Fuck Canon USA" border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAPXqbPEcirfWpU6CJ0zr4TlYx3Z4psEnI7a5KMhDTZ1WofFodqt1lMQ1xeIImG9h2X7XVflN4QT7b1yrTZQJBxs5HBrNAiG8VlufiTai-EjfrhsBtM0XNl1xEKtMQJJHfVV8u/s320/Screenshot-22.png" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"></td></tr>
</tbody></table>
America is sometimes a very weired place. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijygNUBWGMBkqSIJAQ8GQTwpEDmpSUl3TFdcDEYL9Fq4sl_GQvgAKeXv66j7ZBO-zWVGOwftFSqEqFQDV-aasva3iy4sYYvWBYmMIyoXYdMIG8n_Q6N5TOQhK4EmkAAeCZFt5F/s1600/Screenshot-21.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Praise Canon Europe. Are they the same company???" border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijygNUBWGMBkqSIJAQ8GQTwpEDmpSUl3TFdcDEYL9Fq4sl_GQvgAKeXv66j7ZBO-zWVGOwftFSqEqFQDV-aasva3iy4sYYvWBYmMIyoXYdMIG8n_Q6N5TOQhK4EmkAAeCZFt5F/s320/Screenshot-21.png" title="" width="320" /></a></div>
<br />
Ich liebe Deutschland :D. <br />
<br />
If you happen to use Canon products on Linux, look for their drivers for GNU\Linux in www.canon-europe.com.<br />
<br />linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com0tag:blogger.com,1999:blog-29919833.post-36692143942771857702012-07-28T05:04:00.001-07:002012-08-06T21:48:11.961-07:00Working With Binary Data in PythonThis puzzled me for quite a time, so here is a post explaining some of my findings. <br />
First we define a bytes array:<br />
<pre class="prettyprint" id="python">
s = bytearray(b"Hello World")
for i in s:
print i
...
72
101
108
108
111
32
87
111
114
108
100</code></pre>
<br />
now, let's write this data to a file:<br />
<pre class="prettyprint" id="python">
f = open('helloword.bin','wb')
for i in s:
f.write(struct.pack("I",i))
f.close()</code></pre>
<br />
Let's inspect the file created:<br />
<br />
<pre class="prettyprint" id="bash"> $ du -h points.bin
4.0K points.bin
$ file points.bin
points.bin: data
$ less points.bin
"points.bin" may be a binary file. See it anyway?</code></pre>
<h2>
Binary file sizes</h2>
let's us write "hello world" into a text file in a text form:<br />
<br />
<pre class="prettyprint" id="python">
f = open('helloword.txt")
f.write("hello world")
f.close()</code></pre>
<br />
Once again we can inspect the file:<br />
<br />
<pre class="prettyprint" id="bash">
$ du -h helloworld.txt
4.0K helloworld.txt</code></pre>
<br />
<br />
Now, what happens if we make a longer binary array?<br />
<br />
<br />
<pre class="prettyprint" id="python">
s.split()
s.append(33)
bytearray(b'Hello World!')
for i in range(10000): s.append(33)
f = open('longhelloword.bin', 'wb')
import struct
for i in s: f.write(struct.pack("I",i))
f.close()
f = open('longhelloword.txt', 'w')
hello = "Hello World!"
for i in range(10000): hello = hello+"!"</code></pre>
In a shell, examaining the file sizes:<br />
<br />
<pre class="prettyprint" id="bash"> $ du -h longhelloword.bin
40K longhelloword.bin
$ du -h longhelloword.txt
12K longhelloword.txt</code></pre>
<br />
<h3>
Wait a minute ! Why is the binary file almost 4 times bigger?</h3>
The answer is: it depends on the format specifier in <code>struct.pack</code>. <br />
Namely, we used an <code>unsigned int</code>, for each character we then reserved 4 bytes!. <br />
When we saved the text, every character was assigned to the file exactly as a <code>char</code> which takes one byte only. <br />
<br />
If we repeat the above with <code>struct.pack("b",i)</code> the sizes of the file won't differ: <br />
<br />
<pre class="prettyprint" id="python">
f = open('longhellowordwithchar.bin', 'w')
for i in s: f.write(struct.pack('b',i))
f.close()</code></pre>
<br />
and in the shell:<br />
<br />
<pre class="prettyprint" id="bash">
$ du longhellowordwithchar.bin
12 longhellowordwithchar.bin
$ du longhelloword.txt
12 longhelloword.txt</code></pre>
<br />
Credits: <br />
http://dabeaz.blogspot.de/2010/01/few-useful-bytearray-tricks.html <br />
http://docs.python.org/library/struct.html#module-struct<br />
<br />linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com0tag:blogger.com,1999:blog-29919833.post-77707783546692173772012-05-24T23:38:00.000-07:002012-05-25T01:56:54.828-07:00Why does the Billlion Dollar OpenSource Company does not matter or should not matterOnce in a while I bump into posts praising Red Hat for the fact that its Financial Worth in the Stock Market has crossed the 1 Billion Dollar. Every time I read these posts I shiver. And let me explain why.<br />
It's not that I have something against the technical merits of Red Hat. In my daily work, I support mostly CentOS and Red Hat servers, and I enjoy using them. However, at home I use Debian almost exclusively. But my point is not that Debian is better or worse. I just want to use Debian as an example of how Open Source drives new economic models, while counting the stock market worth of Red Hat is old style economy. So let's see what I mean.<br />
First, I shiver when I think "oh god, how short is people's memory". Just two years ago, the stock market collapsed and literally vaporized many many people's savings, but the same people who were "managing" this stock market industry went home without losing a cent, and today? The stock market is alive, and people keep buying stocks - and if the worthy of Red Hat is increasing, it's because people are willing to pay more for a tiny piece of Red Hat. But what is a Stock worth if the company has no real holdings - besides it's office buildings ? Not much, unless you are promised that the company will pay you dividends, or that the stock price will go up. Unfortunately, the current stock market does not promise any of them. Red Hat directorate can decide to give you dividends, but you are not promised, and if you are living in California or Paris, I am not sure it's worth traveling to Virginia to stock holders public meeting and vote on giving dividends to yourself and other share holders.<br />
Now, I am asking myself, what is the interest of all these technology writers promoting Red Had by yelling "Look, Red Hat is worth a billion dollar" besides making other people buy a Red Had stock, and making sure the price goes up. They, Technology writers, just promote what I call the Red Hat Bubble.<br />
<br />
<a name='more'></a><br />
Unfortunately - or fortunately, depends how look at it - Red Hat has no really holdings, besides it's skilled employees (whether good coders, or good sales personnel). Theoretically, anyone could take Red Hat and sell it (removing trade marks). Fortunately again for Red Hat, it's target customers are Old Economy giants (I need to explain that term, and I will get to it later). For example, the same stock market where Red Hat stock is sold is powered by Red Hat. A huge amount of R&D in the Auto and Defense industry is done using Linux Clusters, and CAE\CAD workstations powered by Red Hat and so on. Red Hat targets mostly the following industry: Banks, Defense, Oil & Gas, Automotive, Aeronautics. Luckily for Red Hat, these companies used to pay a lot of money for Unix and other Propriety OS driving their systems. Therefore, paying the Red Had support fees is not much. Big companies also love big companies. CEO's and Managers go and hang around with one another so they cut fat deals, sometimes regardless if it is the smartest thing. So RH wins again. But that is all old style economy.<br />
Out side the borders of America, there is another giant, an almost invisible giant which drives many many small and medium companies and no one gets to buy or sell it's stocks because it's totally available for everyone. That giant is Debian, which is found on thousands of computers in schools in Spain and Brazil, that powers the city of Munich, that powers many supercomputers in research centers in Europe, the is being shipped in many retail stores in China via Ubuntu.<br />
To me, although Red Hat uses and sells, and even contributes to many Open Source projects, it still represents an old style company and economy. That is: a centralized product, which is developed and owned by a relatively small group of people.<br />
When compared to the reach ecosystem driven by Debian, I think Red Hat is a very weird phenomena I am not sure how I should treat. <br />
Debian is a do-ocracy, where if you want something achieved you can pay for someone to do it, or role your sleeves up and just do it. This is why it has so many supported packages, and it has so many ports available, including 2 different kernels. In comparison, Red Hat has maybe just a sixth of the packages supported and no so many architectures. Further more, Red Hat officially supports just the 2 major desktop environments. But what if I don't like neither of them?<br />
It is no secret that GNOME 3 was developed by a small disconnected group of people, and the fiasco was, how to put it gently, quite embarrassing, and that is even before GNOME 3 rolled into the desks of thousand engineers using RH on daily basis (I can't wait to see how our customers respond to Red Hat EL 7 with GNOME 3). Here is <a href="http://www.muktware.com/news/3570/mark-shuttlworth-we-felt-blocked-red-hat" target="_blank">what Mark Shuttleworth said about GNOME 3</a>, and I am not a big fan of Unity either, but at least it is another alternative, among many like XFCE, Mate or even KDE or Trinity.<br />
Now try to imagine a world where the hype around Red Hat stock would have been equal to the technological hype around Red Had. In a world like this I'll be probably working on a desktop powered by Red Hat (luckily, my company uses in House OpenSuse 11.4 for our workstations). And my 3 Laptops would have been running Red Had (as I said before, they run Debian), and Distrowatch had one Linux distro in it, you know already, it would have been Red Hat. <br />
This reminds a postcard someone sent me from Warsaw. The postcard depicted a Grocery store from the 80s in Warsaw. The store had a very fancy glass counter, on top of it stood one bottle of vodka, and behind it you could purchase one kind of sausage, one kind of bread and complementary one kind of jam and one kind of cheese. Of course, for that great variety you needed to pay to much.<br />
Luckily, the Linux ecosystem, in which Debian is just another option, promises that you can buy many sorts of "bread" and "Vodka". If you want, and can, you can pay $1,299 RH per year for server support, or a bit less ( to be exact $1200 per server) to Cannonical. But I am also sure you can find people who will give you excellent support for less, using either Debian, Gentoo or even Archlinux or what ever you desire. Don't believe me? Try for example in the <a href="http://www.debian.org/consultants/" target="_blank">Debian consultants</a> page or this page in the UK that enable you to look for<a href="http://www.people4business.com/it/skill-1665.htm" target="_blank"> Linux experts</a> in many distributions or take a look at the <a href="http://www.freebsd.org/commercial/consult_bycat.html" target="_blank">FreeBSD commercial vendors page</a>.<br />
I really hate reading articles like "We have to many Linux distros" or people whining about "how fragmented Linux desktop is", and I don't like the Red Hat bubble, although I enjoy working on Red Hat systems.<br />
My point is that choice is good. Choice shows we a healthy economy, and a thriving ecosystem. Don't believe me? If you happen to live a place where people have bank accounts and a sour plus in them, go an visit the supermarket. Then count how many types of jam, wine and bread you can find. If you find more than 5 of each you know you are in a rich place. If you dive, like <a href="https://plus.google.com/102150693225130002912/posts/Cepr6Gy3zps" target="_blank">Linus Torvalds dives</a> or you know people that do scuba diving ask yourself or them how do you tell a healthy coral reef than a sick one?<br />
If you answered "variety of fish species" you get my point. Variety ensures we have a healthy system. A healthy coral reef has big sharks like Red Hat, and little fish and many types of crabs and corals and octopus species and so on. In healthy open source system we have all these thriving together. <br />
Now, I promised I will explain that term, Old Economy. When taking a look on healthy economies, industrial or not, there is one thing to be seen. Medium and Small businesses are the large driving force of the market. But somehow, journalists and media people really like praising the big companies who in most cases are actually bad for competition and a healthy economy.<br />
Old Style companies, even in the technology sector, are built like classic industrial companies where a small group owns the means of productions, and all the rest are just belonging to the proletarian class, people who work 8 hours a day for the company, but don't get to always influence on what the company does or have equal share in the profits.<br />
Ultimately, open source goes against this convention, because it make "Ownership" kind of a void term. May that is why Open Source supporters were named communists by some people. But that shows that people are just confused. Because ultimately, open source creates competition and many small players, which is actually promoting a "perfect market" like Adam Smith described in his break through work <a href="http://en.wikipedia.org/wiki/The_Wealth_of_Nations" target="_blank">"Wealth of Nations"</a>.<br />
And not only that, the Open Source software revolution has also gave birth to Open Hardware specifications, and today everyone can buy a small 3D printer and create their own stuff in real, instead of making large buys in China or some place. This really, changes how are economy works for good. It puts the power back in the hands of many, instead in the hand of a few Capitalists (in the original meaning of the word, e.g. Property Owners). I really expect that 3D printing and hard projects like<a href="http://makeplaylive.com/" target="_blank"> Vivaldi tablet</a> or <a href="http://www.raspberrypi.org/" target="_blank">Raspberrypi</a> will initiate a 2nd
Industrial revolution and
change our hardware market. <br />
And this is exactly why I don't think the First $Billion Open Source company matters. Just like any German town has more than one bakery, and every good supermarket has more than one sort of wine, I really prefer seeing the yellow pages explode with thousands of names
of different Linux Consultants, offering different software and hardware solutions to different problems, in fair prices for everyone. Then you will know, GNU\Linux is grown to be an important thing more than it is already. <br />
<br />
<br />linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com0tag:blogger.com,1999:blog-29919833.post-30667977509013001692012-05-08T12:06:00.001-07:002012-05-08T12:06:24.270-07:00Ubuntu 12.04 Intrusive OSI installed Ubuntu 12.04 on two laptops by now. and I must rant. Ubuntu developers are assuming two many things about me. First, there is this bug, which the<a href="https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/994510" target="_blank"> 'migration-assitant' mounts existing partitions in READ-WRITE mode</a>. I find it dangerous and not necessary for migration.<br />
Then, today I installed Ubuntu 12.04 on IBM x121e and found out that my Bluetooth chip is disabled. After about 20 min of looking I discovered, it is because of a <a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/812866" target="_blank">bug in the installer which messes around with the BIOS.</a> So if you have IBM x120e with Intel Chipset, you need to reboot, restore the BIOS defaults and then Bluetooth works. <br />
That's all the ranting for now ...linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com0tag:blogger.com,1999:blog-29919833.post-62452646296688252282012-05-07T13:38:00.004-07:002012-05-07T13:39:16.864-07:00GCC 4.7 Breaks 169 Packages in Debian ... my weired hobby ...I have a weired hobby, checking very frequently the<a href="http://bugs.debian.org/release-critical/" target="_blank"> Release-Critical Bugs</a> in Debian.<br />
It's kind of a magic window to all this wonderful packages found in Debian. Sometimes I'm horrified to see so many bugs opened at once. Like now ... 169 FTBS introduced by GCC-4.7...<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWYuPr5ZSBvCsF9XVnSbAztbc8soVa8ccLEnhc1dOcmIa4W6nupAGfbXssmWbyt92-B7gBIseSiKNYjaFVOhi-FFgARG4viV6HxCELnBnTnLDZwUnHnAV6Ytr6GfdBOgtL2nuz/s1600/Screenshot-5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWYuPr5ZSBvCsF9XVnSbAztbc8soVa8ccLEnhc1dOcmIa4W6nupAGfbXssmWbyt92-B7gBIseSiKNYjaFVOhi-FFgARG4viV6HxCELnBnTnLDZwUnHnAV6Ytr6GfdBOgtL2nuz/s320/Screenshot-5.png" width="320" /></a></div>
<br />
It's no reason to panic, but it's been a while since I've seen such a huge bump up...<br />
<br />
<br />linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com0tag:blogger.com,1999:blog-29919833.post-50938940015211092742012-05-03T21:53:00.001-07:002012-05-03T22:06:03.205-07:00Ubuntu Rant! You need Ubuntu to install UbuntuUbuntu "engineers" are probably dumber than that Enterprise Linux OS. I got a laptop from a friend who asked me to install the latest Ubuntu on it. My usual technique of make a live bootable usb faild.<br />
So, I googled and found this <a href="http://www.ubuntu.com/download/help/create-a-usb-stick-on-ubuntu" target="_blank">evidence that Ubuntu engineers are retarded.</a> <br />
You need Ubuntu to install Ubuntu.<br />
This reminds me a bit that Redmond company. What if I have another OS ? NOT Mac or Windows ? For example, Debian? can't you just write how to obtain that package ???linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com2tag:blogger.com,1999:blog-29919833.post-16203248234515486412012-05-02T13:53:00.001-07:002012-05-02T13:53:09.833-07:00New Entry in the Linux laptop list !I am looking for a new laptop. 14" is a bit hard to fit in the bag sometimes.<br />
While search for a new 12" laptop, I found<a href="http://www.garlach44.eu/" target="_blank"> garlac.eu</a>. Their 14" laptop is exactly the Clevo I have, the 13.3" version I bought to my girlfriend under the brand name Belina in Germany. It's a good laptop. But the one in Garlac comes either with equiped with old AMD version or newer with Intel but equipped with NVIDIA.<br />
<br />
Sorry, I DON'T buy AMD. Until someone here or in AMD convinces me that they do a better job with Linux. The second option, NVIDIA is an utter crap. NVIDIA drivers is the biggest piece of s$#% I ever saw, and in my work place, I curse a lot when I need to mess with NVIDIA card on a CAE workstation or some cluster.<br />
<br />
But... if you are looking for a good 14.1" laptop and you are in Europe... The <a href="http://www.garlach44.eu/en/rush-14-1-en-n" target="_blank">Rush 14.1 </a>seems like a good choice.linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com0tag:blogger.com,1999:blog-29919833.post-84127406468722504502012-04-02T21:48:00.001-07:002012-04-02T22:06:13.805-07:00Command Line Posting to BloggerOh man, I'm really becoming a geek. I spend so much time staring at VIM that writing a Blog post using the Web interface seems cumbersome to me. I know about Google command line interface and I even wrote my own little script to upload images to Picasa directly from Nautilus (good times are gone, I don't use GNOME anymore). <br />
<h3>
</h3>
<h3>
Basic setup</h3>
So, in this post I will explore how post to Blogspot from the command line in an elegant way.
First we need to install Google's CLI tool, let's grab it:
<br />
<pre><code>wget http://code.google.com/p/googlecl/downloads/detail?name=googlecl_0.9.13-1_all.deb</code></pre>
Now, let's install it:
<br />
<pre><code>dpkg -i googlecl_0.9.13-1_all.deb</code></pre>
OK, basically, now you are good to go. The documentation is fairly easy to understand. Except maybe one note. The first time you will run the command you will need to configure your client. The config files are found in:
<br />
<pre><code>~/.config/googlecl/config</code></pre>
Well done by googleres who put the stuff where I expected it. Do note, when you run the config you will be asked for the name of your Blog. This is NOT the subdomain, e.g. in my case:
<br />
<pre><code>linuxpixies.blogspot.com</code></pre>
Rather to correct answer is the title of the Blog:
<br />
<pre><code>Linux Pixies and Stuff</code></pre>
Spaces are digested very well.
<br />
<h3>
</h3>
<h3>
Making things Fancy</h3>
Until now you can post simple text files, or manually edit HTML (YUCK!). Here comes the fun part. Editing simple text files and automagically converting them to HTML. Enter markdown.
<br />
<h4>
</h4>
<h4>
Markdown</h4>
Markdown is a sweet little thing I discovered using stackexchange.com. The more I use it I want more. This thing is addicting, and even worse, it makes me hate all other Wiki syntax! Especially TkWiki, which we use in my workplace.
Markdown has many many converters. I use python-markdown2, so let's install it:
<br />
<pre><code>pip install markdown2</code></pre>
Now, if you are a pedant, you could make a Debian package, which is actually better than just dumping Python packages. But pip can also remove Python packages, so it's now that bad, after all.<br />
Anyway, at this point, you have python-markdown2 installed, and the command <code>markdown</code> is at your finger tips. You can start writing your post with your favorite editor, be it Nano, EMACS, Ed or VIM, when your done, save it with an appropriate title and <code>md</code> suffix so you know later it's Markdown. Now comes the fun part.
<br />
<h3>
</h3>
<h3>
Converting to HTML</h3>
<pre><code>/usr/local/bin/markdown2 YourCoolPost.md > Title\ of\ Your\ Cool\ Post.html</code></pre>
Now, you can view it with:
<br />
<pre><code>firefox Title\ of\ Your\ Cool\ Post.html</code></pre>
It will be bare naked HTML, without any styling, but you will get a good feeling how your post will look like. When your satisfied, go the next step, publishing.
<br />
<h3>
</h3>
<h3>
Publishing your Post</h3>
Easy as:
<br />
<pre><code>google blogger post Title\ of\ Your\ Cool\ Post.html</code></pre>
Done.
<br />
<h3>
</h3>
<h3>
Final Remarks</h3>
I am writing these final remarks from Google's own web interface to Blogger. I wanted to see how my post looks like in real life. I was amazed to find a plague of break elements.
elements in my post. Apparently, Blogger's engine parses the HTML once again when it's submitted. Everywhere I had a line break in VIM using enter, I had inside Blogger a break element. Quite upsetting, but just remember, don't use to many of them inside VIM, and your post should look good.linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com2tag:blogger.com,1999:blog-29919833.post-22723131174251589372012-03-20T15:57:00.001-07:002012-03-20T15:58:20.521-07:00Good Bye Latex ? Hello WeasyPrint ...Latex, is my main way of producing reports and scientific works. Usually these are formed as PDF before being actually printed. Latex is AWESOME. I love writing documents with latex. That said, although I am not a beginner with latex, when I want to deviate from normal good old latex patterns things become a bit rough.<br />
Despite using the Latex language for almost 5 years, I still don't fully understand the syntax of writing packages, although mostly a long enough search will yield some solution which does not require me to hack on my own. Never the less this is a bit tiresome sometimes.<br />
Enter <a href="https://github.com/Kozea/WeasyPrint" target="_blank">WeasyPrint</a>. This project seems really cool because it allows anyone with basic knowledge of HTML and CSS to produce good looking PDFs. Further more, I can really think of a simple work flow once a template is made:<br />
Write your documents with <a href="http://daringfireball.net/projects/markdown/" target="_blank">Markdown</a>, use something like <a href="https://github.com/mojombo/jekyll" target="_blank">Jekyll</a> to convert your easy to understand Markdown to HTML with some <a href="http://jinja.pocoo.org/" target="_blank">Jinja </a>or CSS and finally convert your pages to good looking PDF's.<br />
I think this is more or less what <a href="http://sphinx.pocoo.org/" target="_blank">Sphinx</a> does (except that Sphinx uses RST instead of Markdown). I never really mastered CSS or HTML, but this seems like a good opportunity to start mastering both<br />
<br />
Besides, consider this:<br />
<br />
MarkDown + Convert to HTML + WeasyPrint = Sphinx from Scratch.<br />
<br />
Besides being a very cool educational project, a project like this can allow people with CSS + HTML knowledge to produce some great looking PDF. It also allowed a lot of flexibility if you are good at both. <br />
<br />
Never the less, Latex has still one big advantage: Latex is well designed to produce good looking documents even though you are not an expert on typography and page layout. Additionally it is thousands of ready made packages and kind community that can help solving many existing problems. So maybe after all, Latex is not going away so fast!<br />
<br />linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com1tag:blogger.com,1999:blog-29919833.post-45660195452406059992012-03-16T07:06:00.007-07:002012-03-16T07:17:27.730-07:00The weired Indexing in PerlI am learning Perl. I am doing it with a lot of a resentment, but I am slowly learning it. <br />
Normal people count from 1. Computer Scientist count from 0. Perl developers count from -1?<br />
<br />
WTF?<br />
<br />
<pre class="prettyprint" id="bash">
oz@server ~ $ test.pl test
num of args 0
oz@server ~ $ test.pl test test
num of args 1
0
test
1
test
oz@server ~ $ test.pl
num of args -1
No arguments!
oz@server ~ $
</pre>
My Code, just in case I am totally wrong about this here, :
<pre class="prettyprint" id="bash">
$ cat test.pl
#!/usr/local/bin/perl -w
print "num of args $#ARGV \n";
if ( $#ARGV > 0 ){
for ( my $i = 0 ; $i <= $#ARGV ; ++$i ) {
print "$i\n";
print "$ARGV[$i]\n";
}
}
if ( @ARGV > 0 )
{
print "Number of arguments: " . scalar @ARGV . "\n";
}
else
{
print "No arguments!\n";
}
</pre>linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com4tag:blogger.com,1999:blog-29919833.post-42829708320235106672012-02-24T17:00:00.000-08:002012-02-24T17:00:02.105-08:00VIM Quicky: set tabs and spaces behaviour for different filesNever really bothered me before, because I only used Python and C, so I always replaces tabs with spaces.<br />
However, with more C programming lately, I needed to start working with Makefiles. These <b>require </b>tabs instead of spaces.<br />
So here is how to. In the end of my .vimrc file I put:<br />
<br />
<pre class="prettyprint">
" python python pyhton
" convert tabs to spaces before writing python files or C files
autocmd! bufwritepre *.py,*.c,*.h set expandtab | retab! 4
" convert spaces to tabs when reading python file or C files
autocmd! bufreadpost *.py,*.c,*.h set noexpandtab | retab! 4
</pre>
<br />
<br />
Et viola, not so complicated!linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com0tag:blogger.com,1999:blog-29919833.post-67852794134650856722012-02-22T13:39:00.000-08:002012-02-22T13:39:28.302-08:00Open Hardware - a short list of alternativesI have been waiting quite a while to write this post. I think it's about time that people who want to write FOSS and support FOSS will also buy hardware from manufacturers that support it. One good way is to buy directly hardware which is designed like that.<br />
<br />
So here is a list of stuff I can really recommend or I'd like to buy:<br />
<br />
1. Portable Music Player with rockbox:<br />
<br />
<a href="http://www.sandisk.com/products/sansa-music-and-video-players/sandisk-sansa-clipplus-mp3-player" target="_blank">Sansa Clip+</a>, by itself this little player is not open source or open hardware. However, it is cheap and reliable and runs <a href="http://www.rockbox.org/" target="_blank">rockbox</a>. And that is really the best thing about this player. The original firmware comes with pretty limited and dumb interface, it does not support playing OGG or FLAC files, for example. Installing rockbox on this player enables that, further more, rockbox has many cool plugins. A favorite of mine is the simple Stopwatch which allows me to measure times when I jog. <br />
I wish someone in Sandisk would realize how redundant it is to make their own firmware, and they would just adopt rockbox officially. After all, another cool thing about this player is its expansion slot for reading Mini-SD cards.<br />
Rockbox has made me more satisfied with this player, and left me astonished when I saw the <a href="http://download.rockbox.org/daily/manual/rockbox-sansaclipplus.pdf" target="_blank">user manual</a>, it is maybe the user manual I've seen for an open source project (except maybe the <a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/" target="_blank">FreeBSD handbook</a>). <br />
<br />
2. Router+File Server<br />
<br />
I think I am not very wrong, if I say that most people I know has a home wireless network. Good chances that this W-LAN router is running some kind of Linux based OS with a web interface. The advanced users can try and replace this OS with a user friendlier and more capable OS like OpenWRT or DD-WRT. <br />
But what is better than buying a device which is already pre-installed with one? Here is a Linux Friendly router, the Buffalo WZR-HP-G300NH, this is the<a href="http://www.dd-wrt.com/wiki/index.php/Buffalo_WZR-HP-G300NH" target="_blank"> Wiki page dedicated to this little router</a>, and there is a very <a href="http://g300nh.blogspot.com/" target="_blank">good blog documenting that router</a> what you can do with it.<br />
Right now, my Buffalo is running a File server, and of course the W-Lan and I am very happy with this 40 USD embedded computer. I'm so happy with it, that I might get another one, and install full blown Debian on it.<br />
<br />
3. Tablets<br />
<br />
It's been a while that I am thinking of buying my own tablet or an e-book reader. However, I'm late to join the crowds and I don't want to pay money for computer that I need to break into to get a root password. There for this rules out 99% of the Android tablets and others.<br />
I just ordered 2 <a href="http://makeplaylive.com/" target="_blank">spark devices</a>. These little machines are pure Linux (not <a href="http://www.android.com/" target="_blank">Linux with Handcuffs.</a>)<br />
But there are other devices which have Linux on them, such the <a href="http://alwaysinnovating.com/touchbook/" target="_blank">Smartbook</a> or <a href="http://wetab.mobi/en" target="_blank">WeTab</a>.<br />
<br />
4. Laptops<br />
<br />
Well, there are many by now. And it's good, I've compiled a small list of l<a href="http://linuxpixies.blogspot.com/p/linux-laptops.html" target="_blank">aptops sold with Linux</a>.<br />
<br />
If you have suggestions to this list please let me know!<br />
<br />
<br />linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com2tag:blogger.com,1999:blog-29919833.post-90525822780916244862012-01-18T15:37:00.000-08:002012-01-18T15:37:21.522-08:00UEFI Secure booting is good for LinuxMicrosoft will block non Windows on the ARM platform. Big deal. It is if installing Linux on any other Laptop is easy. Sure you can install Linux on most Laptops today. But does it really work? Do you get the same battery time with Linux as with Windows? Nope. Do your multimedia Keys work? In 90% of the cases only partially. Does your computer suspend or hibernates as in Windows? in about 50% of the cases the answer is no. Does your Graphics Card works the same as under Windows ? NOPE.<br />
<br />
So, the situation is like this: OEM A makes a deal with M$ and writes proper drivers to the hardware and SomeUser Joe gets a hardware which works perfect with Windows 7. Later, SomeUser Joe, installs SomeCrack for SomeCoolSoftware which contains a Trojan which he can't get rid of. After some frustration, he decides to quit with this M$ thingi and give Ubuntu a try, because he heard it's cool. He than tries Ubuntu and discovers some things don't work. Here our little story splits.<br />
<br />
First possibility, the Linux Sucks possibility. SomeUser Joe, is frustrated, his computer will freeze every time he resumes it from suspend. Or the graphics card is slow, or the Fan always works loudly. Linux Sucks. Period. SomeUser Joe, bites it, and installs Windows 7. His next computer will be Apple.<br />
<br />
Second possibility, the Linux has a cool community, SomeUser Joe, heard about it and wants to join. So, he files another bug, which might be taken seriously, or not, in Ubuntu's bugzilla. This bug might find it's way upstream to the Kernel developers and they might solve it, but the patch will only be in the next release of Ubuntu maybe in 6 months from now. Damn speculations. But Linux works at most. So, in 3 years from now SomeUser Joe, might look for a new Laptop, without the Windows Tax, and will save a scrap of 50 bucks, which he will spend 100 times more money in working hours value digging through forums and IRC channels trying to get he's M$ free Laptop to work.<br />
<br />
Third Possibility, SomeUser Joe buy his next Laptop with Linux pre-installed. Hell yes! UEFI is a great thing. I wish all M$ devices would never run Linux. It will force Linux fan boys to see that by saving $50 to $100 dollars buying a Laptop from OEM's which sell Windows, they sleep with the Devil. UEFI is a great opportunity to Linux and FOSS, because we have a great OS in our hands and now we have also Free Hardware like the BeagleBoard, PandaBoard, RaspberryPi and even the GTA04.<br />
<br />
There are some small companies the sell Linux laptops which have the latest trends in hardware. If there are just 1 Million Linux users and just one third of them will buy a new device this year, that is about 300,000 laptops sold with Linux. I think this is a huge jump in sales for a small company like ZaReason or System76. They would be then more then able to go out on a broad campaign putting Linux on the main stream student Laptop. <br />
<br />
So, please, stop whining about UEFI. Just don't buy laptop from OEM like Dell or Lenovo or Acer or Asus. There are ENOUGH alternatives for Preinstalled Linux Laptops. Here is a short list:<br />
<br />
<ul>
<li><a href="http://system76/" target="_blank">System76</a></li>
<li><a href="http://zareason.com/" target="_blank">Zareason</a></li>
<li><a href="http://rockiger.com/de/shop/product/satchbook" target="_blank">Rockiger</a></li>
<li><a href="http://www.ohava.com/" target="_blank">ohava</a> </li>
<li><a href="http://www.alwaysinnovating.com/" target="_blank">AlwaysInnonvating </a></li>
</ul>
If you happen to know of others, please let me know through a comment!<br />
<br />
(P.S. Dell don't count! Dell's Ubuntu offering mock Linux users, offering a free OS with lousy hardware which costs more than the Windows installed laptops with cost cheaper for better hardware. Just because of this mockery, I will never recommend any customer of mine or buy myself any product of Dell).linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com0tag:blogger.com,1999:blog-29919833.post-1502494825607360022012-01-08T03:56:00.000-08:002012-01-10T13:06:36.307-08:00Saving Karo: making a 6 years old laptop alive again...Karo is the second laptop I got, I bought in my second year of Uni, in 2005. Karo, diamond in Turkish, is an HP Compaq nx6110 business Laptop. I have used it through my Bachelor and my Master studies. During these 5 years, I upgraded its memory from 512MB to 2GB, and replaced the Harddrive a few times from 40GB to 80GB and then to 120GB and finally to 160GB.<br />
On the last year of its business warranty the laptop had problems with the CD-ROM and one of the USB ports died as a result of bad wiring. So, HP took the laptop and installed a whole new motherboard on their expense.<br />
About a year later, when I was between my Master and Bachelor, I was on a very shaky bus ride and Karo fell off the luggage compartment 2m down. Although it was in a special case, the screen splintered and was not readable anymore.<br />
Just going out of school, I was not able to replace the laptop so quickly, so for about 130 Euro, I bought a compatible LCD screen and replaced it myself. To my surprise it worked very nicely. HP have a very nice service manual which accompanied me since then.<br />
So now Karo, had many new parts, and it was not worth buying a new laptop. I started studying a Master, and karo served me well. Until 4 months before I graduated, while I was writing my thesis, karo became extremely noisy.<br />
It's fan was working non stop, and it was never able to cool itself down once it went over 65C degrees. I didn't feel like experimenting so much, and the only thing that bother me about Karo besides the noise was it's damn heavy weight. So I bought yenikaro, a new light weight 14" laptop which was nice and quiet with a weigh of 1.4 Kg.<br />
Karo, moved away from the table, and was seldom turned on. However, this weekend, I decided to revive karo, and see if I can fix the noise problem. I followed HP excellent guide on how to access the fan. Once I open the laptop, lo and behold, karo had between it's fan and the vent I found a huge bulk of fibers and dust, it was so big, I just had to take a photo of it:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQYywdwySnjJwBqaXi7gnKZrxDwU6XW1EiP89M-O2QsNRJM8KVp2ahSvIhPk76cUygt4qNxKyfvgDmPWhMzOMoHv_sJwtBpjLfiZoVMIUKe6LZ-MrF-0stE1nB2mxlDXysEFVN/s1600/h.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQYywdwySnjJwBqaXi7gnKZrxDwU6XW1EiP89M-O2QsNRJM8KVp2ahSvIhPk76cUygt4qNxKyfvgDmPWhMzOMoHv_sJwtBpjLfiZoVMIUKe6LZ-MrF-0stE1nB2mxlDXysEFVN/s400/h.jpeg" width="400" /></a></div>
<br />
I removed the fan, and than carefully cleaned all the insides of the laptop from dust and fibers and other fine particles. Then, I closed it, and rebooted into my Debian again. Karo, is silent again. Now it just needs a new Harddrive replacement for the 3 years old hard drive and it can be used again ...<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com0tag:blogger.com,1999:blog-29919833.post-17686738492896535342011-12-25T09:04:00.000-08:002011-12-25T09:04:10.114-08:00Revisiting Windows 7 - Package management is possibleAfter a very long time I did not use Windows for my private needs, I have finally found the times to take a longer look on Windows 7. I have decided to install the operating system on a real machine to see it's real behaviour and interaction with plastic and iron.<br />
Here are a few quick observations. The installer is WAY better than Windows XP. I have no clue how it was in Widows Vista. Unfortunately Windows still requires a lot of reboots until the process is done. It took about 1hour to complete the installation, and after that I feared I will have to click hundreds of next next next to finish the process of configuring the hardware and installing software to make the Laptop usable. Fortunately, I kept the disk of drivers which came with the laptop when I bought it. The auto installer just did the job with out to much pain. My next step was to google and find if there is already a DECENT <a href="http://code.google.com/p/windows-package-manager/" target="_blank">Package manager for windows</a>. Guess what ? there are a few of them. And after testing a little bit I settled on NPacked. It is not perfect, but it made the computer somewhat more reach with software with relatively little pain. <a href="http://code.google.com/p/windows-package-manager/issues/detail?id=106&colspec=ID%20Type%20Status%20Stars%20Milestone%20Summary%20Opened" target="_blank">My biggest criticism on it</a>, is the sparse collection of software available, and the fact that it does not read local XML file, only those hosted on some webserver. I hope posting here will publish NPacked somewhat more and help it gain more software to the repo. Unfortunately, this project seems like a one man show, which does not really ensure the sustainability of this project.<br />
There is not much more to say. I am not so eager to use that OS, but I have to make myself some what familiar with it.linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com0tag:blogger.com,1999:blog-29919833.post-51492270802287460002011-12-12T08:00:00.000-08:002011-12-12T08:00:04.609-08:00The more I read on GNOME 3 I get more madThe idea I need to learn X Programming Language (e.g. JavaScript) in order to customize my desktop is IMHO simply IDIOTIC! Although I love learning programming languages, and I am a programmer, I DON'T WANT to program my desktop. My desktop is not a problem I need to solve. It should just work.<br />
<br />
<div style="font-family: "Courier New",Courier,monospace; text-align: center;">
Have you ever seen a customized Gnome Shell? You can do quite a lot, and practically anything if you know javascript.</div>
<div style="font-family: "Courier New",Courier,monospace; text-align: center;">
<br /></div>
<div style="font-family: "Courier New",Courier,monospace; text-align: left;">
<span style="font-family: inherit;">The quote is from the <a href="http://www.blogger.com/goog_1112261304">Debian forums.</a></span><a href="http://forums.debian.net/viewtopic.php?f=6&t=72366&sid=5126cb449cc958fc16cae00835de84e6" target="_blank"> </a></div>
<div style="font-family: "Courier New",Courier,monospace; text-align: left;">
<br /></div>
If I wanted to program my Desktop, I'd probably learn Lua and use something crazy like AWESOME WM (But in the mean while I'm fine with DWM and GNOME 2.30).linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com3tag:blogger.com,1999:blog-29919833.post-11719968265842707582011-12-11T07:48:00.001-08:002011-12-11T07:53:14.723-08:00Short news about the GNOME 2 forkWell, I've been following the <a href="https://github.com/Perberos/Mate-Desktop-Environment" target="_blank">Development of Mate DE</a> quite closely via github and it seems like the project is gaining momentum. It gained the support of Linux Mint Dev's and now it has it's own website, so I'd like to give here the link to the GNOME 2 Desktop alternative, in hope more peope will contribute and join.le will contribute and join.<br />
Since there is now a <a href="http://mate.karapetsas.com/" target="_blank">Debian repository for MATE DE</a>, I intend to test it hands on, and not just observe from the side.linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com0tag:blogger.com,1999:blog-29919833.post-7005853456801620412011-12-10T12:57:00.001-08:002011-12-10T12:57:59.321-08:00The Wierdest Post Ever in ServerFault.I don't know if this is a joke or not. But if it's not a joke, it must be cruel. Just take a look on that guy's question and look at the answers.<br />
This is probably the <a href="http://serverfault.com/questions/339426/10-servers-to-administer-and-im-a-history-major" target="_blank">worst system administration task.</a>linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com0tag:blogger.com,1999:blog-29919833.post-83300781593879599682011-11-19T00:40:00.001-08:002011-11-19T00:43:31.882-08:00No more MONO on UbuntuWell, it's a quite a late response, but it ought to be. After Ubuntu has shoved Mono down our throats for quite a while, they have decided to retreat from it. <a href="http://www.omgubuntu.co.uk/2011/11/banshee-tomboy-and-mono-dropped-from-ubuntu-12-04-cd/" target="_blank">As of Ubuntu 12.04 there will be no more Mono on the default install CD.</a><br />
<br />
I want to curse Ubuntu devs for their actions so far, but their decision to drop Mono, for what ever reason, is a considered a blessing by me. I might even give it a spin again in 12.04 after about 2 years of not touching Ubuntu.<br />
<br />linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com0tag:blogger.com,1999:blog-29919833.post-25382427938828366282011-10-26T18:00:00.000-07:002011-10-28T01:01:26.892-07:00Analyst my SSometimes I just can't wonder ... An <a href="http://blogs.forrester.com/mike_gualtieri">idiot</a> posts a blog which shows the guy has no clue what he's talking about. And people actually make such a fuss about it.<br />
<br />
The guy writes <a href="http://blogs.forrester.com/mike_gualtieri/11-10-25-mobile_proliferation_killed_linux_hopes_for_world_domination?cm_mmc=RSS-_-IT-_-942-_-blog_1858">here</a>:<br />
<br />
<div style="font-family: "Trebuchet MS",sans-serif; text-align: center;">
<span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Sure, Android is built on top of Linux, but </span><a class="ext" href="http://developer.android.com/guide/basics/what-is-android.html" target="_blank"><span style="background-color: transparent; color: #000099; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Linux is only one of many piece parts of the Android mobile operating system</span></a><span class="ext"></span><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. It is not Linux.</span></div>
<div style="font-family: Arial,Helvetica,sans-serif; text-align: left;">
<br /></div>
<div style="font-family: Arial,Helvetica,sans-serif; text-align: left;">
<span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Anyone who knows what a <a href="http://en.wikipedia.org/wiki/Linux_distribution">Linux distribution</a> is, would agree that no Linux distribution is Linux according to this definition. </span></div>
<div style="font-family: Arial,Helvetica,sans-serif;">
<br /></div>
<div style="font-family: "Trebuchet MS",sans-serif;">
<span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Arial,Helvetica,sans-serif;">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. </span></span></div>
<div style="font-family: "Trebuchet MS",sans-serif;">
</div>linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com0tag:blogger.com,1999:blog-29919833.post-89497121408758625522011-10-23T09:47:00.000-07:002011-10-23T09:55:42.220-07:00More GCONF Fun: Setting display backlightIn my Clevo notebook all the Fn keys work, except the Brightness keys. So,<br />
after search quite long, I have found that the only solution that really works for me<br />
is "xbacklight".<br />
So, here is how to map the "Special Key " and alt together with F8 and F9 to reduce or<br />
increase screen brightness.<br />
First, install xbacklight:
<br />
<pre class="prettyprint" id="bash">aptitude install xbacklight
</pre>
Decide where you want the custom script to reside (see bellow) and export the following bash
variable:
<br />
<pre class="prettyprint" id="bash">export PATHWHEREYOUWANTYOURSCRIPT=/usr/local/bin/increasebacklight.sh
</pre>
Then create custom keybindings:
<br />
<pre class="prettyprint" id="bash">#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 "<alt><mod4>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 "<alt><mod4>F9"
gconftool-2 -s /desktop/gnome/keybindings/custom2/name -t string "Increase Backlight"
</mod4></alt></mod4></alt></pre>
<br />
And finally, setup the the script which increases the screen brightness:<br />
<br />
<br />
<pre class="prettyprint" id="bash">#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
</pre>
That is all.<br />
<br />
P.S.<br />
Yariv,<br />
If you are reading this, thanks for introducing me to xbacklight.linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com0tag:blogger.com,1999:blog-29919833.post-77546237294060627232011-10-19T10:54:00.000-07:002011-10-19T13:03:43.730-07:00When friends spit FUDWarning: 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:
<b> </b><br />
<br />
<b>"2. anything that's open source is inherently less user friendly than commercial products."</b><br />
<br />
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.<br />
<br />
So, please give me and advice how to fight FUD when it comes from friends you really love.<br />
<br />
Finally, apologies to my friend who got quoted without reference, and had to experience me getting upset.linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com0tag:blogger.com,1999:blog-29919833.post-18051231825329684312011-10-06T10:17:00.000-07:002011-10-06T10:17:55.550-07:00Another crack in the Windows hagmonyFor 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:
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcArfUewgRu9hzCq0s89m22P0SldN4KHHzq7HjQszeID0R_fl0RwL-eQRAC9vleRlQspBlW8GnUpx_pMuAs9G-o7op0B2LMnujijMaKW-TEY0k4dq6rpe6AwtnSEH5TM4mnHg9/s1600/X101_BK_KeyPad.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkOjjIQNzpSDQDyyPSzsZA8CnnCw2QqRWh3KcefsfOXPXbgiqI46BMgRi4OyozKf3Tt_TDqVXk-rkmMVnCKzBxwU2D_-XtIxtQ72shddtY1I2vjDsWIcfEZ2dfiF8xPYuks0r3/s1600/X101_BK_KeyPad.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkOjjIQNzpSDQDyyPSzsZA8CnnCw2QqRWh3KcefsfOXPXbgiqI46BMgRi4OyozKf3Tt_TDqVXk-rkmMVnCKzBxwU2D_-XtIxtQ72shddtY1I2vjDsWIcfEZ2dfiF8xPYuks0r3/s400/X101_BK_KeyPad.jpg" width="400" /> </a></div>
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.linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com0tag:blogger.com,1999:blog-29919833.post-19871362717631172832011-10-03T08:22:00.000-07:002011-10-03T08:23:05.031-07:00Quicktip: make gedit more saneContinuing 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:
<pre class="prettyprint" id="bash">
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
</pre>
Well, GNOME 2 isn't that evil. Let's hope the Mate Desktop Environment really catches.
linuxpixiehttp://www.blogger.com/profile/13824277076869080022noreply@blogger.com0