Add runcontestant script
This commit is contained in:
parent
9204d11a7f
commit
6c8705b8cd
3 changed files with 9 additions and 2 deletions
7
os/layers/contestant/includes.chroot/usr/local/bin/runcontestant
Executable file
7
os/layers/contestant/includes.chroot/usr/local/bin/runcontestant
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
# This script allows running a command as the contestant user, with environment
|
||||
# variables for that user. This allows e.g. running graphical commands.
|
||||
set -o allexport
|
||||
XDG_RUNTIME_DIR="/run/user/$(id -u contestant)"
|
||||
eval "$(runuser -u contestant -- systemctl --user show-environment)"
|
||||
exec /usr/sbin/runuser -u contestant -- "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue