Archive for the ‘Anotacions informàtiques’ Category

Compile Qooxdoo for eyeOS (I)

dimecres, juliol 6th, 2011

Sometimes an eyeOS developer may need to use a Qooxdoo contrib, or to update Qooxdoo, or to fix anything. For instance, contribs extend the library and let the hacker have more backend features, widgets, themes, etc. There is a manual that helps Qooxdoo applications developers, but in eyeOS things might turn a bit tricky.

The first part of this article explains the standard method. The second part, the patches that sometimes are required.

To include a contrib, you have to ‘compile’ Qooxdoo. That is, Qooxdoo needs to resolve dependencies and to be compressed.

Requirements

When is this article useful?

  • Contribs — you want to use a Qooxdoo contrib
  • Core modifications — If you modified qx.* or aristo.Aristo or a dependency declared in the config file.
  • Debugging — If your face turned green fixing a bug.
  • Deployment — generate files to deploy eyeOS.

Getting the big picture

Edit eyeOS config file. This file differs a bit from Qooxdoo’s in order to include the Aristo theme and to adapt paths to libraries. Run the generate.py script.
generate.py build

Where ‘build’ is a job defined in config.json. In eyeOS you can use ‘debug’ as well, but it won”t work most times.

config.json

This file defines what to include, what to exclude, where to find the libraries… In eyeOS two jobs are declared: ‘build’ and ‘debug’. In the ‘build’ job you’ll find a line to declare your libraries. If you need to use a contrib, add it there.
"include": ["qx.*", "aristo.Aristo", "svg.*"]

Right beneath this line you’ll have to tell Qooxdoo where to find the code you’re including:
{
"manifest" : "/home/edu/svg/Manifest.json"
}

All contribs contain a Manifest.json. Just extract all the files of the contrib anywhere (e.g  /home/edu/mycontrib). They’ll be copied and compressed to the source/ folder of your Qooxdoo application.

Adapt all other paths. You may need to download the Aristo theme and edit the path in this file so the “compiler” finds it, like you did for the contrib and the “manifest” field 30 seconds before.

Troubleshooting

If you’re using a Qooxdoo version older than 1.4.1 and GNU/Linux, you might see ‘global name ‘WindowsError’ is not defined’. There’s a very quick fix available explained in bug 5273.

How to easily share files between Debian systems

dilluns, juliol 5th, 2010

After a few years with several computers at home, I needed a little network to share our files without using external drives. With Debian it can be easily achieved, in less than 10 minutes.

Packages needed:
samba, nautilus-share,  probably smbclient

After installing these packages in every computer, restart your session and try to share a folder. To do that, simply right click on a directory and choose “sharing options”. If Gnome prompts an error, please make sure that your user is in sambashare group, and that the /var/lib/samba/usershare directory is owned by sambashare: 
$ chown root:shambashare /var/lib/samba/usershares/

Once you get no errors, you’ll see your shared hosts and folders in Places > Network. Mount the desired folder, and let the others connect to it.

In addition, you’ll need to set up a user in the  server. Let’s say we want to call it “edu”. This command will set a password for him.

$ smbpasswd -a edu

and it should be working now :)

NTFS and Debian

divendres, gener 15th, 2010

Long time ago it was a pain in the neck to use ntfs units with Debian. Now we have a third generation driver in a package called ntfs-3g, but there is something extra to have a unit (specially external ones) working with write permissions. I had an external hard disk LG formatted with NTFS, and I wanted to make it work with my Debian Squeeze.

apt-get install libfuse2 fuse-utils ntfs-3g ntfsprogs

though probably with only ntfs-3g would work.

After that, plug your unit in, discover its device name (for instance, $ dmesg | tail -20), and mount it with the following line:

mount -t ntfs-3g /dev/sdb1 /media/LG -o umask=0,nls=utf8

Ready :)

LG KU990 viewty without shutter sound

dimecres, octubre 14th, 2009

Two weeks ago I bought an LG KU990 viewty on eBay. It was locked (Vodafone), so at first I had to unlock it, obviously. After that, my techie sense wanted me to make some research on Java apps and capabilites of the device. I found that I could connect it to my computer and access the core file systems, and I could edit them! :D

One of the worst things of this device is the shutter sound of the camera. When the user turns the camera on, the autofocus and the shutter will make a noise to alert everybody around the user that a picture is going to be taken. So, let’s get rid off that sound:

We’ll use the mobile phone on Windows with its drivers installed and a tool called EFS Media Builder, that you can find with an easy and quick search. Follow this tutorial with screenshots to learn how to connect your phone and access the core files. The tutorial itself is about how to make a back-up of the firmware and anyway, you should do it first and it shows how to reach the core files.

Once you’re in, with EFS File Explorer, go to TOTO/media/sounds/default sounds/ and rename the 6 files with a name like “shutter*” to something like “shutter*.bak”. Refresh, rename TOTO to LGAPP again, and disconnect. Now turn on your device and enjoy your silent camera.

Crònica de la festa Firefox 3.5

dissabte, juliol 18th, 2009

Ahir al vespre vam organitzar la festa del Firefox 3.5 a Barcelona. Tot i les dificultats tècniques, problemes del directe, i males passades d’Intel Atom i xorg.conf, vam poder fer les xerrades tal com les teníem pensades. Sembla que van agradar força, no? :) Presentació del Firefox 3.5 a nivell d’usuaris, com col·laborar al SUMO, per què fer-ho, i 5 minuts dedicats als programadors (aquí la web de demo que vaig preparar) i al Gecko 1.9.1. Un cop enllestit això, l’Espai Mallorca ens va servir la tan ansiada sobrassada acompanyada de bon vi i formatge.

Després mitja internet catalana vam anar a sopar a un restaurant típic romanès del carrer provença. L’àpat va sorprendre a tothom excepte la nostra companya de Mozilla Romania, n’Alina Mierlus: primer se serveix un licor, el palinka, que causa al comensal un forat a l’estómac degut a l’alta graduació. És bo, però :P   Tot seguit ens van servir el plat de les carns , d’allò més abundant i molt bo. Variat i preparat amb cura, amb una presentació envejable :) El postre va ser una mena de bunyol amb potser iogurt i confitura de maduixa, dolç i dens, en contrast amb l’únic (per sort) plat. Papanas, es diu. Després d’haver-ho regat tot amb vi, aigua, i una cervesa que ens van convidar, encara vam fer-hi entrar un cafè amb gel i un licor de cireres. De bo que estava, va venir a veure’ns ni més ni menys que el Compte Dràcula (i no és broma).


Entra