xrdp-common: refactoring