6

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 '?'.

  • 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 04:47
  • Maybe, it's about bug - https://bugs.launchpad.net/ubuntu/+source/python-defaults/+bug/1245143 ?? workaround -http://ubuntuforums.org/showthread.php?t=2182753&p=12829872#post12829872 –  Nov 22 '13 at 09:26

1 Answers1

3

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.