Advertisement
jor_teron

test.sh

Aug 6th, 2022 (edited)
1,273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.05 KB | None | 0 0
  1. #!/bin/bash
  2. # test script
  3.  
  4.  
  5. prepchroot(){
  6. chrootdir='/home/user/@userdata/chroot' ;
  7. #x="proc dev/pts sys" ;
  8.  
  9. #for i in $x; do
  10. sudo mount --verbose --bind /proc $chrootdir/$1/proc ;
  11. sudo mount --verbose -t devpts /dev/pts $chrootdir/$1/dev/pts
  12. sudo mount --verbose -t sysfs /sys $chrootdir/$1/sys
  13.  
  14. #echo "Mounted: /$i";
  15. #done;
  16.  
  17. #if [ -z $DISPLAY ]; then export DISPLAY=':0.0' && echo "setting= $DISPLAY" ; else echo "exist= $DISPLAY" ; fi; #set disk size, if not already set
  18. #xhost +
  19. }
  20.  
  21. chrootumnt(){
  22. chrootdir='/home/user/@userdata/chroot' ;
  23. x="proc dev/pts sys" ;
  24.  
  25. for i in $x; do
  26. sudo umount --verbose $chrootdir/$1-chroot/$i ;
  27. echo "Unmounted: /$i";
  28. done;
  29. }
  30.  
  31. prepchroot $1
  32. #chrootumnt $1
  33.  
  34. #pkexec chroot ~/@userdata/chroot/debian-chroot /usr/bin/firefox --display=:0.0 > /dev/null 2>&1 &
  35.  
  36. # gnome-system-monitor stacer glances
  37. # sudo chroot --userspec=1000:1000 debian-chroot sudo /usr/bin/login -f user
  38. # sudo chroot  debian-chroot /usr/bin/sudo /usr/bin/login -f user
  39.  
  40. # Xnest -ac -geometry 1350x680+0+0 :10 > /dev/null 2>&1 &
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement