From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Steinar Bang Newsgroups: gmane.emacs.help Subject: Re: Is it possible to use emacsclient as the Gnome system editor? Date: Wed, 22 Nov 2006 08:40:38 +0100 Organization: Probably a good idea Message-ID: <87psbgudxl.fsf@bang.priv.no> References: <87zmak9991.fsf@MagnumOpus.khem> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: sea.gmane.org 1164181276 26997 80.91.229.2 (22 Nov 2006 07:41:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Nov 2006 07:41:16 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 22 08:41:13 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GmmjH-00030f-01 for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Nov 2006 08:41:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GmmjG-0004Np-Ie for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Nov 2006 02:41:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gmmj3-0004Ne-Ke for help-gnu-emacs@gnu.org; Wed, 22 Nov 2006 02:40:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gmmj2-0004N1-3y for help-gnu-emacs@gnu.org; Wed, 22 Nov 2006 02:40:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gmmj2-0004My-20 for help-gnu-emacs@gnu.org; Wed, 22 Nov 2006 02:40:56 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Gmmj1-0002uI-T3 for help-gnu-emacs@gnu.org; Wed, 22 Nov 2006 02:40:56 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Gmmiv-0002xu-1L for help-gnu-emacs@gnu.org; Wed, 22 Nov 2006 08:40:49 +0100 Original-Received: from pat-gw.osl.fast.no ([217.144.235.5]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Nov 2006 08:40:49 +0100 Original-Received: from sb by pat-gw.osl.fast.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Nov 2006 08:40:49 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-To: help-gnu-emacs@gnu.org Original-Lines: 53 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: pat-gw.osl.fast.no Mail-Copies-To: never User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:TSLw06gRgXTk0ahdlWHetx5EziA= X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:38878 Archived-At: >>>>> "Charles philip Chan" : > 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