How should I find my Screen Saver's preferences?

I'm writing a screen saver that basically draws stuff the user types into a box. I have not completed it yet, because I have not been able to locate where the screen saver preferences are located. Here's the code that takes care of the preferences:
//PrefControl.m
//I wrote this on my brother's school computer. Go !:
#import "PrefControl.h"
//define what you have - not defined in header file because there is no need to access the predefined text in any other file:
#define DISPLAYED_TEXT @"com.nodomain.Saver.DISPLAYED"
@implementation PrefControl
@synthesize displayed;
-(id) init{
self = [super init];
if(self){
//read user defaults
NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
displayed = [defaults stringForKey: DISPLAYED_TEXT];
return self;
-(void) writePrefs{
//write preferences the way the UserDefaults guide says to:
NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
NSMutableDictionary* defs = [NSMutableDictionary dictionaryWithCapacity:1];
[defs setObject:displayed forKey:DISPLAYED_TEXT];
[defaults registerDefaults:defs];
-(void) dealloc{
[self writePrefs];
[super dealloc];
+(void) initialize{
//set up user defaults for the first time:
NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
NSMutableDictionary* defs = [NSMutableDictionary dictionaryWithCapacity:1];
[defs setObject:@"Hello, World!" forKey:DISPLAYED_TEXT];
[defaults registerDefaults:defs];
+(PrefControl*) prefs{
return [[[PrefControl alloc]init]autorelease];
@end
and its header:
//PrefControl.h
//I wrote this.
#import <cocoa/cocoa.h>
@interface PrefControl:NSObject{
NSString* displayed;//the text my Screen Saver displays.
@property(readonly, nonatomic) NSString* displayed;
-(id) init;//sets up all the properties. done over time.
-(void) writePrefs;//writes the defaults.
-(void) dealloc;
+(void) initialize;//sets up the defaults.
+(PrefControl*) prefs;//makes and autoreleases a new PrefControl.
@end
Now on to my question: Where can I find my preferences file? Is it the System Preferences preferences PLIST or is it my own Screen Saver's PLIST? How can I change the file so I can test if it saves properly? I am going to edit it with the PLIST editor that came with XCode.
I prefer to do the behind-the-scenes work before working on the major GUI if I can.

I just did a little test and changed something in my Screen Saver settings and looked to see what changed (just had a Finder window open in my ~/Library/Preferences and had the "Date Modified" column selected so that the most recent change would appear at the top) and noticed that the file called com.apple.screensaver.xxxx.plist file changed (the xxxx is a hex number that is part of your UUID, or perhaps the whole UUID, as have seen it both ways). This screensaver preferences file is located in ~/Library/Preferences/ByHost which makes sense, as every user would need their own set of screen saver preferences on each host.
Looking at this file in TextWrangler it looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>askForPassword</key>
<integer>0</integer>
<key>idleTime</key>
<integer>300</integer>
<key>lastNonRandomModuleName</key>
<string>Flurry</string>
<key>moduleName</key>
<string>Flurry</string>
<key>modulePath</key>
<string>/System/Library/Screen Savers/Flurry.saver</string>
<key>tokenRemovalAction</key>
<integer>0</integer>
</dict>
</plist>
Hope that helps.
One thing I did have a question about is how to find the UUID. On a Mac Pro system the command:
system_profiler | grep -i uuid
returned the expected number that was part of the com.apple.screensaver.xxxx.plist file, but this did not work on a MacBook Pro. No luck trying to find out why so far. Anyone have any ideas? There is also a UUID associated with a disk volume, that appears to have nothing to do with the UUID associated with the system. So the UUID I'm talking about here is for the system, not a disk.
-Bob

Similar Messages

  • HOW DO I CHANGE THE SCREEN SAVER TIME?

    How do I change the screen saver tim e?
    jamesrhoads

    Here is a basic tutorial for Vista, it should apply to WIN7.
    I am a volunteer. I am not an HP employee.
    To say THANK YOU, press the "thumbs up symbol" to render a KUDO. Please click Accept as Solution, if your problem is solved. You can render both Solution and KUDO.
    The Law of Effect states that positive reinforcement increases the probability of a behavior being repeated. (B.F.Skinner). You toss me KUDO and/or Solution, and I perform better.
    (2) HP DV7t i7 3160QM 2.3Ghz 8GB
    HP m9200t E8400,Win7 Pro 32 bit. 4GB RAM, ASUS 550Ti 2GB, Rosewill 630W. 1T HD SATA 3Gb/s
    Custom Asus P8P67, I7-2600k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX660 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Custom Asus P8Z77, I7-3770k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX670 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Both Customs use Rosewill Blackhawk case.
    Printer -- HP OfficeJet Pro 8600 Plus

  • How do I stop my screen saver from coming on too quickly on my MacBook Pro 2012, How do I stop my screen saver from coming on too quickly on my MacBook Pro 2012

    How do I stop my screen saver from coming on too quickly on my MacBook Pro 2012

    MacBook Pro
    https://discussions.apple.com/community/notebooks/macbook_pro
    https://discussions.apple.com/community/mac_os?view=discussions 
    http://www.apple.com/support/macbookpro

  • How can I get a screen saver to show on my screen? It shows when I do a test only.

    How do I get my screen saver to work?  I did everything in Help.  It will show for a test but not after that.

    karenfromtonawanda wrote:
    How do I get my screen saver to work?  I did everything in Help.  It will show for a test but not after that.
    Including
    For more information about the options, click the Help button (looks like a question mark).

  • How do I find the screen with my personal iPod (my name's iPod) so I can download from my purchased or free songs/pods from my computer? My iPod has opened to that for 3 years and this week I can't find it: not on purchased page or on Apple store page.

    QUESTION from an American in India:
    How do I find the screen with my personal iPod (my name's iPod) so I can download from my purchased or free songs/pods from my computer? My iPod has opened to that for 3 years and this week I can't find it: not on purchased page or on Apple store page.

    See:
    Recovering your iTunes library from your iPod or iOS device: Apple Support Communities

  • How should I find out the number of messages on queue?

    I am using iMQ 3.0. Point-to-point messaging.
    I have sent some messages to the queue. How should I
    find out the number of messages on queue ?

    You can use MQ's admin tools (imqcmd or imqadmin)
    to find that out.
    'imqcmd query dst -n queuename -t q' will print out what
    you want.
    Check the administration guide for more info.

  • How do I clear the Screen Saver?

    How do I clear the Screen Saver from showing the photos on my phone?

    You must have set it to use your photo stream as the screensaver. You can go into settings - screensaver to change to a different source.

  • How Do I Find My Screen Manufacturer?

    Hey everyone,
    I have MBP w/Retina Display and my display had a dead pixel so i took it to Apple Store and they replaced with new screen. But i just wonder how do i find my screen manufacturer?
    Os : 10.9.4
    Model : Macbook Pro Retina 13-Inch Late 2012
    So i tried to below code and i got nothing. Is there any other way to find out to leaner manufacturer?
    ioreg -lw0 | grep "EDID" | sed "/[^<]*</s///" | xxd -p -r | strings -6
    @.`0 6
    Color LCD

    I would like give just a little more information than what the link describes.
    The screenname is something that you would select for your self.  This is how that specific www.eprintcenter.com account will be identifed in the forums if you were to post with that account.
    It would need to be unique from what someone else has.
    ↙-----------How do I give Kudos?| How do I mark a post as Solved? ----------------↓

  • How do i change the screen saver

    How do I change the screen saver. Thanks

    Here is a step by step guide on changing the screen saver.
    http://macdailytips.com/2013/02/18/change-screensaver-on-mac-os-x/

  • Does anyone know how to get an animated screen saver working

    Hi I have a imac desktop not even a year old.  Does anyone know how to get an animated screen saver working please. Its a gimp screen saver and is it safe to use on my mac? 

    Go to the website from where you got the screensaver from and read its system requirements and instructions for installation. 

  • Screen Saver System Preferences layout issue on Yosemite

    Hi,
    After a clean install (first formatted and installed from a clean bootable USB-stick (so a really clean install)), the Screen Saver System Preferences shows a glitch after activating the Photos App (I think). I checked every step in the process and the glitch showed up after activating the Photos App.
    When navigating to System Preferences and then to Desktop & Screen Saver, first it shows two columns of screen saver types (as it should be), but when the photos from the Photos App are loaded (in the background in the Desktop screen), the preview window with the selected screen saver stretches half a centimeter to the left, pushing one of the two columns away.
    I have already tried reinstalling Mac OS Yosemite 10.10.3, deleting caches, removing screen saver config files (tip from Linc Davis), etc. The console does not show  useful information (for me).
    In my case the issue shows up on my iMac (27-inch, Late 2012) and MacBook Pro (Retina, 13-inch, Mid 2014). Only on the MacBook the two columns merge to one. One the iMac I only see a small stretch, but it does not cause the two columns to merge.
    Please reply if the same issue occurs and if there is a known solution.
    Regards.

    Hi Cameron I'm not going to be much help because I too have exactly the same problem with my machine - I have tried re-installing Leopard and that makes not one scrap of difference - I have cleared out all the rubbish on the machine - no difference - sent umpteen "reports" to Apple expecting some sort of response - after all the OS is the best thing since sliced bread so they can't have many reports to deal with - perhaps its us causing the problem.
    Regards Bob

  • Photos do not work in screen saver in preferences

    With upgrade to 10.10.3 and integration from iPhoto to Photos, my screen saver in preferences cannot access my photos. Any ideas?

    Mine started working after a while.  I'm not sure how long it took but probably a couple hours.  I was getting organized to set up a folder with the pictures I wanted in the screen saver when I clicked on the menu in the system preferences and was very surprised to options to pick photos from Photos.
    Later, I was disappointed to see the list of albums was out of date; the new screen saver album wasn't there.  I decided to try quitting system preferences and starting it up again and that worked.  When I checked the list of albums available in the screen saver menu, it had updated and I was able to select the folder I wanted.

  • How do I create a screen saver from a video file?

    I've been trying to search for an answer to this question for 20 minutes, without luck, so I figured the best course of action is to ask the experts.
    I'm a video editor.  If I cut together a series of clips, of any length, how do I make that movie into a screen saver that will be usable on OS X Lion and Windows XP?  I would assume that it's just a matter of converting the movie file to something that an operating system recognizes and will play as a screen saver (on both platforms), but I cannot Google my way into finding the answer... I'm wanting to make a video screen saver for my wife for Christmas.  PLEASE HELP!!!
    Thanks.

    Hi,
    Welcome to the Apple Discussions.
    There are a few tools you can use. This page lists a couple. It looks like you can download a trial version and see if it'll do what you want. If not there's another one on that page.
    If you're handy with programming, you can also create your own with Xcode. There's an article here that talks about it, though it's a bit old, and might be somewhat out of date.
    But just dropping SWF files probably isn't going to work. A screen saver is a special kind of program...
    charlie

  • How Do I Create a Screen Saver That Uses Shared Photos??

    I have a pretty simple request here, or at least I think it should be pretty simple. My family uses a shared photo stream so that we can all see what everybody is up to without sending a bunch of individual messages.
    I'm going to use a screen saver that displays photos but the tricky part is...I'd like the family's shared stream to be the source for all the photos.
    Previously, I went into iPhoto and just selected all of the photos from the stream, dragged them into a desktop folder, and set this as the source for the screen saver. The only problem with this method is that whenever a new photo is added, it won't show up in the screen saver (obviously). That's why I'd like to set the shared photos as the source.
    Is there a simple way to do this and set the shared photos as the screen saver source??    I would even settle for doing the alternate method that I described in the last paragraph, but I can't even figure out how to do this with the new "Photos" app...
    PLEASE HELP!! Thanks in advance...
    Pete

    Pete, setting the screensaver is a matter of patience, the menus are very slow, if you just set up the system and the spotlight index has still to be recreated.
    But you should be able to it this way:
    Open the Desktop&Screensaver System preferences, select the Screensaver tab.
    In the left pane select a screensaver template for slideshows.
    In the right pane select the Source menu.
    Now wait and have a cup of coffee, while "Loading is showing"
    Then select the last item "Photo Library".
    Wait again, until your current photo libraries are shown.
    Select the Photos library,
    Select the Shared section and your shared family stream.
    Like this:
    -- Léonie

  • How do i make my screen saver the same as my desktop on my macbook pro 2012?

    how do i make my desktop the same as my screen saver on my MacBook Pro 2012? if i can't, how can i choose certain pictures to have as the desktop, instead of all of my photos?

    Hello, Hahmelodie. 
    Thank you for visiting Apple Support Communities.
    You may find this article helpful with the issue you are experiencing.
    iOS 7: If you're asked for the password to your previous Apple ID when signing out of iCloud
    http://support.apple.com/kb/TS5223
    Cheers,
    Jason H.

Maybe you are looking for

  • Finding the end of a line in a JTextArea and inserting a comma

    Hi, At the moment I am reading in a comma delimited file into a JTextArea. This part is ok I can see the file in the window correctly. The problem that I am having now is that I want to add a comma to the end of each line in the JTextArea. Does anyon

  • Where can I download Adobe Acrobat 10 Standard

    Where do I go to D/L Adobe Acrobat X Standard?

  • Type X problem in upgradation from 4.6c to ECC6.0.

    DATA:    BEGIN OF tfile OCCURS 0,                rec(2500)  TYPE c,              END OF tfile. DATA:    BEGIN OF trans OCCURS 0,            x     TYPE x VALUE '00',            c_00  TYPE c VALUE ' ',            soh   TYPE x VALUE '01',            c_0

  • Anyone help the condition type problem

    Hi, My requirement is if ZFI6 having values then it will display the ZFI6value no need no activate ZFI4 and ZFI3. if ZFI6 having no values ZFI4 having value then it display ZFI4 only no need no activate ZFI3 and ZFI6. if ZFI6 having ZERO then ZFI4 ha

  • -1074130544 The session handle is not valid.

    I am using LabView 2011 on Win7. I am trying to work my way through the "Verification Procedure" part of the "NI PXI-4071 Calibration Procedure".  Step 3 of the Verification Procedure states "Call the niDMM Reset VI." and displays Figure 1. The Devic