fedora下使用“软件(flatpak)”安装的Jetbrains Idea无法访问某些路径的解决方法

fedora下使用"软件(flatpak)"安装的Jetbrains Idea无法访问某些路径的解决方法

关键词:fedora、软件、flatpak、jetbrains、idea、disk

背景

使用系统自带的"软件"APP安装了GoLand 和 Idea,电脑上有多个硬盘,除了系统盘,其他磁盘默认挂载到/run/media/{USERNAME}/xxxxxx 下面,搭完环境后尝试打开项目时发现,这个路径在GoLand中可以正常访问,而Idea无法读取该路径信息,提示路径不存在,经过排查,最终修改了Idea的应用权限得以解决。

懒得往下看的话,执行这条命令后,重启idea即可解决问题。

shell 复制代码
flatpak override com.jetbrains.IntelliJ-IDEA-Ultimate --filesystem=host

过程

bash 复制代码
root@fedora:~# flatpak list
名称                             应用程序 ID                                    版本                              分支                 来源             安装
Google Chrome                    com.google.Chrome                              131.0.6778.85-1                   stable               flathub          system
GoLand                           com.jetbrains.GoLand                           2024.2.3                          stable               flathub          system
IntelliJ IDEA Ultimate           com.jetbrains.IntelliJ-IDEA-Ultimate           2024.3                            stable               flathub          system
Visual Studio Code               com.visualstudio.code                          1.95.3                            stable               flathub          system
防火墙                           org.fedoraproject.FirewallConfig                                                 stable               fedora           system
Fedora KDE 6 Platform            org.fedoraproject.KDE6Platform                 41                                f41                  fedora           system
Fedora Platform                  org.fedoraproject.Platform                     41                                f41                  fedora           system
Freedesktop Platform             org.freedesktop.Platform                       freedesktop-sdk-24.08.7           24.08                flathub          system
Mesa                             org.freedesktop.Platform.GL.default            24.2.5                            23.08                flathub          system
Mesa (Extra)                     org.freedesktop.Platform.GL.default            24.2.5                            23.08-extra          flathub          system
Mesa                             org.freedesktop.Platform.GL.default            24.2.7                            24.08                flathub          system
Mesa (Extra)                     org.freedesktop.Platform.GL.default            24.2.7                            24.08extra           flathub          system
openh264                         org.freedesktop.Platform.openh264              2.1.0                             2.2.0                flathub          system
openh264                         org.freedesktop.Platform.openh264              2.4.1                             2.4.1                flathub          system
Freedesktop SDK                  org.freedesktop.Sdk                            freedesktop-sdk-23.08.25          23.08                flathub          system
Freedesktop SDK                  org.freedesktop.Sdk                            freedesktop-sdk-24.08.7           24.08                flathub          system
虚拟系统管理器                   org.virt_manager.virt-manager                  4.1.0                             stable               fedora           system
Wireshark                        org.wireshark.Wireshark                        4.4.1                             stable               fedora           system

root@fedora:~# flatpak info --show-permissions com.jetbrains.IntelliJ-IDEA-Ultimate
[Context]
shared=network;ipc;
sockets=x11;pulseaudio;ssh-auth;gpg-agent;
devices=all;
filesystems=home;xdg-run/app/com.discordapp.Discord:create;xdg-run/gnupg;xdg-run/docker;xdg-run/podman;xdg-run/keyring;xdg-run/pipewire-0;

[Session Bus Policy]
org.freedesktop.Notifications=talk
org.freedesktop.secrets=talk

[Environment]
IDEA_PROPERTIES=/app/bin/idea.properties
JAVA_HOME=/app/extra/idea-IU/jbr
root@fedora:/var/lib/flatpak/app# flatpak info --show-permissions com.jetbrains.GoLand
[Context]
shared=network;ipc;
sockets=x11;pulseaudio;
devices=all;
features=devel;
filesystems=xdg-run/keyring;xdg-run/gnupg:ro;host;

[Session Bus Policy]
org.freedesktop.Notifications=talk
org.freedesktop.secrets=talk

[Environment]
GOLAND_JDK=${FLATPAK_DEST}/goland/jbr/
root@fedora:~# flatpak override com.jetbrains.IntelliJ-IDEA-Ultimate --filesystem=host

命令释义

bash 复制代码
# 查看应用对应的ID是什么
flatpak list
# 分别查看这两个应用的权限信息
flatpak info --show-permissions com.jetbrains.IntelliJ-IDEA-Ultimate
flatpak info --show-permissions com.jetbrains.GoLand
#将idea的文件系统权限设置为host
flatpak override com.jetbrains.IntelliJ-IDEA-Ultimate --filesystem=host
相关推荐
凌冰_7 小时前
IDEA 集成Claude Code
java·ide
独隅10 小时前
PyCharm 接入 Codex 的全面指南
ide·python·pycharm
图像僧14 小时前
没有sudo权限也能安装和使用 VSCode
ide·vscode·编辑器
秋雨雁南飞1 天前
Visual Studio 常用扩展
ide·visual studio
X1A0RAN1 天前
解决Pycharm中部分文件或文件夹被隐藏不展示问题
ide·python·pycharm
wh_xia_jun1 天前
用pom 的test 配置 与 jacoco
java·ide·intellij-idea
zhaqonianzhu1 天前
Qoder CN 插件停更与迁移指南:从 VS Code 到通义灵码 IDE
ide·vscode
数智工坊2 天前
PyCharm 运行 Python 脚本总自动进 Test 模式?附 RT-DETRv2 依赖缺失终极排坑
开发语言·ide·人工智能·python·pycharm
00后程序员张2 天前
Windows 下怎么生成 AppStoreInfo.plist?不依赖 Xcode 的方法
ide·macos·ios·小程序·uni-app·iphone·xcode
@noNo2 天前
Visual Studio Code添加自定义大模型API
ide·vscode·编辑器