1

Xrdp server on kali linux. Also there is installed freerdp2-shadow-x11 to start the shadow session. The shadow server is started with the freerdp-shadow-cli command in the terminal of a running xrdp session. And only so.Interactively on the command line with output.
I need it to run in the background from autoload along with the session of the user connected to the server. Partially, I solved it with a script:

#!/bin/bash freerdp-shadow-cli -auth -port:3389 -may-interact > /dev/null 2>&1 &

interactively, this script is executed and everything works, but if you add it to autoload (.zshrc file), then the script will only run when you open the terminal with your hands.

And so, experts, the question is: How can I make the script autoload?

1 Answers1

3

Finally figured it out myself From the very beginning:

apt install freerdp2-shadow-x11
nano  /home/user/RDS.sh

RDS.sh:

#!/bin/bash
#gnome-terminal -e
freerdp-shadow-cli -auth -port:3389 -may-interact > /dev/null 
2>&1 &

cli:

chmod 755 RDS.sh
nano /home/user/.config/autostart/shadow.desktop

shadow.desktop:

[Desktop Entry]
Name=shadow
GenericName=A descriptive name
Comment=Some description about your script
Exec=/home/user/RDS.sh
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true

cli:

chmod 755 shadow.desktop
reboot

-may-interact -only show desktop