Hello Emanuele,

Many thanks for the fix! It looks good to me. Socket-based activation
works using the unit files given in rxvt.7.pod. The traditional way of
starting the client continues to work as well. This was tested on the
latest master (3c7c69c) using an Ubuntu 21.10 amd64 VM.

Cheers,

Jacob


On Sun, May 9, 2021 at 6:12 AM Emanuele Giaquinta
<emanuele.giaqui...@gmail.com> wrote:
>
> On Fri, Nov 30, 2018 at 06:45:10PM -0500, hot12shots wrote:
> > An existing solution to on-demand activation is the urxvtc wrapper
> > script provided by the urxvtc manpage. For systems that run urxvtd as
> > a systemd service, this script could be adapted as follows:
> >
> >     #!/bin/sh
> >     urxvtc "$@"
> >     if [ $? -eq 2 ]; then
> >        systemctl --user start urxvtd.service
> >        urxvtc "$@"
> >     fi
> >
> > I feel the socket activation approach is preferable for the sake of
> > consistency on these systems. Other similar on-demand services are
> > likely to be using socket activation, so the user will expect urxvtd
> > to be configured this way. (As an admin I'd find it easier to remember
> > that services A, B, and C are socket activated, than that A and C are
> > socket-activated whereas B has a custom wrapper script.) In addition,
> > since systemctl exits as soon as the service daemon is launched, it
> > seems possible (if unlikely) to have a race condition where the second
> > urxvtc invocation occurs before urxvtd has created its socket, leading
> > to failure.
>
> This is now supported in urxvt cvs [1] and will be included in the
> next release. I implemented it differently so as to avoid a dependency
> on libsystemd, for the benefit of nosh [2]. Let us know if it works
> for you and thanks for your contribution.
>
> [1] 
> https://github.com/exg/rxvt-unicode/commit/c45d460a05917f78160d8530ec8b6d42a60ed7e5
> [2] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234276
>
> Emanuele

_______________________________________________
rxvt-unicode mailing list
rxvt-unicode@lists.schmorp.de
http://lists.schmorp.de/mailman/listinfo/rxvt-unicode

Reply via email to