Default text editor

Peter de Ridder peter at xfce.org
Wed Nov 4 14:36:06 CET 2009


On Wed, Nov 4, 2009 at 9:04 AM, Hinko Kocevar <hinko.kocevar at i-tech.si> wrote:
> David Rosenstrauch wrote:
>> On 11/03/2009 09:23 AM, Hinko Kocevar wrote:
>>> Hi,
>>>
>>> I'm using Xfce for quite some time and I'm really satisfied with the
>>> course its development is taking toward full featured and stable desktop
>>> environment.
>>>
>>> I'm currently running:
>>>
>>> Xfce 4 Desktop Environment
>>> version 4.6.1 (Xfce 4.6)
>>>
>>> on Gentoo based Linux OS.
>>>
>>> I'm just curious how can one set different text editor by default?
>>> Every text document is currently associated with the muosepad editor but
>>> I would like to use gedit instead. Is this only achieved by manually
>>> associating every text document type with gedit instead of mousepad?
>>>
>>>
>>> Best regards,
>>> Hinko
>>
>> In Thunar:
>>
>> * Right-click on a text document
>> * Select "Open with ->"
>> * Select "Open with other application ..."
>> * In the "Open with" dialog, choose the app you want to associate with
>> the document, and make sure "Use as default for this kind of file" is
>> checked
>> * Click the "Open" button
>>

These Setting you set here are stored in
~/.local/share/applications/default.list.
And these local setting overrule the global setting stored in
/usr/share/applications/default.list.
If you set an editor for mime type text/plain of text files are opened
by this applications.
For example. Also text/html would be open be opened by this editor (so
that would make the editor at text/plain your default editor.
If there is an entry from text/html in the default.list file this
editor would overrule the one set for text/plain.

>
> Yes, that helps.
> But for files without extension (eg. .log, .txt) say notes, readme and
> similar this has to be done for each file name separately. I was was
> hoping for more general solution where gedit would assume 'default text
> editor' position in place of mousepad.

So in your case set text/plain=gedit.desktop and remove other text
based entries from the default.list file. If you set this in your
~/.local/share/applicaitons/default.list file, make sure also set,
atleast, the entries from /usr/share/applications/default.list which
you don't agree with.

Regards,
Peter



More information about the Xfce mailing list