Default text editor

Hinko Kocevar hinko.kocevar at i-tech.si
Fri Nov 6 16:52:57 CET 2009


Peter de Ridder wrote:
> 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.

My ~/.local/share/applications/defaults.list contains this lines:
[Default Applications]
image/jpeg=gimv-usercreated.desktop
text/plain=gedit.desktop
text/x-log=gedit.desktop
text/x-readme=gedit.desktop

> And these local setting overrule the global setting stored in
> /usr/share/applications/default.list.

/usr/share/applications/default[s].list does not exist on my system.

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

That seems to works.
Now momomo, bobo, fubar, notes and REDAME files are by default opened in
the gedit.

Thank you!

Best regards,
Hinko

> 
> Regards,
> Peter
> _______________________________________________
> Xfce mailing list
> Xfce at xfce.org
> http://foo-projects.org/mailman/listinfo/xfce
> http://www.xfce.org


-- 
Hinko Kocevar
Technical support software engineer
Instrumentation Technologies
Velika pot 22, SI-5250 Solkan - Slovenia
T:+386 5 3352600, F:+386 5 3352601
mailto: hinko.kocevar at i-tech.si

http://www.i-tech.si - When your users demand stability

The information transmitted is intended solely for the addressee and may
contain confidential and/or privileged information. Any review, retention,
disclosure or other use by persons other than the intended recipient is
prohibited. If you received this in error, please notify the sender and
delete all copies.




More information about the Xfce mailing list