Skip to main content

Questions tagged [daemon]

Starting Emacs in daemon mode

Filter by
Sorted by
Tagged with
1 vote
0 answers
245 views

How to run emacs as a systemd service with Wayland on Ubuntu 22.04+?

The stock systemd user service file for emacs 29.1 looks like this: [Unit] Description=Emacs text editor Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/ [Service] Type=notify ...
donatello's user avatar
  • 111
0 votes
1 answer
250 views

Emacsclient cannot connect to running emacs daemon

I have a problem connecting to my emacs daemon. Here is the situation : I am on nixos I have an emacs-29.1 daemon running with "emacs-29.1 --daemon" as a user service. Here is the output of ...
Virgil's user avatar
  • 3
0 votes
0 answers
48 views

using desktop.el in --daemon mode

I eventually figured out that the answer to this question https://groups.google.com/g/gnu.emacs.help/c/WZoW0LlqX6c/m/08Sa6alHp1oJ was to choose --bg-daemon rather than --fg-daemon when starting the ...
StackExchanger's user avatar
0 votes
1 answer
397 views

Is it ok to run `emacs --fg-daemon` and `emacs --bg-daemon` at the same time?

I am trying to run GNU Emacs 29.0.50 in macOS. The way install it as follows: brew reinstall emacs-head@29 --with-cocoa --with-native-comp I have observe that Emacs --fg-daemon and Emacs --bg-daemon ...
alper's user avatar
  • 1,410
0 votes
1 answer
128 views

Emacs Daemon Multiple user on Mac best practices

I'm new to Emacs, so apologies if this is covered elsewhere. I'm running latest macOS 12.4; and downloaded emacs.app from emacsformacosx.com so I'm on Emacs 28.1-4 . I have an admin user, which I ...
NickR's user avatar
  • 101
1 vote
1 answer
91 views

How can I prevent `84;0;0c` written into first line when emacs daemon starts running?

When emacs frozen, I restart it and I see that 84;0;0c may end up writting into very first line of the latest open file. The way I start emacs daemon: emacsclient -c -qut file.txt 2>/dev/null. ...
alper's user avatar
  • 1,410
0 votes
1 answer
360 views

Emacs daemon. First emacslient frame loads reasonably fast. Subsequent emacsclient frames load almost instantaneously. Why?

Emacs daemon greatly reduces time to load the first frame with emacsclient. However, when visiting a file with emacsclient, subsequent emacsclient frames load much faster than the first. Command Load ...
Snelephant's user avatar
4 votes
1 answer
366 views

How can I suppress the message `When done with this frame, type C-x 5 0`?

I am running emacs v26 daemon on the background and using a single terminal. Usually I open files using emacsclient -qt and close them using C-x C-s and C-x C-c to get back to terminal run the script ...
alper's user avatar
  • 1,410
7 votes
1 answer
538 views

How are a daemon and a server different in Emacs?

After running (server-start) in Emacs, I evaluated (daemonp) and (server-running-p) The first one returns nil, whereas the second one returns t. So, how are a daemon and a server different in Emacs? ...
zell's user avatar
  • 203
0 votes
0 answers
136 views

If an emacsclient has an open minibuffer when it's closed, it freezes everything

I use emacs --daemon for everything, which means I frequently have several different instances of emacsclient running at a time. I've noticed that if I execute an action which opens a minibuffer, it ...
limp_chimp's user avatar
0 votes
0 answers
661 views

emacsclient: connect: Connection refused

I am trying to run emacs-daemon on a remote machine (connected via ssh), which was working fine. After I try to setup ports for mosh between 60000:61000 emacs-daemon started not to open :-( The way I ...
alper's user avatar
  • 1,410
1 vote
0 answers
260 views

Setting (setq system-time-locale "C") in daemon ineffective

I try to set the time locale to "C" in my config via (setq system-time-locale "C"). However, when using the emacs --daemon, it is not set properly and I end up with non-english ...
loki's user avatar
  • 310
1 vote
1 answer
1k views

emacsclient unable to connect to daemon under snap installation of Emacs

I am facing with a well know problem, when I try to start emacs --daemon on a remote machine, I am getting following error emacsclient: connect: Connection refused: $ ps aux | grep -E "[e]macs&...
alper's user avatar
  • 1,410
1 vote
1 answer
334 views

Make Emacs systemd service kill when logging out/shutting down

I am trying to use desktop-save-mode together with emacs daemon. ;; save desktop before quitting (add-hook 'kill-emacs-hook (lambda () (desktop-save "~/.emacs.d/"))) But when I log out of the ...
Daanturo's user avatar
  • 180
2 votes
2 answers
994 views

Preload problem: Emacs as daemon in X

Background: I want to use emacs like tmux which can run as persistent session as well as shorten the time for me to start bringing up emacs when I want to (as inspired by these: Emacs and a Tmux ...
menuhin's user avatar
  • 335
0 votes
1 answer
889 views

set-frame-size does not work on emacsclient

I have set up Emacs daemon on Windows 10. My Emacs version is GNU Emacs 25.3.1 I have some code in my init.el which resizes the frame size automatically when Emacs starts up. The code is ;; Select a ...
aks's user avatar
  • 145
1 vote
0 answers
356 views

emacs.service will delay 2 mins before `reboot/shutdown` my computer

I use emacs a lot and restart it since I change my init.el from time to time, so I started to use emacs.service about one year ago using command like systemctl --user enable emacs.service systemctl -...
CodyChan's user avatar
  • 2,659
5 votes
1 answer
2k views

emacsclient GUI has small fonts

Recently I updated Emacs to the newest version (26.2) which comes with new daemon functionality and Emacs server in combination with Systemd (Manjaro here). Previously there were no issues with ...
j3k's user avatar
  • 111
1 vote
2 answers
1k views

running emacs as a daemon does not load custom-set-faces?

I am starting with emacs --daemon in my session, and it seems to trigger some odd behavior regarding themes and faces. I am using this solarized theme but I have found it to have weird cursor issues. ...
anarcat's user avatar
  • 133
2 votes
1 answer
343 views

Connect to daemon with 'lost' socket

I have a running emacs daemon, and somehow lost the ability to connect to it. Here are some relevant command output: $ pgrep -a emacs 12664 emacs --daemon $ lsof -c emacs -a -u $USER -a -...
user1404316's user avatar
3 votes
1 answer
382 views

daemon startup, new frame configuration, and display-pixel-width

I have a snippet that I use to determine what font size to set based on the resolution of the display, for when my laptop has an external monitor set or not: (defconst prefs/font-size ...
John Ledbetter's user avatar
1 vote
0 answers
351 views

Using Emacs as a daemon (emacsclient) exhibiting weird behavior

Whenever I use Emacs as a daemon it seems like my init file isn't being fully loaded. My keybindings in particular are acting very odd. I use some unorthodox keybinds; for example: Ctrl+u = ...
John DeBord's user avatar
1 vote
1 answer
580 views

emacs --daemon crashes when parent ssh session dies

I'm using emacs 26.1 (although I don't think this is a new issue with this verison). Note - this is not the GTK bug which results in the daemon crashing if X Connectivity is lost. I am aware of that ...
Phil's user avatar
  • 535
1 vote
0 answers
292 views

Running Emacs as a client does not load my settings

I'm using the new systemd daemon option with Emacs 26. I have a problem, though. If I open a client instance (emacsclient -c) no config files (my .emacs) are loaded. So I don't see the usefulness in ...
NVaughan's user avatar
  • 1,481
7 votes
2 answers
1k views

Unable to connect using emacsclient

I am starting the emacs server using systemctl --now --user enable emacs That server is running, if I run systemctl --user status emacs I got $ systemctl --user status emacs ● emacs.service - ...
nanounanue's user avatar
3 votes
1 answer
2k views

Changing the location of the emacs server socket

When I run emacs --daemon it creates a socket at /tmp/emacs1000/server How can I tell it to use a different location?
izkon's user avatar
  • 1,878
3 votes
0 answers
725 views

Starting daemon without forking to background

I want to run an Emacs daemon under daemontools. So I need to create an Emacs process which Basically does emacs --daemon Does stay in the foreground Displays the Messages buffer (or some other ...
andreas-h's user avatar
  • 1,569
0 votes
1 answer
539 views

Emacs daemon hangs on first run on Emacs 25.2

I've installed Emacs 25.2 on Mac High Sierra Beta. I used it together with bbatsov's prelude. When I first run emacs --daemon, it hangs showing this output: m15:~ g$ emacs --daemon Prelude is ...
Galder Zamarreño's user avatar
2 votes
0 answers
177 views

reopening emacsclient -t with desktop-save-mode doesn't save buffers/frames in place [duplicate]

I added (desktop-save-mode 1) to my custom.el towards the end to save buffers and frames. But I primarily use emacs --daemon and start an emacsclient -t. For some reason, if I use just Emacs the ...
jkhdf's user avatar
  • 21
1 vote
0 answers
78 views

Unable to tweak theme settings unless I start a new session

I have this code in my init.el file, mainly to apply the theme correctly when running emacs server: ;; This will make sure the theme loads well in emacs daemon (setq myGraphicModeHash (make-...
SFbay007's user avatar
  • 584
16 votes
3 answers
838 views

Daemon mode: Defer interactive prompts on startup?

(Note that, title to the contrary, this question is not the same as How to start in daemon mode and suppress interactive dialogs?, as that question was "answered" by the submitter eliminating what was ...
Trey's user avatar
  • 905
7 votes
1 answer
1k views

after-make-frame-functions does nothing for an otherwise working function

I am using workgroups and I have the following code in my init.el: (defun my-start-emacs (_) (interactive) (message "HI") (sleep-for 1) (if (daemonp) (progn (if (not (...
space_voyager's user avatar
3 votes
1 answer
621 views

emacs --daemon is not loading gui elements

I defined emacsclient as default editor in .bashrc so emacs -daemon will be called upon startup: export ALTERNATE_EDITOR="" export EDITOR=emacsclient But compared to a normal load without ...
phonycollectibles's user avatar
9 votes
1 answer
4k views

Emacs (as daemon) doesn't load theme

Related: Emacs: GUI with emacs --daemon not loading fonts correctly My init.el contains the following lines: (require 'darktooth-theme) (load-theme 'darktooth t) If I start Emacs with $ emacs ... ...
digitalis_'s user avatar
0 votes
1 answer
1k views

Emacs daemon not working properly, Emacs server runs fine

Version GNU Emacs 25.1.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-04-25 Xubuntu 16.04, Linux kernel 4.4 In my .emacs I have the following settings (require 'server) (unless (server-...
ReneFroger's user avatar
  • 3,890
2 votes
1 answer
95 views

Don't let the daemon frame make a file visible

I normally start Emacs in daemon mode and reload my last session with the desktop package. This causes whichever file desktop-read open last to remain visited in a buffer which is selected in the ...
Gilles 'SO- stop being evil''s user avatar
5 votes
1 answer
1k views

OS X and Daemon Mode

I am using the railwaycat brew install version of emacs. 24.5.1 I have the following alias in my .bashrc: alias edit="emacsclient -a '' -nw" I also have $EDITOR set to the same command. If I ...
synic's user avatar
  • 195
1 vote
0 answers
85 views

Minibuffer prompt not displaying (intermittently) in daemon mode

I am using Emacs 24.5 on Mac OS (installed with homebrew) in daemon mode. I normally leave the daemon running for long periods of time (weeks) while I'm working. I'll open up files from the command ...
artlogic's user avatar
  • 111
3 votes
0 answers
552 views

Startup Emacs Daemon With Elfeed (RSS Feed Reader) Buffer

What I would like to accomplish is this: Allow emacs daemon to start with my start up applications like normal When I open an emacs frame I would like only the first one to start with my rss news ...
Jesse's user avatar
  • 267
4 votes
1 answer
677 views

How to get a list of all the daemons running?

I use one daemon per project (so that when I open the client, they don't share buffers). I'd like to get a list of all the daemons that are running. I tried using lsof -c emacs | grep "TYPE=STREAM" ...
kshenoy's user avatar
  • 211
12 votes
2 answers
5k views

emacsclient to access remote emacs server

I'm trying to open an emacsclient session from a remote host. I walked through the following steps on the tramp website How can I use TRAMP to connect to a remote Emacs session?. I'll walk you ...
DJJ's user avatar
  • 762
4 votes
0 answers
1k views

Starting emacs in daemon mode freezes, emacsclient is not able find a socket

I cannot launch the emacs daemon anymore. I do not know what triggered this. When entering emacs -Q --daemon -v I get only the following and nothing happen. Warning: due to a long standing Gtk+ ...
M. Toya's user avatar
  • 157
4 votes
1 answer
2k views

"Error reading from stdin" after reboot

I've started using the emacsclient more along with the daemon, and I'm a huge fan, but it's started giving me trouble when I reboot my computer. After reboot when I open up a new emacsclient, I don't ...
Ryan's user avatar
  • 4,059
3 votes
2 answers
936 views

When to call find-font if launching emacs in daemon mode?

I would like to use certain unicode characters in the mode-line only if the Symbola font is available on the system. So I put this in my emacs config and it's a great way to check if those fonts are ...
Kaushal Modi's user avatar
  • 25.7k
19 votes
1 answer
2k views

How can I debug random Emacs server crashes?

I generally have a long-running instance of emacs --daemon, which I connect to with various emacsclients. Recently I have started experiencing random crashes. I say "random" because I haven't been ...
Scott Weldon's user avatar
  • 2,715
1 vote
1 answer
199 views

Having clean-buffer-list skip buffers with server-buffer-clients?

I have Emacs run in daemon mode at system startup, and run emacsclient automatically when I login to X. I also recently started running midnight-mode, which regularly runs clean-buffer-list, which ...
Joseph Garvin's user avatar
11 votes
2 answers
2k views

Using desktop-mode with Emacs Daemon

I am using emacs 24.3 (ubuntu 14.10) and would like the daemon to participate in the graphical desktop session lifecycle while using desktop-mode. I went through http://www.emacswiki.org/emacs/...
Andreas Steffan's user avatar
3 votes
1 answer
1k views

Specify name on emacsclient first frame

I would like an emacsclient frame with a specific name to open when I log into my computer. I tried adding emacsclient -e '(select-frame (make-frame (quote ((name . "scratchemacsframe")))))' to my ...
William Everett's user avatar
4 votes
0 answers
462 views

Restore desktop frames for Emacs server

The version of desktop.el that comes with Emacs 24.4 allows restoring frames as well as windows and buffers. This works fine for an Emacs server (i.e., daemon) with at least one open frame. However, a ...
holocronweaver's user avatar
5 votes
1 answer
2k views

Debugging - emacsclient: error accessing server file "server"

I got the not terribly helpful error message recently trying to connect emacsclient to a emacs daemon using tcp sockets. emacsclient: error accessing server file "server" Looking at the source, its ...
Job Evers's user avatar
  • 300