<eraserhd2>
Did I ask before why we have to set UserName in launch agents? It seems there is no way to say 'current user', right?
eraserhd2 is now known as eraserhd
<__monty__>
eraserhd: I assume they're run by a system daemon that has no notion of "current user" or at least has a different one than you might expect? It's not like you have a launchctl --user, like systemctl, right?
<eraserhd>
Hmm, but as I understand it, agents are supposed to set up and run a user's login environment, and I don't think separate files are installed for each user.
<__monty__>
Oh, maybe you're right. You're talking about stuff from ~/Library?
<eraserhd>
Yeah
<__monty__>
Yeah, not sure why it couldn't default to whatever user's HOME it found the files in. I assume explicit was just simpler.
<eraserhd>
According to launchd.info "The main difference is that an agent runs on behalf of the logged in user while a daemon runs on behalf of the root user or any user you specify with UserName."
<LnL>
"agents" always run as the login user, "daemons" run as root or the specified UserName
<__monty__>
Oh, there's the agent/daemon seperation too. Well, I know nothink.
<LnL>
user agents are just agents configured for a single user instead of all users
<eraserhd>
hrmm, I'm not able to make an agent run without specifying a UserName.
<LnL>
that's strange, it only works for daemons AFAIK
<eraserhd>
and, well it works. I wonder how I messed it up before.
<eraserhd>
Proposal: environment.launchEnvironment and a module that uses `launchctl setenv` to set these variables, necessary for me to set environments variables for my GUI apps.