I've written a software that runs on Ubuntu.. (18.04 and 20.04 tested). I did not package it, since I'm using Arch linux as well, but wrote an installation script. It copies some files and generates a desktop file which is recognized and can be run if I search it in "Activities".
But I do not see it in the "Select Application" dialog if I right click a video (for which the software has been written) and select "Open with Other Application".
The Desktop file looks like this:
#!/usr/bin/env xdg-open
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Exec=/usr/local/bin/VideoCut
Name=Video Cut
Comment=MPG4 cutter
Icon=/usr/local/bin/videocut/icons/movie-icon.png
NoDisplay=false
Categories=GTK;AudioVideo
MimeType=video/dv;video/mpeg;video/x-mpeg;video/msvideo;video/quicktime;video/x-anim;video/x-avi;video/x-ms-asf;video/x-ms-wmv;video/x-msvideo;video/x-nsv;video/x-flc;video/x-fli;video/x-flv;video/vnd.rn-realvideo;video/mp4;video/mp4v-es;video/mp2t;application/ogg;application/x-ogg;video/x-ogm+ogg;audio/x-vorbis+ogg;application/x-matroska;audio/x-matroska;video/x-matroska;video/webm;audio/webm;audio/x-mp3;audio/x-mpeg;audio/mpeg;audio/x-wav;audio/x-mpegurl;audio/x-scpls;audio/x-m4a;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;application/vnd.rn-realmedia;audio/x-real-audio;audio/x-pn-realaudio;application/x-flac;audio/x-flac;application/x-shockwave-flash;misc/ultravox;audio/vnd.rn-realaudio;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-wav;audio/x-pn-windows-acm;image/vnd.rn-realpix;audio/x-pn-realaudio-plugin;application/x-extension-mp4;audio/mp4;audio/amr;audio/amr-wb;x-content/video-vcd;x-content/video-svcd;x-content/video-dvd;
The desktop file works on Xubuntu (and other XFCE Distros) as well as on Lubuntu & Kubuntu with the corresponding "Select Application" dialogs.
Something is missing in that desktop file, that obviously only gnome needs.
To sum it up:
- The application runs
- Can be called via "Activities"
- Is not available in the "Select Applications" dialog, which is opened via right click on a file.
Gnome requires that the
Exec
value contains a placeholder for the file(s) or URL(s). Use%f
for a single file and%F
for multiple files. See the Desktop Entry Specification for the valid placeholders.You may also need to run
sudo update-desktop-database
after your changes to get gnome to pick up on your modifications.