GNOME Bugzilla – Bug 684138
gdm doesn't respect $PATH, hardcodes X location
Last modified: 2015-11-11 12:17:55 UTC
Description of the problem: - LightDM as display manager: X from /usr/local/bin/X is used, just as it should, according to the $PATH env variable defined in /etc/environment. Everything works fine with LightDM. - GDM as display manager: X is always used from /usr/bin/X, and $PATH is ignored. It seems that the location of X is hardcoded somewhere. If I move /usr/bin/X to /usr/bin/X.bak and restart GDM, it fails to start and doesn't find X in /usr/local/bin. I am using ubuntu quantal quetzal, my packages are up-to-date and I compiled X from upstream git master on fd.org. (GDM 3.5.91) output of $ echo $PATH: /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
I'm not sure making GDM use a different X based on path is a good idea. Distros may be depending on the X server they bundled with GDM to provide specific functionality (for instance, for a while a number of distros provided a "-nr" command line option that later went upstream as "-background none" for doing seamless transitions from the boot splash). If we made it a ./configure time option, would that be sufficient (so you'd have to build GDM too)
I understand your concerns. But adding a build-time switch would be enough to solve the problem for me, I think.