This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: webbrowser doesn't respect xfce default browser
Type: behavior Stage: patch review
Components: Library (Lib) Versions: Python 3.8, Python 3.7, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ava1ar, berker.peksag, cheryl.sabella, christian.heimes, eric.araujo, georg.brandl, kurazu, ssokolow, tshepang
Priority: normal Keywords: patch

Created on 2009-08-09 10:35 by ava1ar, last changed 2022-04-11 14:56 by admin.

Files
File name Uploaded Description Edit
webbrowser.py.patch ava1ar, 2009-08-10 08:18
issue6671.diff berker.peksag, 2014-05-18 23:52 review
Messages (14)
msg91426 - (view) Author: Aliaksandr Stelmachonak (ava1ar) Date: 2009-08-09 10:35
Currently webbrowser.py only trying to use GNOME and KDE default browser 
setting. This patch adds launching Xfce default browser if xfce environment detected.
msg109969 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-07-11 09:05
This is a three line patch.
msg109970 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-07-11 09:20
I'm not so keen on the os.popen() -- is there no other way to find out if XFCE is running?
msg122800 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-11-29 14:05
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.
msg185415 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2013-03-28 10:02
Closing to due to lack of a better way to detect Xfce.
msg185450 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2013-03-28 14:36
Sorry I did not comment earlier, but there is this way:

>>> os.environ.get('DESKTOP_SESSION') == 'xfce'
True
msg192381 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-06 00:49
I have a box with Ubuntu 12.04 and XFCE4:

declare -x XDG_CURRENT_DESKTOP="XFCE"
declare -x DESKTOP_SESSION="xubuntu"
msg192382 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2013-07-06 03:47
I don’t understand what your message is saying, Christian.
msg192402 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-06 10:11
I'm sorry for the confusion. My Xubuntu test box sets different environment variables than your system with xfce. It sets os.environ.get("DESKTOP_SESSION") == "xubuntu" and os.environ.get("XDG_CURRENT_DESKTOP") == "XFCE".
msg192411 - (view) Author: Tomasz Maćkowiak (kurazu) * Date: 2013-07-06 11:17
My Xubuntu 13.04 has the same variables:
'XDG_CURRENT_DESKTOP': 'XFCE'
'DESKTOP_SESSION': 'xubuntu'
as well as
'GDMSESSION': 'xubuntu'
msg192496 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2013-07-06 22:42
It’s not surprising to see differences in the environment given the complexity of X startup.  I run xfce-session from lightdm, and I don’t have XDG_CURRENT_SESSION set.  Still, it’s not too bad to have to check two envvars to determine we are on Xfce.
msg192497 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2013-07-06 22:43
XDG_CURRENT_DESKTOP*
msg218770 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2014-05-18 23:52
Attaching a patch that checks both XDG_CURRENT_DESKTOP and DESKTOP_SESSION env vars for XFCE.
msg314427 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2018-03-25 19:05
Should this patch be converted to a PR?
History
Date User Action Args
2022-04-11 14:56:51adminsetgithub: 50920
2018-03-25 19:05:48cheryl.sabellasetnosy: + cheryl.sabella

messages: + msg314427
versions: + Python 3.7, Python 3.8, - Python 3.4, Python 3.5
2015-01-18 04:18:20ssokolowsetnosy: + ssokolow
2014-05-18 23:52:35berker.peksagsetfiles: + issue6671.diff
versions: + Python 3.5, - Python 3.2, Python 3.3
nosy: + berker.peksag

messages: + msg218770

stage: test needed -> patch review
2014-02-03 17:06:38BreamoreBoysetnosy: - BreamoreBoy
2013-07-06 22:43:13eric.araujosetmessages: + msg192497
2013-07-06 22:42:47eric.araujosetmessages: + msg192496
2013-07-06 11:17:29kurazusetnosy: + kurazu
messages: + msg192411
2013-07-06 10:11:01christian.heimessetmessages: + msg192402
2013-07-06 03:47:32eric.araujosetmessages: + msg192382
2013-07-06 00:49:40christian.heimessetnosy: + christian.heimes
messages: + msg192381
2013-03-29 18:01:19tshepangsetnosy: + tshepang
2013-03-28 14:36:12eric.araujosetstatus: closed -> open
resolution: rejected ->
messages: + msg185450

versions: + Python 3.3, Python 3.4, - Python 3.1
2013-03-28 10:02:27georg.brandlsetstatus: open -> closed
assignee: georg.brandl ->
resolution: rejected
messages: + msg185415
2010-11-29 14:05:37eric.araujosetnosy: + eric.araujo

messages: + msg122800
title: webbrowser.py doesn't respect xfce default browser -> webbrowser doesn't respect xfce default browser
2010-07-11 09:20:53georg.brandlsetmessages: + msg109970
2010-07-11 09:05:06BreamoreBoysetversions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6
nosy: + georg.brandl, BreamoreBoy

messages: + msg109969

assignee: georg.brandl
stage: test needed
2009-08-10 08:19:45ava1arsetfiles: - webbrowser.py.patch
2009-08-10 08:18:21ava1arsetfiles: + webbrowser.py.patch
2009-08-09 10:35:24ava1arcreate