[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is it possible to use emacsclient as the Gnome system editor?
From: |
Steinar Bang |
Subject: |
Re: Is it possible to use emacsclient as the Gnome system editor? |
Date: |
Wed, 22 Nov 2006 08:40:38 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
>>>>> "Charles philip Chan" <cpchan@sympatico.ca>:
> On 21 Nov 2006, sb@dod.no wrote:
>> So what I wonder is: is it possible to create an emacsclient.desktop
>> entry? Or is desktop entry for emacsclient a meaningless concept?
> Yes.
> (1) Copy emacs.desktop to emacsclient.desktop
> (2) Open the emacsclient.desktop file in an edit
> (3) Change the command from emacs to emacsclient
Thanx to all who has responded in this thread! This worked great! :-)
What I now have is a $HOME/.local/share/applications/defaults.list
file that looks like this:
[Default Applications]
text/plain=emacsclient.desktop
text/xml=emacsclient.desktop
application/x-perl=emacsclient.desktop
text/x-chdr=emacsclient.desktop
text/x-csrc=emacsclient.desktop
text/x-dtd=emacsclient.desktop
text/x-java=emacsclient.desktop
text/mathml=emacsclient.desktop
text/x-python=emacsclient.desktop
text/x-sql=emacsclient.desktop
I had to map more types than text/plain to get it working. I would
have added text/html and application/xhtml+xml as well, because the
reason I'm doing this is to make GNU Emacs the system editor from
eclipse's PPW. But I was afraid that changing those would interfer
with the Gnome desktop's operation.
The emacsclient.desktop file I ended up with, and which works for me,
looks like this (I changed as little as possible):
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Emacs 21 (X11)
GenericName=Emacs
Comment=GNU Emacs 21 Text Editor
Exec=/usr/bin/emacsclient
TryExec=emacsclient
Terminal=false
Type=Application
Icon=/usr/share/emacs/21.4/etc/gnu-32x32.xpm
Categories=Application;Development;
MimeType=text/plain