Re: Installing display profiles/interfacing with gcm



On 15 June 2010 16:55, Florian Höch <lists+gnome-color-manager hoech org> wrote:
> I'm currently looking for a way to install display profiles in a similar way
> as Argyll's dispwin does. So, I'm either looking for an utility
> 'gcm-install-display-profile' <displayno> <filename.icc> that would copy the
> file, do the mapping displayno->device and write the neccessary info to
> device-profiles.conf (does gcm-install-systemwide do this?).

No, gcm-install-systemwide just installs the profiles system-wide.
It's also pretty fragile the way it works, and probably needs
rethinking in the near future.

> Or for another way to achieve what I just described (DBus?).

I think a DBus call would be okay, but it seems very specific to this
use case. GCM also stores other data with the profile entry which
would need to be formatted like the others by dispcalGUI.

> Or is it safe/recommended to write to device-profiles.conf directly?

I guess. If GCM is open at the time then it might cause problems, but
I can always add an inotify watch on the config file and reload GCM's
in-memory copy if it changes. I'm not sure this is a great idea, as
the config file has no locking, and no ABI stability.

> Then, I'd just have to figure out how to do the Argyll displayno -> GCM
> device mapping (btw, what's the $(ascii) in
> xrandr_$(vendor)_$(name)_$(ascii)_$(serial) mentioned in the GCM wiki?).

It's the ASCII text returned in the EDID, e.g. "LTN154P2-L05". I'm
fully open to changing the format of the device-profiles.conf file if
required. That could mean adding a hash=${md5_of_edid} parameter to
the display section, or it could be just making the identifier be
xrandr_${md5_of_edid} -- but then we have all the problems of writing
the junk data required to display a meaningful device icon when the
display is not attached. If the user has already run gcm-prefs and the
device was saved, and you just want to change the default, then
searching on hash= is probably the right thing to do.

Of course, the best option is probably for GCM to expose libgcm
(better names welcome) which would allow you to just call
gcm_device_save() trivially in C. It would mean a compile-time
optional dep on GCM, but it probably the most correct thing to do.

Comments please. :-)

Richard.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]