]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Update auto-detection for Konqueror to include KDE 2 -- the kfm command is
authorFred Drake <fdrake@acm.org>
Mon, 26 Mar 2001 15:06:15 +0000 (15:06 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 26 Mar 2001 15:06:15 +0000 (15:06 +0000)
gone; "konqueror" is the new name, and the command-line args are different.
kfmclient has not changed, though.

Lib/webbrowser.py

index 77edf0df77ce433b47e1ed9af2e20d9bc61a356e..ebafd80ba00699c24d475f36cccd5ee6c2c90900 100644 (file)
@@ -136,7 +136,7 @@ if os.environ.get("TERM") or os.environ.get("DISPLAY"):
             register("mosaic", None, GenericBrowser("mosaic %s >/dev/null &"))
 
         # Konqueror/kfm, the KDE browser.
-        if _iscommand("kfm"):
+        if _iscommand("kfm") or _iscommand("konqueror"):
             class Konqueror:
                 """Controller for the KDE File Manager (kfm, or Konqueror).
 
@@ -149,7 +149,10 @@ if os.environ.get("TERM") or os.environ.get("DISPLAY"):
                     rc = os.system(cmd)
                     if rc:
                         import time
-                        os.system("kfm -d &")
+                        if _iscommand("konqueror"):
+                            os.system("konqueror --silent &")
+                        else:
+                            os.system("kfm -d &")
                         time.sleep(PROCESS_CREATION_DELAY)
                         rc = os.system(cmd)
                     return not rc