Skip to content

Commit 2707490

Browse files
author
Clement Lefebvre
committed
Uses mint-common to launch browsers in user-mode
1 parent 2c1f342 commit 2707490

File tree

3 files changed

+9
-25
lines changed

3 files changed

+9
-25
lines changed

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
mintinstall (6.4.5) helena; urgency=low
2+
3+
* Uses mint-common to launch browsers in user-mode
4+
5+
-- Clement Lefebvre <root@linuxmint.com> Fri, 30 Oct 2009 17:41:00 +0000
6+
17
mintinstall (6.4.4) helena; urgency=low
28

39
* Not dependent on mintMenu anymore

usr/lib/linuxmint/mintInstall/frontend.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -417,25 +417,11 @@ def show_more_info(widget, model):
417417

418418
def visit_web(widget, model, username):
419419
if model.selected_application != None:
420-
if os.path.exists("/usr/bin/gconftool-2"):
421-
browser = commands.getoutput("gconftool-2 --get /desktop/gnome/url-handlers/http/command")
422-
browser = browser.replace("\"%s\"", model.selected_application.link)
423-
browser = browser.replace("%s", model.selected_application.link)
424-
else:
425-
browser = "firefox " + model.selected_application.link
426-
launcher = commands.getoutput("/usr/lib/linuxmint/common/mint-which-launcher.py")
427-
os.system(launcher + " -u " + username + " \"" + browser + "\" &")
420+
os.system("sudo -u " + username + " /usr/lib/linuxmint/common/launch_browser_as.py \"" + model.selected_application.link + "\"")
428421

429422
def visit_website(widget, model, username):
430423
if model.selected_application != None:
431-
if os.path.exists("/usr/bin/gconftool-2"):
432-
browser = commands.getoutput("gconftool-2 --get /desktop/gnome/url-handlers/http/command")
433-
browser = browser.replace("\"%s\"", model.selected_application.website)
434-
browser = browser.replace("%s", model.selected_application.website)
435-
else:
436-
browser = "firefox " + model.selected_application.website
437-
launcher = commands.getoutput("/usr/lib/linuxmint/common/mint-which-launcher.py")
438-
os.system(launcher + " -u " + username + " \"" + browser + "\" &")
424+
os.system("sudo -u " + username + " /usr/lib/linuxmint/common/launch_browser_as.py \"" + model.selected_application.website + "\"")
439425

440426
def install(widget, model, wTree, username):
441427
if model.selected_application != None:

usr/lib/linuxmint/mintInstall/mintInstall.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -380,15 +380,7 @@ def show_portal_mint_apt(widget, username):
380380
show_website(username, "http://packages.linuxmint.com/")
381381

382382
def show_website(username, link):
383-
if os.path.exists("/usr/bin/gconftool-2"):
384-
browser = commands.getoutput("gconftool-2 --get /desktop/gnome/url-handlers/http/command")
385-
browser = browser.replace("\"%s\"", link)
386-
browser = browser.replace("%s", link)
387-
else:
388-
browser = "firefox " + link
389-
launcher = commands.getoutput("/usr/lib/linuxmint/common/mint-which-launcher.py")
390-
os.system("sudo -u " + username + " xhost +root")
391-
os.system(launcher + " -u " + username + " \"" + browser + "\" &")
383+
os.system("sudo -u " + username + " /usr/lib/linuxmint/common/launch_browser_as.py \"" + link + "\"")
392384

393385
def search_apt(widget, textfield):
394386
os.system("/usr/bin/mint-search-apt " + textfield.get_text() + " &")

0 commit comments

Comments
 (0)