! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Can't open directory from search results if XDG_CURRENT_DESKTOP is not set
Status:
RESOLVED: FIXED
Product:
Catfish
Component:
General

Comments

Description invine.invine 2019-01-29 09:00:47 CET
I'm using catfish 1.4.7 on Openbox (no DE). When I'm trying to open directory from search results, following error is thrown:

Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/catfish/CatfishWindow.py", line 1185, in on_treeview_row_activated
    self.open_file(self.selected_filenames[0])
  File "/usr/lib/python3.7/site-packages/catfish/CatfishWindow.py", line 948, in open_file
    os.environ.get("XDG_CURRENT_DESKTOP").lower() == 'xfce':
AttributeError: 'NoneType' object has no attribute 'lower'

As far as I understand root cause is that XDG_CURRENT_DESKTOP is not set on my system (echo $XDG_CURRENT_DESKTOP returns empty string). Simple ugly fix like this str(os.environ.get("XDG_CURRENT_DESKTOP")).lower() == 'xfce' does fix the issue.

Here's the line of code which is to blame: https://github.com/xfce-mirror/catfish/blob/5c3e880cee423c23eeb5c091e653283762d83bf8/catfish/CatfishWindow.py#L948
Comment 1 Git Bot editbugs 2019-03-06 02:22:30 CET
Sean Davis referenced this bugreport in commit 95d50b285245a1814a4fbd86ea3ee235eda545a9

Fix opening directories without XDG_CURRENT_DESKTOP (bug #15099)

https://git.xfce.org/apps/catfish/commit?id=95d50b285245a1814a4fbd86ea3ee235eda545a9
Comment 2 Sean Davis editbugs 2019-03-06 02:22:59 CET
Thanks for the bug report! It was resolved with the above commit.

Bug #15099

Reported by:
invine.invine
Reported on: 2019-01-29
Last modified on: 2019-03-06

People

Assignee:
Sean Davis
CC List:
0 users

Version

Version:
unspecified

Attachments

Additional information