Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a multi-account feature [$474 awarded] #43

Closed
Wikinaut opened this issue Nov 2, 2012 · 117 comments
Closed

Add a multi-account feature [$474 awarded] #43

Wikinaut opened this issue Nov 2, 2012 · 117 comments

Comments

@Wikinaut
Copy link

Wikinaut commented Nov 2, 2012

I refer to the Windows Client 1.1.1 .

Problem:

I want to synchronise different Users' directories, on a same or different ownCloud installations.

Currently, I do not see a possibility to achieve this in the current version and suggest this as improvement. Please correct me if I am wrong.

Remark:

In the current version, the following appears to be implemented (single user, single server, plurality of directories)

--- The **[$474 bounty](https://www.bountysource.com/issues/904848-add-a-multi-account-feature?utm_campaign=plugin&utm_content=tracker%2F216457&utm_medium=issues&utm_source=github)** on this issue has been claimed at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F216457&utm_medium=issues&utm_source=github).
@davidak
Copy link
Member

davidak commented Feb 6, 2013

+1
very important feature like much people opened tickets for.

how is the state of development on this?

@danimo
Copy link
Contributor

danimo commented Feb 6, 2013

Not coming in the near future, since some major refactoring is required first.

@davidak
Copy link
Member

davidak commented Feb 6, 2013

ok, thanks.

@ghost
Copy link

ghost commented Feb 11, 2013

+1 -- if this means, it should be possible to access different owncloud servers with one desktop client -> desperately needed (mac user here)

Reason: I maintain a private family cloud and another one for a non-profit advocacy group. At the moment, I can only use the client for one of these cloud servers and have to maintain the other via web interface.

@jochenwezel
Copy link

yes, I'd really love this feature because my company has got it's owncloud, our customer too, and maybe a private owncloud for one of my favorite non-profit organisations will be setup in near future...

@jochenwezel
Copy link

another solution would be to allow installing OwnCloud client several times in parallel with different configs (for each required server/user combination) before refactoring thousands of code lines?

@danimo
Copy link
Contributor

danimo commented Feb 15, 2013

No need to +1. We would all love to see it, but it's a lot of work. We also thought about the multi-config option, but also that isn't zero-effort. Rest assured it's on the list.

@maystar
Copy link

maystar commented Mar 8, 2013

+1, too!
Of course, handling this request with some nice GUI elements and minimal memory footprint would create some effort. But as a workaround this features can be achieved by just adding an command line parameter which allows to specify the config files. Then everybody here could start as much instances with different configurations as (s)he like. Of course every instance should use a separated temp dir and database. This is done in many applications, so I'm surprised that it is not implemented from scratch. It can be very useful for developers, too, which use different clouds for tests.

@jaroslavas
Copy link

I've managed to run two instances of owncloud client on Mac OS X with different configs. There are some drawbacks (it doesn't save your password, you have to run it through terminal) but at least it seems to work.
If someone is interested I wrote short tutorial: http://jarik.wordpress.com/2013/04/16/how-to-use-multiple-owncloud-accounts-on-one-computer-on-mac-os-x/

@jochenwezel
Copy link

Okay, the workaround posted by jaroslavas also already works for windows: you can get it running in parallel if you run it using different user contexts:
oc_parallel_instance_0

For starting the 2nd instance, just press Shift key while right-clicking on the owncloud exe (or link) and choose "start using another user account" (or similar in English - translated from German)
oc_parallel_instance_1

After that, you can configure all settings as normal.

BTW: the configuration remains in place - so when you start for the 2nd time, you just need to enter the password of the 2nd windows user account to start the application, but you don't need to input any passwords any more inside of owncloud! :-)

@bdunnette
Copy link

Another possible workaround is to enable the External Storage Support app in at least one of the OwnCloud instances, then add the other OwnCloud instance to your account as "external storage" (using the "ownCloud/WebDAV" option, entering your WebDAV URL, and nothing as the Root to allow access to everything)

Screenshot - 04182013 - 07:56:10 PM

Once it's added, you should be able to use it in the client as you would any other sync folder...

@Watchwolf
Copy link

Is there somebody working on it ?

@guru4hp
Copy link

guru4hp commented Jun 18, 2013

Hi,
Just to report that jochenwezel workaround is working for me....

owncloud02

@ghost
Copy link

ghost commented Jun 21, 2013

+1000 ;-)
It would be great to get it work on several servers!

@guru4hp
Copy link

guru4hp commented Jun 22, 2013

Hi,
workaround works also with other servers as it is opening new session of owncloud where you can assign diff server and account. You just need to have new windows account that you can use to run this instance of owncloud. That simple.
to run automatically with start of windows, it is needed to have some powershell script to start aditional instances of client. I am just working on that and I will try to post code here...

p.s.
On iPad it is possible to have multiple accounts an servers ;)

Br. Mladen

Sent from my iPad

On 21. jun. 2013, at 18:03, jmhermelin notifications@github.com wrote:

+1000 ;-)
It would be great to get it work on several servers!


Reply to this email directly or view it on GitHub.

@jochenwezel
Copy link

@guru4hp power shell script is warmly welcome :-)

@lonlyboy
Copy link

Couldn't you simply move the cfg file into the working folder thus allowing us to install multiple versions of ownCloud client? Just wondering if there is a reason why the cfg file is store in the AppData folder. It sounds like a simple fix, but I don't understanding the programming end, maybe this isn't possible.

@dragotin
Copy link
Contributor

@lonlyboy almost everything is possible. It just has to be done, somebody has to put the hammer out and hit the anvil. And before we can get to this Enhancement stuff we will need to nail all bugs out that make this client unreliable in any way. I think that is good for us all... Best is you find your programming friend and convince him to jump on client development :-D

@johnmanko
Copy link

+1 ----- A very useful feature

@wolfpackmars2
Copy link

In Windows, you can use Task Scheduler to create a task to run when you log in to Windows. You can specify user account and password to run the task as. In Windows 7, make sure you set the following properties for the task:
[General Tab]
Name - Whatever you want
Security Options
Use the following account - Specify the user account you want to use
Run whether user is logged on or not - set this option
Do not store password - do not set this option

[Triggers Tab]
Click new
Configure a new trigger "At log on" and make sure you select your "normal" user account and enable this setup. If properly configured, the Trigger details should read "At log on of DOMAIN\User - Enabled"

[Actions Tab]
Click new action
For the action, select Start a program, and point it to your owncloud.exe

[Conditions Tab]
Set these options as you like. I would generally leave all these options unchecked.

[Settings Tab]
Since this is a task that runs at startup, you can leave all these options unchecked. You don't want the task to end if it runs longer than x days otherwise you may find that the owncloud instance will die after a few days. I believe that the OwnCloud instance will only be running so long as the task is "running"

[History Tab]
A nifty history of previous times the task has run. Use for troubleshooting.

When you save the Task, you will be prompted for the password for the user account you specified in the security options section of the General tab. You may also get a message about "Log on as batch rights". I used the information from this link to give the user account "Log on as batch".
http://social.technet.microsoft.com/Forums/windowsserver/en-US/760ee186-8074-40a5-95b0-35d17c2bdfab/log-on-as-batch-job-right

NOTE: While this will launch OwnCloud as another user and start syncing files, you will not be able to access the interface for the other instance of OwnCloud. This shouldn't be a problem, as it should not be necessary to access the OwnCloud interface after initially setting up the synced folders for the other user account. Also, you can just run another instance of OwnCloud using the method above to get to the interface for the other user.

@miketheknife
Copy link

I have a different approach to the multi account feature. I have been reading about it and if i am not misstaken the feature will not be implemented in the near future due to the fact that it is an aweful lot of work.

I suggest to have an additional switch to the commandline tool instead, where you can run the sync client once --sync_once. It will then sync once and then quit after syncing. With this option we will be able to write a batch script that runs one instance after the other sequentially.

greets mike

@quaboag
Copy link

quaboag commented Sep 6, 2013

As a workaround, I made a copy of the binary and renamed it to C:\Program Files (x86)\ownCloud\owncloud2.exe. Then I created a shortcut to it and updated the properties to point the shortcut to a newly created directory for the configuration files: "C:\Program Files (x86)\ownCloud\owncloud2.exe" --confdir "C:\Users\david\owncloudconf2"

So far it's been working fine, but I'm a little concerned that it seemed a little too easy, and there's got to be a catch. Can the two instances running under the same account stomp on each other? I dunno... I'm not a Windows programmer, and I'm not familiar with the owncloud code so I'm flying an experimental here.

@gigisco
Copy link

gigisco commented Sep 10, 2013

@quaboag i tried your workaround but i'm able to start 2 instance of owncloud client but they run on same server even if I indicated two different url server in the configuration file.
In this case are sinc only one folder too...
For me it doesn't work.

@quaboag
Copy link

quaboag commented Sep 10, 2013

On Windows the only problem I have is that the original ownCloud instance will no longer start on boot. I'll toss a shortcut into the startup folder and see if that makes a difference.

I tried the same trick on CentOS 6 and it's working fine there.

I'm running three instances. Two of them are two different accounts on a single ownCloud server running on a private vpn. The third is running on a private ownCloud server that's Internet facing.

screenshot

Are you syncing to three different folders, or are you syncing all of them to the same %HOMEPATH%\ownCloud (or $HOME/ownCloud) folder? I'm not syncing them to the same folder.... I would expect that the .csync_* files would overwrite each other.

For my CentOS experiment I ran this (doing this from memory--apologies for typos):

cd ; mkdir bin ; cd bin
cp /usr/bin/owncloud .
mv owncloud owncloud2
cp owncloud2 owncloud3
mkdir $HOME/owncloudconf2 $HOME/owncloudconf3
mkdir $HOME/owncloud2 $HOME/owncloud3

and to run them....

nohup $HOME/bin/owncloud2 --confdir $HOME/owncloudconf2 &
nohup $HOME/bin/owncloud3 --confdir $HOME/owncloudconf3 &

...and pick a different sync folder in the gui install (e.g. the $HOME/owncloud[23]). (You might want to backup the $HOME/ownCloud folder just in case you can't cancel the initial sync in time.)

@gigisco
Copy link

gigisco commented Sep 10, 2013

Hi quaboag ,
i lounch two istance of owncloud client:

"c:\Program Files\ownCloud2\owncloud2.exe" --confdir c:\Users\xxx\AppData\Local\ownCloud2\owncloud2.cfg
where
owncloud2.cfg is:

"[General]
optionalDesktopNotifications=true

[Settings]
geometry=@bytearray(\x1ÙÐË\0\x1\0\0\0\0\0%\0\0\x1-\0\0\x2é\0\0\x3\x1b\0\0\0-\0\0\x1K\0\0\x2á\0\0\x3\x13\0\0\0\0\0\0)

[ownCloud]
url=http://server1
authType=http
user=user1

[Proxy]
type=0

[LogBrowser]
geometry=@bytearray(\x1ÙÐË\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\x2�\0\0\x1ß\0\0\0\0\0\0\0\0\0\0\x2�\0\0\x1ß\0\0\0\0\0\0)
"

then i lounch the second one:

"c:\Program Files\ownCloud2\owncloud.exe" --confdir c:\Users\xxx\AppData\Local\ownCloud\owncloud.cfg
where
owncloud.cfg is:
"[General]
optionalDesktopNotifications=true

[Settings]
geometry=@bytearray(\x1ÙÐË\0\x1\0\0\0\0\0%\0\0\x1-\0\0\x2é\0\0\x3\x1b\0\0\0-\0\0\x1K\0\0\x2á\0\0\x3\x13\0\0\0\0\0\0)

[ownCloud]
url=http://server2
authType=http
user=user2

[Proxy]
type=0

[LogBrowser]
geometry=@bytearray(\x1ÙÐË\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\x2�\0\0\x1ß\0\0\0\0\0\0\0\0\0\0\x2�\0\0\x1ß\0\0\0\0\0\0)"

and where "C:\Users\xxx\AppData\Local\ownCloud\folders\ownCloud" is

[ownCloud]
localPath=C:\Users\xxx\ownCloud
targetPath=/
backend=owncloud
connection=ownCloud

and and where "C:\Users\xxx\AppData\Local\ownCloud2\folders\ownCloud2" is

[ownCloud2]
localPath=C:\Users\xxx\ownCloud2
targetPath=/
backend=owncloud2
connection=ownCloud2

Can i ask you where is my mistake?

Thanks
giu

@lonlyboy
Copy link

Gigisco:
Your second instance is running from same file directory. I.e. owncloud2.
You can't just copy exe file You have to run from two separate program directories.
So have 1 exe file in owncloud and 2nd in owncloud2.

@gigisco
Copy link

gigisco commented Sep 10, 2013

lonlyboy:
I took your advice and moved owncloud2 in another program directory. So i started two instance in this way:

"c:\Program Files\ownCloud\owncloud.exe" --confdir c:\Users\xxx\AppData\Local\ownCloud\owncloud.cfg"
that point to server1
and
"c:\Program Files\ownCloud2\owncloud2.exe" --confdir c:\Users\xxx\AppData\Local\ownCloud2\owncloud2.cfg"
that point to server2

but i see the same problem...it start the same process and the second doesn't sinc any folders.

i'm wrong in something?

@danimo
Copy link
Contributor

danimo commented Sep 19, 2014

@eslindsey That sounds great! It would be good if you could join #owncloud-client-dev on Freenode to discuss this.

@danimo
Copy link
Contributor

danimo commented Oct 4, 2014

@eslindsey still interested?

@danimo
Copy link
Contributor

danimo commented Oct 4, 2014

A reward has been pledged for this issue:

Here is a lose list on what needs to be done (issues in italics mark strech goals or things that make the result simpler). The list is not exhaustive, but should highlight the most important issues.

  • Identify all users of the AccountManager::instance() singleton. Some are C functions from libocsync that might not be aware of the current account
  • Make FolderMan aware of multiple accounts. currently it's a singleton, a decision needs to be made if it should be made aware of the existence of multiple accounts, or if it should not be a singleton and exist once for every account.
  • Adjust the UI of the settings dialog: Redo the design of the non-mac such that it looks like the mac dialog (all tabs on top). Accounts then should go on the left in the accounts tab.
  • Optional: Merge Credential Class into Account, might ease certain things

Acceptance:

As this is a complex feature that can break a lot, the following needs to happen before code created will be accepted upstream:

  • Code needs to be put up as a Pull Request and must undergo review
  • Acceptance will be simpler if test cases are provided

We will happily review early stages if asked for guidance.

@eslindsey
Copy link

@danimo I see why this hasn't been done yet. This won't be an overnight fix. :)

Yes, I am still interested, since this is a major feature requirement for me. School and other work takes priority at the moment; hopefully I can engage this project in about a month. I'll see you guys on IRC when I've got some free time.

@dragotin
Copy link
Contributor

dragotin commented Oct 5, 2014

I would object to list the redesign of the settings dialog here. That is a different feature and adds more, unneeded complexity here.
Rather add a "add Account" button to the settings page, and code the available list of accounts coded into a pushbutton/combobox combination.

@eslindsey
Copy link

Shucks, that's probably the easiest thing on that list. ;) But I agree that UI design is not directly related to the addition of this feature.

On Oct 5, 2014, at 3:15 AM, Klaas Freitag notifications@github.com wrote:

I would object to list the redesign of the settings dialog here. That is a different feature and adds more, unneeded complexity here.
Rather add a "add Account" button to the settings page, and code the available list of accounts coded into a pushbutton/combobox combination.


Reply to this email directly or view it on GitHub.

@douglasprodocimo
Copy link

I tryed an different approach.
I assumed that owncloud.exe uses the windows environment variables to get the folders paths, so I created the folders:
"C:\Users\Douglas\teste"
"C:\Users\Douglas\teste\Local\Temp"
"C:\Users\Douglas\teste\Local\Temp"
"C:\Users\Douglas\teste\Local"
Then I copied the C:\Program Files (x86)\ownCloud\ folder to
C:\Program Files (x86)\ownCloud2
and renamed C:\Program Files (x86)\ownCloud2\owncloud.exe to
C:\Program Files (x86)\ownCloud2\owncloud2.exe

PS. "test" is "test" in portuguese
After I created a test.bat file with these commands

SET TEMP=C:\Users\Douglas\teste\Local\Temp
SET TMP=C:\Users\Douglas\teste\Local\Temp
SET USERPROFILE=C:\Users\Douglas\teste
SET LOCALAPPDATA=C:\Users\Douglas\teste\Local

"C:\Program Files (x86)\ownCloud2\owncloud2.exe" --confdir "C:\Users\Douglas\teste"

Running the bat file, the owncloud program executes like a fresh install and don't see the lock files created by other owncloud.exe instances.

But I think the best way is creating a .vbs file instead of .bat file.

@strugee
Copy link

strugee commented Nov 18, 2014

+1 for a multi account feature! For me it's the same as for some people before: I must connect to multiple ownCloud servers. Currently it's not possible. :/

This issue doesn't need more +1s. We all understand that everyone wants this feature. Comments like this (not to pick on you personally) don't contribute anything to the discussion and simply take up space in people's inboxes.

What this issue does need is patches.

@giovanisp
Copy link

@strugee I don't have patches since I can't help on coding, but I dropped some mockups for this and other refactoring on #2551 ... :-)

@danimo
Copy link
Contributor

danimo commented Dec 1, 2014

#2565 has the necessary changes to move the different pages on top as already existing on OS X. The next step will be to refactor the Account and AccountManager class. Then we can modify the AccountSettings tab in the settings dialog to reflect multiple accounts as per #2551. Still a long way to go.

@TheNodi
Copy link

TheNodi commented Jan 6, 2015

I've got a simple workaround for those who need to sync multiple accounts (even with multiple owncloud instances) using owncloudcmd.exe, you can find my article here:
http://leonardosite.altervista.org/owncloud-multiaccount-client-workaround/

@mosandlt
Copy link

Hello,

i wrote for me a small wordpress site, see - http://www.mosandl.eu/2014/04/start-owncloud-sync-client-twice/

cheers

@danimo
Copy link
Contributor

danimo commented Jan 16, 2015

Note that all the workarounds will cause issues, such as overlay icons not working reliably.

@mosandlt
Copy link

for me, tested in mac and windows i have no issues right now

@jospoortvliet
Copy link

Thanks @mosandlt and @TheNodi for sharing how to do this - it might have issues but if it helps people, that's great!

ckamm added a commit that referenced this issue Jan 28, 2015
Avoid accessing the global account instance and instead pass it in
from the outside.
ckamm added a commit that referenced this issue Jan 28, 2015
Also fix a possible bug with the share dialog when no account
is configured.
@MaverickVG
Copy link

are there any news concerning this awesome feature? We are really looking forward for this.

@danimo
Copy link
Contributor

danimo commented Feb 6, 2015

We know, but it's scheduled for 1.9, and we are still working on 1.8. That said all code changes are being developed with multi account in mind already.

@mamayer
Copy link

mamayer commented Mar 11, 2015

+1 I could really use that feature. The workarounds are not that comfortable.

@lokimo
Copy link

lokimo commented Mar 12, 2015

+1

1 similar comment
@Teots
Copy link

Teots commented Mar 13, 2015

+1

@danimo
Copy link
Contributor

danimo commented Mar 13, 2015

Guys, the feature is scoped and being worked on. Every time you post a +1 not only does God kill a kitten, but every developer gets a mail that he needs to process, taking more time from completing features like this. For now, it seems I'll have to lock this issue :-(

@owncloud owncloud locked and limited conversation to collaborators Mar 13, 2015
@ogoffart
Copy link
Contributor

ogoffart commented Apr 9, 2015

New issue to track progress: #3084

@ogoffart ogoffart closed this as completed Apr 9, 2015
@DeepDiver1975 DeepDiver1975 changed the title Add a multi-account feature Add a multi-account feature [$474 awarded] Jan 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests