Is there a simple command to get all the display numbers (and only the display numbers) connected to the computer? The use case is that I'd like to have separate colour profiles ~/.color/icc/${display}.icc for each display $display, and I'd like to load each one which is available during X startup using /usr/bin/dispwin -d ${display} ~/.color/icc/${display}.icc. Current .xprofile code:

if [ -f "$monitor_color_profile" ]
    /usr/bin/dispwin "$monitor_color_profile"
unset monitor_color_profile

I'm already using xrandr to get display sizes.

  • What does the input look like (in .xprofile)? – jasonwryan Dec 27 '14 at 21:47
  • I misunderstood: disregard... – jasonwryan Dec 27 '14 at 22:26
  • It's deep, man, but xauth list looks promising... I dunno if they'll all be there though, or if they must all be active. But it prints a list. There's also some XDMCP stuff that could probably do it, but that's all disabled by default. Maybe have a look in man Xsecurity - I haven't looked at it but the two man pages with useful information in which I did look both point there. Oh, and, if you're really lucky, you can get it with xdotool search *(something)*... – mikeserv Dec 27 '14 at 23:46
  • I don't understand what you're trying to do here. Why would you want to affect anything but the display that X is starting on in your X session startup script? – Gilles 'SO- stop being evil' Dec 28 '14 at 17:13
  • @Gilles: I have one or more displays per computer. Each display may or may not have a corresponding colour profile. I want to assign the colour profiles which exist to the corresponding display. – l0b0 Dec 28 '14 at 20:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.