Opened 8 years ago

Closed 7 years ago

#171 closed enhancement (fixed)

"winswitch attach"

Reported by: pmarek Owned by: Antoine Martin
Priority: major Milestone: 0.12
Component: Client Keywords:
Cc:

Description

It would be nice if winswitch could be attached to a server via a shell command, similar to "xpra attach".

This is related to #168, too.

Thanks a lot.

Change History (6)

comment:1 Changed 8 years ago by pmarek

Perhaps there should be an option to see which applications/sessions are running there - in some format that can be easily parsed, and another option to specify which application/session should now be relayed to the client.

After all, the same is possible via the GUI now ...

Hmmm, how about a dbus interface? Would be standardized and easily useable from the shell, too.

comment:2 Changed 7 years ago by Antoine Martin

Milestone: 0.12
Owner: changed from Antoine Martin to Antoine Martin
Status: newaccepted

Not sure about the dbus option... Probably more complicated to implement.
It should be fairly easy to do provide a command line interface using code similar to server_monitor.

comment:3 Changed 7 years ago by Antoine Martin

Actually, I had forgotten about it but the feature already exists: simply double click on a server configuration file and it should fire up a new connection to that server.
For this to work, you will need to have the file mapping set correctly for the .wsw extension - this should already be the case with the packages we provide for Unixes and ms-windows, but not for mac-os-x.

You may also fire it manually like so (still using the file-mapping - and using one of my own configuration file name):

xdg-open ${HOME}/.winswitch/client/servers/TestServer1-8796762710268.wsw

Or directly (without relying on the file-mapping - if the above does not work):

winswitch_applet --open_server_config=${HOME}/.winswitch/client/servers/TestServer1-8796762710268.wsw

(note: it will not start a new applet, it will find one is already started and tell it what to do - r4485 improves the error message when this fails)

I will re-use the same code to make a slightly more user-friendly command line interface. A simple and very basic server_cli.py is in r4484, the client_cli.py will follow shortly.

comment:4 Changed 7 years ago by pmarek

Thank you, that works fine!

Now I can even build an SSH tunnel beforehand, and let winswitch connect to the remote server ...

comment:5 Changed 7 years ago by pmarek

Well, there's one small bug: connecting via this CLI leaves the applet in a state where the established connection is not seen - the server still has the "connect" menu option, although it _is_ now connected!

comment:6 Changed 7 years ago by Antoine Martin

Resolution: fixed
Status: acceptedclosed

works-for-me in v0.12.10 (probably since r4778)

Note: See TracTickets for help on using tickets.