The function addvglgenkey_lightdm in vglserver_config is directrly modifying the config file, a potentially fraught operation. Thankfully, ligthtdm supports the lovely ".d" system for adding additional settings in a config directory. VirtualGL should just drop a config there with an appropriate name.