JSON-OBJECT Software Engineering Blog

Professional Senior Backend Engineer. Specializing in high volume traffic and distributed processing with Kotlin and Spring Boot as core technologies.

View on GitHub
20 December 2021

Windows 11, Ubuntu on WSL에 X410, IntelliJ IDEA 연동하기

by Taehyeong Lee

개요

사전 조건

X410 설치 및 설정

# ~/.bashrc 파일에 X410 설정 추가
$ nano ~/.bashrc
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
export DISPLAY=$(ip route | grep default | awk '{print $3; exit;}'):0.0

파일 모니터링 성능 최적화

$ sudo apt-get install inotify-tools -y
$ sudo sh -c "echo \"fs.inotify.max_user_watches = 524288\" >> /etc/sysctl.conf"
$ sudo sysctl -p --system
fs.inotify.max_user_watches = 524288

JetBrains Toolbox 설치

# JetBrains Toolbox 다운로드 및 압축 해제
$ cd ~
$ sudo apt-get install libfuse2
$ wget https://download.jetbrains.com/toolbox/jetbrains-toolbox-2.1.3.18901.tar.gz
$ sudo rm -rf /opt/toolbox
$ sudo mkdir /opt/toolbox
$ sudo tar -xzvf jetbrains-toolbox-2.1.3.18901.tar.gz -C /opt/toolbox
$ sudo ln -sf /opt/toolbox/jetbrains-toolbox-2.1.3.18901 /opt/jetbrains-toolbox

# toolbox, idea 별명 등록
$ nano ~/.bash_aliases
alias toolbox="/opt/jetbrains-toolbox/jetbrains-toolbox > /dev/null 2>&1 &"
alias idea="~/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate/bin/idea.sh > /dev/null 2>&1 &"
alias idea.="~/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate/bin/idea.sh . > /dev/null 2>&1 &"

IntelliJ IDEA 직접 설치

# IntelliJ IDEA 다운로드 및 압축 해제
$ cd ~
$ wget https://download.jetbrains.com/idea/ideaIU-2023.3.tar.gz
$ sudo rm -rf /opt/intellij /opt/idea
$ sudo mkdir /opt/intellij
$ sudo tar -xzvf ideaIU-2023.3.tar.gz -C /opt/intellij

# /opt/idea 심볼릭 링크 생성
$ sudo ln -sf /opt/intellij/idea-IU-233.11799.241/ /opt/idea

# idea 별명 등록
$ nano ~/.bash_aliases
alias idea="/opt/idea/bin/idea.sh > /dev/null 2>&1 &"
alias idea.="/opt/idea/bin/idea.sh . > /dev/null 2>&1 &"

IntelliJ IDEA 실행

# IntelliJ IDEA 실행
$ idea

# 현재 프로젝트 디렉토리에서 IntelliJ IDEA 실행
$ idea.

IntelliJ IDEA 기본 브라우저 설정

Settings → Tools → Web Browsers and Preview
- Default Browser: [Custom path]
- Custom Path: /mnt/c/Program Files/Google/Chrome/Application/chrome.exe (입력)

IntelliJ IDEA 설정 초기화

$ rm -rf ~/.config/JetBrains ~/.cache/JetBrains ~/.local/share/JetBrains

fcitx 한글 입력기 설치

# fcitx 한글 입력기 설치
$ sudo apt-get install fcitx fcitx-hangul fonts-noto-cjk fonts-noto-color-emoji fonts-nanum* dbus-x11 -y

# fcitx를 기본 한글 입력기로 설정
$ im-config

$ sudo sh -c "dbus-uuidgen >> /var/lib/dbus/machine-id"

# Input Method에 Hangul을 추가
$ fcitx-config-gtk3

$ nano ~/.bashrc
export QT_IM_MODULE=fcitx
export GTK_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export DefaultIMModule=fcitx
fcitx-autostart &>/dev/null

참고 글

tags: WSL - Ubuntu