Here it is the solution in order to add the 'open terminal here' into the context menu of Elementary OS' file manager (generically called 'Files' - the executable is pantheon-files).
For that specific demand, the idea is to create the file /usr/share/contractor/terminal.contract and add something like
[Contractor Entry]
Name=Open Terminal here
Icon=terminal
Description=Open Terminal here
MimeType=inode;application/x-sh;application/x-executable;
Exec=pantheon-terminal -d %U
Gettext-Domain=pantheon-terminal
But how to adapt that and have a model to add other commands, namely - following my order of priorities - 'open folder as root'?


