Benutzer-Werkzeuge

Webseiten-Werkzeuge


wartung20152016

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
wartung20152016 [2015/11/29 14:04] – [vlizedlab und DVD Laufwerk] adminwartung20152016 [2015/12/03 15:47] (aktuell) – [USB] admin
Zeile 88: Zeile 88:
  
  
 +==== USB ====
 +
 +  *Dienst deaktivieren
 +<code bash /home/student/.xinitrc>
 +...
 +# ( sleep 4 && ( devmon --no-gui --sync --mount-options "noexec,nosuid,noatime,uid=1000,gid=1000,umask=002" 2>&1 | logger -t devmon ) ) &
 +...
 +</code>
 +
 +  *Sektion mit USB einbauen
 +  *Beamer oder nur Notebook (LVDS kann auch anders heißen!)
 +    *Suche als "student" Benutzer via DISPLAY=:0 xrandr -q
 +
 +<code bash /usr/share/vlizedlab/scripts/startmenustudent>
 +...
 +MENU="$MENU u USB b Beamer kb nur_Notebook x xterm  t Beenden"
 +
 +          # u)
 +          #   clear
 +          #   devmon --unmount-all
 +          #   sleep 2
 +          #   ;;
 +           u)
 +             clear
 +             /usr/local/bin/getusb.sh
 +             sleep 2
 +             ;;
 +           b)
 +             clear
 +             killall ion3
 +             DISPLAY=:0 xrandr --output LVDS1 --mode 1024x768 --output VGA1 --mode 1024x768
 +             DISPLAY=:0 ion3 &
 +             sleep 2
 +             ;;
 +            kb)
 +             clear
 +             killall ion3
 +             DISPLAY=:0 xrandr --output LVDS1 --auto --output VGA1 --off
 +             DISPLAY=:0 ion3 &
 +             sleep 2
 +             ;;
 +...
 +</code>
 +
 +<code bash /usr/local/bin/getusb.sh>
 +
 +#!/bin/bash
 +
 +test -d /tmp/vbusb && rm -rf /tmp/vbusb
 +mkdir /tmp/vbusb
 +VBoxManage list usbhost | awk -v RS="" '{print $0 > "/tmp/vbusb/"$2".txt"}'
 +test -f /tmp/vbusb/USB.txt && rm /tmp/vbusb/USB.txt
 +
 +grep -l -R -I -Z -i mouse /tmp/vbusb/*.txt | xargs -0 rm -f --
 +grep -l -R -I -Z -i "hp webcam" /tmp/vbusb/*.txt | xargs -0 rm -f --
 +
 +for usb in $(ls -m1 /tmp/vbusb/); do
 + usbdevice=$(echo $usb | cut -d"." -f1)
 + VBoxManage controlvm Windows7 usbattach "$usbdevice"
 +done
 +
 +test -d /tmp/vbusb && rm -rf /tmp/vbusb
 +</code>
 +
 +  chmod 755 /usr/local/bin/getusb.sh 
 +
 +  *Zeile mit usbehci ergänzen:
 +<code ini /vm/vb/Windows7/init.add.sh>
 +
 +VBoxManage --nologo modifyvm $MACHINE   --ostype "Windows7"
 +VBoxManage --nologo modifyvm $MACHINE   --nictype1 "82540EM" --audiocontroller hda
 +VBoxManage --nologo storagectl    $MACHINE --name C$MACHINE --add sata --controller IntelAHCI --hostiocache on
 +#VBoxManage --nologo sharedfolder add $MACHINE  --name media --hostpath /media --automount
 +
 +VBoxManage modifyvm $MACHINE --usb on --usbehci on
 +
 +# Standard-Modus
 +mtyp="immutable"
 +# Administrator-Modus
 +#mtyp="normal"
 +
 +VBoxManage --nologo storageattach $MACHINE --storagectl C$MACHINE --port 1 --device 0 \
 +      --type hdd --medium $MACHINEDIR/$MACHINE.vdi --mtype $mtyp
 +
 +#VBoxManage --nologo storageattach $MACHINE --storagectl C$MACHINE --port 1 --device 0 \
 +#      --type dvddrive --medium $MACHINEDIR/Windows7_AIO.iso
 +
 +VBoxManage --nologo storageattach $MACHINE --storagectl C$MACHINE --port 2 --device 0 \
 +       --type dvddrive --medium host:/dev/sr0  --passthrough on
 +
 +# Nach jeder Änderung:
 +# killall VirtualBox; vlinitvbox
 +</code>
 +
 +  *reboot
wartung20152016.1448802298.txt.gz · Zuletzt geändert: von admin