| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 |
<head> |
| 4 |
<title>colord - How do I use colord?</title> |
| 5 |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> |
| 6 |
<link rel="stylesheet" href="style.css" type="text/css" media="screen"/> |
| 7 |
<link rel="shortcut icon" href="favicon.ico"/> |
| 8 |
</head> |
| 9 |
<body> |
| 10 |
|
| 11 |
<p>Back to the <a href="index.html">main page</a></p> |
| 12 |
|
| 13 |
<h1>How do I use colord?</h1> |
| 14 |
|
| 15 |
<h2>Using the command line</h2> |
| 16 |
<p> |
| 17 |
The <code>colormgr</code> text-mode program allows you to interact with |
| 18 |
colord on the command line. For example: |
| 19 |
</p> |
| 20 |
<pre> |
| 21 |
[hughsie@hughsie-work ~]$ colormgr get-devices |
| 22 |
Object Path: /org/freedesktop/ColorManager/devices/sysfs_Chicony_Electronics_Co___Ltd__Integrated_Camera |
| 23 |
Created: 1310115220 |
| 24 |
Modified: 1310115220 |
| 25 |
Kind: webcam |
| 26 |
Model: Webcam |
| 27 |
Vendor: Chicony Electronics |
| 28 |
Serial: /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0/video4linux/video0 |
| 29 |
Colorspace: rgb |
| 30 |
Device ID: sysfs-Chicony_Electronics_Co.__Ltd.-Integrated_Camera |
| 31 |
Metadata: CMS=colord |
| 32 |
|
| 33 |
Object Path: /org/freedesktop/ColorManager/devices/sane_Photosmart_B109a_m |
| 34 |
Created: 1310115222 |
| 35 |
Modified: 1310115222 |
| 36 |
Kind: scanner |
| 37 |
Model: Photosmart B109a-m |
| 38 |
Vendor: Hewlett Packard |
| 39 |
Serial: hpaio:/usb/Photosmart_B109a-m?serial=MY97J4210M05C7 |
| 40 |
Colorspace: rgb |
| 41 |
Device ID: sane-Photosmart_B109a-m |
| 42 |
Metadata: CMS=colord |
| 43 |
|
| 44 |
Object Path: /org/freedesktop/ColorManager/devices/cups_Photosmart_B109a_m |
| 45 |
Created: 1310115222 |
| 46 |
Modified: 1310115222 |
| 47 |
Kind: printer |
| 48 |
Model: Photosmart-B109a-m |
| 49 |
Vendor: Hewlett Packard |
| 50 |
Serial: hp:/usb/Photosmart_B109a-m?serial=MY97J4210M05C7 |
| 51 |
Scope: temp |
| 52 |
Colorspace: rgb |
| 53 |
Device ID: cups-Photosmart-B109a-m |
| 54 |
Profile 1: /org/freedesktop/ColorManager/profiles/GCM_HP_HP_Deskjet_d1300_Series_2010_02_25__ |
| 55 |
Profile 2: /org/freedesktop/ColorManager/profiles/Photosmart_B109a_m_RGB__ |
| 56 |
Profile 3: /org/freedesktop/ColorManager/profiles/Photosmart_B109a_m_Gray__ |
| 57 |
Metadata: CMS=colord |
| 58 |
|
| 59 |
Object Path: /org/freedesktop/ColorManager/devices/xrandr_Lenovo_Group_Limited |
| 60 |
Created: 1310115227 |
| 61 |
Modified: 1310115227 |
| 62 |
Kind: display |
| 63 |
Model: 4384BR2 |
| 64 |
Vendor: Lenovo |
| 65 |
Serial: unknown |
| 66 |
Scope: temp |
| 67 |
Colorspace: rgb |
| 68 |
Device ID: xrandr-Lenovo Group Limited |
| 69 |
Profile 1: /org/freedesktop/ColorManager/profiles/icc_b634b0aed98b073e1f1e853dde389eef |
| 70 |
Profile 2: /org/freedesktop/ColorManager/profiles/icc_e3844d7f2dd36e1878acff8d77107aa4 |
| 71 |
Profile 3: /org/freedesktop/ColorManager/profiles/icc_2304ec478dad248e0dd01ff2cc50940a |
| 72 |
Profile 4: /org/freedesktop/ColorManager/profiles/icc_d814dde3a76b05c47aa5fd16e7000639 |
| 73 |
Profile 5: /org/freedesktop/ColorManager/profiles/icc_64eb9372fae294a7cf2e4c5bd3ab9590 |
| 74 |
Profile 6: /org/freedesktop/ColorManager/profiles/icc_0f23f3fc3156fa9b2998c2ebe33ce54d |
| 75 |
Metadata: XRANDR_name=LVDS1 |
| 76 |
|
| 77 |
Object Path: /org/freedesktop/ColorManager/devices/xrandr_Hewlett_Packard_HP_LP2480zx_3CM82200KV |
| 78 |
Created: 1310115227 |
| 79 |
Modified: 1310115227 |
| 80 |
Kind: display |
| 81 |
Model: HP LP2480zx |
| 82 |
Vendor: Hewlett Packard |
| 83 |
Serial: 3CM82200KV |
| 84 |
Scope: temp |
| 85 |
Colorspace: rgb |
| 86 |
Device ID: xrandr-Hewlett Packard-HP LP2480zx-3CM82200KV |
| 87 |
Profile 1: /org/freedesktop/ColorManager/profiles/icc_d3b85708ae5843001de0801773b57246 |
| 88 |
Profile 2: /org/freedesktop/ColorManager/profiles/icc_2ab7d3493c09663df7cbfa03cd8e006f |
| 89 |
Metadata: XRANDR_name=HDMI2 |
| 90 |
</pre> |
| 91 |
<p>or</p> |
| 92 |
<pre> |
| 93 |
[hughsie@hughsie-work ~]$ colormgr --help |
| 94 |
Usage: |
| 95 |
colormgr [OPTION...] |
| 96 |
|
| 97 |
create-device Create a device |
| 98 |
create-profile Create a profile |
| 99 |
delete-device Deletes a device |
| 100 |
delete-profile Deletes a profile |
| 101 |
device-add-profile Add a profile to a device |
| 102 |
device-get-default-profile Gets the default profile for a device |
| 103 |
device-get-profile-for-qualifier Returns all the profiles that match a qualifier |
| 104 |
device-make-profile-default Makes a profile default for a device |
| 105 |
device-set-kind Sets the device kind |
| 106 |
device-set-model Sets the device model |
| 107 |
device-set-serial Sets the device serial |
| 108 |
device-set-vendor Sets the device vendor |
| 109 |
find-device Find a device |
| 110 |
find-device-by-property Find a device that has a specific property |
| 111 |
find-profile Find a profile |
| 112 |
find-profile-by-filename Find a profile by filename |
| 113 |
get-devices Gets all the color managed devices |
| 114 |
get-devices-by-kind Gets all the color managed devices of a specific kind |
| 115 |
get-profiles Gets all the available color profiles |
| 116 |
get-sensor-reading Gets a reading from a sensor |
| 117 |
get-sensors Gets all the available color sensors |
| 118 |
get-standard-space Get a standard colorspace |
| 119 |
profile-set-filename Sets the profile filename |
| 120 |
profile-set-qualifier Sets the profile qualifier |
| 121 |
sensor-lock Locks the color sensor |
| 122 |
|
| 123 |
Help Options: |
| 124 |
-h, --help Show help options |
| 125 |
|
| 126 |
</pre> |
| 127 |
|
| 128 |
<h2>Using graphical tools:</h2> |
| 129 |
<p> |
| 130 |
GNOME and KDE both provides a rich set of GTK and QT tools for |
| 131 |
automatically managing color devices and profiles. |
| 132 |
See the <a href="screenshots.html">screenshots page</a> for more details. |
| 133 |
</p> |
| 134 |
|
| 135 |
<h2>Using libcolord:</h2> |
| 136 |
<p> |
| 137 |
The <a href="gtk-doc/">libcolord gobject library</a> |
| 138 |
wraps the D-Bus interface in a nice glib-style API. |
| 139 |
This makes designing programs that use libcolord can concentrate on |
| 140 |
core functionality rather that the D-Bus and colord internals. |
| 141 |
CdClient in libcolord can be used as easily as: |
| 142 |
</p> |
| 143 |
<pre> |
| 144 |
CdClient *client; |
| 145 |
GError *error; |
| 146 |
GPtrArray *devices; |
| 147 |
client = cd_client_new (); |
| 148 |
devices = cd_client_get_devices_sync (client, cancellable, &error); |
| 149 |
g_object_unref (client); |
| 150 |
g_ptr_array_unref (devices); |
| 151 |
</pre> |
| 152 |
<p> |
| 153 |
The latest documentation for libcolord is available <a href="gtk-doc/">here</a>. |
| 154 |
</p> |
| 155 |
|
| 156 |
<h2>Using the raw D-Bus API:</h2> |
| 157 |
<p> |
| 158 |
Using the D-Bus methods and signals directly means that no glib or |
| 159 |
gobject dependency is needed. |
| 160 |
This is not difficult, although does require more code than just using |
| 161 |
libcolord. |
| 162 |
See these files for examples <a href="https://github.com/hughsie/colord/blob/master/examples/cd-dbus-create-device.c">cd-dbus-create-device.c</a> and <a href="https://github.com/hughsie/colord/blob/master/examples/cd-dbus-use-qualifier.c">cd-dbus-use-qualifier.c</a>. |
| 163 |
The latest interface description is available in the |
| 164 |
<a href="gtk-doc/ref-dbus.html">generated help</a> pages. |
| 165 |
</p> |
| 166 |
|
| 167 |
<p>Back to the <a href="index.html">main page</a></p> |
| 168 |
|
| 169 |
<p class="footer"> |
| 170 |
Copyright <a href="mailto:[email protected]">Richard Hughes 2011 - 2013</a><br/> |
| 171 |
<a href="http://validator.w3.org/check/referer">Optimized</a> |
| 172 |
for <a href="http://www.w3.org/">standards</a>. |
| 173 |
</p> |
| 174 |
|
| 175 |
</body> |
| 176 |
</html> |