pages:howtos:systemd:nextcloud-desktop
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pages:howtos:systemd:nextcloud-desktop [2021/10/05 22:03] – mischerh | pages:howtos:systemd:nextcloud-desktop [2021/12/09 23:34] (current) – rokkitlawnchair | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{tag>opensuse | + | {{tag> |
====== Nextcloud Desktop as a user service with systemd ====== | ====== Nextcloud Desktop as a user service with systemd ====== | ||
* https:// | * https:// | ||
* https:// | * https:// | ||
* https:// | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
Since quite some time I am annoyed by the Nextcloud client starting before the internet connection becomes available. That leads to a situation in which the Nextcloud Desktop Client presents a browser window with a login mask because it assumes it is disconnected. | Since quite some time I am annoyed by the Nextcloud client starting before the internet connection becomes available. That leads to a situation in which the Nextcloud Desktop Client presents a browser window with a login mask because it assumes it is disconnected. | ||
My approach will start and manage the Nextcloud Desktop Client as a systemd user service as soon as a network connection becomes ready. | My approach will start and manage the Nextcloud Desktop Client as a systemd user service as soon as a network connection becomes ready. | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | This is working on openSUSE Tumbleweed with KDE as of 2021/10/13. On other operating systems your mileage may vary. | ||
+ | </ | ||
+ | |||
===== KDE Session Management, Autostart ===== | ===== KDE Session Management, Autostart ===== | ||
* remove Nextcloud from autostart | * remove Nextcloud from autostart | ||
* tick "start with an empty session" | * tick "start with an empty session" | ||
+ | |||
+ | |||
+ | ===== Wait System Service ===== | ||
+ | Check if the correct oneshot " | ||
+ | <sxh bash; gutter: false> | ||
+ | systemctl is-enabled NetworkManager-wait-online.service systemd-networkd-wait-online.service | ||
+ | </ | ||
+ | |||
+ | enabled | ||
+ | Failed to get unit file state for systemd-networkd-wait-online.service: | ||
===== Systemd User Service ===== | ===== Systemd User Service ===== | ||
- | <sxh bash; title: | + | <sxh bash; gutter: false> |
+ | # as user | ||
+ | mkdir -pv ~/ | ||
+ | vim ~/ | ||
+ | </ | ||
+ | <sxh bash; title: | ||
[Unit] | [Unit] | ||
Description=Nextcloud Desktop Client | Description=Nextcloud Desktop Client | ||
After=network-online.target | After=network-online.target | ||
- | Wants=network-online.target | + | Wants=network-online.target |
[Service] | [Service] | ||
- | Type=simple | + | Type=simple |
StandardOutput=journal | StandardOutput=journal | ||
ExecStart=/ | ExecStart=/ | ||
+ | Restart=on-failure | ||
+ | RestartSec=5s | ||
+ | LimitNOFILE=65535: | ||
[Install] | [Install] | ||
WantedBy=default.target | WantedBy=default.target | ||
+ | |||
</ | </ | ||
- | |||
+ | enable the service | ||
+ | <sxh bash; gutter: false> | ||
+ | systemctl --user enable nextcloud-desktop.service | ||
+ | </ | ||
+ | |||
+ | start the service | ||
+ | <sxh bash; gutter: false> | ||
+ | systemctl --user start nextcloud-desktop.service | ||
+ | </ | ||
+ | |||
+ | check that the service is running | ||
+ | <sxh bash; gutter: false> | ||
+ | systemctl --user status nextcloud-desktop.service | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | ~~DISCUSSION~~ |
pages/howtos/systemd/nextcloud-desktop.1633471436.txt.gz · Last modified: 2021/10/05 22:03 by mischerh