본문 바로가기

프로그래밍

[우분투]분수 스케일링 사용 시 VSCode 흐림 현상 해결하기 - Ubuntu 24.04 LTS

저난 글에서는 우분투에서 분수 스케일링을 사용하면 크롬이 흐려지는 문제를 해결하는 방법을 알아보았습니다.

오늘은 저번과 비슷한 문제를 해결하는 법을 다루고자 합니다. VSCODE는 크롬처럼 간단한 설정을 제공하지 않아 다른 방법으로 해결해야 합니다.

 

오늘 소개할 방법은 간단하며 다른 프로그램에도 사용할 수 있는 방법입니다.

해결방법

해결 방법은 간단합니다. 아래 명령어와 같이 터미널에서 VSCode를 실행할 때 옵션을 추가하면 됩니다.

code --ozone-platform-hint=wayland --enable-wayland-ime --wayland-text-input-version=3

 

하지만 매번 터미널을 켜 명령어를 입력하여 사용하기에는 생각보다 귀찮은 일입니다.

그럴 땐 다음 방법을 사용하시면 됩니다.

바로 .desktop 파일에서 앱 실행 시 옵션을 수정해 주면 됩니다. 방법은 아래와 같습니다.

 

/usr/share/applications/code.desktop 파일을 ~/.local/share/applications에 붙여 넣은 뒤, Exec 부분을 수정해 다음과 같이 바꿔주시면 됩니다.

[Desktop Entry]
Name=Visual Studio Code
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/share/code/code --ozone-platform-hint=wayland --enable-wayland-ime --wayland-text-input-version=3 %F
Icon=vscode
Type=Application
StartupNotify=false
StartupWMClass=Code
Categories=TextEditor;Development;IDE;
MimeType=application/x-code-workspace;
Actions=new-empty-window;
Keywords=vscode;

[Desktop Action new-empty-window]
Name=New Empty Window
Name[de]=Neues leeres Fenster
Name[es]=Nueva ventana vacía
Name[fr]=Nouvelle fenêtre vide
Name[it]=Nuova finestra vuota
Name[ja]=新しい空のウィンドウ
Name[ko]=새 빈 창
Name[ru]=Новое пустое окно
Name[zh_CN]=新建空窗口
Name[zh_TW]=開新空視窗
Exec=/usr/share/code/code --new-window --ozone-platform-hint=wayland --enable-wayland-ime --wayland-text-input-version=3 %F
Icon=vscode

 

.desktop 파일이란?

.desktop 파일은 윈도우의 바로가기와 유사한 역할을 하는 파일입니다.

파일은 보통 /usr/share/applications 혹은 ~/.local/share/applications 에 존재합니다.

두 경로의 차이점은 /usr/share/applications은 모든 사용자가 공유하는 경로이며 ~/.local/share/applications 경로는 각 사용자가 개별적으로 사용하는 공간입니다.

일반적으로 프로그램을 설치하면 /usr/share/applications에 .desktop파일이 생깁니다. 이런 파일들이 해당 경로에 있으면 시스템은 이를 인식해 우분투 데스크톱의 앱목록에 표시됩니다.

추가정보

추가적으로 /usr/share/applications 에 있는 원본 파일을 직접 수정하시기보다는 ~/.local/share/applications 에 복사한 뒤 수정하는 것이 좋습니다.

추후 옵션이 잘못 설정되었을 때 원상태로 복원하기가 쉬워 안전하게 작업이 가능하기 때문입니다.

 

참고로 우분투 24.10 에선 Gnome이 보다 나은 분수 스케일링을 제공한다고 합니다.

하지만 제가 사용하는 우분투 24.04 버전에서는 해결되지 않는 문제인듯합니다....

 

마지막으로 궁금하신 사항이 있거나 잘못된 정보가 있다면 자유롭게 남겨주시면 감사하겠습니다!

참조

https://github.com/microsoft/AzureStorageExplorer/issues/7986

 

Blurry on Ubuntu 24.04 · Issue #7986 · microsoft/AzureStorageExplorer

Preflight Checklist I have installed the latest version of Storage Explorer. I have checked existing resources, including the troubleshooting guide and the release notes. I have searched for simila...

github.com

 

 

https://github.com/microsoft/vscode/issues/109176

 

Native wayland support with newest electron · Issue #109176 · microsoft/vscode

Native wayland support would be great to run vs code without XWayland as described in #77752. Recently electron merged the chrome version with the ozone backend needed: electron/electron#26022 This...

github.com