gnome-terminal new tab with alias as command to execute

alias, gnome-terminal, linux

Solution

When a bash shell is started, per default `bash` executes the commands specified in `.bashrc`. This is how your shell knows your `alias`es.

Now your idea does not work because `gnome-terminal` never sees your `.bashrc` file.

You could try

`gnome-terminal --working-directory='<path-to-your-home-directory>/Desktop/myproject/`

Problem

I've created an alias in `.bashrc` file as follows ``` alias myproject = 'cd ~/Desktop/myproject' ``` After saving the file when I restart my terminal, typing in `myproject` takes me to the project directory but when I try to use the alias as a command argument to a new `gnome-terminal` tab it throws an error, ``` gnome-terminal --tab -e "myproject" ``` throws the error ``` There was an error creating the child process for this terminal Failed to execute child process "myproject" (No such file or directory) ``` What is wrong with this ?

Original source