- lightdm 에서만 동작하기에 lightdm display manger 설치
- sudo apt install lightdm
- (sudo dpkg-reconfigure lightdm)
- user space의 .bashrc에 다음을 추가
- vim ~/.bashrc
export XAUTHORITY=~/.Xauthority chmod 664 ~/.Xauthority echo $DISPLAY echo $XAUTHORITY alias sucode='sudo code --verbose --no-sandbox --user-data-dir="/home/$USER/.vscode-root"' |
- root space의 .bashrc에 다음을 추가
- vim /root/.bashrc
if [ "$logname" != "" ] && [ "$DISPLAY" != "" ]; then export XAUTHORITY=$(getent passwd "${logname}" | cut -d : -f 6)/.Xauthority fi alias sucode='sudo code --no-sandbox --user-data-dir="/home/$(logname)/.vscode-root"' |