set LD_LIBRARY_PATH for tor
This commit is contained in:
parent
24d4c4dc70
commit
e0ba5ec2b2
1 changed files with 7 additions and 1 deletions
|
@ -71,10 +71,16 @@ DirReqStatistics 0
|
||||||
self.installing = False
|
self.installing = False
|
||||||
tor = get_tor()
|
tor = get_tor()
|
||||||
if tor:
|
if tor:
|
||||||
|
if 'TorBrowser' in tor and sys.platform.startswith('linux'):
|
||||||
|
env = {
|
||||||
|
'LD_LIBRARY_PATH': os.path.dirname(tor)
|
||||||
|
}
|
||||||
|
else:
|
||||||
|
env = None
|
||||||
cmd = [tor, '--defaults-torrc', defaults, '-f', torrc]
|
cmd = [tor, '--defaults-torrc', defaults, '-f', torrc]
|
||||||
while self.running:
|
while self.running:
|
||||||
self.p = subprocess.Popen(cmd, stdout=subprocess.PIPE, bufsize=1,
|
self.p = subprocess.Popen(cmd, stdout=subprocess.PIPE, bufsize=1,
|
||||||
universal_newlines=True, start_new_session=True)
|
universal_newlines=True, start_new_session=True, env=env)
|
||||||
for line in self.p.stdout:
|
for line in self.p.stdout:
|
||||||
self._status.append(line)
|
self._status.append(line)
|
||||||
logger.debug(line)
|
logger.debug(line)
|
||||||
|
|
Loading…
Reference in a new issue