At first, install scim and your favorite input-method engines from pkg.opensolaris.org, you could list the available scim packages, by $ pkg list -a SUNWscim*. For nevada users, you need select the scim metacluster in installer.
Then, edit your $HOME/.profile to export the GTK_IM_MODULE to scim, and re-login
$ cat >> ~/.profile << EOF
> GTK_IM_MODULE=scim
> export GTK_IM_MODULE
> EOF
To switch back to iiim, you could simply comment out the above lines in your $HOME/.profile, and re-login.
It works great on my OpenSolaris 2008.11 here. Thanks!