From 046d4093662949a1a6893ca41a1a2eb842bade62 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Mon, 29 Nov 2021 12:40:05 -0300 Subject: [PATCH] [app] improvement: adding the environment variable if not available --- CHANGELOG.md | 3 ++- bauh/app.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85b60777..933beee1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,8 +16,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - custom themes: `/usr/share/bauh/themes` - symlinks/binaries : `/usr/local/bin` - shared files: `/usr/local/share/bauh` + - adding the `XDG_RUNTIME_DIR` environment variable if not available (following the pattern `/run/user/$UID`) -- UI +- UI - settings panel: - always displaying all supported packaging technologies - displaying a tooltip with the missing dependencies for a supported packaging technology diff --git a/bauh/app.py b/bauh/app.py index 172b0e5a..8f21bdb7 100755 --- a/bauh/app.py +++ b/bauh/app.py @@ -15,6 +15,9 @@ def main(tray: bool = False): if not os.getenv('PYTHONUNBUFFERED'): os.environ['PYTHONUNBUFFERED'] = '1' + if not os.getenv('XDG_RUNTIME_DIR'): + os.environ['XDG_RUNTIME_DIR'] = f'/run/user/{os.getuid()}' + faulthandler.enable() urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)