yatima1460 / Drill

Search files without indexing, but fast crawling
https://drill.software/
GNU General Public License v2.0
268 stars 21 forks source link

AppImage: folders and some files don't open when double clicked #20

Open pizzadude opened 5 years ago

pizzadude commented 5 years ago

Linux distro Linux Mint 19.1 Cinnamon

Build Version 1.131

Describe the bug In Linux Mint 19.1 Cinnamon (which uses Nemo file manager) double clicking a directory does nothing, but opening files such as videos and pictures works. Opening .txt files does nothing also. In Mint, xed is the default text editor.

To Reproduce Steps to reproduce the behavior: Try to open a txt file or directory with default applications.

Expected behavior Double clicking a directory should open with nemo, opening a text file should open with xed.

yatima1460 commented 5 years ago

@pizzadude

Try this version, now I use gnome-open first if it's available instead of xdg-open. gnome-open is how probably SoulSeekQt opens files

https://github.com/yatima1460/Drill/releases/download/1.251/Drill-GTK-linux-x86_64-release-1.251.AppImage

pizzadude commented 5 years ago

gnome-open is deprecated it seems.

See 'gio help open' for more info.

Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007f0a84671f00 (most recent call first):
This tool has been deprecated, use 'gio open' instead.
See 'gio help open' for more info.

Failed to register: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
This tool has been deprecated, use 'gio open' instead.
See 'gio help open' for more info.

Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
daviddoc commented 5 years ago

From version 1.245 I can't open folders, or some files. Other files (jpg) open flawlessly. Versions 1.244 and below work. Tried with Appimage, deb package and portable. I'm using Kubuntu 19.04 I get this error: Failed to launch preferred application for category "FileManager". Failed to execute child process "/usr/lib/x86_64-linux-gnu/xfce/exo-1/exo-helper-1"

yatima1460 commented 5 years ago

@daviddoc I know what causes this and it's very interesting, I now do that Drill first prefers the file opener of the system, like exo-open in the case of Kubuntu and then if everything fails it fallbacks to xdg-open

But it's funny how xdg-open actually works everywhere and the preferred system file opener does not

I think I will revert this change 🤔

yatima1460 commented 5 years ago

@probonopd @pizzadude

I confirm it happens only with the combination of AppImage + xed

So it's not a Linux Mint bug, but actually xed being complete garbage (And a bit of Linux Mint's fault for choosing xed)

Any other text editor works flawlessly with AppImages

I installed xed on Fedora, set it as default text editor, with the binary it works, with the AppImage xed crashes

xed killed by SIGABRT

when calling with Drill:

xdg-open path/to/textfile.txt

The reason is probably xed using a global environment variable to launch (bad design) and at the same time the AppImage exporting a wrong one or something, pretty cursed

probonopd commented 5 years ago

Please see https://github.com/AppImage/AppImageKit/issues/396

pizzadude commented 5 years ago

btw i don't use mint cinnamon anymore, been using fedora kde for over a month and drill works fine on it...

...but this bug should probably still be fixed in case there's another mint cinnamon user in this universe who downloads this

yatima1460 commented 4 years ago

This still bugs me to this day

yatima1460 commented 4 years ago

@probonopd so any updates? it's a Mint problem, Python problem, both?

Can I close this as not related to Drill? Or can I do some black magic before running a file to maybe fix this at runtime?

probonopd commented 4 years ago

So I cannot reproduce the issue. (Maybe I don't understand what the issue is.)

Note that the AppRun file inside the AppImage does export the environment variables PYTHONHOME, PYTHONPATH, PYTHONDONTWRITEBYTECODE, and PYTHONPATH. If The Drill AppImage is used to launch a Python-based application, then this might cause trouble. Hence, using a custom bash script as AppRun which does not touch those variables might be preferable.

yatima1460 commented 4 years ago

@probonopd The issue is when xed (a software written in python) is used as default text editor. And even worse, it's the default text editor on Mint

probonopd commented 4 years ago

Try a custom AppRun bash script to launch Drill (inside the AppImage) instead of the current AppRun, I think that should solve it then.