[Tex/LaTex] Create a link to open a script as a text file (don’t run it) from a latex document in linux

editorshyperreflinks

I would like a command such as this:

\href{../src/wkfl/vlyUpstrOvrlp.sh}{vlyUpstrOvrlp}

but I want the subsequent link to open the file in gedit or the default text editor in linux. Bonus points if it also works in windows.

Best Answer

Make a small script "rungedit" containing

#!/bin/bash --
gedit /path/to/vlyUpstrOvrlp.sh

and use

\href{run:rungedit}{vlyUpstrOvrlp}

in your document. This works for me in Acrobat Reader on Linux.