The question at hand is, why would you want to run X as root. I think a search in these forums and google will bring up heaps of issues with it.
Run X as a normal user, then when you need to,
su - to root and install you packages.
man su to read up on the command. Another usefull switch is
su -c "command"
Let me know how you go
-Kristijan