How to make Spotify the default music player?












10















"Spotify for linux" doesn't show up in default applications menu for Music (system info section in system settings).



Therefore, it also doesn't come in Dash and music media keys don't work as well.



How to make it the default application for playing Music or make media keys work?










share|improve this question





























    10















    "Spotify for linux" doesn't show up in default applications menu for Music (system info section in system settings).



    Therefore, it also doesn't come in Dash and music media keys don't work as well.



    How to make it the default application for playing Music or make media keys work?










    share|improve this question



























      10












      10








      10








      "Spotify for linux" doesn't show up in default applications menu for Music (system info section in system settings).



      Therefore, it also doesn't come in Dash and music media keys don't work as well.



      How to make it the default application for playing Music or make media keys work?










      share|improve this question
















      "Spotify for linux" doesn't show up in default applications menu for Music (system info section in system settings).



      Therefore, it also doesn't come in Dash and music media keys don't work as well.



      How to make it the default application for playing Music or make media keys work?







      default-programs music-player spotify






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 19 '12 at 13:45







      hemanv2

















      asked Jan 14 '12 at 10:45









      hemanv2hemanv2

      5315




      5315






















          5 Answers
          5






          active

          oldest

          votes


















          6














          Don't have spotify so can only answer question 1 generally



          The 'Default music player', or 'Listen to Music' in the Dash is set by whatever app is the default application for audio/x-vorbis+ogg



          That is the extent of the usefulness to setting a default music player in System Settings > System Info > Default Applications > Music



          To use a player that doesn't show up in the above setting's dropdown list there are 2 ways, most direct, in all cases the app must have a .desktop, in this case maybe spotify.desktop



          gedit ~/.local/share/applications/mimeapps.list


          In the [Default Applications] section look for this line



           audio/x-vorbis+ogg=


          If it's there replace the whatever.desktop with the whatever.desktop of your choice, otherwise just add the line, Example - I've set audacious, you'd be using spotify.desktop if it exists



          [Default Applications]
          audio/x-vorbis+ogg=audacious2.desktop


          Additionally you may want to add that whatever.desktop to the end of the same line in [Added Associations], same example, note that entries in Added end with ;



          [Added Associations]
          audio/x-vorbis+ogg=vlc.desktop;audacious2.desktop;


          The other thing that can be done is to open your app's .desktop file in a text editor, in this case possibly spotify.desktop



          Add a %U to the end of the Exec= line, again using as an Example audacious



          Exec=audacious2 %U


          Also look for a MimeTypes= line & see if there is this entry, audio/x-vorbis+ogg;



          If not then just add to end of line






          share|improve this answer































            3














            As doug suggested, simply add this line to your ~/.local/share/applications/mimeapps.list file in two places, like so:



            [Default Applications]
            ...
            audio/x-vorbis+ogg=spotify.desktop

            [Added Associations]
            ...
            audio/x-vorbis+ogg=spotify.desktop;


            After doing this, Spotify instantly showed up as my default music played in Unity.



            Cheers!






            share|improve this answer
























            • Any idea how to make to open the already running Spotify instance instead of launching a new one?

              – Piranna
              Sep 25 '17 at 10:33



















            0














            In 18.04 I added those lines to /usr/share/applications/mimeapps.list [New File]



            [Default Applications]
            audio/x-vorbis+ogg=spotify.desktop
            [Added Associations]
            audio/x-vorbis+ogg=spotify.desktop;


            Works like a charm! Now I can finally skip using keyboard shortcuts.






            share|improve this answer































              -1














              If you want to have useful shortcuts from command line, wherever you're working on, please refer to the spotify forum:



              https://community.spotify.com/t5/Desktop-Linux/Basic-controls-via-command-line/td-p/4295625



              You can use directly those events as a command for your customized keyboard shortcut, and they work like a charm. I started using the play/pause toggle. Fantastic!



              Regards






              share|improve this answer































                -1














                Doug's answer works well. I wanted to add that the .desktop file for spotify is now spotify_spotify.desktop and my ~/.local/share/applications/mimeapps.list file looks like this:



                [Default Applications]
                audio/x-vorbis+ogg=spotify_spotify.desktop
                [Added Associations]
                audio/x-vorbis+ogg=spotify_spotify.desktop;





                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%2f95345%2fhow-to-make-spotify-the-default-music-player%23new-answer', 'question_page');
                  }
                  );

                  Post as a guest















                  Required, but never shown

























                  5 Answers
                  5






                  active

                  oldest

                  votes








                  5 Answers
                  5






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  6














                  Don't have spotify so can only answer question 1 generally



                  The 'Default music player', or 'Listen to Music' in the Dash is set by whatever app is the default application for audio/x-vorbis+ogg



                  That is the extent of the usefulness to setting a default music player in System Settings > System Info > Default Applications > Music



                  To use a player that doesn't show up in the above setting's dropdown list there are 2 ways, most direct, in all cases the app must have a .desktop, in this case maybe spotify.desktop



                  gedit ~/.local/share/applications/mimeapps.list


                  In the [Default Applications] section look for this line



                   audio/x-vorbis+ogg=


                  If it's there replace the whatever.desktop with the whatever.desktop of your choice, otherwise just add the line, Example - I've set audacious, you'd be using spotify.desktop if it exists



                  [Default Applications]
                  audio/x-vorbis+ogg=audacious2.desktop


                  Additionally you may want to add that whatever.desktop to the end of the same line in [Added Associations], same example, note that entries in Added end with ;



                  [Added Associations]
                  audio/x-vorbis+ogg=vlc.desktop;audacious2.desktop;


                  The other thing that can be done is to open your app's .desktop file in a text editor, in this case possibly spotify.desktop



                  Add a %U to the end of the Exec= line, again using as an Example audacious



                  Exec=audacious2 %U


                  Also look for a MimeTypes= line & see if there is this entry, audio/x-vorbis+ogg;



                  If not then just add to end of line






                  share|improve this answer




























                    6














                    Don't have spotify so can only answer question 1 generally



                    The 'Default music player', or 'Listen to Music' in the Dash is set by whatever app is the default application for audio/x-vorbis+ogg



                    That is the extent of the usefulness to setting a default music player in System Settings > System Info > Default Applications > Music



                    To use a player that doesn't show up in the above setting's dropdown list there are 2 ways, most direct, in all cases the app must have a .desktop, in this case maybe spotify.desktop



                    gedit ~/.local/share/applications/mimeapps.list


                    In the [Default Applications] section look for this line



                     audio/x-vorbis+ogg=


                    If it's there replace the whatever.desktop with the whatever.desktop of your choice, otherwise just add the line, Example - I've set audacious, you'd be using spotify.desktop if it exists



                    [Default Applications]
                    audio/x-vorbis+ogg=audacious2.desktop


                    Additionally you may want to add that whatever.desktop to the end of the same line in [Added Associations], same example, note that entries in Added end with ;



                    [Added Associations]
                    audio/x-vorbis+ogg=vlc.desktop;audacious2.desktop;


                    The other thing that can be done is to open your app's .desktop file in a text editor, in this case possibly spotify.desktop



                    Add a %U to the end of the Exec= line, again using as an Example audacious



                    Exec=audacious2 %U


                    Also look for a MimeTypes= line & see if there is this entry, audio/x-vorbis+ogg;



                    If not then just add to end of line






                    share|improve this answer


























                      6












                      6








                      6







                      Don't have spotify so can only answer question 1 generally



                      The 'Default music player', or 'Listen to Music' in the Dash is set by whatever app is the default application for audio/x-vorbis+ogg



                      That is the extent of the usefulness to setting a default music player in System Settings > System Info > Default Applications > Music



                      To use a player that doesn't show up in the above setting's dropdown list there are 2 ways, most direct, in all cases the app must have a .desktop, in this case maybe spotify.desktop



                      gedit ~/.local/share/applications/mimeapps.list


                      In the [Default Applications] section look for this line



                       audio/x-vorbis+ogg=


                      If it's there replace the whatever.desktop with the whatever.desktop of your choice, otherwise just add the line, Example - I've set audacious, you'd be using spotify.desktop if it exists



                      [Default Applications]
                      audio/x-vorbis+ogg=audacious2.desktop


                      Additionally you may want to add that whatever.desktop to the end of the same line in [Added Associations], same example, note that entries in Added end with ;



                      [Added Associations]
                      audio/x-vorbis+ogg=vlc.desktop;audacious2.desktop;


                      The other thing that can be done is to open your app's .desktop file in a text editor, in this case possibly spotify.desktop



                      Add a %U to the end of the Exec= line, again using as an Example audacious



                      Exec=audacious2 %U


                      Also look for a MimeTypes= line & see if there is this entry, audio/x-vorbis+ogg;



                      If not then just add to end of line






                      share|improve this answer













                      Don't have spotify so can only answer question 1 generally



                      The 'Default music player', or 'Listen to Music' in the Dash is set by whatever app is the default application for audio/x-vorbis+ogg



                      That is the extent of the usefulness to setting a default music player in System Settings > System Info > Default Applications > Music



                      To use a player that doesn't show up in the above setting's dropdown list there are 2 ways, most direct, in all cases the app must have a .desktop, in this case maybe spotify.desktop



                      gedit ~/.local/share/applications/mimeapps.list


                      In the [Default Applications] section look for this line



                       audio/x-vorbis+ogg=


                      If it's there replace the whatever.desktop with the whatever.desktop of your choice, otherwise just add the line, Example - I've set audacious, you'd be using spotify.desktop if it exists



                      [Default Applications]
                      audio/x-vorbis+ogg=audacious2.desktop


                      Additionally you may want to add that whatever.desktop to the end of the same line in [Added Associations], same example, note that entries in Added end with ;



                      [Added Associations]
                      audio/x-vorbis+ogg=vlc.desktop;audacious2.desktop;


                      The other thing that can be done is to open your app's .desktop file in a text editor, in this case possibly spotify.desktop



                      Add a %U to the end of the Exec= line, again using as an Example audacious



                      Exec=audacious2 %U


                      Also look for a MimeTypes= line & see if there is this entry, audio/x-vorbis+ogg;



                      If not then just add to end of line







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Jan 19 '12 at 16:17









                      dougdoug

                      14.3k13553




                      14.3k13553

























                          3














                          As doug suggested, simply add this line to your ~/.local/share/applications/mimeapps.list file in two places, like so:



                          [Default Applications]
                          ...
                          audio/x-vorbis+ogg=spotify.desktop

                          [Added Associations]
                          ...
                          audio/x-vorbis+ogg=spotify.desktop;


                          After doing this, Spotify instantly showed up as my default music played in Unity.



                          Cheers!






                          share|improve this answer
























                          • Any idea how to make to open the already running Spotify instance instead of launching a new one?

                            – Piranna
                            Sep 25 '17 at 10:33
















                          3














                          As doug suggested, simply add this line to your ~/.local/share/applications/mimeapps.list file in two places, like so:



                          [Default Applications]
                          ...
                          audio/x-vorbis+ogg=spotify.desktop

                          [Added Associations]
                          ...
                          audio/x-vorbis+ogg=spotify.desktop;


                          After doing this, Spotify instantly showed up as my default music played in Unity.



                          Cheers!






                          share|improve this answer
























                          • Any idea how to make to open the already running Spotify instance instead of launching a new one?

                            – Piranna
                            Sep 25 '17 at 10:33














                          3












                          3








                          3







                          As doug suggested, simply add this line to your ~/.local/share/applications/mimeapps.list file in two places, like so:



                          [Default Applications]
                          ...
                          audio/x-vorbis+ogg=spotify.desktop

                          [Added Associations]
                          ...
                          audio/x-vorbis+ogg=spotify.desktop;


                          After doing this, Spotify instantly showed up as my default music played in Unity.



                          Cheers!






                          share|improve this answer













                          As doug suggested, simply add this line to your ~/.local/share/applications/mimeapps.list file in two places, like so:



                          [Default Applications]
                          ...
                          audio/x-vorbis+ogg=spotify.desktop

                          [Added Associations]
                          ...
                          audio/x-vorbis+ogg=spotify.desktop;


                          After doing this, Spotify instantly showed up as my default music played in Unity.



                          Cheers!







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jan 30 '12 at 10:56









                          John J. CamilleriJohn J. Camilleri

                          3981414




                          3981414













                          • Any idea how to make to open the already running Spotify instance instead of launching a new one?

                            – Piranna
                            Sep 25 '17 at 10:33



















                          • Any idea how to make to open the already running Spotify instance instead of launching a new one?

                            – Piranna
                            Sep 25 '17 at 10:33

















                          Any idea how to make to open the already running Spotify instance instead of launching a new one?

                          – Piranna
                          Sep 25 '17 at 10:33





                          Any idea how to make to open the already running Spotify instance instead of launching a new one?

                          – Piranna
                          Sep 25 '17 at 10:33











                          0














                          In 18.04 I added those lines to /usr/share/applications/mimeapps.list [New File]



                          [Default Applications]
                          audio/x-vorbis+ogg=spotify.desktop
                          [Added Associations]
                          audio/x-vorbis+ogg=spotify.desktop;


                          Works like a charm! Now I can finally skip using keyboard shortcuts.






                          share|improve this answer




























                            0














                            In 18.04 I added those lines to /usr/share/applications/mimeapps.list [New File]



                            [Default Applications]
                            audio/x-vorbis+ogg=spotify.desktop
                            [Added Associations]
                            audio/x-vorbis+ogg=spotify.desktop;


                            Works like a charm! Now I can finally skip using keyboard shortcuts.






                            share|improve this answer


























                              0












                              0








                              0







                              In 18.04 I added those lines to /usr/share/applications/mimeapps.list [New File]



                              [Default Applications]
                              audio/x-vorbis+ogg=spotify.desktop
                              [Added Associations]
                              audio/x-vorbis+ogg=spotify.desktop;


                              Works like a charm! Now I can finally skip using keyboard shortcuts.






                              share|improve this answer













                              In 18.04 I added those lines to /usr/share/applications/mimeapps.list [New File]



                              [Default Applications]
                              audio/x-vorbis+ogg=spotify.desktop
                              [Added Associations]
                              audio/x-vorbis+ogg=spotify.desktop;


                              Works like a charm! Now I can finally skip using keyboard shortcuts.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Apr 26 '18 at 9:13









                              stepedesstepedes

                              3817




                              3817























                                  -1














                                  If you want to have useful shortcuts from command line, wherever you're working on, please refer to the spotify forum:



                                  https://community.spotify.com/t5/Desktop-Linux/Basic-controls-via-command-line/td-p/4295625



                                  You can use directly those events as a command for your customized keyboard shortcut, and they work like a charm. I started using the play/pause toggle. Fantastic!



                                  Regards






                                  share|improve this answer




























                                    -1














                                    If you want to have useful shortcuts from command line, wherever you're working on, please refer to the spotify forum:



                                    https://community.spotify.com/t5/Desktop-Linux/Basic-controls-via-command-line/td-p/4295625



                                    You can use directly those events as a command for your customized keyboard shortcut, and they work like a charm. I started using the play/pause toggle. Fantastic!



                                    Regards






                                    share|improve this answer


























                                      -1












                                      -1








                                      -1







                                      If you want to have useful shortcuts from command line, wherever you're working on, please refer to the spotify forum:



                                      https://community.spotify.com/t5/Desktop-Linux/Basic-controls-via-command-line/td-p/4295625



                                      You can use directly those events as a command for your customized keyboard shortcut, and they work like a charm. I started using the play/pause toggle. Fantastic!



                                      Regards






                                      share|improve this answer













                                      If you want to have useful shortcuts from command line, wherever you're working on, please refer to the spotify forum:



                                      https://community.spotify.com/t5/Desktop-Linux/Basic-controls-via-command-line/td-p/4295625



                                      You can use directly those events as a command for your customized keyboard shortcut, and they work like a charm. I started using the play/pause toggle. Fantastic!



                                      Regards







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Feb 7 at 9:39









                                      JordiJordi

                                      1




                                      1























                                          -1














                                          Doug's answer works well. I wanted to add that the .desktop file for spotify is now spotify_spotify.desktop and my ~/.local/share/applications/mimeapps.list file looks like this:



                                          [Default Applications]
                                          audio/x-vorbis+ogg=spotify_spotify.desktop
                                          [Added Associations]
                                          audio/x-vorbis+ogg=spotify_spotify.desktop;





                                          share|improve this answer




























                                            -1














                                            Doug's answer works well. I wanted to add that the .desktop file for spotify is now spotify_spotify.desktop and my ~/.local/share/applications/mimeapps.list file looks like this:



                                            [Default Applications]
                                            audio/x-vorbis+ogg=spotify_spotify.desktop
                                            [Added Associations]
                                            audio/x-vorbis+ogg=spotify_spotify.desktop;





                                            share|improve this answer


























                                              -1












                                              -1








                                              -1







                                              Doug's answer works well. I wanted to add that the .desktop file for spotify is now spotify_spotify.desktop and my ~/.local/share/applications/mimeapps.list file looks like this:



                                              [Default Applications]
                                              audio/x-vorbis+ogg=spotify_spotify.desktop
                                              [Added Associations]
                                              audio/x-vorbis+ogg=spotify_spotify.desktop;





                                              share|improve this answer













                                              Doug's answer works well. I wanted to add that the .desktop file for spotify is now spotify_spotify.desktop and my ~/.local/share/applications/mimeapps.list file looks like this:



                                              [Default Applications]
                                              audio/x-vorbis+ogg=spotify_spotify.desktop
                                              [Added Associations]
                                              audio/x-vorbis+ogg=spotify_spotify.desktop;






                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered Feb 18 at 15:42









                                              ssohinssohin

                                              1




                                              1






























                                                  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%2f95345%2fhow-to-make-spotify-the-default-music-player%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

                                                  Human spaceflight

                                                  Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

                                                  張江高科駅