--- a/reportbug/utils.py
+++ b/reportbug/utils.py
@@ -1459,6 +1459,10 @@
USERFILE = os.path.expanduser('~/.reportbugrc')
+# Use XDG base directory compliant config file and support legacy one if it already exists.
+if not os.path.isfile(USERFILE):
+ USERFILE = (os.environ.get('XDG_CONFIG_HOME') or os.environ.get('HOME') + '/.config') + '/reportbugrc'
+
FILES = ('/etc/reportbug.conf', USERFILE)
CONFIG_ARGS = (