![]() ![]() ![]() The Python snippet is following the example in a Q&A article from Apple about getting the current console user: Q&A1133: Determining console user login status. I fixed my postinstall with a hardcoded path to the system Python, but I began to wonder:ĭo I have to use Python to get this information reliably? SystemConfiguration framework How To: Get the currently logged in user, in a more Apple approved way. That python snippet was written by the excellent Michael Lynn and spread far and wide by the equally excellent Ben Toms in his infamous post: It turned out to be the Python binary in their PATH that did not have the Python Objective-C bridge, so the function I used to get the currently logged in user failed. Recently one of my postinstall scripts failed for a tiny subset of our users. Script Tip: Get the currently logged in user, in Bash ← Home About Subscribe Script Tip: Get the currently logged in user, in Bash October 2, 2018
0 Comments
Leave a Reply. |