Page 2 of 3

Re: Thunar - "option not known"

Posted: Sat Oct 19, 2024 3:32 pm
by fehlix
AVLinux wrote: Sat Oct 19, 2024 3:17 pm That makes sense, thanks to you and @fehlix for 2 working solutions, every one of these little quirks teaches me something and I'm happy to keep learning and happy to have a working FM independent Mediainfo launcher!
In case you have a desktop-entry which needs multiple file arguments, e.g. as %F,
you would do similar and let %F as last argument with the Exec-key line.
You can than assign - and well quoted to preserve spaces in file names - all arguments to an array, and go through the array.
But don't want to bother you now with the code, just in case, you ever have such thing, any you may wonder why sometimes something is not working when spaces are involved.

Re: Thunar - "option not known"

Posted: Sat Oct 19, 2024 3:40 pm
by AVLinux
fehlix wrote: Sat Oct 19, 2024 3:32 pm
AVLinux wrote: Sat Oct 19, 2024 3:17 pm That makes sense, thanks to you and @fehlix for 2 working solutions, every one of these little quirks teaches me something and I'm happy to keep learning and happy to have a working FM independent Mediainfo launcher!
In case you have a desktop-entry which needs multiple file arguments, e.g. as %F,
you would do similar and let %F as last argument with the Exec-key line.
You can than assign - and well quoted to preserve spaces in file names - all arguments to an array, and go through the array.
But don't want to bother you now with the code, just in case, you ever have such thing, any you may wonder why sometimes something is not working when spaces are involved.
I will keep that in mind, so far most of these Launcher actions are simple one-step operations but I'm sure I will find more complex batch-type of things I might want to do as need arises.

Re: Thunar - "option not known"

Posted: Sat Oct 19, 2024 4:00 pm
by fehlix
AVLinux wrote: Sat Oct 19, 2024 3:40 pm
fehlix wrote: Sat Oct 19, 2024 3:32 pm
AVLinux wrote: Sat Oct 19, 2024 3:17 pm That makes sense, thanks to you and @fehlix for 2 working solutions, every one of these little quirks teaches me something and I'm happy to keep learning and happy to have a working FM independent Mediainfo launcher!
In case you have a desktop-entry which needs multiple file arguments, e.g. as %F,
you would do similar and let %F as last argument with the Exec-key line.
You can than assign - and well quoted to preserve spaces in file names - all arguments to an array, and go through the array.
But don't want to bother you now with the code, just in case, you ever have such thing, any you may wonder why sometimes something is not working when spaces are involved.
I will keep that in mind, so far most of these Launcher actions are simple one-step operations but I'm sure I will find more complex batch-type of things I might want to do as need arises.
Also keep in mind, the one way where you have %f within the quoted string may work within one file-manager but may also fail within another. Or may fail after an upgrade of that file manger to a newer version. It's highly dependent how the maintainer of the filemanger code do implement cases where spaces are involved. The way guaranteed to work is by going with the spec as mentioned.
Otherwise you may need fix later what now seem to work. I'd prefer fix now, not wait until it breaks.

Re: Thunar - "option not known"

Posted: Sat Oct 19, 2024 4:40 pm
by Aronticuz
AVLinux wrote: Sat Oct 19, 2024 10:15 am Hi,

Background
... (Dolphin is untested at this point) except for one stubborn edge-case I can't figure out..
I don't know if it helps at all but one thing I have noticed in KRunner searches (Dolphin related?) is that some files appear twiced.

Once as I entered in search field and once again with filename appended with .desktop

It seems to be a recent observation on my part

Re: Thunar - "option not known"

Posted: Sat Oct 19, 2024 7:26 pm
by AVLinux
Aronticuz wrote: Sat Oct 19, 2024 4:40 pm
AVLinux wrote: Sat Oct 19, 2024 10:15 am Hi,

Background
... (Dolphin is untested at this point) except for one stubborn edge-case I can't figure out..
I don't know if it helps at all but one thing I have noticed in KRunner searches (Dolphin related?) is that some files appear twiced.

Once as I entered in search field and once again with filename appended with .desktop

It seems to be a recent observation on my part
Not sure what's going on there, I actually had uninstalled KDE before I got the brainwave to make my launchers also work with Dolphin, that's why my quote says 'untested'.. The quirk from today was Thunar-only. I did enjoy using KDE and thought it was very attractive but I did notice some of the menu anomalies you mention, it seems to save it's recent sessions and changes to applications and menus could take a few boots to show up sometimes in my experience but in my newbness it could also as easily just been a wrong setting I made.. I will say installing KDE on a system with another DE and then uninstalling it is a messy business, I have all hunted down all KDE Packages and uninstalled from with MXPI and lots of cruft and bad configs left on my system, I will definitely need to reinstall to properly get back to pre-KDE conditions sadly, but I digress...

Re: Thunar - "option not known"

Posted: Sat Oct 19, 2024 10:12 pm
by i_ri
Hello AVLinux and Everyone
mediainfo just stopped on () parenthesis in file name. how about you?
this:/tubbagn/20_-_The_Ten_Black_Berries_(St._James_Infirmary).mp3

edit: inside double or single quote the paren filename works

Re: Thunar - "option not known"

Posted: Sat Oct 19, 2024 11:18 pm
by AVLinux
@i_ri

Thanks for the info. If you replace the 'Exec=' line in mediainfo.desktop with @fehlix suggestion do parenthesis work?

Code: Select all

Exec=sh -c 'f="$0"; mediainfo "$f" | yad --text-info --wrap --title="Media Info" --image-on-top --image=/usr/local/share/icons/custom/mediainfo-app.png --text="<b>Displaying Codec Info and Details for the Selected File</b>" --text-align=center --fontname="Red Hat Text Medium" --window-icon=/usr/local/share/icons/custom/mediainfo.png --width=640 --height=400 --borders=24' %f

Re: Thunar - "option not known"

Posted: Sat Oct 19, 2024 11:50 pm
by i_ri
Exec=sh -c 'f="$0"; mediainfo "$f" | yad --text-info --wrap --title="Media Info" --image-on-top --image=/usr/local/share/icons/custom/mediainfo-app.png --text-align=center --fontname="Red Hat Text Medium" --window-icon=/usr/local/share/icons/custom/mediainfo.png --width=640 --height=400 --borders=24 --text="<b>Displaying Codec Info and Details for the Selected File</b>"' %f
Hello AVLinux
having this in .desktop works in thunar and efm and dolphin.
Image

Re: Thunar - "option not known"

Posted: Sun Oct 20, 2024 2:00 am
by i_ri
Hello AVLinux and everyone
The preceding Exec does work in the file managers, but
, but sending it through desktop-file-validate /usr/share/applications/mediainfo.desktop
reports a mess.

Getting a clean report from desktop-file-validate and working in thunar, efm, dolphin is this modified Exec. Now it needs pass fehlix' standards and tests for spaces and such expected for a clean report from fehlix. Does it work?

Exec=sh -c " f=\\${0}; mediainfo \\${f} | yad --text-info --wrap --title='Media Info' --image-on-top --image=/usr/local/share/icons/custom/mediainfo-app.png --text-align=center --fontname='Red Hat Text Medium' --window-icon=/usr/local/share/icons/custom/mediainfo.png --width=640 --height=400 --borders=24 --text='<b>Displaying Codec Info and Details for the Selected File</b>' " %f

Image
this fluxbox Thunar is on AVLinux-mxe system.

Re: Thunar - "option not known"

Posted: Sun Oct 20, 2024 6:51 am
by i_ri
Image
mate desktop on MXkde system. caja and pcmanfm work with mediainfo context menu.