[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacsclient not integrated into modern window systems
From: |
Rusi |
Subject: |
emacsclient not integrated into modern window systems |
Date: |
Fri, 10 Jul 2015 20:24:19 -0700 (PDT) |
User-agent: |
G2/1.0 |
Student of mine asked me if its possible to have emacs open from the file
browser. [By default it opens with gedit]
For 1/2 hour we tried to find properties/open-with etc to make it emacsclient
but to no avail
After a lot of struggle the best I came up with was the below steps.
So... If installing emacs (using say apt) makes emacs an established app to open
(some) mimetypes, why is emacsclient not setup similarly?
[I realize that this question may be more suitable for ubuntu/gnome/ etc
folks...
Still thought I'd ask]
-------------------------
0. Put (server-start) into init.el
Check that now 'emacsclient somefile' from a shell starts the same emacs
1. Put the following (between the --------- and ------------- )
into the file ~/.local/share/applications/emacs.desktop
---------
[Desktop Entry]
Name=EmacsClient
GenericName=Text Editor
Comment=Edit text
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Exec=emacsclient -n -a emacs %F
Icon=emacs
Type=Application
Terminal=false
Categories=Development;TextEditor;
StartupWMClass=Emacs
---------
2. Now in file browser, click on a file you want opened in emacs and
click properties -> open-with
Here you should find 'EmacsClient' somewhere down.
You can make it default
Note: Between 1 and 2 you may need to reboot (actually logout of X-windows is
enough)