Create a file in ~/.local/share/applications that ends in the .desktop extension.

Here’s an example file, called anaconda_prompt.desktop:

[Desktop Entry]
Name=Anaconda Prompt
Comment=Gnome Terminal with anaconda environment variables set.
Exec=gnome-terminal -- bash -c 'source ~/software/anaconda3/bin/activate; exec bash;'


  • Categories is semicolon deliminated (but I just have one)
  • Exec is what executable file to launch (and it’s arguments)
    • I launch a gnome-terminal
      • Which executes bash, which gets its commands as argments (rather than from stdin or a file, where bash usually gets it’s commands from)

Note: This works on any desktop environment that obliges by the desktop specification, which gnome does.