Re: Creating a user-level systemd unit - SOLVED

2021-07-04 Thread Patrick O'Callaghan
On Sun, 2021-07-04 at 17:34 +0200, francis.montag...@inria.fr wrote: > > Hi. > > On Thu, 01 Jul 2021 10:47:45 +0100 Patrick O'Callaghan wrote: > > > On Thu, 2021-07-01 at 08:53 +0800, Ed Greshko wrote: > > > > Got me to start experimenting with writing user units and > > > learning a > > > bit

Re: Creating a user-level systemd unit - SOLVED

2021-07-04 Thread Francis . Montagnac
Hi. On Thu, 01 Jul 2021 10:47:45 +0100 Patrick O'Callaghan wrote: > On Thu, 2021-07-01 at 08:53 +0800, Ed Greshko wrote: >> Got me to start experimenting with writing user units and learning a >> bit about how they work. >> So, some good came of the noise.  From my perspective anyway.  :-) >

Re: Creating a user-level systemd unit - SOLVED

2021-07-01 Thread Patrick O'Callaghan
On Thu, 2021-07-01 at 08:53 +0800, Ed Greshko wrote: > On 01/07/2021 05:56, Patrick O'Callaghan wrote: > > Apologies for the noise and thanks to all who attempted to help. > > Oh, that's OK. > > Got me to start experimenting with writing user units and learning a > bit about how they work. > > S

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Ed Greshko
On 01/07/2021 05:56, Patrick O'Callaghan wrote: Apologies for the noise and thanks to all who attempted to help. Oh, that's OK. Got me to start experimenting with writing user units and learning a bit about how they work. So, some good came of the noise.  From my perspective anyway.  :-) -

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Patrick O'Callaghan
On Wed, 2021-06-30 at 22:24 +0100, Patrick O'Callaghan wrote: > That's actually a different service. Insync has a GUI-based app called > 'insync' for workstations and a separate app called 'insync-headless' > intended for servers. The two are essentially independent of each other > and have differe

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Patrick O'Callaghan
On Wed, 2021-06-30 at 10:16 -0400, Jonathan Billings wrote: > On Wed, Jun 30, 2021 at 03:01:56PM +0100, Patrick O'Callaghan wrote: > > Well I did that, but things are no better. The service still > > doesn't > > restart after logging out and in again. In fact it's actually worse > > now > > as it a

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Ed Greshko
On 01/07/2021 02:14, Joe Zeff wrote: On 6/30/21 11:52 AM, Patrick O'Callaghan wrote: Sure. On F33 I did have KillUserProcesses=yes set, but I neglected to make that change on F34. It might make a difference. If those settings are kept in your home directory, they should survive a clean instal

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Joe Zeff
On 6/30/21 11:52 AM, Patrick O'Callaghan wrote: Sure. On F33 I did have KillUserProcesses=yes set, but I neglected to make that change on F34. It might make a difference. If those settings are kept in your home directory, they should survive a clean install as long as you keep your home intact

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Patrick O'Callaghan
On Wed, 2021-06-30 at 22:35 +0800, Ed Greshko wrote: > On 30/06/2021 21:55, Patrick O'Callaghan wrote: > > On Wed, 2021-06-30 at 21:45 +0800, Ed Greshko wrote: > > > On 30/06/2021 21:39, Patrick O'Callaghan wrote: > > > > On Wed, 2021-06-30 at 19:37 +0800, Ed Greshko wrote: > > > > > On 30/06/2021

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Ed Greshko
On 30/06/2021 21:55, Patrick O'Callaghan wrote: On Wed, 2021-06-30 at 21:45 +0800, Ed Greshko wrote: On 30/06/2021 21:39, Patrick O'Callaghan wrote: On Wed, 2021-06-30 at 19:37 +0800, Ed Greshko wrote: On 30/06/2021 18:41, Patrick O'Callaghan wrote: After re-reading systemd.service(1) I added

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Jonathan Billings
On Wed, Jun 30, 2021 at 03:01:56PM +0100, Patrick O'Callaghan wrote: > Well I did that, but things are no better. The service still doesn't > restart after logging out and in again. In fact it's actually worse now > as it apparently doesn't start even the first time. I even did a clean > boot to ch

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Patrick O'Callaghan
On Wed, 2021-06-30 at 19:41 +0800, Ed Greshko wrote: > > But of course there's always something else. After logging out, the > > service is killed, which is fine, but it doesn't start again with a > > new > > login. I assumed that user units would do this automatically, but it > > seems they don't.

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Patrick O'Callaghan
On Wed, 2021-06-30 at 21:45 +0800, Ed Greshko wrote: > On 30/06/2021 21:39, Patrick O'Callaghan wrote: > > On Wed, 2021-06-30 at 19:37 +0800, Ed Greshko wrote: > > > On 30/06/2021 18:41, Patrick O'Callaghan wrote: > > > > After re-reading systemd.service(1) I added the line: > > > > > > > > Type=f

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Jonathan Billings
On Wed, Jun 30, 2021 at 02:40:27PM +0100, Patrick O'Callaghan wrote: > > > > > > After=plasma-core.target in the [Unit] section and > > > WantedBy=plasma-core.target in the [Install] section > > > > > > I don't know if there is a general way to do it for all desktops. > > > Right. I was looking

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Ed Greshko
On 30/06/2021 21:41, Patrick O'Callaghan wrote: On Wed, 2021-06-30 at 09:14 -0400, Jonathan Billings wrote: On Wed, Jun 30, 2021 at 07:57:37PM +0800, Ed Greshko wrote: I put my service file in ~/.config/systemd/user.  Then I have to disable/enable the service for the change to take effect.  Th

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Ed Greshko
On 30/06/2021 21:39, Patrick O'Callaghan wrote: On Wed, 2021-06-30 at 19:37 +0800, Ed Greshko wrote: On 30/06/2021 18:41, Patrick O'Callaghan wrote: After re-reading systemd.service(1) I added the line: Type=forking to the service file, and now the script is not being terminated, which is wha

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Patrick O'Callaghan
On Wed, 2021-06-30 at 09:14 -0400, Jonathan Billings wrote: > On Wed, Jun 30, 2021 at 07:57:37PM +0800, Ed Greshko wrote: > > > I put my service file in ~/.config/systemd/user.  Then I have to > > disable/enable the service for the change to > > take effect.  Then I see > > > > [egreshko@f34

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Patrick O'Callaghan
On Wed, 2021-06-30 at 19:57 +0800, Ed Greshko wrote: > On 30/06/2021 19:41, Ed Greshko wrote: > > > > Maybe ignore my previous question. > > > > I've been playing with this as well.  I found that with KDE I could > >  get a service file to start at login by using > > > > After=plasma-core.target

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Patrick O'Callaghan
On Wed, 2021-06-30 at 19:37 +0800, Ed Greshko wrote: > On 30/06/2021 18:41, Patrick O'Callaghan wrote: > > After re-reading systemd.service(1) I added the line: > > > > Type=forking > > > > to the service file, and now the script is not being terminated, > > which > > is what I wanted. > > > > I

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Jonathan Billings
On Wed, Jun 30, 2021 at 07:57:37PM +0800, Ed Greshko wrote: > I put my service file in ~/.config/systemd/user.  Then I have to > disable/enable the service for the change to > take effect.  Then I see > > [egreshko@f34k2 ~]$ ll .config/systemd/user/ > total 4 > -rw-r--r--. 1 egreshko egreshk

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Ed Greshko
On 30/06/2021 19:41, Ed Greshko wrote: Maybe ignore my previous question. I've been playing with this as well.  I found that with KDE I could get a  service file to start at login by using After=plasma-core.target in the [Unit] section and WantedBy=plasma-core.target in the [Install] section

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Ed Greshko
On 30/06/2021 19:35, Patrick O'Callaghan wrote: On Wed, 2021-06-30 at 11:41 +0100, Patrick O'Callaghan wrote: On Tue, 2021-06-29 at 19:37 +0100, Patrick O'Callaghan wrote: On Tue, 2021-06-29 at 21:28 +0800, Qiyu Yan wrote: 在 2021-06-29星期二的 12:42 +0100,Patrick O'Callaghan写道: I'm trying to get

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Ed Greshko
On 30/06/2021 18:41, Patrick O'Callaghan wrote: After re-reading systemd.service(1) I added the line: Type=forking to the service file, and now the script is not being terminated, which is what I wanted. IOW, this seems to be the solution, or at least*a* solution. There may be an alternate so

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Patrick O'Callaghan
On Wed, 2021-06-30 at 11:41 +0100, Patrick O'Callaghan wrote: > On Tue, 2021-06-29 at 19:37 +0100, Patrick O'Callaghan wrote: > > On Tue, 2021-06-29 at 21:28 +0800, Qiyu Yan wrote: > > > 在 2021-06-29星期二的 12:42 +0100,Patrick O'Callaghan写道: > > > > I'm trying to get a specific service to start on log

Re: Creating a user-level systemd unit - SOLVED

2021-06-30 Thread Patrick O'Callaghan
On Tue, 2021-06-29 at 19:37 +0100, Patrick O'Callaghan wrote: > On Tue, 2021-06-29 at 21:28 +0800, Qiyu Yan wrote: > > 在 2021-06-29星期二的 12:42 +0100,Patrick O'Callaghan写道: > > > I'm trying to get a specific service to start on login, and the > > > usual > > > method (KDE Autostart) isn't working so

Re: Creating a user-level systemd unit

2021-06-30 Thread Ed Greshko
On 30/06/2021 16:19, Patrick O'Callaghan wrote: On Wed, 2021-06-30 at 08:10 +0800, Ed Greshko wrote: On 30/06/2021 05:22, Patrick O'Callaghan wrote: On Tue, 2021-06-29 at 13:00 -0600, Joe Zeff wrote: On 6/29/21 12:37 PM, Patrick O'Callaghan wrote: This is the entire script: $ ls -l bin/start

Re: Creating a user-level systemd unit

2021-06-30 Thread Patrick O'Callaghan
On Wed, 2021-06-30 at 08:10 +0800, Ed Greshko wrote: > On 30/06/2021 05:22, Patrick O'Callaghan wrote: > > On Tue, 2021-06-29 at 13:00 -0600, Joe Zeff wrote: > > > On 6/29/21 12:37 PM, Patrick O'Callaghan wrote: > > > > This is the entire script: > > > > > > > > $ ls -l bin/start-insync > > > > -r

Re: Creating a user-level systemd unit

2021-06-29 Thread C Linus Hicks
On Tue, 2021-06-29 at 22:22 +0100, Patrick O'Callaghan wrote: > On Tue, 2021-06-29 at 13:00 -0600, Joe Zeff wrote: > > On 6/29/21 12:37 PM, Patrick O'Callaghan wrote: > > > This is the entire script: > > > > > > $ ls -l bin/start-insync > > > -rwxrwxr-x. 1 poc poc 33 Jun 13 23:00 bin/start-insync

Re: Creating a user-level systemd unit

2021-06-29 Thread Ed Greshko
On 30/06/2021 05:22, Patrick O'Callaghan wrote: On Tue, 2021-06-29 at 13:00 -0600, Joe Zeff wrote: On 6/29/21 12:37 PM, Patrick O'Callaghan wrote: This is the entire script: $ ls -l bin/start-insync -rwxrwxr-x. 1 poc poc 33 Jun 13 23:00 bin/start-insync $ cat bin/start-insync #!/bin/sh insync

Re: Creating a user-level systemd unit

2021-06-29 Thread Patrick O'Callaghan
On Tue, 2021-06-29 at 13:00 -0600, Joe Zeff wrote: > On 6/29/21 12:37 PM, Patrick O'Callaghan wrote: > > This is the entire script: > > > > $ ls -l bin/start-insync > > -rwxrwxr-x. 1 poc poc 33 Jun 13 23:00 bin/start-insync > > $ cat bin/start-insync > > #!/bin/sh > > > > insync-headless start >

Re: Creating a user-level systemd unit

2021-06-29 Thread Joe Zeff
On 6/29/21 12:37 PM, Patrick O'Callaghan wrote: This is the entire script: $ ls -l bin/start-insync -rwxrwxr-x. 1 poc poc 33 Jun 13 23:00 bin/start-insync $ cat bin/start-insync #!/bin/sh insync-headless start Have you tried including the path to insync-headless in the script? ___

Re: Creating a user-level systemd unit

2021-06-29 Thread Patrick O'Callaghan
On Tue, 2021-06-29 at 21:28 +0800, Qiyu Yan wrote: > 在 2021-06-29星期二的 12:42 +0100,Patrick O'Callaghan写道: > > I'm trying to get a specific service to start on login, and the > > usual > > method (KDE Autostart) isn't working so I'm trying to do it with a > > systemd unit: > > How is that not workin

Re: Creating a user-level systemd unit

2021-06-29 Thread Patrick O'Callaghan
On Tue, 2021-06-29 at 08:00 -0400, Jonathan Billings wrote: > On Jun 29, 2021, at 07:43, Patrick O'Callaghan > wrote: > > > > and tried to enable it: > > > >   $ sudo systemctl enable startinsync > >   Failed to enable unit: Unit file startinsync.service does not > > exist. > > It is a user sys

Re: Creating a user-level systemd unit

2021-06-29 Thread Patrick O'Callaghan
On Tue, 2021-06-29 at 04:52 -0700, Samuel Sieb wrote: > On 6/29/21 4:42 AM, Patrick O'Callaghan wrote: > > The docs say that the place to put the unit file is given by: > > > >     $ pkg-config systemd --variable=systemduserunitdir > >     /usr/lib/systemd/user > > The better place for units that

Re: Creating a user-level systemd unit

2021-06-29 Thread Patrick O'Callaghan
On Tue, 2021-06-29 at 19:48 +0800, Ed Greshko wrote: > On 29/06/2021 19:42, Patrick O'Callaghan wrote: > > I'm trying to get a specific service to start on login, and the > > usual > > method (KDE Autostart) isn't working so I'm trying to do it with a > > systemd unit: > > > >     $ cat startinsyn

Re: Creating a user-level systemd unit

2021-06-29 Thread Qiyu Yan
在 2021-06-29星期二的 12:42 +0100,Patrick O'Callaghan写道: > I'm trying to get a specific service to start on login, and the usual > method (KDE Autostart) isn't working so I'm trying to do it with a > systemd unit: How is that not working? Is it due to systemd-xdg-autostart-generator? KDE on Wayland see

Re: Creating a user-level systemd unit

2021-06-29 Thread Jonathan Billings
On Jun 29, 2021, at 07:43, Patrick O'Callaghan wrote: > > and tried to enable it: > > $ sudo systemctl enable startinsync > Failed to enable unit: Unit file startinsync.service does not exist. It is a user systemd unit. To enable it as a user (run this as your user, not as root): syste

Re: Creating a user-level systemd unit

2021-06-29 Thread Samuel Sieb
On 6/29/21 4:42 AM, Patrick O'Callaghan wrote: The docs say that the place to put the unit file is given by: $ pkg-config systemd --variable=systemduserunitdir /usr/lib/systemd/user The better place for units that you create or modify is under /etc/systemd, so /etc/systemd/user for th

Re: Creating a user-level systemd unit

2021-06-29 Thread Ed Greshko
On 29/06/2021 19:42, Patrick O'Callaghan wrote: I'm trying to get a specific service to start on login, and the usual method (KDE Autostart) isn't working so I'm trying to do it with a systemd unit: $ cat startinsync.service [Unit] Description=insync-headless service After=defaul

Creating a user-level systemd unit

2021-06-29 Thread Patrick O'Callaghan
I'm trying to get a specific service to start on login, and the usual method (KDE Autostart) isn't working so I'm trying to do it with a systemd unit: $ cat startinsync.service [Unit] Description=insync-headless service After=default.target [Service] ExecStart=/bin/sh /usr/b