for example i want to run: recode ms-ee “pathtofile”
and i would like to execute this via gui without the need to open terminal and waste time copying, typing. Somehow for example Right click file / submenu / and “run recode” or something like that and it will run the custom command with custom parameters for the selected file.
Currently i am using XFCE and Dolphin file manager.
When i set the recode.desktop file to text/plain instead of text/* then it started showing the menu.
But the file is not recoded after i click the menu entry, like the command is not executed. So i am wondering how to debug this.
UPDATE: when i launch $ dolphin from command line, and right click the file, it add line:
Cannot initialize model with data QJsonObject() . missing: QJsonValue(string, “urls”)
when i click my custom menu entry it says:
/usr/bin/recode: Request `win-ee’ is erroneous
yes, in previous file version i have used erroneous parameter, but my current file has correct one: ms-ee
So do i have to restart something? I am launching Dolphin a new to test.
thank you all, @badbodh Your command may be useful for more complex commands as i read in tutorial. Thank you all for replies as it motivated me to find the solution. What helped to solve the issue is following workaround (other ways to solve are welcome if you share):
mv recode.desktop recode2.desktop
dolphin
…exit dolphin…
mv recode2.desktop recode.desktop
set the exec line like this inside the file:
Exec=recode ms-ee “%U”
(the quotation marks was important as the file can contain spaces etc.)
and all works now. I am curious if i can group my custom actions into some sub menu now.
update, yes i just need to add new line below [Desktop Entry] line to the .desktop file: