From 913a3f3b73f125a3c5cf663da2896959696252c9 Mon Sep 17 00:00:00 2001 From: Spencer Flagg Date: Mon, 5 Feb 2024 10:56:08 +0000 Subject: [PATCH] Update rustdesk.sh --- rustdesk.sh | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/rustdesk.sh b/rustdesk.sh index 381c675..be5adf9 100644 --- a/rustdesk.sh +++ b/rustdesk.sh @@ -3,6 +3,7 @@ # Variables RUSTDESK_URL="https://github.com/rustdesk/rustdesk/releases/download/1.2.3/rustdesk-1.2.3-x86_64.deb" RUSTDESK_DEB="rustdesk-1.2.3-x86_64.deb" +ID_SERVER="172.232.132.62" # Check for RustDesk installation and remove it if present if dpkg -l | grep -qw rustdesk; then @@ -40,19 +41,9 @@ fi echo "Starting RustDesk..." # Start RustDesk and attempt to bring its window to the foreground -if ! pgrep -x "rustdesk" > /dev/null; then - rustdesk & - sleep 2 # Give RustDesk a moment to start - # Attempt to focus the RustDesk window. This method may need adjustment based on the desktop environment. - WINDOW_ID=$(xdotool search --onlyvisible --class rustdesk | head -1) - if [ ! -z "$WINDOW_ID" ]; then - xdotool windowactivate "$WINDOW_ID" - else - echo "RustDesk started but could not focus the window automatically." - fi -else - echo "RustDesk is already running." -fi +rustdesk + +echo "$ID_SERVER" | xclip -selection clipboard echo "Cleaning up..." rm -f "$RUSTDESK_DEB"