Setup the PCDM main session process to run fork and setsid to start the process.
Also add the beginning of the changes to the xprocess class to change over to running C process commands rather than using a QProcess for starting the desktop session.
You just need to change the USECLIBS flag at the top of main.cpp to switch which one to use.