ラベル Ulauncher の投稿を表示しています。 すべての投稿を表示
ラベル Ulauncher の投稿を表示しています。 すべての投稿を表示

2020年2月14日金曜日

DockerでUlauncherとXfceデスクトップ環境とTigerVNCがインストールされたイメージ(Ubuntu18.04)を作成する

UlauncherはLinux用のランチャーアプリケーションです。

〇Ulauncherの画面
VNCクライアントから接続するときにパスワードにubuntuを指定します。

〇イメージのビルド
docker build --no-cache -t ub1804vncxfceulauncher .

Dockerfile
from ubuntu:18.04

ENV DEBIAN_FRONTEND=noninteractive
run apt-get update \
  && apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade \
  && apt-get install -y language-pack-ja-base language-pack-ja \
  && ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime \
  && echo 'Asia/Tokyo' > /etc/timezone \
  && locale-gen ja_JP.UTF-8 \
  && echo 'LC_ALL=ja_JP.UTF-8' > /etc/default/locale \
  && echo 'LANG=ja_JP.UTF-8' >> /etc/default/locale
env LANG=ja_JP.UTF-8 \
   LANGUAGE=ja_JP.UTF-8 \
   LC_ALL=ja_JP.UTF-8
run apt-get -y install \
      xubuntu-desktop \
      xfce4-terminal \
      tigervnc-standalone-server \
      expect \
      fcitx-mozc \
      fonts-ipafont-gothic \
      fonts-ipafont-mincho \
      vim \
      gvfs-bin \
      xdg-utils \
      python3-pyinotify \
      gir1.2-keybinder-3.0 \
      python3-distutils-extra \
      python3-levenshtein \
      python3-websocket \
  && wget https://github.com/Ulauncher/Ulauncher/releases/download/5.6.1/ulauncher_5.6.1_all.deb \
  && dpkg -i ulauncher_5.6.1_all.deb \
  && apt-get -y remove --purge light-locker blueman \
  && apt-get -y install gnome-screensaver \
  && im-config -n fcitx \
  && apt-get clean \
  && rm -rf /var/cache/apt/archives/* \
  && rm -rf /var/lib/apt/lists/* \
  && groupadd -g 1000 ubuntu \
  && useradd -d /home/ubuntu -m -s /bin/bash -u 1000 -g 1000 ubuntu \
  && echo 'ubuntu:ubuntu' | chpasswd \
  && echo "ubuntu ALL=NOPASSWD: ALL" >> /etc/sudoers \
  && echo 'spawn "tigervncpasswd"' >> /tmp/initpass \
  && echo 'expect "Password:"' >> /tmp/initpass \
  && echo 'send "ubuntu\\r"' >> /tmp/initpass \
  && echo 'expect "Verify:"' >> /tmp/initpass \
  && echo 'send "ubuntu\\r"' >> /tmp/initpass \
  && echo 'expect "Would you like to enter a view-only password (y/n)?"' >> /tmp/initpass \
  && echo 'send "n\\r"' >> /tmp/initpass \
  && echo 'expect eof' >> /tmp/initpass \
  && echo 'exit' >> /tmp/initpass \
  && sudo -u ubuntu -H /bin/bash -c '/usr/bin/expect /tmp/initpass' \
  && mkdir -p /home/ubuntu/.vnc \
  && chown ubuntu:ubuntu /home/ubuntu/.vnc \
  && echo '#!/bin/sh' >> /home/ubuntu/.vnc/xstartup \
  && echo 'export LANG=ja_JP.UTF-8' >> /home/ubuntu/.vnc/xstartup \
  && echo 'export LC_ALL=ja_JP.UTF-8' >> /home/ubuntu/.vnc/xstartup \
  && echo 'export XMODIFIERS=@im=fcitx' >> /home/ubuntu/.vnc/xstartup \
  && echo 'export GTK_IM_MODULE=fcitx' >> /home/ubuntu/.vnc/xstartup \
  && echo 'fcitx -r -d &' >> /home/ubuntu/.vnc/xstartup \
  && echo 'exec startxfce4' >> /home/ubuntu/.vnc/xstartup \
  && chmod +x /home/ubuntu/.vnc/xstartup \
  && mkdir -p /home/ubuntu/data \
  && chown -R ubuntu:ubuntu /home/ubuntu/data

expose 5901
volume ["/home/ubuntu/data"]
cmd /usr/bin/vncserver :1 -localhost no -geometry 1152x864 -alwaysshared -fg

〇コンテナの実行
docker run -it -v `pwd`:/home/ubuntu/data -p 5901:5901 -u ubuntu --privileged ub1804vncxfceulauncher

2019年10月22日火曜日

DockerでUlauncherとKDEデスクトップ環境とTigerVNCがインストールされたイメージ(Ubuntu18.04)を作成する

UlauncherはLinux用のランチャーアプリケーションです。

〇Ulauncherの画面

VNCクライアントから接続するときにパスワードにubuntuを指定します。

〇イメージのビルド
docker build --no-cache -t ub1804vnckdeulauncher .
Dockerfile
from ubuntu:18.04

ENV DEBIAN_FRONTEND=noninteractive
run apt-get update \
  && apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade \
  && apt-get install -y language-pack-ja-base language-pack-ja \
  && ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime \
  && echo 'Asia/Tokyo' > /etc/timezone \
  && locale-gen ja_JP.UTF-8 \
  && echo 'LC_ALL=ja_JP.UTF-8' > /etc/default/locale \
  && echo 'LANG=ja_JP.UTF-8' >> /etc/default/locale
env LANG=ja_JP.UTF-8 \
   LANGUAGE=ja_JP.UTF-8 \
   LC_ALL=ja_JP.UTF-8
run apt-get -y install \
      kubuntu-desktop \
      tigervnc-standalone-server \
      expect \
      fcitx-mozc \
      fonts-ipafont-gothic \
      fonts-ipafont-mincho \
      vim \
      gvfs-bin \
      xdg-utils \
      sudo \
      python-pyinotify \
      gir1.2-keybinder-3.0 \
      python-gi \
      python-dbus \
      python-levenshtein \
      python-pysqlite2 \
      python-websocket \
      python-xdg \
      gir1.2-webkit2-4.0 \
      gir1.2-appindicator3-0.1 \
  && wget https://github.com/Ulauncher/Ulauncher/releases/download/4.4.0.r1/ulauncher_4.4.0.r1_all.deb \
  && dpkg -i ulauncher_4.4.0.r1_all.deb \
  && apt-get -y remove --purge light-locker \
  && apt-get -y install gnome-screensaver \
  && im-config -n fcitx \
  && apt-get clean \
  && rm -rf /var/cache/apt/archives/* \
  && rm -rf /var/lib/apt/lists/* \
  && groupadd -g 1000 ubuntu \
  && useradd -d /home/ubuntu -m -s /bin/bash -u 1000 -g 1000 ubuntu \
  && echo 'ubuntu:ubuntu' | chpasswd \
  && echo "ubuntu ALL=NOPASSWD: ALL" >> /etc/sudoers \
  && echo 'spawn "tigervncpasswd"' >> /tmp/initpass \
  && echo 'expect "Password:"' >> /tmp/initpass \
  && echo 'send "ubuntu\\r"' >> /tmp/initpass \
  && echo 'expect "Verify:"' >> /tmp/initpass \
  && echo 'send "ubuntu\\r"' >> /tmp/initpass \
  && echo 'expect "Would you like to enter a view-only password (y/n)?"' >> /tmp/initpass \
  && echo 'send "n\\r"' >> /tmp/initpass \
  && echo 'expect eof' >> /tmp/initpass \
  && echo 'exit' >> /tmp/initpass \
  && sudo -u ubuntu -H /bin/bash -c '/usr/bin/expect /tmp/initpass' \
  && mkdir -p /home/ubuntu/.vnc \
  && chown ubuntu:ubuntu /home/ubuntu/.vnc \
  && echo '#!/bin/sh' >> /home/ubuntu/.vnc/xstartup \
  && echo 'export LANG=ja_JP.UTF-8' >> /home/ubuntu/.vnc/xstartup \
  && echo 'export LC_ALL=ja_JP.UTF-8' >> /home/ubuntu/.vnc/xstartup \
  && echo 'export XMODIFIERS=@im=fcitx' >> /home/ubuntu/.vnc/xstartup \
  && echo 'export GTK_IM_MODULE=fcitx' >> /home/ubuntu/.vnc/xstartup \
  && echo 'fcitx -r -d &' >> /home/ubuntu/.vnc/xstartup \
  && echo 'exec startkde' >> /home/ubuntu/.vnc/xstartup \
  && chmod +x /home/ubuntu/.vnc/xstartup \
  && mkdir -p /home/ubuntu/data \
  && chown -R ubuntu:ubuntu /home/ubuntu/data

expose 5901
volume ["/home/ubuntu/data"]
cmd /usr/bin/vncserver :1 -localhost no -geometry 1152x864 -alwaysshared -fg

〇コンテナの実行
docker run -it -v `pwd`:/home/ubuntu/data -p 5901:5901 -u ubuntu --privileged ub1804vnckdeulauncher


○関連情報
・Ulauncherに関する他の記事はこちらを参照してください。

2019年8月10日土曜日

VagrantでUlauncher、Xfce Desktop環境、XRDPがインストールされた仮想マシン(CentOS7.6)を構築する

UlauncherはLinux用のランチャーアプリケーションです。

〇Ulauncherの画面


〇構築方法
以下のVagrantfileを使用して、Ulauncher、Xfce Desktop環境、XRDPをインストールした仮想マシン(CentOS7.6)を構築できます。
XRDPがインストールされているので、Windowsのリモートデスクトップで接続することができます。ユーザ名はvagrant、パスワードもvagrantでログオンできます。

Vagrantfile
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "bento/centos-7.6"
  config.vm.hostname = "co76xfceulauncher"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "co76xfceulauncher"
     vbox.gui = true
     vbox.cpus = 2
     vbox.memory = 2048
     vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
  end
config.vm.network "public_network", ip: "192.168.1.103", :netmask => "255.255.255.0"
  config.vm.provision "shell", inline: <<-SHELL
localectl set-locale LANG=ja_JP.UTF-8
yum install -y epel-release
yum check-update
yum -y update
timedatectl set-timezone Asia/Tokyo

yum -y install vlgothic-*  ipa-*-fonts unzip epel-release
yum -y groupinstall yum groupinstall "X Window System"  Xfce "Input Methods"
yum -y install xrdp

cat << EOF >> /home/vagrant/.Xclients
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
ibus-daemon -drx
exec /usr/bin/xfce4-session
EOF
chmod +x /home/vagrant/.Xclients
chown vagrant:vagrant /home/vagrant/.Xclients

# hide dialogs
sudo sh -c "echo 'X-GNOME-Autostart-enabled=false' >> /etc/xdg/autostart/gnome-welcome-tour.desktop"
sudo sh -c "echo 'X-GNOME-Autostart-enabled=false' >> /etc/xdg/autostart/gnome-software-service.desktop"
sudo sh -c "echo 'X-GNOME-Autostart-enabled=false' >> /etc/xdg/autostart/gnome-settings-daemon.desktop"
sudo systemctl disable initial-setup-graphical.service
sudo systemctl disable initial-setup-text.service

systemctl set-default graphical.target

systemctl enable xrdp.service
systemctl start xrdp.service

# install Ulauncher
yum -y install libappindicator-gtk3 python-Levenshtein python-inotify python-websocket-client python2-pyxdg
wget https://github.com/Ulauncher/Ulauncher/releases/download/4.3.2.r8/ulauncher_4.3.2.r8_centos7.rpm
rpm -i ulauncher_4.3.2.r8_centos7.rpm

telinit 5
SHELL
end

関連情報

DockerでDebian 11(Bullseye)のXfceデスクトップ環境にリモートデスクトップで接続できるコンテナを作成する

・Ulauncherに関する他の記事はこちらを参照してください。

2019年8月9日金曜日

DockerでUlauncherとMATEデスクトップ環境とTigerVNCがインストールされたイメージ(Ubuntu18.04)を作成する

UlauncherはLinux用のランチャーアプリケーションです。

〇Ulauncherの画面

VNCクライアントから接続するときにパスワードにubuntuを指定します。

〇イメージのビルド
docker build --no-cache -t ub1804vncmateulauncher .

Dockerfile
from ubuntu:18.04

ENV DEBIAN_FRONTEND=noninteractive
run apt-get update \
  && apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade \
  && apt-get install -y language-pack-ja-base language-pack-ja \
  && ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime \
  && echo 'Asia/Tokyo' > /etc/timezone \
  && locale-gen ja_JP.UTF-8 \
  && echo 'LC_ALL=ja_JP.UTF-8' > /etc/default/locale \
  && echo 'LANG=ja_JP.UTF-8' >> /etc/default/locale
env LANG=ja_JP.UTF-8 \
   LANGUAGE=ja_JP.UTF-8 \
   LC_ALL=ja_JP.UTF-8
run apt-get -y install \
      ubuntu-mate-desktop \
      tigervnc-standalone-server \
      expect \
      fcitx-mozc \
      fonts-ipafont-gothic \
      fonts-ipafont-mincho \
      vim \
      gvfs-bin \
      xdg-utils \
      python-pyinotify \
      gir1.2-keybinder-3.0 \
      python-gi \
      python-dbus \
      python-levenshtein \
      python-pysqlite2 \
      python-websocket \
      python-xdg \
  && wget https://github.com/Ulauncher/Ulauncher/releases/download/4.3.2.r8/ulauncher_4.3.2.r8_all.deb \
  && dpkg -i ulauncher_4.3.2.r8_all.deb \
  && apt-get -y remove --purge light-locker blueman \
  && apt-get -y install gnome-screensaver \
  && im-config -n fcitx \
  && apt-get clean \
  && rm -rf /var/cache/apt/archives/* \
  && rm -rf /var/lib/apt/lists/* \
  && groupadd -g 1000 ubuntu \
  && useradd -d /home/ubuntu -m -s /bin/bash -u 1000 -g 1000 ubuntu \
  && echo 'ubuntu:ubuntu' | chpasswd \
  && echo "ubuntu ALL=NOPASSWD: ALL" >> /etc/sudoers \
  && echo 'spawn "tigervncpasswd"' >> /tmp/initpass \
  && echo 'expect "Password:"' >> /tmp/initpass \
  && echo 'send "ubuntu\\r"' >> /tmp/initpass \
  && echo 'expect "Verify:"' >> /tmp/initpass \
  && echo 'send "ubuntu\\r"' >> /tmp/initpass \
  && echo 'expect "Would you like to enter a view-only password (y/n)?"' >> /tmp/initpass \
  && echo 'send "n\\r"' >> /tmp/initpass \
  && echo 'expect eof' >> /tmp/initpass \
  && echo 'exit' >> /tmp/initpass \
  && sudo -u ubuntu -H /bin/bash -c '/usr/bin/expect /tmp/initpass' \
  && mkdir -p /home/ubuntu/.vnc \
  && chown ubuntu:ubuntu /home/ubuntu/.vnc \
  && echo '#!/bin/sh' >> /home/ubuntu/.vnc/xstartup \
  && echo 'export LANG=ja_JP.UTF-8' >> /home/ubuntu/.vnc/xstartup \
  && echo 'export LC_ALL=ja_JP.UTF-8' >> /home/ubuntu/.vnc/xstartup \
  && echo 'export XMODIFIERS=@im=fcitx' >> /home/ubuntu/.vnc/xstartup \
  && echo 'export GTK_IM_MODULE=fcitx' >> /home/ubuntu/.vnc/xstartup \
  && echo 'fcitx -r -d &' >> /home/ubuntu/.vnc/xstartup \
  && echo 'exec mate-session' >> /home/ubuntu/.vnc/xstartup \
  && chmod +x /home/ubuntu/.vnc/xstartup \
  && mkdir -p /home/ubuntu/data \
  && chown -R ubuntu:ubuntu /home/ubuntu/data

expose 5901
volume ["/home/ubuntu/data"]
cmd /usr/bin/vncserver :1 -localhost no -geometry 1152x864 -alwaysshared -fg

〇コンテナの実行
docker run -it -v `pwd`:/home/ubuntu/data -p 5901:5901 -u ubuntu --privileged ub1804vncmateulauncher


○関連情報
・Ulauncherに関する他の記事はこちらを参照してください。

2019年7月31日水曜日

DockerでUlauncherとXfceデスクトップ環境がインストールされたイメージ(Ubuntu18.04)を作成する

UlauncherはLinux用のランチャーアプリケーションです。

〇Ulauncherの画面

Remote Desktop Clientから接続するときにユーザ名/パスワードにubuntu/ubuntuを指定します。

〇イメージのビルド
docker build -t ub1804xfceulauncher .

Dockerfile
from ubuntu:18.04

ENV DEBIAN_FRONTEND=noninteractive
run apt-get update \
  && apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade \
  && apt-get install -y language-pack-ja-base language-pack-ja \
  && ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime \
  && echo 'Asia/Tokyo' > /etc/timezone \
  && locale-gen ja_JP.UTF-8 \
  && echo 'LC_ALL=ja_JP.UTF-8' > /etc/default/locale \
  && echo 'LANG=ja_JP.UTF-8' >> /etc/default/locale
env LANG=ja_JP.UTF-8 \
   LANGUAGE=ja_JP.UTF-8 \
   LC_ALL=ja_JP.UTF-8
run apt-get -y install \
      xubuntu-desktop \
      xrdp=0.9.5-2 \
      fcitx-mozc \
      fonts-ipafont-gothic \
      fonts-ipafont-mincho \
      vim \
      gvfs-bin \
      xdg-utils \
      python-pyinotify \
      gir1.2-keybinder-3.0 python-gi \
      python-dbus \
      python-levenshtein \
      python-pysqlite2 \
      python-websocket \
      python-xdg \
  && wget https://github.com/Ulauncher/Ulauncher/releases/download/4.3.2.r8/ulauncher_4.3.2.r8_all.deb \
  && dpkg -i ulauncher_4.3.2.r8_all.deb \
  && im-config -n fcitx \
  && apt-get clean \
  && rm -rf /var/cache/apt/archives/* \
  && rm -rf /var/lib/apt/lists/* \
  && groupadd -g 1000 ubuntu \
  && useradd -d /home/ubuntu -m -s /bin/bash -u 1000 -g 1000 ubuntu \
  && echo 'ubuntu:ubuntu' | chpasswd \
  && echo "ubuntu ALL=NOPASSWD: ALL" >> /etc/sudoers \
  && echo 'sed -i -e "s/^EnabledIMList.*$/EnabledIMList=fcitx-keyboard-jp:True,mozc:True,fcitx-keyboard-us:False/" /home/ubuntu/.config/fcitx/profile' >> /home/ubuntu/.xsessionrc \
  && chown ubuntu:ubuntu /home/ubuntu/.xsessionrc \
  && echo 'xfce4-session' >> /home/ubuntu/.xsession \
  && mkdir /home/ubuntu/data \
  && chown -R ubuntu:ubuntu /home/ubuntu/data \
  && echo '#!/bin/bash' > /start.sh \
  && echo 'export GTK_IM_MODULE=fcitx' > /start.sh \
  && echo 'export QT_IM_MODULE=fcitx' >> /start.sh \
  && echo 'export XMODIFIERS="@im=fcitx"' >> /start.sh \
  && echo 'startxfce4' >> /start.sh \
  && echo 'sudo /etc/init.d/xrdp start' >> /start.sh \
  && echo 'sudo /etc/init.d/dbus start' >> /start.sh \
  && echo 'fcitx -r -d &' >> /start.sh \
  && echo '/bin/bash' >> /start.sh \
  && chmod +x /start.sh

expose 3389
volume ["/home/ubuntu/data"]
cmd /start.sh

〇コンテナの実行
docker run -it -v `pwd`:/home/ubuntu/work -p 3389:3389 -u ubuntu --privileged ub1804xfceulauncher


○関連情報
・Ulauncherに関する他の記事はこちらを参照してください。

2019年7月6日土曜日

VagrantでUlauncher、Xfce Desktop環境、XRDPがインストールされた仮想マシン(Ubuntu18.04)を構築する

UlauncherはLinux用のランチャーアプリケーションです。

〇Ulauncherの画面


〇構築方法
以下のVagrantfileを使用して、Ulauncher、Xfce Desktop環境、XRDPをインストールした仮想マシン(Ubuntu18.04)を構築できます。
XRDPがインストールされているので、Windowsのリモートデスクトップで接続することができます。ユーザ名はvagrant、パスワードもvagrantでログオンできます。

Vagrantfile
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "bento/ubuntu-18.04"
  config.vm.hostname = "ub1804xfceulauncher"
config.vm.network :public_network, ip:"192.168.1.109"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "ub1804xfceulauncher"
     vbox.gui = true
     vbox.cpus = 2
     vbox.memory = 2048
  end
  config.vm.provision "shell", inline: <<-SHELL
apt-get update
export DEBIAN_FRONTEND=noninteractive
apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
apt-get -y install language-pack-ja
localectl set-locale LANG=ja_JP.UTF-8
localectl set-keymap jp106
apt-get update
apt-get -y install xrdp=0.9.5-2 fcitx-mozc xubuntu-desktop
im-config -n fcitx

apt-get -y install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04
apt-get -y install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11

sed -i -e "s/allowed_users=console/allowed_users=anybody/" /etc/X11/Xwrapper.config

echo "xfce4-session" > /home/vagrant/.xsession
apt-get -y purge light-locker

# install Ulauncher
apt-get -y install python-pyinotify gir1.2-keybinder-3.0 python-gi python-dbus python-levenshtein python-pysqlite2 python-websocket python-xdg
wget https://github.com/Ulauncher/Ulauncher/releases/download/4.3.2.r8/ulauncher_4.3.2.r8_all.deb
dpkg -i ulauncher_4.3.2.r8_all.deb

init 5
SHELL
end


○関連情報
・Ulauncherに関する他の記事はこちらを参照してください。

2019年6月29日土曜日

VagrantでUlauncher、Cinnamon Desktop環境、XRDPがインストールされた仮想マシン(Debian Stretch/9.6)を構築する

UlauncherはLinux用のランチャーアプリケーションです。

〇Ulauncherの画面


〇構築方法
以下のVagrantfileを使用して、Ulauncher、Cinnamon Desktop環境、XRDPをインストールした仮想マシン(Debian Stretch/9.6)を構築できます。
XRDPがインストールされているので、Windowsのリモートデスクトップで接続することができます。ユーザ名はvagrant、パスワードもvagrantでログオンできます。

Vagrantfile
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "bento/debian-9.6"
  config.vm.hostname = "db96cinnamonulauncher"
config.vm.network "public_network", ip:"192.168.1.107", :netmask => "255.255.255.0"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "db96cinnamonulauncher"
     vbox.gui = true
     vbox.cpus = 2
     vbox.memory = 2048
  end
  config.vm.provision "shell", inline: <<-SHELL
apt-get update
export DEBIAN_FRONTEND=noninteractive
apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
apt-get -y install task-japanese gawk
sed -i -e 's/# ja_JP.UTF-8 UTF-8/ja_JP.UTF-8 UTF-8/' /etc/locale.gen
locale-gen
update-locale LANG=ja_JP.UTF-8
localectl set-locale LANG=ja_JP.UTF-8
localectl set-keymap jp106
apt-get update
cat << EOF > /etc/default/keyboard
XKBMODEL="pc106"
XKBLAYOUT="jp"
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess"
EOF
cat << EOF > /home/vagrant/.xsessionrc
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
sed -i -e "s/^EnabledIMList.*$/EnabledIMList=fcitx-keyboard-jp:True,mozc:True,fcitx-keyboard-us:False/" /home/vagrant/.config/fcitx/profile
fcitx-remote -r
fcitx -r -d
EOF
chown vagrant:vagrant .xsessionrc
apt-get -y install  xrdp fcitx-mozc task-cinnamon-desktop tigervnc-standalone-server

apt-get -y install build-essential module-assistant dkms
wget http://download.virtualbox.org/virtualbox/5.2.22/VBoxGuestAdditions_5.2.22.iso
mount -o loop -t iso9660 VBoxGuestAdditions_5.2.22.iso /media/
/media/VBoxLinuxAdditions.run

im-config -n fcitx
sudo -u vagrant bash -i -c "export DISPLAY=:0.0 && fcitx -r"
cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.org
cat /etc/xrdp/xrdp.ini.org | gawk '/\\[Globals\\]/,/\\[Xorg\\]/' | sed -e 's/\\[Xorg\\]//' > /etc/xrdp/xrdp.ini
cat << EOF >> /etc/xrdp/xrdp.ini
[Xvnc]
name=Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1
EOF
systemctl restart xrdp
systemctl enable xrdp

# install Ulauncher
apt-get -y install libappindicator3-1 libdbusmenu-glib4 libdbusmenu-gtk3-4 libindicator3-7 gir1.2-appindicator3-0.1 python-levenshtein python-pysqlite2 python-websocket python-xdg python-pyinotify libkeybinder-3.0-0 gir1.2-keybinder-3.0 gir1.2-webkit2-4.0 python-gi python-dbus
wget https://github.com/Ulauncher/Ulauncher/releases/download/4.3.2.r8/ulauncher_4.3.2.r8_all.deb
dpkg -i ulauncher_4.3.2.r8_all.deb

init 5
SHELL
end


○関連情報
・Ulauncherに関する他の記事はこちらを参照してください。

2019年6月18日火曜日

VagrantでUlauncher、Xfce Desktop環境、TigerVNCがインストールされた仮想マシン(Ubuntu18.04)を構築する

UlauncherはLinux用のランチャーアプリケーションです。

〇Ulauncherの画面

TigerVNCがインストールされているので、VNCクライアントで接続することができます。VNCパスワードはvagrantでログオンできます。

〇構築方法
以下のVagrantfileを使用して、Ulauncher、Xfce Desktop環境、TigerVNCをインストールした仮想マシン(Ubuntu18.04)を構築できます。

Vagrantfile
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "bento/ubuntu-18.04"
  config.vm.hostname = "ub1804vncxfceulauncher"
  config.vm.network :public_network, ip:"192.168.1.108"
  config.vm.network "private_network", ip: "192.168.55.108", :netmask => "255.255.255.0"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "ub1804vncxfceulauncher"
     vbox.gui = true
     vbox.cpus = 2
     vbox.memory = 4096
  end
  config.vm.provision "shell", inline: <<-SHELL
apt-get update
export DEBIAN_FRONTEND=noninteractive
apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
apt-get -y install language-pack-ja fonts-ipafont-*
localectl set-locale LANG=ja_JP.UTF-8
localectl set-keymap jp106
apt-get update
apt-get -y install fcitx-mozc xubuntu-desktop language-pack-ja tigervnc-standalone-server expect
apt-get -y purge light-locker
im-config -n fcitx


# set passwd for vnc
cat << EOC > /tmp/initpass.sh
/usr/bin/expect << EOF
spawn "tigervncpasswd"
expect "Password:"
send "vagrant\\r"
expect "Verify:"
send "vagrant\\r"
expect "Would you like to enter a view-only password (y/n)?"
send "n\\r"
expect eof
exit
EOF
EOC
chmod +x /tmp/initpass.sh
sudo -u vagrant -H /bin/bash -c "/tmp/initpass.sh"


mkdir -p /home/vagrant/.vnc
chown vagrant:vagrant /home/vagrant/.vnc
cat << EOF > /home/vagrant/.vnc/xstartup
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec startxfce4
EOF
chmod +x /home/vagrant/.vnc/xstartup

cat << EOF > /etc/systemd/system/vncserver@.service
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target

[Service]
Type=simple
User=vagrant
PAMName=login
PIDFile=/home/%u/.vnc/%H%i.pid
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill :%i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver :%i -localhost no -geometry 1152x864 -alwaysshared -fg
ExecStop=/usr/bin/vncserver -kill :%i

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl start vncserver@1.service
sudo systemctl enable vncserver@1.service

# install Ulauncher
apt-get -y install python-pyinotify gir1.2-keybinder-3.0 python-gi python-dbus python-levenshtein python-pysqlite2 python-websocket python-xdg
wget https://github.com/Ulauncher/Ulauncher/releases/download/4.3.2.r8/ulauncher_4.3.2.r8_all.deb
dpkg -i ulauncher_4.3.2.r8_all.deb

init 5
SHELL
end


○関連情報
・Ulauncherに関する他の記事はこちらを参照してください。

2019年6月6日木曜日

VagrantでUlauncher、KDE Desktop環境、XRDPがインストールされた仮想マシン(Debian Stretch/9.6)を構築する

UlauncherはLinux用のランチャーアプリケーションです。

〇Ulauncherの画面


〇構築方法
以下のVagrantfileを使用して、Ulauncher、KDE Desktop環境、XRDPをインストールした仮想マシン(Debian Stretch/9.6)を構築できます。
XRDPがインストールされているので、Windowsのリモートデスクトップで接続することができます。ユーザ名はvagrant、パスワードもvagrantでログオンできます。

Vagrantfile
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "bento/debian-9.6"
  config.vm.hostname = "db96kdeulauncher"
config.vm.network "public_network", ip:"192.168.1.109", :netmask => "255.255.255.0"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "db96kdeulauncher"
     vbox.gui = true
     vbox.cpus = 2
     vbox.memory = 2048
  end
  config.vm.provision "shell", inline: <<-SHELL
apt-get update
export DEBIAN_FRONTEND=noninteractive
apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade

apt-get -y install task-japanese gawk
sed -i -e 's/# ja_JP.UTF-8 UTF-8/ja_JP.UTF-8 UTF-8/' /etc/locale.gen
locale-gen
update-locale LANG=ja_JP.UTF-8
localectl set-locale LANG=ja_JP.UTF-8
localectl set-keymap jp106
apt-get update
cat << EOF > /etc/default/keyboard
XKBMODEL="pc106"
XKBLAYOUT="jp"
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess"
EOF


cat << EOF > /home/vagrant/.xsessionrc
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
sed -i -e "s/^EnabledIMList.*$/EnabledIMList=mozc:True,fcitx-keyboard-jp:False,fcitx-keyboard-us:False/" /home/vagrant/.config/fcitx/profile
fcitx-remote -r
fcitx -r -d
EOF
chown vagrant:vagrant .xsessionrc

apt-get -y install  xrdp fcitx-mozc task-kde-desktop tigervnc-standalone-server fcitx-tools

apt-get -y install build-essential module-assistant dkms
wget http://download.virtualbox.org/virtualbox/5.2.6/VBoxGuestAdditions_5.2.6.iso
mount -o loop -t iso9660 VBoxGuestAdditions_5.2.6.iso /media/
/media/VBoxLinuxAdditions.run

export DISPLAY=:0.0
im-config -n fcitx

cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.org
cat /etc/xrdp/xrdp.ini.org | awk '/\\[Globals\\]/,/\\[Xorg\\]/' | sed -e 's/\\[Xorg\\]//' > /etc/xrdp/xrdp.ini
cat << EOF >> /etc/xrdp/xrdp.ini
[Xvnc]
name=Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1
EOF
systemctl restart xrdp
systemctl enable xrdp

# install Ulauncher
apt-get -y install libappindicator3-1 libdbusmenu-glib4 libdbusmenu-gtk3-4 libindicator3-7 gir1.2-appindicator3-0.1 python-levenshtein python-pysqlite2 python-websocket python-xdg python-pyinotify libkeybinder-3.0-0 gir1.2-keybinder-3.0 gir1.2-webkit2-4.0 python-gi python-dbus
wget https://github.com/Ulauncher/Ulauncher/releases/download/4.3.2.r8/ulauncher_4.3.2.r8_all.deb
dpkg -i ulauncher_4.3.2.r8_all.deb

init 5
SHELL
end


○関連情報
・Ulauncherに関する他の記事はこちらを参照してください。

2019年5月26日日曜日

VagrantでUlauncher、LXDE Desktop環境、XRDPがインストールされた仮想マシン(Debian Stretch/9.6)を構築する

UlauncherはLinux用のランチャーアプリケーションです。

〇Ulauncherの画面


〇構築方法
以下のVagrantfileを使用して、Ulauncher、Xfce Desktop環境、XRDPをインストールした仮想マシン(Debian Stretch/9.6)を構築できます。
XRDPがインストールされているので、Windowsのリモートデスクトップで接続することができます。ユーザ名はvagrant、パスワードもvagrantでログオンできます。

Vagrantfile
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "bento/debian-9.6"
  config.vm.hostname = "db96lxdeulauncher"
config.vm.network "public_network", ip:"192.168.1.103", :netmask => "255.255.255.0"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "db96lxdeulauncher"
     vbox.gui = true
     vbox.cpus = 2
     vbox.memory = 2048
  end
  config.vm.provision "shell", inline: <<-SHELL
apt-get update
export DEBIAN_FRONTEND=noninteractive
apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade

apt-get -y install task-japanese gawk
sed -i -e 's/# ja_JP.UTF-8 UTF-8/ja_JP.UTF-8 UTF-8/' /etc/locale.gen
locale-gen
update-locale LANG=ja_JP.UTF-8
localectl set-locale LANG=ja_JP.UTF-8
localectl set-keymap jp106
apt-get update
cat << EOF > /etc/default/keyboard
XKBMODEL="pc106"
XKBLAYOUT="jp"
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess"
EOF


cat << EOF > /home/vagrant/.xsession
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
sed -i -e "s/^EnabledIMList.*$/EnabledIMList=fcitx-keyboard-jp:True,mozc:True,fcitx-keyboard-us:False/" /home/vagrant/.config/fcitx/profile
fcitx-remote -r
fcitx -r -d
lxsession -s LXDE -e LXDE
EOF
chown vagrant:vagrant .xsession


apt-get -y install  xrdp fcitx-mozc task-lxde-desktop tigervnc-standalone-server fcitx-tools


apt-get -y install build-essential module-assistant dkms
wget http://download.virtualbox.org/virtualbox/5.2.22/VBoxGuestAdditions_5.2.22.iso
mount -o loop -t iso9660 VBoxGuestAdditions_5.2.22.iso /media/
/media/VBoxLinuxAdditions.run


export DISPLAY=:0.0
im-config -n fcitx
sudo -u vagrant bash -i -c "export DISPLAY=:0.0 && fcitx -r"


cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.org
cat /etc/xrdp/xrdp.ini.org | awk '/\\[Globals\\]/,/\\[Xorg\\]/' | sed -e 's/\\[Xorg\\]//' > /etc/xrdp/xrdp.ini
cat << EOF >> /etc/xrdp/xrdp.ini
[Xvnc]
name=Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1
EOF
systemctl restart xrdp
systemctl enable xrdp

# install Ulauncher
apt-get -y install libappindicator3-1 libdbusmenu-glib4 libdbusmenu-gtk3-4 libindicator3-7 gir1.2-appindicator3-0.1 python-levenshtein python-pysqlite2 python-websocket python-xdg python-pyinotify libkeybinder-3.0-0 gir1.2-keybinder-3.0 gir1.2-webkit2-4.0
wget https://github.com/Ulauncher/Ulauncher/releases/download/4.3.2.r8/ulauncher_4.3.2.r8_all.deb
dpkg -i ulauncher_4.3.2.r8_all.deb

init 5
SHELL
end


○関連情報
・Ulauncherに関する他の記事はこちらを参照してください。

2019年4月26日金曜日

VagrantでUlauncher、Xfce Desktop環境、XRDPがインストールされた仮想マシン(Debian Stretch/9.6)を構築する

UlauncherはLinux用のランチャーアプリケーションです。

〇Ulauncherの画面


〇構築方法
以下のVagrantfileを使用して、Ulauncher、Xfce Desktop環境、XRDPをインストールした仮想マシン(Debian Stretch/9.6)を構築できます。
XRDPがインストールされているので、Windowsのリモートデスクトップで接続することができます。ユーザ名はvagrant、パスワードもvagrantでログオンできます。

Vagrantfile
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "bento/debian-9.6"
  config.vm.hostname = "db96xfceulauncher"
config.vm.network "public_network", ip:"192.168.1.109", :netmask => "255.255.255.0"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "db96xfceulauncher"
     vbox.gui = true
     vbox.cpus = 2
     vbox.memory = 2048
  end
  config.vm.provision "shell", inline: <<-SHELL
apt-get update
export DEBIAN_FRONTEND=noninteractive
apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
apt-get -y install task-japanese gawk
sed -i -e 's/# ja_JP.UTF-8 UTF-8/ja_JP.UTF-8 UTF-8/' /etc/locale.gen
locale-gen
update-locale LANG=ja_JP.UTF-8
localectl set-locale LANG=ja_JP.UTF-8
localectl set-keymap jp106
apt-get update
cat << EOF > /etc/default/keyboard
XKBMODEL="pc106"
XKBLAYOUT="jp"
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess"
EOF

cat << EOF > /home/vagrant/.xsessionrc
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
sed -i -e "s/^EnabledIMList.*$/EnabledIMList=fcitx-keyboard-jp:True,mozc:True,fcitx-keyboard-us:False/" /home/vagrant/.config/fcitx/profile
fcitx-remote -r
fcitx -r -d
#startxfce4 &
EOF
chown vagrant:vagrant .xsessionrc

apt-get -y install  xrdp fcitx-mozc task-xfce-desktop tigervnc-standalone-server
im-config -n fcitx
sudo -u vagrant bash -i -c "export DISPLAY=:0.0 && fcitx -r"

cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.org
cat /etc/xrdp/xrdp.ini.org | gawk '/\\[Globals\\]/,/\\[Xorg\\]/' | sed -e 's/\\[Xorg\\]//' > /etc/xrdp/xrdp.ini
cat << EOF >> /etc/xrdp/xrdp.ini
[Xvnc]
name=Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1
EOF
systemctl restart xrdp
systemctl enable xrdp

# install Ulauncher
apt-get -y install libappindicator3-1 libdbusmenu-glib4 libdbusmenu-gtk3-4 libindicator3-7 gir1.2-appindicator3-0.1 python-levenshtein python-pysqlite2 python-websocket python-xdg
wget https://github.com/Ulauncher/Ulauncher/releases/download/4.3.2.r8/ulauncher_4.3.2.r8_all.deb
dpkg -i ulauncher_4.3.2.r8_all.deb

init 5
SHELL
end


○関連情報
・Ulauncherに関する他の記事はこちらを参照してください。