tags:

views:

48

answers:

2

The book "X Power Tools" has a chapter "Display Specifications", where it states:

Since X clients can connect to a display anywhere on the network, it is necessary to have some way of specifying the display to be used. This is done using a display specification (or displayspec).

A displayspec takes this form:

      host:display[.screen]

How do you use the specifications in your projects? Can anyone connect to your screen if your host, display and screen are known? How can you protect it or share it if many people are working on the same programming project?

+1  A: 

Normally, no. Most X Servers will not, by default, accept connections from anything but localhost. The easiest way around this if you need it is to ssh into the box you want to run apps on with X Tunneling enabled. The apps get a valid DISPLAY setting that appears to be local to the X Server, so it all works.

Using X Window display spec in applications generally revolve around looking for DISPLAY in the environment and handing it to the X Client library. You don't have to do anything with it. In fact, modern X Client libraries are probably capable of fishing it out of the environment itself.

staticsan