I've commented out the three lines as suggested in #152577 but then all I get is:
/etc/gdm/Xsession: Beginning session startup
(session still lasts <10seconds...)
Adding "set -x" to the Default file:
...
+ echo /usr/bin/xsetroot
+ XSETROOT=/usr/bin/xsetroot
+ [ x/usr/bin/xsetroot != x ]
+ CHECKBACKCOLOR=OK
+ [ xTHEMED = xTHEMED ]
+ echo
+ sed s/^\([^ ]*\) .*$/\1/
+ CHECKBACKCOLOR=
+ [ x = xOK ]
+ BACKCOLOR=
+ [ x != xOK ]
+ [ x = xOK 1 ]
+ [ x = xOK 2 ]
+ [ x = x ]
+ BACKCOLOR=#dab082
+ /usr/bin/xsetroot -cursor_name left_ptr -solid #dab082
+ exit 0
/etc/gdm/Xsession: Beginning session setup...
putting the lines back I can confirm that this is what causes the setuid errors.
However it clearly isn't what causes the login problems! So I'll do some more digging...
I've commented out the three lines as suggested in #152577 but then all I get is:
/etc/gdm/Xsession: Beginning session startup
(session still lasts <10seconds...)
Adding "set -x" to the Default file: /usr/bin/ xsetroot
...
+ echo /usr/bin/xsetroot
+ XSETROOT=
+ [ x/usr/bin/xsetroot != x ]
+ CHECKBACKCOLOR=OK
+ [ xTHEMED = xTHEMED ]
+ echo
+ sed s/^\([^ ]*\) .*$/\1/
+ CHECKBACKCOLOR=
+ [ x = xOK ]
+ BACKCOLOR=
+ [ x != xOK ]
+ [ x = xOK 1 ]
+ [ x = xOK 2 ]
+ [ x = x ]
+ BACKCOLOR=#dab082
+ /usr/bin/xsetroot -cursor_name left_ptr -solid #dab082
+ exit 0
/etc/gdm/Xsession: Beginning session setup...
putting the lines back I can confirm that this is what causes the setuid errors.
However it clearly isn't what causes the login problems! So I'll do some more digging...