-
Notifications
You must be signed in to change notification settings - Fork 16
Run update-mime-database and update-desktop-database #34
Comments
Awesome idea. That might even fix these issues on e.g., XFCE, where the launcher won't show icons of recently integrated desktop files. |
Semi-OT while we are at it: I believe that some desktops do this kind of thing automatically; hence we should extract everything that we want to "install" to |
I don't think we should overengineer this. The commands run in a tiny fraction of a second on my host. By the way:
|
Haven't you used the wrong command?
|
You're right, @KurtPfeifle, thanks for noting this. Calling this command correctly yields it takes really long, compared to |
"Awesome idea. That might even fix these issues on e.g., XFCE, where the launcher won't show icons of recently integrated desktop files." When the icons do not show up I have found this fixes it: Details here: https://developer.gnome.org/gtk3/stable/gtk-update-icon-cache.html |
@cgarry awesome. I didn't get to testing this yet. Let's add this to the list of commands to run. |
I have just been testing my latest AppImage on a few different VMs with appimaged and I needed to issue all of the following commands to get it correctly working:
Note the -t option was required with the gtk-update-icon-cache command. |
What exactly does that parameter |
Without the -t option gtk-update-icon-cache just returns the error: No theme index file. From https://developer.gnome.org/gtk3/stable/gtk-update-icon-cache.html:
The -t option will be required on all platforms where there is no index.theme file present in the specified icon directory. So I think it is sensible to always use it. This was tested on Ubuntu 16.04. where I deleted a previous version of my AppImage and added a new version. |
I think we can assume the parameter is safe to use on all platforms, if it only disables a check. |
I just tried this on Nitrux (Plasma 5 based), and it seems like the |
"I just tried this on Nitrux (Plasma 5 based), and it seems like the gtk-update-icon-cache command doesn't fix the issue of icons not being shown in the launcher." @TheAssassin I just tried this with a fresh install of Nitrux and it worked for me. Though I did have to log out and in again before the icons appeared. |
I was using a live ISO.
This is what we're trying to avoid. Users shouldn't have to log out and log in again. |
In this case I wonder why they don't get automatically run by the system (as in: GNOME, KDE Plasma, XFCE,... and/or systemd) "when needed" (using something like |
You mean, like appimaged does? There's a lot of issues to consider when implementing file system scans to automate processes like updating caches automatically. Let's compare it to appimaged. appimaged's "initial" file scan can take very long, as it reads every single file in all the directories, and produces high IO load on systems with big Download folders. I guess you never run into this, given you're a distro nomad living off live ISOs, but please bear in mind the average user's directories will become larger and larger every day. Same goes for inotify, by the way. Consider someone's compiling a program "by accident" in their Downloads directory, inotify notifications will go wild, and appimaged has to actually open and read all these files, as it doesn't filter files by their suffix (which is something I'd vote for, by the way, I mean AppImages which don't carry that suffix should just not be considered, that'd reduce the workload to a minimum). Desktop environments probably made the same considerations, and don't perform all these actions when they might seem to be necessary. On Linux, in contrary to macOS, where you don't have so many different systems that need to work together with each other, so it's fairly easy to perform actions like these, as directories for screenshots and alike data are much more hidden from the user, it's easier to run cache updates, I'd say. It's nearly impossible to expect everything working on macOS to work the same way on Linux. One can try to implement those features and have more automation in processes. But when limitations are found which can't be worked around easily, developers have to accept this. By the way, I believe macOS doesn't scan file systems or use something like inotify to be notified for anything. It's much more likely that the tools installed on macOS trigger events like "application downloaded", causing the necessary processes to be run by the system. A push system is, by far, more efficient than any inotify based solution. |
We should actually try to find out how they do it. It's so beautiful - this kind of stuff "just always works" without having to fiddle around. https://developer.apple.com/documentation/coreservices/launch_services |
The problem is, in macOS, such functionality is integrated well with the rest of the system. You could only implement it "like they do it" if AppImage was supported directly by a DE. Auxiliary daemons can't integrate that deeply if the DE lacks the relevant features. appimaged will probably always remain a "workaround" solution for desktop integration. Perhaps you should start lobbying for AppImage supports in desktop environments. |
I am talking about registering icons and mimetypes and such, nothing specific about AppImage. |
On all of the DEs/panels/file managers/etc I've ran, simply having the MimeType in the application's .desktop file and placing it in either For example, I use the tar.gz package for VSCode. After taking the .desktop file from the deb package of VSCode, modifying it to point to the proper directories, and placing it in This is what VSCode's .desktop file looks like:
|
@simoniz0r the "adding to menu" part has been solved. We're now looking for a solution for another bug. The menu entries' icons are not shown, and we haven't found a solution to fix that problem. |
Perhaps it's a problem with the DE? Do icons for native software show up in the menu right after install? I haven't had any issues with this on Xfce, KDE, or LXQt. |
I did, with more than one of them. A DE restart is needed which we want to get rid of. The problem occurs (this is my hypothesis) when the directory we want to place an icon in did not exist at the time when the DE was launched. |
@simoniz0r not only @probonopd did, I have seen the exactly same issues on all DEs I tried so far, and other users report this regularly, too. @probonopd can you test your theory? If that should be the case, I assume we should be able to work around this issue. |
That works fine on my end. Using lxpanel or lxqt-panel and running Personally, the only time I've had an AppImage's icon not show in my menu at all was when the AppImage didn't bundle the icon properly. No reboot/relog required for icons to show on my end. |
Also, I feel like you guys should be pressuring devs to make use of the desktopintegration script more so that appimaged doesn't have to add entries to the menu for them. Every AppImage that has a GUI should be asking whether or not the user wants a menu entry added. With a couple of simple modifications to your current desktopintegration script (just add |
In fact, we are thinking about deprecating it entirely, and encourage people to use the optional |
Please don't. I will not use appimaged on any of my systems. I really, really love the way that AppImages ask me to add them to my menu. I honestly feel like appimaged shouldn't even have to be a thing. AppImages should be taking care of adding themselves to the user's menu themselves and also provide options for easily removing those files. Literally everything that appimaged does should be taken care of by the AppImage and not require an external tool to be ran. Requiring appimaged for desktop menu integration steps away from your vision of how AppImage should work. They should not require external tools to function properly. |
But then, you state:
These two statements contradict. Did you even test the whole thing on the platforms you mentioned? I highly doubt it.
We don't just think about it. We're already working on it. Many AppImages don't ship with the desktop integration anymore. An alternative to this is having desktop environments integrate AppImages, so an alternative daemon isn't necessary.
This is not the right place to discuss this topic. Also, you need to understand one thing: decisions are not made based on your or our or anybody's single, subjective, personal opinion. We analyze how other systems solve the problems we encounter, and which solution average users prefer (i.e., which one is easier to use, less work for the users, etc.). We really perform some research on those topics. And we accept when the results are on the contrary to what we think might be right. A general note on your discussion methods: You tend to post a "-1" on every explaining statement someone posts. This is really annoying, and not constructive at all. Instead, you discredit yourself, and your comments aren't taken seriously by people any more. It is not like these postings would be any kind of "new" ideas which require user feedback. The purpose of such comments is to explain you decisions which have been made earlier. Posting a "-1" on an explaining post is just not quite appropriate. If you feel you have to re-discuss topics, consider posting your opinions on Discourse, the right place for conceptual discussions. |
No. I suggest you take a poll of Linux users and see if they actually want what you're doing. |
The option could be taken care of in a config file. I know you're like ridiculously scared of config files for some reason, but you gotta wake up and realize that not everyone in the world wants the same things that you do. People want things to work in different ways and making your application flexible with config files is a great way to do this. These things would only benefit AppImage in the long run and I really wish you'd just let go of the ridiculous macOS nonsense and start focusing on what Linux users actually want |
If anything, I might ask Mac-to-Linux switchers what they find annoying/complicated about Linux desktops, and what we would need to do to make it as elegant user experience as the Mac. The Linux desktop has the users it has because how it works. AppImage is here to make it work a bit more like on the Mac. For example, a Mac user doesn't even understand why you would need to "install" an application. You can just download it, and open the application from the disk image (or copy it somewhere by drag-and-drop). |
There's just so much wrong with your vision. I guess my best hope is that someone else makes a fork of AppImage. I'm honestly very sick and tired of having to reinvent the wheel every time that I work with AppImages because you're so stuck on your silly macOS philosophies that Linux users do not want at all even remotely. |
It's funny and often a little ridiculous to see both of you claim to know what Linux users want. @probonopd is more focused on "easy-to-use, grandma can do it, Mac-like", whereas @simoniz0r represents the "classic Linux user, used to configurability, likes and enjoys the possibility to tune until the own preferences are sufficiently represented". Both of you don't really know or are able to tell what Linux users want. The reason is: you both represent some fractions of the totality of Linux users. I would never claim something alike, but that might be because of my background in science. @simoniz0r often you seem to be like "you're doing it wrong, you must change your way of doing things, I will explain you how to". This is not really a productive way of proposing changes. AppImages have initially been designed to fit a specific purpose. The fact you don't like these doesn't make them wrong. There are libraries available which allow you to design tools that make your AppImage experience fit your preferences. I personally don't use appimaged, and dislike some of its concepts. This is one of the reason why I took libappimage and work on my own desktop integration solution, which will soon be available in some distros. I really recommend anybody to use and improve libappimage to build new applications dealing with AppImages. |
It's OK to have different viewpoints as long as one realizes that there are legitimately different viewpoints and different priorities. I don't claim to know what all Linux users want - in fact, "Linux users" want so many different opposing things that you can't please everyone. The AppImage project is not there to please "classic Linux users" - this was never its intention (as they are happy with things like Emacs and debhelper and autotools and whatnot), but rather to "the rest of us": multi-platform application authors, ISPs, users who are Mac converts and generally people who don't care about the system and just want to get things done. |
All I'm saying really is there's absolutely no reason why you can't provide both things. You can provide sane defaults and the ability to configure your applications to make both types of users happy. |
Using such strong terms will often backfire. If I'd want to really have such a discussion, I could throw in the maintenance overhead of developing and maintaining a configuration infrastructure... that works across all Linux distributions... etc. appimaged is a highly specific tool, primarily written for @probonopd's use cases. Please don't use it if it doesn't work for you, and try the alternatives. |
That's kinda hard to believe when statements have been made suggesting that the current desktopintegration script would be completely abandoned in favor of using appimaged. |
@simoniz0r the script has been abandoned. Nobody's maintaining it. Also, alternatives to appimaged are already available... |
That's pretty sad to hear, honestly. When paired with something like the lightweight dialog tool, AppImages that make use of this actually feel very professionally done and nice to use. Is AppImageLauncher your alternative? Am I supposed to be bundling this 20MB AppImage in my existing AppImages? If not, you're requiring another piece of software to be installed for AppImages to work nicely which is against the main principles of AppImages to begin with. |
The tool is buggy, lacks lots of features, leaves traces on the system, can't handle removal, ... I could continue the list quite a bit. The original desktop integration script some AppImages rely on is what I referred to. It has the same problems as the other tool that @darealshinji and I have been working on. AppImageLauncher isn't meant to be bundled. If you had read its description:
Neither it goes against any AppImage principles. How could it possibly? Again a wild claim without any explanation... |
AppImages are supposed to work well without needing any additional software installed... |
Desktop integration is not a core requirement for AppImages to run... |
Below are my two cents on the topic, written after a quick read through of the discussion above. Going through that again before submitting, I see that you are already going this way with https://github.com/TheAssassin/AppImageLauncher. I look forward to that tool progressing. -- Similar to some of @simoniz0r's ideas above, I think a decent solution would be to keep This would mean giving up automatic registration when a user downloads an AppImage, but IMO this is a good thing: better to consistently require the first run to be manual than to have a hardcoded list of magic locations where AppImages are automatically integrated, and then everywhere else not integrating at all. The inotify problem goes away because you only need to monitor specific known AppImage file paths instead of arbitrarily large directories. |
https://github.com/TheAssassin/AppImageLauncher/blob/master/src/shared.cpp#L154-L159
We need to fix #12 first, so that we don't invoke those commands after each processed AppImage. |
Closed and moved to the appimaged repository. |
Let's use GitHub's shiny new "Transfer Issue" beta feature for this. 👍 |
That's what was used, wasn't it? |
No, at least it didn't seem to have worked for me... I now did it. |
According to https://discourse.appimage.org/t/how-to-use-linuxdeployqt/275/15,
appimaged
should run(if these commands are available on the
$PATH
) in order to work correctly.Note: This should not be done after each AppImage processed by appimaged in order to save CPU power, but only after the system has quiesced (e.g., no further AppImages have been processed in the last X seconds).
The text was updated successfully, but these errors were encountered: