Home > OS > Systemd start the service loading environment variable, the system environment variables to disappea
Systemd start the service loading environment variable, the system environment variables to disappea
Time:09-16
I wrote a systemd service for loaded at boot time I want QT environment variable, then execute the QT program, at the time of system start, can see QT program run normally, therefore the environment variable is set up correctly, can be thought of but when the system is up, I set up automatic login as root user login, after login QT application flash back, environment variables, using the export command to see, really useless loading environment variable, there is a problem, can't load in systemd service environment variable, or is it after I login, environment variables are cleared, what ideas to solve this bug
CodePudding user response:
Write in the/etc/profile export xx=yy do not line? Need to bother?