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?

CodePudding user response:

reference 1st floor yolyry response:
written in the/etc/profile export xx=yy do not line? Need to bother?

Just don't want to in the/etc/profile because I don't know why the screen output my boot the login information, login name with systemd can display in advance to cover the login information and I also need to load in systemd touch screen drive because can't loaded into the kernel, manufacturer only gave some configuration file feel I may be in the wrong direction?

CodePudding user response:

The/etc/issue beforehand login information there is something in it?

CodePudding user response:

The
reference 3 floor yolyry response:
/etc/issue the login information there is something inside?


Do something, I deleted after, be I deleted something not shown on the screen, but still there will be a

Myd - imx8mq login:

The information printed on the screen

A serial port terminal output information for:

Myd - imx8mq login: root (automatic login)

Excuse me where can I find the landing of the log information, or can directly cancel the log log on to way, I can configure the output options of baidu find uboot, is I, the console output information ttymxc0 (this is my serial port)

CodePudding user response:

/etc/motd is shown after landing a string, or do you mean it?

CodePudding user response:

I checked the motd inside have no information, I am wondering why there are information output to the screen,,, or in accordance with the way I think is to show qt to override the information in advance, all two package
1, remove the output to the screen information
2, keep qt environment variable, does not be updated after login

1 I tried I don't know how to solve, so I've been trying to 2

CodePudding user response:

In systemd statement written on loading the server??
The Environment=

CodePudding user response:


[Unit]
Description=bluemedical service
After=psplash - quit. Service

[Service]
Type=oneshot
ExecStart=/home/bluemedical/bm. Sh
TimeoutSec=0

[Install] WantedBy=multi - user. Target

I'm going to call the bm. Sh the shell, and then in the shell source I QT environment variables as I said before, in the process of start, QT program is carried out, but I don't have the environment variables after login
  • Related