Skip to content

Lynna Jackson

Lab/Classroom Computer and Software Managment

  • Home
  • The 100 mile view

MacOS – Script to remove old license from all users

With PyMol version 2.1 and below, the license needed to be located in each users home folder. Thankfully, with PyMol version 2.2 and beyond the license can be located centrally in:
/Library/Application\ Support/Schrodinger/licenses
(See: https://pymol.org/2/support.html? )

To transition from the old license to the new one you may have to remove the old license from all home directories of people that had logged into the mac. Below is a script I wrote that does that. Once you run this script, the old license in the user’s home folder will no longer interfere with the new license stored in /Library/Application Support/….

#!/bin/sh

# Collect users with a profile/directory in /Users
userList=$(ls /Users)

for userName in ${userList}; do

if [ -f /Users/$userName/.pymol/license.lic ]
then
echo “clearing pymol license from: $userName”
rm -R /Users/$userName/.pymol
else
echo “.pymol not in /Users/$userName”
fi
done

# Also remove the old license from the User templates

if [ -f /System/Library/User\ Template/English.lproj/.pymol/license.lic ]
then
echo “Removing old pymol license from User Template English.lproj”
rm -R /System/Library/User\ Template/English.lproj/.pymol
else
echo “.pymol not in English.lproj User Template”
fi

if [ -f /System/Library/User\ Template/Non_localized/.pymol/license.lic ]
then
echo “Removing old pymol license from User Template Non Localized”
rm -R /System/Library/User\ Template/Non_localized/.pymol
else
echo “.pymol not in Non-Localized User Template”
fi

This entry was posted in Labs, Software and tagged All_Users, Default User, Macintosh, Script, Software, User_Profile on September 12, 2019 by Lynna Jackson.

Post navigation

← MacOS – Disabling Sleep option from Finder menu Windows – Windows to Go – Portable Windows on an external disk →

Tags

  • Active_Directory
  • Adobe
  • AFP
  • ARD
  • Background
  • Boot
  • Bootcamp
  • Chrome
  • Command
  • Default User
  • DEP
  • Deployment
  • Dual_Boot
  • El Capitan
  • External boot
  • GIS
  • Group_Policy
  • High Sierra
  • Image
  • Installer
  • JAMF
  • KACE
  • Keyserver
  • Kiosk
  • Lion
  • Login
  • Macintosh
  • Matlab
  • Mavericks
  • Mt Lion
  • Novell
  • Packaging
  • Reference
  • Security
  • Silent Installer
  • SIP
  • Sleep
  • Software
  • Spss
  • Startup
  • User_Profile
  • VectorWorks
  • Windows
  • Windows 10
  • Windows to Go

Contact Me

Contact me by email ... [email protected]
Proudly powered by WordPress