Hello. I'm developing an application for desktop which consist on digital treatment of images. The idea is not to open the terminal to launch the program, but there's a little problem: I don't know how Nautilus know that .jpg (or .png) files can be opened with my program, and what can I do to get this.
Thanks to all!
On Mon, 2013-04-08 at 18:00 +0200, Víctor Fernández wrote:
Hello. I'm developing an application for desktop which consist on digital treatment of images. The idea is not to open the terminal to launch the program, but there's a little problem: I don't know how Nautilus know that .jpg (or .png) files can be opened with my program, and what can I do to get this.
Install a desktop file for your application, and add a MimeType= line to it, listing the mimetypes your application can handle.
See /usr/share/applications/gimp.desktop for inspiration
Sorry for taking so much time to reply.
My app has a .desktop file, but, what do you mean about "install a desktop file"? Is not enough to copy the file to /usr/share/applications?
I had already changed the mimetipes of my app and this doesn't works.
Thanks for your help!
2013/4/8 Matthias Clasen mclasen@redhat.com
On Mon, 2013-04-08 at 18:00 +0200, Víctor Fernández wrote:
Hello. I'm developing an application for desktop which consist on digital treatment of images. The idea is not to open the terminal to launch the program, but there's a little problem: I don't know how Nautilus know that .jpg (or .png) files can be opened with my program, and what can I do to get this.
Install a desktop file for your application, and add a MimeType= line to it, listing the mimetypes your application can handle.
See /usr/share/applications/gimp.desktop for inspiration
-- desktop mailing list desktop@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/desktop
On Wed, 2013-04-10 at 17:25 +0200, Víctor Fernández wrote:
Sorry for taking so much time to reply.
My app has a .desktop file, but, what do you mean about "install a desktop file"? Is not enough to copy the file to /usr/share/applications?
I had already changed the mimetipes of my app and this doesn't works.
After changing mimetypes, and copying the file to /usr/share/applications, you have to run update-desktop-database.
Thanks for your reply, but I have tried this command and even reboot the system, and this doesn't works. Note that in Ubuntu, with the same file and program, this steps you describe are enough to get what I want, but doesn't work with fedora.
Thanks!
2013/4/10 Matthias Clasen mclasen@redhat.com
On Wed, 2013-04-10 at 17:25 +0200, Víctor Fernández wrote:
Sorry for taking so much time to reply.
My app has a .desktop file, but, what do you mean about "install a desktop file"? Is not enough to copy the file to /usr/share/applications?
I had already changed the mimetipes of my app and this doesn't works.
After changing mimetypes, and copying the file to /usr/share/applications, you have to run update-desktop-database.
-- desktop mailing list desktop@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/desktop
Víctor Fernández wrote:
Thanks for your reply, but I have tried this command and even reboot the system, and this doesn't works. Note that in Ubuntu, with the same file and program, this steps you describe are enough to get what I want, but doesn't work with fedora.
Can you post the .desktop file you use so we can look it over and try it out?
-- rex
This is the file: - - - [Desktop Entry] Encoding=UTF-8 Name=Pimagizer Icon=/usr/share/pimagizer/pimagizer.svg Comment=Resize images using Python Comment[es]=Redimensione imágenes usando python Exec=/usr/bin/pimagizer Terminal=false Type=Application Categories=GNOME;GTK;Utility; StartupNotify=False MimeType=image/jpeg;image/png - - - I have tried with a lot of mimetypes, but it doesn't works with anyone.
Thanks
2013/4/11 Rex Dieter rdieter@math.unl.edu
Víctor Fernández wrote:
Thanks for your reply, but I have tried this command and even reboot the system, and this doesn't works. Note that in Ubuntu, with the same file and program, this steps you describe are enough to get what I want, but doesn't work with fedora.
Can you post the .desktop file you use so we can look it over and try it out?
-- rex
-- desktop mailing list desktop@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/desktop
On Thu, 2013-04-11 at 23:39 +0200, Víctor Fernández wrote:
This is the file:
[Desktop Entry] Encoding=UTF-8 Name=Pimagizer Icon=/usr/share/pimagizer/pimagizer.svg Comment=Resize images using Python Comment[es]=Redimensione imágenes usando python Exec=/usr/bin/pimagizer Terminal=false Type=Application Categories=GNOME;GTK;Utility; StartupNotify=False MimeType=image/jpeg;image/png
You are missing a semicolon at the end. Thats the way lists in desktop files work. Compare Categories.
Ok. I got it. The semicolon wasn't the main problem: I haven't said in "Exec" that my program accepts urls or filenames. I've solved changing the line of Exec by this one:
Exec=/usr/bin/pimagizer %F
Thanks to all. Bye
2013/4/12 Matthias Clasen mclasen@redhat.com
On Thu, 2013-04-11 at 23:39 +0200, Víctor Fernández wrote:
This is the file:
[Desktop Entry] Encoding=UTF-8 Name=Pimagizer Icon=/usr/share/pimagizer/pimagizer.svg Comment=Resize images using Python Comment[es]=Redimensione imágenes usando python Exec=/usr/bin/pimagizer Terminal=false Type=Application Categories=GNOME;GTK;Utility; StartupNotify=False MimeType=image/jpeg;image/png
You are missing a semicolon at the end. Thats the way lists in desktop files work. Compare Categories.
-- desktop mailing list desktop@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/desktop
desktop@lists.stg.fedoraproject.org