View previous topic :: View next topic |
Author |
Message |
prestige787 n00b
Joined: 18 Sep 2021 Posts: 37
|
Posted: Mon Feb 12, 2024 9:22 pm Post subject: Syncthing Troubles |
|
|
I have two Gentoo machines, and on one of them, syncthing thinks that ~ is /var/lib/syncthing. I have tried to force the path to /home/user/folder, but it still then sync the folder to /var/lib/suncthing/folder. On the other machine, it correctly detects ~ as /home/user, and I can sync files between that machine and my e-reader. But I would like to sync the two computers, I have tried reinstalling syncthing which did not change anything. Any help appreciated! |
|
Back to top |
|
|
flexibeast Guru
Joined: 04 Apr 2022 Posts: 325 Location: Naarm/Melbourne, Australia
|
Posted: Tue Feb 13, 2024 3:11 am Post subject: |
|
|
i don't use syncthing myself, but /var/lib/syncthing is HOME for the 'syncthing' user, which suggests that on the relevant machine, you're running syncthing as the 'syncthing' user. |
|
Back to top |
|
|
prestige787 n00b
Joined: 18 Sep 2021 Posts: 37
|
Posted: Fri Feb 16, 2024 11:08 pm Post subject: |
|
|
flexibeast wrote: | i don't use syncthing myself, but /var/lib/syncthing is HOME for the 'syncthing' user, which suggests that on the relevant machine, you're running syncthing as the 'syncthing' user. |
Do you know how I can change that? I know in systemd there is the option to start a service @user, but I'm using openrc and not aware of an equivalent. |
|
Back to top |
|
|
flexibeast Guru
Joined: 04 Apr 2022 Posts: 325 Location: Naarm/Melbourne, Australia
|
Posted: Fri Feb 16, 2024 11:30 pm Post subject: |
|
|
Unfortunately OpenRC user services aren't yet available (though there's been work on implementing them), so it's a "roll your own" situation. i use OpenRC myself, and although it's fragile, i start user daemons, such as MPD and an Emacs server, from my zsh .zlogin file (i don't use a display manager; i log in via the console). Potentially i could use s6 to set up a supervision tree (cf. svscan), but i've not yet got around to trying that .... |
|
Back to top |
|
|
setan n00b
Joined: 21 Feb 2024 Posts: 68
|
Posted: Fri Mar 01, 2024 5:00 pm Post subject: |
|
|
Actually you can make syncthing change it's user and group. This works just as well for one user systems as systemd.
Look at /etc/conf.d/syncthing and maybe man syncthing.
Generally you can configure openrc services in the /etc/conf.d/ and if something is not there try /etc/init.d/ |
|
Back to top |
|
|
flexibeast Guru
Joined: 04 Apr 2022 Posts: 325 Location: Naarm/Melbourne, Australia
|
Posted: Sat Mar 02, 2024 1:20 am Post subject: |
|
|
setan wrote: | Actually you can make syncthing change it's user and group. |
Good to know, thanks.
setan wrote: | Generally you can configure openrc services in the /etc/conf.d/ and if something is not there try /etc/init.d/ |
Indeed. However, some services/programs require context that isn't available until a user actually logs in, and in other instances, starts up other services/programs. A significant one in this regard is the D-Bus session bus (as distinct from the D-Bus system bus, which can get started at boot; that's what the 'dbus' OpenRC service does). The purpose of a session bus is to be used by a particular user session, and thus shouldn't be set up before user login. But then other services which depend on the presence of a session bus can only be started properly once the address of the session bus is known.
There are various hacks to work around this, of course. For example, one can configure dbus-daemon(1) to listen on a fixed address (via the <listen> element), but that can potentially create security issues. In my own case, i'm currently starting dbus-daemon(1) via .zlogin and saving the session bus address in a file, which then gets imported into the environment in which other services are started up.
That said, i'm now working on setting up s6-rc on my system to provide user services, with the intention of writing a guide on the Gentoo wiki to help other OpenRC users do the same. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|