How do I get a list of current X display names?
Apart from being a useful thing to know, I want this so that (hopefully!) I can use xcalib -invert -alter
as suggested in this question to invert the second of two screens on my computer.
How do I get a list of current X display names?
Apart from being a useful thing to know, I want this so that (hopefully!) I can use xcalib -invert -alter
as suggested in this question to invert the second of two screens on my computer.
Yeah, that simple. That's an expanded version of
who
which shows who is logged in, and where they're connected from. That includes graphical sessions and that will show you all the current X displays, amongst other delicious data.Here's what I see:
You can file that down with various flags (try
-hs
) and then you canawk
/grep
away at that if you need to automate. Consider piping the resulting list throughsort -u
to get unique display strings. Something like this: