Error when loading /etc/profile


I've just installed mate 18.04.2 see summary of system below. When I logon I get the following error:
Error found when loading /etc/profile

line 6

I get a further transient message about mis-configured display

System seems to be working OK but can the error be fixed?

Processor Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz
Memory 3926MB (1899MB used)
Machine Type Notebook
Operating System Ubuntu 18.04.2 LTS
User Name steve (Steve Binns)
Date/Time Mon 11 Mar 2019 12:27:21 GMT
Resolution 1366x768 pixels
OpenGL Renderer Mesa DRI Intel(R) Ivybridge Mobile
X11 Vendor The X.Org Foundation