Ask Your Question

Use Sublime 2 on Fedora 17 instead of gedit

asked 2012-10-17 08:44:09 -0500

Chris gravatar image

updated 2012-10-17 11:24:40 -0500

hhlp gravatar image

Hi, i just downloaded Sublime 2 Text Editor.

  1. I moved it to a own folder
  2. I created a /usr/bin/sublime file with:

#!/bin/sh export


$SUBLIMEHOME/sublimetext $*

And a desktop file:

#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Sublime Text 2

Now i can use it via the programm search and so on. Thats great. BUT how can i use it now as my standard editor? If i do a rightclick on my ".py"-file i cant find sublime in the list of programms. A option to use a terminal-command like "sublime" is neither possible.

How can i register sublime properly to use it as my custom text editor? Thanks in advance.

edit retag flag offensive close merge delete


Why don't you install the rpm package?

skytux gravatar imageskytux ( 2012-10-17 13:10:54 -0500 )edit

Using the desktop file you created, add the mimetypes you wish to open with the application. In the case of gedit, its .desktop file has the following line


So, add that, along with any other types in particular you're interested in. Then execute:

xdg-mime default APPLICATION.desktop MIMETYPES

To verify that this worked you can do this:

xdg-mime query default MIMETYPE

Hope this helps.

liam gravatar imageliam ( 2012-10-17 18:00:33 -0500 )edit

Yep, hope the repo is safe

thiagofm gravatar imagethiagofm ( 2013-06-20 21:17:43 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-10-17 11:19:22 -0500

hhlp gravatar image

updated 2012-10-17 11:23:25 -0500

  1. Option 1

All you needed to do was to open Alacarte application (is not instaled by default so you need to install find in PackageKit ) and add a parameter %U to the program command like "sublime %U" and restart GNOME 3 shell / desktop by pressing "Alt+F2" following by keying in 'r' and hitting return / enter key. Poof !!! the miracle happens.

  1. Option 2

in your desktop file change Exec=sublime to Exec=yourprogram %U

  1. Option 3 - Use alacarte

Add custom application to Applications menu in Gnome 3 (the easy way)

This guide shows you how to add any custom application or script to "Activities -> Applications" with easy graphical interface. With the tools installed, you can also hide an application or item from the menu or system settings.

  1. Install Alacarte menu editor

    su -c "yum install alacarte"

  2. Start it with Activities -> Applications -> Main Menu or Alt+F2 -> alacarte

  3. Use the "New Item" to add an application to the group you want and don't forget the %U parameter.

P.D : right clik on the file you want to open -> properties -> open with or open with another aplication.

edit flag offensive delete link more

Question Tools


Asked: 2012-10-17 08:44:09 -0500

Seen: 5,123 times

Last updated: Oct 17 '12