Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Outset not creating the com.github.outset.once.plist file in ~/Library/Preferences #83

Open
cnelson644 opened this issue Feb 2, 2021 · 16 comments

Comments

@cnelson644
Copy link

I have a script that sets user docks initially for each user on a mac. I want it to only run once per user. So I place it in /usr/local/outset/login-once. I noticed recently that the scripts have been running every time the same user logins. After some research, it seems that outset has not been creating the com.github.outset.once.plist file in ~/Library/Preferences.

Could it be a permissions issue? I have the permissions set to root:wheel 755 but I also tried root:admin 755 and it didn't seem to create that once file.

I am running outset 3.0.1 on macOS Catalina 10.15.7. I have Python3 installed as well.

@prdgalex
Copy link

prdgalex commented Feb 8, 2021

Did you figure out the issue? I'm running into the same. Even running the package manually will result in it not creating the plist.

@prdgalex
Copy link

prdgalex commented Feb 9, 2021

Adding a comment here in case you're not in the MacAdmins Slack #outset channel. I was able to figure this out, originally created my custom Outset package with the latest release 3.0.3 but was pushing the default Outset release 3.0.1. As soon as I uploaded the default release to 3.0.3 that plist appeared.

@cnelson644
Copy link
Author

@prdgalex Where did you find the 3.0.3 release? I only see the latest release as 3.0.1

@prdgalex
Copy link

prdgalex commented Feb 9, 2021

Go to the latest releases page here: https://github.com/chilcote/outset/releases. Once there expand Assets and you'll see the outset-3.0.3.pkg.

@chilcote
Copy link
Owner

I suspect what's happening is either the script is crashing, or something is causing it to time out so that it never gets to the point where the plist would be populated. Anything of interest in the logs? I just tried on a fresh setup and can't replicate this.

@cnelson644
Copy link
Author

Thanks @prdgalex for that. I did get 3.0.3 installed. I am still not getting that plist created, so my script still runs every login. What logs are you speaking of? /var/log/outset.log doesn't have anything of interest. Is there another one some where?

@chilcote
Copy link
Owner

@cnelson644
Copy link
Author

The only thing that ~/Library/Logs/outset.log has in it is it says it processed the script. But still the PLIST did not get created in ~/Library/Preferences. Am I missing something?

@chilcote
Copy link
Owner

My guess is that outset itself is exiting before it gets to this point https://github.com/chilcote/outset/blob/master/pkgroot/usr/local/outset/outset#L363-L365

Try editing that locally (/usr/local/outset/outset) and add a log line just above that, see if that gets logged.

logging.info("This log is supposed to happen")

@chilcote
Copy link
Owner

and maybe pass the value for d as well, to make sure it's not empty.

logging.info("This is what is supposed to be populated in the plist: %s", d)

@cnelson644
Copy link
Author

I'm sorry, I don't really know python very well. Just type logging.info("This is what is supposed to be populated in the plist: %s", d) right above that line of code in /usr/local/outset/outset?

@chilcote
Copy link
Owner

Sorry, yeah, right here, and indented (spaces) the same as "if d:"
https://github.com/chilcote/outset/blob/master/pkgroot/usr/local/outset/outset#L362

@cnelson644
Copy link
Author

So I wiped my test box and just installed python3 and outset 3.0.3. But I had to install python from the prompt when I logged in. After that, it worked as it should. Before I downloaded python from https://www.python.org/downloads/. Did I download the wrong one? What's the difference between that one from python and the one you download using terminal?

@chilcote
Copy link
Owner

I'm not entirely sure what you mean by the "one you download using terminal," but I assume that means installing the Command Line Tools, I.e apple's python. It's possible that the python from python.org will have different behaviors I suppose.

@cnelson644
Copy link
Author

So what is the proper manner in which to get python on the machine, in your opinion? I have been downloading python from python.org and installing it before outset. I am over the macs in classrooms and labs for our organization and I need to be able to replicate this.

@cnelson644
Copy link
Author

It seems to be working now. I must have done something weird when I was testing. I really appreciate your help @chilcote.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants