How to prevent xrdp desktop lock?

538 Views Asked by At

I'm using a xrdp remote desktop running Debian and I am running pyautogui on there. When I leave rdp the desktop screen is locked after a few minutes, so pyautogui can't see the desktop anymore. How do I prevent the xrdp desktop from locking?

1

There are 1 best solutions below

0
Rainb On

This, depending on your DE, the answer differs.

I had this issue with cinnamon, using linux mint. You can tell xrdp to execute custom scripts to unlock the lockscreen. For example in linux mint the command cinnamon-screensaver-command --exit will exit the screensvaver, avoiding the need to type the password again. Hope this helps someone.


Edit:

Considering where xrdp runs, maybe it is best if it is executed as this.

DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$UID/bus cinnamon-screensaver-command --exit

this would execute for all users. DISPLAY and UID are already set when executing reconnectwm.sh