DavidDecotigny

BlahBlah

Navigation

  • Rechercher un mot :

DavidDecotigny - 02/05/2010 - 12:17 - info

CERN SSH GSSApi in Lucid


Having upgraded my box to Lucid, I noticed that my local krb5 credentials were not forwarded to the CERN ssh servers (lxplus). I could be authenticated Ok on the CERN servers but I did not acquire any AFS token on it. The thing is that it used to work in karmic...
After having identified that the problem was related to the krb5 1.8 package (libgssapi-krb5-2, libkrb5-3, libk5crypto3 involved) and having started to file a bug report, launchpad pointed me to this post... This solved my problem ! Simply specifying the following in /etc/krb5.conf:
[libdefaults]
        allow_weak_crypto = true

... fixed the issue.

DavidDecotigny - 24/05/2009 - 12:51 - info

Using debian's live-helper to create Ubuntu live CD from scratch


Following my page describing how to remaster an Ubuntu live CD, I wrote this other document describing how to use debian's live-helper in an ubuntu environment to build Ubuntu live CD or chroot installations from scratch (all the packages need to be downloaded, not just an ISO image).

DavidDecotigny - 23/05/2009 - 18:06 - info

Customize the ubuntu live CD


I wrote a simple script to ease the customization of the ubuntu live CD: see this page.

DavidDecotigny - 23/05/2009 - 16:45 - info

mplayer slow to start


I upgraded my ubuntu recently (Intrepid -> Jaunty). And mplayer (medibuntu rulez) proved very slow to start: like waiting for something after displaying "GNOME screensaver disabled". A little strace investigation revealed that mplayer was spawning "dcop kdesktop KScreensaverIface", which got stuck connecting to some file socket.

A quick fix is to start dcopserver by hand. Some googling suggests to install the kdelibs package, which I did but I don't know yet if it is enough to automagically fix the problem (I still have to restart from fresh to see).

DavidDecotigny - 23/05/2009 - 16:39 - info

Stupid ubuntu screensaver config


The default gnome configuration tool in ubuntu (Intrepid, Jaunty, ...) for the screensaver is largely incomplete. Install the xscreensaver package and configure it the "old" way (with xscreensaver-demo). However, this will NOT be enough, because gnome overrides part of its settings when it starts its own screen saver. So you will have to look at ~/.xscreensaverrc and update the config for your favorite screen saver in /usr/share/applications/screensavers/<your_screensaver_here>.desktop. For example, for me, the Exec line for glslideshow in the desktop file looks like:
Exec=glslideshow -root -duration 25 -pan 30 -fade 4

And the picture configuration is taken from my ~/.xscreensaverrc file.

DavidDecotigny - 11/05/2009 - 18:26 - info

mDNS/avahi across a linux firewall


If you want your ubuntu "Places" / "Network" window to be slightly populated, add the following line to your firewall script:
/sbin/iptables -A FILT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT

DavidDecotigny - 11/05/2009 - 18:18 - info

iptables rules for samba


My ubuntu laptop could not "reach" the windows network (via smb). It was because of my firewall. The following lines need to be added to the firewall script:
/sbin/modprobe nf_conntrack_netbios_ns
/sbin/iptables -A FILT -p udp --dport 137:138 -j ACCEPT
/sbin/iptables -A FILT -p tcp --dport 139 --syn -j ACCEPT
/sbin/iptables -A FILT -p tcp --dport 445 --syn -j ACCEPT

(where FILT is my filtering chain plugged onto INPUT).

If you use ufw, you will need to add nf_conntrack_netbios_ns to the IPT_MODULES variable in /etc/default/ufw. The other rules should be fairly easy to translate into ufw wording.

DavidDecotigny - 12/04/2009 - 13:36 - info

Calao USB-A9G20-C01


I started to write some notes about my experiences with the Calao Systems USB-A9G20-C01 embedded system board (ARM AT91 / Linux 2.6).

DavidDecotigny - 04/03/2009 - 22:58 - info

QuickCam?, ssh GSSAPI, quickcam, skype, etc...


Waouh, encore plus d'un 1 an sans rien ecrire ici !
Bon, quelques nouvelles choses :
- ici: comment pouvoir se loguer via ssh en n'entrant qu'une seule fois sa passphrase quand on veut acceder a du AFS sur la machine distante
- ici aussi: comment avoir un montage AFS en local sur sa machine
- et la: comment faire marcher une quickcam dans skype sur une intrepid x86_64 (ubuntu)

DavidDecotigny - 22/09/2007 - 21:22 - info

Javascript partial evaluation


Sometimes, it's useful to create event handlers in javascript that call functions with some arguments pre-defined.
Example: I want to specify a "onclick" event handler on a DOM element 'foo' that will run myFunction(elt), with 'elt' being a given DOM element known when the event handler is declared. I cannot write:
foo.onclick = myFunction(elt);
Because myFunction will be executed when the event handler is assigned, not when the event is effectively fired (and, besides, the evaluation of myFunction will return probably 'undefined', not a function).
The attached javascript code allows you to write:
foo.onclick = bindFunction(myFunction, elt);
The result of bindFunction is a function which will invoke myFunction(elt), it will be invoked when tyhe event is fired. You can also invoke object methods instead of calling functions:
foo.onclick = bindMethod(myObj, myObj.the_method, elt);
This code will invoke myObj.the_method(elt) when the event is fired.

This package is not limited to event handling, though I find it practical because it allows to specify event handlers when the javascript creates the DOM, with direct DOM element references instead of getElementById lookups. It also allows to specify a nice generic xmlhttprequest that just accept a callback() as argument, this callback being in fact a binding.

And the partial evaluation accepts any number of bound arguments, not just 1. And it's a real partial evaluation: if some arguments are not specified when the partial evaluation is created, the missing arguments will have to be specified when the resulting function is called:
function myFunction(a, b) { ... }
f = bindFunction(myFunction, 1); Partial evaluation
g = bindFunction(myFunction, 3, 4);
Complete parameter binding
Then:
f(2); Is equivalent to myFunction(1, 2)
g();
Is equivalent to myFunction(3, 4)