#!/bin/sh #Fix anomalous “.service” files # #Comment out “EnvironmentFile” line and changing the PIDFile location for: # /lib/systemd/system/xrdp.service # /lib/systemd/system/xrdp-sesman.service sudo sed -i 's/EnvironmentFile/#EnvironmentFile/g' /lib/systemd/system/xrdp-sesman.service sudo sed -i 's/PIDFile=\/var\/run\/xrdp.pid/PIDFile=\/run\/xrdp.pid/g' /lib/systemd/system/xrdp-sesman.service sudo sed -i 's/EnvironmentFile/#EnvironmentFile/g' /lib/systemd/system/xrdp.service sudo sed -i 's/PIDFile=\/var\/run\/xrdp-sesman.pid/PIDFile=\/run\/xrdp-sesman.pid/g' /lib/systemd/system/xrdp.service #Now, reload service definitions and enable / start services. sudo systemctl daemon-reload sudo systemctl enable xrdp-sesman sudo systemctl enable xrdp sudo systemctl start xrdp-sesman sudo systemctl start xrdp