Snap Store应用窗口位置无法保存,重启后固定在左上角的问题咨询
Hey there, sorry to hear you're stuck with this frustrating issue where your Snap Store apps always launch in the top-left corner and refuse to remember where you moved them last! Let's walk through some practical fixes that might get things working right again:
Verify the xdg-desktop-portal service
Most Snap apps rely on this service to save window state and other desktop-related settings. Open your terminal and runsystemctl --user status xdg-desktop-portalto check if it's running. If it shows as inactive, start it withsystemctl --user start xdg-desktop-portaland set it to launch automatically on boot withsystemctl --user enable xdg-desktop-portal.Reset the app's window position config
Many apps store window position data in local config files. For GTK-based Snap apps, look for a folder named after the app in~/.config/—delete any files related to window state (likewindow-state.ini). For Qt-based apps, check~/.config/QtProject.confor the app's dedicated config file and remove entries tied to window position.Adjust Snap app permissions
Snap's sandboxing might be blocking the app from saving window settings. Try connecting the desktop permission for the problematic app:snap connect [app-name]:desktop(replace[app-name]with the actual app name, likefirefoxordiscord). You can also try the legacy desktop permission if needed:snap connect [app-name]:desktop-legacy.Update Snap and your apps
Outdated software can cause bugs like this. First update the core Snap service withsudo snap refresh core, then update the problematic app withsudo snap refresh [app-name]—or refresh all your Snap apps at once withsudo snap refresh.Test with a different window session (Wayland vs Xorg)
If you're using Wayland (common in modern GNOME), try switching to Xorg when you log in (click the gear icon on the login screen to select it). Sometimes Wayland's sandbox interactions with Snap apps cause window position issues, and this test can help narrow down the cause.
Hope one of these fixes resolves your issue! If not, consider reporting the problem to the app's Snap maintainer with details about your distro, window manager, and which apps are affected.
备注:内容来源于stack exchange,提问作者Josué Pitre

