-
Notifications
You must be signed in to change notification settings - Fork 2
loginitems
Unusable Over su
Session
#1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It's an "unknown error", apparently. According to this StackOverflow thread it might be related to a leaky third-party application. Is it consistently reproducible, or immediately after restarting? |
It's also possible that the AppleScript interface to a user's login items can't be used under |
I haven't tried for a while, but, IIRC, the problem was consistently reproducible when I last did. I haven't attempted to see if restarting would help, either, but, for all we know, it might. I can try again if you want, though a dummy user account isn't all that hard to create, is it? (Recovering the accompanying user ID after the fact might turn out to be somewhat problematic, though, so I can understand your hesitancy to go through with doing that, as you might want to reuse ID 502 for another, different new user in the future.)
Yeah, I also suspect that the error might have to do with the fact that |
Indeed.
It's not a use-case I'm interested in using personally, and this repository contains all the AppleScript I have ever written, so I'm afraid I don't really have the time or inclination to explore this further. That said,
PRs are, genuinely, welcome. 🙂 |
Unfortunately, you've still got me beat when it comes to how much AppleScript you've written in your life. I'll put it on my to-do list to look into, but I can't promise anything, as I'd probably have to dive rather deep into the documentation to figure anything out in this area. |
When I ran
loginitems -l
undersu -l $OTHER_REDACTED_USER
, I got the following error fromosascript
:I suspect that this probably has to do with the fact that
su
does something funny and creates an execution environment thatloginitems
wasn't expecting. I don't recognize and couldn't find any documentation on that particular error code, though, so good luck if you decide to chase down the root cause of this problem. In the meantime, I'll just switch users to useloginitems
under other accounts.The text was updated successfully, but these errors were encountered: