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 working? Is it due to systemd-xdg-autostart-
> generator?

I need to call a command with an argument, but KDE Autostart only
allows you to specify the name of an executable with no arguments. Even
putting it in a Shell script doesn't work because although the script
is called it immediately terminates, even though the exact same command
when executed from the command line puts itself in the background,
which is what it's supposed to do.

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

> KDE on Wayland seems to be using systemd-xdg-autostart-generator by
> default and causing some problems...
> 

This is Xorg. I don't use Wayland, due to issues with session saving.

[...]

> >    $ sudo systemctl enable startinsync
> >    Failed to enable unit: Unit file startinsync.service does not
> > exist.
> That is for system units, to manage user units, use: 
>  * systemd --user enable startinsync to enable for you only
>  * systemd --global enable startinsync to enable for everyone on this
>    system

Thanks, that seems to work, at least as far as running the script goes.

poc



_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to