I recently started development with Python 3 and opencv. Since opencv has to compiled manually to get Python 3 support I created a separate development environment using schroot which is pretty helpful to try out building libs without messing up the host system along the process. As long as the build-tools stay inside the chroot'ed shell everything works as expected. But when I start an x11 application like Pycharm inside the chroot environment it gains access to everything (i guess because it's using the x11 session of the host system). How to keep my development environment completely isolated?
XNest
or Xephyr
a xserver in a window,First you have to create some authorization file:
touch $HOME/.Xephyr_auth_1
Xephyr -auth $HOME/.Xephyr_auth_1_1 :1 &
xpid=$!
xauth -f $HOME/.Xephyr_auth_1 generate :1 . trusted
kill $xpid
Then run your server with apropriated options...
Xephyr -auth $HOME/.Xephyr_auth_1 -screen 1280x800 :1 &
xpid=$!
DISPLAY=:1 XAUTHORITY=$HOME/.Xephyr_auth_1 metacity &
DISPLAY=:1 XAUTHORITY=$HOME/.Xephyr_auth_1 firefox -profileManager -fullscreen
Once done:
kill $! $xpid
chvt
command to access another TTY and run another sessionFrom user's screen menu, go to change user and run another session
By using Ctrl+Alt+Fn with Fn
= F1 to F6, or use one of sudo chvt 1
to sudo chvt 6
, to switch to another tty, then log:
Login: user
password:
startx -- :1