- 概要
- Ubuntu の rootfs イメージをダウンロード
- WSLのイメージを作る
- WSLを起動
- 環境を更新
- 一般ユーザ作成
- 一旦ログアウト
- 一般ユーザでログイン
- JetBrains Projector をインストール
- JetBrains Projector を起動
- 参考情報
概要
JetBrains Projector がリリースされたので、少し試してみました。
私は WSL 環境にインストールする方法で試してみました。
以下を参考にして実施。
上記リンク先には、以下のページを見て作業してって書いてあります。
てことで、以下動作するまでの手順をメモメモ。
Ubuntu の rootfs イメージをダウンロード
https://cloud-images.ubuntu.com/hirsute/current/hirsute-server-cloudimg-amd64-wsl.rootfs.tar.gz
をダウンロードして、c:\rootfs
以下に配置。
WSLのイメージを作る
PowerShell 上で
> wsl --import projector-env C:\wsl\projector-env C:\rootfs\hirsute-server-cloudimg-amd64-wsl.rootfs.tar.gz --version2
WSLを起動
> wsl -d projector-env
rootユーザでログインした状態になります。
環境を更新
とりあえず最新状態にするために
# apt -q update; apt upgrade -yq
を実行
一般ユーザ作成
# useradd -m new-user-name# passwd new-user-name# usermod -G sudo new-user-name
一旦ログアウト
# exit
一般ユーザでログイン
> wsl -d projector-env -u new-user-name
JetBrains Projector をインストール
REFERENCE: https://github.com/JetBrains/projector-installerを見て作業。
$ cd $ sudo apt install python3 python3-pip -y $ python3 -m pip install -U pip $ . ./.profile # $HOME/.local/bin にPATHを通すため $ sudo apt install less libxext6 libxrender1 libxtst6 libfreetype6 libxi6 -y $ pip3 install projector-installer --user Collecting projector-installer Downloading projector_installer-1.1.5-py3-none-any.whl (24.6 MB) |████████████████████████████████| 24.6 MB 11.5 MB/s Requirement already satisfied: click in /usr/lib/python3/dist-packages (from projector-installer)(7.1.2) Requirement already satisfied: wheel in /usr/lib/python3/dist-packages (from projector-installer)(0.34.2) Requirement already satisfied: cryptography in /usr/lib/python3/dist-packages (from projector-installer)(3.3.2) Requirement already satisfied: pip in ./.local/lib/python3.9/site-packages (from projector-installer)(21.1.1) Requirement already satisfied: pyOpenSSL in /usr/lib/python3/dist-packages (from projector-installer)(20.0.1) Requirement already satisfied: netifaces in /usr/lib/python3/dist-packages (from projector-installer)(0.10.9) Collecting dataclasses Downloading dataclasses-0.6-py3-none-any.whl (14 kB) Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from projector-installer)(52.0.0) Installing collected packages: dataclasses, projector-installer Successfully installed dataclasses-0.6 projector-installer-1.1.5 $ . ~/.profile
JetBrains Projector を起動
今回は、PyCharm Community Edition を選びました。
$ projector --version projector, version 1.1.5 $ projector install LICENSE が表示されます。しっかりと読んで最後に q を押下 This software includes components licensed under GPLv2+CPE. Do you accept this license? [y/n]: y Installing IDE in quick mode; for full customization you can rerun this command with "--expert" argument or edit this config later via "projector config edit"command. 1. Idea_Community 2. Idea_Ultimate 3. PyCharm_Community 4. PyCharm_Professional 5. CLion 6. GoLand 7. DataGrip 8. PhpStorm 9. WebStorm 10. RubyMine 11. Rider 12. DataSpell 13. MPS Choose IDE type or 0 to exit: [0-13]: 3 Do you want to select from Projector-tested IDE only? [y/N] y 1. PyCharm Community 2019.3.42. PyCharm Community 2020.23. PyCharm Community 2020.3.3 Choose IDE number to install or 0 to exit: [0-3]: 3 Installing PyCharm Community 2020.3.3 Downloading pycharm-community-2020.3.3.tar.gz [##################################################]100% Unpacking pycharm-community-2020.3.3.tar.gz [##################################################]100% Configuration name: PyCharm To access IDE, open in browser http://localhost:9999/ http://127.0.0.1:9999/ To see Projector logs in realtime run tail-f"/home/new-user-name/.projector/configs/PyCharm/projector.log" Exit IDE or press Ctrl+C to stop Projector. It seems that you are using WSL environment. WSL is still experimental technology, and if you experience any issues accessing projector from browser please refer to Projector README file: https://github.com/JetBrains/projector-installer#resolving-wsl-issues
自動でブラウザが開き、プライバシーポリシーが表示されます。同意して次へ。
DATA SHARINGについての同意確認が表示されます。選択して次へ。
ブラウザ上に JetBrains IDE が表示されます。
こんな感じです。
終了したい場合は ターミナル 上で Ctrl+C を押します。
普通に操作できました。しかも凄くスムーズ。これは便利ですね。
日本語は入力できなかったのですが、これはWSL側にIMEの設定をしていないからだと思います。
ちゃんと Mozc とかを設定しておいたら、日本語入力も出来るかも。
参考情報
過去の記事については、以下のページからご参照下さい。
- いろいろ備忘録日記まとめ
サンプルコードは、以下の場所で公開しています。
- いろいろ備忘録日記サンプルソース置き場