Jishan Shaikh
Jishan Shaikh

Reputation: 1806

How to create a desktop-entry for anaconda on Ubuntu 17.10?

I've recently installed anaconda3 in Ubuntu 17.10 (system environment). To run anaconda-navigator, I've to activate root for each time as

Source ~/anaconda3/bin/activate root

And to run it I've to write each time

anaconda-navigator

Now I am wanted to create a desktop entry but I'm having errors at multiple stages. Can you please explain from beginning how to create a desktop-entry for anaconda3 on Linux?

EDIT: I've tried using this post on AskUbuntu. But, it failed for me. It is not showing on dock-bar as well as in /usr/share/applications. I'm really frustrated.

Upvotes: 3

Views: 12673

Answers (1)

Jishan Shaikh
Jishan Shaikh

Reputation: 1806

First, check if anaconda3 is installed on your system or not (Sometime the package may be broken due to network issues during installation (Not worked for me)). And whether you are able to launch anaconda-navigator without a desktop entry.

For creating a desktop entry

Step 1. Open your text editor and save the following content as Anaconda.desktop to your home directory.

[Desktop Entry]
Version=1.0
Type=Application
Name=Anaconda-Navigator
GenericName=Anaconda
Comment=Scientific Python Development Environment - Python3
Exec='$HOME/anaconda3/bin/anaconda-navigator'
Categories=Development;Science;IDE;Qt;Education;
Icon=$HOME/anaconda3/lib/python3.8/site-packages/anaconda_navigator/static/images/anaconda-icon-256x256.png
Terminal=false
StartupNotify=true
MimeType=text/x-python;

Take care with the Python version. in $HOME/anaconda3/lib/python3.8/site-packages/anaconda_navigator/static/images/anaconda-icon-256x256.png change python3.8 if needed

Step 2. Copy your Anaconda.desktop to /usr/share/applications/ as root (Because you might need permission to copy at /usr/share/applications/) sudo cp Anaconda.desktop /usr/share/applications This will create a desktop entry named Anaconda in /usr/share/applications/.

Step 3. add this line export PATH="$HOME/anaconda3/bin:$PATH" to your /etc/profile or $HOME/.bashrc

Step 4. Check if Anaconda is added to your application dock. If you didn't find it, search it in search-bar. Or you can run directly from /usr/share/applications/Anaconda.desktop.

Upvotes: 9

Related Questions