#2523 closed task (worksforme)
attach to existing server instead of trying to start another one on the same display
Reported by: | Antoine Martin | Owned by: | stdedos |
---|---|---|---|
Priority: | major | Milestone: | 4.0 |
Component: | core | Version: | 3.0.x |
Keywords: | Cc: |
Description (last modified by )
See im writing a frontend for Xpra that will use ssh to connect... and xpra upgrade-or-start --use-display=auto.
Make it possible to start a new session if one does not exist, otherwise upgrade the existing one.
Also adding use-display=auto
since the display may have been left behind by a server crash.
Change History (11)
comment:1 Changed 2 years ago by
Description: | modified (diff) |
---|---|
Status: | new → assigned |
comment:2 Changed 2 years ago by
comment:5 Changed 2 years ago by
To get it right: This requires a v4.0 server?
Yes.
And for remote starts via ssh, this is likely to require a v4 client too.
We'll see once that part is implemented.
comment:6 follow-up: 7 Changed 2 years ago by
Owner: | changed from Antoine Martin to stdedos |
---|---|
Status: | assigned → new |
Summary: | upgrade-or-start → upgrade-or-start: new --use-existing=yes|no|auto option |
Done using a new --use-existing=yes|no|auto
flag in r26091.
Usage examples:
xpra start ssh://host/10 --start=xterm --use-existing=yes
Can be repeated any number of times, only the first one will start new server.
xpra shadow ssh://host/ --use-existing=yes
If a server exists it is re-used and the connection succeeds.
EDIT: this syntax is now invalid, see comment:8.
Note: --use-existing=yes
will be passed on to the server via the ssh command, if that server is a v3.0 or older then it won't know about this option and the whole thing will fail.
@stdedos: I think you will like this one.
comment:7 Changed 2 years ago by
Replying to Antoine Martin:
@stdedos: I think you will like this one.
I like this one more 😛:
Note:
--use-existing=yes
will be passed to the server via the ssh command, if that server is a v3.0 or older then it won't know about this option and the whole thing will fail.
comment:8 Changed 2 years ago by
Updates:
- r26096 don't overwrite an existing server logfile until we've checked that the vfb has actually started
- r26097 + r26099 refactoring
- r26098 shortcut and run the client if we find the local server already exists
- r26100 re-use
attach
- r26101 minor fixup
Ignore comment:6, I found a way to make it work just by overloading --attach=yes
.
The --use-existing
option has been removed, the benefit is that this will also degrade well with 3.x servers.
It is now even easier:
xpra start ssh://localhost/3 --start=xterm
Locally:
xpra start :3 --start=xterm --attach=yes
comment:9 Changed 2 years ago by
Summary: | upgrade-or-start: new --use-existing=yes|no|auto option → attach to existing server instead of trying to start another one on the same display |
---|
comment:10 Changed 2 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:11 Changed 16 months ago by
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2523
r24791 adds
use-display=auto