Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Dec 2018 17:48:16 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 234276] x11/rxvt-unicode: enhance urxvtd and urxvtc to interoperate with service managers
Message-ID:  <bug-234276-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D234276

            Bug ID: 234276
           Summary: x11/rxvt-unicode: enhance urxvtd and urxvtc to
                    interoperate with service managers
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: thierry@FreeBSD.org
          Reporter: J.deBoynePollard-newsgroups@NTLWorld.COM
             Flags: maintainer-feedback?(thierry@FreeBSD.org)
          Assignee: thierry@FreeBSD.org

Created attachment 200370
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D200370&action=
=3Dedit
patch to enhance urxvtd and urxvtc

This is also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D917105 .

urxvtd can be run as a per-user service under the nosh toolset's service
manager and under systemd.  It does not have the problems that some X11
terminal emulators have with needing a DISPLAY environment variable in the
d=C3=A6mon.  But it is not perfect.  In particular, one cannot use the serv=
ice
managers' abilities to pass the listening socket in as an already open file
descriptor, using (in the nosh toolset case for example) a service bundle w=
ith
a run script along the lines of:

    #!/bin/nosh
    local-stream-socket-listen --systemd-compatibility --mode 0600
/run/user/JdeBP/urxvt/daemon
    urxvtd

What happens in practice is that urxvtd ignores the passed-in file descript=
or
for a listening socket and blithely opens its own, second, listening socket
file descriptor.

The attached patch enhances urxvtd to interoperate with these service
management subsystems, allowing it to be passed the listening socket in this
way.  It also updates urxvtc and the doco keeping them in step.

I have already added automatically-made per-user service bundles to the nosh
service management allowing users to manage the urxvt d=C3=A6mon with syste=
m-control
--user.  I developed and tested this on FreeBSD invoking the urxvtd service
from the nosh per-user service manager.

Notes:

* The patch adds support for the XDG_RUNTIME_DIR environment variable from =
the
Freedesktop Base Directory Specification, which enables using some features=
 in
systemd units and also results in automatic cleanup of socket files (as opp=
osed
to their lingering in /tmp or one's home directory) as part of the normal
semantics of /run.

* Runtime directories are by definition private to individual users and
machines, and so when a runtime directory is used the socket name is fixed =
as
${XDG_RUNTIME_DIR}/urxvt/daemon and does not vary by host name or unnecessa=
rily
repeat the software name.  (Compare the behaviour of other softwares which =
used
to use compound names in /tmp, such as dbus-daemon using just
${XDG_RUNTIME_DIR}/bus for example.)   Per convention the urxvt subdirectory
does not have a hidden name (in contrast to ${HOME}/.urxvt/).

* The manual pages are updated to reflect the additional environment variab=
les
that are recognized, and to show which takes precedence.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-234276-7788>