mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +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")
|
parser.add_option("-c", "--config", dest="config", help="Sets the configuration path")
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
print "checking for ubuntu..."
|
|
||||||
if not deluge.common.windows_check():
|
if not deluge.common.windows_check():
|
||||||
import platform
|
import platform
|
||||||
if platform.system() == "Linux": # Add this, FreeBSD and other OSs than Linux do not have /etc/issue.
|
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 "checking for ubuntu..."
|
||||||
print "found and fixing ubuntu"
|
if os.WEXITSTATUS(os.system('grep -iq "Debian" /etc/issue')) == 0:
|
||||||
if os.environ.get("MOZILLA_FIVE_HOME") != "/usr/lib/firefox":
|
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["MOZILLA_FIVE_HOME"] = "/usr/lib/firefox"
|
||||||
os.environ["LD_LIBRARY_PATH"] = "/usr/lib/firefox"
|
os.environ["LD_LIBRARY_PATH"] = "/usr/lib/firefox"
|
||||||
if (options.config != None):
|
if (options.config != None):
|
||||||
|
@ -69,6 +69,7 @@ if not deluge.common.windows_check():
|
||||||
raise SystemExit
|
raise SystemExit
|
||||||
elif platform.system() == "FreeBSD":
|
elif platform.system() == "FreeBSD":
|
||||||
if os.environ.get("MOZILLA_FIVE_HOME") != "/usr/local/lib/firefox":
|
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["MOZILLA_FIVE_HOME"] = "/usr/local/lib/firefox"
|
||||||
os.environ["LD_LIBRARY_PATH"] = "/usr/local/lib/firefox"
|
os.environ["LD_LIBRARY_PATH"] = "/usr/local/lib/firefox"
|
||||||
if (options.config != None):
|
if (options.config != None):
|
||||||
|
@ -151,7 +152,10 @@ except:
|
||||||
if not deluge.common.windows_check():
|
if not deluge.common.windows_check():
|
||||||
pid = os.fork()
|
pid = os.fork()
|
||||||
if not pid:
|
if not pid:
|
||||||
os.popen('dbus-launch deluge')
|
if args:
|
||||||
|
os.popen('dbus-launch deluge %s' %args)
|
||||||
|
else:
|
||||||
|
os.popen('dbus-launch deluge')
|
||||||
else:
|
else:
|
||||||
dbus_objects = dbus.Interface(bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus'), 'org.freedesktop.DBus').ListNames()
|
dbus_objects = dbus.Interface(bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus'), 'org.freedesktop.DBus').ListNames()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue