Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 474  / 1 Year ago, fri, february 10, 2023, 12:36:57

I wish to use mplayer to generate thumbnails for nautilus, so I wrote a perl script as the thumbnailer named "gnome_thumbnailer_with_mplayer", and wrote a description in /usr/share/thumbnailers to tell the system to find the thumbnailer.



At the beginning, the description is:



[Thumbnailer Entry]
TryExec=/home/allfox/programs/gnome_thumbnailer_with_mplayer
Exec=/home/allfox/programs/gnome_thumbnailer_with_mplayer %u %o %s
MimeType=application/vnd.rn-realmedia;application/mxf;application/ogg;application/ram;application/sdp;application/vnd.ms-wpl;application/x-extension-m4a;application/x-extension-mp4;application/x-flash-video;application/x-matroska;application/x-netshow-channel;application/x-ogg;application/x-quicktimeplayer;application/x-shorten;image/vnd.rn-realpix;image/x-pict;misc/ultravox;text/x-google-video-pointer;video/3gpp;video/dv;video/fli;video/flv;video/mp2t;video/mp4;video/mp4v-es;video/mpeg;video/msvideo;video/ogg;video/quicktime;video/vivo;video/vnd.divx;video/vnd.rn-realvideo;video/vnd.vivo;video/webm;video/x-anim;video/x-avi;video/x-flc;video/x-fli;video/x-flic;video/x-flv;video/x-m4v;video/x-matroska;video/x-mpeg;video/x-ms-asf;video/x-ms-asx;video/x-msvideo;video/x-ms-wm;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvx;video/x-nsv;video/x-ogm+ogg;video/x-theora+ogg;video/x-totem-stream;audio/x-pn-realaudio;audio/3gpp;audio/ac3;audio/AMR;audio/AMR-WB;audio/basic;audio/midi;audio/mp2;audio/mp4;audio/mpeg;audio/ogg;audio/prs.sid;audio/vnd.rn-realaudio;audio/x-aiff;audio/x-ape;audio/x-flac;audio/x-gsm;audio/x-it;audio/x-m4a;audio/x-matroska;audio/x-mod;audio/x-mp3;audio/x-mpeg;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;audio/x-ms-wma;audio/x-musepack;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-wav;audio/x-pn-windows-acm;audio/x-realaudio;audio/x-real-audio;audio/x-sbc;audio/x-speex;audio/x-tta;audio/x-wav;audio/x-wavpack;audio/x-vorbis;audio/x-vorbis+ogg;audio/x-xm;application/x-flac;


Everything works. But later I realized that I can sync this kind of little script to Ubuntu One, so I moved the thumbnailer(named "gnome_thumbnailer_with_mplayer", not the description) to ~/Ubuntu One. Then I changed the description to:



[Thumbnailer Entry]
TryExec=/home/allfox/Ubuntu One/fun_goods/thumbnailer/gnome_thumbnailer_with_mplayer
Exec=/home/allfox/Ubuntu One/fun_goods/thumbnailer/gnome_thumbnailer_with_mplayer %u %o %s
MimeType=application/vnd.rn-realmedia;application/mxf;application/ogg;application/ram;application/sdp;application/vnd.ms-wpl;application/x-extension-m4a;application/x-extension-mp4;application/x-flash-video;application/x-matroska;application/x-netshow-channel;application/x-ogg;application/x-quicktimeplayer;application/x-shorten;image/vnd.rn-realpix;image/x-pict;misc/ultravox;text/x-google-video-pointer;video/3gpp;video/dv;video/fli;video/flv;video/mp2t;video/mp4;video/mp4v-es;video/mpeg;video/msvideo;video/ogg;video/quicktime;video/vivo;video/vnd.divx;video/vnd.rn-realvideo;video/vnd.vivo;video/webm;video/x-anim;video/x-avi;video/x-flc;video/x-fli;video/x-flic;video/x-flv;video/x-m4v;video/x-matroska;video/x-mpeg;video/x-ms-asf;video/x-ms-asx;video/x-msvideo;video/x-ms-wm;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvx;video/x-nsv;video/x-ogm+ogg;video/x-theora+ogg;video/x-totem-stream;audio/x-pn-realaudio;audio/3gpp;audio/ac3;audio/AMR;audio/AMR-WB;audio/basic;audio/midi;audio/mp2;audio/mp4;audio/mpeg;audio/ogg;audio/prs.sid;audio/vnd.rn-realaudio;audio/x-aiff;audio/x-ape;audio/x-flac;audio/x-gsm;audio/x-it;audio/x-m4a;audio/x-matroska;audio/x-mod;audio/x-mp3;audio/x-mpeg;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;audio/x-ms-wma;audio/x-musepack;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-wav;audio/x-pn-windows-acm;audio/x-realaudio;audio/x-real-audio;audio/x-sbc;audio/x-speex;audio/x-tta;audio/x-wav;audio/x-wavpack;audio/x-vorbis;audio/x-vorbis+ogg;audio/x-xm;application/x-flac;


But it not works. I just can't get any thumbnail in nautilus. I thought the only change I made is the TryExec and Exec path, and the new path contains a space, this maybe the problem, how can I fix it?



I'm using 12.04 LTS.


More From » ubuntu-one

 Answers
5

For the record, you can also synchronize other folders in your home directory with Ubuntu One, rather than simply copying all the files you want synchronized into ~/Ubuntu One.



Also, you can use quotes in the Exec line (not sure about TryExec). So Exec="/home/allfox/Ubuntu One/fun_goods/thumbnailer/gnome_thumbnailer_with_mplayer" %u %o %s should work. You can try using the quotes in TryExec as well. If the quotes don't work there, you can also probably just remove the TryExec line, and it should work.



Also of note, is that Ubuntu One does not preserve permissions bits, so the executable bit on the script may have been lost, and thus the script would fail to execute as a result.


[#36190] Sunday, February 12, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
allally

Total Points: 487
Total Questions: 106
Total Answers: 110

Location: Laos
Member since Sun, Jul 3, 2022
2 Years ago
;