added exceptions for when GDMSESSION is missing