How can I make IDLE the default editor for Python files?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












12















If I double click on a Python file on my Gnome Classic desktop, it is not opened in IDLE. How can I make IDLE the default editor for Python files?



  1. I have tried to delete all the other programs that were being opened.


  2. I have been looking through IDLE's properties.


  3. I have been looking through the program's properties as well.


When I run



xdg-mime query default text/x-python


I get the output



gedit.destkop


I do have IDLE installed, and I tried to right click the file and open with an application. IDLE was nowhere to be seen. But when I go to my applications, and go to programming, IDLE is there, clear as day.










share|improve this question
























  • What happens if you just write idle manually as described in Gabor's answer? You can also try using the full path (open a terminal and run type idle to get it).

    – terdon
    Nov 20 '14 at 1:12











  • What's the output of find /usr/share/applications/ -name "*idle*"

    – Braiam
    Nov 20 '14 at 1:23















12















If I double click on a Python file on my Gnome Classic desktop, it is not opened in IDLE. How can I make IDLE the default editor for Python files?



  1. I have tried to delete all the other programs that were being opened.


  2. I have been looking through IDLE's properties.


  3. I have been looking through the program's properties as well.


When I run



xdg-mime query default text/x-python


I get the output



gedit.destkop


I do have IDLE installed, and I tried to right click the file and open with an application. IDLE was nowhere to be seen. But when I go to my applications, and go to programming, IDLE is there, clear as day.










share|improve this question
























  • What happens if you just write idle manually as described in Gabor's answer? You can also try using the full path (open a terminal and run type idle to get it).

    – terdon
    Nov 20 '14 at 1:12











  • What's the output of find /usr/share/applications/ -name "*idle*"

    – Braiam
    Nov 20 '14 at 1:23













12












12








12


1






If I double click on a Python file on my Gnome Classic desktop, it is not opened in IDLE. How can I make IDLE the default editor for Python files?



  1. I have tried to delete all the other programs that were being opened.


  2. I have been looking through IDLE's properties.


  3. I have been looking through the program's properties as well.


When I run



xdg-mime query default text/x-python


I get the output



gedit.destkop


I do have IDLE installed, and I tried to right click the file and open with an application. IDLE was nowhere to be seen. But when I go to my applications, and go to programming, IDLE is there, clear as day.










share|improve this question
















If I double click on a Python file on my Gnome Classic desktop, it is not opened in IDLE. How can I make IDLE the default editor for Python files?



  1. I have tried to delete all the other programs that were being opened.


  2. I have been looking through IDLE's properties.


  3. I have been looking through the program's properties as well.


When I run



xdg-mime query default text/x-python


I get the output



gedit.destkop


I do have IDLE installed, and I tried to right click the file and open with an application. IDLE was nowhere to be seen. But when I go to my applications, and go to programming, IDLE is there, clear as day.







xdg






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 20 '14 at 10:28









Peter Mortensen

91159




91159










asked Nov 20 '14 at 0:09









Amateur ProgramerAmateur Programer

3311520




3311520












  • What happens if you just write idle manually as described in Gabor's answer? You can also try using the full path (open a terminal and run type idle to get it).

    – terdon
    Nov 20 '14 at 1:12











  • What's the output of find /usr/share/applications/ -name "*idle*"

    – Braiam
    Nov 20 '14 at 1:23

















  • What happens if you just write idle manually as described in Gabor's answer? You can also try using the full path (open a terminal and run type idle to get it).

    – terdon
    Nov 20 '14 at 1:12











  • What's the output of find /usr/share/applications/ -name "*idle*"

    – Braiam
    Nov 20 '14 at 1:23
















What happens if you just write idle manually as described in Gabor's answer? You can also try using the full path (open a terminal and run type idle to get it).

– terdon
Nov 20 '14 at 1:12





What happens if you just write idle manually as described in Gabor's answer? You can also try using the full path (open a terminal and run type idle to get it).

– terdon
Nov 20 '14 at 1:12













What's the output of find /usr/share/applications/ -name "*idle*"

– Braiam
Nov 20 '14 at 1:23





What's the output of find /usr/share/applications/ -name "*idle*"

– Braiam
Nov 20 '14 at 1:23










2 Answers
2






active

oldest

votes


















9














You can easily associate the .py files with IDLE. You have to right click a python script, choose "Open with -> Other application", then choose IDLE from the list with the checkbox asking if it should be the default application ticked. I use XFCE, but Gnome's Nautilus should be similar.



enter image description here



Alternatively, there is a configuration file in your home directory which contains the list of default applications. You can access it on the following path:



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


You can extend it with the following line:



text/x-python=idle.desktop


where idle.desktop stands for the desktop file of the IDLE version you would like to use, for instance idle-python2.7.desktop or idle-python3.desktop based on the python version you have to use.



NOTE:



Be aware of the permissions of your scripts. If it has the executable permission, despite the default application, your system won't open it in IDLE, as it will try to execute it.






share|improve this answer

























  • Is the name of the program enough or do you need a path? The name might be enough of the right .desktop file is there I guess.

    – terdon
    Nov 20 '14 at 0:50











  • Ah, thank you kind sir... But i still seem confused... Im really sorry... I tried to open it using the different aplicatoins, but idle does not appear

    – Amateur Programer
    Nov 20 '14 at 0:52











  • @terdon The command is enough if it can be accessed from the PATH variable I think. @AmateurProgramer Try to use the custom command option to access IDLE, if it canned be done with Gnome, try the second option (edit the configuration file).

    – Gabor Farkas
    Nov 20 '14 at 0:55






  • 4





    A couple of things here: 1. In Gnome 3 that option - the entry box where you can enter the name of an executable - was removed. 2. The entry in mimeapps.list should be text/x-python=idle2.desktop or text/x-python=idle3.desktop i.e. it has to point to a desktop file not to an executable. Also, it has to be under both [Default Applications] and [Added Associations] and it has to be the first in the list, before gedit.desktop, e.g. text/x-python=idle3.desktop;gedit.desktop

    – don_crissti
    Nov 20 '14 at 1:30






  • 3





    There is no such a "Use custom command" in Nautilus on Gnome Classic (Ubuntu 12.04).

    – Anthon
    Nov 20 '14 at 6:38


















2














The problem you have is caused by the default installed idle → desktop association.



Nautilus, at least on my 12.04 Ubuntu (Classic Desktop), doesn't seem to have anything with which you can associated (new) commands with a certain filetype (as some Desktops/Browsers) and the list doesn't show idle at all, even if installed via apt-get install idle:



enter image description here



You can get the screen by right clicking a .py file, selecting Properties then the Open With TAB, and then click Show other applications (going via the Open With menu gets you the same result).



You have to correct the .dekstop file for idle by editing
/usr/share/applications/idle-python2.7.desktop as root (you might have idle-python3.desktop, depending on what version of idle you installed).



[Desktop Entry]
Name=IDLE (using Python-2.7)
Comment=Integrated Development Environment for Python (using Python-2.7)
Exec=/usr/bin/idle-python2.7 -n %f
Icon=/usr/share/pixmaps/python2.7.xpm
Terminal=false
Type=Application
Categories=Application;Development;
StartupNotify=true


What is missing in the installed file is the %f at the end of the Exec= line. Add %f there and save. Then in nautilus, right click a .py file and navigate to the Properties and Open With TAB once more (you don't have to restart nautilus). Now scroll down and Idle (using Python-2.7) is a selectable option (either as recommended application) or else first click it in the show other application list:



enter image description here



You can use Set as default to always open .py files with idle.






share|improve this answer
























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    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: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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%2funix.stackexchange.com%2fquestions%2f168939%2fhow-can-i-make-idle-the-default-editor-for-python-files%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    9














    You can easily associate the .py files with IDLE. You have to right click a python script, choose "Open with -> Other application", then choose IDLE from the list with the checkbox asking if it should be the default application ticked. I use XFCE, but Gnome's Nautilus should be similar.



    enter image description here



    Alternatively, there is a configuration file in your home directory which contains the list of default applications. You can access it on the following path:



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


    You can extend it with the following line:



    text/x-python=idle.desktop


    where idle.desktop stands for the desktop file of the IDLE version you would like to use, for instance idle-python2.7.desktop or idle-python3.desktop based on the python version you have to use.



    NOTE:



    Be aware of the permissions of your scripts. If it has the executable permission, despite the default application, your system won't open it in IDLE, as it will try to execute it.






    share|improve this answer

























    • Is the name of the program enough or do you need a path? The name might be enough of the right .desktop file is there I guess.

      – terdon
      Nov 20 '14 at 0:50











    • Ah, thank you kind sir... But i still seem confused... Im really sorry... I tried to open it using the different aplicatoins, but idle does not appear

      – Amateur Programer
      Nov 20 '14 at 0:52











    • @terdon The command is enough if it can be accessed from the PATH variable I think. @AmateurProgramer Try to use the custom command option to access IDLE, if it canned be done with Gnome, try the second option (edit the configuration file).

      – Gabor Farkas
      Nov 20 '14 at 0:55






    • 4





      A couple of things here: 1. In Gnome 3 that option - the entry box where you can enter the name of an executable - was removed. 2. The entry in mimeapps.list should be text/x-python=idle2.desktop or text/x-python=idle3.desktop i.e. it has to point to a desktop file not to an executable. Also, it has to be under both [Default Applications] and [Added Associations] and it has to be the first in the list, before gedit.desktop, e.g. text/x-python=idle3.desktop;gedit.desktop

      – don_crissti
      Nov 20 '14 at 1:30






    • 3





      There is no such a "Use custom command" in Nautilus on Gnome Classic (Ubuntu 12.04).

      – Anthon
      Nov 20 '14 at 6:38















    9














    You can easily associate the .py files with IDLE. You have to right click a python script, choose "Open with -> Other application", then choose IDLE from the list with the checkbox asking if it should be the default application ticked. I use XFCE, but Gnome's Nautilus should be similar.



    enter image description here



    Alternatively, there is a configuration file in your home directory which contains the list of default applications. You can access it on the following path:



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


    You can extend it with the following line:



    text/x-python=idle.desktop


    where idle.desktop stands for the desktop file of the IDLE version you would like to use, for instance idle-python2.7.desktop or idle-python3.desktop based on the python version you have to use.



    NOTE:



    Be aware of the permissions of your scripts. If it has the executable permission, despite the default application, your system won't open it in IDLE, as it will try to execute it.






    share|improve this answer

























    • Is the name of the program enough or do you need a path? The name might be enough of the right .desktop file is there I guess.

      – terdon
      Nov 20 '14 at 0:50











    • Ah, thank you kind sir... But i still seem confused... Im really sorry... I tried to open it using the different aplicatoins, but idle does not appear

      – Amateur Programer
      Nov 20 '14 at 0:52











    • @terdon The command is enough if it can be accessed from the PATH variable I think. @AmateurProgramer Try to use the custom command option to access IDLE, if it canned be done with Gnome, try the second option (edit the configuration file).

      – Gabor Farkas
      Nov 20 '14 at 0:55






    • 4





      A couple of things here: 1. In Gnome 3 that option - the entry box where you can enter the name of an executable - was removed. 2. The entry in mimeapps.list should be text/x-python=idle2.desktop or text/x-python=idle3.desktop i.e. it has to point to a desktop file not to an executable. Also, it has to be under both [Default Applications] and [Added Associations] and it has to be the first in the list, before gedit.desktop, e.g. text/x-python=idle3.desktop;gedit.desktop

      – don_crissti
      Nov 20 '14 at 1:30






    • 3





      There is no such a "Use custom command" in Nautilus on Gnome Classic (Ubuntu 12.04).

      – Anthon
      Nov 20 '14 at 6:38













    9












    9








    9







    You can easily associate the .py files with IDLE. You have to right click a python script, choose "Open with -> Other application", then choose IDLE from the list with the checkbox asking if it should be the default application ticked. I use XFCE, but Gnome's Nautilus should be similar.



    enter image description here



    Alternatively, there is a configuration file in your home directory which contains the list of default applications. You can access it on the following path:



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


    You can extend it with the following line:



    text/x-python=idle.desktop


    where idle.desktop stands for the desktop file of the IDLE version you would like to use, for instance idle-python2.7.desktop or idle-python3.desktop based on the python version you have to use.



    NOTE:



    Be aware of the permissions of your scripts. If it has the executable permission, despite the default application, your system won't open it in IDLE, as it will try to execute it.






    share|improve this answer















    You can easily associate the .py files with IDLE. You have to right click a python script, choose "Open with -> Other application", then choose IDLE from the list with the checkbox asking if it should be the default application ticked. I use XFCE, but Gnome's Nautilus should be similar.



    enter image description here



    Alternatively, there is a configuration file in your home directory which contains the list of default applications. You can access it on the following path:



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


    You can extend it with the following line:



    text/x-python=idle.desktop


    where idle.desktop stands for the desktop file of the IDLE version you would like to use, for instance idle-python2.7.desktop or idle-python3.desktop based on the python version you have to use.



    NOTE:



    Be aware of the permissions of your scripts. If it has the executable permission, despite the default application, your system won't open it in IDLE, as it will try to execute it.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Nov 20 '14 at 8:39

























    answered Nov 20 '14 at 0:49









    Gabor FarkasGabor Farkas

    708611




    708611












    • Is the name of the program enough or do you need a path? The name might be enough of the right .desktop file is there I guess.

      – terdon
      Nov 20 '14 at 0:50











    • Ah, thank you kind sir... But i still seem confused... Im really sorry... I tried to open it using the different aplicatoins, but idle does not appear

      – Amateur Programer
      Nov 20 '14 at 0:52











    • @terdon The command is enough if it can be accessed from the PATH variable I think. @AmateurProgramer Try to use the custom command option to access IDLE, if it canned be done with Gnome, try the second option (edit the configuration file).

      – Gabor Farkas
      Nov 20 '14 at 0:55






    • 4





      A couple of things here: 1. In Gnome 3 that option - the entry box where you can enter the name of an executable - was removed. 2. The entry in mimeapps.list should be text/x-python=idle2.desktop or text/x-python=idle3.desktop i.e. it has to point to a desktop file not to an executable. Also, it has to be under both [Default Applications] and [Added Associations] and it has to be the first in the list, before gedit.desktop, e.g. text/x-python=idle3.desktop;gedit.desktop

      – don_crissti
      Nov 20 '14 at 1:30






    • 3





      There is no such a "Use custom command" in Nautilus on Gnome Classic (Ubuntu 12.04).

      – Anthon
      Nov 20 '14 at 6:38

















    • Is the name of the program enough or do you need a path? The name might be enough of the right .desktop file is there I guess.

      – terdon
      Nov 20 '14 at 0:50











    • Ah, thank you kind sir... But i still seem confused... Im really sorry... I tried to open it using the different aplicatoins, but idle does not appear

      – Amateur Programer
      Nov 20 '14 at 0:52











    • @terdon The command is enough if it can be accessed from the PATH variable I think. @AmateurProgramer Try to use the custom command option to access IDLE, if it canned be done with Gnome, try the second option (edit the configuration file).

      – Gabor Farkas
      Nov 20 '14 at 0:55






    • 4





      A couple of things here: 1. In Gnome 3 that option - the entry box where you can enter the name of an executable - was removed. 2. The entry in mimeapps.list should be text/x-python=idle2.desktop or text/x-python=idle3.desktop i.e. it has to point to a desktop file not to an executable. Also, it has to be under both [Default Applications] and [Added Associations] and it has to be the first in the list, before gedit.desktop, e.g. text/x-python=idle3.desktop;gedit.desktop

      – don_crissti
      Nov 20 '14 at 1:30






    • 3





      There is no such a "Use custom command" in Nautilus on Gnome Classic (Ubuntu 12.04).

      – Anthon
      Nov 20 '14 at 6:38
















    Is the name of the program enough or do you need a path? The name might be enough of the right .desktop file is there I guess.

    – terdon
    Nov 20 '14 at 0:50





    Is the name of the program enough or do you need a path? The name might be enough of the right .desktop file is there I guess.

    – terdon
    Nov 20 '14 at 0:50













    Ah, thank you kind sir... But i still seem confused... Im really sorry... I tried to open it using the different aplicatoins, but idle does not appear

    – Amateur Programer
    Nov 20 '14 at 0:52





    Ah, thank you kind sir... But i still seem confused... Im really sorry... I tried to open it using the different aplicatoins, but idle does not appear

    – Amateur Programer
    Nov 20 '14 at 0:52













    @terdon The command is enough if it can be accessed from the PATH variable I think. @AmateurProgramer Try to use the custom command option to access IDLE, if it canned be done with Gnome, try the second option (edit the configuration file).

    – Gabor Farkas
    Nov 20 '14 at 0:55





    @terdon The command is enough if it can be accessed from the PATH variable I think. @AmateurProgramer Try to use the custom command option to access IDLE, if it canned be done with Gnome, try the second option (edit the configuration file).

    – Gabor Farkas
    Nov 20 '14 at 0:55




    4




    4





    A couple of things here: 1. In Gnome 3 that option - the entry box where you can enter the name of an executable - was removed. 2. The entry in mimeapps.list should be text/x-python=idle2.desktop or text/x-python=idle3.desktop i.e. it has to point to a desktop file not to an executable. Also, it has to be under both [Default Applications] and [Added Associations] and it has to be the first in the list, before gedit.desktop, e.g. text/x-python=idle3.desktop;gedit.desktop

    – don_crissti
    Nov 20 '14 at 1:30





    A couple of things here: 1. In Gnome 3 that option - the entry box where you can enter the name of an executable - was removed. 2. The entry in mimeapps.list should be text/x-python=idle2.desktop or text/x-python=idle3.desktop i.e. it has to point to a desktop file not to an executable. Also, it has to be under both [Default Applications] and [Added Associations] and it has to be the first in the list, before gedit.desktop, e.g. text/x-python=idle3.desktop;gedit.desktop

    – don_crissti
    Nov 20 '14 at 1:30




    3




    3





    There is no such a "Use custom command" in Nautilus on Gnome Classic (Ubuntu 12.04).

    – Anthon
    Nov 20 '14 at 6:38





    There is no such a "Use custom command" in Nautilus on Gnome Classic (Ubuntu 12.04).

    – Anthon
    Nov 20 '14 at 6:38













    2














    The problem you have is caused by the default installed idle → desktop association.



    Nautilus, at least on my 12.04 Ubuntu (Classic Desktop), doesn't seem to have anything with which you can associated (new) commands with a certain filetype (as some Desktops/Browsers) and the list doesn't show idle at all, even if installed via apt-get install idle:



    enter image description here



    You can get the screen by right clicking a .py file, selecting Properties then the Open With TAB, and then click Show other applications (going via the Open With menu gets you the same result).



    You have to correct the .dekstop file for idle by editing
    /usr/share/applications/idle-python2.7.desktop as root (you might have idle-python3.desktop, depending on what version of idle you installed).



    [Desktop Entry]
    Name=IDLE (using Python-2.7)
    Comment=Integrated Development Environment for Python (using Python-2.7)
    Exec=/usr/bin/idle-python2.7 -n %f
    Icon=/usr/share/pixmaps/python2.7.xpm
    Terminal=false
    Type=Application
    Categories=Application;Development;
    StartupNotify=true


    What is missing in the installed file is the %f at the end of the Exec= line. Add %f there and save. Then in nautilus, right click a .py file and navigate to the Properties and Open With TAB once more (you don't have to restart nautilus). Now scroll down and Idle (using Python-2.7) is a selectable option (either as recommended application) or else first click it in the show other application list:



    enter image description here



    You can use Set as default to always open .py files with idle.






    share|improve this answer





























      2














      The problem you have is caused by the default installed idle → desktop association.



      Nautilus, at least on my 12.04 Ubuntu (Classic Desktop), doesn't seem to have anything with which you can associated (new) commands with a certain filetype (as some Desktops/Browsers) and the list doesn't show idle at all, even if installed via apt-get install idle:



      enter image description here



      You can get the screen by right clicking a .py file, selecting Properties then the Open With TAB, and then click Show other applications (going via the Open With menu gets you the same result).



      You have to correct the .dekstop file for idle by editing
      /usr/share/applications/idle-python2.7.desktop as root (you might have idle-python3.desktop, depending on what version of idle you installed).



      [Desktop Entry]
      Name=IDLE (using Python-2.7)
      Comment=Integrated Development Environment for Python (using Python-2.7)
      Exec=/usr/bin/idle-python2.7 -n %f
      Icon=/usr/share/pixmaps/python2.7.xpm
      Terminal=false
      Type=Application
      Categories=Application;Development;
      StartupNotify=true


      What is missing in the installed file is the %f at the end of the Exec= line. Add %f there and save. Then in nautilus, right click a .py file and navigate to the Properties and Open With TAB once more (you don't have to restart nautilus). Now scroll down and Idle (using Python-2.7) is a selectable option (either as recommended application) or else first click it in the show other application list:



      enter image description here



      You can use Set as default to always open .py files with idle.






      share|improve this answer



























        2












        2








        2







        The problem you have is caused by the default installed idle → desktop association.



        Nautilus, at least on my 12.04 Ubuntu (Classic Desktop), doesn't seem to have anything with which you can associated (new) commands with a certain filetype (as some Desktops/Browsers) and the list doesn't show idle at all, even if installed via apt-get install idle:



        enter image description here



        You can get the screen by right clicking a .py file, selecting Properties then the Open With TAB, and then click Show other applications (going via the Open With menu gets you the same result).



        You have to correct the .dekstop file for idle by editing
        /usr/share/applications/idle-python2.7.desktop as root (you might have idle-python3.desktop, depending on what version of idle you installed).



        [Desktop Entry]
        Name=IDLE (using Python-2.7)
        Comment=Integrated Development Environment for Python (using Python-2.7)
        Exec=/usr/bin/idle-python2.7 -n %f
        Icon=/usr/share/pixmaps/python2.7.xpm
        Terminal=false
        Type=Application
        Categories=Application;Development;
        StartupNotify=true


        What is missing in the installed file is the %f at the end of the Exec= line. Add %f there and save. Then in nautilus, right click a .py file and navigate to the Properties and Open With TAB once more (you don't have to restart nautilus). Now scroll down and Idle (using Python-2.7) is a selectable option (either as recommended application) or else first click it in the show other application list:



        enter image description here



        You can use Set as default to always open .py files with idle.






        share|improve this answer















        The problem you have is caused by the default installed idle → desktop association.



        Nautilus, at least on my 12.04 Ubuntu (Classic Desktop), doesn't seem to have anything with which you can associated (new) commands with a certain filetype (as some Desktops/Browsers) and the list doesn't show idle at all, even if installed via apt-get install idle:



        enter image description here



        You can get the screen by right clicking a .py file, selecting Properties then the Open With TAB, and then click Show other applications (going via the Open With menu gets you the same result).



        You have to correct the .dekstop file for idle by editing
        /usr/share/applications/idle-python2.7.desktop as root (you might have idle-python3.desktop, depending on what version of idle you installed).



        [Desktop Entry]
        Name=IDLE (using Python-2.7)
        Comment=Integrated Development Environment for Python (using Python-2.7)
        Exec=/usr/bin/idle-python2.7 -n %f
        Icon=/usr/share/pixmaps/python2.7.xpm
        Terminal=false
        Type=Application
        Categories=Application;Development;
        StartupNotify=true


        What is missing in the installed file is the %f at the end of the Exec= line. Add %f there and save. Then in nautilus, right click a .py file and navigate to the Properties and Open With TAB once more (you don't have to restart nautilus). Now scroll down and Idle (using Python-2.7) is a selectable option (either as recommended application) or else first click it in the show other application list:



        enter image description here



        You can use Set as default to always open .py files with idle.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 20 '14 at 7:17

























        answered Nov 20 '14 at 7:05









        AnthonAnthon

        60.9k17103166




        60.9k17103166



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • 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%2funix.stackexchange.com%2fquestions%2f168939%2fhow-can-i-make-idle-the-default-editor-for-python-files%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

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?