See also: Where do EDITOR, PAGER, BROWSER environment variables come from?
EDITOR and PAGER are mentioned in the standards as belonging to variables you'd be unwise to conflict with since they are widely used [...] Various programs respect various combinations of them [...]
The BROWSER variable is not in the same league as EDITOR or PAGER - it is not mentioned by the standards. However, some programs may use them.
IMO it could be best to consider variables for the GUI, as not being commonly used, unless you have a specific use case in mind. The reason is that the user will have set their preferences in their graphical desktop through the MIME system instead.
For example, Gnome Settings app lets you choose a browser, but it does not set the $BROWSER environment variable.
In this case you could try using xdg-open
instead.
(xdg-open apparently has some special-cases e.g. for falling back to BROWSER. https://utcc.utoronto.ca/~cks/space/blog/linux/XdgOpenWhichBrowser But that probably means if you want a browser, you might as well use xdg-open and let it handle things for you).
set
and readhelp set
– ajeh May 10 '18 at 14:53$PDFVIEWER
does not satisfy those characterizations, but then again, I wouldn't consider it "well-known".) Otherwise, I'm not sure any such thing exists. – John Bollinger May 10 '18 at 14:54set
only include environment variables that are set. I am looking for variables that I may not be aware of is used by commonly used software. – Ole Tange May 10 '18 at 16:06xdg-open
, not an environment variable. That pulls configuration from somewhere in~/.config
or~/.local/share
, but I don't remember where. – Austin Hemmelgarn May 10 '18 at 19:37