Yakyak: Multiple Accounts

Created on 22 Jun 2015  路  57Comments  路  Source: yakyak/yakyak

Implement the ability to log into multiple accounts

Note: This is a game changer

enhancement pinned

Most helpful comment

Please, use reactions button to vote.

All 57 comments

This requires someone to investigate how a "standard" Google client logs into multiple accounts and keep the events and requests separate. It's on the hangupsjs level.

The other approach would be to run a separate instance of hangupsjs for each account.

and juggle a bunch of cookie stores. hm. could be done. there probably is a better way though...

the actual "logging in" to multiple accounts is likely to be straightforward. hangupsjs already contains code that does the initial oauth, followed by something called an "uberauth" (love the name), followed by a "merge session".

as I understand it oauth establishes that you are you. uberauth is something that gives the established identity access to _everything google_ https://github.com/tdryer/hangups/issues/123 which isn't really desirable but the only way we know about for now.

it wouldn't surprise me if you can uberauth into multiple accounts and then merge session them all to one single session.

the responses from google always contain "sender" information, so knowing which of multiple logins is receiving is not a problem.

each request is passing along the client.id as part of the payload, so saying which we're sending as is probably also straight forward. https://github.com/algesten/hangupsjs/blob/v0.9.1/src/client.coffee#L185

+1 Please do this.

+1 for this too

Is there any way of working around this issue for now? Like having two copies of yakyak, and just change a small parameter?

+1

+1

+1

+1

+1

+1

+1 i'd also be happy for now with some type of workaround involving two instances of yakyak

+1

+1

(+0.5 for multiple instances in the meantime!)

+1

+1!

+1

+1

Please, use reactions button to vote.

It looks like this can be done by just operating on two separate config directories.

Test:

  • Open yakyak
  • Log in
  • Close yakyak
  • Move ~/.config/yakyak to ~/.config/yakyak_old
  • Open yakyak
  • Log into different account
  • The two accounts can be alternated by swapping the directories

Use:

  • Install yakyak system wide. Log in with first account.
  • For each additional account:

    • Grab a copy of the source

    • Change the application name in package.json

    • Compile and run

    • Log into the next account.

Now you can run the system wide yakyak for one account, and a local executable for each additional account.

I don't know coffeescript; and from what I just saw I'm not a fan. I may try creating a fork for a pull request if it's needed though.

馃憤 +1!!

+1!!

Any update on this?

@ctag I couldn't find ~/.config/yakyak - has this moved in newer versions?

It should still be ~/.config/yakyak as far as I know. It may also be bound to the XDG config directory, whatever that is for your system..

+1

I use Hangouts to chat with all of my nearest and dearest, and my employer uses Google accounts for intra-office communication. I'd even be content to have two windows and just tend to them separately, so I'm going to give @ctag 's solution a shot. However, fully integrated support would be the way to go. I am a huge fan of this app otherwise! =)

+1 really need this feature as I just started a new job and now have multiple accounts!

+1

+1

Please, sir, my hangouts.

+1000

+1

For those that continue to struggle, on Windows and Linux the config file storage path can be changed via an environment variable.

On Linux the variable is: $XDG_CONFIG_HOME. On Windows it's %APPDATA%.

So create two scripts:

One that references your "default" account
/usr/bin/electron /usr/share/yakyak/app

The other that uses the environment variable to redirect the config dir elsewheres
XDG_CONFIG_HOME=/home/jboyens/.config-alt /usr/bin/electron /usr/share/yakyak/app

Windows use is left as an exercise for the reader.

This is preferable to the "rename the app in package.json". It should be relatively trivial to add a command-line flag to change the app.getPath(name) call in main.js to use a different config dir.

+1

+1 bump

+1 Would really like to see this functionality.

Linux

cp /usr/share/applications/yakyak.desktop ~/.local/share/applications/yakyak-bis.desktop
edit yakyak-bis.desktop following lines:
Name=YakYak-BIS
...
Exec=XDG_CONFIG_HOME=/home/PUTYOURUSERHERE/.config/yakyabis/ /usr/bin/electron /usr/share/yakyak/app
...

You can use bis or whatever you like. "work", "personal"... anything will do. I'm not sure if /home/PUTYOURUSERHERE could be replaced by $HOME

Enjoy!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Is YakYak no longer being developed?

+1

+1

I have the same question as @shadowbottle . There hasn't been a commit since july...

it went through heavy vacations, I pick up development from time to time, but my timeline for the next 6 months it's pretty thesis-oriented.

We have now several pull request from new users, I would really like to see more and more in the future.

If someone is interested in contributing regularly, it's pretty easy to gain write access to Yakyak, just create good pull requests _(at least that's how I started one year ago)_

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stalebot you bastard! Good luck with your thesis Andr茅

+1

+1

+1

+1 Yak Yak is the best! Only thing missing is multi account!

Has anyone been able to make this work in Windows by adjusting APPDATA at launch?

i took the windows 1.5.0 precompiled bin., extracted it to a folder and ran it. Works great. Only thing i has to do was log in. Windows 10 AND linux same process for both for me.

Yeah, I have it running for a single account. What I'm trying to do is create a second instance with a different config directory to handle my personal account. Looks like it's possible, just can't make it work on Windows.

Sorry should have paid more attention. Have you tried enabling and running it as another user from the shortcut? Short of that working i will climb back in my hole Good luck.

It might be worth looking at how the 'Checker plus for gmail' chrome plugin handles multiple accounts.

Can I suggest a way to implement this? If the frameworks will support it, I think this would give us a simple way to run multiple accounts.

Have Yakyak check for a profile name passed as a command line parameter when it is launched. If one exists, then set the application data for that instance to use %AppData%Yakyak-[ProfileName]. If this profile does not exist, it would take you through the normal sign-in screen as a new user.

At present you can only run a single instance at a time in Windows, but perhaps the code that checks for an existing instance could also check for the command line parameter and allow the additional instance if the profile name was different. When the profile-aware app launches, it would connect automatically to the correct profile in %AppData% based on the profile name.

Taking this approach, running multiple instances would be as simple as adding a profile name to a shortcut.

I don't personally have any experience in Electron or Coffee, but could one of the developers perhaps comment on the feasibility of this approach? Thanks in advance!!

@joyfullservice I never got around to learning yet-another-javascript just for this purpose, but the basic idea is outlined here: https://github.com/yakyak/yakyak/pull/380

If it's done well, I think a command line flag has a chance of surviving a pull request. But the real goal would be in making multiple accounts work directly from the UI.

@ctag Thanks for the response! I did take some time yesterday afternoon to dig a bit into the code. It wasn't too hard to pull the command line argument and tweak the data path in main.js, but it looks like the bigger issue would be with the multi-instance part. Additional instances are shut down from main.js, but there is other code/configs at higher levels that are expecting a single-instance application (i.e. communication ports), so it doesn't appear to be as simple as I had hoped.

I agree that the better long-term approach would be to set up account profiles within the application so you can use them all from within the same window. That is obviously a non-trivial task requiring some more fundamental architectural changes as described in some of the earlier posts on this thread. It would be neat to see this implemented at some point, but at least now I have a better understanding of why this hasn't happened yet. 馃槂

Thanks again for mentioning #380. I think I kind of reinvented the wheel with that, but it probably took me much longer than it did you. 馃槈

Was this page helpful?
0 / 5 - 0 ratings