11

I am running emacs 25.1.

I have emacs server starting as a daemon on startup and I can open an emacs terminal session with the following alias:

alias em="emacsclient -t"

How can I start the emacs gui in a similar fashion?

ice1000
  • 125
  • 8
dagda1
  • 595
  • 1
  • 3
  • 16

4 Answers4

12

If "start emacs gui in a similar fashion" is hoping to create a gui frame backed by the same daemon, then

alias ec="emacsclient --create-frame"

will instantiate another emacs frame backed by the same daemon. --create-frame can also be abbreviated with -c. -t or -nw or --tty are requesting the default for emacsclient which is to open another frame in a tty instead of a gui frame.

See the gnu emacsclient commandline options for more details.

dgtized
  • 4,169
  • 20
  • 41
  • 2
    You could include a link to the doc https://www.gnu.org/software/emacs/manual/html_node/emacs/emacsclient-Options.html#emacsclient-Options – JeanPierre Mar 26 '17 at 08:40
3

For me on ubuntu 16.04, after started emacs server edit your /usr/share/applications/emacs24.desktop like this

TryExec=/usr/bin/emacsclient -c                                                                                                                                          
Exec=/usr/bin/emacsclient -c %F
Fangxing
  • 143
  • 1
  • 7
2

My solution:

alias ecw="emacsclient --c"

and use ecw to start emacs in GUI.

ice1000
  • 125
  • 8
1

For fish shell, this works for me:

function ec
    emacsclient --create-frame $argv &
end
Dogweather
  • 111
  • 2