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

Language:
English Edit question
Status:
Solved
For:
LinuxDC++ Edit question
Assignee:
No assignee Edit question
Solved by:
Razzloss
Solved:
2009-08-14
Last query:
2009-08-14
Last reply:
2009-08-13
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).

--RZ

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

#else
   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

TO

#else
   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/WulforUtil.cc]=-- row 309

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

TO

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 :-)