Tag: open-source (subscribe)

Yes, you are reading correctly: I decided to buy a freacking Chromebook. I really needed a lightweight notebook with me for my daily hackings while waiting for my subway station, and this one seemed to be the best option available when comparing models and prices. To be fair, and before you throw me rocks, I visited the LibreBoot X60's website for some time, because I was strongly considering buying one (even considering its weight); however, they did not have it in stock, and I did not want to wait anymore, so...

Anyway, as one might expect, configuring GNU/Linux on notebooks is becoming harder as time goes by, either because the infamous Secure Boot (anti-)feature, or because they come with more and more devices that demand proprietary crap to be loaded. But fortunately, it is still possible to overcome most of those problems and still get a GNU/Linux distro running.

References

For main reference, I used the following websites:

I also used other references for small problems that I had during the configuration, and I will list them when needed.

Backing up ChromeOS

The first thing you will probably want to do is to make a recovery image of the ChromeOS that comes pre-installed in the machine, in case things go wrong. Unfortunately, to do that you need to have a Google account, otherwise the system will fail to record the image. So, if you want to let Google know that you bought a Chromebook, login into the system, open Chrome, and go to the special URL chrome://imageburner. You will need a 4 GiB pendrive/sdcard. It should be pretty straightforward to do the recording from there.

Screw the screw

Now comes the hard part. This notebook comes with a write-protect screw. You might be thinking: what is the purpose of this screw?

Well, the thing is: Chromebooks come with their own boot scheme, which unfortunately doesn't work to boot Linux. However, newer models also offer a “legacy boot” option (SeaBIOS), and this can boot Linux. So far, so good, but...

When you switch to SeaBIOS (details below), the system will complain that it cannot find ChromeOS, and will ask if you want to reinstall the system. This will happen every time you boot the machine, because the system is still entering the default BIOS. In order to activate SeaBIOS, you have to press CTRL-L (Control + L) every time you boot! And this is where the screw comes into play.

If you remove the write-protect screw, you will be able to make the system use SeaBIOS by default, and therefore will not need to worry about pressing CTRL-L every time. Sounds good? Maybe not so much...

The first thing to consider is that you will lose your warranty the moment you open the notebook case. As I was not very concerned about it, I decided to try to remove the screw, and guess what happened? I stripped the screw! I am still not sure why that happened, because I was using the correct screw driver for the job, but when I tried to remove the screw, it seemed like butter and started to “decompose”!

Anyway, after spending many hours trying to figure out a way to remove the screw, I gave up. My intention is to always suspend the system, so I rarely need to press CTRL-L anyway...

Well, that's all I have to say about this screwed screw. If you decide to try removing it, keep in mind that I cannot help you in any way, and that you are entirely responsible for what happens.

Now, let's install the system :-).

Enable Developer Mode

You need to enable the Developer Mode in order to be able to enable SeaBIOS. To do that, follow these steps from the Arch[GNU/]Linux wiki page.

I don't remember if this step works if you don't have activated the ChromeOS (i.e., if you don't have a Google account associated with the device). For my use, I just created a fake account to be able to proceed.

Accessing the superuser shell inside ChromeOS

Now, you will need to access the superuser (root) shell inside ChromeOS, to enable SeaBIOS. Follow the steps described in the Arch[GNU/]Linux wiki page. For this specific step, you don't need to login, which is good.

Enabling SeaBIOS

We're almost there! The last step before you boot your Fedora LiveUSB is to actually enable SeaBIOS. Just go inside your superuser shell (from the previous step) and type:

1
> crossystem dev_boot_usb=1 dev_boot_legacy=1

And that's it!

If you managed to successfuly remove the write-protect screw, you may also want to enable booting SeaBIOS by default. To do that, there is a guide, again on Arch[GNU/]Linux wiki. DO NOT DO THAT IF YOU DID NOT REMOVE THE WRITE-PROTECT SCREW!!!!

Booting Fedora

Now, we should finally be able to boot Fedora! Remember, you will have to press CTRL-L after you reboot (if you have not removed the write-protect screw), otherwise the system will just complain and not boot into SeaBIOS. So, press CTRL-L, choose the boot order (you will probably want to boot from USB first, if your Fedora is on a USB stick), choose to boot the live Fedora image, and... bum!! You will probably see a message complaining that there was not enough memory to boot (the message is “Not enough memory to load specified image”).

You can solve that by passing the mem parameter to Linux. So, when GRUB complains that it was unable to load the specified image, it will give you a command prompt (boot:), and you just need to type:

#!bash boot: linux mem=1980M

And that's it, things should work.

Installing the system

I won't guide you through the installation process; I just want to remember you that you have a 32 GiB SSD drive, so think carefully before you decide how you want to set up the partitions. What I did was to reserve 1 GB for my swap, and take all the rest to the root partition (i.e., I did not create a separate /home partition).

You will also notice that the touchpad does not work (neither does the touchscreen). So you will have to do the installation using a USB mouse for now.

Getting the touchpad to work

I strongly recommend you to read this Fedora bug, which is mostly about the touchpad/touchscreen support, but also covers other interesting topics as well.

Anyway, the bug is still being constantly updated, because the proposed patches to make the touchpad/touchscreen work were not fully integrated into Linux yet. So, depending on the version of Linux that you are running, you will probably need to run a different version of the scripts that are being kindly provided in the bug.

As of this writing, I am running Linux 3.16.2-201.fc20, and the script that does the job for me is this one. If you are like me, you will never run a script without looking at what it does, so go there and do it, I will wait :-).

OK, now that you are confident, run the script (as root, of course), and confirm that it actually installs the necessary drivers to make the devices work. In my case, I only got the touchpad working, even though the touchscreen is also covered by this script. However, since I don't want the touchscreen, I did not investigate this further.

After the installation, reboot your system and at least your touchpad should be working :-). Or kind of...

What happened to me was that I was getting strange behaviors with the touchpad. Sometimes (randomly), its sensitivity became weird, and it was very hard to move the pointer or to click on things. Fortunately, I found the solution in the same bug, in this comment by Yannick Defais. After creating this X11 configuration file, everything worked fine.

Getting suspend to work

Now comes the hard part. My next challenge was to get suspend to work, because (as I said above) I don't want to poweroff/poweron every time.

My first obvious attempt was to try to suspend using the current configuration that came with Fedora. The notebook actually suspended, but then it resumed 1 second later, and the system froze (i.e., I had to force the shutdown by holding the power button for a few seconds). Hmm, it smelled like this would take some effort, and my nose was right.

After a lot of search (and asking in the bug), I found out about a few Linux flags that I could provide in boot time. To save you time, this is what I have now in my /etc/default/grub file:

1
GRUB_CMDLINE_LINUX="tpm_tis.force=1 tpm_tis.interrupts=0 ..."

The final ... means that you should keep whatever was there before you included those parameters, of course. Also, after you edit this file, you need to regenerate the GRUB configuration file on /boot. Run the following command as root:

1
> grub2-mkconfig -o /boot/grub2/grub.cfg

Then, after I rebooted the system, I found that only adding those flags was still not enough. I saw a bunch of errors on dmesg, which showed me that there was some problem with EHCI and xHCI. After a few more research, I found the this comment on an Arch[GNU/]Linux forum. Just follow the steps there (i.e., create the necessary files, especially the /usr/lib/systemd/system-sleep/cros-sound-suspend.sh), and things should start to get better. But not yet...

Now, you will see that suspend/resume work OK, but when you suspend, the system will still resume after 1 second or so. Basically, this happens because the system is using the touchpad and the touchscreen to determine whether it should resume from suspend or not. So basically what you have to do is to disable those sources of events:

1
2
echo TPAD > /proc/acpi/wakeup
echo TSCR > /proc/acpi/wakeup

And voilà! Now everything should work as expected :-). You might want to issue those commands every time you boot the system, in order to get suspend to work every time, of course. To do that, you can create a /etc/rc.d/rc.local, which gets executed when the system starts:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
> cat /etc/rc.d/rc.local
#!/bin/bash

suspend_tricks()
{
  echo TPAD > /proc/acpi/wakeup
  echo TSCR > /proc/acpi/wakeup
}

suspend_tricks

exit 0

Don't forget to make this file executable:

1
> chmod +x /etc/rc.d/rc.local

Conclusion

Overall, I am happy with the machine. I still haven't tried installing Linux-libre on it, so I am not sure if it can work without binary blobs and proprietary craps.

I found the keyboard comfortable, and the touchpad OK. The only extra issue I had was using the Canadian/French/whatever keyboard that comes with it, because it lacks some useful keys for me, like Page Up/Down, Insert, and a few others. So far, I am working around this issue by using xbindkeys and xvkdb.

I do not recommend this machine if you are not tech-savvy enough to follow the steps listed in this post. If that is the case, then consider buying a machine that can easily run GNU/Linux, because you feel much more comfortable configuring it!


This post is massively inspired by a post in the gnu-prog-discuss mailing list. This is a closed list of the GNU Project, and only GNU maintainers and contributors can join, so I cannot put a link to the original message (by Mike Gerwitz), but this topic is being discussed over and over again at many places, so you will not have trouble finding similar opinions. I am also “responding” to a recent discussion that I had with Luiz Izidoro, which is a “friend” (as he himself likes to say) of the LibrePlanet São Paulo group.

Mike's point is simple: we, Free Software activists, are the geeks (or nerds) at school, surrounded by the “popular guys” all over again. In case it is not clear, the “popular guys” are the people who do not care about the Free Software ideology; the programmers who license their softwares using permissive licenses using the excuse of “more freedom”, but give away their work to increase the proprietary world.

It is undeniable that the Free Software, as a technical movement, has won. Anywhere you look, you see Free Software being developed and used. It is important to say that by “Free Software” I mean not only copyleft programs, but also permissive ones. However, it is also undeniable that several proprietary programs and solutions are being developed with the help of those permissive Free Softwares, without giving anything back to the community, as usual.

Numbers speak for themselves, so I am posting here the example that Mike used in his message, about Trello, a “web-based project management application”, according to Wikipedia. It is quite popular among project managers, and I know about two or three companies that use it, though I have never used it myself (luckily). Being web-based, it is full of Javascript code, and I appreciated the work Mike had to determine which pieces of Free Software Trello uses. The result is:

jQuery, Sizzle, jQuery UI, jQuery Widget, jQuery UI Mouse, jQuery UI Position, jQuery UI Draggable, jQuery UI Droppable, jQuery UI Sortable, jQuery UI Datepicker, Hogan, Backbone, JSON2 (Crockford), Markdown.js, Socket.io, Underscore.js, Bootstrap, Backbone, and Mustache

You can see the license headers of all those projects here:

This is only on the client-side, i.e., the Javascript portion. I will not post the link to the full Javascript code (condensed in one single file) because I do not have permission to do so, but it should not be hard to take a look yourself if you are curious.

On the server side, Mike came up with this list of Free Softwares being used by Trello:

MongoDB, Redis, Node.js, HAProxy, Express, Connect, Cluster, node_redis, Mongoose, node-mogodb-native, async, CofeeScript, and probably more

Quite a lot of Free Software, right? And Trello advertises itself as being “free”, which might confuse the inexperient reader because they are talking about price, not about freedom.

The lesson we learn is obvious but no less painful. He who contributes to Free Software using permissive licenses is directly contributing to the dissemination of proprietary software. And the corolary should be obvious as well: you are being exploited. Another nice addition made by Mike is a quote by Larry Ellison, CEO and founder of Oracle Corporation, about Free Software (and Open Source):

“If an open source product gets good enough, we'll simply take it.... So the great thing about open source is nobody owns it – a company like Oracle is free to take it for nothing, include it in our products and charge for support, and that's what we'll do. So it is not disruptive at all – you have to find places to add value. Once open source gets good enough, competing with it would be insane. ... We don't have to fight open source, we have to exploit open source.”

So, do you really think you have more freedom because you can choose BSD/MIT over GPL? Do you really think you it doesn't matter what other people do to your code, which you released as a Free Software? What are your goal with this movement, contribute to a better Free Software ecosystem (which will lead to a society which is more fair), or just getting your name in the hall of (f|sh)ame?

Back to the initial point, about not being “popular” among your friends (or be the “radical”, “extremist”, and other adjectives), I believe Mike hit the nail when he said that, because that is exactly how I am feeling currently, and I know other Free Softwares activists feel exactly the same. To defend a copyleft license is to defend something that is wrong, because, in the “popular kids' view”, copyleft is about anything but freedom! The cool thing now is to be indifferent, or even to think that it is nice that proprietary software can coexist with Free Software, so let's give it a help and release everything we can under permissive licenses. I could mention lots of very nice Free Softwares that chose to be permissive because their maintainers thought (and still think) GPL is evil.

I contributed and still contribute to some Free Softwares that are permissive licensed. And despite trying to use only copyleft software, sometimes I replace some of them by permissive ones, and do not feel guilty about it. I do that because I believe in Free Software, and I believe we should support it in every way we can. But doing so is also nocive to our cause. We are supporting softwares that are contributing to the proprietary world, even if that is not what their developers want. We are making it very easy for people like Larry Ellison to win and think they can exploit what other people are doing for free(dom). We are feeding our own enemy in their mouths. And we should be very careful about that.

This post is a request. I am asking you a favor. Please, consider (re)licensing your project using a copyleft license. If you do value what Free Software is about (or even what Open Source is about!), then help spread it by not helping the proprietary side. I am not asking you to join our ideological cause (or maybe I am?); feel free to stay out of this if you want. But please, at least consider helping the Free Software community by avoiding making your code permissive, which will give too much power to the unethical side.

Thank you!


Sei que ainda estou devendo um post sobre minha participação no FISL 15, mas o tempo anda meio curto pra falar tudo o que eu quero. Tenho decidido falar de maneira mais “picada”, até pra não fazer o texto ficar muito chato. E esse post aqui é sobre um comportamento que vejo há algum tempo, mas que foi exacerbado por conta do debate sobre a suposta morte do movimento Software Livre no Brasil.

Antes de mais nada, se quiser assistir ao debate, o link direto está aqui. Também sugiro uma visita à página wiki do grupo LibrePlanet São Paulo, na qual você pode encontrar algumas sugestões de outras palestras interessantes que rolaram no evento. Você pode acessá-la nesse link.

Mas voltando ao assunto. Meu objetivo no post não é discutir o debate em si; pretendo fazer isso em um post futuro. O ponto que quero discutir é o comportamento do que chamo de “zeladores da coerência”. São pessoas que existem em qualquer movimento social/político/filosófico, e não poderia deixar de existir no Software Livre. Mas curiosamente, vejo mais contundência naquelas pessoas que não defendem o Software Livre, do que naquelas que o fazem. Explico-me.

O Anahuac fez alguns posts recentemente atacando a falta de distinção entre os movimentos Open Source e Software Livre, especificamente por parte daqueles que fazem parte do primeiro mas se dizem defensores do segundo. Posso classificar, nesse meu post, o Anahuac como sendo um zelador da coerência, apesar de ele mesmo admitir algumas incoerências no seu comportamento, como o uso do Twitter. E, apesar de nem sempre concordar com o tom que ele usa em seus textos, muitas vezes combativos e até perigosamente ácidos, concordo com a maioria dos pontos que ele levanta nos dois artigos que mencionei. Se quiser lê-los, o primeiro é esse aqui, e o segundo tá nesse link. Há bastante tempo, publiquei minhas opiniões (em inglês) sobre esse mesmo assunto, nesse post aqui.

Pois bem, como o Anahuac não tem problema em levar pedradas, ele postou ambos os textos no site BR-[GNU/]Linux, notadamente um reduto Open Source brasileiro. Parei de ler o site há bastante tempo, por conta de diferenças de opinião com o conteúdo publicado, e principalmente por notar sempre um tom irônico e parcial travestido de uma suposta “isenção aos fatos” nos comentários que o autor do site faz sobre as notícias. No entanto, o próprio Anahuac fez questão de trazer à minha atenção a repercussão que os textos estavam tendo, e pediu-me pra ler os comentários do post no BR-[GNU/]Linux. Vale mencionar que o site utilizar o Disqus para oferecer um sistema de comentários, um serviço que não respeita a privacidade dos seus usuários e realiza tracking das atividades dos mesmos. Como não possuo uma conta lá, e utilizo alguns plug-ins para não executar código Javascript não-autorizado no meu navegador, acabei tendo um pouco de trabalho pra conseguir ler os comentários de forma mais ou menos anônima. Mas no fim, consegui. E o que vi, apesar de ser “mais do mesmo”, me deixou bem pensativo.

Não esperava uma reação diferente de parte da comunidade. Como disse, os textos do Anahuac são feitos pra “tocar na ferida” de uma forma às vezes brusca, e que desagrada muita gente. Vários comentários eram ad hominem, e nem merecem menção. Mas o que me chamou a atenção foi a quantidade de pessoas apontando incoerências (supostas ou verídicas) que o Anahuac comete, e retirando dele o direito de apontar qualquer tipo de incoerência na própria comunidade da qual faz parte. E aí fico pensando, será que nós mesmos, ativistas do Software Livre, não estamos colhendo o que plantamos?

Não consigo deixar de falar da minha experiência. Sempre tentei basear meus atos e opiniões em cima da minha própria coerência. Sei que é difícil, e, apesar de muitas vezes (pré)julgar alguém por uma incoerência cometida, tento sempre lembrar que eu mesmo já usei Gmail e Twitter para criticar o Software Livre. Obviamente que, na época, eu não tinha tanto conhecimento a respeito dos perigos de se usar essas ferramentas, mas mesmo assim nada impedia (como, de fato, não impediu!) que alguém chegasse e me acusasse de incoerência. Já, inclusive, condenei o uso do Facebook para divulgar um ex-grupo de Software Livre do qual fazia parte, e recebi como resposta um “conselho” (não muito educado) dizendo que, se eu quisesse usar apenas Software Livre, deveria parar de usar computador, já que independente da máquina eu ia ter que usar algo proprietário. Isso foi proferido por um dos fundadores do tal grupo, um rapaz muito famoso pela falta de educação, mas que, há bastante tempo atrás, acreditava nos mesmos ideais que eu.

É muito difícil rebater um argumento desse tipo. Aliás, é muito difícil rebater um dedo apontado na sua cara mostrando alguma incoerência que você comete, e que está lá como uma resposta a uma acusação sua de uma outra incoerência. Algumas pessoas tendem a se defender justificando seus erros através dos erros dos outros, e quando elas podem usar o próprio “acusador” como um exemplo, melhor ainda (pra elas)! É isso que está havendo, e é essa maré desses zeladores da coerência alheia que me preocupa um pouco. Afinal, sempre vai ser possível encontrar incoerências em qualquer pessoa.

Não sei direito onde quero chegar com esse texto, mas acho que uma coisa está ficando um pouco clara na minha cabeça, ou pelo menos eu estou começando a ver um lado diferente da história toda. Apontar incoerências, por mais evidentes que elas estejam aos nossos olhos, pode não ser a melhor forma de conseguirmos explicar nossos ideais. Pode parecer óbvio (e talvez seja), mas ninguém gosta de ser colocado contra a parede, e pouquíssimas pessoas têm a coragem necessária pra assumir publicamente um erro. Talvez o caminho para a cabeça e o coração das pessoas seja outro. Durante o debate no FISL, o Fred falou algo que tem estado na minha mente com cada vez mais frequência. Pode parecer piegas, mas nós precisamos de mais amor ao próximo, até para podermos entender que nós, também, já estivemos do lado de lá. O Software Livre, como movimento social, político e filosófico que é, vai florescer cada vez mais quando cada ativista olhar pra si mesmo e reconhecer, mesmo que com dificuldade, aquele a quem espera passar um pouco do seu ideal.

É difícil, mas é necessário.