How do I create my spec file so that I my gui application can be launched by double clicking a filetype it is associated with via mimetype?
This is what I've done so far: - I have updated my .desktop file so that it includes MimeType=application/x-supes-saved; - In my spec I have successfully used xdg-mime and xdg-icon-resource so that files with my custom extension (.supes) has my custom icon.
But when I double click on one of my files, I am prompted with a modal dialog "There is no application installed for Superman Saved Game files". When I opt to "Select Application" my application is not listed either. (The application's desktop icon is successfully installed and runs under the application menu).
Any suggestions? Thank you.
On 02/15/2011 01:11 PM, Erik Blankinship wrote:
How do I create my spec file so that I my gui application can be launched by double clicking a filetype it is associated with via mimetype?
This is what I've done so far:
- I have updated my .desktop file so that it
includes MimeType=application/x-supes-saved;
good.
- In my spec I have successfully used xdg-mime and xdg-icon-resource so
that files with my custom extension (.supes) has my custom icon.
bad. xdg-* tools are intended for user-space, not system-space (ie, not to be used in pkg scriptlets).
See here for details, https://fedoraproject.org/wiki/Packaging/ScriptletSnippets
sections on 'desktop-database', 'mimeinfo', and possibly 'icon-cache'
-- Rex
- In my spec I have successfully used xdg-mime and xdg-icon-resource so
that files with my custom extension (.supes) has my custom icon.
bad. xdg-* tools are intended for user-space, not system-space (ie, not to be used in pkg scriptlets).
See here for details, https://fedoraproject.org/wiki/Packaging/ScriptletSnippets
sections on 'desktop-database', 'mimeinfo', and possibly 'icon-cache'
Thanks Rex! I did not notice my icons and mime types associations were being set on rpmbuild. Now I have my application associated with my custom mime-type using scriptlets.
However, I am not clear on how I am supposed to associate files with my mime-type with a custom icon.
xdg-icon-resource made it pretty simple to associate an icon with a mimetype, but if I am reading https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#Icon_Cachecorrect..., I need to create an icon for every theme? Is there a preferred way to just set a custom icon for all themes?
xdg-icon-resource made it pretty simple to associate an icon with a mimetype, but if I am reading https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#Icon_Cachecorrect..., I need to create an icon for every theme? Is there a preferred way to just set a custom icon for all themes?
got it
http://lists.fedoraproject.org/pipermail/packaging/2008-July/004827.html
On Tue, Feb 15, 2011 at 2:11 PM, Erik Blankinship erikb@mediamods.comwrote:
How do I create my spec file so that I my gui application can be launched by double clicking a filetype it is associated with via mimetype?
This is what I've done so far:
- I have updated my .desktop file so that it
includes MimeType=application/x-supes-saved;
Modified my .desktop file so that exec=/path/to/app.py %F
Now, when I double click on a file associated with my mime type, my application comes up in the list of files I can associate with that file's extension.
Is there a way to bind the extension and the application when my rpm is installed?
packaging@lists.fedoraproject.org