@@ -96,14 +96,9 @@ def linux_browser_apps_to_cmd(*apps):
9696 )
9797
9898
99- def chrome_on_linux_path (prefer_chromium = False ):
99+ def chrome_on_linux_path (chromium_ok = False ):
100100 if os_name () != OSType .LINUX :
101101 return ""
102- if prefer_chromium :
103- paths = ["/bin/chromium" , "/bin/chromium-browser" ]
104- for path in paths :
105- if os .path .exists (path ) and os .access (path , os .X_OK ):
106- return path
107102 paths = ["/bin/google-chrome" , "/bin/google-chrome-stable" ]
108103 for path in paths :
109104 if os .path .exists (path ) and os .access (path , os .X_OK ):
@@ -112,17 +107,22 @@ def chrome_on_linux_path(prefer_chromium=False):
112107 binaries = []
113108 binaries .append ("google-chrome" )
114109 binaries .append ("google-chrome-stable" )
115- binaries .append ("chrome" )
116- binaries .append ("chromium" )
117- binaries .append ("chromium-browser" )
118110 binaries .append ("google-chrome-beta" )
119111 binaries .append ("google-chrome-dev" )
120112 binaries .append ("google-chrome-unstable" )
113+ binaries .append ("chrome" )
114+ binaries .append ("chromium" )
115+ binaries .append ("chromium-browser" )
121116 for binary in binaries :
122117 for path in paths :
123118 full_path = os .path .join (path , binary )
124119 if os .path .exists (full_path ) and os .access (full_path , os .X_OK ):
125120 return full_path
121+ if chromium_ok :
122+ paths = ["/bin/chromium" , "/bin/chromium-browser" ]
123+ for path in paths :
124+ if os .path .exists (path ) and os .access (path , os .X_OK ):
125+ return path
126126 return "/usr/bin/google-chrome"
127127
128128
@@ -209,12 +209,11 @@ def windows_browser_apps_to_cmd(*apps):
209209 return '%s -NoProfile "%s"' % (powershell , script )
210210
211211
212- def get_binary_location (browser_type , prefer_chromium = False ):
213- """Return the full path of the browser binary.
214- If going for better results in UC Mode, use: prefer_chromium=True"""
212+ def get_binary_location (browser_type , chromium_ok = False ):
213+ """Return the full path of the browser binary."""
215214 cmd_mapping = {
216215 ChromeType .GOOGLE : {
217- OSType .LINUX : chrome_on_linux_path (prefer_chromium ),
216+ OSType .LINUX : chrome_on_linux_path (chromium_ok ),
218217 OSType .MAC : r"/Applications/Google Chrome.app"
219218 r"/Contents/MacOS/Google Chrome" ,
220219 OSType .WIN : chrome_on_windows_path (),
0 commit comments