Archive

Archive for December, 2005

Dolibarr – Repasser une facture client de “validée” à “brouillon”

December 26, 2005 Leave a comment
Cet article a initialement été écrit en décembre 2005 pour le site web 
technique de BeezNest (http://glasnost.beeznest.org/articles/321).

Quelques instructions pour bidouiller dans Dolibarr directement en SQL.

Il faut primo se connecter sur le serveur de base de données (ici sur glouglou, je suppose qu’on est déjà connecté dessus).

mysql -u root -p dolibarr

Entrer ensuite le mot de passe (on peut aussi remplacer root par un autre utilisateur ayant accès en écriture sur la base de données dolibarr)

Une fois dans MySQL

Pour repasser une facture client de “validée” à “brouillon” connaissant son numéro:

1) Trouver le “rowid” de la facture

select rowid from llx_facture where facnumber = "le numéro avec les guillemets (p. exemple IN0500045)"

2) En retour, nous avons l’entier identifiant uniquement la facture. Il faut alors faire un

update llx_facture set fk_statut = 0 where rowid = "l'entier retourné précédemment SANS les Guillements"

Attention, cette modification conserve l’attribution du n° de facture, ça peut jouer des tours…

Advertisements
Categories: French, Tech Crunch Tags: ,

HOWTO Populate /dev with static files on Debian

December 19, 2005 Leave a comment
This article was first written in December 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/320).

In some situation (when using previously devfs, for example), your /dev is empty of static files, and moving to udev or coming back to static /dev is then impossible.

In package debootstrap on Debian, there is the file /usr/lib/debootstrap/devices.tar.gz (or /usr/share/debootstrap/devices.tar.gz in newer releases) which only contains standard /dev files.

To set them in place is then just:

# cd /mount_point
# tar zxvf /usr/lib/debootstrap/devices.tar.gz

Of course, your /dev must not be mounted with udev or devfs for this to work, so it may be necessary to boot from a CD (for example) and mount your adequate partitions (containing /dev and /usr/lib) before doing this.

Example procedure

Your installation is broken because the system does not find some devices at boot (ex.: /dev/console or /dev/null).

  • Boot on a Debian or Ubuntu CD (not necessarily a LiveCD)
  • Switch to console (alt-f2 – Enter)
  • Mount the partition on the harddrive where / is located (ex: /dev/hda3) on /floppy
  • Mount the partition on the harddrive where /usr is located, if separate, under /floppy/usr
  • Change to directory /floppy
  • Execute tar zxvf usr/lib/debootstrap/devices.tar.gz
  • Reboot
Categories: English, Tech Crunch Tags:

HOWTO Install Japanese Input on Debian Sarge (using SCIM)

December 16, 2005 Leave a comment
This article was first written in December 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/319).

Introduction

This article explains how to install the SCIM (Simplified Chinese Input Method) together with enough Japanese resources to enable Japanese input on your desktop (GNOME 2 in this case).

SCIM is a software that can run as a daemon in order to enable special, on the fly, character substitution while you type something on a normal keyboard. Initially planned for Simplified Chinese, it can be used for Japanese if installed with the correct tables.

To activate SCIM, you can configure a set of enabling

Everything here is free and open-source, so you can try it and remove it if not happy.

Installing SCIM basic + Japanese tables and fonts

Use the following command to install mandatory packages:

sudo apt-get install uim anthy scim-gtk2-immodule scim-uim scim-tables-ja

In the Anthy config screen, select any of the dictionaries you want (I generally pick the three).

Now comes the tricky bit, but this is only mandatory if you want SCIM to be started automatically with your session. If I got it correctly, SCIM acts on the X system, not on the desktop system. This means that you have to start it at the X level, so just before GNOME. To do this, edit a .xsession file in your home directory and fill it with the following lines:

export XMODIFIERS="@im=SCIM"
export GTK_IM_MODULE="scim"
export XIM_PROGRAM="scim -d"
export QT_IM_MODULE="scim"
gnome-session

Change that file to be executable

chmod +x .xsession

Then restart your X session (logout from your GNOME session by asking to close session).

Categories: English, OSS Solutions, Tech Crunch Tags: , ,

Stale NFS file handle

December 14, 2005 Leave a comment
This article was first written in December 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/318).

If you get this message [1] on a NFS client while trying to access a file or directory on a NFS server, chances are you can fix it by killing the processes that try to access it. Chances are that you don’t know which processes may be involved. That’s where intelligent system tool come handy.

fuser -km /directoryX/directoy_or_fileY

will kill all the processes accessing the file or directory.

[1Stale NFS file handle

Categories: English, Tech Crunch Tags:

Updating a pre-existing Debian package

December 1, 2005 Leave a comment
This article was first written in December 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/314).

From time to time, you would like to have a more recent version of an application than what is currently packaged in Debian  [1].

This is basically the same process as backporting anyway.

There has been the introduction in Debian of a new set of tools called Debian External Health Status (dehs) which proved really useful for QA. This set of tools involve a file called debian/watch in the source package, and when this file is present (and working), the utility uscan [2] may be used to serve our current purpose.

So, we’ll download the sources of the latest version available (you need of course to have the right deb-src line in your sources.list

):

$ apt-get source packagename

It will download and extract the sources package in a directory whose name will be packagename-X.X.X and apply the Debian packaging patch [3] to it.

Then go into the newly-created directory and issue the following command:

~/packagename-X.X.X$ uscan --verbose

It will try to get the latest upstream tarball and extract it in ../packagename-Y.Y.Y/ [4] and will try to apply the old Debian packaging patch to it (while trying to automate some stuff like the release version in debian/changelog).

If everything went well, go to the newly-created directory ../packagename-Y.Y.Y/ and issue the following command (if you want to modify something in the packaging, this is the good time to do it):

~/packagename-Y.Y.Y$ debuild

No doubt it will ask you to install some build-dependencies. Just read the output and install them accordingly. Relaunch debuild if needed, and enjoy your new package!


[1] I’m talking here about Unstable, because otherwise it’s probably just plain backport, and don’t forget Experimental exists, and may already host the application you miss so much

[2] part of package devscripts for some time already, and I suggest you install package fakeroot too

[3packagename_X.X.X.diff.gz

[4] it will tell you exactly

Packaging applications for Debian

December 1, 2005 Leave a comment
This article was first written in December 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/313).

To do the best use of Debian’s superior package management system (APT), the application must be packaged, in the form of one or several .deb files. Packaging has many, many advantages, you just couldn’t believe.

As Debian is all about Free Software, it is clear that the preferred source for a package be the upstream source package. That way, submitting patches upstream is as simple as possible as they are naturally available to the World. Anyway, even then, there are still many ways to package an application.

To achieve our goals, we often have to (re-)package or backport applications. We also often submit improvements or bugfixes to existing packages, as a continuous goal to contribute to the Free Software Community, and Debian in particular.

We packaged several programs, of which Exact, IPblocker, XAMS, AND, Configurator for GNOME (COG), MnoGoSearch, p910nd, DCL, Dokeos, Plume.

We also contributed to the well-known backports of GNOME 2.2 for Woody, OpenOffice.org for Woody, OpenOffice.org 2.0 for Sarge, and yet several others.

This rubric will tell you some of the techniques we use to do it all. We hope you’ll join us soon…

%d bloggers like this: