aboutsummaryrefslogtreecommitdiff
path: root/chroot-chromium
blob: bc7ed38069bcee7be11f6bf2c1e16fedb3d91258 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
#
# Chroot wrapper
#

if [ -z "$1" ]; then
  chroot="wheezy"
else
  chroot="$1"
fi

# Load configuration
if [ -e "$HOME/.config/scripts/chroot" ]; then
  source $HOME/.config/scripts/chroot
fi

xhost local:$CHROOT_USER
sudo su $CHROOT_USER -c "schroot -d /home/$CHROOT_USER -c $chroot -p chromium-browser" &
sleep 1
xhost -