If you want to start KDE, you'll have to put this line in it:
If you want to start XFCE, you'll have to put this line in it:
If you want to start Gnome, the line is:
If your .xinitrc has one of these lines in it, it will execute the Desktop Environment when you run startx. Otherwise you'll have to run startx and feed it the Desktop Environment as an argument or run the desktop init script manually.
Another approach is to alias the desktop script to another command in your shell profile; such as placing
in your .bash_profile will let you start XFCE by typing in "gui" from the CLI.
Alternatively, the identical file .xsession will start the window manager from a display manager.