Changes between Version 11 and Version 12 of PrefsOverride


Ignore:
Timestamp:
Oct 6, 2008, 11:39:03 AM (16 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PrefsOverride

    v11 v12  
    11= Preferences override file =
    22
    3 By default, [GlobalPrefs global preferences] and host venue are maintained on a project server, edited via a web interface, and downloaded from the server.
     3By default, [GlobalPrefs global preferences] and host venue are maintained on a project server,
     4edited via a web interface, and downloaded from the server.
    45
    5 Some people may want to edit preferences locally, modify preferences on a single host, or hardwire the host venue. To accommodate these requirements, BOINC lets you create a 'preferences override file'. This file is read by the core client after it reads the preferences from the server, and it overrides those preferences.
     6Some people may want to edit preferences locally, modify preferences on a single host, or hardwire the host venue.
     7To accommodate these requirements, BOINC lets you create a 'preferences override file'.
     8This file is read by the core client after it reads the preferences from the server,
     9and it overrides those preferences.
    610
    7 The preferences override file is named `global_prefs_override.xml`. Its structure as follows:
     11The preferences override file is named `global_prefs_override.xml`.
     12Its structure as follows:
    813
    914{{{
    1015#!xml
    1116<global_preferences>
    12     <mod_time>%d</mod_time>
     17    [ <host_venue>X</host_venue> ]
    1318    <run_on_batteries/>
    1419    <run_if_user_active/>
     
    4752}}}
    4853
    49 {{{
    50 #!comment Where did [ <host_venue>venue</host_venue> ] come from? I've removed it since it's badly formed XML and I can't find it in the source.
    51 
    52 Look in cs_prefs.c where it says:
    53 // Read global preferences into the global_prefs structure.
    54 // 1) read the override file to get venue in case it's there
    55 // 2) read global_prefs.xml
    56 // 3) read the override file again
    57 //
    58 // This is called:
    59 // - on startup
    60 // - on completion of a scheduler or AMS RPC, if they sent prefs
    61 // - in response to read_global_prefs_override GUI RPC
    62 
    63 It's the choice of venue that is done there. As you can set GPOs for different venues.
    64 
    65     string foo;
    66 
    67     retval = read_file_string(GLOBAL_PREFS_OVERRIDE_FILE, foo);
    68     if (!retval) {
    69                 parse_str(foo.c_str(), "<host_venue>", main_host_venue, sizeof(main_host_venue));
    70         }
    71 
    72 Sadly, the log for the changeset has nothing to do with this change. Foo? I don't take this feature seriously - I'm going to treat it as deprecated.
    73 }}}
    74 
    75 
    76 NOTE: the above is updated for BOINC 5.10+; see [source:trunk/boinc/lib/prefs.C lib/prefs.C] and [source:trunk/boinc/lib/prefs.h lib/prefs.h] for more information.
    77 
    78 If you write a program for editing preferences locally, you'll want to be able to tell a running core client to reread the preferences override file. You can do this using the [GuiRpc#function-read_global_prefs_override read_global_prefs_override()] GUI RPC, or run [BoincCmd boinc_cmd] with the `--read_global_prefs_override` option.
     54If you write a program for editing preferences locally,
     55you'll want to be able to tell a running core client to reread the preferences override file.
     56You can do this using the [GuiRpc#function-read_global_prefs_override read_global_prefs_override()] GUI RPC,
     57or run [BoincCmd boinc_cmd] with the `--read_global_prefs_override` option.