User agent modified file check for all users?
Hey All, I had a question about creating a User Agent for multiple users in Lingon. Is there a way to set the When:Run it if this file is modified as: ~/Library/Preferences/com.systempreferences.plist instead of /Users/loggedInUser/LibraryPreferences/com.apple.systempreferences.plist? It doesn¹t seem to recognize ~/Library This way my terminal command will run if any User¹s com.apple.systempreferences.plist is modified. Thank you very much! Galen Sprague Senior Analyst Technical ..: Apple Systems :.. Marketing IS Staples, Inc. 500 Staples Dr. Framingham, Ma 01702 galen.sprague@staples.com :.. 508-253-1374
On Jan 29, 2008, at 11:40 AM, Galen Sprague wrote:
I had a question about creating a User Agent for multiple users in Lingon. Is there a way to set the When:Run it if this file is modified as: ~/Library/Preferences/com.systempreferences.plist instead of /Users/loggedInUser/LibraryPreferences/ com.apple.systempreferences.plist? It doesn’t seem to recognize ~/ Library
This way my terminal command will run if any User’s com.apple.systempreferences.plist is modified.
I can't really imagine this being possible. How is launchd supposed to know which user's directory the tilde should be expanded into at any given moment considering the fact that multiple users can be logged in concurrently?
On Jan 29, 2008, at 12:14 PM, Nathan Duran wrote:
On Jan 29, 2008, at 11:40 AM, Galen Sprague wrote:
I had a question about creating a User Agent for multiple users in Lingon. Is there a way to set the When:Run it if this file is modified as: ~/Library/Preferences/com.systempreferences.plist instead of /Users/loggedInUser/LibraryPreferences/ com.apple.systempreferences.plist? It doesn’t seem to recognize ~/ Library
This way my terminal command will run if any User’s com.apple.systempreferences.plist is modified.
I can't really imagine this being possible. How is launchd supposed to know which user's directory the tilde should be expanded into at any given moment considering the fact that multiple users can be logged in concurrently?
There is one launchd per user, so in theory, it shouldn't be hard. Unfortunately, the "~" magic doesn't work for WatchPaths at the moment. Feel free to file a bug, davez
On 1/29/08 3:19 PM, "Dave Zarzycki" <zarzycki@apple.com> wrote:
On Jan 29, 2008, at 12:14 PM, Nathan Duran wrote:
On Jan 29, 2008, at 11:40 AM, Galen Sprague wrote:
I had a question about creating a User Agent for multiple users in Lingon. Is there a way to set the When:Run it if this file is modified as: ~/Library/Preferences/com.systempreferences.plist instead of /Users/loggedInUser/LibraryPreferences/ com.apple.systempreferences.plist? It doesn¹t seem to recognize ~/ Library
This way my terminal command will run if any User¹s com.apple.systempreferences.plist is modified.
I can't really imagine this being possible. How is launchd supposed to know which user's directory the tilde should be expanded into at any given moment considering the fact that multiple users can be logged in concurrently?
There is one launchd per user, so in theory, it shouldn't be hard. Unfortunately, the "~" magic doesn't work for WatchPaths at the moment. Feel free to file a bug,
I have also tried adding multiple WatchPaths by editing the .plist file but it only seems to use the first WatchPath, is there away around this? Do I need to create another attribute so it watches more than one path? Thank you! Galen
On Jan 29, 2008, at 12:24 PM, Galen Sprague wrote:
On 1/29/08 3:19 PM, "Dave Zarzycki" <zarzycki@apple.com> wrote:
On Jan 29, 2008, at 12:14 PM, Nathan Duran wrote:
On Jan 29, 2008, at 11:40 AM, Galen Sprague wrote:
I had a question about creating a User Agent for multiple users in Lingon. Is there a way to set the When:Run it if this file is modified as: ~/Library/Preferences/com.systempreferences.plist instead of /Users/loggedInUser/LibraryPreferences/ com.apple.systempreferences.plist? It doesn’t seem to recognize ~/ Library
This way my terminal command will run if any User’s com.apple.systempreferences.plist is modified.
I can't really imagine this being possible. How is launchd supposed to know which user's directory the tilde should be expanded into at any given moment considering the fact that multiple users can be logged in concurrently?
There is one launchd per user, so in theory, it shouldn't be hard. Unfortunately, the "~" magic doesn't work for WatchPaths at the moment. Feel free to file a bug,
I have also tried adding multiple WatchPaths by editing the .plist file but it only seems to use the first WatchPath, is there away around this? Do I need to create another attribute so it watches more than one path?
Can you please supply an example configuration file? Thanks! davez
On 1/29/08 4:07 PM, "Dave Zarzycki" <zarzycki@apple.com> wrote:
On Jan 29, 2008, at 12:24 PM, Galen Sprague wrote:
On 1/29/08 3:19 PM, "Dave Zarzycki" <zarzycki@apple.com> wrote:
On Jan 29, 2008, at 12:14 PM, Nathan Duran wrote:
On Jan 29, 2008, at 11:40 AM, Galen Sprague wrote:
I had a question about creating a User Agent for multiple users in Lingon. Is there a way to set the When:Run it if this file is modified as: ~/Library/Preferences/com.systempreferences.plist instead of /Users/loggedInUser/LibraryPreferences/ com.apple.systempreferences.plist? It doesn¹t seem to recognize ~/ Library
This way my terminal command will run if any User¹s com.apple.systempreferences.plist is modified.
I can't really imagine this being possible. How is launchd supposed to know which user's directory the tilde should be expanded into at any given moment considering the fact that multiple users can be logged in concurrently?
There is one launchd per user, so in theory, it shouldn't be hard. Unfortunately, the "~" magic doesn't work for WatchPaths at the moment. Feel free to file a bug,
I have also tried adding multiple WatchPaths by editing the .plist file but it only seems to use the first WatchPath, is there away around this? Do I need to create another attribute so it watches more than one path?
Can you please supply an example configuration file?
Here you go...
On Jan 29, 2008, at 1:44 PM, Galen Sprague wrote:
On 1/29/08 4:07 PM, "Dave Zarzycki" <zarzycki@apple.com> wrote:
On Jan 29, 2008, at 12:24 PM, Galen Sprague wrote:
On 1/29/08 3:19 PM, "Dave Zarzycki" <zarzycki@apple.com> wrote:
On Jan 29, 2008, at 12:14 PM, Nathan Duran wrote:
On Jan 29, 2008, at 11:40 AM, Galen Sprague wrote:
I had a question about creating a User Agent for multiple users in Lingon. Is there a way to set the When:Run it if this file is modified as: ~/Library/Preferences/com.systempreferences.plist instead of /Users/loggedInUser/LibraryPreferences/ com.apple.systempreferences.plist? It doesn’t seem to recognize ~/ Library
This way my terminal command will run if any User’s com.apple.systempreferences.plist is modified.
I can't really imagine this being possible. How is launchd supposed to know which user's directory the tilde should be expanded into at any given moment considering the fact that multiple users can be logged in concurrently?
There is one launchd per user, so in theory, it shouldn't be hard. Unfortunately, the "~" magic doesn't work for WatchPaths at the moment. Feel free to file a bug,
I have also tried adding multiple WatchPaths by editing the .plist file but it only seems to use the first WatchPath, is there away around this? Do I need to create another attribute so it watches more than one path?
Can you please supply an example configuration file?
Here you go...
<example.zip>
Where are you installing this configuration file? davez
On 1/29/08 8:21 PM, "Dave Zarzycki" <zarzycki@apple.com> wrote:
On Jan 29, 2008, at 1:44 PM, Galen Sprague wrote:
On 1/29/08 4:07 PM, "Dave Zarzycki" <zarzycki@apple.com> wrote:
On Jan 29, 2008, at 12:24 PM, Galen Sprague wrote:
On 1/29/08 3:19 PM, "Dave Zarzycki" <zarzycki@apple.com> wrote:
On Jan 29, 2008, at 12:14 PM, Nathan Duran wrote:
On Jan 29, 2008, at 11:40 AM, Galen Sprague wrote: > I had a question about creating a User Agent for multiple users > in > Lingon. Is there a way to set the When:Run it if this file is > modified as: ~/Library/Preferences/com.systempreferences.plist > instead of /Users/loggedInUser/LibraryPreferences/ > com.apple.systempreferences.plist? It doesn¹t seem to recognize > ~/ > Library > > This way my terminal command will run if any User¹s > com.apple.systempreferences.plist is modified.
I can't really imagine this being possible. How is launchd supposed to know which user's directory the tilde should be expanded into at any given moment considering the fact that multiple users can be logged in concurrently?
There is one launchd per user, so in theory, it shouldn't be hard. Unfortunately, the "~" magic doesn't work for WatchPaths at the moment. Feel free to file a bug,
I have also tried adding multiple WatchPaths by editing the .plist file but it only seems to use the first WatchPath, is there away around this? Do I need to create another attribute so it watches more than one path?
Can you please supply an example configuration file?
Here you go...
<example.zip>
Where are you installing this configuration file?
/Library/LaunchAgents/
On Jan 30, 2008, at 6:21 AM, Galen Sprague wrote:
On 1/29/08 8:21 PM, "Dave Zarzycki" <zarzycki@apple.com> wrote:
On Jan 29, 2008, at 1:44 PM, Galen Sprague wrote:
On 1/29/08 4:07 PM, "Dave Zarzycki" <zarzycki@apple.com> wrote:
On Jan 29, 2008, at 12:24 PM, Galen Sprague wrote:
On 1/29/08 3:19 PM, "Dave Zarzycki" <zarzycki@apple.com> wrote:
On Jan 29, 2008, at 12:14 PM, Nathan Duran wrote: > On Jan 29, 2008, at 11:40 AM, Galen Sprague wrote: >> I had a question about creating a User Agent for multiple users >> in >> Lingon. Is there a way to set the When:Run it if this file is >> modified as: ~/Library/Preferences/com.systempreferences.plist >> instead of /Users/loggedInUser/LibraryPreferences/ >> com.apple.systempreferences.plist? It doesn’t seem to recognize >> ~/ >> Library >> >> This way my terminal command will run if any User’s >> com.apple.systempreferences.plist is modified. > > I can't really imagine this being possible. How is launchd > supposed > to know which user's directory the tilde should be expanded into > at > any given moment considering the fact that multiple users can be > logged in concurrently?
There is one launchd per user, so in theory, it shouldn't be hard. Unfortunately, the "~" magic doesn't work for WatchPaths at the moment. Feel free to file a bug,
I have also tried adding multiple WatchPaths by editing the .plist file but it only seems to use the first WatchPath, is there away around this? Do I need to create another attribute so it watches more than one path?
Can you please supply an example configuration file?
Here you go...
<example.zip>
Where are you installing this configuration file?
/Library/LaunchAgents/
The normal file system permissions are tripping you up. The default permissions for ~/Library are 700. That means that any given per-user launchd cannot monitor the preferences of their peers. davez
On Jan 29, 2008, at 12:19 PM, Dave Zarzycki wrote:
There is one launchd per user, so in theory, it shouldn't be hard. Unfortunately, the "~" magic doesn't work for WatchPaths at the moment. Feel free to file a bug,
I'm assuming kqueue's doing something smarter than constant polling, but I'm still not sure if tilde expansion is something I'd *want* to work there. Seems like it's bound to lead to noticeably increased resource usage somewhere on a box with a whole lot of users.
participants (3)
-
Dave Zarzycki
-
Galen Sprague
-
Nathan Duran