soferio / minertimer

Limiting screen time on a Mac when a child is using Minecraft Java Edition.
MIT License
11 stars 5 forks source link

When installed as different user, notification don't work #3

Open superandrew opened 3 days ago

superandrew commented 3 days ago

I tried to install the script as an admin user on the computer. This is basically to avoid that the current user, as administrator, and as 14 old kid, has the temptation to interfere with the script :)

Unfortunately, when installed as a different user, it seems that neither the "say" command, or the alert, or the osascript for the notification, works for the logged in user.

I tried to debug the script, but it is difficult to debug it as a different user. The notifications, when on the current user, work well.

Any suggestion?

soferio commented 1 day ago

Are you saying that you installed it as a NON-ADMIN user, but the ADMIN user is unaffected by it? or the other way around, that you installed it as ADMIN user but NON-ADMIN user is unaffected?

If it is the latter, I am surprised, because that is how it works for me. If it is the former, this is probably normal behaviour to avoid non-admin users undermining the privileges of super/admin users. Perhaps someone else can comment.

superandrew commented 19 hours ago

Sorry, I wasn't clear: I installed the script as user "admin" (administrator) but the main user is "kid" (also administrator). So just a different administrator but always a privileged user. Just to be clear, the script works and the counting as well, so Minecraft is killed at the end of period. It is just that neither of the notifications system seems to be working.