Ubuntu 17.04系Live版(Xubuntu 17.04, Ubuntu 17.04)でのPulseAudioネットワーククライアント環境の構築とxrdp用PulseAudioモジュールのビルドについて簡単に紹介致します。
$ sudo apt-get install paprefs |
$ pulseaudio --k ※pulseaudioの再起動コマンドです |
$ sudo apt-get install paprefs |
$ pulseaudio --k ※pulseaudioの再起動コマンドです |
$ sudo apt-get install xrdp |
$ sudo ifconfig enp5s0 192.168.0.17 netmask 255.255.255.0 $ sudo route add default gw 192.168.0.1 enp5s0 |
$ sudo hostname xu1704live |
#!/bin/bash sudo ifconfig enp5s0 192.168.0.17 netmask 255.255.255.0 sudo route add default gw 192.168.0.1 enp5s0 ifconfig enp5s0 sudo sh -c "echo 'xu1704live'>/etc/hostname" cat /etc/hostname sudo hostname xu1704live sudo sh -c "echo '192.168.0.17 xu1704live' >>/etc/hosts" cat /etc/hosts sudo apt-get install -y xrdp |
$ sudo /usr/bin/python3 /usr/bin/update-manager & |
$ sudo apt-get install tigervnc-standalone-server |
$ sudo apt-get install vlc |
$ sudo apt-get install remmina |
$ sudo apt-get install -y net-tools $ sudo apt-get install -y pavucontrol $ sudo apt-get install -y parole $ sudo apt-get install -y vlc $ sudo apt-get install -y paprefs |
$ sudo apt-get install -y gstreamer1.0-plugins-bad |
$ sudo apt-get install -y ubuntu-mate-desktop $ sudo apt-get install -y mate-desktop-environment $ sudo apt-get install -y mate-desktop-environment-extra $ sudo apt-get install -y xfce4* $ sudo apt-get install -y ibus-mozc $ sudo apt-get install -y openssh-server |
mate-session ※またはxfce4-session |
sudo sh -c "echo 'deb-src http://archive.ubuntu.com/ubuntu/ zesty main restricted universe'>>/etc/apt/sources.list" sudo sh -c "echo 'deb-src http://archive.ubuntu.com/ubuntu/ zesty-updates main restricted universe'>>/etc/apt/sources.list" |
... make[1]: ディレクトリ '/tmp/pulseaudio-10.0' から出ます dh_installdeb dh_gencontrol dh_md5sums dh_builddeb dpkg-deb: building package 'pulseaudio' in '../pulseaudio_10.0-1ubuntu2_amd64.deb'. dpkg-deb: building package 'pulseaudio-utils' in '../pulseaudio-utils_10.0-1ubuntu2_amd64.deb'. dpkg-deb: building package 'pulseaudio-esound-compat' in '../pulseaudio-esound-compat_10.0-1ubuntu2_amd64.deb'. dpkg-deb: building package 'pulseaudio-module-zeroconf' in '../pulseaudio-module-zeroconf_10.0-1ubuntu2_amd64.deb'. dpkg-deb: building package 'pulseaudio-module-jack' in '../pulseaudio-module-jack_10.0-1ubuntu2_amd64.deb'. dpkg-deb: building package 'pulseaudio-module-lirc' in '../pulseaudio-module-lirc_10.0-1ubuntu2_amd64.deb'. dpkg-deb: building package 'pulseaudio-module-gconf' in '../pulseaudio-module-gconf_10.0-1ubuntu2_amd64.deb'. dpkg-deb: building package 'pulseaudio-module-raop' in '../pulseaudio-module-raop_10.0-1ubuntu2_amd64.deb'. dpkg-deb: building package 'pulseaudio-module-droid' in '../pulseaudio-module-droid_10.0-1ubuntu2_amd64.deb'. dpkg-deb: building package 'pulseaudio-module-trust-store' in '../pulseaudio-module-trust-store_10.0-1ubuntu2_amd64.deb'. dpkg-deb: building package 'pulseaudio-module-bluetooth' in '../pulseaudio-module-bluetooth_10.0-1ubuntu2_amd64.deb'. dpkg-deb: building package 'pulseaudio-equalizer' in '../pulseaudio-equalizer_10.0-1ubuntu2_amd64.deb'. dpkg-deb: building package 'libpulse0' in '../libpulse0_10.0-1ubuntu2_amd64.deb'. dpkg-deb: building package 'libpulse-mainloop-glib0' in '../libpulse-mainloop-glib0_10.0-1ubuntu2_amd64.deb'. dpkg-deb: building package 'libpulse-dev' in '../libpulse-dev_10.0-1ubuntu2_amd64.deb'. dpkg-deb: building package 'libpulsedsp' in '../libpulsedsp_10.0-1ubuntu2_amd64.deb'. dpkg-genchanges --build=any,all >../pulseaudio_10.0-1ubuntu2_amd64.changes dpkg-genchanges: info: binary-only upload (no source code included) dpkg-source --after-build pulseaudio-10.0 dpkg-buildpackage: info: binary-only upload (no source included) |
cd sudo apt install -y git git clone --branch devel --recursive https://github.com/neutrinolabs/xrdp.git (git版にはconfigureファイルは存在しません) cd /home/ubuntu/xrdp/sesman/chansrv/pulse ※ここにはMakefile,module-xrdp-sink.c,module-xrdp-source.c,pulse-notes.txt,pulse-notes.ubuntu.txt等があります MakefileのCFLAGS変更 [変更前]
マンドで確認できます) sudo cp module-xrdp-sink.so module-xrdp-source.so /usr/lib/pulse-10.0/modules cd sudo systemctl restart xrdp git版モジュールではオーディオリダイレクトが正常動作せず。 |
cd mkdir aptsrc cd aptsrc apt-get source -y xrdp sudo apt-get build-dep -y xrdp ※これを省略すると後の「./configure」でエラーとなります cd ~/aptsrc/xrdp-0.9.1 ./configure ※後述のmakeで必要となるヘッダファイル(config_ac.h)等が動的に生成されます [表示内容の一部]
cd aptsrc/xrdp-0.9.1/sesman/chansrv/pulse ※ここにはMakefile,module-xrdp-sink.c,module-xrdp-source.c,pulse-notes.txt,pulse-notes.ubuntu.txt等があります Makefileの2行変更 (module-xrdp-sink.c中の#include [変更前]
sudo cp module-xrdp-sink.so module-xrdp-source.so /usr/lib/pulse-10.0/modules cd sudo systemctl restart xrdp apt-get source版モジュールではオーディオリダイレクトが正常に動作します。 |
cd cd aptsrc/xrdp-0.9.1/sesman/chansrv/pulse cp module-xrdp-sink.so /media/ubuntu/.../module-xrdp-sink.so.v10.0 cp module-xrdp-source.so /media/ubuntu/.../module-xrdp-source.so.v10.0 cd |
sudo cp /media/ubuntu/.../module-xrdp-sink.so.v10.0 /usr/lib/pulse-10.0/modules/module-xrdp-sink.so sudo cp /media/ubuntu/.../module-xrdp-source.so.v10.0 /usr/lib/pulse-10.0/modules/module-xrdp-source.so ※「sudo systemctl restart xrdp」の実行は不要です。 |
.nofail .fail load-module module-augment-properties load-module module-always-sink .ifexists module-xrdp-sink.so load-module module-xrdp-sink .endif .ifexists module-xrdp-source.so load-module module-xrdp-source .endif load-module module-native-protocol-unix |
sudo apt-get install -y freerdp-x11 |
sudo adduser rdpclient sudo gpasswd -a rdpclient sudo ※sudoグループへの追加 |
xfreerdp /bpp:24 /size:1152x864 /compression /sound:sys:pulse /audio-mode:0 /v:127.0.0.1 |
#!/bin/bash passwd ubuntu sudo passwd root sudo apt-get update sudo apt-get install -y xrdp sudo cp /media/ubuntu/.../module-xrdp-sink.so.v10.0 /usr/lib/pulse-10.0/modules/module-xrdp-sink.so sudo cp /media/ubuntu/.../module-xrdp-source.so.v10.0 /usr/lib/pulse-10.0/modules/module-xrdp-source.so sudo apt-get install -y tigervnc-standalone-server sudo apt-get install -y pavucontrol sudo apt-get install -y parole sudo apt-get install -y mplayer sudo apt-get install -y vlc sudo apt-get install -y xfce4* sudo apt-get install -y openssh-server sudo apt-get install -y net-tools sudo ifconfig enp5s0 192.168.0.170 netmask 255.255.255.0 sudo route add default gw 192.168.0.1 enp5s0 sudo sh -c "echo 'u1704live'>/etc/hostname" sudo hostname u1704live sudo sh -c "echo '192.168.0.170 u1704live'>>/etc/hosts" echo "xfce4-session">.xsession sudo cp .xsession /root/.xsession sudo sh -c "echo 'PermitRootLogin yes'>>/etc/ssh/sshd_config" sudo systemctl restart sshd mplayer --help>/dev/null #make .mplayer/config echo "lirc=no">>.mplayer/config |
/usr/bin/python3 /usr/bin/update-manager parole /media/ubuntu/.../mpgファイル |
gnome-screenshot -i & |
killall -u ユーザ名 systemctl restart xrdp sudo systemctl restart lightdm ※ubuntuユーザで自動ログインされます |
ps aux|grep -e "Xorg :" -e "Xvnc :"|grep ubuntu |
cp /usr/lib/pulse-9.0/modules/module-xrdp-sink.so /media/ubuntu/.../module-xrdp-sink.so.v9.0 cp /usr/lib/pulse-9.0/modules/module-xrdp-source.so /media/ubuntu/.../module-xrdp-source.so.v9.0 |
sudo cp /media/ubuntu/.../module-xrdp-sink.so.v9.0 /usr/lib/pulse-10.0/modules/module-xrdp-sink.so sudo cp /media/ubuntu/.../module-xrdp-source.so.v9.0 /usr/lib/pulse-10.0/modules/module-xrdp-source.so ※「sudo systemctl restart xrdp」の実行は不要です。 |
$ sudo apt-get install -y gstreamer1.0-plugins-bad |
$ sudo qemu-system-x86_64 -cpu core2duo -m 8192 -smp 1,sockets=2,maxcpus=2 -hda /tmp/qu1704.qcow2 -cdrom /tmp/ubuntu-ja-17.04-desktop-amd64.iso -boot order=d -k ja -net nic,model=ne2k_pci -net tap,ifname=tap0,script=/etc/myqemubr-ifup -soundhw ac97 |
sudo adduser qemuuser sudo gpasswd -a qemuuser sudo sudo adduser qemuuser2 sudo gpasswd -a qemuuser2 sudo sudo sh -c "echo 'greeter-show-manual-login=true'>>/etc/lightdm/lightdm.conf" ※「greeter-show-manual-login=true」はログイン画面でユーザ名入力テキストボックスを表示させる設定です。 sudo sh -c "echo 'greeter-hide-users=true'>>/etc/lightdm/lightdm.conf" ※「greeter-hide-users=true」はログイン画面にubuntu, root以外のログイン可能アカウントを表示させない設定であり必須ではありません。 sudo systemctl restart lightdm ※lightdmを再起動するとubuntuユーザで自動ログインされます |
export LANG=en_US.UTF8 ※コマンド実行メッセージ等の英文表示化 sudo systemctl restart lightdm |
#!/bin/bash passwd ubuntu sudo passwd root sudo apt-get update sudo apt-get install -y xrdp sudo cp module-xrdp-sink.so.v10.0 /usr/lib/pulse-10.0/modules/module-xrdp-sink.so sudo cp module-xrdp-source.so.v10.0 /usr/lib/pulse-10.0/modules/module-xrdp-source.so sudo apt-get install -y tigervnc-standalone-server sudo apt-get install -y pavucontrol sudo apt-get install -y parole sudo apt-get install -y mplayer sudo apt-get install -y vlc sudo apt-get install -y xfce4* sudo apt-get install -y openssh-server sudo apt-get install -y net-tools sudo ifconfig ens3 192.168.0.171 netmask 255.255.255.0 sudo route add default gw 192.168.0.1 ens3 sudo sh -c "echo 'qu1704live'>/etc/hostname" sudo hostname qu1704live sudo sh -c "echo '192.168.0.171 qu1704live'>>/etc/hosts" echo "xfce4-session">.xsession sudo cp .xsession /root/.xsession sudo sh -c "echo 'PermitRootLogin yes'>>/etc/ssh/sshd_config" sudo systemctl restart sshd mplayer --help>/dev/null #make .mplayer/config echo "lirc=no">>.mplayer/config /usr/bin/python3 /usr/bin/update-manager sudo apt-get install -y gstreamer1.0-plugins-bad |
ubuntu pulseaudio[10836]: [xrdp-sink] module-xrdp-sink.c: 1 block_usec 30000 ubuntu pulseaudio[10836]: message repeated 5 times: [ [xrdp-sink] module-xrdp-sink.c: 1 block_usec 30000] ubuntu pulseaudio[10836]: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: running ubuntu pulseaudio[10836]: [xrdp-sink] module-xrdp-sink.c: 1 block_usec 30000 ubuntu pulseaudio[10836]: [xrdp-sink] module-xrdp-sink.c: 1 block_usec 30000 ubuntu pulseaudio[10836]: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: not running ubuntu pulseaudio[10836]: [xrdp-sink] module-xrdp-sink.c: close_send: ubuntu pulseaudio[10836]: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: running ubuntu pulseaudio[10836]: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: not running ubuntu pulseaudio[10836]: [xrdp-sink] module-xrdp-sink.c: close_send: ubuntu pulseaudio[10836]: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: running ubuntu pulseaudio[10836]: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: not running ubuntu pulseaudio[10836]: [xrdp-sink] module-xrdp-sink.c: close_send: ubuntu pulseaudio[10836]: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: running |
cd mkdir xrdp-9.0 cd xrdp-9.0 apt-get source -y xrdp ※本コマンドはディレクトリを変えて何度でも実行できます sudo apt-get build-dep -y xrdp ※当然ですが本コマンドではsudoが必須で、「apt-get source -y xrdp」を実行する毎に本コマンドを実行する必要はありません ls lsコマンドの表示内容; xrdp-0.9.0~20160601+git703fedd xrdp_0.9.0~20160601+git703fedd-3.dsc xrdp_0.9.0~20160601+git703fedd-3.debian.tar.xz xrdp_0.9.0~20160601+git703fedd.orig.tar.xz |
sudo cp module-xrdp-sink.so module-xrdp-source.so /usr/lib/pulse-9.0/modules cd ※xrdpのrestartは不要です。 |
killall -u ubuntu |
cp /usr/lib/pulse-9.0/modules/module-xrdp-sink.so /media/ubuntu/.../module-xrdp-sink.so.v9.0 cp /usr/lib/pulse-9.0/modules/module-xrdp-source.so /media/ubuntu/.../module-xrdp-source.so.v9.0 尚、リブート後の/usr/lib/pulse-9.0/modulesへのモジュールコピーは以下の通りです。 sudo /media/ubuntu/.../module-xrdp-sink.so.v9.0 /usr/lib/pulse-9.0/modules/module-xrdp-sink.so sudo /media/ubuntu/.../module-xrdp-source.so.v9.0 /usr/lib/pulse-9.0/modules/module-xrdp-source.so |
xfreerdp /bpp:24 /size:1152x864 /compression /sound:sys:pulse /audio-mode:0 /v:u1610live |
#!/bin/bash echo "enter ubuntu password for ssh connection" passwd ubuntu echo "enter root password for GUI login and ssh connection" sudo passwd root sudo apt-get update sudo apt-get install -y openssh-server sudo sh -c "echo 'PermitRootLogin yes'>>/etc/ssh/sshd_config" sudo systemctl restart sshd sudo apt-get install -y qemu bridge-utils # sudo apt-get install -y net-tools sudo cp /etc/network/interfaces /etc/network/interfaces.back sudo sh -c "echo 'auto enp5s0'>>/etc/network/interfaces" sudo sh -c "echo 'iface enp5s0 inet manual'>>/etc/network/interfaces" sudo sh -c "echo 'iface br0 inet dhcp'>>/etc/network/interfaces" sudo sh -c "echo 'bridge_ports enp5s0'>>/etc/network/interfaces" sudo ifup br0 sudo ifconfig br0 192.168.0.161 netmask 255.255.255.0 sudo route add default gw 192.168.0.1 br0 sudo sh -c "echo 'u1610live'>/etc/hostname" sudo hostname u1610live sudo sh -c "echo '192.168.0.161 u1610live'>>/etc/hosts" echo '#!/bin/sh'>./myqemubr-ifup echo '/sbin/ifconfig $1 0.0.0.0 promisc up'>>./myqemubr-ifup echo '/sbin/brctl addif br0 $1'>>./myqemubr-ifup sudo cp ./myqemubr-ifup /etc/myqemubr-ifup sudo chmod 755 /etc/myqemubr-ifup sudo sh -c "echo 'greeter-show-manual-login=true'>>/etc/lightdm/lightdm.conf" sudo sh -c "echo 'greeter-hide-users=true'>>/etc/lightdm/lightdm.conf" echo "Now restart lightdm. Wait..." sleep 10s sudo systemctl restart lightdm # after while, ubuntu user auto login |
chmod 755 u1610livebr0-mini.sh ./u1610livebr0-mini.sh |
cp /media/ubuntu/.../ubuntu-ja-17.04-desktop-amd64.iso /tmp |
qemu-img create -f qcow2 /tmp/qu1704.qcow2 8G chmod 666 /tmp/qu1704.qcow2 |
cat /proc/meminfo |head -3[表示例] MemTotal: 16349928 kB MemFree: 165896 kB MemAvailable: 7098024 kB |
sudo qemu-system-x86_64 -cpu core2duo -m 8192 -smp 1,sockets=2,maxcpus=2 -hda /tmp/qu1704.qcow2 -cdrom /tmp/ubuntu-ja-17.04-desktop-amd64.iso -boot order=cd -k ja -net nic,model=ne2k_pci -net tap,ifname=tap0,script=/etc/myqemubr-ifup -soundhw ac97 |
sudo qemu-system-x86_64 -cpu core2duo -m 6144 -smp 1,sockets=2,maxcpus=2 -hda /tmp/qu1704.qcow2 -cdrom /tmp/ubuntu-ja-17.04-desktop-amd64.iso -boot order=cd -k ja -net nic,model=ne2k_pci -net tap,ifname=tap0,script=/etc/myqemubr-ifup -soundhw ac97 |
cp /tmp/qu1704.qcow2 /media/ubuntu/.../qu1704.qcow2.instdone |
sudo apt-get update [sudo] ubuntuのパスワード : ******** sudo apt-get openssh-server |
ssh ubuntu@QEMU仮想マシンの動的IPアドレス |
# interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback |
sudo sh -c "echo 'auto ens3'>>/etc/network/interfaces" sudo sh -c "echo 'iface ens3 inet static'>>/etc/network/interfaces" sudo sh -c "echo 'address 192.168.0.172'>>/etc/network/interfaces" sudo sh -c "echo 'network 192.168.0.0'>>/etc/network/interfaces" sudo sh -c "echo 'netmask 255.255.255.0'>>/etc/network/interfaces" sudo sh -c "echo 'broadcast 192.168.0.255'>>/etc/network/interfaces" sudo sh -c "echo 'gateway 192.168.0.1'>>/etc/network/interfaces" sudo sh -c "echo 'dns-nameservers DNSサーバアドレス'>>/etc/network/interfaces" |
sudo service networking restart |
#!/bin/bash echo "enter root password for GUI login and ssh connection" sudo passwd root sudo apt-get install -y xrdp sudo cp module-xrdp-sink.so.v10.0 /usr/lib/pulse-10.0/modules/module-xrdp-sink.so sudo cp module-xrdp-source.so.v10.0 /usr/lib/pulse-10.0/modules/module-xrdp-source.so sudo apt-get install -y tigervnc-standalone-server sudo apt-get install -y pavucontrol sudo apt-get install -y parole sudo apt-get install -y mplayer sudo apt-get install -y vlc # for Xvnc sudo apt-get install -y xfce4* sudo apt-get install -y net-tools echo "xfce4-session">.xsession sudo cp .xsession /root/.xsession sudo sh -c "echo 'PermitRootLogin yes'>>/etc/ssh/sshd_config" sudo systemctl restart sshd mplayer --help>/dev/null #make .mplayer/config echo "lirc=no">>.mplayer/config sudo apt-get install -y gstreamer1.0-plugins-bad |
ssh ubuntu@QEMU仮想マシンの静的IPアドレス(ここでは192.168.0.172) |
cp /tmp/qu1704.qcow2 /media/ubuntu/.../qu1704.qcow2.xrdpdone |
cp /media/ubuntu/.../qu1704.qcow2.xrdpdone /tmp/qu1704.qcow2 |
#!/bin/bash echo "enter ubuntu password for ssh connection" passwd ubuntu echo "enter root password for GUI login and ssh connection" sudo passwd root sudo apt-get update sudo apt-get install -y openssh-server sudo sh -c "echo 'PermitRootLogin yes'>>/etc/ssh/sshd_config" sudo systemctl restart sshd sudo apt-get install -y qemu bridge-utils sudo apt-get install -y net-tools #for Ubuntu 17.04 sudo cp /etc/network/interfaces /etc/network/interfaces.back sudo sh -c "echo 'auto enp5s0'>>/etc/network/interfaces" sudo sh -c "echo 'iface enp5s0 inet manual'>>/etc/network/interfaces" sudo sh -c "echo 'iface br0 inet dhcp'>>/etc/network/interfaces" sudo sh -c "echo 'bridge_ports enp5s0'>>/etc/network/interfaces" sudo ifup br0 sudo ifconfig br0 192.168.0.170 netmask 255.255.255.0 sudo route add default gw 192.168.0.1 br0 sudo sh -c "echo 'u1704live'>/etc/hostname" sudo hostname u1704live sudo sh -c "echo '192.168.0.170 u1704live'>>/etc/hosts" echo '#!/bin/sh'>./myqemubr-ifup echo '/sbin/ifconfig $1 0.0.0.0 promisc up'>>./myqemubr-ifup echo '/sbin/brctl addif br0 $1'>>./myqemubr-ifup sudo cp ./myqemubr-ifup /etc/myqemubr-ifup sudo chmod 755 /etc/myqemubr-ifup sudo sh -c "echo 'greeter-show-manual-login=true'>>/etc/lightdm/lightdm.conf" sudo sh -c "echo 'greeter-hide-users=true'>>/etc/lightdm/lightdm.conf" echo "Now restart lightdm. Wait..." sleep 10s sudo systemctl restart lightdm # after while, ubuntu user auto login |
chmod 755 u1704livebr0-mini.sh ./u1704livebr0-mini.sh |
#!/bin/bash echo "enter liveuser password for ssh connection" sudo passwd liveuser sudo dnf install -y gsi-openssh-server sudo systemctl start sshd sudo dnf install -y ftp # generate bridge 'br0' echo 'TYPE=Bridge'>./ifcfg-br0 echo 'BOOTPROTO=dhcp'>>./ifcfg-br0 echo 'NAME=br0'>>./ifcfg-br0 echo 'ONBOOT=yes'>>./ifcfg-br0 echo 'DEVICE=br0'>>./ifcfg-br0 # echo 'TYPE=Ethernet'>./ifcfg-enp5s0.forbr0 echo 'NAME=enp5s0'>>./ifcfg-enp5s0.forbr0 echo 'BOOTPROTO=none'>>./ifcfg-enp5s0.forbr0 echo 'BRIDGE=br0'>>./ifcfg-enp5s0.forbr0 echo 'ONBOOT=yes'>>./ifcfg-enp5s0.forbr0 echo 'DEVICE=enp5s0'>>./ifcfg-enp5s0.forbr0 # sudo cp ./ifcfg-br0 /etc/sysconfig/network-scripts/ifcfg-br0 sudo cp ./ifcfg-enp5s0.forbr0 /etc/sysconfig/network-scripts/ifcfg-enp5s0 sudo brctl addbr br0 sudo brctl addif br0 enp5s0 sudo ifconfig br0 192.168.0.220 netmask 255.255.255.0 sudo route add default gw 192.168.0.1 br0 sudo sh -c "echo 'allow br0'>>/etc/qemu/bridge.conf" # sudo sh -c "echo 'f22wkslive'>/etc/hostname" sudo hostname f22wkslive sudo sh -c "echo '192.168.0.220 f22wkslive'>>/etc/hosts" # echo '#!/bin/sh'>./myqemubr-ifup echo '/sbin/ifconfig $1 0.0.0.0 promisc up'>>./myqemubr-ifup echo '/usr/sbin/brctl addif br0 $1'>>./myqemubr-ifup sudo cp ./myqemubr-ifup /etc/myqemubr-ifup sudo chmod 755 /etc/myqemubr-ifup |
chmod 755 f22wkslivebr0-mini.sh ./f22wkslivebr0-mini.sh |
sudo qemu-system-x86_64 -cpu core2duo -m 6144 -smp 1,sockets=2,maxcpus=2 -hda /run/media/liveuser/.../qu1704.qcow2.f22wks -boot order=c -k ja -net nic,model=ne2k_pci -net tap,ifname=tap0,script=/etc/myqemubr-ifup -soundhw ac97 -vga cirrus |
xfreerdpの実行コマンド; xfreerdp /bpp:24 /size:1152x864 /compression /sound:sys:pulse /audio-mode:0 /v:qu1704 |
sudo apt-get install mate-desktop-environment sudo apt-get install mate-desktop-environment-extra cp .xsession .xsession.xfce4 echo "mate-session">.xsession.mate cp .xsession.mate .xsession |
sudo qemu-system-x86_64 -cpu core2duo -m 6144 -smp 1,sockets=2,maxcpus=2 -hda /tmp/qf22wks.qcow2 -cdrom /media/ubuntu/FE127BC9127B8585/f22wks_x64.iso -boot order=cd -k ja -net nic,model=ne2k_pci -net tap,ifname=tap0,script=/etc/myqemubr-ifup -soundhw ac97 -vga cirrus |
#!/bin/bash echo "enter liveuser password for ssh connection" sudo passwd liveuser sudo dnf install -y gsi-openssh-server sudo systemctl start sshd sudo ifconfig ens3 192.168.0.221 netmask 255.255.255.0 sudo route add default gw 192.168.0.1 ens3 sudo sh -c "echo 'qf22wkslive'>/etc/hostname" sudo hostname qf22wkslive sudo sh -c "echo '192.168.0.221 qf22wkslive'>>/etc/hosts" |
sudo systemctl restart gdm |
sudo apt-get install -y qemu bridge-utils sudo cp /etc/network/interfaces /etc/network/interfaces.back sudo sh -c "echo 'auto enp5s0'>>/etc/network/interfaces" sudo sh -c "echo 'iface enp5s0 inet manual'>>/etc/network/interfaces" sudo sh -c "echo 'iface br0 inet dhcp'>>/etc/network/interfaces" sudo sh -c "echo 'bridge_ports enp5s0'>>/etc/network/interfaces" sudo ifup br0 sudo ifconfig br0 192.168.0.173 netmask 255.255.255.0 sudo route add default gw 192.168.0.1 br0 |
sudo qemu-system-x86_64 -cpu core2duo -m 12288 -smp 1,sockets=2,maxcpus=2 -hda /tmp/qum1704.qcow2 -cdrom /media/ubuntu-mate/FE127BC9127B8585/ubuntu-mate-17.04-desktop-amd64.iso -boot order=cd -k ja -net nic,model=ne2k_pci -net tap,ifname=tap0,script=/etc/myqemubr-ifup -soundhw ac97 -vga cirrus -name "qum1704live:1st QEMU Layer" ※/tmp/qum1704.qcow2はダミーのQEMU仮想ディスクです。 |
sudo apt-get install -y qemu bridge-utils # sudo apt-get install -y net-tools # installed in default sudo cp /etc/network/interfaces /etc/network/interfaces.back sudo sh -c "echo 'auto ens3'>>/etc/network/interfaces" sudo sh -c "echo 'iface ens3 inet manual'>>/etc/network/interfaces" sudo sh -c "echo 'iface br0 inet dhcp'>>/etc/network/interfaces" sudo sh -c "echo 'bridge_ports ens3'>>/etc/network/interfaces" sudo ifup br0 sudo ifconfig br0 192.168.0.174 netmask 255.255.255.0 sudo route add default gw 192.168.0.1 br0 |
sudo service networking restart sudo ifconfig br0 192.168.0.174 netmask 255.255.255.0 |
sudo qemu-system-x86_64 -cpu core2duo -m 6144 -hda /tmp/q2um1704.qcow2 -cdrom /tmp/ubuntu-mate-17.04-desktop-amd64.iso -boot order=cd -k ja -net nic,model=ne2k_pci -net tap,ifname=tap0,script=/etc/myqemubr-ifup -soundhw ac97 -vga cirrus -name "q2um1704live:2nd QEMU Layer" ※/tmp/q2um1704.qcow2はダミーのQEMU仮想ディスクです。 |
sudo qemu-system-x86_64 -cpu core2duo -m 6144 -hda /tmp/q2u810.qcow2 -cdrom /tmp/ubuntu-ja-8.10-desktop-i386.iso order=cd -k ja -net nic,model=ne2k_pci -net tap,ifname=tap0,script=/etc/myqemubr-ifup -soundhw ac97 -vga cirrus -name "q2u810live:2nd QEMU Layer"
※/tmp/q2u810.qcow2はダミーのQEMU仮想ディスクです。 |
sudo qemu-system-x86_64 -cpu core2duo -m 512 -hda /media/ubuntu-mate/FE127BC9127B8585/q2u810sv.qcow2 -cdrom /media/ubuntu-mate/FE127BC9127B8585/ubuntu-8.10-server-amd64.iso -boot order=cd -k ja -net nic,model=ne2k_pci -net tap,ifname=tap1,script=/etc/myqemubr-ifup -soundhw ac97 -vga cirrus -name "qu810sv"
|
sudo qemu-system-x86_64 -cpu core2duo -m 4096 -hda /tmp/q2u810sv.qcow2 -boot order=c -k ja -net nic,model=ne2k_pci -net tap,ifname=tap1,script=/etc/myqemubr-ifup -soundhw ac97 -vga cirrus -name "q2u810sv:2nd QEMU Layer" |
auto eth1 iface eth1 inet dhcp |
sudo qemu-system-x86_64 -cpu core2duo -m 4096 -hda /tmp/q2u810sv.qcow2.test -boot order=c -k ja -net nic,macaddr=52:54:00:12:34:81,model=ne2k_pci -net tap,ifname=tap0,script=/etc/myqemubr-ifup -soundhw ac97 -vga cirrus -name "q2u810sv:2nd QEMU Layer" |
sudo ifconfig eth0 192.168.0.180 netmask 255.255.255.0 sudo route add default gw 192.168.0.1 eth0 |
sudo qemu-system-x86_64 -cpu core2duo -m 512 -hda /media/ubuntu-mate/FE127BC9127B8585/q2u810.qcow2 -cdrom /media/ubuntu-mate/FE127BC9127B8585/ubuntu-ja-8.10-desktop-i386.iso -boot order=cd -k ja -net nic,macaddr=52:54:00:12:34:82,model=ne2k_pci -net tap,ifname=tap1,script=/etc/myqemubr-ifup -soundhw ac97 -vga cirrus -name "qu810" |
sudo qemu-system-x86_64 -cpu core2duo -m 512 -hda /tmp/q2u810.qcow2 -boot order=c -k ja -net nic,macaddr=52:54:00:12:34:82,model=ne2k_pci -net tap,ifname=tap1,script=/etc/myqemubr-ifup -soundhw ac97 -vga cirrus -name "qu810:2nd QEMU Layer" |
sudo ifconfig eth0 192.168.0.181 netmask 255.255.255.0 sudo route add default gw 192.168.0.1 eth0 |
sudo apt-get install -y openssh-server sudo apt-get install -y tigervnc-standalone-server sudo apt-get install -y tigervnc-viewer vncpasswd ※VNCパスワードを設定します |
sudo qemu-system-x86_64 -cpu core2duo -m 4096 -hda /tmp/q2u810.qcow2 -boot order=c -k ja -net nic,macaddr=52:54:00:12:34:82,model=ne2k_pci -net tap,ifname=tap1,script=/etc/myqemubr-ifup -soundhw ac97 -vga cirrus -name "qu810:2nd QEMU Layer" -display vnc=:3 ※-display vnc=:3はポート5903で接続するためのVNCサーバ(vncserver)起動オプションです。 |
vncviewer :3 |
sudo qemu-system-x86_64 -cpu core2duo -m 4096 -hda /tmp/q2u810.qcow2 -boot order=c -k ja -net nic,macaddr=52:54:00:12:34:82,model=ne2k_pci -net tap,ifname=tap1,script=/etc/myqemubr-ifup -soundhw ac97 -vga cirrus -name "qu810:2nd QEMU Layer" -curses -virtioconsole stdio |
gedit pipe\|.txt & # make pipe|.txt file tar czvf pipe.tar.gz pipe\|.txt pipe.tar.gzをftpサーバへput |
ftpサーバからpipe.tar.gzをget tar zxvf pipe.tar.gz rm pipe.tar.gz |
ls piと打ってtabキーの補完機能で「pipe\|.txt」という文字列をコンソール表示させてパイプ"|"記号以外を消します。 |
echo "|" > mypipe.txt |
vi パイプ"|"記号を入力したいファイル mypipe.txt |
sudo qemu-system-x86_64 -cpu core2duo -m 6144 -hda /tmp/q2knoppix.qcow2 -cdrom /tmp/KNOPPIX_V3.6-SFS.iso -boot order=cd -k ja -net nic,model=ne2k_pci -net tap,ifname=tap0,script=/etc/myqemubr-ifup -soundhw ac97 -vga cirrus -name "q2knpxlive:2nd QEMU Layer" ※/tmp/q2knoppix.qcow2はダミーのQEMU仮想ディスクです。 ※KDE本体を含まないCDイメージ(KNOPPIX_V3.6-SFS.iso)のサイズは約20MBです。 |
sudo qemu-system-x86_64 -cpu core2duo -m 64 -hda /tmp/qemuw31-flat+cpqonoff.vmdk -boot order=c -k ja -net nic,macaddr=52:54:00:12:34:83,model=ne2k_isa -net tap,ifname=tap1,script=/etc/myqemubr-ifup -soundhw ac97 -vga std -name "qemuw31:2nd QEMU Layer" |
sudo qemu-system-x86_64 -cpu core2duo -m 512 -hda /media/ubuntu-mate/FE127BC9127B8585/qemuw31-flat+cpqonoff.vmdk -boot order=c -k ja -net nic,macaddr=52:54:00:12:34:57,model=ne2k_isa -net tap,ifname=tap31,script=/etc/myqemubr-ifup -soundhw ac97 -vga std -name "Windows 3.1:1st QEMU Layer" -display vnc=:3 ※サウンドデバイスの指定は不要でした。 |
sudo qemu-system-x86_64 -cpu core2duo -m 64 -hda /media/ubuntu-mate/FE127BC9127B8585/qemuw31-flat.vmdk -boot order=c -k ja -net nic,macaddr=52:54:00:12:34:58,model=ne2k_isa -net tap,ifname=tap31,script=/etc/myqemubr-ifup -vga std -name "Windows 3.1:1st QEMU Layer" ※サウンドデバイスの指定は省きました。 |
sudo apt-get update sudo apt-get install -y gnome-session sudo apt-get install -y plasma-desktop |
sudo systemctl restart ligtdm |
sudo apt-get install -y xrdp sudo cp module-xrdp-sink.so.v10.0 /usr/lib/pulse-10.0/modules/module-xrdp-sink.so sudo cp module-xrdp-source.so.v10.0 /usr/lib/pulse-10.0/modules/module-xrdp-source.so sudo apt-get install -y tigervnc-standalone-server |
sudo vi /etc/X11/Xwrapper.config [変更前] ... allowed_users=console [変更後] ... allowed_users=anybody |
export LANG=ja_JP.UTF8 gnome-session |