Adding an icon for Spyder in Favourites bar in Ubuntu 18.04












0














I have freshly installed Ubuntu 18.04 and Anaconda (with Python 3.7) in my laptop, and I want to set up a launcher icon for the Spyder IDE in the Favourites bar - something I've done many times in the past couple of years when running Ubuntu 16.



I can successfully launch Spyder from the Terminal and it seems to be working fine, but when I run it from the terminal and right-click the icon, it does not give me an option for adding it to Favorites.



[Strangely, searching for an application named "spyder" returns no results; not sure if this might be related, but...]



I understand I can manually add an icon for it by creating a .desktop file, as described here and here, and adding it to /usr/share/applications, as described here. For example, I have tried using the following spyder.desktop file (available in the Spyder Github):



[Desktop Entry]
Type=Application
Version=1.0
Name=Spyder
GenericName=Spyder
Comment=The Scientific Python Development Environment
Icon=spyder
TryExec=spyder
Exec=spyder %F
Terminal=false
MimeType=text/x-python;
Categories=Development;Science;IDE;Qt;
Keywords=Development;Science;IDE;Qt;
StartupNotify=true
X-AppStream-Ignore=True
StartupWMClass=Spyder


However, even after creating this file, Spyder still does not show up in Applications. And if I try to run this file, I get a fairly generic




"There was an error launching the application"




message.



Is this a known issue with Spyder and/or Ubuntu 18? Am I missing something here? Any help would be much appreciated! Many thanks!










share|improve this question
























  • Just to make sure, at which directory did you put the .desktop file?
    – pomsky
    Dec 18 '18 at 22:18










  • I added it to /usr/share/applications - was that the right place?
    – fabio_hirono
    Dec 19 '18 at 15:53












  • Please type this command in the terminal: whereis spyder and post the output
    – koni_raid
    Dec 19 '18 at 16:12








  • 1




    @koni_raid The output is spyder: /home/hirono/anaconda3/bin/spyder
    – fabio_hirono
    Dec 19 '18 at 16:39










  • @Kulfy The .desktop file has executable permissions. However, I don't understand where I have to add the absolute path in the .desktop file; could you please help me with that?
    – fabio_hirono
    Dec 19 '18 at 16:52
















0














I have freshly installed Ubuntu 18.04 and Anaconda (with Python 3.7) in my laptop, and I want to set up a launcher icon for the Spyder IDE in the Favourites bar - something I've done many times in the past couple of years when running Ubuntu 16.



I can successfully launch Spyder from the Terminal and it seems to be working fine, but when I run it from the terminal and right-click the icon, it does not give me an option for adding it to Favorites.



[Strangely, searching for an application named "spyder" returns no results; not sure if this might be related, but...]



I understand I can manually add an icon for it by creating a .desktop file, as described here and here, and adding it to /usr/share/applications, as described here. For example, I have tried using the following spyder.desktop file (available in the Spyder Github):



[Desktop Entry]
Type=Application
Version=1.0
Name=Spyder
GenericName=Spyder
Comment=The Scientific Python Development Environment
Icon=spyder
TryExec=spyder
Exec=spyder %F
Terminal=false
MimeType=text/x-python;
Categories=Development;Science;IDE;Qt;
Keywords=Development;Science;IDE;Qt;
StartupNotify=true
X-AppStream-Ignore=True
StartupWMClass=Spyder


However, even after creating this file, Spyder still does not show up in Applications. And if I try to run this file, I get a fairly generic




"There was an error launching the application"




message.



Is this a known issue with Spyder and/or Ubuntu 18? Am I missing something here? Any help would be much appreciated! Many thanks!










share|improve this question
























  • Just to make sure, at which directory did you put the .desktop file?
    – pomsky
    Dec 18 '18 at 22:18










  • I added it to /usr/share/applications - was that the right place?
    – fabio_hirono
    Dec 19 '18 at 15:53












  • Please type this command in the terminal: whereis spyder and post the output
    – koni_raid
    Dec 19 '18 at 16:12








  • 1




    @koni_raid The output is spyder: /home/hirono/anaconda3/bin/spyder
    – fabio_hirono
    Dec 19 '18 at 16:39










  • @Kulfy The .desktop file has executable permissions. However, I don't understand where I have to add the absolute path in the .desktop file; could you please help me with that?
    – fabio_hirono
    Dec 19 '18 at 16:52














0












0








0


1





I have freshly installed Ubuntu 18.04 and Anaconda (with Python 3.7) in my laptop, and I want to set up a launcher icon for the Spyder IDE in the Favourites bar - something I've done many times in the past couple of years when running Ubuntu 16.



I can successfully launch Spyder from the Terminal and it seems to be working fine, but when I run it from the terminal and right-click the icon, it does not give me an option for adding it to Favorites.



[Strangely, searching for an application named "spyder" returns no results; not sure if this might be related, but...]



I understand I can manually add an icon for it by creating a .desktop file, as described here and here, and adding it to /usr/share/applications, as described here. For example, I have tried using the following spyder.desktop file (available in the Spyder Github):



[Desktop Entry]
Type=Application
Version=1.0
Name=Spyder
GenericName=Spyder
Comment=The Scientific Python Development Environment
Icon=spyder
TryExec=spyder
Exec=spyder %F
Terminal=false
MimeType=text/x-python;
Categories=Development;Science;IDE;Qt;
Keywords=Development;Science;IDE;Qt;
StartupNotify=true
X-AppStream-Ignore=True
StartupWMClass=Spyder


However, even after creating this file, Spyder still does not show up in Applications. And if I try to run this file, I get a fairly generic




"There was an error launching the application"




message.



Is this a known issue with Spyder and/or Ubuntu 18? Am I missing something here? Any help would be much appreciated! Many thanks!










share|improve this question















I have freshly installed Ubuntu 18.04 and Anaconda (with Python 3.7) in my laptop, and I want to set up a launcher icon for the Spyder IDE in the Favourites bar - something I've done many times in the past couple of years when running Ubuntu 16.



I can successfully launch Spyder from the Terminal and it seems to be working fine, but when I run it from the terminal and right-click the icon, it does not give me an option for adding it to Favorites.



[Strangely, searching for an application named "spyder" returns no results; not sure if this might be related, but...]



I understand I can manually add an icon for it by creating a .desktop file, as described here and here, and adding it to /usr/share/applications, as described here. For example, I have tried using the following spyder.desktop file (available in the Spyder Github):



[Desktop Entry]
Type=Application
Version=1.0
Name=Spyder
GenericName=Spyder
Comment=The Scientific Python Development Environment
Icon=spyder
TryExec=spyder
Exec=spyder %F
Terminal=false
MimeType=text/x-python;
Categories=Development;Science;IDE;Qt;
Keywords=Development;Science;IDE;Qt;
StartupNotify=true
X-AppStream-Ignore=True
StartupWMClass=Spyder


However, even after creating this file, Spyder still does not show up in Applications. And if I try to run this file, I get a fairly generic




"There was an error launching the application"




message.



Is this a known issue with Spyder and/or Ubuntu 18? Am I missing something here? Any help would be much appreciated! Many thanks!







icons gnome-shell .desktop ubuntu-dock spyder






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 19 '18 at 16:04







fabio_hirono

















asked Dec 18 '18 at 18:23









fabio_hironofabio_hirono

32




32












  • Just to make sure, at which directory did you put the .desktop file?
    – pomsky
    Dec 18 '18 at 22:18










  • I added it to /usr/share/applications - was that the right place?
    – fabio_hirono
    Dec 19 '18 at 15:53












  • Please type this command in the terminal: whereis spyder and post the output
    – koni_raid
    Dec 19 '18 at 16:12








  • 1




    @koni_raid The output is spyder: /home/hirono/anaconda3/bin/spyder
    – fabio_hirono
    Dec 19 '18 at 16:39










  • @Kulfy The .desktop file has executable permissions. However, I don't understand where I have to add the absolute path in the .desktop file; could you please help me with that?
    – fabio_hirono
    Dec 19 '18 at 16:52


















  • Just to make sure, at which directory did you put the .desktop file?
    – pomsky
    Dec 18 '18 at 22:18










  • I added it to /usr/share/applications - was that the right place?
    – fabio_hirono
    Dec 19 '18 at 15:53












  • Please type this command in the terminal: whereis spyder and post the output
    – koni_raid
    Dec 19 '18 at 16:12








  • 1




    @koni_raid The output is spyder: /home/hirono/anaconda3/bin/spyder
    – fabio_hirono
    Dec 19 '18 at 16:39










  • @Kulfy The .desktop file has executable permissions. However, I don't understand where I have to add the absolute path in the .desktop file; could you please help me with that?
    – fabio_hirono
    Dec 19 '18 at 16:52
















Just to make sure, at which directory did you put the .desktop file?
– pomsky
Dec 18 '18 at 22:18




Just to make sure, at which directory did you put the .desktop file?
– pomsky
Dec 18 '18 at 22:18












I added it to /usr/share/applications - was that the right place?
– fabio_hirono
Dec 19 '18 at 15:53






I added it to /usr/share/applications - was that the right place?
– fabio_hirono
Dec 19 '18 at 15:53














Please type this command in the terminal: whereis spyder and post the output
– koni_raid
Dec 19 '18 at 16:12






Please type this command in the terminal: whereis spyder and post the output
– koni_raid
Dec 19 '18 at 16:12






1




1




@koni_raid The output is spyder: /home/hirono/anaconda3/bin/spyder
– fabio_hirono
Dec 19 '18 at 16:39




@koni_raid The output is spyder: /home/hirono/anaconda3/bin/spyder
– fabio_hirono
Dec 19 '18 at 16:39












@Kulfy The .desktop file has executable permissions. However, I don't understand where I have to add the absolute path in the .desktop file; could you please help me with that?
– fabio_hirono
Dec 19 '18 at 16:52




@Kulfy The .desktop file has executable permissions. However, I don't understand where I have to add the absolute path in the .desktop file; could you please help me with that?
– fabio_hirono
Dec 19 '18 at 16:52










1 Answer
1






active

oldest

votes


















1














As the error message "There was an error launching the application" suggests, there is some sort of error in spyder.desktop. Fields like Exec and TryExec require the absolute path of the executable file, therefore the values for Exec and TryExec must be /home/hirono/anaconda3/bin/spyder. Same goes for Icon. It seems like you haven't given even the extension for the icon image. Value must be like /home/hirono/path-to-icon/icon.png.



Also, double check the permissions of spyder.desktop and /home/hirono/anaconda3/bin/spyder. They both must be executable.






share|improve this answer





















  • Awesome! Adding the absolute paths and ensuring the permissions sorted the problem with the .desktop file, and adding a path to the icon (I used /home/hirono/anaconda3/share/icons/spyder3.png ) gave me a nice icon to add and display in my Favourites :) many thanks to all that helped!
    – fabio_hirono
    Dec 19 '18 at 17:27











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1102899%2fadding-an-icon-for-spyder-in-favourites-bar-in-ubuntu-18-04%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














As the error message "There was an error launching the application" suggests, there is some sort of error in spyder.desktop. Fields like Exec and TryExec require the absolute path of the executable file, therefore the values for Exec and TryExec must be /home/hirono/anaconda3/bin/spyder. Same goes for Icon. It seems like you haven't given even the extension for the icon image. Value must be like /home/hirono/path-to-icon/icon.png.



Also, double check the permissions of spyder.desktop and /home/hirono/anaconda3/bin/spyder. They both must be executable.






share|improve this answer





















  • Awesome! Adding the absolute paths and ensuring the permissions sorted the problem with the .desktop file, and adding a path to the icon (I used /home/hirono/anaconda3/share/icons/spyder3.png ) gave me a nice icon to add and display in my Favourites :) many thanks to all that helped!
    – fabio_hirono
    Dec 19 '18 at 17:27
















1














As the error message "There was an error launching the application" suggests, there is some sort of error in spyder.desktop. Fields like Exec and TryExec require the absolute path of the executable file, therefore the values for Exec and TryExec must be /home/hirono/anaconda3/bin/spyder. Same goes for Icon. It seems like you haven't given even the extension for the icon image. Value must be like /home/hirono/path-to-icon/icon.png.



Also, double check the permissions of spyder.desktop and /home/hirono/anaconda3/bin/spyder. They both must be executable.






share|improve this answer





















  • Awesome! Adding the absolute paths and ensuring the permissions sorted the problem with the .desktop file, and adding a path to the icon (I used /home/hirono/anaconda3/share/icons/spyder3.png ) gave me a nice icon to add and display in my Favourites :) many thanks to all that helped!
    – fabio_hirono
    Dec 19 '18 at 17:27














1












1








1






As the error message "There was an error launching the application" suggests, there is some sort of error in spyder.desktop. Fields like Exec and TryExec require the absolute path of the executable file, therefore the values for Exec and TryExec must be /home/hirono/anaconda3/bin/spyder. Same goes for Icon. It seems like you haven't given even the extension for the icon image. Value must be like /home/hirono/path-to-icon/icon.png.



Also, double check the permissions of spyder.desktop and /home/hirono/anaconda3/bin/spyder. They both must be executable.






share|improve this answer












As the error message "There was an error launching the application" suggests, there is some sort of error in spyder.desktop. Fields like Exec and TryExec require the absolute path of the executable file, therefore the values for Exec and TryExec must be /home/hirono/anaconda3/bin/spyder. Same goes for Icon. It seems like you haven't given even the extension for the icon image. Value must be like /home/hirono/path-to-icon/icon.png.



Also, double check the permissions of spyder.desktop and /home/hirono/anaconda3/bin/spyder. They both must be executable.







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 19 '18 at 17:14









KulfyKulfy

3,84841140




3,84841140












  • Awesome! Adding the absolute paths and ensuring the permissions sorted the problem with the .desktop file, and adding a path to the icon (I used /home/hirono/anaconda3/share/icons/spyder3.png ) gave me a nice icon to add and display in my Favourites :) many thanks to all that helped!
    – fabio_hirono
    Dec 19 '18 at 17:27


















  • Awesome! Adding the absolute paths and ensuring the permissions sorted the problem with the .desktop file, and adding a path to the icon (I used /home/hirono/anaconda3/share/icons/spyder3.png ) gave me a nice icon to add and display in my Favourites :) many thanks to all that helped!
    – fabio_hirono
    Dec 19 '18 at 17:27
















Awesome! Adding the absolute paths and ensuring the permissions sorted the problem with the .desktop file, and adding a path to the icon (I used /home/hirono/anaconda3/share/icons/spyder3.png ) gave me a nice icon to add and display in my Favourites :) many thanks to all that helped!
– fabio_hirono
Dec 19 '18 at 17:27




Awesome! Adding the absolute paths and ensuring the permissions sorted the problem with the .desktop file, and adding a path to the icon (I used /home/hirono/anaconda3/share/icons/spyder3.png ) gave me a nice icon to add and display in my Favourites :) many thanks to all that helped!
– fabio_hirono
Dec 19 '18 at 17:27


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1102899%2fadding-an-icon-for-spyder-in-favourites-bar-in-ubuntu-18-04%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Ellipse (mathématiques)

Quarter-circle Tiles

Mont Emei