I also had this issue when I used dash as /bin/sh, and from gdm. In .xsession-errors there were some error messages about spurious "(". My guess is dash is not happy with bashisms in scripts, certainly $(. In any case I think that using bashisms in system scripts is a very bad idea.
-- Pat -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org