January 4, 2022

Execute lxc command as a user and notify on host when it's done

lxc exec container -- sudo --login --user $USER bash -ilc "cd folder && ./command" && notify-send "Something happened" "Blah blah blah"