Upgrade Solaris 11/OpenSolaris from Text to Graphical

If you installed your system using the text installer, the system will only be installed with a text interface. Here is how to upgrade to a graphical system.

Do the following as root (su) or with appropriate permissions (pfexec/sudo).

echo Existing boot environments:
beadm list
echo
echo -n Enter be name to create:
read be
beadm create $be
beadm mount $be /mnt
pkg -R /mnt install babel_install
pkg -R /mnt uninstall babel_install slim_install
bootadm update-archive -R /mnt
beadm umount $be
beadm activate $be

Now, reboot the system to enter the new boot environment. Then enable the GDM service:

svcadm enable gdm

Based on the OpenSolaris Text Installer FAQ.