User:Tsu2/LXterminal-login shell

Jump to: navigation, search

From time to time a Terminal console may be used in such a way that login shell functionality is required.

A prime example is if you install rvm (www.rvm.io) which is the Ruby Version Manager. If you execute a direct command like the following that sets the particular ruby version

$ rvm use 2.1.0 --default

you will likely see the following error

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

which is followed by instructions how to resolve running gnome-terminal which is pretty useless for those running other terminals because you won't find the checkbox described in their solution.

The following command is the solution for LXterminal and XFCE terminal

terminalname -e "bash -il" 

So, invoking as lxterminal the following works

lxterminal -e "bash -il" 

To make this a permanent modification to the Menu item, this is somewhat complicated by the fact LXMed cannot be used on openSUSE (It'll corrupt your menus!)

Follow these steps 1. Open the following file in your text editor with root permissions usr/share/applications/lxterminal.desktop

2. Find the following line in the file near the end Exec=lxterminal

And append the string that provides login shell functionality so it looks like the following Exec=lxterminal -e "bash -il"

3. Save the file

4. Execute the following to implement your changes without a reboot lxpanelctl restart

5. Test using the command you had problems before!