Good Morning: Step in to Arduino….

So I’ve bought one of those cheap Arduino kits off eBay… In fact I’ve bought the cheapest one that I could find from a European seller… Bought it on Chinese shop with an UK warehouse, but the kit came from Sweden… Talk about globalization… After waiting around 10 days, I’ve got my kit, and in 5 minutes a LED was blinking in pure RGB glory (just red…).

The kit came with a UNO R3 clone, identical to the original, and several other components.

It depends what you want to do with your Arduino, but just to have an idea what came with my Kit:

- Some LED’s, push buttons, resistors, 7 segment (single and 4 side by side) and led matrix.

- One shift register 74hc595.

While the leds and the single segment can be driven by Arduino pins, for the led Matrix e the 4 7-segment display the shift register allows to drive them and use a minimal number of pins.

- An Infra red receiver and small remote. This is great because it allows to have multiple inputs (the remote switches) only using a single input.

- A 16×2 LCD display. I never used it directly, and just also bought an I2C driver for it, so I only need 2 pins to drive it and 2 pins for powering it.

- One servo SG-9 motor, and one stepper motor with a ULN2003 driver.
This allows to do some basic learning with these type of motors, but I think to do something useful, more motors are needed.

- An expansion shield with a mini bread board. Not used yet.

- A larger breadboard and some dupont cables. These last item are only enough for some basic experiments but for more advanced stuff there is the need to buy more…

- A 9V battery clip for providing standalone power

- An USB cable.

- Some assorted stuff. (On pot, flame sensor, LDR, tilt switch, etc…)

So, it is worth it to buy this kind of kit?

The short answer, yes, but for intermediate levels or more advanced levels, some more items are needed to be added to the kit, namely cables, and to allow the use of the 16×2 lcd while having pins available, at least an I2C driver/shield for the lcd. This is cheap out of ebay, works fine, and allows introducing to the I2C protocol

Android SDK and NetBeans

I’m user of Netbeans for my Java related work.

The Android SDK instructions refer the use of Eclipse as the IDE of choice, but is also possible to use Netbeans with the NBAndroid plugin, available at

Just following the instructions for installing the plugin in into Netbeans, namely by adding the plugin URL and installing them.

One issue that I’ve found was that the New Project Wizard didn’t show the Android type applications for creation…

For making on the New Project Wizard the Android Projects available to be created, you must enable the JAVA ME plugin, so just go again to Plugins and select JAVA ME and press Enable at the bottom of the window.

It should work now.


Portuguese Steam Engine train at the Douro

One of my favourite shows at the Travel Channel is the one named “The Great Scenic Railways Journeys”. North America has a lot of private and volunteer steam engines trains that are a tourist attraction, and at the same time, keep it’s pre-industrial and industrial history. And this on two countries that have at most 250 years of “modern” history.

Portugal despite it’s huge 1000 year history and contribution to the global world history is famous for  forgetting and letting rot it’s assets…

So it’s good to see, again this year, an old steam engine train on one of the more beautiful rail-roads in Europe and across the OPorto wine region is back in action:

If your in Oporto area this year, don’t miss it: Every Saturday until the 1st of October.

Arch Linux test drive: Thoughts from a Kubuntu user

My old work laptop computer is about to be replaced by my employer by a new ASUS N73SV.

First of all this computer has what is called the Optimus Graphics Technology, that isn’t so Optimus regarding Linux… This technology is made of two video cards, one Intel embebed on the chipset and one discrete Nvidia chipset. As far as I know there is no Linux driver for this, and Nvidia won’t be releasing in a foreseeable future Linux support. So the Intel card will be used (I’m not using this for games) and the Nvidia card will be disabled. There are solutions for disabling completely the card and or use some applications on the Intel card and others on the Nvidia card, I’ll have to check. But disabling the Nvidia card improves the battery life, so…

So, off course, the first thing to do this computer is to nuke the Windows 7 install and install a Linux OS…

And there’s the catch: Kubuntu 11.04 or the Arch Linux Rolling distro?

Both have great documentation and great communities, but both could have some “clean up” on it. For example, on the Arch Beginner Install, some things aren’t completely obvious (Well at least for me). This is due to the fact that the documentation is in fact complete, it shows all the possibilities, but it should only show first the most obvious/common/standard way, and then link out the complete documentation regarding the subject. This way documentation could be more slim and straight forward.

Anyway, I was able to install and get an Arch system running without any issues with KDE Desktop but there where issues, and those are not Arch Linux fault. These issues are related to it’s mirrors and the software and sync status of them.

So being on PT, I’ve enabled all PT mirrors, and ended up with KDE 4.4.5 installing and running… Well the latest release of KDE is 4.6.3, so what happened here??? Browsing the mirrors I’ve found out that some where not up to date, so I’ve disabled them, and sure, pacman now shows that KDE 4.6.3 is available. So I’ve disabled the out of date mirrors, and while downloading I had failures regarding mplayer, and x264 packages that wouldn’t allow the upgrade to proceed.

Humm, ok, so I’ve enabled the core repository, and now everything is downloaded fine, but pacman refuses to upgrade due to some packages are corrupted.

So, not of the best starts…

But still I’ll give Arch Linux a try, because mainly on Kubuntu to have the latest software version, namely Libreoffice and even Calligra for test driving means to add backports and probably broking your next mandatory upgrade.

So, after reading the Arch Linux Wiki, I’ve found out that there is a mirror status page that shows what mirrors are available and up to date. I’ve deleted my obsolete mirrors, and enabled only the “live” ones (one in my case and did a full upgrade, and after an hour, more or less I had KDE 4.6 SC installed and running.

So far what I’ve done:

- Installed the base Arch system, making sure that the mirror list was up to date.

- Configured a new no priviledge user, and set up sudo

- Installed Xorg and KDE

- Configured the dbus and kdm daemons to start automatically

Then, I want to install the KDE Kpackagekit, but this was only available on AUR, not on the mainstream repositories. I’ve followed the instructions on and installed yaourt package manager. From here I’ve installed Kpackagekit, and with it I was able to install through KDE the rest of packages that I wanted, namely  the kdeplasma network widgets.


P8 5.0 on CentOS/Redhat install

If by any chance, during the setup launching this happens:

Preparing to install…
Extracting the JRE from the installer archive…
Unpacking the JRE…
Extracting the installation resources from the installer archive…
Configuring the installer for this system’s environment…

Launching installer…

Graphical installers are not supported by the VM. The console mode will be used instead…

Preparing CONSOLE Mode Installation…


Installer User Interface Mode Not Supported

The installer cannot run in this UI mode. To specify the interface mode, use the -i command-line option, followed by the UI mode identifier. The valid UI modes identifiers are GUI, Console, and Silent.


Just install de compatibility libstd to your system:

yum install compat-libstdc++-33.i386

Glassfish Server quick start guide

Too many documentationto read/browse to get what it’s needed to jumpstart using Glassfish Server for development…. in a QUICK way :)

So, this is for the Glassfish server that is installed with Netbeans 6.9.1 and on Windows. for Linux the only thing that changes is the start-up procedure.

To start the default domain:

1) Goto the install Glassfish directory /bin

2) asadmin start-domain domain1   -> this will start the default installed domain named domain1

To access the Administration Console.

1) Point your browser to: http://localhost:4848/login.jsf or http://server_name:4848/login.jsf

If by any chance you forget to put the login.jsp page an error creeps up: The requested resource (/common/index.jsf not found) is not available when trying to access the Glassfish Adminstration console. You have to specify the login.jsp page to make it work.

Kubuntu – Install ATI drivers

The complete instructions are here:

For Kubuntu just make sure that:

1) The proprietary driver is enabled/installed: alt-f2 and run jockey-kde (Additional drivers)

2) Add the X team PPA:

$ sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
$ sudo apt-get update

3) Install the fglrx driver: sudo apt-get install fglrx

4) Initialize the ATI configuration:

sudo aticonfig –initial -f

In my case I’m using a dual monitor setup, and I did the above configuration and used the amdcccle configuration tool to setup the dual monitor. Please note that using Xinerama disables Desktop effects. If you want one large desktop choose the Multi-display Desktops. With this the desktop spawns the monitors and it’s possible to move windows between them.

5) Reboot.

If it fails to boot into graphical mode and/or it boots to VESA mode , go to safe mode and using the command jockey-text, make sure that the driver is enabled.

$ jockey-text -l
xorg:fglrx – ATI/AMD proprietary FGLRX graphics driver (Proprietary, Enabled, In use)

If the driver is disabled, enable it with the command: jockey-text -e xorg:fglrx

KDE 4.4 SC Kubuntu Backports – Dead keys (acentos nos caracteres portugueses)

If upgrading to KDE SC 4.4 on kubuntu 9.10 using the backports, you will find out if using a keyboard that has accents, that these don’t work anymore…. letters like á à ì í and so on do not work…

The issue is solved here ->

Basically by open a shell and run the following command:

sudo im-switch -s default-xim

Then press ALT-F1, enter the text console, login as your user and execute

sudo service kdm restart

problem solved.

Vmware ESX(i) Server with off-the-shelf components

VMWare’s ESXi server can be used for free for stand-alone servers. The problem is that the HAL list is pretty much defined for server room servers like HP, IBM, DELL and so on.

So what if I want to use off-the-shelf coumputer components? Not too much information around for this. so here it is my working setup:

  • ASUS P6T motherboard
  • I7 920 CPU
  • Two 1TB Samsung F3 SATA harddisks
  • 12GB of GSKILL memory
  • Corsair TX650W
  • ASUS EN210 graphic board
  • Antec 300 case
  • INTEL 82574L 10/100/1000 PCI-E network card

The most important of all is the INTEL 82574L 10/100/1000 PCI-E network card. This is essential, because ESX will only support this network card, not the builtin motherboard card.

The setup also has an LG drive, but for some reason it wouldn’t boot up from there even a Knoopix CD, drive problem?

So I’ve download the ESXi server from the VMWare’s site and using Ubuntu’s unetbootin built a bootable USB flash drive with the latest ESXi release.

But before installing I made the following changes to the P6T BIOS:

  • SATA mode using AHCI mode. This is important for using the SATA harddisk at full potencial
  • Power on after power failure. It will boot automatically if power fails.
  • Set the correct date and time
  • Set the priority boot devices as removable media first, hardisk second, so I can boot from USB flash drive at installation phase.

Booting up from the USB flash drive was fast, and installation went without any problems.

After instalation, I’ve just changed the following parameters:

  • Root password
  • Fixed IP defined instead of using DHCP
  • System Name

From a client machine accessing http://vmesxserver_ip, shows the initial page where the administration vsphere client can be downloaded and installed. Windows only…

To move VMWare’s workstation files to the server from the Workstation or Server product you must use the VMWare converter product. Uploading files and adding to the inventory will not work.

So download VMWare converter (Linux version available), and install the server and the client. From there you can upload your vm machines. If not when starting up the machines an error like this: Failed to open disk scsi0:0 Unsupported and/or invalid disk type 7. Did you forget to import the disk first ? will crop up.

EDIT: DO NOT BUY LG cd/dvd drives. These drives can be shipped with an adware/fishware/whatever software named bluebirds , bluebirds.exe that will appear in all your Windows Virtual Machines… Stay away from these drives. You will need to flash them to get rid of this crapware that is installed without your knowledge or authorization. I should have spend 5 more euros and bought an Asus drive. The problem booting the server with the ESXi cdrom was probably due to this issue….

This means that I will not ever again will buy anything from LG. Nice move.

Firefox and Dropbox syncronization for Bookmarks and Passwords

EDIT: Mozilla Weave is OK now and I fully use it. No hacks anymore, so the rest of this post is here for historical reasons: Just use Mozilla Weave.

After upgrading from Mozilla FireFox 3.0 to 3.5 I tried Mozilla Weave for syncing my bookmarks and passwords in all my computers. I was using version 0.8 (1.0b1 is out now), but despite working more or less, most of my bookmarks where misplaced, put out of order, moved to unsorted bookmarks… a mess. Tiding up the bookmarks on one browser doesn’t mean that it would be ok on another, so after only 5 days of use, I thought that there is probably a better solution, and I found it.

The solution is to use Dropbox, the FireFox Addon SyncPlaces: for synchronizing bookmarks and passwords. It works as it should. It doesn’t mess with Bookmarks, the order is kept, Icons are kept, and passwords are synchronized without any issue.

So, what are the steps:

- Install Dropbox and create an account.

- Install the Syncplaces add-on for Firefox

- Create a directory for storing Firefox information on your Dropbox folder, for example: mkdir ~/Dropbox/Firefox

- On your Firefox menu, goto Bookmarks->Syncplaces->options

- Select the Server tab and then select on the Connection sub-tab, the protocol File

- Select now the Syncronization tab, and define the path for the files: prefix the suggested name with /home/primalcortex/Dropbox/Firefox. So it should look like

JSON PATH: /home/primalcortex/Dropbox/Firefox/syncplaces.json

If you want, you can output also in HTML and XBEL format. Use the same path for the files.

- For synchronizing passwords select the check-box passwords, and input a strong password. The password path is like the previous ones: /home/primalcortex/Dropbox/Firefox/passwords

You’re set. So down on the FireFox status bar, there is now an icon with a blue and red lines/circles, right click on it and select Send Bookmarks/passwords. Make sure that on the Dropbox Firefox folder files where created. Now DropBox synchronizes these files into the “cloud”, and they are available to your other Dropbox computers.

On the other computers, just repeat the configuration process (Install Dropbox, SyncPlaces, same configuration) but this time select on those computers on the SyncPlaces icon, the Receive Bookmarks/passwords option. (Make sure that you use the same password for the password export/impor feature in all computers).

Voilá, full no fuss workable synchronization! You just decide now which is the master machine, if you want to, namely by tweaking the merge options of the Syncplaces Addon. Also to avoid bookmarks duplication, I recommend that the BookmarkDD addon at be installed and set not to do pop-ups when duplicated bookmarks are found. This way, during import, no duplicate bookmarks are imported.

Now you can automate the synchronization process by just configuring Syncplaces to synchronize at a specific time, or periodically/automatically and your set.