VaudTax 2010 avec Ubuntu linux 64-bit

Les instructions pour Linux fournies sur le site officiel ne fonctionnent pas pour moi (Maverick / Ubuntu 10.10 desktop amd64).

Il semble qu'il ne soit toujours pas possible d'importer des fichiers sauvegardés dans une version 32 bit de VaudTax avec la version 64 bits, et vice-versa (crash de VaudTax avec une erreur cryptique [1]). Deux options, soit recommencer sa déclaration sans importer les données de l'année précédente, soit faire tourner VaudTax avec une JVM 32-bits ([2]). Pour l'instant j'ai toujours opté pour la deuxième variante. Jusqu'à l'année passée (VaudTax2009), on pouvait télécharger une version incluant une JVM (32-bits), cette option n'est plus disponible mais il est toujours possible d'arriver au même résultat :

1ère étape, avant de commencer le processus d'installation :
$ sudo update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/ia32-java-6-sun/jre/bin/java 63 manual mode
2 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode
3 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode

Press enter to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/lib/jvm/ia32-java-6-sun/jre/bin/java to provide /usr/bin/java (java) in manual mode.

(si l'option JVM 32-bits n'apparaît pas, il faut d'abord installer le paquet ia32-sun-java6-bin)

Une fois VaudTax installé, il faut télécharger et décompacter xulrunner :
$ cd $HOME/VaudTax2010
$ wget http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.9.2.16/runtimes/xulrunner-1.9.2.16.en-US.linux-i686.tar.bz2
$ tar -xpf xulrunner-*

Finalement, il faut encore modifier le fichier VaudTax2010 en ajoutant ces deux lignes juste après `VM_SEARCH_PATH="$PATH"' :
export MOZILLA_FIVE_HOME=$HOME/VaudTax2010/xulrunner
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MOZILLA_FIVE_HOME}


Note : une fois VaudTax2010 installé, on peut exécuter à nouveau "sudo update-alternatives --config java" pour rétablir la configuration initiale - les paramètres sont en effet enregistrés dans le fichier VaudTax2010.lax


[1]
The program 'SWT' received an X Window System error.
This probably reflects a bug in the program.
The error was 'RenderBadPicture (invalid Picture parameter)'.
(Details: serial 5455 error_code 161 request_code 149 minor_code 7)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)

[2] la troisième variante serait d'étudier le format de fichier produit par chacune des versions pour créer un outil de conversion
  • Twitter
  • Bookmark VaudTax 2010 avec Ubuntu linux 64-bit at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg VaudTax 2010 avec Ubuntu linux 64-bit
  • Mixx VaudTax 2010 avec Ubuntu linux 64-bit
  • Bloglines VaudTax 2010 avec Ubuntu linux 64-bit
  • Technorati VaudTax 2010 avec Ubuntu linux 64-bit
  • Fark this: VaudTax 2010 avec Ubuntu linux 64-bit
  • Bookmark VaudTax 2010 avec Ubuntu linux 64-bit at YahooMyWeb
  • Bookmark VaudTax 2010 avec Ubuntu linux 64-bit at Furl.net
  • Bookmark VaudTax 2010 avec Ubuntu linux 64-bit at reddit.com
  • Bookmark VaudTax 2010 avec Ubuntu linux 64-bit at blinklist.com
  • Bookmark VaudTax 2010 avec Ubuntu linux 64-bit at Spurl.net
  • Bookmark VaudTax 2010 avec Ubuntu linux 64-bit at NewsVine
  • Bookmark VaudTax 2010 avec Ubuntu linux 64-bit at Simpy.com
  • Bookmark VaudTax 2010 avec Ubuntu linux 64-bit at blogmarks
  • Bookmark VaudTax 2010 avec Ubuntu linux 64-bit with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca
  • This is a dummy. Click to load the real button.

bash: how to send output to the console and through a pipe at the same time with tee

Let's say you want some output to be echoed to the console but also to be passed to a pipe. Specifically, in my case I wanted a message to be displayed to the user and also to be sent to syslog. You could of course just print it twice, but in some cases it's not possible, or it makes it more complicated than it should be.

There is a simple solution with tee:
echo "a test" | tee >(logger)

  • Twitter
  • Bookmark bash: how to send output to the console and through a pipe at the same time with tee at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg bash: how to send output to the console and through a pipe at the same time with tee
  • Mixx bash: how to send output to the console and through a pipe at the same time with tee
  • Bloglines bash: how to send output to the console and through a pipe at the same time with tee
  • Technorati bash: how to send output to the console and through a pipe at the same time with tee
  • Fark this: bash: how to send output to the console and through a pipe at the same time with tee
  • Bookmark bash: how to send output to the console and through a pipe at the same time with tee at YahooMyWeb
  • Bookmark bash: how to send output to the console and through a pipe at the same time with tee at Furl.net
  • Bookmark bash: how to send output to the console and through a pipe at the same time with tee at reddit.com
  • Bookmark bash: how to send output to the console and through a pipe at the same time with tee at blinklist.com
  • Bookmark bash: how to send output to the console and through a pipe at the same time with tee at Spurl.net
  • Bookmark bash: how to send output to the console and through a pipe at the same time with tee at NewsVine
  • Bookmark bash: how to send output to the console and through a pipe at the same time with tee at Simpy.com
  • Bookmark bash: how to send output to the console and through a pipe at the same time with tee at blogmarks
  • Bookmark bash: how to send output to the console and through a pipe at the same time with tee with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca
  • This is a dummy. Click to load the real button.

gulp - tcpdump alternative for lossless capture on Linux

tcpdump and wireshark are the tools that usually come to mind when you have to capture network traffic. But in some situations where you have to record a large amount of data and you want to avoid losing packets, tcpdump has some limitations. When I was hit myself by the tcpdump packet loss problem, I quickly found out that I was not alone and that a number of people had already researched the topic and/or provided alternatives.*

In particular, I found two different tools to perform the task: Corey Satten's gulp (http://corey.elsewhere.org/gulp/) and lindump from HP Labs (http://tesla.hpl.hp.com/opensource/)

I also found two interesting papers about capturing high volumes of traffic: http://www.usenix.org/events/fast09/tech/full_papers/anderson/anderson_html/ and http://docs.di.fc.ul.pt/jspui/bitstream/10455/3299/1/thesis-nhenriqu.pdf (the second quotes the first one among others, and also contains useful info to optimally spread the load among different cores)

After some tests I quickly became a happy gulp user, and thanks to the software being open source I was able to add features to it that I missed from the latest tcpdump versions:

-n - allows to change the default filename template
-t - allows to add a timestamp to the filename
-G - rotate pcap file every n seconds
-F - allows to skip the check for an ethernet interface
-Z - allows to specify a command to post-process each capture file

I've sent a patch to Corey Satten, who intends to setup a repository to hold the various contributions he gets for gulp. In the meanwhile, you can find my changes in the attached file (02-gulp-ntGFZ.patch.gz). For your convenience and for completeness, I also provide here the patch from Guy Harris that fixes issues on 64 bit systems (see http://seclists.org/wireshark/2009/Oct/105, apply that one first).

Updates:
2012-08-22: new version of my patch to fix the issue reported by SgtMalicious
2017-02-03: long-standing bug fixed

Downloads:
01-gulp-amd64.patch.gz: fix issues with 64-bit systems
02-gulp-ntGFZ.patch.gz: additional functionality as described above
gulp-1.58-crox.tgz: source with both patches applied

* other people have reported a performance drop with libpcap version 1.0 compared to previous builds, see http://thread.gmane.org/gmane.network.tcpdump.devel/4629 or http://seclists.org/tcpdump/2010/q3/index.html#11
  • Twitter
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg gulp - tcpdump alternative for lossless capture on Linux
  • Mixx gulp - tcpdump alternative for lossless capture on Linux
  • Bloglines gulp - tcpdump alternative for lossless capture on Linux
  • Technorati gulp - tcpdump alternative for lossless capture on Linux
  • Fark this: gulp - tcpdump alternative for lossless capture on Linux
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux at YahooMyWeb
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux at Furl.net
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux at reddit.com
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux at blinklist.com
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux at Spurl.net
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux at NewsVine
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux at Simpy.com
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux at blogmarks
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca
  • This is a dummy. Click to load the real button.

Linux: enable encrypted swap (Ubuntu / Debian)

1. create and enable a "regular" swap partition (fdisk / mkswap / swapon)

2. install ecryptfs-utils and run ecryptfs-setup-swap
sudo apt-get install ecryptfs-utils
sudo ecryptfs-setup-swap

  • Twitter
  • Bookmark Linux: enable encrypted swap (Ubuntu / Debian) at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Linux: enable encrypted swap (Ubuntu / Debian)
  • Mixx Linux: enable encrypted swap (Ubuntu / Debian)
  • Bloglines Linux: enable encrypted swap (Ubuntu / Debian)
  • Technorati Linux: enable encrypted swap (Ubuntu / Debian)
  • Fark this: Linux: enable encrypted swap (Ubuntu / Debian)
  • Bookmark Linux: enable encrypted swap (Ubuntu / Debian) at YahooMyWeb
  • Bookmark Linux: enable encrypted swap (Ubuntu / Debian) at Furl.net
  • Bookmark Linux: enable encrypted swap (Ubuntu / Debian) at reddit.com
  • Bookmark Linux: enable encrypted swap (Ubuntu / Debian) at blinklist.com
  • Bookmark Linux: enable encrypted swap (Ubuntu / Debian) at Spurl.net
  • Bookmark Linux: enable encrypted swap (Ubuntu / Debian) at NewsVine
  • Bookmark Linux: enable encrypted swap (Ubuntu / Debian) at Simpy.com
  • Bookmark Linux: enable encrypted swap (Ubuntu / Debian) at blogmarks
  • Bookmark Linux: enable encrypted swap (Ubuntu / Debian) with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca
  • This is a dummy. Click to load the real button.

Thunderbird - change default message forward mode from "inline" to "attached"

For years the default behaviour in Thunderbird had been to forward e-mails as attachments, but at some point it was changed to "inline". You can still manually choose how you'd like to transfer a message by going to "Message" -> "Forward as", but I couldn't find a way to set the default in the preferences.

There is, however, a way to change it without messing with manual edit of config files. Go to "Preferences" -> "Advanced" -> "Config Editor...", and look for "mail.forward_message_mode". 0 is for "attached", 2 is for "inline".
  • Twitter
  • Bookmark Thunderbird - change default message forward mode from "inline" to "attached" at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Thunderbird - change default message forward mode from "inline" to "attached"
  • Mixx Thunderbird - change default message forward mode from "inline" to "attached"
  • Bloglines Thunderbird - change default message forward mode from "inline" to "attached"
  • Technorati Thunderbird - change default message forward mode from "inline" to "attached"
  • Fark this: Thunderbird - change default message forward mode from "inline" to "attached"
  • Bookmark Thunderbird - change default message forward mode from "inline" to "attached" at YahooMyWeb
  • Bookmark Thunderbird - change default message forward mode from "inline" to "attached" at Furl.net
  • Bookmark Thunderbird - change default message forward mode from "inline" to "attached" at reddit.com
  • Bookmark Thunderbird - change default message forward mode from "inline" to "attached" at blinklist.com
  • Bookmark Thunderbird - change default message forward mode from "inline" to "attached" at Spurl.net
  • Bookmark Thunderbird - change default message forward mode from "inline" to "attached" at NewsVine
  • Bookmark Thunderbird - change default message forward mode from "inline" to "attached" at Simpy.com
  • Bookmark Thunderbird - change default message forward mode from "inline" to "attached" at blogmarks
  • Bookmark Thunderbird - change default message forward mode from "inline" to "attached" with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca
  • This is a dummy. Click to load the real button.