On a new setup of Ubuntu lts 20.04, I installed ipython thru anaconda3.
I decided to setup a desktop shortcut so that all I had to do was double-click an ipython icon and then the interpretor would pop-up. In windows this is quite straight forward. But being a newbie this has turned into a black hole with many wasted hours.
First, I figured out how to setup a script file to run in terminal to launch the interpretor. Once the the script was written, I checked the permissions->Execute (allow executing file as a program). I executed the script in a terminal window, it then opened another terminal window and ran the interpretor.
file: ipython.sh
#!/bin/bash
gnome-terminal -- bash -c "ipython; exec bash"
Second, I figured out how to setup a desktop shortcut launcher. Once the .desktop file was written I right-clicked on the icon on the desktop and clicked on 'Allow launching'. The desktop icon then changed to the .png file I had saved in my pictures folder.
file: ipython.desktop
[Desktop Entry]
Version=1.0
Name=Ipython
Comment=Ipython Interpretor
Exec=/home/user/Desktop/ipython.sh
Icon=/home/user/Pictures/ipython.png
Type=Application
Actions=new-window;preferences;
Terminal=true
[Desktop Action new-window]
Name=New Window
Exec=gnome-terminal --window
[Desktop Action preferences]
Name=Preferences
Exec=gnome-terminal --preferences
This is where I'm stuck. When I double-click on the ipython.desktop icon, a terminal windows opens. The interpretor does not run; there are only 2 lines displayed in terminal:
bash: ipython: command not found
user@ubuntupc:~$
The 3 sources that got me this far are:
how can I open a extra console and run a program in it with one command?
https://linuxconfig.org/how-to-create-desktop-shortcut-launcher-on-ubuntu-20-04-focal-fossa-linux
.desktop files not launching from desktop in Ubuntu 20.04 LTS
One user (heynnema) suggested moving the files to different folders, but that didn't work. I'd like to find out if I'm going in the right direction or if this is more complicated then expected? I'm sure I will probably need to do this again in the future. Any help would be appreciated!
type -a ipython
?type
is the actual command.-a
is the option andipython
is the parameter.bash: ipython: command not found
appear when you start terminal? What are the contents of/home/user/Desktop/ipython.sh
?