Thunar - "option not known"  [Solved]

For issues with MX that has been modified from the initial install. Example: adding packages that then cause issues.
Message
Author
User avatar
fehlix
Developer
Posts: 12733
Joined: Wed Apr 11, 2018 5:09 pm

Re: Thunar - "option not known"

#11 Post 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.

User avatar
AVLinux
Posts: 3012
Joined: Wed Jul 15, 2020 1:15 am

Re: Thunar - "option not known"

#12 Post 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.

User avatar
fehlix
Developer
Posts: 12733
Joined: Wed Apr 11, 2018 5:09 pm

Re: Thunar - "option not known"

#13 Post 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.

Aronticuz
Posts: 353
Joined: Wed May 04, 2022 1:04 pm

Re: Thunar - "option not known"

#14 Post 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

User avatar
AVLinux
Posts: 3012
Joined: Wed Jul 15, 2020 1:15 am

Re: Thunar - "option not known"

#15 Post 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...

User avatar
i_ri
Posts: 1106
Joined: Tue Jun 30, 2015 12:26 am

Re: Thunar - "option not known"

#16 Post 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

User avatar
AVLinux
Posts: 3012
Joined: Wed Jul 15, 2020 1:15 am

Re: Thunar - "option not known"

#17 Post 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

User avatar
i_ri
Posts: 1106
Joined: Tue Jun 30, 2015 12:26 am

Re: Thunar - "option not known"

#18 Post 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

User avatar
i_ri
Posts: 1106
Joined: Tue Jun 30, 2015 12:26 am

Re: Thunar - "option not known"

#19 Post 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.

User avatar
i_ri
Posts: 1106
Joined: Tue Jun 30, 2015 12:26 am

Re: Thunar - "option not known"

#20 Post by i_ri »

Image
mate desktop on MXkde system. caja and pcmanfm work with mediainfo context menu.

Post Reply

Return to “MX Modified”