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
相关推荐
2501_915909062 天前
移动端开发工具链怎么组合比较好,iOS、Android、跨端三套配置方案
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
2501_915918412 天前
iOS编程用什么软件好?主流工具Xcode、AppCode、CodeRunner与新兴快蝎对比
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
滕州市燕猫虎计算机科技工作室个体工商户3 天前
IDEA:Command line is too long
java·ide·intellij-idea
AI编码进化论5 天前
云IDE介绍:环境模板化、Agent上云,云IDE该怎么选
开发语言·ide·人工智能·团队开发·ai编程
我要见SA姐15 天前
DeepSeek Harness 开源贡献手记:从 Issue 到 Merge 的完整旅程
ide·vscode·python·自动化·编辑器
2501_915918416 天前
使用 VS Code 写 Swift 做 iOS 开发,插件能实现哪些功能,还有哪些短板
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
威嵌神州6 天前
天脉 3 开发环境与 BSP 适配:IDE license、驱动开发、飞腾平台
ide·驱动开发·嵌入式硬件·fpga开发
我要见SA姐16 天前
用 Claude Code 重构遗留系统:从评估到落地的完整实践指南
数据库·ide·vscode·oracle·编辑器
00后程序员张7 天前
Xcode vs KXApp,体积差几十G,选轻量方案还是完整工具链?
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
解道Jdon7 天前
JDK 27发布:紧凑对象头、G1默认、量子安全TLS
ide·windows·git·svn·eclipse·github·visual studio