summaryrefslogtreecommitdiffstats
path: root/units/user (follow)
Commit message (Collapse)AuthorAgeFilesLines
* man,units: drop "temporary" from description of systemd-tmpfilesMike Yuan2024-06-151-1/+1
| | | | | | | | | Historically, systemd-tmpfiles was designed to manager temporary files, but nowadays it has become a generic tool for managing all kinds of files. To avoid user confusion, let's remove "temporary" from the tool's description. As discussed in #33349
* units: sort lists in meson.buildMike Yuan2024-03-261-1/+1
|
* units: add systemd-capsule@.serviceLennart Poettering2024-03-142-0/+16
|
* user: delegate cpu controller, assign weights to user slicesZbigniew Jędrzejewski-Szmek2022-07-053-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we didn't enable the cpu controller because of overhead of the accounting. If I'm reading things correctly, delegation was enabled for a while for the units with user and pam context set, i.e. for user@.service too. a931ad47a8623163a29d898224d8a8c1177ffdaf added the explicit Delegate=yes|no switch, but it was initially set to 'yes'. acc8059129b38d60c1b923670863137f8ec8f91a disabled delegation for user@.service with the justication that CPU accounting is expensive, but half a year later a88c5b8ac4df713d9831d0073a07fac82e884fb3 changed DefaultCPUAccounting=yes for kernels >=4.15 with the justification that CPU accounting is inexpensive there. In my (very noncomprehensive) testing, I don't see a measurable overhead if the cpu controller is enabled for user slices. I tried some repeated compilations, and there is was no statistical difference, but the noise level was fairly high. Maybe better benchmarking would reveal a difference. The goal of this change is very simple: currently all of the user session, including services like the display server and pipewire are under user@.service. This means that when e.g. a compilation job is started in the session's app.slice, the processes in session.slice compete for CPU and can be starved. In particular, audio starts to stutter, etc. With CPU controller enabled, I can start start 'ninja -C build -j40' in a tab and this doesn't have any noticable effect on audio. I don't think the particular values matter too much: the CPU controller is work-convserving, and presumably the session slice would never need more than e.g. one 1 full CPU, i.e. half or a quarter of available CPU resources on even the smallest of today's machines. app.slice and session.slice are assigned equal weights, background.slice is assigned a smaller fraction. CPUWeight=100 is the default, but I wrote it explicitly to make it easier for users to see how the split is done. So effectively this should result in session.slice getting as much power as it needs. If if turns out that this does have a noticable overhead, we could make it opt-in. But I think that the benefit to usability is important enough to enable it by default. W/o something like this the session is not really usable with background tasks.
* meson: drop unnecessary listificationZbigniew Jędrzejewski-Szmek2021-05-191-1/+1
|
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-123-3/+3
| | | | Follow-up for db9ecf050165fd1033c6f81485917e229c4be537.
* Merge pull request #16603 from benzea/benzea/special-app-sliceLennart Poettering2020-11-116-0/+44
|\ | | | | Use app.slice by default in user manager (and define special user slices)
| * units: Move user tmpfiles clean service into background.sliceBenjamin Berg2020-10-231-0/+1
| |
| * units: Add special Desktop Environment user related unitsBenjamin Berg2020-10-235-0/+43
| | | | | | | | This adds app.slice, session.slice and background.slice.
* | license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-0919-19/+19
|/
* xdg-autostart-generator: Add a generator for XDG autostart filesBenjamin Berg2020-05-272-0/+18
| | | | | | | | | | | | | | This generator can be used by desktop environments to launch autostart applications and services. The feature is an opt-in, triggered by xdg-desktop-autostart.target being activated. Also included is the new binary xdg-autostart-condition. This binary is used as an ExecCondition to test the OnlyShowIn and NotShowIn XDG desktop file keys. These need to be evaluated against the XDG_CURRENT_DESKTOP environment variable which may not be known at generation time. Co-authored-by: Henri Chain <henri.chain@enioka.com>
* units: drop full paths for utilities in $PATHZbigniew Jędrzejewski-Szmek2020-01-203-17/+5
| | | | | | | This makes things a bit simpler and the build a bit faster, because we don't have to rewrite files to do the trivial substitution. @rootbindir@ is always in our internal $PATH that we use for non-absolute paths, so there should be no functional change.
* units: use symbolic exit code namesZbigniew Jędrzejewski-Szmek2019-07-292-2/+2
| | | | | (nspawn uses 133 which doesn't have a name. That's reasonable, because there's less chance of conflict with a return value from the payload.)
* man,units: document what user "default.target" is a bitZbigniew Jędrzejewski-Szmek2019-03-151-1/+1
|
* units: replace symlinks in units/user/ by real filesZbigniew Jędrzejewski-Szmek2018-12-138-8/+105
| | | | | | | | | | | | | | We already *install* those as real files since de78fa9ba0be55b01066ca5a716c6673d76b817b. Meson will start to copy symlinks as-is, so we would get dangling symlinks in /usr/lib/systemd/user/. I considered the layout in our sources to match the layout in the installation filesystem (i.e. creating units/system/ and moving all files from units/ to units/system/), but that seems overkill. By using normal files for both we get some duplication, but those files change rarely, so it's not a big downside in practice. Fixes #9906.
* units: drop units/user/busnames.targetZbigniew Jędrzejewski-Szmek2018-12-131-1/+0
| | | | It seems this was missed in 0ba89873372c3ab508852b4e0071da0719bcea0a.
* units: use SuccessAction=exit-force in systemd-exit.serviceZbigniew Jędrzejewski-Szmek2018-10-172-5/+2
| | | | | | | | Fixes #10414. v2: - rename .service.in to .service - rename 'exit' to 'exit-force'
* Drop my copyright headersZbigniew Jędrzejewski-Szmek2018-06-141-2/+0
| | | | | | | perl -i -0pe 's/\s*Copyright © .... Zbigniew Jędrzejewski.*?\n/\n/gms' man/*xml git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/(#\n)?# +Copyright © [0-9, -]+ Zbigniew Jędrzejewski.*?\n//gms' git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s*\/\*\*\*\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*?\s*\*\*\*\/\s*/\n\n/gms' git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*//gms'
* tree-wide: beautify remaining copyright statementsLennart Poettering2018-06-141-1/+1
| | | | | | Let's unify an beautify our remaining copyright statements, with a unicode ©. This means our copyright statements are now always formatted the same way. Yay.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* units: use `systemctl exit` to kill the user manager (#8648)Filipe Brandenburger2018-04-041-1/+1
| | | | | | | | | | | Use `systemctl --user --force exit` to implement the systemd-exit user service. This removes our dependence on an external `kill` binary and the concerns about whether they recognize SIGRTMIN+n by name or what their interpretation of SIGRTMIN is. Tested: `systemctl --user start systemd-exit.service` kills the `systemd --user` instance for my user.
* Hook up systemd-tmpfiles as user unitsZbigniew Jędrzejewski-Szmek2017-12-064-0/+68
| | | | | | | | | | | | | An explicit --user switch is necessary because for the user@0.service instance systemd-tmpfiles is running as root, and we need to distinguish that from systemd-tmpfiles running in systemd-tmpfiles*.service. Fixes #2208. v2: - restore "systemd-" prefix - add systemd-tmpfiles-clean.{service,timer}, systemd-setup.service to systemd-tmpfiles(8)
* Add license headers and SPDX identifiers to meson.build filesZbigniew Jędrzejewski-Szmek2017-11-191-0/+17
| | | | | | | So far I avoided adding license headers to meson files, but they are pretty big and important and should carry license headers like everything else. I added my own copyright, even though other people modified those files too. But this is mostly symbolic, so I hope that's OK.
* Add SPDX license headers to unit filesZbigniew Jędrzejewski-Szmek2017-11-196-0/+12
|
* build-sys: drop gitignore patterns for in-tree buildsZbigniew Jędrzejewski-Szmek2017-07-181-1/+0
| | | | ... and other autotools-generated files.
* build-sys: drop automake supportZbigniew Jędrzejewski-Szmek2017-07-181-1/+0
| | | | | v2: - also mention m4
* meson: reindent all files with 8 spacesZbigniew Jędrzejewski-Szmek2017-04-241-27/+24
| | | | | | | The indentation for emacs'es meson-mode is added .dir-locals. All files are reindented automatically, using the lasest meson-mode from git. Indentation should now be fairly consistent.
* meson: build systemd using mesonZbigniew Jędrzejewski-Szmek2017-04-241-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's crucial that we can build systemd using VS2010! ... er, wait, no, that's not the official reason. We need to shed old systems by requring python 3! Oh, no, it's something else. Maybe we need to throw out 345 years of knowlege accumulated in autotools? Whatever, this new thing is cool and shiny, let's use it. This is not complete, I'm throwing it out here for your amusement and critique. - rules for sd-boot are missing. Those might be quite complicated. - rules for tests are missing too. Those are probably quite simple and repetitive, but there's lots of them. - it's likely that I didn't get all the conditions right, I only tested "full" compilation where most deps are provided and nothing is disabled. - busname.target and all .busname units are skipped on purpose. Otherwise, installation into $DESTDIR has the same list of files and the autoconf install, except for .la files. It'd be great if people had a careful look at all the library linking options. I added stuff until things compiled, and in the end there's much less linking then in the old system. But it seems that there's still a lot of unnecessary deps. meson has a `shared_module` statement, which sounds like something appropriate for our nss and pam modules. Unfortunately, I couldn't get it to work. For the nss modules, we need an .so version of '2', but `shared_module` disallows the version argument. For the pam module, it also didn't work, I forgot the reason. The handling of .m4 and .in and .m4.in files is rather awkward. It's likely that this could be simplified. If make support is ever dropped, I think it'd make sense to switch to a different templating system so that two different languages and not required, which would make everything simpler yet. v2: - use get_pkgconfig_variable - use sh not bash - use add_project_arguments v3: - drop required:true and fix progs/prog typo v4: - use find_library('bz2') - add TTY_GID definition - define __SANE_USERSPACE_TYPES__ - use join_paths(prefix, ...) is used on all paths to make them all absolute v5: - replace all declare_dependency's with [] - add more conf.get guards around optional components v6: - drop -pipe, -Wall which are the default in meson - use compiler.has_function() and compiler.has_header_symbol instead of the hand-rolled checks. - fix duplication in 'liblibsystemd' library name - use the right .sym file for pam_systemd - rename 'compiler' to 'cc': shorter, and more idiomatic. v7: - use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D - rename prefix to prefixdir, rootprefix to rootprefixdir ("prefix" is too common of a name and too easy to overwrite by mistake) - wrap more stuff with conf.get('ENABLE...') == 1 - use rootprefix=='/' and rootbindir as install_dir, to fix paths under split-usr==true. v8: - use .split() also for src/coredump. Now everything is consistent ;) - add rootlibdir option and use it on the libraries that require it v9: - indentation v10: - fix check for qrencode and libaudit v11: - unify handling of executable paths, provide options for all progs This makes the meson build behave slightly differently than the autoconf-based one, because we always first try to find the executable in the filesystem, and fall back to the default. I think different handling of loadkeys, setfont, and telinit was just a historical accident. In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs. In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin), but in Debian, those directories are not included in the path. C.f. https://github.com/mesonbuild/meson/issues/1576. - call all the options 'xxx-path' for clarity. - sort man/rules/meson.build properly so it's stable
* units: install user units as real files, not symlinks to ../system/Zbigniew Jędrzejewski-Szmek2016-08-199-0/+9
| | | | | | | | | | | | | | | | | | | | | This was causing preset-all --global to create symlinks: $ systemctl preset-all --global --root=/var/tmp/inst1 Created symlink /var/tmp/inst1/etc/systemd/user/shutdown.target → /usr/lib/systemd/user/../system/shutdown.target. Created symlink /var/tmp/inst1/etc/systemd/user/sockets.target → /usr/lib/systemd/user/../system/sockets.target. Created symlink /var/tmp/inst1/etc/systemd/user/timers.target → /usr/lib/systemd/user/../system/timers.target. Created symlink /var/tmp/inst1/etc/systemd/user/paths.target → /usr/lib/systemd/user/../system/paths.target. Created symlink /var/tmp/inst1/etc/systemd/user/bluetooth.target → /usr/lib/systemd/user/../system/bluetooth.target. Created symlink /var/tmp/inst1/etc/systemd/user/printer.target → /usr/lib/systemd/user/../system/printer.target. Created symlink /var/tmp/inst1/etc/systemd/user/sound.target → /usr/lib/systemd/user/../system/sound.target. Created symlink /var/tmp/inst1/etc/systemd/user/smartcard.target → /usr/lib/systemd/user/../system/smartcard.target. Created symlink /var/tmp/inst1/etc/systemd/user/busnames.target → /usr/lib/systemd/user/../system/busnames.target. It is better to create units in a state that completely matches the presets, i.e. preset-all should do nothing when invoked immediately after installation. I'm sure it was confusing to users too, suggesting that system and user units may somehow alias each other.
* units: add graphical-session-pre.target user unit (#3848)Martin Pitt2016-08-021-0/+14
| | | | | This complements graphical-session.target for services which set up the environment (e. g. dbus-update-activation-environment) and need to run before the actual graphical session.
* units: add graphical-session.target user unit (#3678)Martin Pitt2016-07-251-0/+13
| | | | | | | | | | | | This unit acts as a dynamic "alias" target for any concrete graphical user session like gnome-session.target; these should declare "BindsTo=graphical-session.target" so that both targets stop and start at the same time. This allows services that run in a particular graphical user session (e. g. gnome-settings-daemon.service) to declare "PartOf=graphical-session.target" without having to know or get updated for all/new session types. This will ensure that stopping the graphical session will stop all services which are associated to it.
* remove bus-proxydDaniel Mack2016-02-123-27/+0
| | | | | | | | | | As kdbus won't land in the anticipated way, the bus-proxy is not needed in its current form. It can be resurrected at any time thanks to the history, but for now, let's remove it from the sources. If we'll have a similar tool in the future, it will look quite differently anyway. Note that stdio-bridge is still available. It was restored from a version prior to f252ff17, and refactored to make use of the current APIs.
* unit: remove [Install] section from the user exit.target unitLennart Poettering2015-10-141-3/+0
| | | | | | | There's no concept of ctrl-alt-del for user systemd instances, hence don't suggest it woud make sense to symlink the unit to it. Fixes #1525.
* bus-proxy: add ExecReload=David Herrmann2015-08-041-0/+1
| | | | | | | | Make sure we support ExecReload= for bus-proxyd to reload configuration during runtime. This is *really* handy when hacking on kdbus. Package-managers are still recommended to run `busctl --address=unix:path=` directly.
* terminal: drop unfinished codeDavid Herrmann2015-07-272-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This drops the libsystemd-terminal and systemd-consoled code for various reasons: * It's been sitting there unfinished for over a year now and won't get finished any time soon. * Since its initial creation, several parts need significant rework: The input handling should be replaced with the now commonly used libinput, the drm accessors should coordinate the handling of mode-object hotplugging (including split connectors) with other DRM users, and the internal library users should be converted to sd-device and friends. * There is still significant kernel work required before sd-console is really useful. This includes, but is not limited to, simpledrm and drmlog. * The authority daemon is needed before all this code can be used for real. And this will definitely take a lot more time to get done as no-one else is currently working on this, but me. * kdbus maintenance has taken up way more time than I thought and it has much higher priority. I don't see me spending much time on the terminal code in the near future. If anyone intends to hack on this, please feel free to contact me. I'll gladly help you out with any issues. Once kdbus and authorityd are finished (whenever that will be..) I'll definitely pick this up again. But until then, lets reduce compile times and maintenance efforts on this code and drop it for now.
* bus-proxy: turn into multi-threaded daemonDavid Herrmann2015-01-173-6/+2
| | | | | | Instead of using Accept=true and running one proxy for each connection, we now run one proxy-daemon with a thread per connection. This will enable us to share resources like policies in the future.
* bus-proxy: automatically detect scope of bus and derive which XML snippets ↵Lennart Poettering2014-11-281-1/+1
| | | | to load from that
* sd-bus: sync with kdbus upstream (ABI break)Daniel Mack2014-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kdbus has seen a larger update than expected lately, most notably with kdbusfs, a file system to expose the kdbus control files: * Each time a file system of this type is mounted, a new kdbus domain is created. * The layout inside each mount point is the same as before, except that domains are not hierarchically nested anymore. * Domains are therefore also unnamed now. * Unmounting a kdbusfs will automatically also detroy the associated domain. * Hence, the action of creating a kdbus domain is now as privileged as mounting a filesystem. * This way, we can get around creating dev nodes for everything, which is last but not least something that is not limited by 20-bit minor numbers. The kdbus specific bits in nspawn have all been dropped now, as nspawn can rely on the container OS to set up its own kdbus domain, simply by mounting a new instance. A new set of mounts has been added to mount things *after* the kernel modules have been loaded. For now, only kdbus is in this set, which is invoked with mount_setup_late().
* consoled: add a unit fileTom Gundersen2014-10-042-0/+16
| | | | | The unit file is statically enabled, but still requires --enable-terminal to actually get installed.
* units: remove RefuseManualStart from units which are always aroundZbigniew Jędrzejewski-Szmek2014-06-281-1/+0
| | | | | | | | | | | | | | | In a normal running system, non-passive targets and units used during early bootup are always started. So refusing "manual start" for them doesn't make any difference, because a "start" command doesn't cause any action. In early boot however, the administrator might want to start on of those targets or services by hand. We shouldn't interfere with that. Note: in case of systemd-tmpfiles-setup.service, really running the unit after system is up would break the system. So e.g. restarting should not be allowed. The unit has "RefuseManualStop=yes", which prevents restart too.
* bus-proxy: fix misplaced s/system/session/Mantas Mikulėnas2014-06-101-1/+1
|
* bus-proxy: read the right policy when running in user modeLennart Poettering2014-06-101-1/+1
|
* remove bus-driverd, the interface is now handled natively by bus-proxydKay Sievers2014-04-222-15/+0
|
* bus-driverd: support user modeKay Sievers2014-01-082-0/+15
|
* bus-proxyd: support --user bus addressKay Sievers2014-01-082-0/+17
|
* bus-proxyd: --user -- add Accept=yes to socketKay Sievers2014-01-061-0/+1
|
* core: --user -- add basic.target an sort against it like --system doesKay Sievers2014-01-062-0/+15
|
* bus-proxyd: fix socket pathKay Sievers2014-01-061-1/+1
|
* bus: install systemd-bus-proxyd unit files for compatibility with dbus1Lennart Poettering2013-12-131-0/+12
|
* units/user: default.target must be isolatableZbigniew Jędrzejewski-Szmek2013-04-011-0/+1
| | | | | | ... Activating default unit: default.target Default target could not be isolated, starting instead: Operation refused, unit may not be isolated.