The systemd route does seem promising. Thanks.

If I edited the template vm, I could just put my unit file in
/etc/systemd/system and it would work fine.

However I'd like to do this for a specific AppVm, so I dropped the unit
file in /usr/local/lib/systemd/system. This file persists across boots
as expected, however systemd doesn't load units from it until I
daemon-reload after boot.

I suppose this is because /usr/local is symlinked from /rw/usrlocal
sometime after systemd has loaded its units.

Is there anyway to get systemd to load units from
/usr/local/lib/systemd/system as part of appvm boot?

~abel

Claudia:
> January 11, 2020 2:06 PM, "Abel Luck" <[email protected]> wrote:
> 
>> Hi there,
>>
>> Using the fedora and debian minimal templates, how can I execute a
>> script on *login*? I'm aware of /rw/config/rc.local, but that runs on
>> system boot.
>>
>> Rather, I want to run something after X11 has initialized and my user is
>> logged in.
>>
>> Since no DE is installed, .desktop files in ~/.config/autostart are not
>> executed in the minimal templates
>>
>> ~abel
> 
> Would .xinitrc work?
> 
> Systemd units with After=graphical.target and properly configured User=, 
> Display=, Session=, Seat=, and/or whatever else might be necessary. Or maybe 
> user-mode systemd units. https://wiki.archlinux.org/index.php/Systemd/User
> 
> Or maybe rc.local with `systemctl is-system-running --wait` before your 
> commands - I often have to use this with qvm-run. Running from rc.local 
> though, commands might not be running as the right 
> user/session/seat/slice/scope/whatever, I don't know.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/8cbe83a5-0b2f-b23f-8f41-7221804f2b44%40guardianproject.info.

Reply via email to