Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Did you perchance use: "sudo useradd" instead of "sudo adduser"? The first is a low level command that simply creates the user (and drives startx nuts). Try this: from a login prompt with the pi account, with no xwindows running, type "sudo adduser test" and then answer the questions. When done, press ctrl+alt+<F2> to switch to that terminal window and login with the new test account. Now try "startx" in that terminal session.