{"id":1117,"date":"2019-09-12T09:07:41","date_gmt":"2019-09-12T14:07:41","guid":{"rendered":"http:\/\/sites.williams.edu\/lj1\/?p=1117"},"modified":"2019-09-12T09:22:40","modified_gmt":"2019-09-12T14:22:40","slug":"macos-script-to-remove-old-license-from-all-users","status":"publish","type":"post","link":"https:\/\/sites.williams.edu\/lj1\/software\/macos-script-to-remove-old-license-from-all-users\/","title":{"rendered":"MacOS &#8211; Script to remove old license from all users"},"content":{"rendered":"<p>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:<br \/>\n\/Library\/Application\\ Support\/Schrodinger\/licenses<br \/>\n(See: <a href=\"https:\/\/pymol.org\/2\/support.html?\">https:\/\/pymol.org\/2\/support.html?<\/a> )<\/p>\n<p>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&#8217;s home folder will no longer interfere with the new license stored in \/Library\/Application Support\/&#8230;.<\/p>\n<blockquote><p>#!\/bin\/sh<\/p>\n<p># Collect users with a profile\/directory in \/Users<br \/>\nuserList=$(ls \/Users)<\/p>\n<p>for userName in ${userList}; do\t<\/p>\n<p>\tif [ -f \/Users\/$userName\/.pymol\/license.lic ]<br \/>\n     then<br \/>\n      echo &#8220;clearing pymol license from: $userName&#8221;<br \/>\n      rm -R \/Users\/$userName\/.pymol<br \/>\n     else<br \/>\n      echo &#8220;.pymol not in \/Users\/$userName&#8221;<br \/>\n    fi<br \/>\ndone    <\/p>\n<p># Also remove the old license from the User templates<\/p>\n<p>if [ -f \/System\/Library\/User\\ Template\/English.lproj\/.pymol\/license.lic ]<br \/>\n    then<br \/>\n\t echo &#8220;Removing old pymol license from User Template English.lproj&#8221;<br \/>\n\t rm -R \/System\/Library\/User\\ Template\/English.lproj\/.pymol<br \/>\n    else<br \/>\n  \t echo &#8220;.pymol not in English.lproj User Template&#8221;<br \/>\nfi    <\/p>\n<p>if [ -f \/System\/Library\/User\\ Template\/Non_localized\/.pymol\/license.lic ]<br \/>\n    then<br \/>\n\t echo &#8220;Removing old pymol license from User Template Non Localized&#8221;<br \/>\n\t rm -R \/System\/Library\/User\\ Template\/Non_localized\/.pymol<br \/>\n    else<br \/>\n  \t echo &#8220;.pymol not in Non-Localized User Template&#8221;<br \/>\nfi<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip; <a class=\"more-link\" href=\"https:\/\/sites.williams.edu\/lj1\/software\/macos-script-to-remove-old-license-from-all-users\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[10086,10085],"tags":[10102,29497,10090,73556,73524,10092],"class_list":["post-1117","post","type-post","status-publish","format-standard","hentry","category-labs","category-software","tag-all_users","tag-default-user","tag-mac","tag-script","tag-software","tag-user-profile"],"acf":[],"_links":{"self":[{"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/posts\/1117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/comments?post=1117"}],"version-history":[{"count":7,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/posts\/1117\/revisions"}],"predecessor-version":[{"id":1125,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/posts\/1117\/revisions\/1125"}],"wp:attachment":[{"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/media?parent=1117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/categories?post=1117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/tags?post=1117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}