Comments (23)
Ill check this on the mac later and feedback
from rustdesk-server-pro.
I'll add in the service. I'll also try and get it to prompt for permissions on the Mac, I had thought on first run this can be done. I'll check if we can script this though.
I'll grab another Mac and test on that today
from rustdesk-server-pro.
/Applications/RustDesk.app/Contents/MacOS/RustDesk --silent-install -wait
For Windows only.
from rustdesk-server-pro.
Where did you get this script?
from rustdesk-server-pro.
Where did you get this script?
Wrote it myself based on the Windows script.
Maybe release the macOS version as a .pkg file to allow the installation then?
from rustdesk-server-pro.
.pkg file
Yes, but our schedule is already very full and overloaded. I have no idea when I will be able to handle this.
from rustdesk-server-pro.
Is there another location for the RustDesk2.toml file or does it only exist in the users Library/Preferences... location?
from rustdesk-server-pro.
So checked it and made quite afew changes but tested working, only small caveat is that on the mac client it appears to need password set to "Both" before the permanent password will apply.
I have used the nightly builds because that now has --config
added which works with the encrypted string generated by RustDesk Server Pro, saves messing around with toml files!
# Updated
#!/bin/bash
# Assign the value "XYZ" to the password variable
rustdesk_password="XYZ"
# Get your config string from your Web portal and Fill Below.
rustdesk_config="longconfigstring"
####################################!!Please Do Not Edit Below This Line!!##########################################
# Check if the script is being run as root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root."
exit 1
fi
# Specify the path to the rustdesk.dmg file
dmg_file="/tmp/rustdesk-1.2.1-x86_64.dmg"
# Specify the mount point for the DMG (temporary directory)
mount_point="/Volumes/RustDesk"
# Download the rustdesk.dmg file
curl -L https://github.com/rustdesk/rustdesk/releases/download/nightly/rustdesk-1.2.1-x86_64.dmg --output "$dmg_file"
# Mount the DMG file to the specified mount point
hdiutil attach "$dmg_file" -mountpoint "$mount_point"
# Check if the mounting was successful
if [ $? -eq 0 ]; then
# Move the contents of the mounted DMG to the /Applications folder
cp -R "$mount_point/RustDesk.app" "/Applications/"
# Unmount the DMG file
hdiutil detach "$mount_point"
echo "RustDesk has been moved to /Applications."
else
echo "Failed to mount the RustDesk DMG. Installation aborted."
exit 1
fi
# Run the rustdesk command with --get-id and store the output in the rustdesk_id variable
cd /Applications/RustDesk.app/Contents/MacOS/
rustdesk_id=$(./RustDesk --get-id -wait)
# Apply new password to RustDesk
/Applications/RustDesk.app/Contents/MacOS/RustDesk --password $rustdesk_password
/Applications/RustDesk.app/Contents/MacOS/RustDesk --config $rustdesk_config
# Check if the rustdesk_id is not empty
if [ -n "$rustdesk_id" ]; then
echo "RustDesk ID: $rustdesk_id"
else
echo "Failed to get RustDesk ID."
fi
# Echo the value of the password variable
echo "Password: $rustdesk_password"
echo "Please complete install by launching RustDesk now."
from rustdesk-server-pro.
Many thanks @dinger1986
I'll test it later today with some deployments.
from rustdesk-server-pro.
Please test it on one before putting it out to many,
I have tested it on my Mac and it works fine. I will test it on others today
I do wonder if it should launch at the end actually so you can connect
from rustdesk-server-pro.
On a Mac VM:
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Connection refused (os error 61)', src/core_main.rs:248:76
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
deploy_and_configure_rustdesk.sh: line 50: 1123 Abort trap: 6 /Applications/RustDesk.app/Contents/MacOS/RustDesk --password $rustdesk_password
from rustdesk-server-pro.
/Applications/RustDesk.app/Contents/MacOS/RustDesk --service
first
from rustdesk-server-pro.
Does not deal with Screen Recording, Accessibility and Input Monitoring permission
But this can not deal with Screen Recording, Accessibility and Input Monitoring permission.
from rustdesk-server-pro.
But this can not deal with Screen Recording, Accessibility and Input Monitoring permission.
Not sure if some osscript can do this. I can not find API which can do it with out user interaction.
from rustdesk-server-pro.
The permissions cannot be set programatically so it'll have to be done manually.
from rustdesk-server-pro.
Yeah wasnt thinking itll be set but there might be a way to make it prompt, out of interest where are you getting your mac vms from?
from rustdesk-server-pro.
/Applications/RustDesk.app/Contents/MacOS/RustDesk --service
first
Script doesn't complete with this.
VM's come from UTM (Apple M1 or M2 processor required)
from rustdesk-server-pro.
ah ok, no worries, M1/M2 is looking like its on my shopping list! Ill get some tests done as soon as I can and report back
from rustdesk-server-pro.
Dug out a MacBook Pro so just getting that upgraded and will get UTM on and testing this all out as soon as I can.
from rustdesk-server-pro.
tested, tested and tested again on a mac vm I spun up,
Fairly silent, cant do anything about the kill command showing output, launches RustDesk at the end for permissions to be set, in theory this could be stuck on a web server somewhere (Im hoping maybe in the future this can be on the web console) and called directly with a one liner command (like curl -s http://mywebsite.example/macinstall.sh | sudo bash -s --
)
or deployed out on a larger scale if needed.
#!/bin/bash
# Assign the value "XYZ" to the password variable
rustdesk_password="XYZ"
# Get your config string from your Web portal and Fill Below.
rustdesk_config="configstring"
####################################Please Do Not Edit Below This Line##########################################
# Check if the script is being run as root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root."
exit 1
fi
if [[ $(arch) == 'arm64' ]]; then
echo "Installing Rosetta"
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
fi
# Specify the path to the rustdesk.dmg file
dmg_file="/tmp/rustdesk-1.2.2-x86_64.dmg"
# Specify the mount point for the DMG (temporary directory)
mount_point="/Volumes/RustDesk"
# Download the rustdesk.dmg file
echo "Downloading RustDesk Now"
curl -L https://github.com/rustdesk/rustdesk/releases/download/nightly/rustdesk-1.2.2-x86_64.dmg --output "$dmg_file"
# Mount the DMG file to the specified mount point
hdiutil attach "$dmg_file" -mountpoint "$mount_point" &> /dev/null
# Check if the mounting was successful
if [ $? -eq 0 ]; then
# Move the contents of the mounted DMG to the /Applications folder
cp -R "$mount_point/RustDesk.app" "/Applications/" &> /dev/null
# Unmount the DMG file
hdiutil detach "$mount_point" &> /dev/null
else
echo "Failed to mount the RustDesk DMG. Installation aborted."
exit 1
fi
# Run the rustdesk command with --get-id and store the output in the rustdesk_id variable
cd /Applications/RustDesk.app/Contents/MacOS/
rustdesk_id=$(./RustDesk --get-id)
# Apply new password to RustDesk
./RustDesk --server &
/Applications/RustDesk.app/Contents/MacOS/RustDesk --password $rustdesk_password &> /dev/null
/Applications/RustDesk.app/Contents/MacOS/RustDesk --config $rustdesk_config
# Kill all processes named RustDesk
rdpid=$(pgrep RustDesk)
kill $rdpid &> /dev/null
echo "..............................................."
# Check if the rustdesk_id is not empty
if [ -n "$rustdesk_id" ]; then
echo "RustDesk ID: $rustdesk_id"
else
echo "Failed to get RustDesk ID."
fi
# Echo the value of the password variable
echo "Password: $rustdesk_password"
echo "..............................................."
echo "Please complete install on GUI, launching RustDesk now."
open -n /Applications/RustDesk.app
from rustdesk-server-pro.
Thanks for your work @dinger1986
I'll play with it later today.
from rustdesk-server-pro.
Ran your latest script on my machine and it's wiped out every entry in "Recent Sessions" and the address book. Everything is gone. Panicked.
Was already running 1.2.2. nightly. Reverting to 1.2.1 restores them. Everything back as it should be.
Dangerous bug...!
from rustdesk-server-pro.
Once 1.2.2 is out we wont use nightlys for the script but using it for now as it allows us to use --config
bug confirmed on windows as well. Hve opened bug report rustdesk/rustdesk#5203
from rustdesk-server-pro.
Related Issues (20)
- LDAP uses Attribute cn or displayName but should be changeable to sAMAccountName HOT 21
- [FEATURE] DarkMode HOT 5
- Okta error HOT 5
- Windows Service & Admin Permissions HOT 3
- Feature Request (device group) HOT 3
- Reporting Function
- How to restrict access to departing employees
- [Q] How does server know what address book serve to user?
- Why Can't I Control Devices From My RustDesk Server? HOT 1
- make it so groups dont require a user + assing devices to mutiple users directly without groups HOT 4
- is there anyway to hide de default device list from users HOT 1
- Error on OIDC Azure Connection HOT 5
- Suggestion HOT 3
- block every new device by default option. HOT 4
- GDPR compliant HOT 1
- Add an option to change the Whitelist of devices under a Strategy HOT 4
- License Server 400 Bad Request HOT 3
- the problem with users and groups HOT 5
- blocking users
- username@device_name not working 100% HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rustdesk-server-pro.