On 20 December 2012 00:53, Graeme Gill <graeme@xxxxxxxxxxxxx> wrote: > what I'd like is for the functionality to be the same, thereby > avoiding > the whole issue. Yes, 100% agreed. > What library do I dlopen(), and what function do I dlsym() and then > call to install and uninstall a profile ? Well, in colord, "importing" a profile for a device is actually 3 steps: 1. Copying the profile to the user color directory (~/.local/share/icc/) 2. Adding the profile to a device 3. Setting the profile to be the default profile on the device When 1 happens, the session framework component (gnome-settings-daemon in GNOME, colord-kde in KDE) notices the new profile appearing, and does CreateProfile() opens the file and passes the file descriptor to colord. colord reads from the FD using lcms2 and creates a DBus object and exports it on the bus. For 2 to happen, the Device.AddProfile() method is called, using the DBus object path of the profile we just created. If we add the profile using a "relation" of soft then it's a relationship we should use if the user hasn't specified anything manually. If it's a relation of "hard" then it's something the user has explicitly chosen and will override any automatic profiles (e.g. EDID profiles). A database entry is created for the profile<->device and saved with a timestamp in the database. This means that on future boots, if the device and profile appear together (in any order) then the profile is auto-assigned to the device. When the session framework component notices that the Device.Profiles property has changed it applies the VCGT of the first profile in the list. If it's a hard mapping (user choice) then we don't need to do step 3 at all. Uninstalling is either the act of calling Device.RemoveProfile() on the correct device or simply deleting the profile from ~/.local/share/icc/ -- obviously you'd want a prompt to confirm if you do the latter. So, what do you need to do. I'm assuming you don't want to hard depend on libcolord, although this is probably the sanest thing to do on Linux from my point of view. I can do two things for you if you want: * Write the ~30 lines of synchronous C (using libcolord) that imports the profile and adds the profile to the device with a hard mapping * Install a new helper that can be used like "/usr/libexec/colord-import-profile LVDS1 /tmp/profile.icc" Let me know what you want me to do, thanks. Richard.