Re: Creating a user-level systemd unit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux