Page 1 of 1

Multiple Instances of RetroShare doesn't work anymore

PostPosted: Thu Apr 28, 2016 2:24 pm
by isaaclw
I have two configuration Directories so that I can run multiple instances of RetroShare:

$ cat ./retroshare-user1.sh
/usr/bin/RetroShare06 -c /home/user/.retroshare-user1/

$ cat ./retroshare-user2.sh
/usr/bin/RetroShare06 -c /home/user/.retroshare-user2/


When I run the second instance, it notes that the first is already open:
Rshare::Rshare waitForConnected to other instance.
Rshare::Rshare Connection etablished. Waiting for disconnection.
Memory still in use at end of program: 0 bytes.

And the second instance never opens.

This changed within the last six months, when I was able to have both instances of RetroShare open.

Re: Multiple Instances of RetroShare doesn't work anymore

PostPosted: Thu Apr 28, 2016 7:49 pm
by Distro
I believe this functionnality was broken on April 7 with this commit: https://github.com/RetroShare/RetroShar ... 6699e2e798
There was a fix the day after ( https://github.com/RetroShare/RetroShar ... 86d11eecc0 ) but it only works if you launch RS without any argument.

Re: Multiple Instances of RetroShare doesn't work anymore

PostPosted: Thu Apr 28, 2016 7:56 pm
by isaaclw
Distro wrote:There was a fix the day after ( https://github.com/RetroShare/RetroShar ... 86d11eecc0 ) but it only works if you launch RS without any argument.


Is there any way to specify the config folder other than an arguement? (like environmental variables)

Re: Multiple Instances of RetroShare doesn't work anymore

PostPosted: Thu Apr 28, 2016 11:39 pm
by Distro
I have two workarounds in mind (untested):
- change the $HOME variable, for example: HOME=/home/user/.retrosharehome1/ RetroShare06
- use the -c option only for the first RS instance that you launch, and let the second one use the normal ~/.retroshare/ directory.

The proper solution would be to change the source code so it uses "-u" or some other letter to prefix the external links, and refuse to launch a second instance only if "-u" is used, instead of if any argument is used as it is now…

Re: Multiple Instances of RetroShare doesn't work anymore

PostPosted: Mon May 09, 2016 3:51 pm
by isaaclw
I have this script:
Code: Select all
export HOME=/home/user/user1
/usr/bin/RetroShare06 --minimized --auto-login


On trying to run the second instance I get this error:
Code: Select all
...
Xlib:  extension "RANDR" missing on display ":20.0".
Qt: Session management error: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
Rshare::Rshare waitForConnected to other instance.
Rshare::Rshare Connection etablished. Waiting for disconnection.
Memory still in use at end of program: 0 bytes.


I should note that I had to set up a link to XAuthority:
Code: Select all
~$ cd /home/user/user1
~/user1$ ln -s ../.Xauthority
~/user2$ cd ../user2
~/user2$ ln -s ../.Xauthority
~/user2$ ls -al /home/user/user*/
/home/user/user1:
total 16
drwxrwxr-x  4 user user 4096 May  9 11:14 .
drwxr-xr-x 27 user user 4096 May  9 11:32 ..
drwxrwxr-x  2 user user 4096 May  9 11:14 .config
drwxrwxr-x  5 user user 4096 Sep  9  2015 .retroshare
lrwxrwxrwx  1 user user   14 May  9 11:13 .Xauthority -> ../.Xauthority

/home/user/user2:
total 16
drwxrwxr-x  4 user user 4096 May  9 11:14 .
drwxr-xr-x 27 user user 4096 May  9 11:32 ..
drwxrwxr-x  2 user user 4096 May  9 11:14 .config
drwxrwxr-x  5 user user 4096 Aug 27  2015 .retroshare
lrwxrwxrwx  1 user user   14 May  9 11:13 .Xauthority -> ../.Xauthority


Any ideas how to get around the error: "Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed"

Re: Multiple Instances of RetroShare doesn't work anymore

PostPosted: Mon May 09, 2016 5:12 pm
by Distro
It’s too bad nobody else replied. You could also disable the cryptic "use local server to get new argument" feature in the options. Then you should be able to launch multiple instances normaly.

Re: Multiple Instances of RetroShare doesn't work anymore

PostPosted: Mon May 09, 2016 5:49 pm
by isaaclw
Great! That did it. Thanks!