1

Just curious - but not only that.

(More on the motivation in this question: Is it possible to install (have ready for use) different versions of VLC?.)

That is, I have found a portable apps source for linux here, I have downloaded the 2.1.2 version of VLC (as motivated in the linked question) but it has some limitations, namely that a video cannot be set to start in that app when double-clicking it (which is doable in Windows).

5
  • 1
    Which program, and have you made a .desktop launcher for it?
    – Wilf
    Jan 21, 2015 at 16:45
  • @Wilf - I have downloaded the appimage of VLC 2.1.2 from here and it can be run as such, but I cannot set it as default nor make a nice looking launcher for it, or desktop file linking to it
    – user47206
    Jan 21, 2015 at 16:50
  • (I am prone to seeing curiosity as the opposite of block-headedness.)
    – user47206
    Jan 21, 2015 at 16:58
  • @Wilf - "what program etc" -- my question contains a link to another question and there it is. Now I edited the Q to add that info :)
    – user47206
    Jan 21, 2015 at 17:00
  • askubuntu.com/q/13758/178596 may also be relevant, but this would create a launcher that probably could not open files directly from a file manager
    – Wilf
    Jan 21, 2015 at 17:15

1 Answer 1

3

It is possible to set a portable application as default, but if you have a special filetype (e.g. .skp for SketchUp under Wine), you need to create a mimetype, and then add the 'MimeType' to the launcher file (I found this out by looking at wine deals with stuff by placing launchers in ~/.local/share/applications and stuff in ~/.local/share/mime). You can check if it has a mimetype by looking at the File's properties in Nautilus (may work with other file managers):

screenshot of file properties window

If the mimetype already exists (e.g. text/plain), it is quite easy to make a launcher for it. As an example, you can create a launcher like this:

[Desktop Entry]
Type=Application
Name=Custom Program
Icon=firefox
MimeType=text/plain;
Exec=gnome-terminal -e "nano %f "
NoDisplay=true
StartupNotify=true

save it to ~/.local/share/applications/Custom Program.desktop, and you should get (perhaps after logout/login, restarting the file manager, running update-desktop-database ~/.local/share/applications/ or something):

Which should be able to open txt files in nano in gnome terminal. You should also be able to make this program default in the File manager;s properties.

If you are using a custom version of a existing system installed version of a program such as VLC, you can make/edit a launcher based on the existing one in /usr/share/applications:

[Desktop Entry]
Version=1.0
Name=VLC media player
GenericName=Media player
Comment=Read, capture, broadcast your multimedia streams
Exec=/usr/bin/vlc --started-from-file %U
TryExec=/usr/bin/vlc
Icon=vlc
Terminal=false
Type=Application
Categories=AudioVideo;Player;Recorder;
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;audio/ogg;video/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;x-content/audio-cdda;x-content/audio-player;application/xspf+xml;x-scheme-handler/mms;x-scheme-handler/rtmp;x-scheme-handler/rtsp;
X-KDE-Protocols=ftp,http,https,mms,rtmp,rtsp,sftp,smb
Keywords=Player;Capture;DVD;Audio;Video;Server;Broadcast;
X-Desktop-File-Install-Version=0.22

You could use this, modify the Exec and Name path (you can remove the TryExec), add it to one of the application launcher directories, and have your own custom VLC launcher :)

See also:


For an example on how to set as default portable applications downloaded from portablelinuxapps.org or others made portable with the utilities that can be also downloaded from there, take a look at this answer about VLC.

4
  • Your answer provided the needed info and especially corrections to what I already but not quite did... Just editing the default VLC desktop file from /usr/share/applications worked to create a launcher for the VLC appimage. Now, that very launcher can be set in a video file properties as default program for that filetype. - I can add these simple steps to your answer and make it definitive. The Wine/mimetype part is not needed I guess.
    – user47206
    Jan 22, 2015 at 10:51
  • askubuntu.com/a/576202/47206
    – user47206
    Jan 22, 2015 at 11:03
  • I will add an answer of my own (based on what I posted in askubuntu.com/a/576202/47206) that I will delete if you permit me to edit your answer and add that into it, or if you do that yourself
    – user47206
    Jan 22, 2015 at 11:17
  • Edit my answer if u like :)
    – Wilf
    Jan 22, 2015 at 15:02

You must log in to answer this question.