Re: Where does "select application to open..." get its list of programs from??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2012-05-09 at 20:21 -0300, Fernando Cassia wrote:
> I've been pulling my hair about this for hours and going in circles.
> 
> After removing Shotwell from my system, I associated JPG images with
> Paint Shop Pro (running under WINE).
> 
> Now, when I want to select what program to use to open a given .JPG
> file, if I select "Open with ->" I get as options GIMP, Image Viewer,
> Paint Shop Pro, WINE Internet Explorer, WINE internet explorer (yes,
> same program twice), and "Select other program".
> 
> If I click on "Select other program" I get a list of applications but
> NOWHERE is an option to specify a program manually, with path and
> command line options. This is a serious usability disaster.
> 
> Two questions:
> 
> 1. How to remove the duplicates "WINE Internet Explorer" (I' d like to
> remove the two altogether).
> 2. I created a new program launcher, placed it on /usr/bin, made it
> executable, tested it from the command line, and it works. Now for
> heaven's sake how do I associate it with JPG files if the program
> doesn' t appear in the "Select other program" list. I have even
> created a .desktop launcher and icon for the app and placed it on
> /share/applications. I thought this would be enough to make the
> application appear on the list of "Select other program". I rebooted
> to make sure the list got reloaded. But no, doesn' t cut it. My custom
> app doesn' t show up in "Select other program" .
> 
> So I give up... and turn to this list for enlightment...

For 2), you're well along the right track, but you're missing a piece, I
think. (Though actually, I'd probably expect it to show up in 'Select
other program', but that's all fairly new stuff so I'm not entirely sure
how it works).

Check the gimp .desktop file. Note this giant wodge, down the bottom:

MimeType=application/postscript;application/pdf;image/bmp;image/g3fax;image/gif;image/x-fits;image/pcx;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-psd;image/x-sgi;image/x-tga;image/x-xbitmap;image/x-xwindowdump;image/x-xcf;image/x-compressed-xcf;image/x-gimp-gbr;image/x-gimp-pat;image/x-gimp-gih;image/tiff;image/jpeg;image/x-psp;image/png;image/x-icon;image/x-xpixmap;image/svg+xml;image/x-wmf;image/jp2;image/jpeg2000;image/jpx;image/x-xcursor;

Those are all the file types the desktop file claims the app can open.
'image/jpeg' is the key one for jpegs, but you can see lots of other
image types there. (These are all MIME types). This is what GNOME reads
to figure out what apps it reckons can open JPEG files.

You also want to run update-desktop-database, after you create or modify
a .desktop file.

So try adding an appropriate MimeType= field to your custom .desktop
file, and run update-desktop-database, and maybe log out and in again
just for luck, and see if it shows up in the list then.

As for 1), I'm not 100% sure. It sounds like WINE ick. Take a look
around ~/.wine, perhaps?
-- 
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | identi.ca: adamwfedora
http://www.happyassassin.net

-- 
test mailing list
test@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe:
https://admin.fedoraproject.org/mailman/listinfo/test



[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]

  Powered by Linux