11

I am using 2 screens, and wish to invert the colors on both of them without using compiz (I'm using gnome shell).

I can use xcalib -invert -alter as suggested in this question, but it only inverts one of the screens. Is there a way to specify both of them, or even which of them, using xcalib? Is there another way?

With xcalib, you can specify which screen to alter with the -d (-display) or -s (-screen) options, but alas, X seems to be aware of just one screen: when I use the w command I only see one (the usual ":0")

ps: this question was originally posted by k0pernikus as a comment here.

---edit---

This is the output of xrandr:

Screen 0: minimum 320 x 200, current 3200 x 1200, maximum 8192 x 8192
VGA-0 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm
1280x1024 60.0*+ 75.0
1280x960 60.0
1152x864 75.0
1024x768 75.1 70.1 60.0
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 72.8 75.0 66.7 60.0
720x400 70.1
DVI-0 connected 1920x1200+1280+0 (normal left inverted right x axis y axis) 518mm x 324mm
1920x1200 60.0*+
1600x1200 60.0
1280x1024 75.0 60.0
1280x960 60.0
1152x864 75.0
1024x768 75.1 70.1 60.0
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 72.8 75.0 66.7 60.0
720x400 70.1

I can use -s DVI-0 or -s VGA-0, but they do the same as -s :0

3
  • 2
    I have the same problem. There are some commands in my ticket that may help you add some information to your ticket. Lets see if we have a similar setup: unix.stackexchange.com/questions/118477/…
    – jcalfee314
    Mar 10, 2014 at 15:46
  • 2
    I have a work-around... It got more complicated with Ubuntu 14.04. Basically, I invert once (one screen) using -s 0 the I unplug and re-plug my HDMI cable. Then I invert again (same screen same command).. Finally I invert -s HDMI-0.. and both monitors are inverted. I can then toggle one of them with the -s 0. So, aside from this being so ridiculous this holds me over.
    – jcalfee314
    Aug 26, 2014 at 13:59
  • lol! I once collected a data set from a dynamic website by putting a weight on the 'page-down' key, waiting till memory was all filled up, then hitting ctrl-s (very carefully - the machine was almost completely unresponsive!)
    – drevicko
    Aug 26, 2014 at 15:40

3 Answers 3

4

No.

Note that as of date of last testing (2014, xcalib version 0.8) xcalib has not been able to invert the colors on all monitors in a multi-monitor setup, because all monitors are presented by the X11 server as a single screen. Thus this limitation is coming from the X11 server. xrandr-invert-colors does not have this limitation, because it uses XRandR API, which correctly handles all attached monitors.

from here: https://github.com/zoltanp/xrandr-invert-colors

1
  • I have searched for this comment for a very long time. xcalib doesn't work on one of my monitors, so I was suffering along trying to put light-on-dark windows only on that monitor, etc. Thank you so much for this suggestion! I have no idea how I haven't seen it long ago. Dec 9, 2019 at 19:02
1

The display ids in X follow the form :<screen>.<display>. Contrary to intuition, all the monitors in a multiple-monitor setup share a <screen>, but have varying <display>. The screen "first" in the setup is :0.0, and others are :0.1, :0.2, etc. The final command is xcalib -invert -alter -display :0.1

13
  • nice try, but on :0.0 is recognized (same screen as :0), the others I tried all said something like Error - Can't open display :0.1
    – drevicko
    Apr 17, 2014 at 1:52
  • 1
    'Can't open display' ... that's it! Gnome is doing somthing these tools don't expect!
    – drevicko
    Apr 17, 2014 at 8:34
  • 1
    No, gnome isn't the problem. Gnome is a window manager, whereas X is the backend for everything going to the screen.
    – user269370
    Apr 17, 2014 at 12:59
  • 2
    @IHeartAndroid: No, we didn't. You seem to be the third person (here) to have the issue, so it may be ready for a launchpad bug report.
    – user269370
    Aug 16, 2014 at 13:49
  • 1
    any updates on this issue? I am also interested in a solution to invert multiple screens (built-in plus dp-connected) running xcalib 0.9 on manjaro. ---- after writing this, I found the answer of @python which suggests to use xrandr-invert-colors as an alternative to xcalib. it works fine
    – mcnesium
    Nov 15, 2016 at 12:01
0

xcalib's -screen parameter takes the zero based integer index of the screen, ie, in your case 0 for VGA-0 and 1 for DVI-0.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .