Hi all.

How can we set environment variables so they are available for everyone?


Background:

On an embedded target we use QT applications.

To start our QT application we need to set environment variables:

QT_QPA_GENERIC_PLUGINS=tslib:/dev/input/event0                 
QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0:mmsize=154x86:size=800x480 
...


For now we use:
[Service]                                                                       
EnvironmentFile=/etc/foo.conf

This has two drawbacks:
1) We cannot start the QT application from the
   command-line (unless we source the .conf file)
2) We need to use different .conf files (thus different
   .service files) depending on the HW configuration (display type/size)

So we are looking for a way to set the environment variables early
such that they are available in the services launced later,
and they are available in the shell.
The actual system configuration will determine the values and
it may differ from boot to boot.

Thanks in advance,

        Sam
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to