set gmaincontext for shmdata reader