Fix when GDM isn't installed

When GDM isn't installed, or isn't installed in the correct prefix,
avoid accessing std_out[-1] of a 0-length std_out.