在 Xubuntu 14.04 中使用登录 shell

在 Xubuntu 14.04 中使用登录 shell

我安装了全新的 Xubuntu 14.04 虚拟机并安装了 Ruby 版本管理器 (rvm)。

尝试安装 SASS gem 时出现以下错误:

$ rvm use 2.0

RVM is not a function, selecting rubies with 'rvm use ...' will not work.

You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for a example.

我检查了这个 StackOverflow 问题并使用配置的终止符来使用登录 shell:

终端机上的登录shell

不幸的是,执行此操作后新终端将不会显示提示:

终结者不工作

知道为什么这不起作用吗?

答案1

您可以通过选中“运行特殊命令而不是我的 shell”让您的 Terminator 将 Bash 作为登录 shell 运行。

  1. 打开终结者
  2. 右键单击窗口并选择“首选项”
  3. 转至个人资料
  4. “命令”选项卡
  5. 确保只选中了“运行特殊命令而不是我的 shell”。
  6. 在命令框中输入/bin/bash --login
  7. 对于标有“当命令退出时”的选项,选择“保持终端打开”
  8. 关闭 Terminator,然后重新打开 Terminator

这应该会让你在登录 shell 中运行 Bash。要验证,请在 Terminator 中输入:

 shopt login_shell

它应该返回“是”,并且您知道您正在运行登录 shell。

相关内容