I concur that it is likely a rarely used feature (tho "single digit" seems low). However I think breaking compatibility with a long history of Xdm is an unwise move. To get the best of both worlds (compatibility & feature set, and performance), I would suggest a config option for lightdm. The main app can push that config option into a env var before it calls /usr/sbin/lightdm-session. Then /usr/sbin/lightdm-session can test it. Something like this would work for me:
C code (pseudo code):
if (config.xrdb_cmd) {
setenv("LIGHTDM_XRDB_CMD", config.xrdb_cmd, 1);
}
...
exec("/usr/sbin/lightdm-session" ...);
Shell code (/usr/sbin/lightdm-session):
xresourcefile="$HOME/.Xresources"
if [ -f "$xresourcefile" ]; then
echo "Loading resource: $xresourcefile" ${LIGHTDM_XRDB_CMD:-xrdb -nocpp -merge} "$xresourcefile"
fi
The result is that for all the "simple" users, it's as speedy as ever. For advanced users, its a one time config change to lightdm, and the run-time cost of cpp. Using grep is ugly. Using "test" would be worse (assuming you are proposing sucking the resources contents into a shell var in order to look for something in it).
I concur that it is likely a rarely used feature (tho "single digit" seems low). However I think breaking compatibility with a long history of Xdm is an unwise move. To get the best of both worlds (compatibility & feature set, and performance), I would suggest a config option for lightdm. The main app can push that config option into a env var before it calls /usr/sbin/ lightdm- session. Then /usr/sbin/ lightdm- session can test it. Something like this would work for me:
C code (pseudo code): "LIGHTDM_ XRDB_CMD" , config.xrdb_cmd, 1); "/usr/sbin/ lightdm- session" ...);
if (config.xrdb_cmd) {
setenv(
}
...
exec(
Shell code (/usr/sbin/ lightdm- session) : le="$HOME/ .Xresources"
${LIGHTDM_ XRDB_CMD: -xrdb -nocpp -merge} "$xresourcefile"
xresourcefi
if [ -f "$xresourcefile" ]; then
echo "Loading resource: $xresourcefile"
fi
The result is that for all the "simple" users, it's as speedy as ever. For advanced users, its a one time config change to lightdm, and the run-time cost of cpp. Using grep is ugly. Using "test" would be worse (assuming you are proposing sucking the resources contents into a shell var in order to look for something in it).