Re: [DNG] User services

2019-05-13 Thread Evilham via Dng
\o/ this is pretty cool and significantly more than I thought 
would be the beginning.


On dv., maig 10 2019, Martin Steigerwald wrote:


And now feel free already to contribute your own services. :)

I welcome merge requests.



Let me just add: not only creating the Merge Requests, but also 
requesting support for X should also be helpful in that we get to 
know which packages and user-services are having issues with.


Of course, ideally: contributed work is better than just asking 
for things to get done :-).


Maybe the path to officially supporting runit can start by calling 
everyone who uses it one way or another to contribute some svdirs.





There are quite some ideas on how to improve this initial proof 
of concept:
- Make it work out of the box with .xprofile (or how that is 
called).

  /me looking to Evilham now :)


There is not much to it really, a line I'd use in ~/.xprofile is 
something like:


 /usr/bin/runsvdir -P "$HOME/.services/enabled" "log: 
 " &


And it should start and stop along with the X session (I don't 
think it's a good idea to have these services start on regular 
sessions).



- Make it work with other desktop environments out of the box


Using the above should do that.


- Make it handle groups of services in a clean and simple way
- Make it work with s6 alternatively (may just need replacing 
runsvdir)

- And of course add more services, …
- including any of those relevant in /usr/lib/systemd/user/
- Putting it into a package. I am willing to package it at a 
later point

  in time.


When discussing this, please make sure doing so constructively.


Thanks a lot to Evilham for coming up with the idea to use runit 
for user
services and for providing the initial service directories for 
the four

services to make Evolution work.


Thank you for looking into it and actually documenting it and 
improving on the whole thing.




Now let's make more out of this by the power of together…

and of course enjoy using it.


Yes!
--
Evilham
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] User services (UPDATE 2)

2019-05-11 Thread Martin Steigerwald
Martin Steigerwald - 11.05.19, 11:00:
> Martin Steigerwald - 10.05.19, 21:12:
> > Do you remember the days where people believed in rough consensus
> > and
> > running code? :) It was before my time here on Earth, but whatever…
> > 
> > tada… welcome to user services:
> > 
> > https://git.devuan.org/WIP-init/user-services/blob/master/README.md
> 
> So I updated it already:
> - Changed service directory default to ~/.service (instead of
> ~/.services) to more closely match system-wide /etc/service
> - Made location of directory configurable (in install-or-update.sh)
> - Logging now works
> 
> So please just do
> 
> mv ~/.services ~/.service
> 
> in case you used it before.
> 
> Make sure you have 8400c3c55fa7cffacbb4be1a43b0962696029dcc or a later
> commit.
> 
> And yeah, at some time there will be a changelog.

As of fa0f445120adf9e2b25c2c91cdf201b514a16bc2 location of user service 
directory is now officially configurable, but beware of this note in 
README.md:

"If you like to use another directory then run it as:

SERVICEDIR='DIRECTORY' ./install-or-update.sh

*NOTE*: For compatibility with future versions, please make sure to set 
that environment variable in your shell profile in case you like to use a 
different directory."

Thanks,
Martin

> > % userservice list
> > evolution-addressbook-factory
> > evolution-calendar-factory
> > evolution-source-registry
> > evolution-user-prompter
> > pulseaudio
> > redshift
> > 
> > % userservice enable evolution-user-prompter
> > 
> > % ps aux | grep "[e]volution"
> > martin   10495  0.0  0.0   2156   744 ?S21:01   0:00
> > runsv evolution-user-prompter martin   10497  4.4  0.3 443308 53076
> > ?> 
> >  Sl   21:01   0:00 /usr/lib/evolution/evolution-user-prompter
> > 
> > % userservice enabled
> > evolution-user-prompter
> > pulseaudio
> > redshift
> > 
> > % userservice disable evolution-user-prompter
> > % ps aux | grep "[e]volution"
> > 
> > % userservice enabled
> > pulseaudio
> > redshift
> > 
> > 
> > And now feel free already to contribute your own services. :)
> > 
> > I welcome merge requests.
> > 
> > 
> > There are quite some ideas on how to improve this initial proof of
> > concept: - Make it work out of the box with .xprofile (or how that
> > is
> > called). /me looking to Evilham now :)
> > - Make it work with other desktop environments out of the box
> > - Make it handle groups of services in a clean and simple way
> > - Make it work with s6 alternatively (may just need replacing
> > runsvdir) - And of course add more services, …
> > - including any of those relevant in /usr/lib/systemd/user/
> > - Putting it into a package. I am willing to package it at a later
> > point in time.
> > 
> > 
> > When discussing this, please make sure doing so constructively.
> > 
> > 
> > Thanks a lot to Evilham for coming up with the idea to use runit for
> > user services and for providing the initial service directories for
> > the four services to make Evolution work.
> > 
> > 
> > Now let's make more out of this by the power of together…
> > 
> > and of course enjoy using it.
> > 
> > Thanks.


-- 
Martin


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] User services

2019-05-11 Thread Martin Steigerwald
Didier Kryn - 11.05.19, 11:22:
> Le 11/05/2019 à 09:54, Steve Litt a écrit :
> > On Fri, 10 May 2019 21:12:15 +0200
> > 
> > Martin Steigerwald  wrote:
> >> Hi!
> >> 
> >> Do you remember the days where people believed in rough consensus
> >> and
> >> running code? :) It was before my time here on Earth, but whatever…
> >> 
> >> tada… welcome to user services:
> >> 
> >> https://git.devuan.org/WIP-init/user-services/blob/master/README.md
> > 
> > Nice!
> > 
> > This is a great new way for me to run the home-grown daemons I want
> > to run as slitt instead of root.
> > 
> > A question: What runs user-services.sh? Should it be called from
> > ~/.bashrc,  or from somewhere else?
> 
>  In Xfce, like probably in most DEs, you can declare the
> applications you want to start when session starts.
> 
>  According to Martin's mail, I guess KDE stores that in
> ~/.config/plasma-workspace/env
> 
>  In xfce4, this seems to be done by adding the launcher file in
> ~/.config/autostart .

Hmmm, maybe that would work with Plasma, too.

A universally working location would be best.

But that would need to be a *.desktop file then, wouldn't it?

Thanks,
-- 
Martin


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] User services

2019-05-11 Thread Didier Kryn

Le 11/05/2019 à 09:54, Steve Litt a écrit :

On Fri, 10 May 2019 21:12:15 +0200
Martin Steigerwald  wrote:


Hi!

Do you remember the days where people believed in rough consensus and
running code? :) It was before my time here on Earth, but whatever…

tada… welcome to user services:

https://git.devuan.org/WIP-init/user-services/blob/master/README.md

Nice!

This is a great new way for me to run the home-grown daemons I want to
run as slitt instead of root.

A question: What runs user-services.sh? Should it be called from
~/.bashrc,  or from somewhere else?

    In Xfce, like probably in most DEs, you can declare the 
applications you want to start when session starts.


    According to Martin's mail, I guess KDE stores that in 
~/.config/plasma-workspace/env


    In xfce4, this seems to be done by adding the launcher file in 
~/.config/autostart .


        Didier


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] User services (UPDATE 1)

2019-05-11 Thread Martin Steigerwald
Martin Steigerwald - 10.05.19, 21:12:
> Do you remember the days where people believed in rough consensus and
> running code? :) It was before my time here on Earth, but whatever…
> 
> tada… welcome to user services:
> 
> https://git.devuan.org/WIP-init/user-services/blob/master/README.md

So I updated it already:
- Changed service directory default to ~/.service (instead of 
~/.services) to more closely match system-wide /etc/service
- Made location of directory configurable (in install-or-update.sh)
- Logging now works

So please just do

mv ~/.services ~/.service

in case you used it before.

Make sure you have 8400c3c55fa7cffacbb4be1a43b0962696029dcc or a later 
commit.

And yeah, at some time there will be a changelog.

> % userservice list
> evolution-addressbook-factory
> evolution-calendar-factory
> evolution-source-registry
> evolution-user-prompter
> pulseaudio
> redshift
> 
> % userservice enable evolution-user-prompter
> 
> % ps aux | grep "[e]volution"
> martin   10495  0.0  0.0   2156   744 ?S21:01   0:00 runsv
> evolution-user-prompter martin   10497  4.4  0.3 443308 53076 ?  
>  Sl   21:01   0:00 /usr/lib/evolution/evolution-user-prompter
> 
> % userservice enabled
> evolution-user-prompter
> pulseaudio
> redshift
> 
> % userservice disable evolution-user-prompter
> % ps aux | grep "[e]volution"
> 
> % userservice enabled
> pulseaudio
> redshift
> 
> 
> And now feel free already to contribute your own services. :)
> 
> I welcome merge requests.
> 
> 
> There are quite some ideas on how to improve this initial proof of
> concept: - Make it work out of the box with .xprofile (or how that is
> called). /me looking to Evilham now :)
> - Make it work with other desktop environments out of the box
> - Make it handle groups of services in a clean and simple way
> - Make it work with s6 alternatively (may just need replacing
> runsvdir) - And of course add more services, …
> - including any of those relevant in /usr/lib/systemd/user/
> - Putting it into a package. I am willing to package it at a later
> point in time.
> 
> 
> When discussing this, please make sure doing so constructively.
> 
> 
> Thanks a lot to Evilham for coming up with the idea to use runit for
> user services and for providing the initial service directories for
> the four services to make Evolution work.
> 
> 
> Now let's make more out of this by the power of together…
> 
> and of course enjoy using it.
> 
> Thanks.
-- 
Martin


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] User services

2019-05-11 Thread Martin Steigerwald
Steve Litt - 11.05.19, 09:54:
> On Fri, 10 May 2019 21:12:15 +0200
> 
> Martin Steigerwald  wrote:
> > Hi!
> > 
> > Do you remember the days where people believed in rough consensus
> > and
> > running code? :) It was before my time here on Earth, but whatever…
> > 
> > tada… welcome to user services:
> > 
> > https://git.devuan.org/WIP-init/user-services/blob/master/README.md
> 
> Nice!
> 
> This is a great new way for me to run the home-grown daemons I want to
> run as slitt instead of root.
> 
> A question: What runs user-services.sh? Should it be called from
> ~/.bashrc,  or from somewhere else?

Well, this is a good question.

If KDE Plasma is detected, the install-or-update.sh script, stuffes it 
into ~/.config/plasma-workspace/env so it gets started with the session.

You can either put it into .xprofile or how that is called (Evilham uses 
that) or in your shell profile file. It depends a bit on whether you like 
your services be started only for graphical sessions or also for SSH / 
TTY sessions. I may explore how to integrate it with PAM at a later 
time.

I happily welcome merge requests which extend the install-or-update.sh 
script to integrate with xprofile or you name it.

Ciao,
-- 
Martin


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] User services

2019-05-11 Thread Steve Litt
On Fri, 10 May 2019 21:12:15 +0200
Martin Steigerwald  wrote:

> Hi!
> 
> Do you remember the days where people believed in rough consensus and
> running code? :) It was before my time here on Earth, but whatever…
> 
> tada… welcome to user services:
> 
> https://git.devuan.org/WIP-init/user-services/blob/master/README.md

Nice!

This is a great new way for me to run the home-grown daemons I want to
run as slitt instead of root.

A question: What runs user-services.sh? Should it be called from
~/.bashrc,  or from somewhere else?

SteveT
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] User services

2019-05-10 Thread Martin Steigerwald
Martin Steigerwald - 10.05.19, 21:12:
> Thanks a lot to Evilham for coming up with the idea to use runit for
> user services and for providing the initial service directories for
> the four services to make Evolution work.

Thanks a lot of course also to Gerrit Pape for that piece of art and 
simplicity called 'runit'.

-- 
Martin


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] User services

2019-05-10 Thread Martin Steigerwald
Hi!

Do you remember the days where people believed in rough consensus and
running code? :) It was before my time here on Earth, but whatever…

tada… welcome to user services:

https://git.devuan.org/WIP-init/user-services/blob/master/README.md


% userservice list
evolution-addressbook-factory
evolution-calendar-factory
evolution-source-registry
evolution-user-prompter
pulseaudio
redshift

% userservice enable evolution-user-prompter

% ps aux | grep "[e]volution"
martin   10495  0.0  0.0   2156   744 ?S21:01   0:00 runsv 
evolution-user-prompter
martin   10497  4.4  0.3 443308 53076 ?Sl   21:01   0:00 
/usr/lib/evolution/evolution-user-prompter

% userservice enabled
evolution-user-prompter
pulseaudio
redshift

% userservice disable evolution-user-prompter
% ps aux | grep "[e]volution"

% userservice enabled
pulseaudio
redshift


And now feel free already to contribute your own services. :)

I welcome merge requests.


There are quite some ideas on how to improve this initial proof of concept:
- Make it work out of the box with .xprofile (or how that is called).
  /me looking to Evilham now :)
- Make it work with other desktop environments out of the box
- Make it handle groups of services in a clean and simple way
- Make it work with s6 alternatively (may just need replacing runsvdir)
- And of course add more services, …
- including any of those relevant in /usr/lib/systemd/user/
- Putting it into a package. I am willing to package it at a later point
  in time.


When discussing this, please make sure doing so constructively.


Thanks a lot to Evilham for coming up with the idea to use runit for user
services and for providing the initial service directories for the four
services to make Evolution work.


Now let's make more out of this by the power of together…

and of course enjoy using it.

Thanks.
-- 
Martin


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng