Linux – Working with the MIT-SHM X11 Extension on Linux

linuxremote desktopsshx11

I am trying to get Blender to work over a setup where Blender itself runs on a remote machine and its UI is presented to a local machine via X11.

Detailed information about that is available here.

This seems to be a frequently required use case and Blender itself will work, through the blender-softwaregl executable that is provided along the zip archive download option from blender.org but only up to version 2.79.

On version 2.80, the same executable seems to be trying to setup a shared memory "object" which requires the MIT-SHM X11 extension.

Specifically, Blender's executable complains (in the remote machine terminal) with: error code: 159, request code: 143, minor code: 34, error text: 159 and finally concludes with:

Xlib: extension "MIT-SHM" missing on display "localhost:10.0".

After this, the X11 window on the local machine remains open, as if the software runs without problems but displays nothing of Blender's GUI.

At the same time, as the mouse gets dragged along the local X11 window, the remote terminal still produces XLib: extension "MIT-SHM"... errors.

I have tried to find out more information about working with the MIT-SHM (installing, configuring, enabling / disabling, etc) but apart from this, this and this passing reference I have not had much luck.

While I am still working on this, I would appreciate anyone's help with the MIT-SHM as I suspect that Blender is not the only piece of software that might make use of it. It seems like a cool X11 feature but I do not think that I have full control over it on my Ubuntu bionic 18.04 that runs on the server of my setup.

  1. How can I enable the MIT-SHM so that it shows up in the xdpyinfo listing?
  2. Is there a specific set of libraries I should have installed for it to fully work?
  3. Is there anything else that is implied by its use? (For example, do I need any extra ports enabled for this functionality to work?)

Best Answer

You cannot use MIT-SHM from a remote X11 client.

Just think about its acronym: SHM = shared memory. If the client and the server are running on different machines, that cannot share memory.

That extension is supposed to speed up X11 requests which are transferring a lot of data by using the SySV shared memory API instead of writing it through a socket (eg. XPutImage -> XShmPutImage). Its benefits on modern computers are discutable IMHO.

Related Question