johnhoran / Laine

Gnome extension which allows the control of the volume of individual applications as well as a more in depth control of mpris aware applications from a single applet
https://extensions.gnome.org/extension/937/laine/
GNU General Public License v2.0
27 stars 11 forks source link

shell path invalid #45

Open rickysarraf opened 6 years ago

rickysarraf commented 6 years ago
rrs@priyasi:~/.local/share/gnome-shell$ grep -Ri "/usr/bin/sh" *
extensions/laine@knasher.gmail.com/portMenu.js:const UPDATE_FALLBACK_SINK_CMD = "/usr/bin/sh -c  \"/usr/bin/pacmd set-default-sink $(/usr/bin/pacmd list-sinks | awk '/* index:/ {print $3}')\"";
extensions/laine@knasher.gmail.com/portMenu.js:const UPDATE_FALLBACK_SOURCE_CMD = "/usr/bin/sh -c  \"/usr/bin/pacmd set-default-source $(/usr/bin/pacmd list-sources | awk '/* index:/ {print $3}')\"";
15:39 ♒♒♒   ☺ 😄    

The hardcoded path, /usr/bin/sh, is invalid on systems where usrmerge has not been adopted by the Linux Distribution vendor. An example of it is Debian, which has the usrmerge feature left out as an additional task for users and is not enabled by default.

It would be better to hardcode /bin/sh instead because usrmerge is also guaranteed to create symllinks to old paths, for compatibility. That way both users can be covered.