The xdg-utils package is a set of simple scripts that provide basic desktop integration functions for any Free Desktop, such as Linux.
I used to open text files with sublime, and for Read-only files, I used to do : sudo sublime. But now …
ssh gtk ubuntu-14.04 sudo xdgutils