LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

systemctl-import-environment

Import variables into service manager

TLDR

Import environment variable
$ systemctl import-environment [VARIABLE]
copy
Import multiple variables
$ systemctl import-environment [VAR1 VAR2 ...]
copy
Import for user services
$ systemctl import-environment [VARIABLE] --user
copy

SYNOPSIS

systemctl import-environment VARIABLE...

DESCRIPTION

systemctl import-environment imports environment variables from the current shell session into the systemd service manager's environment. These imported variables become available to all units started by the service manager.This is commonly used with `--user` to pass display-related variables (like DISPLAY, WAYLANDDISPLAY, or XDGSESSION_ID) from the login session to user services.

PARAMETERS

--user

Import into user service manager environment
--system
Import into system manager environment (default)

CAVEATS

Only affects services started after the import. Does not affect already running services. The system service manager typically runs in a minimal environment; importing user session variables may not be appropriate.

HISTORY

The import-environment subcommand enables proper integration between login sessions and systemd user services, solving the problem of user services not having access to session environment variables.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid