Open pizzadude opened 5 years ago
The only reason I can think why this happens is because by not having a default application set xdg-open will probably do nothing at all. Other possible reasons are if they have root-like permissions or strange characters in the path (unlikely)
But pretty sure it's because Mint uses its own xdg implementation hidden behind xdg-open, so if possible to fix this I would need to check if the file opening succeeded and then if not use other implementations like Mint's one
Does the folder open if you type "xdg-open /full/path/to/folder"?
Yes, they open fine with xdg-open.
Okay so we can exclude xdg-open implementations, I wonder if it's a permission problem or something else, in the next version I will try to implement a messagebox that pops up if the opening failed reporting the error, so you can report it here.
I will let you know when I've implemented the messagebox!
Maybe I will start a VM with Mint too
Note that pictures and videos both open. My video player is SMPlayer and picture viewer is Nomacs, both sandboxed by firejail (symlinked to firejail in /usr/local/bin/) I didnt sandbox Nemo or Xed, which don't work.
BTW despite these problems thanks for making this program, its the fastest GUI file searching tool I've used.
It seems distros based on Ubuntu have their own xdg-open too, maybe first trying that and then falling back to xdg-open in case it does not work would be a good idea 🤔
@pizzadude
Booted Mint in a VM to check this, got this error:
Works on .deb, does not work in AppImage, I will contact the AppImage creator, it's either an AppImage problem or xed doing something badly.
I recommend you to use the .deb until this gets fixed by them.
Thanks, the deb version works without issue when opening files and folders with xed and nemo. Also, you might want to change the name of the binary that goes into /usr/bin/ because drill is another program from a package that is available in the repositories, just in case other people have it installed so it doesn't conflict. Maybe change the /usr/bin/ binary to drill-gtk
I don't know what to do with this, it truly seems an AppImage bug exporting the wrong environment variables
@probonopd any news about this? Is it an AppImage bug or a Linux Mint bug? Meanwhile I added a warning notice on my website Thanks
I'm starting to believe the real culprit here is Python, it seems if some environment variables are messed up, some Python software will not start
Linux Mint is the only distro that gave me problems with AppImage The AppImage even works on Arch
If an AppImage produces
then it is a bug in that AppImage and needs to be fixed by the creator of that AppImage (by bundling Python and all Python modules the application needs to run).
@probonopd The problem is that when a user finds a txt file on Linux Mint and double clicks it on Drill I open the file using xdg-open filepath
and I get that error because the default text editor on Linux Mint is written in Python
So it seems like xdg-open
still opens the Python software like it was in the AppImage and not outside?
That's where my knowledge about this ends
Sorry, from your description I can't follow you. Can you describe, step-by-step, how to reproduce the issue using, e.g., linuxmint-19.1-cinnamon-64bit.iso?
Search for a text file on Drill on Linux Mint and double click it. Nothing happens.
And the real error behind the scenes is: (you could maybe see it if you run the AppImage from terminal, maybe not)
So the TL;DR is: using xdg-open path/to/textfile.txt
on Linux Mint does not work because the default editor is written in Python and it seems the AppImage exports the wrong environment variables
It's a problem with directories also, not just text files.
Steps to reproduce: Install Linux Mint 19.1 Cinnamon Open Drill AppImage Search for a folder or text file Notice that it won't open
xed
is written in Python but I wonder why directories don't open too, nemo
is written in C no?
@pizzadude Can you reconfirm it on the latest AppImage?
@yatima1460 That appimage doesn't launch at all.
(AppImageLauncher:26782): GdkPixbuf-CRITICAL **: 19:13:42.216: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(AppImageLauncher:26782): GdkPixbuf-CRITICAL **: 19:13:42.216: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
/tmp/.mount_Drill-SiByZR/usr/bin//drill-search-gtk: line 2: /opt/drill-search-gtk/drill-search-gtk: No such file or directory
The fact that only Linux Mint has problems really makes me think about the entire distro not following Linux standards.
I'm not too sure about that...
Anyways, the deb works fine. Speaking of that, I should update drill...
Let me know if the latest 1.237 deb works fine, if it does it's probably a combination of Linux Mint not following standards + AppImage having a bug somewhere
It can't be only an AppImage bug because the AppImage works everywhere but on Mint and it can't be only a Linux Mint bug because the .deb works perfectly everywhere and the AppImage is also created by just extracting and re-archiving the .deb basically. It's a combination of at least two things, and I hope Python is not the third.
You want to know something weird?
After I updated the deb to the latest version (I hadn't updated in about 25 days), the latest AppImage started launching.
For some reason, if I have the deb installed, and I launch the AppImage, the AppImage tries to launch the deb version... The executable name changed since last time I installed the deb version, so that's probably why the AppImage didn't launch. (But it's not the AppImage actually, it's the deb version launching through the AppImage)
And If I uninstall the deb, the AppImage can't launch at all.
/tmp/.mount_Drill-7zJMWP/usr/bin//drill-search-gtk: line 2: /opt/drill-search-gtk/drill-search-gtk: No such file or directory
Somethings definitely wrong with your AppImage. :P
Maybe it's because you hardcoded your path?
No no, AppImages are basically like .ISO files, they mount themselves and consider the mount location as "/"
This is actually very useful, it seems that for obscure reasons the AppImage on Linux Mint actually "escapes" from the fake filesystem and tries to launch Drill from the real filesystem
All my other appimages work fine...
Also it seems the opposite happens with txt files: it tries to launch xed
inside the AppImage and not outside
Man, developing applications for Linux must be hard. :P
Also, I should note that the old AppImage from 25 days ago launched, but the new one doesn't launch at all because it tries to launch Drill from the actual filesystem.
Man, developing applications for Linux must be hard. :P
Want to hear something funny? Linux Mint is the only distro giving me problems, even Arch that by many is considered the most exotic distro after Gentoo works perfectly with the AppImage
All my other appimages work fine...
Can you find another AppImage that let you launch txt files?
Not open .txt files, but actually launch xed like Drill does for txt
But I have the suspicion I'm the first one doing it from an AppImage
The SoulSeekQt AppImage allows me to open the containing folder of downloaded media files, and that opens in nemo.
Also, it lets me open downloaded .txt files fine. (They open in xed)
You picked up the only project that is not open source so I can't check how they do it :laughing:
I don't have any other appimages that I know of that can open txt files. :P
I will try Linux Mint on a virtual machine and let you know
Looks like the AppImage is seriously broken if it tries to open stuff from /opt
:
/opt/drill-search-gt
@probonopd found a part of the problem
Creating the AppImage using pkg2appimage with a local .deb file results in a broken AppImage
Previously creating the AppImage manually worked, so first part of the problem is with pkg2appimage
The second part is still the AppImage exporting the wrong variables and not being able to run xed
with xdg-open
you can check the recipe here:
https://github.com/yatima1460/Drill/blob/master/Tools/AppImage/Drill_GTK.yml
@pizzadude can you test the new AppImage?
It launches, and I can search for stuff, but it has the same problem opening text files and folders as before. However, I noticed something. If I have xed already open, and try to open a text file, the text file opens. If xed is not open, it doesn't work and I get the encodings error.
If you can't fix this that's okay with me as the deb version works fine.
the AppImage exporting the wrong variables
Can you explain in one post what "wrong variables" are being exported so that I don't have to read through the whole long thread? Thanks. Likely you need to change the AppRun file or replace it with a custom launcher script.
@probonopd I will try to make a minimal AppImage that causes this bug
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.