Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 504304 - x11-terms/rxvt-unicode - add systemd user unit
Summary: x11-terms/rxvt-unicode - add systemd user unit
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Marek Szuba
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: install-systemd-unit
  Show dependency tree
 
Reported: 2014-03-12 08:11 UTC by Andrey Ovcharov
Modified: 2020-12-08 09:50 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
rxvt-unicode-9.19-systemd-unit.patch (rxvt-unicode-9.19-systemd-unit.patch,1.45 KB, text/plain)
2014-03-12 08:12 UTC, Andrey Ovcharov
Details
fxd rxvt-unicode-9.19-systemd-unit.patch (attachment.cgi.txt,1.43 KB, text/plain)
2014-03-12 08:17 UTC, Andrey Ovcharov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Ovcharov 2014-03-12 08:11:10 UTC
x11-terms/rxvt-unicode may be used also in conjunction with systemd daemon-client setup

Reproducible: Always



Expected Results:  
provide necessary systemd unit (service file) to use daemon-client urxvt setup
Comment 1 Andrey Ovcharov 2014-03-12 08:12:08 UTC
Created attachment 372480 [details]
rxvt-unicode-9.19-systemd-unit.patch
Comment 2 Andrey Ovcharov 2014-03-12 08:17:00 UTC
Created attachment 372482 [details]
fxd rxvt-unicode-9.19-systemd-unit.patch
Comment 3 Pacho Ramos gentoo-dev 2014-03-30 13:23:22 UTC
Instead of using "elog" I would use readme.gentoo.eclass, but that needs to be approved by Jeroen first :)
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2014-03-30 14:18:13 UTC
I'm not the only maintainer.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2014-03-30 14:32:04 UTC
The problem I have with this is that currently we offer no way to start urxvtd from the init system either.
Comment 6 Andrey Ovcharov 2014-03-30 14:50:20 UTC
(In reply to Jeroen Roovers from comment #5)
> The problem I have with this is that currently we offer no way to start
> urxvtd from the init system either.

To use urxvt with systemd as daemon-client need:

0) service file (with the patch above  is installed automatically)
cat /etc/systemd/system/urxvtd@.service
[Unit]
Description=urxvt daemon

[Service]
Type=oneshot
RemainAfterExit=yes
User=%i
ExecStart=/usr/bin/urxvtd -q -f -o

[Install]
WantedBy=multi-user.target

1) start service for you current user. If you work only as root:

systemctl enable urxvtd@root.service

or

systemctl enable urxvtd@<SOME_USER_NAME>.service

where <SOME_USER_NAME> is you current user name.

2) use it…

urxvtc - start client
urxvt - start the same urxvt as olvays
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2014-03-30 15:22:12 UTC
(In reply to Andrey Ovcharov from comment #6)
> (In reply to Jeroen Roovers from comment #5)
> > The problem I have with this is that currently we offer no way to start
> > urxvtd from the init system either.
> 
> To use urxvt with systemd as daemon-client need:

Yes, that's what this bug report is about, but my question is: since we don't even offer this service for openrc/init, why would we have it for systemd?
Comment 8 Pacho Ramos gentoo-dev 2014-03-30 15:33:31 UTC
Well, if it's useful, would be interesting to, at least, offer it for systemd (as patches are provided). But I have no idea if this is really useful since I don't know much about this app :(
Comment 9 Andrey Ovcharov 2014-03-30 15:35:49 UTC
(In reply to Jeroen Roovers from comment #7)
> Yes, that's what this bug report is about, but my question is: since we
> don't even offer this service for openrc/init, why would we have it for
> systemd?

And I did not ask the question "Why is there no any service for openrc/init?" because I not have openrc at all and I'm not a maintainer…

But if upstream gentoo is not interested in the patches from their users probably about it should write on a any visible place.
Comment 10 Richard Freeman gentoo-dev 2014-03-30 16:35:55 UTC
(In reply to Jeroen Roovers from comment #7)
> (In reply to Andrey Ovcharov from comment #6)
> > (In reply to Jeroen Roovers from comment #5)
> > > The problem I have with this is that currently we offer no way to start
> > > urxvtd from the init system either.
> > 
> > To use urxvt with systemd as daemon-client need:
> 
> Yes, that's what this bug report is about, but my question is: since we
> don't even offer this service for openrc/init, why would we have it for
> systemd?

Because it is useful?

There is no policy in Gentoo that support for systemd need be a subset of support for openrc.  Just as there is no harm in having members of the community submit systemd units for packages that lack them, there is also nothing stopping members of the community for submitting openrc scripts for packages that lack them.

There may also be specific cases where the differing designs of the init system allow some feature in one that is not possible in the other, and that is also just fine.
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2014-03-30 23:35:37 UTC
(In reply to Richard Freeman from comment #10)
> > Yes, that's what this bug report is about, but my question is: since we
> > don't even offer this service for openrc/init, why would we have it for
> > systemd?
> 
> Because it is useful?

I merely wanted to point out that running urxvtd on startup makes little sense since at that point the system is not interactive, so the user you run it for isn't around. Launching a service in advance for when $SPECIFIC_USER finally turns up simply isn't normally done. And for the case where $SPECIFIC_USER does turn up, and decides he wants urxvtd to always be ready, he needs to ask $SYSADMIN to set that up in advance? What if $SPECIFIC_USER wants to change something in the way his own special service is run? He needs to ask $SYSADMIN to change urxvtd's startup options? That urxvtd runs as a daemon doesn't mean it should be a service, particularly not a service that isn't generally available to (groups of) users. What if something goes wrong with urxvtd and it needs a restart? (And so on.) I am just baffled by the desire to have this level of privilege separation where none is actually required.

Restricting the service to a single user might make sense for some people's systems but then you could easily set that up without going root - simply run and fork it when you log in.

The desktop file additions by themselves seem useful in some scenarios. If you want to run urxvtc through whatever DM you have, then we could add support for that, and you'd want to have a urxvtd to back that up, of course. You could use xinitrc or even .bash_login to accomplish that, or have a desktop entry for it that you add to your "autostart" script/directory or whatever.

[This isn't about systemd vs. init so I skipped the rest.]
Comment 12 Richard Freeman gentoo-dev 2014-03-30 23:45:29 UTC
(In reply to Jeroen Roovers from comment #11)
> (In reply to Richard Freeman from comment #10)
> > > Yes, that's what this bug report is about, but my question is: since we
> > > don't even offer this service for openrc/init, why would we have it for
> > > systemd?
> > 
> > Because it is useful?
> 
> I merely wanted to point out that running urxvtd on startup makes little
> sense since at that point the system is not interactive, so the user you run
> it for isn't around. Launching a service in advance for when $SPECIFIC_USER
> finally turns up simply isn't normally done.

I do agree with this - I was commenting more on the aspect of whether openrc support should be a precondition.

It probably would make more sense to stick this in .xsession/etc.

Rich
Comment 13 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-03-31 16:04:33 UTC
Isn't this a better candidate for systemd user unit? That is, one that user can enable himself and that will be started along with his desktop session.
Comment 14 Larry the Git Cow gentoo-dev 2020-12-08 09:50:30 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5dffc35a11180fde8eddaccd2bb49f5bccd25ba1

commit 5dffc35a11180fde8eddaccd2bb49f5bccd25ba1
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2020-12-08 09:49:31 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2020-12-08 09:50:22 +0000

    x11-terms/rxvt-unicode: install systemd user unit for urxvtd
    
    Closes: https://bugs.gentoo.org/504304
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 x11-terms/rxvt-unicode/files/urxvtd.service                      | 9 +++++++++
 .../{rxvt-unicode-9.22-r5.ebuild => rxvt-unicode-9.22-r6.ebuild} | 4 +++-
 2 files changed, 12 insertions(+), 1 deletion(-)