This is a forward of https://launchpad.net/bugs/678421 in Ubuntu. There is also a related upstream bug: https://bugzilla.gnome.org/738970 In case of a syntax error in ~/.profile or some similar config file, the login is interrupted and you are taken back to the login screen. If there is some other kind of error, it's silently ignored. We are about to make both lightdm and gdm show a warning dialog for all kinds of errors in those files, and at the same time allow the login to the desktop to proceed. The solution includes a change from /bin/sh to /bin/bash. Bash has a built-in syntax check when sourcing files. For gdm this is achieved by changing $XSESSION_SHELL. The attached patch is based on gdm 3.14.0. The complete Ubuntu diff is available at https://launchpad.net/ubuntu/+source/gdm/3.14.0-0ubuntu2