Member-only story
Introduction:
Flatpak is a powerful packaging system for Linux that allows you to easily install and run applications in a sandboxed environment. However, there may be cases where you encounter file override issues, leading to errors during the execution of Flatpak applications. In this guide, we’ll walk through a common error and demonstrate how to troubleshoot and fix file override problems using Visual Studio Code as an example.
Error Scenario:
You try to run Visual Studio Code using Flatpak, and you encounter the following error:
flatpak run com.visualstudio.code
bwrap: Can’t make symlink at /var/run: File exists
This error indicates that there is a problem with creating a symlink at /var/run
because a file or directory already exists at that location.
Step 1: Display Override Settings
Before fixing the issue, it’s useful to understand the current override settings. Run the following commands to display the override settings at both the user and system levels:
# User-level override settings
flatpak override --show --user com.visualstudio.code
[Context]
filesystems=!/run/docker.sock;
# System-level override settings
flatpak override --show --system com.visualstudio.code
[Context]
filesystems=!/var/run/docker.sock;