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

2022年7月11日月曜日

AlmaLinux 9にFreeplaneをインストールする

Freeplaneでマインドマップを作成する事ができます。

〇Freeplaneの画面

インストール方法

以下のコマンドを実行します。
sudo dnf install -y java-11-openjdk

cd /opt

sudo wget 'https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_bin-1.10.3.zip'

sudo unzip freeplane_bin-1.10.3.zip

sudo mv /opt/freeplane-1.10.3 /opt/freeplane

cat << EOF | sudo tee /usr/share/applications/freeplane.desktop
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/freeplane/freeplane.sh
Name=Freeplane
Icon=/opt/freeplane/freeplane.png
EOF

関連情報

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

2022年6月4日土曜日

Ubuntu 22.04にFreeplaneをインストールする

Freeplaneでマインドマップを作成する事ができます。

〇Freeplaneの画面

Ubuntu Softwareによるインストール方法

1. Ubuntu Softwareを起動して、freeplaneを検索します。

2.Freeplaneのインストールボタンをクリックします

コマンドによるインストール方法

以下のコマンドを実行します。
sudo apt-get update

sudo apt-get -y install freeplane

関連情報

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

2021年12月15日水曜日

Raspberry Pi OS(Raspbian Bullseye)にFreeplane1.9.11をインストールする

Freeplaneでマインドマップを作成する事ができます。

〇Freeplaneの画面

インストール方法

以下のコマンドを実行します。
sudo apt-get -y install default-jdk

cd /opt

sudo wget 'https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_bin-1.9.11.zip'

sudo unzip freeplane_bin-1.9.11.zip

sudo mv /opt/freeplane-1.9.11 /opt/freeplane

cat << EOF | sudo tee /usr/share/applications/freeplane.desktop
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/freeplane/freeplane.sh
Name=Freeplane
Icon=/opt/freeplane/freeplane.png
Categories=Office;
EOF

関連情報

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

2021年10月10日日曜日

Debian 11(Bullseye)にFreeplane1.9.7をインストールする

Freeplaneでマインドマップを作成する事ができます。

〇Freeplaneの画面

インストール方法

以下のコマンドを実行します。
sudo apt-get -y install openjdk-11-jdk

cd /opt

sudo wget 'https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_bin-1.9.7.zip'

sudo unzip freeplane_bin-1.9.7.zip

sudo mv /opt/freeplane-1.9.7 /opt/freeplane

cat << EOF | sudo tee /usr/share/applications/freeplane.desktop
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/freeplane/freeplane.sh
Name=Freeplane
Icon=/opt/freeplane/freeplane.png
EOF

関連情報

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

2021年7月7日水曜日

Rocky Linux 8.4にFreeplaneをインストールする

Freeplaneでマインドマップを作成する事ができます。

〇Freeplaneの画面

インストール手順

以下のコマンドを実行します。
sudo dnf install -y java-11-openjdk

cd /opt

sudo wget 'https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_bin-1.9.4.zip'

sudo unzip freeplane_bin-1.9.4.zip

sudo mv /opt/freeplane-1.9.4 /opt/freeplane

cat << EOF | sudo tee /usr/share/applications/freeplane.desktop
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/freeplane/freeplane.sh
Name=Freeplane
Icon=/opt/freeplane/freeplane.png
EOF

関連情報

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

2021年5月5日水曜日

AlmaLinux8.3にFreeplaneをインストールする

Freeplaneでマインドマップを作成する事ができます。

〇Freeplaneの画面

インストール手順

以下のコマンドを実行します。
sudo dnf install -y java-11-openjdk

cd /opt

sudo wget 'https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_bin-1.8.11.zip'

sudo unzip freeplane_bin-1.8.11.zip

sudo mv /opt/freeplane-1.8.11 /opt/freeplane

cat << EOF | sudo tee /usr/share/applications/freeplane.desktop
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/freeplane/freeplane.sh
Name=Freeplane
Icon=/opt/freeplane/freeplane.png
EOF

関連情報

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

2020年12月27日日曜日

CentOS8-StreamにFreeplaneをインストールする

Freeplaneでマインドマップを作成する事ができます。

〇Freeplaneの画面

インストール手順

以下のコマンドを実行します。
sudo dnf remove -y java-1.8.0-openjdk-headless

sudo dnf install -y java-11-openjdk

cd /opt

sudo wget 'https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_bin-1.8.10.zip'

sudo unzip freeplane_bin-1.8.10.zip

sudo mv /opt/freeplane-1.8.10 /opt/freeplane

cat << EOF | sudo tee /usr/share/applications/freeplane.desktop
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/freeplane/freeplane.sh
Name=Freeplane
Icon=/opt/freeplane/freeplane.png
EOF

関連情報

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

2020年12月13日日曜日

DockerでFreeplaneとXfce、TigerVNCがインストールされたコンテナ(Ubuntu20.04)を作成する

Freeplaneでマインドマップを作成する事ができます。DockerでFreeplaneがインストール済みのXfceデスクトップ環境を構築し、VNCクライアントで接続することができます。

〇Freeplaneの画面
TigerVNCがインストールされているので、VNCクライアントで接続することができます。VNCパスワードはubuntuです。

イメージのビルド

以下のコマンドを実行してイメージをビルドします。
docker build --no-cache -t ub2004vncxfcefreeplane .

Dockerfile
from ubuntu:20.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 \
      openjdk-11-jdk \
  && cd /opt \
  && wget 'https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_bin-1.8.10.zip' \
  && apt-get -y install unzip \
  && unzip freeplane_bin-1.8.10.zip \
  && echo '[Desktop Entry]' >> /usr/share/applications/freeplane.desktop \
  && echo 'Version=1.0' >> /usr/share/applications/freeplane.desktop \
  && echo 'Type=Application' >> /usr/share/applications/freeplane.desktop \
  && echo 'Terminal=false' >> /usr/share/applications/freeplane.desktop \
  && echo 'Exec=/opt/freeplane-1.8.10/freeplane.sh' >> /usr/share/applications/freeplane.desktop \
  && echo 'Name=Freeplane' >> /usr/share/applications/freeplane.desktop \
  && echo 'Categories=Development;' >> /usr/share/applications/freeplane.desktop \
  && echo 'Icon=/opt/freeplane-1.8.10/freeplane.svg' >> /usr/share/applications/freeplane.desktop \
  && 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 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 ub2004vncxfcefreeplane

関連情報

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

2020年6月8日月曜日

CentOS8.1にFreeplaneをインストールする

Freeplaneでマインドマップを作成する事ができます。

〇Freeplaneの画面

インストール手順

以下のコマンドを実行します。
sudo dnf install -y java-11-openjdk

cd /opt

sudo wget 'https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_bin-1.8.1.zip'

sudo unzip freeplane_bin-1.8.1.zip

sudo mv /opt/freeplane-1.8.1 /opt/freeplane

cat << EOF | sudo tee /usr/share/applications/freeplane.desktop
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/freeplane/freeplane.sh
Name=Freeplane
Icon=/opt/freeplane/freeplane.png
EOF

関連情報

・Freeplaneに関する他の情報はこちらを参照してください。

2020年4月27日月曜日

Ubuntu Desktop 20.04にFreeplane1.8.2をインストールする

Freeplaneでマインドマップを作成する事ができます。

〇Freeplaneの画面


インストール方法

以下のコマンドを実行します。
sudo apt-get update

sudo apt-get -y install openjdk-11-jdk

cd /opt

sudo wget 'https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_bin-1.8.2.zip'

sudo unzip freeplane_bin-1.8.2.zip

sudo mv /opt/freeplane-1.8.2 /opt/freeplane

cat << EOF | sudo tee /usr/share/applications/freeplane.desktop
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/freeplane/freeplane.sh
Name=Freeplane
Icon=/opt/freeplane/freeplane.png
EOF

関連情報

・Freeplaneに関する他の情報はこちらを参照してください。

2020年4月12日日曜日

Debian 10(Buster)にFreeplane1.8.1をインストールする

Freeplaneでマインドマップを作成する事ができます。

〇Freeplaneの画面

インストール方法

以下のコマンドを実行します。
sudo apt-get -y install openjdk-11-jdk

cd /opt
sudo wget 'https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_bin-1.8.1.zip'
sudo unzip freeplane_bin-1.8.1.zip
sudo mv /opt/freeplane-1.8.1 /opt/freeplane

cat << EOF | sudo tee /usr/share/applications/freeplane.desktop
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/freeplane/freeplane.sh
Name=Freeplane
Icon=/opt/freeplane/freeplane.png
EOF

関連情報

・Freeplaneに関する他の情報はこちらを参照してください。

2020年4月4日土曜日

VagrantでFreeplane1.8.0とOpenJDK11、Gnome Desktop環境、XRDPがインストールされた仮想マシン(CentOS 8.1)を構築する

Freeplaneでマインドマップを作成する事ができます。

〇Freeplaneの画面
XRDPがインストールされているので、Windowsのリモートデスクトップで接続することができます。ユーザ名はvagrant、パスワードもvagrantでログオンできます。

仮想マシン構築方法

以下のVagrantfileを使用して、Freeplane1.8.0とOpenJDK11、Gnome Desktop環境、XRDPをインストールした仮想マシン(CentOS 8.1)を構築できます。

Vagrantfile
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "bento/centos-8.1"
  config.vm.hostname = "co81gnomefreeplane"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "co81gnomefreeplane"
     vbox.gui = true
     vbox.cpus = 2
     vbox.memory = 4096
     vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
  end
config.vm.network "public_network", ip: "192.168.1.107", :netmask => "255.255.255.0"
  config.vm.provision "shell", inline: <<-SHELL
#localedef -i /usr/share/i18n/locales/ja_JP -f UTF-8 /usr/lib/locale/ja_JP.UTF-8
dnf -y install langpacks-ja
localectl set-locale LANG=ja_JP.UTF-8
dnf install -y epel-release
dnf check-update
dnf -y update
timedatectl set-timezone Asia/Tokyo

dnf -y groupinstall "Server with GUI" "Input Methods"
dnf -y install xrdp ibus-mozc

# hide dialogs
sudo sh -c "echo 'X-GNOME-Autostart-enabled=false' >> /etc/xdg/autostart/gnome-welcome-tour.desktop"

systemctl set-default graphical.target

systemctl enable xrdp.service
systemctl start xrdp.service

# install openjdk
dnf install -y java-11-openjdk

# install Freeplane
cd /opt
wget 'https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_bin-1.8.0.zip'
unzip freeplane_bin-1.8.0.zip
mv /opt/freeplane-1.8.0 /opt/freeplane

cat << EOF > /usr/share/applications/freeplane.desktop
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/freeplane/freeplane.sh
Name=Freeplane
Icon=/opt/freeplane/freeplane.png
EOF


telinit 5
SHELL
end

関連情報

・Freeplaneに関する他の情報はこちらを参照してください。

2020年2月2日日曜日

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

Freeplaneでマインドマップを作成する事ができます。

〇Freeplaneの画面

イメージのビルド

docker build --no-cache -t ub180vncfreeplane1711 .

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 \
  && cd /opt \
  && wget 'https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u242b08.tar.gz' \
  && tar xvfz OpenJDK8U-jdk_x64_linux_hotspot_8u242b08.tar.gz \
  && echo 'export JAVA_HOME=/opt/jdk8u242-b08' >> /etc/profile.d/jdk.sh \
  && echo 'export PATH=\\$PATH:\\$JAVA_HOME/bin' >> /etc/profile.d/jdk.sh \
  && update-alternatives --install /usr/bin/java java /opt/jdk8u242-b08/bin/java 2000 \
  && update-alternatives --install /usr/bin/javac javac /opt/jdk8u242-b08/bin/javac 2000 \
  && wget 'https://https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_bin-1.7.11.zip' \
  && apt-get -y install unzip \
  && unzip freeplane_bin-1.7.11.zip \
  && echo '[Desktop Entry]' >> /usr/share/applications/freeplane.desktop \
  && echo 'Version=1.0' >> /usr/share/applications/freeplane.desktop \
  && echo 'Type=Application' >> /usr/share/applications/freeplane.desktop \
  && echo 'Terminal=false' >> /usr/share/applications/freeplane.desktop \
  && echo 'Exec=/opt/freeplane-1.7.11/freeplane.sh' >> /usr/share/applications/freeplane.desktop \
  && echo 'Name=Freeplane' >> /usr/share/applications/freeplane.desktop \
  && echo 'Categories=Development;' >> /usr/share/applications/freeplane.desktop \
  && echo 'Icon=/opt/freeplane-1.7.11/freeplane.svg' >> /usr/share/applications/freeplane.desktop \
  && 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 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 ub180vncfreeplane1711

関連情報

・Freeplaneに関する他の情報はこちらを参照してください。

2019年10月4日金曜日

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

Freeplaneでマインドマップを作成する事ができます。

〇Freeplaneの画面

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

イメージのビルド

docker build --no-cache -t ub1804vnckdefreeplane .

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 \
      fonts-vlgothic \
  && cd /opt \
  && wget https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz \
  && tar xvfz OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz \
  && echo 'export JAVA_HOME=/opt/jdk-11.0.3+7' >> /etc/profile.d/jdk.sh \
  && echo 'export PATH=\\$PATH:\\$JAVA_HOME/bin' >> /etc/profile.d/jdk.sh \
  && update-alternatives --install /usr/bin/java java /opt/jdk-11.0.3+7/bin/java 2000 \
  && update-alternatives --install /usr/bin/javac javac /opt/jdk-11.0.3+7/bin/javac 2000 \
  && wget 'https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_bin-1.7.9.zip' \
  && apt-get -y install unzip \
  && unzip freeplane_bin-1.7.9.zip \
  && echo '[Desktop Entry]' >> /usr/share/applications/freeplane.desktop \
  && echo 'Version=1.0' >> /usr/share/applications/freeplane.desktop \
  && echo 'Type=Application' >> /usr/share/applications/freeplane.desktop \
  && echo 'Terminal=false' >> /usr/share/applications/freeplane.desktop \
  && echo 'Exec=/opt/freeplane-1.7.9/freeplane.sh' >> /usr/share/applications/freeplane.desktop \
  && echo 'Name=Freeplane' >> /usr/share/applications/freeplane.desktop \
  && echo 'Categories=Development;' >> /usr/share/applications/freeplane.desktop \
  && echo 'Icon=/opt/freeplane-1.7.9/freeplane.svg' >> /usr/share/applications/freeplane.desktop \
  && 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 ub1804vnckdefreeplane


関連情報

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

2019年8月28日水曜日

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

Freeplaneでマインドマップを作成する事ができます。

〇Freeplaneの画面


仮想マシン構築方法

以下のVagrantfileを使用して、Freeplane1.7.7とAdoptOpenJDK11、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 = "ub1804xfcefreeplane177"
config.vm.network :public_network, ip:"192.168.1.108"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "ub1804xfcefreeplane177"
     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 fonts-ipafont-*
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 AdoptOpenJDK11
cd /opt
wget https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz
tar xvfz OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz
cat << EOF > /etc/profile.d/jdk.sh
export JAVA_HOME=/opt/jdk-11.0.3+7
export PATH=\\$PATH:\\$JAVA_HOME/bin
EOF

# install Freeplance
wget 'https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_bin-1.7.7.zip'
apt-get -y install unzip
unzip freeplane_bin-1.7.7.zip
cat << EOF > /usr/share/applications/freeplane.desktop
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/freeplane-1.7.7/freeplane.sh
Name=Freeplane
Categories=Development;
Icon=/opt/freeplane-1.7.7/freeplane.svg
EOF

init 5
SHELL
end

関連情報

・Freeplaneに関する他の情報はこちらを参照してください。

・プロジェクトWebサイト
https://www.freeplane.org/wiki/index.php/Home

2019年8月21日水曜日

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

Freeplaneでマインドマップを作成する事ができます。

〇Freeplaneの画面


仮想マシン構築方法

以下のVagrantfileを使用して、Freeplane1.7.7とAdoptOpenJDK11、Cinnamon Desktop環境、XRDPをインストールした仮想マシンを構築できます。
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 = "db96cinnamonfreeplane"
config.vm.network "public_network", ip:"192.168.1.107", :netmask => "255.255.255.0"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "db96cinnamonfreeplane"
     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 AdoptOpenJDK11
cd /opt
wget https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz
tar xvfz OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz
cat << EOF > /etc/profile.d/jdk.sh
export JAVA_HOME=/opt/jdk-11.0.3+7
export PATH=\\$PATH:\\$JAVA_HOME/bin
EOF

# install Freeplance
wget 'https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_bin-1.7.7.zip' 
apt-get -y install unzip
unzip freeplane_bin-1.7.7.zip
cat << EOF > /usr/share/applications/freeplane.desktop
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=bash -c "source /etc/profile.d/jdk.sh && /opt/freeplane-1.7.7/freeplane.sh"
Name=Freeplane
Categories=Development;
Icon=/opt/freeplane-1.7.7/freeplane.svg 
EOF

init 5
SHELL
end

参考情報

・Freeplaneに関する他の情報はこちらを参照してください。

・プロジェクトWebサイト
https://www.freeplane.org/wiki/index.php/Home

2019年8月2日金曜日

VagrantでFreeplane1.7.7とAdoptOpenJDK11、Gnome Desktop環境、XRDPがインストールされた仮想マシン(Debian Stretch/9.5)を構築する

Freeplaneでマインドマップを作成する事ができます。

〇Freeplaneの画面


仮想マシン構築方法

以下のVagrantfileを使用して、Freeplane1.7.7とAdoptOpenJDK11、Gnome Desktop環境、XRDPをインストールした仮想マシンを構築できます。
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 = "db96gnomefreeplane"
config.vm.network "public_network", ip:"192.168.1.104", :netmask => "255.255.255.0"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "db96gnomefreeplane"
     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
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/.xprofile
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 .xprofile
apt-get -y install  xrdp fcitx-mozc task-gnome-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

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 | 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 AdoptOpenJDK11
cd /opt
wget https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz
tar xvfz OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz
cat << EOF > /etc/profile.d/jdk.sh
export JAVA_HOME=/opt/jdk-11.0.3+7
export PATH=\\$PATH:\\$JAVA_HOME/bin
EOF

# install Freeplance
wget 'https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_bin-1.7.7.zip' 
apt-get -y install unzip
unzip freeplane_bin-1.7.7.zip
cat << EOF > /usr/share/applications/freeplane.desktop
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/freeplane-1.7.7/freeplane.sh
Name=Freeplane
Categories=Development;
Icon=/opt/freeplane-1.7.7/freeplane.svg 
EOF

init 5
SHELL
end

関連情報

・Freeplaneに関する他の情報はこちらを参照してください。

・プロジェクトWebサイト
https://www.freeplane.org/wiki/index.php/Home

2019年7月23日火曜日

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

Freeplaneでマインドマップを作成する事ができます。

〇Freeplaneの画面


仮想マシン構築方法

以下のVagrantfileを使用して、Freeplane1.7.7とAdoptOpenJDK11、KDE Desktop環境、XRDPをインストールした仮想マシンを構築できます。
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 = "db96kdefreeplane"
config.vm.network "public_network", ip:"192.168.1.108", :netmask => "255.255.255.0"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "db96kdefreeplane"
     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 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 AdoptOpenJDK11
cd /opt
wget https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz
tar xvfz OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz
cat << EOF > /etc/profile.d/jdk.sh
export JAVA_HOME=/opt/jdk-11.0.3+7
export PATH=\\$PATH:\\$JAVA_HOME/bin
EOF

# install Freeplance
wget 'https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_bin-1.7.7.zip' 
apt-get -y install unzip
unzip freeplane_bin-1.7.7.zip
cat << EOF > /usr/share/applications/freeplane.desktop
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/freeplane-1.7.7/freeplane.sh
Name=Freeplane
Categories=Development;
Icon=/opt/freeplane-1.7.7/freeplane.svg 
EOF


init 5
SHELL
end

関連情報

・Freeplaneに関する他の情報はこちらを参照してください。

・プロジェクトWebサイト
https://www.freeplane.org/wiki/index.php/Home

2019年7月16日火曜日

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

Freeplaneでマインドマップを作成する事ができます。

〇Freeplaneの画面


仮想マシン構築方法

以下のVagrantfileを使用して、Freeplane1.7.7とAdoptOpenJDK11、LXDE Desktop環境、XRDPをインストールした仮想マシンを構築できます。
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 = "db96lxdefreeplane"
config.vm.network "public_network", ip:"192.168.1.103", :netmask => "255.255.255.0"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "db96lxdefreeplane"
     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 AdoptOpenJDK11
cd /opt
wget https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz
tar xvfz OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz
cat << EOF > /etc/profile.d/jdk.sh
export JAVA_HOME=/opt/jdk-11.0.3+7
export PATH=\\$PATH:\\$JAVA_HOME/bin
EOF

# install Freeplance
wget 'https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_bin-1.7.7.zip'
apt-get -y install unzip
unzip freeplane_bin-1.7.7.zip
cat << EOF > /usr/share/applications/freeplane.desktop
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/freeplane-1.7.7/freeplane.sh
Name=Freeplane
Categories=Development;
Icon=/opt/freeplane-1.7.7/freeplane.svg
EOF

init 5
SHELL
end

関連情報

・Freeplaneに関する他の情報はこちらを参照してください。

・プロジェクトWebサイト
https://www.freeplane.org/wiki/index.php/Home

2019年7月10日水曜日

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

Freeplaneでマインドマップを作成する事ができます。

○Freeplaneの画面

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

イメージのビルド

docker build --no-cache -t ub1804vncmatefreeplane .

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 \
      fonts-vlgothic \
  && cd /opt \
  && wget https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz \
  && tar xvfz OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz \
  && echo 'export JAVA_HOME=/opt/jdk-11.0.3+7' >> /etc/profile.d/jdk.sh \
  && echo 'export PATH=\\$PATH:\\$JAVA_HOME/bin' >> /etc/profile.d/jdk.sh \
  && update-alternatives --install /usr/bin/java java /opt/jdk-11.0.3+7/bin/java 2000 \
  && update-alternatives --install /usr/bin/javac javac /opt/jdk-11.0.3+7/bin/javac 2000 \
  && wget 'https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_bin-1.7.9.zip' \
  && apt-get -y install unzip \
  && unzip freeplane_bin-1.7.9.zip \
  && echo '[Desktop Entry]' >> /usr/share/applications/freeplane.desktop \
  && echo 'Version=1.0' >> /usr/share/applications/freeplane.desktop \
  && echo 'Type=Application' >> /usr/share/applications/freeplane.desktop \
  && echo 'Terminal=false' >> /usr/share/applications/freeplane.desktop \
  && echo 'Exec=/opt/freeplane-1.7.9/freeplane.sh' >> /usr/share/applications/freeplane.desktop \
  && echo 'Name=Freeplane' >> /usr/share/applications/freeplane.desktop \
  && echo 'Categories=Development;' >> /usr/share/applications/freeplane.desktop \
  && echo 'Icon=/opt/freeplane-1.7.9/freeplane.svg' >> /usr/share/applications/freeplane.desktop \
  && 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 ub1804vncmatefreeplane

関連情報

・Freeplaneに関する他の情報はこちらを参照してください。

・プロジェクトWebサイト
https://www.freeplane.org/wiki/index.php/Home