1

I recently installed Firefox developer edition following this tutorial and I want to start Firefox by pressing Alt+F2 and writing firefox in there. In terminal I added an alias,

firefox=/opt/firefox/firefox

and it works but it doesn't work from Alt+F2. How do I do that?

1 Answers1

1

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.

  1. Create a folder named bin in your home directory. Make sure ~/bin/ is in your PATH. If not, add it.
  2. Create a text file named firefox in the the aforementioned crated folder (i.e. in ~/bin/).
  3. Add the following lines to the firefox file

    #!/bin/bash
    /opt/firefox/firefox
    
  4. 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.

pomsky
  • 70,557