Patches item #3587404, was opened at 2012-11-14 22:29 Message generated for change (Comment added) made by millerpuckette You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3587404...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: puredata Group: None
Status: Pending Resolution: Accepted
Priority: 5 Private: No Submitted By: IOhannes m zmölnig (zmoelnig) Assigned to: Nobody/Anonymous (nobody) Summary: ability to start multiple pd-guis
Initial Comment: starting with Pd-0.43, pd-gui checks whether it is already running and tries to reconnect to the existing one.
while this is ok in some situations, it is an issue in other situations: - when starting multiple instances of Pd on different desktops (i'm using the xfce window manager), the new instance will automatically focus the desktop of the already-running instance, which makes it difficult to separate those instances again (assuming that each instance has a number of windows open on startup) - when using pd-gui to connect to a remote pd-core (while another instance of Pd is running on the same machines) is practically prohibited by this behaviour
it would be great if one could turn of this feature (at least when starting from the cmdline; and esp. when a <remotehost>:<remotport> is given...currently there is onl a check for remotport>5400 (when starting without <remotehost>)
----------------------------------------------------------------------
Comment By: Miller Puckette (millerpuckette)
Date: 2013-01-03 14:26
Message: This seems to work for me... I wish it were a bit less complex but I don't see how to simplify it :)
----------------------------------------------------------------------
Comment By: IOhannes m zmölnig (zmoelnig) Date: 2012-12-18 11:40
Message: updated the patch.
these are the tests i performed to check for compliance and bugfixes in relation to the old implementation (as found in current git/master):
+ start "pd" -> pd+gui starts up
+ start "pd abs1.pd" -> pd+gui starts up with abs1 loaded
+ start "pd-gui" -> pd+gui starts up
+ start "pd-gui abs1.pd" -> pd+gui starts up with abs1 loaded
+ start 2 instances of "pd" -> 2 guis pop-up (thus: 2* pd+gui) -> when starting on separate desktops, each pd will stay on the desktop it was started at (BUGFIX)
+ start 2 instances of "pd-gui" -> the 2nd pd-gui exits after 3 seconds
+ start "pd", then "pd-gui" -> the pd-gui exits after 3 seconds
+ start "pd", then "pd-gui", then "pd-gui" -> both pd-gui's exit after 3 seconds
+ start "pd-gui", then "pd" -> 2 instances of pd+gui start up
+ start "pd abs1.pd" and then "pd abs2.pd" -> 2 guis pop-up (2* pd+gui), one with abs1.pd, the other with "abs2.pd" -> when starting on separate desktops, each pd will stay on the desktop it was started at (BUGFIX)
+ start "pd-gui abs1.pd" and then "pd-gui abs2.pd" -> the 2nd pd-gui quits after 3 seconds, but abs2 gets loaded into the 1st instance -> focus is moved to the desktop of the 1st pd-gui
+ start "pd abs1.pd" and then "pd-gui abs2.pd" -> the 2nd pd-gui quits after 3 seconds, but abs2 gets loaded into the 1st instance -> focus is moved to the desktop of the 1st pd-gui
+ start "pd-gui abs1.pd" and then "pd abs2.pd", and then "pd-gui abs3.pd" -> 2 guis pop-up (2* pd+gui), one with "abs1.pd"+"abs3.pd", the other with "abs2.pd" -> when starting on separate desktops, the 1st 2 Pds will stay on separate desktops, when starting the last pd-gui, it will switch to desktop#1 to display abs3.pd (BUGFIX)
+ start "pd abs1.pd" and then "pd-gui abs2.pd" and then "pd-gui abs3.pd" -> only one instance of Pd gets loaded, ending up with all 3 abs -> when starting on separate desktops, all 3 abstractions will end up on desktop#1
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave) Date: 2012-12-17 09:37
Message: I don't think that's a good enough test. The one you removed is much stricter: $argc == 1 When pd starts pd-gui, it only sends one arg: the port number. If you want this to affect only remote connections, shouldn't you make the test based on ::host?
----------------------------------------------------------------------
Comment By: IOhannes m zmölnig (zmoelnig) Date: 2012-12-17 08:37
Message: attached is a patch (against todays git/master) that doesn't try to connect to a running instance if the user provided a remoteport to connect to.
it re-uses the logic already implemented in parse_args().
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave) Date: 2012-12-14 20:25
Message: Since you are the master of remote pd-guis, IOhannes, I'm assigning this to you. It makes sense to me to base it on the host:port arg.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3587404...