We currently have a lot of stuff repeated across browser/app, mobile/app, suite/app, mail/app, xulrunner/app, and that doesn't make much sense to do so, especially when we need to fix all these to benefit some changes like bug 552864. We need to have a single, shared application initialization function.
Note to self: don't forget this bit from Ted in bug 552864 comment 79: I love this so much. Does this need to be fixed separately for other apps? I know I already fixed this for Fennec on Linux a while back, but presumably we ought to fix Thunderbird and maybe XULRunner. While you're here you should change: http://mxr.mozilla.org/mozilla-central/source/build/binary-location.mk#46 and probably: http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/installer/linux/rpm/mozilla.desktop#48