[Unit] # This needs to be started after user login. Shutdown will be handled by a systemd user process, not this systemd system process, as we need to be absolutely sure that the HVM is stopped at user logout/shutdown, otherwise the system will hang on shutdown/reboot. Description=Start the tpf-proxy HVM, restart on crash/shutdown. After=user-1000.slice Requires=user-1000.slice [Service] Type=simple # We need to set a DISPLAY or the HVM won't show up on the GUI. Environment=DISPLAY=:0 ExecStart=/bin/qvm-start tpf-proxy ExecStop=/bin/true Restart=always RestartSec=45 # We are monitoring the PID of the following process/file, NOT the status of the qvm-start process itself. PIDFile=/var/run/qubes/qubesdb.tpf-proxy.pid [Install] WantedBy=graphical.target