Skip to content

Instantly share code, notes, and snippets.

@arsho
Created December 25, 2016 05:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arsho/2677dc1aec9f00bf1a2bc3b7411d7abe to your computer and use it in GitHub Desktop.
Save arsho/2677dc1aec9f00bf1a2bc3b7411d7abe to your computer and use it in GitHub Desktop.
Add IDLE in open with option of a file
To set up IDLE as the default editor you'll have to make the idle.desktop file visible in the "Open with" list. To to so edit this file using sudo:
sudo gedit /usr/share/applications/idle3.desktop
And replace its content by the following lines:
[Desktop Entry]
Name=IDLE 3
Comment=Integrated DeveLopment Environment for Python3
Exec=/usr/bin/idle3 %F
Icon=/usr/share/pixmaps/idle3.xpm
Terminal=false
Type=Application
Categories=Application;Development;
MimeType=text/x-python3;
StartupNotify=true
Needless to restart your session or computer, to set the default application for the python type, locate a file of that type (*.py) in the file manager, right-click it, and select Properties.
Click the "Open With" tab and select the application you want to use for that file type.
Use the Set as default button to make the application the default application.
For IDLE2
============
sudo gedit /usr/share/applications/idle.desktop
And replace its content by the following lines:
[Desktop Entry]
Name=IDLE
Comment=Integrated DeveLopment Environment for Python2.7
Exec=/usr/bin/idle %F
Icon=/usr/share/pixmaps/idle.xpm
Terminal=false
Type=Application
Categories=Application;Development;
MimeType=text/x-python;
StartupNotify=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment