OK I've done some digging and here's what I've found. The QWSServer object tries to create and listen on a local socket which by default is /tmp/qtembedded-0. This is done in qwindowsystem_qws.cpp:
void QWSServerPrivate::initServer(int flags)
qwsServer = q;
qwsServerPrivate = this;
disablePainting = false;
ssocket = new QWSServerSocket(qws_qtePipeFilename(), q);
where the function qws_qtePipeFilename() is defined in qapplication_qws.cpp and in turn calls qws_dataDir() which is in the same file. This in turn calls:
static QString result;
result = QT_VFB_DATADIR(qws_display_id);
where QT_VFB_DATADIR is a macro in qvfbhdr.h declared as:
#define QT_VFB_DATADIR(DISPLAY) QString("%1/qtembedded-%2-%3")
and finally we see trace down that we need QT_QWS_TEMP_DIR which is declared as:
#define QT_QWS_TEMP_DIR "/tmp"
So now we see that to locate the socket to a different location we somehow need to define QT_QWS_TEMP_DIR to a path of your choice that is writeable by the user your application will be running as.
I think you should be able to do this by defining QT_QWS_TEMP_DIR in the qplatformdefs.h of your custom mkspec. Then rebuild Qt Embedded for your target device and deploy and test.
Nokia Certified Qt Specialist
Interested in hearing about Qt related work