Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to combine these two commands:

rvm use 1.9.2



and combine them to run as a standalone program. But when i created a launcher with these two commands inputted, separated by semicolon, it just doesn't work.

How to implement this function?

share|improve this question
rvm use 1.9.2 && redcar


rvm use 1.9.2 || redcar

if the rvm-command fails, redcar is excecuted in the second example and not in the first example.

share|improve this answer

To use a command line program (tiff2pdf) I wanted a terminal with the program help, then an additional note about a related program (tiffcp), then a command prompt so I could use the program in the same terminal. I made an entry in the Gnome laucher of type Application (NOT Application in terminal!):

gnome-terminal -x bash -c "tiff2pdf -h; echo '** See also tiffcp'; exec bash"
share|improve this answer

I'm not sure Gnome launcher supports this, but in a bash script a command like

program1; program2

means - start program1, then start program2 only after the first one terminates.

After some testing I think the most robust thing would be to create a simple script:

rvm use 1.9.2 &
redcar &

set the executable bit on it and then create a launcher which starts this script, i.e. /home/yourusername/

As a bonus - if you create a directory called "bin" in your home folder, put the script there and name it "start_redcar", you'll be able to start it from terminal or from the "Run a command" window which opens when pressing Alt-F2 - by simply typing the command name

share|improve this answer
sh -c "command 1 ; command 2"

did the job for me, directly as a launcher: just create a file and save it as program.desktop, then allow execution as a program (right click -> properties-> permissions -> allow executing as program)

[Desktop Entry]
Comment=This is my comment
Exec=sh -c "command 1 ; command 2"
share|improve this answer
Yay! Your technique also works in the Alt+F2 launcher dialog. It would normally only execute at most one command, at least in LXDE. Now, sth. like sh -c "xeyes & xeyes" works. – tanius Oct 28 '15 at 1:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.