T&T

From PeerFreedom Wiki
Jump to navigation Jump to search

To have persistent installed application in VMs, you must install package application on root image

- example: my 'work' VM have connected root image filesystem with 'debian-9', so finally i have and use old 'debian-9'

Some points:
- 'sudo' tool don't use password's !!
- before, prepare list with packages who you want to install, because to working the program from package in system you must poweroff vm with root filesystem and restart the your VMs (in example 'work' VM). With this you save much time.
1. start the VM with root filesystem from dom0 console (eg. gnome-terminal, 'Terminal emulator', ...)
# qvm-start debian-9
# qvm-run debian-9 gnome-terminal
2. on opened terminal add required package's
$ echo Y | sudo apt-get install file [...]
3. poweroff the VM with root image to have consist filesystem
4. Restart your 'work' VM and after this you should have new programs 
  • copy file vm -> dom0
qvm-run --pass-io work 'cat /home/user/Downloads/install66.iso' > /home/ko/install66.iso
  • copy file vm <- dom0
cat /home/ko/install66.iso | qvm-run --pass-io work 'cat > /home/user/install66.iso'
  • Network vmA <=> vmB

- on sys-firewall add this lines to /rw/config/rc.local

iptables -I FORWARD -s 10.137.0.A -d 10.137.0.B -j ACCEPT
iptables -I FORWARD -s 10.137.0.B -d 10.137.0.A -j ACCEPT

- on vmA add this lines to /rw/config/rc.local

iptables -I INPUT -s 10.137.0.B -j ACCEPT

- on vmB add this lines to /rw/config/rc.local

iptables -I INPUT -s 10.137.0.A -j ACCEPT
  • Use other (config) file than original in vm

- copy your new config file with name eg. etc-tor-torrc to /rw/config/ and adjust it to your environment
- add to /rw/config/rc.local

rm -rf /etc/tor/torrc
ln -s /rw/config/etc-tor-torrc /etc/tor/torrc

- restart vm (and make sure as the content with ls -l /etc/tor/torrc and cat /etc/tor/torrc is properly)

  • setup ccache in vm

- create file /rw/config/set_ccache.sh with content

#!/bin/sh
ln -s `which ccache` /usr/local/bin/gcc
ln -s `which ccache` /usr/local/bin/g++
ln -s `which ccache` /usr/local/bin/cc
ln -s `which ccache` /usr/local/bin/c++

- change to execute attrib

chmod 0700 /rw/config/set_ccache.sh

- add to /rw/config/rc.local

/rw/config/set_ccache.sh
  • when VM start to much time, eg. in example when system check consist FS (probably qubes daemons do not have connected link to 'qrexec-agent' process) - likely on HVM VMs (like Windows, BSD, ...) - set more timeout [in seconds]
qvm-prefs work qrexec_timeout 300
  • to connect to the WiFi on the Phone

- start the terminal in sys-net

qvm-run sys-net gnome-terminal

- check the networks around your hardware

nmcli c wifi rescan
nmcli c wifi list

- write the command

nmcli d wifi connect "wifi_on_telephone" password "pAssW0rd"

or when network exists on the list (nmcli c)

nmcli c up "wifi_on_telephone"

- if you Intel(R) WiFi card don't work, install the package firmware-iwlwifi

  • if you want microphone on VM, execute this in terminal
sudo dbus-send --system --type=signal / org.qubesos.Audio string:"RecAllowed"

on dom0 in concole enter

qvm-device mic attach --verbose [VMName] dom0:mic

and on the same dom0 in pavucontrol : 1. goto tab 'Configuration' -> in option Built-in Audio select profile Analog Stereo Duplex 2. goto tab 'Input Devices' -> in option Built-in Audio Analog Stero select port Internal Microphone (or someelse what you want) -> unset 'Mute Audio' (icon with crossed speaker on the right side option bar; after this in example on laptop x230 orange diode with microphone status extinguish) 3. goto tab 'Recording' -> scroll to bar with your VM name -> on the right select 'Built-in Audio Analog Stereo' and unset 'Mute audio' icon 4. check the microphone have correctly settings (eg. in Skype(R)) 5. IF NOT , install alsa-utils package on root domain filesystem (eg. Debian-9) and, after restart, run alsamixer, next press F5 (All devices) and GROW UP ALL SLIDES (must be PulseAudio or OSS/ALSA)

  • if you dont see icons in program with GTK engine, probably update the icon cache like that
for i in `find /usr/share/icons -maxdepth 1`; do echo $i && sudo gtk-update-icon-cache $i; done