Running X applications inside Solaris Container on a headless server

I had a few users that needed their own Solaris Container. They would use Reflection X to connect to their Containers. It worked all fine. Well, for the most part. Every few days or so Containers would stop accepting X connection. When I looked at /var/dt/Xerrors logfile inside one of the containers, I would see a lot of complaints:

XIO:  fatal IO error 146 (Connection refused) on X server :0.0
after 0 requests (0 known processed) with 0 events remaining.
fbconsole: ioctl SRIOCSREDIR: Invalid argument
/dev/fb: No such file or directory
/dev/fb: No such file or directory
Graphics Adapter device /dev/fb is of unknown type
Fatal server error:
InitOutput: Error loading module for /dev/fb

That got me thinking there will be some problem with absence of frame buffer. And sure, Sun mentions in article 1011661.1.

You have to comment out…

:0   Local local_uid@console root /usr/openwin/bin/Xsun :0 -nobanner

…in /etc/dt/config/Xservers. If that file is absent make a copy from /usr/dt/config/Xservers. This will prevent X-windows manager starting on the console. If you are using XDM, you will need to comment out…

:0 Local local /usr/openwin/lib/xdm/StartOW :0

…in /usr/openwin/lib/xdm/Xservers. That had fixed the issue.