Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Running Python script at startup

Running Python script at startup
Thread Tools
genevish
Mac Enthusiast
Join Date: Jan 1999
Location: Marietta, GA, USA
Status: Offline
Reply With Quote
Sep 14, 2004, 11:30 PM
 
I tried this:

sudo defaults write /Library/Preferences/com.apple.loginwindow LoginHook /Users/Shared/libgmail-0.0.8/demos/gmailpopd.py

But it freezes on a blank blue screen at startup (before the login window appears). I'm thinking it's not returning control to the loginwindow maybe. Any ideas?

Thanks,

-Scott
Scott Genevish
scott AT genevish DOT org
     
Arkham_c
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Sep 15, 2004, 08:32 AM
 
Originally posted by genevish:
I tried this:

sudo defaults write /Library/Preferences/com.apple.loginwindow LoginHook /Users/Shared/libgmail-0.0.8/demos/gmailpopd.py

But it freezes on a blank blue screen at startup (before the login window appears). I'm thinking it's not returning control to the loginwindow maybe. Any ideas?

Thanks,

-Scott
If it's a daemon, make a StartupItem in /Library/StartupItems and start it from there. I'm not familiar with LoginHook, but I assume you want this running when the machine starts up and not when you log into it. If this is the case, a StartupItem is the way to go. If you want to launch it on login, you probably just want to wrap the shell command in an AppleScript and then make the script a "Startup Item" in the System Preferences, which is a user-level event.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 06:17 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,