Open Rikj000 opened 1 year ago
p2pool integration was built with the portable binaries from getmonero.org in mind.
I thought about adding this for package managers: https://github.com/monero-project/monero-gui/pull/3926
Alter the P2PoolManager to launch p2pool under a different working directory when running on Linux.
What would you suggest here?
Alter the P2PoolManager to launch p2pool under a different working directory when running on Linux.
What would you suggest here?
To modify the m_p2poolPath
variable after the m_p2pool
variable has been set in the P2PoolManager
's constructor.
Something like:
#elif defined(Q_OS_UNIX)
m_p2poolPath = QApplication::applicationDirPath();
m_p2pool = m_p2poolPath + "/p2pool";
m_p2poolPath = QString::fromStdString(tools::get_default_data_dir()) + "/p2pool/"; // A.k.a. m_p2poolWorkingDir
With above change,
the m_p2poold->setWorkingDirectory(m_p2poolPath);
line of the P2PoolManager::start()
function,
should initialize the p2pool
process under a write-able p2pool
directory,
inside the already existing ~/.bitmonero
folder.
However I didn't check the other occurrences/usages of m_p2poolPath
in the rest of the P2PoolManager
thoroughly.
To prevent breaking anything, it might be good to introduce a new variable for this, e.g. m_p2poolWorkingDir
,
Issue Description
When installing
monero-gui
andp2pool
from the official repositories on Arch/Manjaro Linux,then
p2pool
will run into permission issues.This happens because:
monero-gui
andp2pool
packages are installed in the/usr/bin/
folder,to which only the
root
user has write access, not the currently logged in user!P2PoolManager
ofmonero-gui
launchesp2pool
with the same working directory as what themonero-gui
is using.So
/usr/bin/
is being used as the working directory forp2pool
, see:Fix Proposal
Alter the
P2PoolManager
to launchp2pool
under a different working directory when running on Linux.Reproduction steps
monero
,monero-gui
andp2pool
packages on Arch/Manjaro from the Official Repositories (community)monero-gui
as the logged in user from CLI with:p2pool
through themonero-gui
(Configured in the dropdown)monero-gui
stays stuck with Network StatusConnected + Mining
and Mining StatusStarting P2Pool
Note
When starting
p2pool
manually from CLI as following,then none of these permission issues occur
Environment
Linked issues