Skip to content

missing specifiers in user.conf #26596

@rpigott

Description

@rpigott

Component

systemd

Is your feature request related to a problem? Please describe

A subset of common specifiers are available to ManagerEnvironment= in ~/.config/systemd/user.conf, detailed in systemd-system.conf(5). Absent from the list is the user name and user home specifiers, which I would like to use to set the value of XDG_CONFIG_DIRS in the user manager's environment so that it can be used for unit path lookup exactly as described in systemd.unit(5). Specifically, I'd like to include a path like $HOME/.hostconfig/$HOST. The %H hostname specifier is available, but no %h "user home dir" spcecifier as is available to unit files.

The discussion in this issue seems related #1476, however in this case I'm interested in the ~/.config/systemd/user.conf file, where I think it should in principle be possible to retrieve the user's $HOME, especially since the file itself resides in $HOME and we are currently parsing it.

Describe the solution you'd like

Please support the %h "user home dir" common specifier for the ManagerEnvironment= field of ~/.config/systemd/user.conf. I made a brief attempt at this myself in config_parse_environ but i'm not sure how to get at the appropriate scope.

Describe alternatives you've considered

I haven't found any alternative method to set a value derived from $HOME in user.conf.

The systemd version you checked that didn't have the feature you are asking for

253

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFE 🎁Request for Enhancement, i.e. a feature requestpid1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions