[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Clicking once, starting either daemon or client

From: Jean Louis
Subject: Clicking once, starting either daemon or client
Date: Wed, 21 Jul 2021 12:43:32 +0300

This may be useful to somebody, this is how I start Emacs client since
quite some longer time.

I have this script as the icon in Window Manager, so I do have to
click twice. It will first load Emacs server in the memory, and if it
is already in memory then it will invoke the `emacsclient' and I like
`espeak' to hear which one is being started.

Of course it could be done better, this works well for personal use.

export EMACS_SOCKET_NAME="/run/user/1001/emacs/server"
if pgrep -f "emacs --bg-daemon" > /dev/null
    espeak "Starting Emacs client"
    emacsclient -c
    espeak "Starting Emacs daemon"
    emacs --bg-daemon


Take action in Free Software Foundation campaigns:

In support of Richard M. Stallman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]