Bash aliases do not work from the Alt+F2 prompt as aliases are not expanded when the shell is not interactive (as per man bash
).
If you want to run /opt/firefox/firefox
by typing firefox
in the Alt+F2 prompt then follow the steps below.
- Create a folder named
bin
in your home directory. Make sure ~/bin/
is in your PATH. If not, add it.
- Create a text file named
firefox
in the the aforementioned crated folder (i.e. in ~/bin/
).
Add the following lines to the firefox
file
#!/bin/bash
/opt/firefox/firefox
- Save the
firefox
file and make it executable.
Note: now you can remove the alias you created if you wish as it would be redundant after following the steps above.
4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
this is myunaname -a
output, for the version and flavour, UBUNTU 18.04 LTS, and this is myecho $PATH
output:/opt/firefox/firefox:/home/darenian/.local/share/umake/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
– C. Cristi Feb 12 '19 at 14:17