Trying to find out if a particular user is logged into the machine, specifically the user using the graphical user interface.
Is this possible via command line?
loginmacosuser-accounts
Trying to find out if a particular user is logged into the machine, specifically the user using the graphical user interface.
Is this possible via command line?
Best Answer
GUI:
Command Line:
Check the owner of
/dev/console
In a C program:
The C code in Technical Q&A QA1133: Determining console user login status shows how to determine which user owns the active GUI session.
For example: