4

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:

monitor_color_profile="${HOME}/.color/icc/monitor.icc"
if [ -f "$monitor_color_profile" ]
then
    /usr/bin/dispwin "$monitor_color_profile"
fi
unset monitor_color_profile

I'm already using xrandr to get display sizes.

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
l0b0
  • 50,672
  • 41
  • 197
  • 360
  • 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
  • @l0b0 Ah, are you trying to obtain the output names (`VGA1`, `HDMI2`, …), and not the display numbers (`:0`, `:1`, …)? That would make more sense. Since you know about `xrandr` already, why don't you parse its output? – Gilles 'SO- stop being evil' Dec 28 '14 at 21:56
  • @Gilles I need whatever is used as input to `dispwin`, which `dispwin` calls "displays". I doubt it makes sense to tie a colour profile to a cable connector... – l0b0 Dec 28 '14 at 22:00
  • @l0b0 It doesn't make sense to tie a color profile to an X display number, since these are assigned dynamically! I'm not familiar with `dispwin`; from reading the [manual](http://www.argyllcms.com/doc/dispwin.html) it appears that the argument to `-d` is not an X11 display number (unlike the argument to `-display`), but some other concept that's specific to this software. What does `dispcal --` show? – Gilles 'SO- stop being evil' Dec 28 '14 at 22:04
  • @Gilles It just shows the program usage info. – l0b0 Dec 29 '14 at 08:52

0 Answers0