Spa*_*Bot 10
使用写权限编辑/usr/share/applications/eclipse.desktop,即 sudo gedit /usr/share/applications/eclipse.desktop
将设置更改Exec=/usr/bin/eclipse为Exec=bash -ic "/usr/bin/eclipse"并保存
根本问题是.bashrc未加载到非交互式shell中.当您通常单击其符号启动Eclipse时,请.bashrc尽早退出.此解决方案适用于由.desktop文件定义的所有程序.相反,bash -i打开交互式shell,-c ""在该shell中运行命令.
您的工具可能使用嵌入式eclipse终端.此终端无法开始提供您的登录/用户shell.因此,您需要在Eclipse首选项中设置eclipse终端以作为--loginshell 启动:
去:
Preferences -> Terminal -> Local Terminal
Run Code Online (Sandbox Code Playgroud)
并设定
"Arguments" to "--login"
Run Code Online (Sandbox Code Playgroud)
重启Eclipse和你的用户$ PATH应该从现在开始使用.
我可以想到解决这个问题的两个选择:
我更喜欢第一个选项。