Closed ovidiusoft closed 12 years ago
Ok, I will look into this.
I just tested this out on Debian and ./minerd worked for me. Are you sure you have minerd in the same path as litecoin-qt?
Yes. Are you sure you're not running, by coincidence, litecoin-qt from its own directory? ./minerd will work if you ran ./litecoin-qt, but that's, I believe, the only way it will, as the process' cwd will be set to that of the shell that launched it.
I was running it from Ubuntu/Unity using the Alt-F2 launcher and typing "litecoin". The binaries of litecoin and minerd are both in ~/bin (and this is in my $PATH).
And this is how it goes:
$ ps ax | grep litecoin 19201 ? SLl 10:26 litecoin
$ ls -l /proc/19201 | grep cwd lrwxrwxrwx 1 ovidiu ovidiu 0 2011-11-02 10:11 cwd -> /home/ovidiu
$ ls -l /proc/19201 | grep exe lrwxrwxrwx 1 ovidiu ovidiu 0 2011-11-01 21:03 exe -> /home/ovidiu/bin/litecoin
In my case ./minerd will only work if it's placed in /home/ovidiu (where it's not). Launching it like in my diff above is the correct way to do it, so the system will search it in the $PATH directories.
Alternatively, you can have a config option, but that's more coding than deleting 2 chars :D
Yes, I run it with ./litecoin-qt. Deleting 2 chars will cause it to not work for people that don't have minerd in their path.
I will see if I can check to see if the file exists first before launching it.
In this case, havind a option will probably be easier from a developer's point of view than parsing $PATH and cwd and checking that minerd exists. Having the option will also allow the user to launch another miner, not called "minerd". Anyway, keep up the good work :)
I checked in a fix. Please get latest and try again.
I confirm that it's fixed.
Trying to lauch ./minerd on Linux is not correct, it should be in a directory that's in the path or have a config option for it. This fixed it for me (both litecoin-qt and minerd are in ~/bin):
--- miningpage.cpp.old 2011-11-01 14:37:29.184095020 +0200 +++ miningpage.cpp 2011-11-01 14:38:09.144095022 +0200 @@ -104,7 +104,7 @@
ifdef WIN32
else
QString program = "minerd";
endif
if (ui->debugCheckBox->isChecked())