> I'm new to LXDE and I've found a strange behavior with the DISPLAY
> environment variable.
>
> On my system, when I run lxterminal from lxpanel and type "echo
> $DISPLAY", I get ":0".
> But, if I run lxterminal from PCManFm and type "echo $DISPLAY", I get
> ":0.0".
>
> As a result, lxterminal is not limited to a single process as it should
> be, there is two
> different sockets created in /tmp
This is true, but in this specific case, the two process owners are the
initial lxterminal and the PCManFM process which spawned the other
lxterminal instance. Since both are 'supposed' to exist, this is a
'quirk' rather than a bug.
Here's what the X man (7) page[1] says about the variable contents:
<quote>
>From the user's perspective, every X server has a display name of the form:
hostname:displaynumber.screennumber
This information is used by the application to determine how it should
connect to the server and which screen it should use by default (on
displays with multiple monitors):
...
screennumber
Some displays share a single keyboard and pointer among two or more
monitors. Since each monitor has its own set of windows, each screen is
assigned a screen number (beginning at 0) when the X server for that
display is started. If the screen number is not given, screen 0 will be
used.
</quote>
In other words, values ":0" and ":0.0" are equivalent when running on
screen 0. This might become an issue if one tries to run lxterminal on
screen 1 (":0.1") and the DISPLAY variable still contains ":0" (in that
case, lxterminal will simply be started on screen 0).
>From what I can gather your patch does not seem to address that issue,
as it only seems to replace ":N.M" with "N" in the socket name -
discarding the screen number.
Having said that (and I hate to do this without providing actual code),
a better solution might be to actually do something similar to what
PCManFM does: Get the current display, get current screen, get current
screen id and incorporate that into the name of the socket.
Hope this helps.
P
[1] - http://www.x.org/archive/X11R6.8.1/doc/X.7.html#sect4
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Lxde-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxde-list