Skip to content

Instantly share code, notes, and snippets.

@shamil
Created October 15, 2012 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shamil/3892778 to your computer and use it in GitHub Desktop.
Save shamil/3892778 to your computer and use it in GitHub Desktop.
Change all associations from gedit to another application
#System wide associations:
sudo sed -i 's/gedit.desktop/yournew.desktop/g' /usr/share/applications/defaults.list
# Just your user's associations:
sed -i 's/gedit.desktop/yournew.desktop/g' ~/.local/share/applications/mimeapps.list
# If you're using the PPA for Sublime Text 2, there is already a .desktop file for it
# sitting in `/usr/share/applications/` so you can just run:
sudo sed -i 's/gedit.desktop/sublime-text-2.desktop/g' /usr/share/applications/defaults.list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment