I have terminal linux server (xrdp) and I need a script that will terminate the session and send the user to the login screen after completing the rdp connection
OS: CentOS 8
I wrote this, but i sense i need something more
#!/bin/bash
if
xfreerdp /v:"my-IP" /u:"my-user" /p:"pass" -f
else
gnome-session-quit
fi
The idea is this: The user starts his computer, logs into his account, the script runs automatically and connects it to the rdp session on the server. After the user finishes working, he completes the connection and the script sends it to the login screen. In fact, the user has little interaction with the installed OS on the computer
Алексей Подставкин is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Try with:
#!/bin/bash
xfreerdp /v:"my-IP" /u:"my-user" /p:"pass" -f
wait
gnome-session-quit