How do you set system display color profiles in Xubuntu and Lubuntu?

60,453

Solution 1

This is a good question, as Xubuntu and Lubuntu don't have the same system settings > color menu that the standard Ubuntu has, and installing gnome-color-manager does not allow you to set the profiles in a Xubuntu or Xfce session, as you you can only use that utility properly when running a gnome session, as it depends on gnome-settings-daemon and gnome-control-center. This fact is clear from the useful diagram presented here in this article.

System Tools

However, on Xubuntu and Lubuntu, the colord package is still automatically installed and takes care of color management, and you can access it on the command-line using colormgr. You can query your devices such as printers and scanners by using command-line switches such as colormgr get-devices, which are delineated at the official site.

However, while colormgr get-devices will list all the automatically color-managed devices on your system, it will not list display devices on xfce.

On xfce, colormgr get-devices-by-kind display will not work and you will not be able to set the icc profile for the display on the command-line, but only by using tools such as xicc or xcalib (see further below). This is explained here by Richard Hughes:

XFCE has no session component for colord. You need to either run gnome-settings-daemon (which has a color plugin), kded with colord-kde installed, or write something lightweight for XFCE.

Colord only detects system devices like scanners and webcams, and then CUPS registers printers. It has no access to the session, and relies on a session component to talk to X and register devices.


In a gnome or kde session (which you could be running on Xubuntu) you should be able to use colormgr to enter colormgr get-devices-by-kind display and set the icc profile for the display manually, so for completeness I present this method.

You first have to add your profiles to ~/.local/share/icc and run colormgr get-profiles to list them, and then choose the icc profile, such as

/org/freedesktop/ColorManager/profiles/icc_86894053ff74b24d0c304fc3bd0e9c76

Now add it to the desired device (this time it is the default display) with

colormgr device-add-profile /org/freedesktop/ColorManager/devices/xrandr_default /org/freedesktop/ColorManager/profiles/icc_86894053ff74b24d0c304fc3bd0e9c76

Then you can make it default with

colormgr device-make-profile-default /org/freedesktop/ColorManager/devices/xrandr_default /org/freedesktop/ColorManager/profiles/icc_86894053ff74b24d0c304fc3bd0e9c76

Other useful Utilities

Note: Custom icc profiles should go in /home/$USER/.local/share/icc; the system directory is /usr/share/color/icc.

It is possible to use tools such as xicc or xcalib if you want to setup a specific icc profile on Xubuntu or Lubuntu. All you need do is point either of these tools at your icc profile and place that command in startup:

xicc /location/of/profile

or with xcalib you can specify gamma correction as well using

xcalib -gc 1.8 /location/of/profile

However, as the question below shows, you may need to delay the execution of the command so the system does not override your choice:

Alternatively, you may want to use xicc, as the profiles set with that application are designed to be picked up by certain applications such as Gimp- this is exactly what you refer to in your question, and this program is probably what you were thinking of. To load a profile, just run xicc /location/of/profile; you can specify the display if necessary.

The package notes for xiccexplain that

This utility lets you set an ICC colour profile for an X display, so that applications can use it to display colour calibrated images. Applications have to specifically look for this atom but several applications such as Gimp and Krita already do.

Alternatively, you can usually set profiles explicitly in applications such as the Gimp (see screenshot below) and other programs. This may be necessary if you are working with RAW images that may demand a specific colorspace.

enter image description here

Solution 2

As an alternative, there is an excellent german howto all necessary things manually: http://wiki.ubuntuusers.de/Monitor_profilieren_mit_ArgyllCMS

Solution 3

I've just tried to work through this on Lubuntu 17.04 so this is how it worked for me. My Lubuntu system is on an old Dell laptop primarily used for emails and internet browsing with Firefox.

The first priority was to get Firefox colour managed. Fortunately it can be done in the application alone. Navigate a Firefox browser window to

about:config

and after the warning page search for

color_man

this will list the colour management properties for Firefox. Set display_profile to the location of your icc profile. It should be located in your ~/.local/share/icc/ directory ie

/home/user/.local/share/icc/my_screen_profile.icc

If no profile is set here Firefox will try to use the system profile, but we've got none set yet. Se enablev4 to

true

to allow v4 profiles. Set mode to

1

where 0 = disable colour management, 1 = enable for all rendered graphics, 2 = enable for profile tagged images only. Set rendering_intent to

0

where 0 = perceptual, 1 relative colormetric, 2 = saturation,3 = absolute colormetric. Restart Firefox and you are done. Test your browser by going to color.org. There is one problem here though. Whilst the browser is colour managed, the pdf preview isn't. You can check this out with the pdf version. If you send the file to the default pdf viewer Evince Document Viewer 3.24.0 it is rendered correctly though.

Firefox settings taken from NTown Productions

Although this is probably adequate for what I need, this wasn't he solution I was after so further research and a slow Sunday led me to the following which sets up colour management for the system.

Login in to synaptic and install

colord

and

xiccd

If I was doing this first, without having set up Firefox I can open a terminal (ctrl+alt+t) and use colormgr to import my display profile from any location into ~/.local/share/icc/ like this

colormgr import-profile /home/user/Downloads/my_screen_profile.icc

Be careful with filenames. I had problems with white space in the filenames I created making the profiles with Argyll / DisplayCAL. It seemed best to keep the filenames short and simple. For some reason I have to run this command more than once. The first run copied the file into my icc directory, the second run actually imports the file into the colord system and reports back with a summary of the profile including meta and the profiles "object path". Next we can check that xiccd has allowed colord to interact with the display with the command

colormgr get-devices-by-kind display

This returns a summary which includes the display device's "object path" required for adding the profile with the command

colormgr device-add-profile "display device object path" "profile object path"

The object paths are long so I used shift+ctrl+c to copy and shift+ctrl+v to paste in my terminal window. If you run

colormgr get-devices-by-kind display

again you should see your profile in position 1) making it the default profile. If it isn't or you want to change the default use

colormgr device-make-profile-default "display device object path" "profile object path"

and removed with

colormgr delete-profile "display device object path" "profile object path"

Other options can be found from

colormgr --help

To test this I used this method rawpedia and the extracticc command from the argyll package on the jpg with the mixed up sRGB profile on the color.org page, then added this to my display in the same way as above. I then blanked out the display_profile setting in Firefox prompting it to use the system profile on restart. The browser now displayed sGBR ie red for green and vice versa. Other references in addition to the answer above by user76204

ArchWiki

pcode

All offer similar advice but did not quite work on my system.

Note. The default image viewer in Lubuntu 17.04 is GPicView which is not colour managed, so use synaptic to swap it for eog or eye of gnome image viewer.

Share:
60,453

Related videos on Youtube

jarno
Author by

jarno

I use and contribute to GNU/Linux operating systems, mainly Ubuntu based ones. I usually use Xfce as desktop environment. You can thank me at https://www.buymeacoffee.com/noacidic

Updated on September 18, 2022

Comments

  • jarno
    jarno over 1 year

    Some applications, such as Gimp, Geeqie and Rawstudio claim to be able to use system color profile in their color management, but how do you setup such a profile? How do you see, if such a profile has been set, and if it has been set, how do you see which profile is used? I don't see how to do it in Lubuntu and Xubuntu.

    • unhammer
      unhammer almost 9 years
      You can now use xiccd to avoid the need for any Gnome/KDE/Unity dependencies when using colord; askubuntu.com/q/427821/25639 explains how to install it.
  • jarno
    jarno over 11 years
    Thank you for diverse answer. As for xicc, I wonder what kind of "atom" do they mean. Is it just the system monitor profile option that is displayed in the screenshot?
  • jarno
    jarno over 11 years
    I get no output for colormgr get-devices-by-kind display. I guess that indicates that system display profile is undefined.
  • Nick
    Nick over 11 years
    @jarno see my edit re colormgr on xfce systems.
  • jarno
    jarno over 11 years
    It seems to me that xcalib and xicc are not alternatives to each other, but they complement each other: xcalib sets X server gamma ramp according to data that may be included in the provided ICC profile, and that setting has effect regardless of applications, whereas xicc sets system display profile that may or may not be applied by applications.
  • jarno
    jarno over 11 years
    It might be difficult to apply different settings for different monitors, if you use extended desktop: In my setup xcalib changed settings for the integrated monitor of my notebook only and I did not find a way to set calibration for an external monitor, when extended desktop is in use. I didn't test xicc in this respect, but I guess it is the same.
  • Nick
    Nick over 11 years
    @jarno That's an interesting point, and it would make a good, separate question to ask, as you did not specify this factor in the original question.
  • unhammer
    unhammer about 11 years
    jarno, see darktable.org/2013/05/display-color-management-in-darktable So there are two parts to a profile, the vcgt (whole-screen gamma+whitepoint) and "the rest" (which individual applications use, and is set in the _ICC_PROFILE atom – check if set with xprop -display :0.0 -len 14 -root _ICC_PROFILE)
  • Stéphane Gourichon
    Stéphane Gourichon over 10 years
    Be careful about colormgr. I tried tools mentioned here on Xubuntu 13.10. After I played with colormgr device-add-profile /path/to/device /path/to/randomprofile not only could I not see any change, but I got gnome-settings-daemon permanently broken for all users on the machine. Launching it would crash immediately with color-plugin:ERROR:gsd-color-manager.c:905:gcm_session_devic‌​e_assign_profile_con‌​nect_cb: assertion failed: (filename != NULL) .
  • Stéphane Gourichon
    Stéphane Gourichon over 10 years
    I could fix the permanently broken gnome-settings-daemon problem by killing colord and moving away /var/lib/colord/mapping.db. That file is a SQLite3 database where colormgr has colord record device-to-profile associations. Hope this may help similar cases.
  • steffen
    steffen over 5 years
    so can I start a Gnome session, calibrate, save the calibration, and then have it load and work in a xfce (or other) session?