come with me, on the way I'll explain.
Posts tagged ubuntu
Miojo Script
Jan 28th
O pre-requisito é o notify-send, um utilitário de linha de comando do libnotify. No Ubuntu:
sudo aptitude install libnotify-bin
E aqui o script em si:
sleep 5m; notify-send "aviso" "tirar o miojo do fogo"
Pronto, depois de cinco minutos isso vai aparecer:

OpenCV on Ubuntu
Dec 21st

Open Computer Vision Library or just OpenCV, is a cross-platform computer vision library focused on real-time image processing for video files or webcams.
You have two options to obtain the environment to develop on OpenCV. You can insert a new repository in your package manager or compile it by yourself.
For Ubuntu 9.10 Karmic Koala there’s this repository with OpenCV’s package.
To compile it you have to install some additional libraries compile it by your self. And it’s instructions vary for each distribution and version. For example, from Ubuntu Linux 9.10 to 9.04, the process varies slightly. I followed the instructions on this post “Installing OpenCV 2.0 on Ubuntu 9.10 Karmic Koala”.
After you have installed and have a well configured OpenCV development environment, you can compile a “source.c” file into a “program” binary like this:
gcc gcc source.c -o program `pkg-config opencv ‑‑libs ‑‑cflags`
Congelando e Ressuscitando Processos
Nov 14th

Nem só de morte vive o kill.
Suponha que você tem um processo chamado program e quer congelar seu funcionamento. Para congela-lo sem mata-lo você pode mandar um sinal SIGSTOP com:
kill -s stop `pidof program`
Para ressuscitar o mesmo processo:
kill -s cont `pidof program`
JavaFX 1.1 for Linux workaround
May 16th
Download
javafx4linux.tar.bz2 (~ 36Mb).
Installing
1) Extract the javafx4linux.tar.bz2 file. In this example I’m placing it on my Desktop. After the installing process you can remove it.
2) Open your NetBeans 6.5 and go at Tools → Plugins and go to Downloaded tab. In a plain and new NetBeans installation there will be no plugin in this tab yet.
3) Click on the Add Plugins button and head to the directory you extracted the file and select all .nbm files.
4) You will see a list of 22 plugins selected. Click on the Install button.
5) Just keep clicking on the Next button.
6) Check the license agreement accept box.
7) You’ll see a warning because the Linux pluggin is not signed. Don’t worry, just click Continue.
Click on Finish to restart NetBeans.
9) Now we can test it. Go at File → New Project, select the JavaFX on Categories and JavaFX Script Application on Projects.
10) Put some code and run it. There is. JavaFX on Linux.
Considerations
This is not a official of JavaFX for Linux! This solution was tested on Ubuntu 9.04 “Jaunty Jackalope” with Java 6 update 13 and NetBeans 6.5.1, but should also work with others Linux distributions and Java versions greater than 5.
Known bugs
As a non official workaround for JavaFX for Linux you may notice some drawbacks. Some parts of the JavaFX runtime rely on native implementations on the specific operational system. You may not use some multimedia capabilities as video playback, JavaFX Mobile emulator and some performance issues in some effects. Despite that, is perfectly possible to develop applications using JavaFX on NetBeans.
Thanks
I’d like to thanks some guys around the world. Weiqi Gao’s original post on JavaFX on Linux, HuaSong Liu article on DZone and Kaesar Alnijres post.
Ubuntu Jaunty: má performance gráfica
May 13th

Nas versões anteriores do Ubuntu, inclusive no 8.04 que eu utilizava anteriormente, não havia do que me queixar. Porém com a mudança para o 9.04 (Jaunty Jackalope) de imediato foi possível reparar uma queda drástica na performance da aceleração gráfica 3D.
Minha placa gráfica no meu notebook, um Amazon FL31.
silveira@fl31:~$ lspci -nn | grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller [8086:27a2] (rev 03)
Na release desta versão do Ubuntu havia um aviso de possível regreção na performance em placas de vídeo da Intel onde há a indicação de algumas soluções provisórias.
Regressão do Driver
Eu experimentei uma solução mais drástica que foi alternar o driver de vídeo para a versão anterior. O desempenho melhorou bastante, mas ainda senti uma boa diferença para os padrões que eu estou habituado. Além disso continuava impossível rodar alguns jogos, as texturas eram carregadas nos lugares errados e poucos quadros por segundo. Eu acabei por retornar os drivers para o default do Jaunty e descartar essa opção.
Atualização do Driver
Uma solução alternativa que eu me deparei foi atualizar os drivers para uma versão mais nova. Como root execute os comandos abaixo para adicionar os repositórios a lista do APT, adicionar suas chaves e atualizar as informações de pacote e instalar os novos drivers:
echo “deb http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu jaunty main” >> /etc/apt/sources.list.d/intel.list
sudo apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 165d673674a995b3e64bf0cf4f191a5a8844c542
aptitude update && aptitude safe-upgrade
A performance ainda não está tão boa quanto já foi mas está completamente suave e usável.
Ubuntu Shipit
Dec 30th

Those days I received my box of free Ubuntu CDs and sticks, free of charges. Courtesy of Canonical throught the Ubuntu Shipit project, thanks guys! I love those Internet free stuff. It’s essential having a few CDs distros always with me.
























