see documentation at http://docs.oracle.com/cd/E23824_01/html/E24456/glnye.html
## make sure you are pointing to a valid publisher and it is online
pkg publisher
## search for solaris-desktop
pkg search solaris-desktop
## install
pkg install --accept solaris-desktop
## check that new BE was created
beadm list
## reboot to activate the new BE
## to enable graphical login make sure gdm service is online
svcs gdm
## if not enable, enable it
svcadm enable gdm
|