Skip to content

webbrowser doesn't respect xfce default browser #50920

Open

Description

@ava1ar
mannequin
BPO 6671
Nosy @birkenfeld, @tiran, @ssokolow, @merwok, @berkerpeksag, @csabella
Files
  • webbrowser.py.patch
  • issue6671.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2009-08-09.10:35:24.702>
    labels = ['3.7', '3.8', 'type-bug', 'library']
    title = "webbrowser doesn't respect xfce default browser"
    updated_at = <Date 2018-03-25.19:05:48.983>
    user = 'https://bugs.python.org/ava1ar'

    bugs.python.org fields:

    activity = <Date 2018-03-25.19:05:48.983>
    actor = 'cheryl.sabella'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2009-08-09.10:35:24.702>
    creator = 'ava1ar'
    dependencies = []
    files = ['14680', '35290']
    hgrepos = []
    issue_num = 6671
    keywords = ['patch']
    message_count = 14.0
    messages = ['91426', '109969', '109970', '122800', '185415', '185450', '192381', '192382', '192402', '192411', '192496', '192497', '218770', '314427']
    nosy_count = 9.0
    nosy_names = ['georg.brandl', 'christian.heimes', 'ssokolow', 'eric.araujo', 'ava1ar', 'tshepang', 'berker.peksag', 'kurazu', 'cheryl.sabella']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue6671'
    versions = ['Python 2.7', 'Python 3.7', 'Python 3.8']

    Activity

    1. ava1ar commented on Aug 9, 2009

      ava1armannequin
      MannequinAuthor

      Currently webbrowser.py only trying to use GNOME and KDE default browser
      setting. This patch adds launching Xfce default browser if xfce environment detected.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Aug 9, 2009
    3. BreamoreBoy commented on Jul 11, 2010

      BreamoreBoymannequin
      Mannequin

      This is a three line patch.

    4. birkenfeld commented on Jul 11, 2010

      @birkenfeld
      Member

      I'm not so keen on the os.popen() -- is there no other way to find out if XFCE is running?

    5. merwok commented on Nov 29, 2010

      @merwok
      Member

      Gajim lists processes thanks to /proc, which is platform-specific; a Web search shows the use of pidof, to the same effect; I looked for an envvar (I use Xfce) and found nothing.

    6. changed the title [-]webbrowser.py doesn't respect xfce default browser[/-] [+]webbrowser doesn't respect xfce default browser[/+] on Nov 29, 2010
    7. birkenfeld commented on Mar 28, 2013

      @birkenfeld
      Member

      Closing to due to lack of a better way to detect Xfce.

    8. removed their assignment
      on Mar 28, 2013
    9. merwok commented on Mar 28, 2013

      @merwok
      Member

      Sorry I did not comment earlier, but there is this way:

      >>> os.environ.get('DESKTOP_SESSION') == 'xfce'
      True
    10. reopened this on Mar 28, 2013
    11. tiran commented on Jul 6, 2013

      @tiran
      Member

      I have a box with Ubuntu 12.04 and XFCE4:

      declare -x XDG_CURRENT_DESKTOP="XFCE"
      declare -x DESKTOP_SESSION="xubuntu"

    12. merwok commented on Jul 6, 2013

      @merwok
      Member

      I don’t understand what your message is saying, Christian.

    13. 3 remaining items

    14. merwok commented on Jul 6, 2013

      @merwok
      Member

      XDG_CURRENT_DESKTOP*

    15. berkerpeksag commented on May 18, 2014

      @berkerpeksag
      Member

      Attaching a patch that checks both XDG_CURRENT_DESKTOP and DESKTOP_SESSION env vars for XFCE.

    16. csabella commented on Mar 25, 2018

      @csabella
      Contributor

      Should this patch be converted to a PR?

    17. transferred this issue fromon Apr 10, 2022
    18. added
      type-featureA feature request or enhancement
      3.12only security fixes
      and removed
      type-bugAn unexpected behavior, bug, or error
      on Oct 4, 2022
    19. added
      3.13only security fixes
      and removed
      3.12only security fixes
      on Jan 5, 2024
    20. minrk commented on Feb 21, 2025

      @minrk
      Contributor

      Looks like the exo-open command should be

      exo-open --launch WebBrowser
      

      to ensure a browser is launched (e.g. for file:// URL).

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions