没有不值得去解决的问题,也没有不值得去学习的技术!

Fixing the Linux WeChat “Save As” Dialog When It Displays Only Two Folders

In the image, the browse location is /home/wangqiang, and the name list contains only two folders: "Downloads" and "xwechat_files"

Problem

When using the native Linux version of WeChat (typically the Flatpak version) on Ubuntu, receiving an image or file and clicking “Save As” brings up a file save dialog that only shows two directories:

  • Downloads
  • xwechat_files

Instead, you would expect to see all the folders in your user directory, such as Documents, Pictures, Videos, Desktop, etc. As shown in the screenshot below, the dialog is almost empty, with only these two items listed.

In the image, the browse location is /home/wangqiang, and the name list contains only two folders: "Downloads" and "xwechat_files"

Cause Analysis

This happens because the Linux version of WeChat usually runs as a Flatpak sandbox. To improve security, Flatpak restricts applications by default to accessing only a very small number of system directories (such as ~/下载 and the app’s own data directory ~/xwechat_files). WeChat does not have permission to access other directories like 文档, 图片, 桌面, etc., so they naturally do not appear in the “Save As” dialog.

This is not a bug in WeChat, but rather the permission isolation mechanism of Flatpak. The benefit is that WeChat cannot freely read all your personal files; the downside is that saving files becomes quite inconvenient.

Solutions

There are two ways to solve this: a graphical tool (recommended for beginners) or terminal commands (recommended for users familiar with the command line).

Option 1: Use the Flatseal GUI

  1. Install Flatseal
    Open a terminal and run:
Bash
   flatpak install flathub com.github.tchx84.Flatseal
  1. Launch Flatseal
    Find and open Flatseal in your application menu.
  2. Grant permissions to WeChat
  • Find WeChat (or com.tencent.WeChat) in the application list on the left and click it.
  • In the Filesystem section on the right, turn on the All user files toggle (this allows WeChat to access the entire user directory).
  • Alternatively, for more granular control, click the plus sign next to “Other files” to add specific directories like /home/wangqiang/文档 and /home/wangqiang/图片.
  1. Restart WeChat
    Close WeChat and reopen it. Click “Save As” again, and you will find that all your common directories are now visible.

Option 2: Use the command line (one-time authorization)

If you prefer using the terminal, you can directly run the following command to grant WeChat access to the entire user home directory:

Bash
sudo flatpak override com.tencent.WeChat --filesystem=home

If you only want to authorize specific directories (such as Documents and Pictures):

Bash
sudo flatpak override com.tencent.WeChat --filesystem=/home/wangqiang/文档
sudo flatpak override com.tencent.WeChat --filesystem=/home/wangqiang/图片

After running the command, you also need to restart WeChat.

As shown in Figure 2, you can now see all directories under the user directory

Temporary Workaround (without modifying permissions)

If you prefer not to modify WeChat’s permissions, you can do this instead:

  1. In the WeChat chat window, right-click the file → select “Download File”.
  2. Right-click the same file again → select “Show in Folder”.
  3. The file manager will open the ~/xwechat_files directory, which contains the downloaded file. From here, you can manually copy it to any other location.

This method requires no configuration, but it involves a few extra steps every time.

Additional Finding: Saved files may lack extensions

After resolving the above issue, you might encounter another minor annoyance: images saved from WeChat often have filenames consisting of just a string of numbers or simple names like “1” or “2” without any extension. For example, if you save an image, its filename might be 1 (instead of 1.jpg). When you try to upload it to certain web pages (like DeepSeek), the file picker may filter it out due to the missing extension, making the file invisible—even if the file content itself is actually a JPEG.

Solution: Batch add the .jpg suffix to images without extensions. Use the following command (safe version, only processes files without a dot):

Bash
cd /path/to/your/images
for f in *; do
    [ -f "$f" ] && [[ "$f" != *.* ]] && mv -- "$f" "$f.jpg"
done

This ensures the images are properly recognized during upload.

Summary

ProblemCauseSolution
WeChat “Save As” only shows two foldersFlatpak sandbox permission restrictionsUse Flatseal or the command line to grant filesystem permissions
Saved images have no extensionFlawed save logic in the Linux version of WeChatBatch rename to add .jpg

With these settings, Linux WeChat lets you freely choose a save path just like the Windows version. I hope this experience helps others using Ubuntu + WeChat.


This article is based on testing with Ubuntu 22.04/24.04 + the Flatpak version of WeChat (com.tencent.WeChat). Different versions may vary slightly, but the underlying principle remains the same.

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系