Ubuntu双系统部分应用UI异常及字体显示问题求助
Hey there, I’ve dealt with exactly these kinds of odd UI quirks on Ubuntu dual-boot setups before—specific apps acting like they’re ignoring your system settings while others work fine. Let’s walk through targeted fixes for both the font issues and tiny window problem:
1. Force System Scaling for Misbehaving Apps
A lot of smaller or Electron-based apps (looking at you, Enpass) don’t automatically pick up Ubuntu’s display scaling settings. Here’s how to fix this per-app:
- For GPick (a GTK app), launch it with a scaling override to match your system:
ReplaceGDK_SCALE=2 GPick2with your system’s scaling factor (check in Settings > Display > Scale). To make this permanent, edit your desktop shortcut:- Open
~/.local/share/applications/gpick.desktop - Find the
Exec=line and modify it to:Exec=env GDK_SCALE=2 GPick %F
- Open
- For Enpass (Electron-based), add a scaling flag to its launch command:
- Open
~/.local/share/applications/Enpass.desktop - Update the
Exec=line to include the scale factor:Exec=/opt/Enpass/Enpass --force-device-scale-factor=2 %U
- Open
2. Fix Font Rendering Issues
If fonts look garbled or missing, it’s likely the apps aren’t accessing Ubuntu’s default font packages. Let’s install universal font fallback and refresh the system cache:
- Install core font packages that most apps rely on:
sudo apt install fonts-dejavu-core fonts-noto fonts-noto-color-emoji - Refresh the font cache to ensure the system picks up the new fonts:
fc-cache -fv - For extra measure, set a default system font in Settings > Appearance > Fonts—stick to a common one like Noto Sans to maximize app compatibility.
3. Manually Set Persistent Window Sizes
Some apps just don’t remember window dimensions between launches. You can edit their config files to lock in a reasonable size:
- GPick:
- Open its config file in a text editor:
nano ~/.config/gpick/gpick.conf - Look for lines starting with
window_widthandwindow_height, then set them to values that work for you (e.g.,window_width=800andwindow_height=600). Save and close withCtrl+OthenCtrl+X.
- Open its config file in a text editor:
- Enpass:
- Enpass stores window settings in its config directory—open:
nano ~/.config/Enpass/Preferences.json - Look for keys like
windowWidthandwindowHeight, adjust the numeric values, save, and restart Enpass.
- Enpass stores window settings in its config directory—open:
4. Check for GTK Theme Compatibility
If you’re using a custom GTK theme, some apps might struggle to render correctly. Try switching back to Ubuntu’s default theme (Yaru) temporarily to see if the issues go away. If they do, you can either stick with the default or find a theme that explicitly supports GTK3/GTK4 apps (most modern themes do, but older ones might not).
内容的提问来源于stack exchange,提问作者Mark

