Xpra: Ticket #2286: @client-machine@ does not function as documented

from xpra manpage:

--title=VALUE
      Sets  the  text  shown as window title.  The string supplied can make use of remote
      metadata placeholders which will be populated at runtime with the values  from  the
      remote server.  The default value used is "@title@ on @client-machine@".
      The following placeholders are defined:
      @title@
             Will be replaced by the remote window's title.
      @client-machine@
             Will be replaced by the remote server's hostname.

I interpret @client-machine@ to mean the system running the xpra controlled X11-server but it appears to be the system where the x11-application is running instead.

The setup.

Let 'X' be the "local system" running the interactive X11-server with keyboard,mouse,monitors,...

Let 'A' be a "remote system" running an xpra server on display :7 with a single xterm running on it with name/title shell@A

'B' is reachabe from A via ssh 'B' is another ubuntu 18.04lts

        $ uname -a
        Linux  4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Note: 'X', 'A', and 'B' are distinct systems.


The issue.

'X' uses xpra attach ssh://A/:7

a single xterm appears locally with name/title as expected

xpra/A:shell@A

in that xterm, the command

ssh B xterm -name shell@B

a second xterm appears locally with the name/title

xpra/B:shell@B

but the expected name/title is

xpra/A:shell@B

to verify the new window is indeed associated with xpra server on 'A' 'X' uses:

xpra detach ssh://A/:7

both xterms with names/titles xpra/A:shell@A and xpra/B:shell@B disappear 'X' uses:

xpra attach ssh://A/:7

both xterms with names/titles xpra/A:shell@A and xpra/B:shell@B re-appear

I specifically chose using

title=xpra/@client-machine@:@title@

to identify which windows are associated with different xpra controlled x11-servers. But it appears @client-machine@ is actually showing the system the x11 application is running instead. I tried the experiment with two other x11-applications, xlock & oclock, getting the exact same results as when using the xterm. I use an icon manager that shows all windows, either iconified or not, that I have configured to sort on x11 window's name/title. The the leading "xpra/@client-machine@:" would group all windows associated an xpra server.


The requested changes.

If @client-machine@ is indeed _always_ showing the system the x11-application is running upon, then

Since I did not do an all inclusive test, only using three x11-apps (xterm, oclock, and xclock): if @client-machine@ for x11-apps run on remote systems with respect to the one running the xpra server sometimes shows x11-app system and other times shows the xpra system, then make @client-machine@ consistently show one or the other _AND_ if @client-machine@ will always show the x11-app system, then add @xpra-server-machine@ from the above request.

An additional minor enhancement request. Invent a syntax that all allows a user to use the '@' character in the xpra title. For instance "\@". Thus,

title=xpra\@@client-machine@/@title@

would show xpra@A/shell@A as the name/title in above example.

And another additional enhancement request. Create another "@-string" to for the xpra server display, such as @xpra-server-display@ to get the X11 DISPLAY for that xpra server. Thus,

title=xpra\@@client-machine@@xpra-server-display@/@title@

would show xpra@A:7/shell@A as the name/title in above example.



Mon, 29 Apr 2019 17:20:36 GMT - deenoco:

Sorry about the above formatting. The bug reporting gui seems to have "reworked" all the whitespace...


Mon, 29 Apr 2019 17:23:01 GMT - deenoco: attachment set

bug-description-as-originally-formatted


Tue, 30 Apr 2019 09:17:39 GMT - Antoine Martin: owner, description changed

Sorry about the above formatting. The bug reporting gui seems to have "reworked" all the whitespace...

The wiki/WikiFormatting link is just above. (re-formatted by hand..)

The client-machine attribute comes from the window's WM_CLIENT_MACHINE property, if missing then the xpra server's hostname is used. The man page now reflects this: r22561 + r22563.

As of r22562 you can now use "@@" to get one "@" displayed.

r22564 adds @server-machine@ and @server-display@. Manual page updates in r22565. Better backwards compatibility in r22571.

@deenoco: please close if that works for you.


Thu, 16 May 2019 12:04:40 GMT - Antoine Martin: status changed; resolution set

Works for me.


Sat, 23 Jan 2021 05:47:09 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2286