Login as root using the command
Type yo root password and when u are logged in type startx.
Code:
Welcome to distro name time : something
root @ localhost root $
root @ localhost root $ startx
I think this should mostly work.
If startx doesnt work, try switchdesk kde/gnome instead of kde.
KDM or Ctrl+Alt+F7
I have not worked in Ubuntu, but mostly it should work with one of these.
You can ask cool_dude_prav. He uses Ubuntu.