Skip to content

Instantly share code, notes, and snippets.

@Rich77498
Created May 2, 2025 15:31
Show Gist options
  • Select an option

  • Save Rich77498/3aaba477667ad35c3975051715e49405 to your computer and use it in GitHub Desktop.

Select an option

Save Rich77498/3aaba477667ad35c3975051715e49405 to your computer and use it in GitHub Desktop.
bash script reset crossover on mac updated 2025
#!/usr/bin/env bash
# Locate CrossOver.app
CO_PWD=~/Applications/CrossOver.app/Contents/MacOS
[ -d "${CO_PWD}" ] || CO_PWD=/Applications/CrossOver.app/Contents/MacOS
if [ ! -d "${CO_PWD}" ]; then
echo "CrossOver not found in default locations. Exiting..."
exit 1
fi
cd "${CO_PWD}" || exit
# Kill existing CrossOver processes
PROC_NAME='CrossOver'
# Use pgrep to get PIDs
pids=$(pgrep "${PROC_NAME}")
if [ -n "${pids}" ]; then
echo "Stopping CrossOver processes..."
kill -9 ${pids} >/dev/null 2>&1
# Wait until processes terminate
while pgrep -q "${PROC_NAME}"; do
sleep 1
done
fi
# Reset trial dates to 3 hours ago (UTC)
DATETIME=$(date -u -v-3H '+%Y-%m-%dT%TZ')
plutil -replace FirstRunDate -date "${DATETIME}" ~/Library/Preferences/com.codeweavers.CrossOver.plist
plutil -replace SULastCheckTime -date "${DATETIME}" ~/Library/Preferences/com.codeweavers.CrossOver.plist
# Show notification
osascript -e "display notification \"Trial reset: Date set to ${DATETIME}\""
# Remove evaluation files from all bottles
find ~/Library/Application\ Support/CrossOver/Bottles -type f \( -name ".eval" -o -name ".update-timestamp" \) -delete
# Launch CrossOver
echo "Starting CrossOver..."
"./CrossOver.origin" >> /tmp/co_log.log 2>&1
@Rich77498
Copy link
Author

Rich77498 commented May 2, 2025

use

bash <(curl -s https://gist.githubusercontent.com/Rich77498/3aaba477667ad35c3975051715e49405/raw/7ae590e61db25b120f1dad5a29e2e6cda9c10eed/Crossover_trial_reset.sh)

to run without downloading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment