Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to combine these two commands:

rvm use 1.9.2

and

redcar

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
add comment

3 Answers 3

rvm use 1.9.2 && redcar

or

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
add comment

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:

#!/bin/sh
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/start_redcar.sh

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
add comment

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'; bash"
share|improve this answer
add comment

Your Answer

 
discard

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.