[systemd-devel] Environment for prefdm.service

Lennart Poettering lennart at poettering.net
Tue Jul 5 14:31:35 PDT 2011


On Tue, 05.07.11 12:50, David Michael (fedora.dm0 at gmail.com) wrote:

> Hi,
> 
>   I am attempting to integrate a desktop environment with Fedora 15,
> and it includes its own display manager.
> 
>   It seems that prefdm.service always fails to start with it, and
> multiple retries are logged in /var/log/audit and /var/log/messages .
> However, running the bare command taken from prefdm.service always
> seems to succeed without any trouble.  If there is any useful log
> information from this event, I don't know where to find it.  (It
> probably doesn't help that the prefdm script writes program output to
> /dev/null .)

Copy /lib/systemd/system/prefdm.service to
/etc/systemd/system/prefdm.service, so that you can edit it. Then, add
"StandardOutput=syslog" to its [Service] section, and issue "systemctl
daemon-reload" to tell systemd to reload the service file. Then, try
"systemctl start prefdm.service". Now all output from stdout and stderr
will go to syslog, have a look there. And "systemctl status
prefdm.service" will provide you with the exit code.

>   Is there any obvious difference in the runtime environments that
> would cause this?  The service fails both on boot and with `systemctl
> restart prefdm.service` on a root shell, but `/etc/X11/prefdm
> -nodaemon` works on the same shell.

Well, systemd executes all services in completely cleaned up context,
with no inherited environment or anything like that. That basically
means that usually ther are no env vars but PATH and LANG set.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list