mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-21 20:14:51 +00:00
try to fix ubuntu again
This commit is contained in:
parent
cd74538adf
commit
eea8ff8e98
1 changed files with 8 additions and 4 deletions
|
@ -51,13 +51,13 @@ parser = OptionParser(usage="%prog [options] [torrents to add]",
|
|||
parser.add_option("-c", "--config", dest="config", help="Sets the configuration path")
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
print "checking for ubuntu..."
|
||||
if not deluge.common.windows_check():
|
||||
import platform
|
||||
if platform.system() == "Linux": # Add this, FreeBSD and other OSs than Linux do not have /etc/issue.
|
||||
if os.WEXITSTATUS(os.system('grep -iq "Ubuntu" /etc/issue')) == 0:
|
||||
print "found and fixing ubuntu"
|
||||
print "checking for ubuntu..."
|
||||
if os.WEXITSTATUS(os.system('grep -iq "Debian" /etc/issue')) == 0:
|
||||
if os.environ.get("MOZILLA_FIVE_HOME") != "/usr/lib/firefox":
|
||||
print "found and fixing ubuntu"
|
||||
os.environ["MOZILLA_FIVE_HOME"] = "/usr/lib/firefox"
|
||||
os.environ["LD_LIBRARY_PATH"] = "/usr/lib/firefox"
|
||||
if (options.config != None):
|
||||
|
@ -69,6 +69,7 @@ if not deluge.common.windows_check():
|
|||
raise SystemExit
|
||||
elif platform.system() == "FreeBSD":
|
||||
if os.environ.get("MOZILLA_FIVE_HOME") != "/usr/local/lib/firefox":
|
||||
print "found and fixing freebsd..."
|
||||
os.environ["MOZILLA_FIVE_HOME"] = "/usr/local/lib/firefox"
|
||||
os.environ["LD_LIBRARY_PATH"] = "/usr/local/lib/firefox"
|
||||
if (options.config != None):
|
||||
|
@ -151,7 +152,10 @@ except:
|
|||
if not deluge.common.windows_check():
|
||||
pid = os.fork()
|
||||
if not pid:
|
||||
os.popen('dbus-launch deluge')
|
||||
if args:
|
||||
os.popen('dbus-launch deluge %s' %args)
|
||||
else:
|
||||
os.popen('dbus-launch deluge')
|
||||
else:
|
||||
dbus_objects = dbus.Interface(bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus'), 'org.freedesktop.DBus').ListNames()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue