Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 - ?? workaround… – user218250 Nov 22 '13 at 9:26

I found an answer that worked for me here:

enter the following in terminal:

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

Add the following to the file:


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:


Worked for me! Cheers.

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

Your Answer


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.