aboutsummaryrefslogtreecommitdiff
path: root/chroot-chromium
diff options
context:
space:
mode:
Diffstat (limited to 'chroot-chromium')
-rwxr-xr-xchroot-chromium20
1 files changed, 20 insertions, 0 deletions
diff --git a/chroot-chromium b/chroot-chromium
new file mode 100755
index 0000000..bc7ed38
--- /dev/null
+++ b/chroot-chromium
@@ -0,0 +1,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 -