LoginSignup
0
0

More than 5 years have passed since last update.

VPS上のLinuxでVS CodeをX Windowで動かしてみた

Last updated at Posted at 2018-09-24

勉強会やキャンプ中にスマホのギガを消耗せずに、npm installとかvagrant upとかしたかったのでやってみました。
あと、WindowsタブレットとかでネイティブLinuxで開発できたらなぁとも思って。

結論から言うと、めっちゃ動作が遅かったです。

環境

Conohaの512MBプラン+Debian9

構築

とりあえずユーザーを作る

vscodeはrootユーザーだと怒られるので、ユーザーを作って公開鍵認証できるところまで

# adduser <user名>
# su - <user名>
$ mkdir .ssh
$ cd .ssh
$ nano authorized_keys # ← 自分の公開鍵を書き込む
$ chmod 600 authorized_keys
$ cd ../
$ chmod 700 .ssh
$ exit

X Serverを入れる

# apt-get -y install xserver-xorg

日本語化する

日本語対応しておかないと、vscodeに日本語拡張入れた時に豆腐まみれになります

# apt -y install task-japanese locales-all
# localectl set-locale LANG=ja_JP.UTF-8 LANGUAGE="ja_JP:ja" 
# source /etc/default/locale

VS Codeを入れる

リンクやファイル名は、記事を書いた時のバージョンです
詳しやり方はここ見てください。

# apt install -y libxss1 libgtk2.0-0 libasound2
# cd /tmp
# wget https://az764295.vo.msecnd.net/stable/f46c4c469d6e6d8c46f268d1553c5dc4b475840f/code_1.27.2-1536736588_amd64.deb
# dpkg -i code_1.27.2-1536736588_amd64.deb
# apt-get install -f

クライアントからX Window試す

クライアントPCからServer上のVS Codeが動くか試します

client:$ ssh -X <user名>@<ホスト>
server:$ code .

感想

冒頭にも書いたように、動作がもっさりしてます。ネットワーク的な問題だと思うので、どうしよもない感じですね。
あと、このままではまだ日本語入力はできませんが、今回は「どのくらい使えるか」をやってみたかったので、試してません。

参考

Visual Studio Code on Linux
日本語環境にする

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0