Re: Installing display profiles/interfacing with gcm



Am 16.06.2010 12:41, schrieb Richard Hughes:
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.

Ok.

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.

Hmm, sounds like I'll probably want to avoid it, then ;) Maybe as a "last resort".

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".

Ah, ok. So then all the naming information is available through the EDID? That's fine with me.

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.

Agreed on your points. I think the format of the config file is fine, although addition of the EDID hash key sounds like a nice idea.

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.

That would be nice, then I could let GCM do "the right thing" for me. Dep on GCM is not a problem I think, as I'm probably going to use Python's ctypes then, which can tell me if the library is installed and I can also use it to wrap the C function call.

Thanks for the infos so far!

Comments please. :-)

Richard.
--
Florian Höch
http://hoech.net



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