4

I'm using Raspbian Stretch and I installed XRDP from APT:

sudo apt-get install xrdp

After that, the XRDP service is started automatically on boot. Now, I would like to disable the autostart, so I tried to issue the following command that usually does the job:

sudo systemctl disable xrdp

The output is:

Synchronizing state of xrdp.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable xrdp

but when I reboot the Pi, the service is always up and running:

pi@raspberrypi:~ $ sudo service xrdp status
● xrdp.service - xrdp daemon
   Loaded: loaded (/lib/systemd/system/xrdp.service; disabled; vendor preset: enabled)
   Active: active (running) since Mon 2018-07-30 23:33:29 CEST; 18h ago
     Docs: man:xrdp(8)
           man:xrdp.ini(5)
 Main PID: 474 (xrdp)
      CPU: 50ms
   CGroup: /system.slice/xrdp.service
           └─474 /usr/sbin/xrdp

Jul 30 23:33:28 raspberrypi systemd[1]: Starting xrdp daemon...
Jul 30 23:33:28 raspberrypi systemd[1]: xrdp.service: PID file /run/xrdp/xrdp.pid not readable (yet?) after start: No such file or directory
Jul 30 23:33:29 raspberrypi systemd[1]: Started xrdp daemon.
Jul 30 23:33:30 raspberrypi xrdp[474]: (474)(1996448352)[INFO ] starting xrdp with pid 474
Jul 30 23:33:30 raspberrypi xrdp[474]: (474)(1996448352)[INFO ] listening to port 3389 on 0.0.0.0

I'm sure I'm missing something.

  • 1
    Show us the output of systemctl status xrdp – eftshift0 Jul 31 '18 at 16:18
4

To disable a service means do not start it automatically on startup. It does not mean to disable its functionality. You always can start and stop it and it can be started by other services. That seems to be the case here. You can show dependencies with:

rpi ~$ systemctl list-dependencies xrdp

To disable a service completely you have to mask it:

rpi ~$ sudo systemctl mask xrdp

It is likely that the service that want to start xrdp will then throw an error.

  • 1
    True, the services xrdp and xrdp-sesman are interdependent. Solved with sudo systemctl disable xrdp xrdp-sesman. Thanks. – Robert Hume Jul 31 '18 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.