-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Examine the impact of desktop file parsing changes to commonly used desktop files #181
Comments
For me, distrobox-export generated .desktop files are also broken because of extra spaces between the Exec arguments. The parser fails to read the arguments so distrobox uses the default container name, breaking the app launch. |
@ph919imperial Thanks for reporting! I'll try to make all these desktop files functional in the next release. It is unfortunate that j4-dmenu-desktop will have to employ hacks to be able to support nonconforming desktop files. |
My planI want to create a whole system for enabling "hacks"/backwards compatible behavior. This system would have only two states as of now (but this could be expanded in the future):
I don't think that each hack should have it's own flag (my WIP version uses
The "fully conformant behavior" state should be mutaly exclusive with all other states (you can't have strict behavior and enable Wine hack). Reusing the same flag ( My current solution is to create a second long-only flag which would be mutaly exclusive with CompletionsI have been trying to implement these changes in completion scripts. I don't really care about the Bash completion script, I don't think I will be implementing mutal exclusivity there (unless it is simple to implement, which I assume it is not in Bash). ZSH supports this. Fish's completion system is simple but limited. I wasn't able to find any resources about implementing mutaly exclusive flags in its completion scripts, but I think that it should be possible. I will do further research. UII am still not sure about the proper way to make a proper UI for this (which flags to add, how to name them and how they should behave). This isn't really a thing that can be fixed later, I can't really change these flags after I put them in a released version. I want to make sure that the UI I implement is correct and meets user's expectations. I currently only need two states, so adding a My WIP version uses Default behaviorThe Wine hack will be enabled by default. DistroboxI have yet to examine Distrobox's behavior. The Wine hack could fix Distrobox too, I'll have to test that. If that doesn't work, I could introduce a third state/"hack" for Distrobox. Old parsing systemThe "simplest" solution would be to reintroduce the old parsing system, under which all desktop files worked as expected. I will not remove the new desktop file & I would like to avoid adding the old parsing system back. If I had to add it, I would have to implement all the edge cases I listed above twice. Some of them are difficult to implement right, so this would add work. It would require extensive testing. But if enough users report issues with the new desktop file & If that will be necessary, I will support both systems. I will use the new one by default. Detection of faulty desktop files could be implemented. If that is the case, j4-dmenu-desktop could fall back to the old system. |
See #181 for motivation of this change.
Issues like #175 and #174 (comment) have brought this to my attention.
It looks like Wine desktop files do not work with the current system. This is (to my knowledge) a bug in Wine, its desktop files do not conform to the Desktop entry specification. But it still means that the new update could have broken some desktop files.
I am thinking about introducing a long-only flag which would enable the old desktop file parsing if the user wants it. I could introduce several modes such as a) off b) try the new parsing, if that fails, try the old one c) force old parsing e) try to detect whether the parsed desktop file was generated by Wine and if yes, enable old parsing.
I could also implement some escaping hack to make the escapes Wine tries to use in its desktop files work.
The thing I'm unsure about is what the default should be. If anyone is reading this, I would appreciate any feedback. The current behavior is a) (because the old desktop file parsing was completely replaced in
r3.1
). I was thinking about making b) the new default. This will be subject to change in versionsr3.2>
, support for the old system should be ideally phased out.The text was updated successfully, but these errors were encountered: