![无法从终端或 ranger 使用 RStudio 打开 .Rproj](https://linux22.com/image/1157698/%E6%97%A0%E6%B3%95%E4%BB%8E%E7%BB%88%E7%AB%AF%E6%88%96%20ranger%20%E4%BD%BF%E7%94%A8%20RStudio%20%E6%89%93%E5%BC%80%20.Rproj.png)
我正在尝试.Rproj
使用 RStudio 从终端打开文件,或者最好使用。中ranger
的默认文件打开器在打开任何文件时都会产生以下错误:ranger
rifle
.Rproj
E303: Unable to open swap file for "/path/to/file.Rproj" 13L, 205C
我发现.Rproj
从终端打开文件的资源有限,但尝试了以下方法:
open -a /path/to/file.Rproj
返回:
Couldn't get a file descriptor referring to the console
答案1
有一种方法可以使用终端指定的默认“打开方式”软件从终端打开文件。在控制台中,假设您位于文件所在的位置,您必须尝试:
xdg-打开文件.扩展名
我已经用“xdg-open”打开了几种不同类型的文件,应该与*.Rproj相同。
祝你好运!