#1132·persepolis

Missing XDG_CURRENT_DESKTOP causes Persepolis to crash without loading

Author: SourceOfHTMLCreated Sep 30, 2026Updated Sep 30, 2026

Hi, I'm running Archlinux with Sway as the Window Manager, so XDG_CURRENT_DESKTOP and DE and similar environment variables just aren't set automatically. When I run Persepolis, I get the following error:

Traceback (most recent call last):
  File "/usr/bin/persepolis", line 26, in <module>
    from persepolis.scripts import persepolis
  File "/usr/lib/python3.14/site-packages/persepolis/scripts/persepolis.py", line 41, in <module>
    os_type, desktop_env = osAndDesktopEnvironment()
                           ~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.14/site-packages/persepolis/scripts/useful_tools.py", line 89, in osAndDesktopEnvironment
    desktop_env = os.environ.get('XDG_CURRENT_DESKTOP').lower()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'lower'

Setting XDG_CURRENT_DESKTOP to X-Generic (or theoretically anything else) before running Persepolis fixes the issue, but it's still a problem for ease of use, and directly setting these sorts of environment variables feels nasty.