Can't add Custom .desktop files to Ubuntu dock





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







39















Problem:



I have made .desktop files for Ubuntu 16.04 to access my Google Chrome profiles, but once I upgraded to Ubuntu 17.10 (it worked on Ubuntu 17.04) they got removed and I can't pin them back.



Sample File



#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=google-chrome
Name[en_US]=Google Chrome
Exec=google-chrome --profile-directory=Default
Comment[en_US]=Chrome
Name=Google Chrome
Comment=Chrome Browser
Icon=google-chrome
Categories=Browser;Internet;









share|improve this question




















  • 1





    If you can see them in the gnome-shell overview then you can DnD to the dock (just not at the end). If not then mark the .desktop as executable, d. click on, set as trusted. Once running it should show in dock & you can pin

    – doug
    Oct 22 '17 at 1:00











  • @doug But wouldn't that kill the Exec=google-chrome --profile-directory=Default?

    – Teivel
    Oct 22 '17 at 1:14













  • I don't know what you mean. Do you know what I mean by "mark as executable" i.e, r. click on the .desktop .> properties > Permissions > obvious

    – doug
    Oct 22 '17 at 1:32











  • @doug it passes arguments to the program before launching, in this case, the profile, if I was to pin it, only the application would launch, not the right profile (ie. guest, personal, etc)

    – Teivel
    Oct 22 '17 at 1:54


















39















Problem:



I have made .desktop files for Ubuntu 16.04 to access my Google Chrome profiles, but once I upgraded to Ubuntu 17.10 (it worked on Ubuntu 17.04) they got removed and I can't pin them back.



Sample File



#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=google-chrome
Name[en_US]=Google Chrome
Exec=google-chrome --profile-directory=Default
Comment[en_US]=Chrome
Name=Google Chrome
Comment=Chrome Browser
Icon=google-chrome
Categories=Browser;Internet;









share|improve this question




















  • 1





    If you can see them in the gnome-shell overview then you can DnD to the dock (just not at the end). If not then mark the .desktop as executable, d. click on, set as trusted. Once running it should show in dock & you can pin

    – doug
    Oct 22 '17 at 1:00











  • @doug But wouldn't that kill the Exec=google-chrome --profile-directory=Default?

    – Teivel
    Oct 22 '17 at 1:14













  • I don't know what you mean. Do you know what I mean by "mark as executable" i.e, r. click on the .desktop .> properties > Permissions > obvious

    – doug
    Oct 22 '17 at 1:32











  • @doug it passes arguments to the program before launching, in this case, the profile, if I was to pin it, only the application would launch, not the right profile (ie. guest, personal, etc)

    – Teivel
    Oct 22 '17 at 1:54














39












39








39


8






Problem:



I have made .desktop files for Ubuntu 16.04 to access my Google Chrome profiles, but once I upgraded to Ubuntu 17.10 (it worked on Ubuntu 17.04) they got removed and I can't pin them back.



Sample File



#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=google-chrome
Name[en_US]=Google Chrome
Exec=google-chrome --profile-directory=Default
Comment[en_US]=Chrome
Name=Google Chrome
Comment=Chrome Browser
Icon=google-chrome
Categories=Browser;Internet;









share|improve this question
















Problem:



I have made .desktop files for Ubuntu 16.04 to access my Google Chrome profiles, but once I upgraded to Ubuntu 17.10 (it worked on Ubuntu 17.04) they got removed and I can't pin them back.



Sample File



#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=google-chrome
Name[en_US]=Google Chrome
Exec=google-chrome --profile-directory=Default
Comment[en_US]=Chrome
Name=Google Chrome
Comment=Chrome Browser
Icon=google-chrome
Categories=Browser;Internet;






.desktop 17.10 gnome-shell ubuntu-dock






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 2 '18 at 20:53









pomsky

33.5k11105137




33.5k11105137










asked Oct 22 '17 at 0:25









TeivelTeivel

3311312




3311312








  • 1





    If you can see them in the gnome-shell overview then you can DnD to the dock (just not at the end). If not then mark the .desktop as executable, d. click on, set as trusted. Once running it should show in dock & you can pin

    – doug
    Oct 22 '17 at 1:00











  • @doug But wouldn't that kill the Exec=google-chrome --profile-directory=Default?

    – Teivel
    Oct 22 '17 at 1:14













  • I don't know what you mean. Do you know what I mean by "mark as executable" i.e, r. click on the .desktop .> properties > Permissions > obvious

    – doug
    Oct 22 '17 at 1:32











  • @doug it passes arguments to the program before launching, in this case, the profile, if I was to pin it, only the application would launch, not the right profile (ie. guest, personal, etc)

    – Teivel
    Oct 22 '17 at 1:54














  • 1





    If you can see them in the gnome-shell overview then you can DnD to the dock (just not at the end). If not then mark the .desktop as executable, d. click on, set as trusted. Once running it should show in dock & you can pin

    – doug
    Oct 22 '17 at 1:00











  • @doug But wouldn't that kill the Exec=google-chrome --profile-directory=Default?

    – Teivel
    Oct 22 '17 at 1:14













  • I don't know what you mean. Do you know what I mean by "mark as executable" i.e, r. click on the .desktop .> properties > Permissions > obvious

    – doug
    Oct 22 '17 at 1:32











  • @doug it passes arguments to the program before launching, in this case, the profile, if I was to pin it, only the application would launch, not the right profile (ie. guest, personal, etc)

    – Teivel
    Oct 22 '17 at 1:54








1




1





If you can see them in the gnome-shell overview then you can DnD to the dock (just not at the end). If not then mark the .desktop as executable, d. click on, set as trusted. Once running it should show in dock & you can pin

– doug
Oct 22 '17 at 1:00





If you can see them in the gnome-shell overview then you can DnD to the dock (just not at the end). If not then mark the .desktop as executable, d. click on, set as trusted. Once running it should show in dock & you can pin

– doug
Oct 22 '17 at 1:00













@doug But wouldn't that kill the Exec=google-chrome --profile-directory=Default?

– Teivel
Oct 22 '17 at 1:14







@doug But wouldn't that kill the Exec=google-chrome --profile-directory=Default?

– Teivel
Oct 22 '17 at 1:14















I don't know what you mean. Do you know what I mean by "mark as executable" i.e, r. click on the .desktop .> properties > Permissions > obvious

– doug
Oct 22 '17 at 1:32





I don't know what you mean. Do you know what I mean by "mark as executable" i.e, r. click on the .desktop .> properties > Permissions > obvious

– doug
Oct 22 '17 at 1:32













@doug it passes arguments to the program before launching, in this case, the profile, if I was to pin it, only the application would launch, not the right profile (ie. guest, personal, etc)

– Teivel
Oct 22 '17 at 1:54





@doug it passes arguments to the program before launching, in this case, the profile, if I was to pin it, only the application would launch, not the right profile (ie. guest, personal, etc)

– Teivel
Oct 22 '17 at 1:54










3 Answers
3






active

oldest

votes


















55















  1. Create a .desktop file in ~/.local/share/applications.


  2. Add the following lines in it



    [Desktop Entry]
    Comment=Chrome my profile
    Terminal=false
    Name=My Chrome
    Exec=google-chrome --profile-directory=Default
    Type=Application
    Icon=google-chrome


    (I'm naming it "My Chrome" to avoid confusion with the already existing Google Chrome launcher. You can use any other name.)



  3. Make it executable.


  4. Click on Activities or Show Applications and search for "My Chrome". It should appear.



  5. Right click on it and mark as favourite.



    When right clicking on application icon in dock doesn't show "Add to favourites" option, search for the application in Activities screen, and then drag it across to the dock (suggested by Legolas).




If nothing works, see this Q&A: Cannot add custom launcher to Dock (*Add to Favorites*)






share|improve this answer


























  • Is a restart or re-login needed? For me this does not even make the thing show up in the "Activities" dashboard.

    – Zelphir
    Jan 16 '18 at 10:29











  • @Zelphir Should not be required, but try anyway. If still doesn't work, see this.

    – pomsky
    Jan 16 '18 at 10:35






  • 1





    When you put in a path, you can't use ~. Use the full path. When I had ~, nothing showed up. Moving to a full path worked fine.

    – Virmundi
    May 28 '18 at 17:47











  • Yes, of course, you can't put ~ in the .desktop file, you'll have to put the full path (there is no ~ in the content of the sample .desktop file though).

    – pomsky
    May 28 '18 at 18:01











  • Thanks a lot! After 2 hours of browsing, this answer solved my problem!

    – sh4dowb
    Jun 12 '18 at 11:32



















5














I had the same problem with Firefox Nightly. The following configuration works for me in ~/.local/share/applications/firefox-nightly.desktop:



[Desktop Entry]
Type=Application
Name=Firefox Nightly
#
# WARNING: Remember to fix the path in Icon and Exec
#
Icon=/path/to/firefox-nightly/browser/icons/mozicon128.png
Exec=/path/to/firefox-nightly/firefox %u
Terminal=false
StartupWMClass=Nightly


Without StartupWMClass, the running application is not recognized and the icon is displayed twice on the dock.






share|improve this answer



















  • 2





    Multiple icons of the same application (and also fallback to a default "blank" icon after failing to show specified icon in the .desktop file) sounds like a separate issue. I think it would be better if you ask a new question and add an answer yourself. There's already this one.

    – pomsky
    Nov 7 '17 at 15:37






  • 1





    @pomsky I posted it here because I had the same problem: it was not possible to mark the app as favourite in the context menu. Dragging it from the activities screen did almost work: the icon was pinned but, clicking it, another icon was shown. By adding StartupWMClass to your config, it finally worked. Sorry for the confusion. Maybe I should answer to this one?

    – Marcello Nuccio
    Nov 7 '17 at 17:29






  • 1





    Already I have posted an answer (StartupWMClass trick) there a week ago. If your answer is significantly different you're most welcome to post a new answer. But the thing that question is a bit misleading, there OP has the issue in only Wayland, not Xorg. So I think it's better if you could post an new question and answer it yourself. I didn't see a new questions with multiple icons issue recently, only saw a comment.

    – pomsky
    Nov 7 '17 at 17:34





















1














For anyone having troubles, if the application is not appearing in Activities, make sure you don't have "NoDisplay=true" in the .desktop file for your application.






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%2f967409%2fcant-add-custom-desktop-files-to-ubuntu-dock%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    55















    1. Create a .desktop file in ~/.local/share/applications.


    2. Add the following lines in it



      [Desktop Entry]
      Comment=Chrome my profile
      Terminal=false
      Name=My Chrome
      Exec=google-chrome --profile-directory=Default
      Type=Application
      Icon=google-chrome


      (I'm naming it "My Chrome" to avoid confusion with the already existing Google Chrome launcher. You can use any other name.)



    3. Make it executable.


    4. Click on Activities or Show Applications and search for "My Chrome". It should appear.



    5. Right click on it and mark as favourite.



      When right clicking on application icon in dock doesn't show "Add to favourites" option, search for the application in Activities screen, and then drag it across to the dock (suggested by Legolas).




    If nothing works, see this Q&A: Cannot add custom launcher to Dock (*Add to Favorites*)






    share|improve this answer


























    • Is a restart or re-login needed? For me this does not even make the thing show up in the "Activities" dashboard.

      – Zelphir
      Jan 16 '18 at 10:29











    • @Zelphir Should not be required, but try anyway. If still doesn't work, see this.

      – pomsky
      Jan 16 '18 at 10:35






    • 1





      When you put in a path, you can't use ~. Use the full path. When I had ~, nothing showed up. Moving to a full path worked fine.

      – Virmundi
      May 28 '18 at 17:47











    • Yes, of course, you can't put ~ in the .desktop file, you'll have to put the full path (there is no ~ in the content of the sample .desktop file though).

      – pomsky
      May 28 '18 at 18:01











    • Thanks a lot! After 2 hours of browsing, this answer solved my problem!

      – sh4dowb
      Jun 12 '18 at 11:32
















    55















    1. Create a .desktop file in ~/.local/share/applications.


    2. Add the following lines in it



      [Desktop Entry]
      Comment=Chrome my profile
      Terminal=false
      Name=My Chrome
      Exec=google-chrome --profile-directory=Default
      Type=Application
      Icon=google-chrome


      (I'm naming it "My Chrome" to avoid confusion with the already existing Google Chrome launcher. You can use any other name.)



    3. Make it executable.


    4. Click on Activities or Show Applications and search for "My Chrome". It should appear.



    5. Right click on it and mark as favourite.



      When right clicking on application icon in dock doesn't show "Add to favourites" option, search for the application in Activities screen, and then drag it across to the dock (suggested by Legolas).




    If nothing works, see this Q&A: Cannot add custom launcher to Dock (*Add to Favorites*)






    share|improve this answer


























    • Is a restart or re-login needed? For me this does not even make the thing show up in the "Activities" dashboard.

      – Zelphir
      Jan 16 '18 at 10:29











    • @Zelphir Should not be required, but try anyway. If still doesn't work, see this.

      – pomsky
      Jan 16 '18 at 10:35






    • 1





      When you put in a path, you can't use ~. Use the full path. When I had ~, nothing showed up. Moving to a full path worked fine.

      – Virmundi
      May 28 '18 at 17:47











    • Yes, of course, you can't put ~ in the .desktop file, you'll have to put the full path (there is no ~ in the content of the sample .desktop file though).

      – pomsky
      May 28 '18 at 18:01











    • Thanks a lot! After 2 hours of browsing, this answer solved my problem!

      – sh4dowb
      Jun 12 '18 at 11:32














    55












    55








    55








    1. Create a .desktop file in ~/.local/share/applications.


    2. Add the following lines in it



      [Desktop Entry]
      Comment=Chrome my profile
      Terminal=false
      Name=My Chrome
      Exec=google-chrome --profile-directory=Default
      Type=Application
      Icon=google-chrome


      (I'm naming it "My Chrome" to avoid confusion with the already existing Google Chrome launcher. You can use any other name.)



    3. Make it executable.


    4. Click on Activities or Show Applications and search for "My Chrome". It should appear.



    5. Right click on it and mark as favourite.



      When right clicking on application icon in dock doesn't show "Add to favourites" option, search for the application in Activities screen, and then drag it across to the dock (suggested by Legolas).




    If nothing works, see this Q&A: Cannot add custom launcher to Dock (*Add to Favorites*)






    share|improve this answer
















    1. Create a .desktop file in ~/.local/share/applications.


    2. Add the following lines in it



      [Desktop Entry]
      Comment=Chrome my profile
      Terminal=false
      Name=My Chrome
      Exec=google-chrome --profile-directory=Default
      Type=Application
      Icon=google-chrome


      (I'm naming it "My Chrome" to avoid confusion with the already existing Google Chrome launcher. You can use any other name.)



    3. Make it executable.


    4. Click on Activities or Show Applications and search for "My Chrome". It should appear.



    5. Right click on it and mark as favourite.



      When right clicking on application icon in dock doesn't show "Add to favourites" option, search for the application in Activities screen, and then drag it across to the dock (suggested by Legolas).




    If nothing works, see this Q&A: Cannot add custom launcher to Dock (*Add to Favorites*)







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Jan 4 '18 at 18:07

























    answered Oct 22 '17 at 4:25









    pomskypomsky

    33.5k11105137




    33.5k11105137













    • Is a restart or re-login needed? For me this does not even make the thing show up in the "Activities" dashboard.

      – Zelphir
      Jan 16 '18 at 10:29











    • @Zelphir Should not be required, but try anyway. If still doesn't work, see this.

      – pomsky
      Jan 16 '18 at 10:35






    • 1





      When you put in a path, you can't use ~. Use the full path. When I had ~, nothing showed up. Moving to a full path worked fine.

      – Virmundi
      May 28 '18 at 17:47











    • Yes, of course, you can't put ~ in the .desktop file, you'll have to put the full path (there is no ~ in the content of the sample .desktop file though).

      – pomsky
      May 28 '18 at 18:01











    • Thanks a lot! After 2 hours of browsing, this answer solved my problem!

      – sh4dowb
      Jun 12 '18 at 11:32



















    • Is a restart or re-login needed? For me this does not even make the thing show up in the "Activities" dashboard.

      – Zelphir
      Jan 16 '18 at 10:29











    • @Zelphir Should not be required, but try anyway. If still doesn't work, see this.

      – pomsky
      Jan 16 '18 at 10:35






    • 1





      When you put in a path, you can't use ~. Use the full path. When I had ~, nothing showed up. Moving to a full path worked fine.

      – Virmundi
      May 28 '18 at 17:47











    • Yes, of course, you can't put ~ in the .desktop file, you'll have to put the full path (there is no ~ in the content of the sample .desktop file though).

      – pomsky
      May 28 '18 at 18:01











    • Thanks a lot! After 2 hours of browsing, this answer solved my problem!

      – sh4dowb
      Jun 12 '18 at 11:32

















    Is a restart or re-login needed? For me this does not even make the thing show up in the "Activities" dashboard.

    – Zelphir
    Jan 16 '18 at 10:29





    Is a restart or re-login needed? For me this does not even make the thing show up in the "Activities" dashboard.

    – Zelphir
    Jan 16 '18 at 10:29













    @Zelphir Should not be required, but try anyway. If still doesn't work, see this.

    – pomsky
    Jan 16 '18 at 10:35





    @Zelphir Should not be required, but try anyway. If still doesn't work, see this.

    – pomsky
    Jan 16 '18 at 10:35




    1




    1





    When you put in a path, you can't use ~. Use the full path. When I had ~, nothing showed up. Moving to a full path worked fine.

    – Virmundi
    May 28 '18 at 17:47





    When you put in a path, you can't use ~. Use the full path. When I had ~, nothing showed up. Moving to a full path worked fine.

    – Virmundi
    May 28 '18 at 17:47













    Yes, of course, you can't put ~ in the .desktop file, you'll have to put the full path (there is no ~ in the content of the sample .desktop file though).

    – pomsky
    May 28 '18 at 18:01





    Yes, of course, you can't put ~ in the .desktop file, you'll have to put the full path (there is no ~ in the content of the sample .desktop file though).

    – pomsky
    May 28 '18 at 18:01













    Thanks a lot! After 2 hours of browsing, this answer solved my problem!

    – sh4dowb
    Jun 12 '18 at 11:32





    Thanks a lot! After 2 hours of browsing, this answer solved my problem!

    – sh4dowb
    Jun 12 '18 at 11:32













    5














    I had the same problem with Firefox Nightly. The following configuration works for me in ~/.local/share/applications/firefox-nightly.desktop:



    [Desktop Entry]
    Type=Application
    Name=Firefox Nightly
    #
    # WARNING: Remember to fix the path in Icon and Exec
    #
    Icon=/path/to/firefox-nightly/browser/icons/mozicon128.png
    Exec=/path/to/firefox-nightly/firefox %u
    Terminal=false
    StartupWMClass=Nightly


    Without StartupWMClass, the running application is not recognized and the icon is displayed twice on the dock.






    share|improve this answer



















    • 2





      Multiple icons of the same application (and also fallback to a default "blank" icon after failing to show specified icon in the .desktop file) sounds like a separate issue. I think it would be better if you ask a new question and add an answer yourself. There's already this one.

      – pomsky
      Nov 7 '17 at 15:37






    • 1





      @pomsky I posted it here because I had the same problem: it was not possible to mark the app as favourite in the context menu. Dragging it from the activities screen did almost work: the icon was pinned but, clicking it, another icon was shown. By adding StartupWMClass to your config, it finally worked. Sorry for the confusion. Maybe I should answer to this one?

      – Marcello Nuccio
      Nov 7 '17 at 17:29






    • 1





      Already I have posted an answer (StartupWMClass trick) there a week ago. If your answer is significantly different you're most welcome to post a new answer. But the thing that question is a bit misleading, there OP has the issue in only Wayland, not Xorg. So I think it's better if you could post an new question and answer it yourself. I didn't see a new questions with multiple icons issue recently, only saw a comment.

      – pomsky
      Nov 7 '17 at 17:34


















    5














    I had the same problem with Firefox Nightly. The following configuration works for me in ~/.local/share/applications/firefox-nightly.desktop:



    [Desktop Entry]
    Type=Application
    Name=Firefox Nightly
    #
    # WARNING: Remember to fix the path in Icon and Exec
    #
    Icon=/path/to/firefox-nightly/browser/icons/mozicon128.png
    Exec=/path/to/firefox-nightly/firefox %u
    Terminal=false
    StartupWMClass=Nightly


    Without StartupWMClass, the running application is not recognized and the icon is displayed twice on the dock.






    share|improve this answer



















    • 2





      Multiple icons of the same application (and also fallback to a default "blank" icon after failing to show specified icon in the .desktop file) sounds like a separate issue. I think it would be better if you ask a new question and add an answer yourself. There's already this one.

      – pomsky
      Nov 7 '17 at 15:37






    • 1





      @pomsky I posted it here because I had the same problem: it was not possible to mark the app as favourite in the context menu. Dragging it from the activities screen did almost work: the icon was pinned but, clicking it, another icon was shown. By adding StartupWMClass to your config, it finally worked. Sorry for the confusion. Maybe I should answer to this one?

      – Marcello Nuccio
      Nov 7 '17 at 17:29






    • 1





      Already I have posted an answer (StartupWMClass trick) there a week ago. If your answer is significantly different you're most welcome to post a new answer. But the thing that question is a bit misleading, there OP has the issue in only Wayland, not Xorg. So I think it's better if you could post an new question and answer it yourself. I didn't see a new questions with multiple icons issue recently, only saw a comment.

      – pomsky
      Nov 7 '17 at 17:34
















    5












    5








    5







    I had the same problem with Firefox Nightly. The following configuration works for me in ~/.local/share/applications/firefox-nightly.desktop:



    [Desktop Entry]
    Type=Application
    Name=Firefox Nightly
    #
    # WARNING: Remember to fix the path in Icon and Exec
    #
    Icon=/path/to/firefox-nightly/browser/icons/mozicon128.png
    Exec=/path/to/firefox-nightly/firefox %u
    Terminal=false
    StartupWMClass=Nightly


    Without StartupWMClass, the running application is not recognized and the icon is displayed twice on the dock.






    share|improve this answer













    I had the same problem with Firefox Nightly. The following configuration works for me in ~/.local/share/applications/firefox-nightly.desktop:



    [Desktop Entry]
    Type=Application
    Name=Firefox Nightly
    #
    # WARNING: Remember to fix the path in Icon and Exec
    #
    Icon=/path/to/firefox-nightly/browser/icons/mozicon128.png
    Exec=/path/to/firefox-nightly/firefox %u
    Terminal=false
    StartupWMClass=Nightly


    Without StartupWMClass, the running application is not recognized and the icon is displayed twice on the dock.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 7 '17 at 12:09









    Marcello NuccioMarcello Nuccio

    1515




    1515








    • 2





      Multiple icons of the same application (and also fallback to a default "blank" icon after failing to show specified icon in the .desktop file) sounds like a separate issue. I think it would be better if you ask a new question and add an answer yourself. There's already this one.

      – pomsky
      Nov 7 '17 at 15:37






    • 1





      @pomsky I posted it here because I had the same problem: it was not possible to mark the app as favourite in the context menu. Dragging it from the activities screen did almost work: the icon was pinned but, clicking it, another icon was shown. By adding StartupWMClass to your config, it finally worked. Sorry for the confusion. Maybe I should answer to this one?

      – Marcello Nuccio
      Nov 7 '17 at 17:29






    • 1





      Already I have posted an answer (StartupWMClass trick) there a week ago. If your answer is significantly different you're most welcome to post a new answer. But the thing that question is a bit misleading, there OP has the issue in only Wayland, not Xorg. So I think it's better if you could post an new question and answer it yourself. I didn't see a new questions with multiple icons issue recently, only saw a comment.

      – pomsky
      Nov 7 '17 at 17:34
















    • 2





      Multiple icons of the same application (and also fallback to a default "blank" icon after failing to show specified icon in the .desktop file) sounds like a separate issue. I think it would be better if you ask a new question and add an answer yourself. There's already this one.

      – pomsky
      Nov 7 '17 at 15:37






    • 1





      @pomsky I posted it here because I had the same problem: it was not possible to mark the app as favourite in the context menu. Dragging it from the activities screen did almost work: the icon was pinned but, clicking it, another icon was shown. By adding StartupWMClass to your config, it finally worked. Sorry for the confusion. Maybe I should answer to this one?

      – Marcello Nuccio
      Nov 7 '17 at 17:29






    • 1





      Already I have posted an answer (StartupWMClass trick) there a week ago. If your answer is significantly different you're most welcome to post a new answer. But the thing that question is a bit misleading, there OP has the issue in only Wayland, not Xorg. So I think it's better if you could post an new question and answer it yourself. I didn't see a new questions with multiple icons issue recently, only saw a comment.

      – pomsky
      Nov 7 '17 at 17:34










    2




    2





    Multiple icons of the same application (and also fallback to a default "blank" icon after failing to show specified icon in the .desktop file) sounds like a separate issue. I think it would be better if you ask a new question and add an answer yourself. There's already this one.

    – pomsky
    Nov 7 '17 at 15:37





    Multiple icons of the same application (and also fallback to a default "blank" icon after failing to show specified icon in the .desktop file) sounds like a separate issue. I think it would be better if you ask a new question and add an answer yourself. There's already this one.

    – pomsky
    Nov 7 '17 at 15:37




    1




    1





    @pomsky I posted it here because I had the same problem: it was not possible to mark the app as favourite in the context menu. Dragging it from the activities screen did almost work: the icon was pinned but, clicking it, another icon was shown. By adding StartupWMClass to your config, it finally worked. Sorry for the confusion. Maybe I should answer to this one?

    – Marcello Nuccio
    Nov 7 '17 at 17:29





    @pomsky I posted it here because I had the same problem: it was not possible to mark the app as favourite in the context menu. Dragging it from the activities screen did almost work: the icon was pinned but, clicking it, another icon was shown. By adding StartupWMClass to your config, it finally worked. Sorry for the confusion. Maybe I should answer to this one?

    – Marcello Nuccio
    Nov 7 '17 at 17:29




    1




    1





    Already I have posted an answer (StartupWMClass trick) there a week ago. If your answer is significantly different you're most welcome to post a new answer. But the thing that question is a bit misleading, there OP has the issue in only Wayland, not Xorg. So I think it's better if you could post an new question and answer it yourself. I didn't see a new questions with multiple icons issue recently, only saw a comment.

    – pomsky
    Nov 7 '17 at 17:34







    Already I have posted an answer (StartupWMClass trick) there a week ago. If your answer is significantly different you're most welcome to post a new answer. But the thing that question is a bit misleading, there OP has the issue in only Wayland, not Xorg. So I think it's better if you could post an new question and answer it yourself. I didn't see a new questions with multiple icons issue recently, only saw a comment.

    – pomsky
    Nov 7 '17 at 17:34













    1














    For anyone having troubles, if the application is not appearing in Activities, make sure you don't have "NoDisplay=true" in the .desktop file for your application.






    share|improve this answer






























      1














      For anyone having troubles, if the application is not appearing in Activities, make sure you don't have "NoDisplay=true" in the .desktop file for your application.






      share|improve this answer




























        1












        1








        1







        For anyone having troubles, if the application is not appearing in Activities, make sure you don't have "NoDisplay=true" in the .desktop file for your application.






        share|improve this answer















        For anyone having troubles, if the application is not appearing in Activities, make sure you don't have "NoDisplay=true" in the .desktop file for your application.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Dec 9 '18 at 8:19









        Philippe Delteil

        6401522




        6401522










        answered May 7 '18 at 14:39









        Sam KazSam Kaz

        111




        111






























            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%2f967409%2fcant-add-custom-desktop-files-to-ubuntu-dock%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

            數位音樂下載

            When can things happen in Etherscan, such as the picture below?

            格利澤436b