This causes problems, since the .bash_profile will be used in other situations such as when one is logging into a second virtual console or when opening an xterm. Instead append the following lines:
Code:
if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then
startx
fi
Any new login shell started on the first virtual console will automatically initiate a graphical desktop. The surrounding if statement ensures that login shells launched from the desktop, or initiated in virtual consoles other than the first one, do not immediately start up a new GUI desktop.
A better alternative would be to modify /etc/inittab
PS: sorry, I can read spanish, but not write it.