I've been trying to make a program that lives in /usr/bin
, and it currently works fine from the terminal (because every beginner tutorial teaches you how to use terminal commands) but it doesn't work when I try running it from the file manager.
I want to know what kind of command/data/whatever is sent by Nautilus/Caja/Dolphin/PCManFM when a file is double-clicked, or right-clicked and an "Open With" option is selected, and what a program in any language would need to do to get the path to the file it needs to manipulate from that. The only language I know how to do this in is BASH script, and BASH's syntax prevents me from searching for information about what my code does.
This subject in general is very hard to search for, so I'd appreciate any information about it.
EDIT: to clarify, when I click here:
What data is sent to the program "bleh", and how should it use that data?
I shouldn't need to restate this...