According to the manual page, URxvtd is same with URxvt but runs as a daemon that can open multiple terminal windows within the same process. Advantages of running a urxvt daemon include faster creation time for terminal windows and a lot of saved memory. The disadvantage is a possible impact on stability. If the main program crashes, all processes in the terminal windows are terminated.
How To Use
Start The Daemon
From my Urxvt Configurations, nothing needs to be changed. We only
need to tell URxvt to start the daemon mode at the startup. I use Openbox, so I edit the
~/.config/openbox/autostart file to add
urxvtd -q &. Then the URxvt daemon will be launched
on the next login.
-q flag means quiet. This option will suppress the output messages (errors and warnings will
still be logged).
Launching The Terminal
URxvtd acts as server, Now we need to launch the client. Instead of
urxvt, the command to launch
URxvt in client mode is
urxvtc. So make a keybind and a menu entry to launch
- In the rc.xml I add:
- And in the menu.xml I add:
- We can also launch it from dmenu too. Just make sure you pick
urxvtc, instead of
I feel launching a new terminal is faster than in normal mode. And the memory usage is also
decreased. The terminals are counted as two instances, but the shell remains one instance per
terminal. I open four terminal windows including
When I launched URxvt in normal mode. The instance is also counted as two, even only one terminal opened. So, don’t complain for two instances for four terminals in daemon mode.
The process tree tells us that four instances of fish are attached into one URxvtd process.
ps_mem command tells us that the two instance of urxvtd (it’s four terminal) only takes 10.5MB
I use Debian, so I want to follow the
guidelines. Instead of hardcoded
urxvtc command, I keep the traditional
x-terminal-emulator command in my keybind to launch the default terminal. And then I set
as the default terminal.
- Add urxvtc entry to the list of x-terminal-emulator (root access required)
- Set urxvtc as the default terminal emulator (root access required)
Thanks for reading!