Score:2

How to turn gvfs and other user services off while temporarily not using graphical.target?

cn flag

If I use a desktop installation of Ubuntu 20.04 (for example the standard Hyper-V image promoted by Windows) I can easily turn the graphical components off, by switching the default boot target from graphical to multi-user, with the systemctl set-default multi-user.target. This avoids running the display manager, the xserver and some other stuff.

However I have still the problem that some user-slice services (lots of gvfs, but also dbus, tracker-miner-fs and pulse audio) are still started.

I could remove some of them them from the /etc/systemd/user/default.targets.wants/ and socket.target.wants/ directories, however I would like to have a simple system where the default target actually determines if the system is GUI enabled or not.

Is there a "lower" target für user sessions and how to make it active? And/or can I have users which dont to this on ssh sessions? (it happens even for system [uid<1000] users)

hr flag
It looks like this is something controlled by [pam_systemd](https://www.freedesktop.org/software/systemd/man/pam_systemd.html), through the [systemd-logind.service](https://www.freedesktop.org/software/systemd/man/systemd-logind.service.html) - there's some useful background at [What does pam_systemd.so do?](https://unix.stackexchange.com/a/626710/65304). How you would go about untangling SSH logins specifically I don't know (since the /etc/pam.d/sshd appears to use the same common_auth / common_account / common_session as other logins)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.