SNMPベースのネットワーク監視のため、ネットワーク上に構築した MikroTik RouterOS Cloud Hosted Routerサーバから、情報をリアルタイムにを閲覧するための Windows 向けクライアントツール The Dude Clientを、 Kubuntu 22.04デスクトップに Wine を入れて動くようにしました。
WineHQレポジトリ追加とインストール
Linux上でWindows向けアプリケーションを動かすのに必要なWineをインストールするため、公式サイトのページに沿って進めます。
今回セットアップするマシンは、Kubuntu 22.04をインストール済みのIntel NUC8i7BEH(関連記事はこちら)です。
1 2 3 4 5 6 7 8 |
$ uname -a Linux NUC8Kubu 6.2.0-31-generic #31~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Aug 16 13:45:26 UTC 2 x86_64 x86_64 x86_64 GNU/Linux $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.3 LTS Release: 22.04 Codename: jammy |
レポジトリ追加の前にまずはアーキテクチャの確認から。自身は64bitなので次のような戻り値を得ます。
1 2 |
$ dpkg --print-architecture amd64 |
次に追加アーキテクチャを確認します。32bitを意味する i386 が返ってくれば問題無し。
1 2 |
$ dpkg --print-foreign-architectures i386 |
追加アーキテクチャに i386 を追加するには、次のコマンドを実行します。
1 |
$ sudo dpkg --add-architecture i386 |
次にレポジトリキーをダウンロードします。格納場所は既にあるのでそこへ保存。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
$ ls -l /etc/apt/ drwxr-xr-x 2 root root 4096 Aug 28 17:16 apt.conf.d drwxr-xr-x 2 root root 4096 Apr 8 2022 auth.conf.d drwxr-xr-x 2 root root 4096 Apr 8 2022 keyrings drwxr-xr-x 2 root root 4096 Aug 29 09:20 preferences.d -rw-rw-r-- 1 root root 2846 Aug 29 16:22 sources.list drwxr-xr-x 2 root root 4096 Aug 29 16:22 sources.list.d drwxr-xr-x 2 root root 4096 Aug 29 16:22 trusted.gpg.d $ sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key --2023-09-08 23:07:08-- https://dl.winehq.org/wine-builds/winehq.key Resolving dl.winehq.org (dl.winehq.org)... 151.101.2.217, 151.101.66.217, 151.101.130.217, ... Connecting to dl.winehq.org (dl.winehq.org)|151.101.2.217|:443... connected.HTTP request sent, awaiting response... 200 OK Length: 3220 (3.1K) [application/pgp-keys] Saving to: ‘/etc/apt/keyrings/winehq-archive.key’ /etc/apt/keyrings/winehq-archive.key 100%[=============================================>] 3.14K --.-KB/s in 0s 2023-09-08 23:07:08 (54.0 MB/s) - ‘/etc/apt/keyrings/winehq-archive.key’ saved [3220/3220] $ ls -l /etc/apt/keyrings -rw-r--r-- 1 root root 3220 Dec 19 2018 winehq-archive.key |
レポジトリソースを記述したファイルも、ダウンロードして利用する仕組みになっています。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
$ sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources --2023-09-08 23:08:01-- https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources Resolving dl.winehq.org (dl.winehq.org)... 151.101.2.217, 151.101.66.217, 151.101.130.217, ... Connecting to dl.winehq.org (dl.winehq.org)|151.101.2.217|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 163 Saving to: ‘/etc/apt/sources.list.d/winehq-jammy.sources’ winehq-jammy.sources 100%[======================================>] 163 --.-KB/s in 0s 2023-09-08 23:08:01 (14.6 MB/s) - ‘/etc/apt/sources.list.d/winehq-jammy.sources’ saved [163/163] $ ls -l /etc/apt/sources.list.d/ -rw-r--r-- 1 root root 100 Aug 29 16:22 anydesk.list -rw-r--r-- 1 root root 117 Aug 29 16:22 google.list -rw-r--r-- 1 root root 162 Aug 29 16:22 kubuntu-ppa-ubuntu-backports-jammy.list -rw-r--r-- 1 root root 150 Aug 29 16:22 libreoffice-ubuntu-ppa-jammy.list -rw-r--r-- 1 root root 150 Aug 29 16:22 mozillateam-ubuntu-ppa-jammy.list -rw-r--r-- 1 root root 178 Aug 29 16:22 remmina-ppa-team-ubuntu-remmina-next-jammy.list -rw-r--r-- 1 root root 144 Aug 29 16:22 rvm-ubuntu-smplayer-jammy.list -rw-r--r-- 1 root root 163 Jul 23 21:48 winehq-jammy.sources |
ソースファイルの中身は次のようになっており、初めて見る書式でした。
1 2 3 4 5 6 |
Types: deb URIs: https://dl.winehq.org/wine-builds/ubuntu Suites: jammy Components: main Architectures: amd64 i386 Signed-By: /etc/apt/keyrings/winehq-archive.key |
パッケージマネージャを更新の後、安定版をインストールします。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
$ sudo apt update $ sudo apt install --install-recommends winehq-stable 0 upgraded, 187 newly installed, 0 to remove and 0 not upgraded. Need to get 303 MB of archives. After this operation, 1,719 MB of additional disk space will be used. Do you want to continue? [Y/n] y $apt list wine* | grep installed wine-stable-amd64/jammy,now 8.0.2~jammy-1 amd64 [installed,automatic] wine-stable-i386/jammy,now 8.0.2~jammy-1 i386 [installed,automatic] wine-stable/jammy,now 8.0.2~jammy-1 amd64 [installed,automatic] winehq-stable/jammy,now 8.0.2~jammy-1 amd64 [installed] $ wine --version wine-8.0.2 |
Wine初期設定
ターミナルからWine設定ツールを立ち上げると、初回は必要なライブラリ類のインストールが始まります。
Wine設定ウィンドウのWindowsバージョンの設定が、既定ではWindows 7になっていたので、これをWindows 10へ変更してみましたが、特に問題のない限り既定のままで良いでしょう。
Wine設定を閉じ、ファイルマネージャでホームフォルダ下を確認すると、 .wine という隠しフォルダの下にWineのCドライブがありました。
The Dude Clientのインストール
以上でKubuntu上でWindowsプログラムを動かす準備は整ったので、既に仮想マシンで運用中のRouterOS Cloud Hosted Routerのバージョンに合わせ、RouterOS v6系のThe Dude Clientのインストーラを、MikroTikサイトのダウンロードページから入手します。
1 2 |
$ ls -l ~/Downloads/ -rw-rw-r-- 1 user user 2253520 9月 8 23:52 dude-install-6.49.8.exe |
インストーラファイルの右クリックから、 Wine Windowsプログラムローダーで開く をクリック。
Windowsでお馴染みのインストーラが現れました。まずは約款に同意、
インストールオプションでは、スタートメニューへアイコンを追加するかどうかという程度。
インストール場所もそのまま進めます。
小さなプログラムなので、あっという間にインストールが終わります。
The Dude ClientをWineで起動
.wine 下方にある dude.exe ファイルをインストーラの時同様に右クリックして、Wineから実行します。
The Dude Clientの初期画面が開くので、サーバ情報を入力の後、 Connect ボタン押下で接続します。
サーバ側にあるネットワークの監視情報が表示されました。ここで画面下のアイコンを右クリックして、 タスクマネージャにピン留め をしておくと、次回以降の起動に便利です。