How to write commands with default variables for terminal or default app (Browser, Terminal) so it would work on any Ubuntu or Debian?
For example Ubuntu mate has mate-terminal How to write commands that would open in each distro with befault terminal and browser? So in this command line wouldnt be mate-terminal and firefox but some wrapper of them for any distro user default apps of terminal or browser.
mate-terminal -- bash -c 'sleep 2; dpkg -S "\/bin/$(xprop WM_CLASS | cut -d "\"" -f2)"; sleep 5; firefox'
how to find default app variables or wrappers so that command would be running in any distro terminal apps? How to find also default browser or text editor variables?
xdg-open
andxdg-mime
, but those are only really helpful if the distribution in question is (at least to some extend) xdg compliant.x-terminal-emulator
to the distro's default terminal emulator via theupdate-alternatives
mechanism