| 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. |
| | 6 | Some people may want to edit preferences locally, modify preferences on a single host, or hardwire the host venue. |
| | 7 | To accommodate these requirements, BOINC lets you create a 'preferences override file'. |
| | 8 | This file is read by the core client after it reads the preferences from the server, |
| | 9 | and it overrides those preferences. |
| 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. |
| | 54 | If you write a program for editing preferences locally, |
| | 55 | you'll want to be able to tell a running core client to reread the preferences override file. |
| | 56 | You can do this using the [GuiRpc#function-read_global_prefs_override read_global_prefs_override()] GUI RPC, |
| | 57 | or run [BoincCmd boinc_cmd] with the `--read_global_prefs_override` option. |