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?

1

4 Answers 4

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.

1
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
0
2

My solution:

alias ecw="emacsclient --c"

and use ecw to start emacs in GUI.

1

For fish shell, this works for me:

function ec
    emacsclient --create-frame $argv &
end

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.