How can I find the command to be used in a desktop icon that will launch a snap application?












1















I want make a desktop icon, that will launch a program. Currently I can launch app from icon in "Show Applications", but I want icon on desktop.

I know, I should use



gnome-desktop-item-edit --create-new ~/Desktop


for creating shortcuts.



The problem is - I don't know command that will launch this particular app from terminal. And obviously, I need this unknown to me command for creating shortcuts.
I installed from snap, so I can't just copy icon from /usr/share/applications.



Any advice how to find such command or move icon from "Show Applications" to desktop?










share|improve this question




















  • 1





    You need to clarify which one you want - open the .desktop file from terminal, how to create a shortcut for snap, or how to place it onto desktop - because these are all separate issues and the post is considered too broad, and might be closed. I can give a hint on the first one : opening .desktop from terminal can be done either via gtk-launch or python script(askubuntu.com/a/239883/295286).

    – Sergiy Kolodyazhnyy
    Jan 27 at 12:52













  • @sergiy I don't think it's too broad. As I understood OP just wants to create a launcher for a snap application in desktop. They toyed with a couple of ideas: (1) copying the launcher from system, but they failed as it's not there in /usr/share/applications (since it's a snap application), and (2) they tried to create a launcher by hand using gnome-desktop-item-edit, and again they failed as they didn't know what was to be used in the 'command' box.

    – pomsky
    Jan 27 at 13:27
















1















I want make a desktop icon, that will launch a program. Currently I can launch app from icon in "Show Applications", but I want icon on desktop.

I know, I should use



gnome-desktop-item-edit --create-new ~/Desktop


for creating shortcuts.



The problem is - I don't know command that will launch this particular app from terminal. And obviously, I need this unknown to me command for creating shortcuts.
I installed from snap, so I can't just copy icon from /usr/share/applications.



Any advice how to find such command or move icon from "Show Applications" to desktop?










share|improve this question




















  • 1





    You need to clarify which one you want - open the .desktop file from terminal, how to create a shortcut for snap, or how to place it onto desktop - because these are all separate issues and the post is considered too broad, and might be closed. I can give a hint on the first one : opening .desktop from terminal can be done either via gtk-launch or python script(askubuntu.com/a/239883/295286).

    – Sergiy Kolodyazhnyy
    Jan 27 at 12:52













  • @sergiy I don't think it's too broad. As I understood OP just wants to create a launcher for a snap application in desktop. They toyed with a couple of ideas: (1) copying the launcher from system, but they failed as it's not there in /usr/share/applications (since it's a snap application), and (2) they tried to create a launcher by hand using gnome-desktop-item-edit, and again they failed as they didn't know what was to be used in the 'command' box.

    – pomsky
    Jan 27 at 13:27














1












1








1








I want make a desktop icon, that will launch a program. Currently I can launch app from icon in "Show Applications", but I want icon on desktop.

I know, I should use



gnome-desktop-item-edit --create-new ~/Desktop


for creating shortcuts.



The problem is - I don't know command that will launch this particular app from terminal. And obviously, I need this unknown to me command for creating shortcuts.
I installed from snap, so I can't just copy icon from /usr/share/applications.



Any advice how to find such command or move icon from "Show Applications" to desktop?










share|improve this question
















I want make a desktop icon, that will launch a program. Currently I can launch app from icon in "Show Applications", but I want icon on desktop.

I know, I should use



gnome-desktop-item-edit --create-new ~/Desktop


for creating shortcuts.



The problem is - I don't know command that will launch this particular app from terminal. And obviously, I need this unknown to me command for creating shortcuts.
I installed from snap, so I can't just copy icon from /usr/share/applications.



Any advice how to find such command or move icon from "Show Applications" to desktop?







gnome-shell snap .desktop






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 27 at 13:43









pomsky

32.8k11103135




32.8k11103135










asked Jan 27 at 12:45









igor Smirnovigor Smirnov

82




82








  • 1





    You need to clarify which one you want - open the .desktop file from terminal, how to create a shortcut for snap, or how to place it onto desktop - because these are all separate issues and the post is considered too broad, and might be closed. I can give a hint on the first one : opening .desktop from terminal can be done either via gtk-launch or python script(askubuntu.com/a/239883/295286).

    – Sergiy Kolodyazhnyy
    Jan 27 at 12:52













  • @sergiy I don't think it's too broad. As I understood OP just wants to create a launcher for a snap application in desktop. They toyed with a couple of ideas: (1) copying the launcher from system, but they failed as it's not there in /usr/share/applications (since it's a snap application), and (2) they tried to create a launcher by hand using gnome-desktop-item-edit, and again they failed as they didn't know what was to be used in the 'command' box.

    – pomsky
    Jan 27 at 13:27














  • 1





    You need to clarify which one you want - open the .desktop file from terminal, how to create a shortcut for snap, or how to place it onto desktop - because these are all separate issues and the post is considered too broad, and might be closed. I can give a hint on the first one : opening .desktop from terminal can be done either via gtk-launch or python script(askubuntu.com/a/239883/295286).

    – Sergiy Kolodyazhnyy
    Jan 27 at 12:52













  • @sergiy I don't think it's too broad. As I understood OP just wants to create a launcher for a snap application in desktop. They toyed with a couple of ideas: (1) copying the launcher from system, but they failed as it's not there in /usr/share/applications (since it's a snap application), and (2) they tried to create a launcher by hand using gnome-desktop-item-edit, and again they failed as they didn't know what was to be used in the 'command' box.

    – pomsky
    Jan 27 at 13:27








1




1





You need to clarify which one you want - open the .desktop file from terminal, how to create a shortcut for snap, or how to place it onto desktop - because these are all separate issues and the post is considered too broad, and might be closed. I can give a hint on the first one : opening .desktop from terminal can be done either via gtk-launch or python script(askubuntu.com/a/239883/295286).

– Sergiy Kolodyazhnyy
Jan 27 at 12:52







You need to clarify which one you want - open the .desktop file from terminal, how to create a shortcut for snap, or how to place it onto desktop - because these are all separate issues and the post is considered too broad, and might be closed. I can give a hint on the first one : opening .desktop from terminal can be done either via gtk-launch or python script(askubuntu.com/a/239883/295286).

– Sergiy Kolodyazhnyy
Jan 27 at 12:52















@sergiy I don't think it's too broad. As I understood OP just wants to create a launcher for a snap application in desktop. They toyed with a couple of ideas: (1) copying the launcher from system, but they failed as it's not there in /usr/share/applications (since it's a snap application), and (2) they tried to create a launcher by hand using gnome-desktop-item-edit, and again they failed as they didn't know what was to be used in the 'command' box.

– pomsky
Jan 27 at 13:27





@sergiy I don't think it's too broad. As I understood OP just wants to create a launcher for a snap application in desktop. They toyed with a couple of ideas: (1) copying the launcher from system, but they failed as it's not there in /usr/share/applications (since it's a snap application), and (2) they tried to create a launcher by hand using gnome-desktop-item-edit, and again they failed as they didn't know what was to be used in the 'command' box.

– pomsky
Jan 27 at 13:27










1 Answer
1






active

oldest

votes


















3














As you have mentioned that you installed the application from snap and it can be found in 'Show Applications', the .desktop launcher for the application should be found in the /var/lib/snapd/desktop/applications/ directory. Just copy the .desktop launcher from there to your desktop.



Also you should be able to find the executable for the application in the /snap/bin/ directory. So if you want to manually create the .desktop launcher in your desktop, then you can use /snap/bin/<application> (e.g. /snap/bin/firefox) as the command. You can find the <application> part by running



snap list


Alternatively, you can use snap run <application> as the command (and of course, also to run the application from Terminal).






share|improve this answer

























    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%2f1113266%2fhow-can-i-find-the-command-to-be-used-in-a-desktop-icon-that-will-launch-a-snap%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









    3














    As you have mentioned that you installed the application from snap and it can be found in 'Show Applications', the .desktop launcher for the application should be found in the /var/lib/snapd/desktop/applications/ directory. Just copy the .desktop launcher from there to your desktop.



    Also you should be able to find the executable for the application in the /snap/bin/ directory. So if you want to manually create the .desktop launcher in your desktop, then you can use /snap/bin/<application> (e.g. /snap/bin/firefox) as the command. You can find the <application> part by running



    snap list


    Alternatively, you can use snap run <application> as the command (and of course, also to run the application from Terminal).






    share|improve this answer






























      3














      As you have mentioned that you installed the application from snap and it can be found in 'Show Applications', the .desktop launcher for the application should be found in the /var/lib/snapd/desktop/applications/ directory. Just copy the .desktop launcher from there to your desktop.



      Also you should be able to find the executable for the application in the /snap/bin/ directory. So if you want to manually create the .desktop launcher in your desktop, then you can use /snap/bin/<application> (e.g. /snap/bin/firefox) as the command. You can find the <application> part by running



      snap list


      Alternatively, you can use snap run <application> as the command (and of course, also to run the application from Terminal).






      share|improve this answer




























        3












        3








        3







        As you have mentioned that you installed the application from snap and it can be found in 'Show Applications', the .desktop launcher for the application should be found in the /var/lib/snapd/desktop/applications/ directory. Just copy the .desktop launcher from there to your desktop.



        Also you should be able to find the executable for the application in the /snap/bin/ directory. So if you want to manually create the .desktop launcher in your desktop, then you can use /snap/bin/<application> (e.g. /snap/bin/firefox) as the command. You can find the <application> part by running



        snap list


        Alternatively, you can use snap run <application> as the command (and of course, also to run the application from Terminal).






        share|improve this answer















        As you have mentioned that you installed the application from snap and it can be found in 'Show Applications', the .desktop launcher for the application should be found in the /var/lib/snapd/desktop/applications/ directory. Just copy the .desktop launcher from there to your desktop.



        Also you should be able to find the executable for the application in the /snap/bin/ directory. So if you want to manually create the .desktop launcher in your desktop, then you can use /snap/bin/<application> (e.g. /snap/bin/firefox) as the command. You can find the <application> part by running



        snap list


        Alternatively, you can use snap run <application> as the command (and of course, also to run the application from Terminal).







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 27 at 13:13

























        answered Jan 27 at 13:08









        pomskypomsky

        32.8k11103135




        32.8k11103135






























            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1113266%2fhow-can-i-find-the-command-to-be-used-in-a-desktop-icon-that-will-launch-a-snap%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

            Can a sorcerer learn a 5th-level spell early by creating spell slots using the Font of Magic feature?

            Does disintegrating a polymorphed enemy still kill it after the 2018 errata?

            A Topological Invariant for $pi_3(U(n))$