![]() Registered Member ![]()
|
Hi,
So, I am having an issue with certain login scripts that I use since I upgraded to 22.04 on KDE Neon. For example this script that mounts my folders no longer works.
I did a test by adding via Autostart:
Seems that for as long as the script is open, those mounts remain. But when I close it, the sshfs processes are killed off when closing the script. I have tried disown, and nohup with those commands, but there has been no change. Anyone have an idea? Maybe there is a way to keep those script open indefinitely? EDIT: Seems like as a temporary fix, using
is the only solution. But if there is a better solution, please share! Thanks! |
![]() Registered Member ![]()
|
I suspect this is due to https://blog.davidedmundson.co.uk/blog/ ... d-startup/ as I can see on my PC after upgrade to 22.04 1:10% systemctl --user status plasma-plasmashell.service ● plasma-plasmashell.service - KDE Plasma Workspace Loaded: loaded (/usr/lib/systemd/user/plasma-plasmashell.service; disabled> Active: active (running) since Tue 2022-10-25 12:27:06 ADT; 44min ago Main PID: 10123 (plasmashell) Tasks: 14 (limit: 38279) Memory: 160.7M CPU: 5.819s CGroup: /user.slice/user-1001.slice/user@1001.service/session.slice/plasma> ├─10123 /usr/bin/plasmashell --no-respawn ├─45256 cat └─45257 cat It seems that disabling Plasma systemd startup helps, see https://www.reddit.com/r/archlinux/comm ... r_working/ Alex |
![]() Registered Member ![]()
|
Seems like this worked:
Thanks! Seems like there are some smart people on Reddit after all. ![]() |
![]() Registered Member ![]()
|
Probably it would be a better approach to migrate these scripts to systemd user units.
|
![]() Registered Member ![]()
|
Then why does KDE offer a section to add login scripts? |
![]() Registered Member ![]()
|
The "one-shot" scripts work fine. That is, if a script does not spawn any child processes, it works without any problems. systemd-run and systemd-kill support many options to control the behavior of child processes, see e.g. https://man7.org/linux/man-pages/man5/s ... ice.5.html and https://man7.org/linux/man-pages/man5/s ... ill.5.html In particular,
So all commands specified in your script work, but as soon as the script is ended, all child processes are killed. That is: * if your script spawns a process using '&', this process will be killed when the main script exits * if your script contains a command that spawns another process (such as sshfs), these processes will be killed when the main script exits It is unclear whether this behavior is intended or developers just did not expect anybody to write scripts that spawn more processes. It would probably make sense to add a way to control that in 'Advanced Options' section. Alex |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]