Skip to content

Instantly share code, notes, and snippets.

@takuzoo3868
Last active November 30, 2017 13:59
Show Gist options
  • Save takuzoo3868/3e8ffefd141ca014ba83b1add631e510 to your computer and use it in GitHub Desktop.
Save takuzoo3868/3e8ffefd141ca014ba83b1add631e510 to your computer and use it in GitHub Desktop.
🔰 Garbage collection about Tips

あの絵文字はなんだ!?

treeっぽいやつを.mdに記述したい

root/
 ├ bin/
 ├ etc/
 ├ usr/
 │ └ local/
 │   └ bin/
 └ lib/

こんな感じのゆるふわ構成図

コピペ用

┣ ┠ ┝ ├
┫ ┨ ┥ ┤ 
│ ┃
─ ━
┌ ┏ ┓ ┐
└ ┗ ┛ ┘
Emoji Code significance
🎉 :tada: Initial Commitやリリースなど
💩 :poop: バグを修正
:sparkles: ファイル追加
🔥 :fire: ファイル削除
♻️ :recycle: リファクタリング(整理)
©️ :copyright: ライセンスの変更や追加
🌐 :globe_with_meridians: 多言語対応
📝 :memo: ドキュメント記述やREADME修正
🎨 :art: コードの書式や構造を改善
👍 :+1: 機能改善
🚀 :rocket: パフォーマンス改善
💚 :green_heart: テストやCIの修正・改善
:white_check_mark: テストを追加
🐧 :penguin: Linux
🍎 :apple: Mac OS
💻 :computer: Windows
🔒 :lock: セキュリティ関連の改善
⬆️ :arrow_up: 依存関係をアップグレード
⬇️ :arrow_down: 依存関係をダウングレード

wsl-tutorial

The tutorial will tell you how to run desktop environment inside Windows Subsystem for Linux. And you don't need to build a developement environment with virtual machines any more.

Prerequisites

Your PC must be running a 64-bit version of Windows 10 Anniversary Update build 14393 or later.

To find your PC's CPU architecture and Windows version/build number, open Settings>System>About. Look for the OS Build and System Type fields.

Installation

In order to run Bash on Windows, you will need to manually:

1.Turn-on Developer Mode

2.Enable the “Windows Subsystem for Linux (beta)” feature

After enabling Windows Subsystem for Linux

1.Restart your computer

2.Run bash

After you have accepted the License, the Ubuntu user-mode image will be downloaded and a “Bash on Ubuntu on Windows” shortcut will be added to your start menu.

Install VcXsrv

Install the lastest version of VcXsrv.

Upgrade ubuntu

sudo apt-get update
sudo apt-get upgrade

Install xfce desktop

sudo apt-get install xfce4-terminal
sudo apt-get install xfce4

Specify the display server

Add DISPLAY=:0.0 to your bashrc, and don't forget to source your bashrc. :)

export DISPLAY=:0.0

Fix dbus error

You need to replace

<listen>unix:tmpdir=/tmp</listen>

with

<listen>tcp:host=localhost,port=0</listen>

in /etc/dbus-1/session.conf.

Fix connection refused

You need to replace

<auth>EXTERNAL</auth>

with

<auth>ANONYMOUS</auth>
<allow_anonymous/>

in /etc/dbus-1/session.conf.

Open display server

Open XLaunch, choose “One large window” or “One large window without titlebar” and set the “display number” to 0. Other settings leave as default and finish the configuration.

Run xfce desktop

Execute the following command inside “Bash on Ubuntu on Windows”.

startxfce4

Fix powerline fonts rendering

sudo apt-get install fonts-hack-otf
sudo apt-get install fonts-hack-ttf
sudo apt-get install fonts-hack-web

Fix Unicode fonts rendering

sudo apt-get install fonts-noto
sudo apt-get install fonts-noto-hinted
sudo apt-get install fonts-noto-mono
sudo apt-get install fonts-noto-unhinted

Fix Chinese fonts rendering

sudo apt-get install fonts-noto-cjk

Fix mkdir command has wrong permissions

Add the following shell code to your bashrc

if grep -q Microsoft /proc/version; then
    if [ "$(umask)" == '0000' ]; then
        umask 0022
    fi
fi

Install Chinese input method

1.Install fcitx

sudo apt-get install fcitx
sudo apt-get install fcitx-pinyin

2.Add the following command to your bashrc file

export XMODIFIERS=@im=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx

3.Relogin

Install drop-down terminal

sudo apt-get install guake

How to shutdown wsl

1.Close VcXsrv

2.Exit “Bash on Ubuntu on Windows”

Enjoy your self

Please enjoy your development environment. :)

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment