在Xubuntu 14.04中使用登录Shell


8

我安装了一个新的Xubuntu 14.04虚拟机,并安装了Ruby Version Manager(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:

登录终止程序

不幸的是,这样做之后,新的终端将不会显示提示:

终结者不工作

任何想法为什么这不起作用?


尝试使用Terminal而不是Terminator。另外,检查在错误消息中发布的网站,您需要确保〜/ .bash_profile中有条目来提供其解释中提到的RVM脚本。启动Terminal后,键入“ / bin / bash --login”,然后重试原始命令。这将bash作为登录外壳启动,完成后键入'exit',您应该会看到注销。
RCF 2014年

安装终结者后,我无法复制您的问题。勾选标有“运行自定义命令而不是我的外壳程序”的框,然后在“自定义命令”框中的/ bin / bash --login中进行输入。
RCF

@ RCF-U14.04我刚刚尝试使用默认控制台,但得到的结果相同。即使我使用“ / bin / bash --login”命令。
ElelMael 2014年

@ RCF-U14.04我的意思是我得到了相同的结果,即光标只是闪烁,就好像它正在执行命令或无限循环一样。
ElderMael 2014年

让我们尝试这种方法,看看是否可以获得一些结果。卸载gnome-terminal“ sudo apt-get remove gnome-terminal”此外,Unistall Terminator,“ sudo apt-get autoremove Terminator”,然后重新安装“ sudo apt-get install gnome-terminal”。
RCF

Answers:


6

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

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

这应该让您在登录Shell中运行Bash。要进行验证,请在Terminator中输入:

 shopt login_shell

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

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.