Skip to content

Instantly share code, notes, and snippets.

@michaelmrose
Created May 29, 2023 19:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelmrose/4569f0e80257120ee7c30c199e6ec8e9 to your computer and use it in GitHub Desktop.
Save michaelmrose/4569f0e80257120ee7c30c199e6ec8e9 to your computer and use it in GitHub Desktop.
#!/bin/sh
export USER="michael"
export HOME="/usr/home/michael"
export DISPLAY=:0
export DISPLAY=$(who|grep michael| choose 4|cut -c 2-3)
groups="$(id -Gn "$USER" | tr ' ' ':')"
svdir="$HOME/service/enabled"
exec chpst -u "$USER:$groups" runsvdir "$svdir"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment