How do I get the first unused X display in either Python (Don't think there's a way) or {,ba,z}sh? It could return <number>
, :<number>
, or $(hostname):<number>
).
For example:
- X session at :0, 1 returned.
- X session at :0, VNC at :1, 2 returned.
- X session at :0, QEMU at :2, 1 returned.