Found and solved the issue.
/var/log/upstart/gdm.log.1.gz contained the log entries:
/proc/self/fd/9: 31: /etc/profile: [[: not found
/etc/profile ended with the invalid line:
[[ -f "/etc/autopackage/paths-bash" ]] && . "/etc/autopackage/paths-bash"
I.e. it was caused by installing autopackage.
Found and solved the issue.
/var/log/ upstart/ gdm.log. 1.gz contained the log entries:
/proc/self/fd/9: 31: /etc/profile: [[: not found
/etc/profile ended with the invalid line:
[[ -f "/etc/autopacka ge/paths- bash" ]] && . "/etc/autopacka ge/paths- bash"
I.e. it was caused by installing autopackage.