Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have visited this question and tried everything mentioned with no success: How do I set IDLE as default editor for python scripts

Ubuntu 12.04
Python 2.7
IDLE(Using Python-2.7)

When I right click a .py file:

  • IDLE does not show up in the first menu (the only option is Gedit).
  • IDLE does not show up in 'Open With Other Application...' menu
  • IDLE does not show up in 'Show other applicatons' menu

I had found the solution to this problem online before, for a previous Ubuntu 12.04 installation, but cannot locate it again.

I imagine this can be fixed through file associations?

Additionally, IDLE windows do not possess an icon and show as a grey box with a '?'.

share|improve this question
    
I had a similar issue once and can't remember the exact fix, but I think it had to do with making a .desktop launcher and putting the mime-type in it. –  Ian B. Feb 17 '13 at 4:47
    
Maybe, it's about bug - bugs.launchpad.net/ubuntu/+source/python-defaults/+bug/1245143 ?? workaround -ubuntuforums.org/… –  user218250 Nov 22 '13 at 9:26

1 Answer 1

I found an answer that worked for me here: http://ubuntuforums.org/showthread.php?t=1801149

enter the following in terminal:

gksudo gedit /usr/share/applications/idle-python2.7.desktop

Add the following to the file:

MimeType=text/x-python;

Save and close that file, and enter the following in terminal:

gksudo gedit /usr/share/applications/mimeinfo.cache

Search for "text/x-python=" in the file, or add it if not there, and add the following to the end of it:

idle-python2.7.desktop;

Worked for me! Cheers.

share|improve this answer
    
I tried exactly this, and it didn't work :( –  Emile Aug 21 at 12:08
    
What version of linux and python are you using? –  Harlan Barker Sep 9 at 8:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.