Using rvm with lxterminal aka making lxterminal login shell

LXTerminal is the standard terminal emulator of LXDE - http://wiki.lxde.org/en/LXTerminal
Locked
Alcareru
Posts: 2
Joined: Thu Nov 08, 2012 8:46 pm

Using rvm with lxterminal aka making lxterminal login shell

Post by Alcareru »

Hi

RVM aka Ruby Version Manager is a shell script that allows using multiple separated versions of Ruby and gemsests. Anyhow, in order for it to function properly it needs the shell to be a login shell. With gnome-terminal the terminal could be easily configured to start as login shell from the configs. With lxterminal there is no such configuration options present. Luckily, the man page reveals there's a command line parameter -l or --loginshell which you can pass to it and then it's started as login shell. However, doing

Code: Select all

lxterminal -l
will make it so that rvm goes from complaining that it is not a function (a symptom of the terminal not being a login shell) to not being recognized at all. Also the username@computer-name part disappears from the terminal so that there's only a $ sign. This is not the behaviour I'm expecting. If I do

Code: Select all

lxterm -ls
then everything works great, rvm works and is a function, but the xterm is so horrible looking that I'd rather not use it.

Here's a screen capture to demonstrate what I mean:
http://dl.dropbox.com/u/15451596/caputre.png
In the picture:
1. lxterminal -l
2. lxterminal
3. lxterm -ls

P.S. Oh yeah in case it matters I'm using Lubuntu 12.10 and LXTerminal 0.1.11

P.P.S. Another weird thing I noted about lxterminal. You can't set the terminal title without setting some other option.

Code: Select all

lxterminal -T "foo" #will not set the title, but
lxterminal -l -T "foo" #or
lxterminal -T "foo" -e sleep 5 #will.
What's with that?
Alcareru
Posts: 2
Joined: Thu Nov 08, 2012 8:46 pm

Re: Using rvm with lxterminal aka making lxterminal login sh

Post by Alcareru »

As suggested here.
The solution is to use:

Code: Select all

lxterminal -e "bash -il"
Locked