Created
October 23, 2025 17:46
-
-
Save ststeiger/ed18d24f685b3f7147d6294573b10c8b to your computer and use it in GitHub Desktop.
XRDP - restart the clipboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # restart_xrdp.sh - Interactive restart for xrdp related services | |
| # | |
| echo "Select what to restart:" | |
| echo "1) chansrv" | |
| echo "2) xrdp" | |
| echo "3) xrdp-sesman" | |
| echo "4) xrdp + xrdp-sesman" | |
| echo "5) all (chansrv + xrdp + xrdp-sesman)" | |
| read -p "Enter choice [1-5]: " choice | |
| case "$choice" in | |
| 1) | |
| echo "Restarting chansrv..." | |
| sudo pkill xrdp-chansrv | |
| sudo /usr/sbin/xrdp-chansrv & | |
| ;; | |
| 2) | |
| echo "Restarting xrdp service..." | |
| sudo systemctl restart xrdp | |
| ;; | |
| 3) | |
| echo "Restarting xrdp-sesman service..." | |
| sudo systemctl restart xrdp-sesman | |
| ;; | |
| 4) | |
| echo "Restarting xrdp and xrdp-sesman services..." | |
| sudo systemctl restart xrdp xrdp-sesman | |
| ;; | |
| 5) | |
| echo "Restarting chansrv, xrdp and xrdp-sesman..." | |
| sudo pkill xrdp-chansrv | |
| sudo /usr/sbin/xrdp-chansrv & | |
| sudo systemctl restart xrdp xrdp-sesman | |
| ;; | |
| *) | |
| echo "Invalid choice. Exiting." | |
| exit 1 | |
| ;; | |
| esac | |
| echo "Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment