DOOMer / screengrab

Crossplatform tool for fast making screenshots.
http://screengrab.doomer.org/
GNU General Public License v2.0
23 stars 8 forks source link

Open with external program not listed in 'Edit In' #42

Closed wildsurfer closed 10 years ago

wildsurfer commented 10 years ago

My environement

Window Manager: i3wm Linux Distro: gentoo Screengrab Version: 1.0

The problem

When I click 'Advanced'->'Edit In' I see list of programs: Feh, Gimp, Xfi etc... But there is no xpaint there (I have it installed and working).

Is there any way to add it there manually?

jleclanche commented 10 years ago

At a guess this is an issue with xpaint's .desktop file. What mime types does it register?

wildsurfer commented 10 years ago

Unfortunately xpaint doesn't have .desktop file in gentoo. However I created it manually with no luck:

 $ cat /home/kuzma/.local/share/applications/xpaint.desktop 
[Desktop Entry]
Name=Xpaint
Comment=MS Paint like image editor
Exec=xpaint %f
Terminal=false
Type=Application
Icon=/usr/share/xpaint/XPaintIcon.xpm
Categories=Graphics;2DGraphics;Viewer;
MimeType=image/bmp;image/gif;image/jpeg;image/jpg;image/pjpeg;image/png;image/tiff;image/x-bmp;image/x-pcx;image/x-png;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-tga;image/x-xbitmap;
Name[en_US]=xpaint

Do I need to do some magic with xdg-* commands?

jleclanche commented 10 years ago

You need to run update-desktop-database.

wildsurfer commented 10 years ago

Thanks for advice! Now I have updated cache but screengrab still doesn't see it =/

kuzma@kuzma-laptop ~/.local/share/applications $ update-desktop-database /home/kuzma/.local/share/applications/
Press any key to continue...

kuzma@kuzma-laptop ~/.local/share/applications $ cat /home/kuzma/.local/share/applications/mimeinfo.cache 
[MIME Cache]
image/bmp=xpaint.desktop;
image/gif=xpaint.desktop;
image/jpeg=xpaint.desktop;
image/jpg=xpaint.desktop;
image/pjpeg=xpaint.desktop;
image/png=xpaint.desktop;
image/tiff=xpaint.desktop;
image/x-bmp=xpaint.desktop;
image/x-pcx=xpaint.desktop;
image/x-png=xpaint.desktop;
image/x-portable-anymap=xpaint.desktop;
image/x-portable-bitmap=xpaint.desktop;
image/x-portable-graymap=xpaint.desktop;
image/x-portable-pixmap=xpaint.desktop;
image/x-tga=xpaint.desktop;
image/x-xbitmap=xpaint.desktop;
Press any key to continue...

I think this is because screengrab doesn't see my local mimeinfo.cache

DOOMer commented 10 years ago

I think this is because screengrab doesn't see my local mimeinfo.cache

Yes, I don't implemented reading local mimieifo.cache in the 1.0 codebase. I add them today and I will release this weekend fixed version

wildsurfer commented 10 years ago

Thanks a lot!

jleclanche commented 10 years ago

@DOOMer QtXdg from the razor-now-lxqt project has this capability. You should probably use that instead.

DOOMer commented 10 years ago

@Adys thanks, maybe I will use that in future. Functionality of the QtXdg too overkill for my application at the moment.