Dec 8, 2010

Cleaning my Debian system

I've come across some utilities that help in removing old files that lie on the filesystem and all they do is waste disk space.

There are some debian tools to deal with "orphaned" packages, like deborphan. Its usage is pretty simple:

# deborphan
.. follows a list of "orphaned" packages

I find more interesting the utility named "cruft". I use it like this:

# cruft -d /usr/lib > report.cruft.txt

This checks for files that must be in the system and files that should not be in the filesystem.

# cat report.cruft.txt | grep libGL

These files should not have been there. So, I can delete them.

I'm not aware of all the options yet, but I'll look into it when I have some time to spend...

It's convenient to check what package provides some file:

# apt-file search
fglrx-glx: /usr/lib/
fglrx-glx: /usr/lib/
libgl1-mesa-glx: /usr/lib/
libgl1-mesa-glx: /usr/lib/

Also, you can use dpkg:

# dpkg -S

Nov 12, 2009

GitHub repositories

Here are my repositories:

May 24, 2008

Linux electronic Whiteboard (2)

Many thanks to vanhtu1987 for his GREAT contributions (in fact, almost all of the work)

Dec 21, 2007

Linux electronic Whiteboard

After seeing this I decided to try it in GNU/Linux. After some time of no sleeping, I suceeded.

It's very basic, a bit buggy, but It works.

If you are a gentoo user, check this howto, written by stone.

If using Ubuntu 7.10 (gutsy gibbon):
  • First, make sure bluetooth is working
  • Download the program
  • Extract the file "demo" (no need for a configuration file now)
  • sudo apt-get install lswm libcwiid0 libsdl1.2debian libxext6 libxtst6
  • sudo ln -s /usr/lib/ /usr/lib/
  • Now we are ready to execute it: ./demo
  • Put the wiimote in discovery mode (press 1+2)
  • If the computer cannot connect with the wiimote, you can try to pass the wiimote address as the first argument: "./demo thewiimoteaddress". To obtain this address, execute "lswm", as you press 1+2 in the wiimote.
  • When the wiimote is connected, you should see four crosses and small rectangle at the center of the screen
  • Point the wiimote to the screen, and start moving your IR pen.
  • The position of the IR pen will show in the little square at the center of the screen. You can use it to adjust the wiimote so the distance between the points at the corners is maximized.
  • With the IR pen, click at the crosses, in this order: top-left, top-right, bottom-left, bottom-right.
  • After each click on the each cross, you have to press spacebar (you will notice that the cross you have to click is blinking)
  • When you press the spacebar the fourth time, the IR pen and the mouse pointer will be in sync. You can start to use your electronic whiteboard
  • To exit, press any wiimote's key.
If that version does not work for you, you can try earlier releases here.

If you want to compile it yourself, check the project in google code (go to the source tab if you want to browse the code).

UPDATE: I opened another branch in the project, with experimental code from vahtu1987 (a great contributor to the project). Here, check the svn/branches/cpp folder.

If you have subversion installed on your system (sudo apt-get install subversion), you can get a working copy just typing:

$ svn checkout linux-whiteboard-read-only

You need to install some development libraries:

$ sudo apt-get install libcwiid0-dev libsdl1.2-dev libxext-dev libbluetooth-dev

Maybe you will need to make a link for the libXTst library:

$ sudo ln -s /usr/lib/ /usr/lib/

If you can't get it working, post a comment. I will try to help you!!

GOOD LUCK, and happy hacking (linus dixit).

Dec 9, 2007


Perl has to be the most beautiful language that a computer can speak. Well, we all know that the computer speak in binary, really. Perl is a reasonable man-machine interface. I teach it to my students because it is powerful. It's a tool that let you do great things with computers.

I have used some computer languages: Basic, Pascal, C, C++, ADA... I liked C (i still use it), but the others... uff... they have serious flaws (there is no "perfect language")... all languages have pitfalls. I like C because it trusts the programmer, it let you do crazy things (take a integer and treat like a char or a string...). C++ and JAVA in the other hand, impose a developing model too strict. Specifically, they obligue us to use Objects. I think Object-Oriented languages are fine, and the OO metodology has its points, but I don't like to be obligated to think in some way. There are many situations that Objects are fine for, as there are many other situations that Objects feel ankward.

Nov 4, 2007

Fun with Debian

I am a long time linux user. My choice of distro is DEBIAN. I am amazed with this project, what has done and what is doing now.

The last little program that has come to my attention is "Qalculate", a powerful calculator. The windows calculator feels like a one-year boy TOY. It can do financial conversions, graphics, base changes, operation edits, etc... TRY IT!!!

Also, recently my Debian Unstable crashed while doing an upgrade (X-window-system was broken due to dependency problems, etc...), and I was forced to downgrade. Well, not exactly downgrade the system, I now have a mix of Unstable and Testing (the book "The Debian System" was of great help).

I can only say that we are very fortunate to have things like the GNU system, the Debian Project, all these free software that is so fantastic, in more aspects than one. I mean, it is great from the ethical point of view to use free software (in the sense Stallman says), and it is great from the technical point of view (I think UNIX and his derivatives are the technically superior OS).

Aug 13, 2007

My first post

What I shall talk about in my first post? mmmm.

Politics? life? technology? All these things are important. But, what is life? House (the doctor in the TV series) or someone from television said that life is a succession of rooms. And the people we meet in these rooms configure our lives. I think that's a good definition. It fits for me.

Life it's tough sometimes. It's a survival game. You have to be competitive, you have to do certain things to live comfortably. For example, you need to work. I think working is good, I certainly enjoy my work (sometimes), but I don't like the obligation. I mean, I don't wanna be forced to work. I want to work for myself, in what I like, when I like.

In the capitalist society we all live (Europe and States), it's all about the money. It's the real thing: You can't live without money. And money is what commits people to do stupid things (sometimes). Working should be a pleasant thing to do. Everybody should be granted a monthly pay (for basic things like buying food and clothes). Repetitive jobs should be done by machines. Working should be a voluntary activity.

What pisses me off it's the power that the employer has over the worker. The pressure is constant: extra meetings, more money promises, etc... That forces the employee to give up his life to commit to the work, even if he doesn't want to. Maybe he would be more happy staying at home, learning some new computer language...

Well, enough about that. We will have time for more discussions like this.