Search code examples
pythonterminalkeyboard-shortcutsgnome-terminalcompiz

assigning shortcut key to launch python


I'm an ubuntu user. As you know, python promt is a very useful tool. And I want to replace my calculator app with it. What I want is a new terminal with python shell running on it to show up when I press a key combination. I can assign scripts to shortcut keys with compiz-config settings manager, but I can't get the result I want. 'gnome-terminal;python3;' launches a new terminal without python running on it. Looks like it starts python in background on tty7. So how can I get the result I want.


Solution

  • Make it:

    gnome-terminal --command python3
    

    As you have certainly guessed, --command is the parameter to use to execute a command inside gnome-terminal.