Several clients running at the same time

Asked by cats on 2009-08-13

Will you make it possible for users to run multiple clients at the same time? Since the binary always seems to read from the .dc++ config folder then several clients would not work. I am asking this because I am thinking about making a small change in the source code so that the binary reads from the same folder instead, which would be /etc/linuxdcpp/config, which would make it possible to have several clients in separate folders.

Have I missed something, and maybe is it already possible? Or will you make it possible soon, or do I have to make temporary changes to the source?

Question information

English Edit question
LinuxDC++ Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Best Razzloss (razzloss) said : #1

Well, the config is read from $HOME/.dc++ (or if $HOME isn't available then /tmp/.dc++). You can run multiple clients by providing different HOMEs for each.

For example
$ HOME=/home/user/dc1 linuxdcpp
$ HOME=/home/user/dc2 linuxdcpp
would run 2 clients with different configs.

I'm not sure if I understood what you were going to read from /etc/linuxdcpp/config, but at the moment running multiple clients with the same config directory isn't recommended (and it is prevented by lock file) because Queue- and other data files stored in the .dc++ would be from the client that last wrote them (which might be bad).


cats (cats) said : #2

Thanks Razzloss, that solved my question.

cats (cats) said : #3

Doh, never thought about that. Oh well, I made the changes I wanted, and I got a reason to look through the code. The changes I made was in:

--=[client/Util.cpp]=-- row 92

   systemPath = "/etc/";
   char* home = getenv("HOME");
   configPath = home ? Text::toUtf8(home) + "/.dc++/" : "/tmp/";
   dataPath = configPath; // dataPath in linux is usually prefix + /share/app_name, so we can't represent it here


   systemPath = "";
   //char* home = getenv("HOME");
   configPath = ""; //home ? Text::toUtf8(home) + "/.dc++/" : "/tmp/";
   dataPath = configPath; // dataPath in linux is usually prefix + /share/app_name, so we can't represent it here

--=[linux/]=-- row 309

string configPath = home ? string(home) + "/.dc++/" : "/tmp/";
string profileLockingFile = configPath + "profile.lck";


string configPath = "";//home ? string(home) + "/.dc++/" : "/tmp/";
string profileLockingFile = configPath + "profile.lck";

I didn't have time to look through all of the code to make the necessary adjustments to everything, but this little quick fix got the job done :-)

Thanks for your answer :-)