Alternative 1
If you don't already have created a ~/bin/directory, do that now:
Code: Select all
$> cd ~
$> mkdir bin
Code: Select all
export PATH=$PATH:$HOME/bin
Code: Select all
#!/bin/sh
linuxsampler --instruments-db-location /path/to/the/instrument_database.db &
java -jar /path/to/Fantasia-0.8a.jar
kill -INT %1
Code: Select all
$> chmod +x ~/bin/startls
Hint: To get a nice looking icon for you launcher/link, look for LinuxSampler-logo.png in the JSample source distribution.
Alternative 2
I've actually changed my mind and now keep LinuxSampler running whenever QJackCtl is running (which is usually always sitting in the system tray).
1.) Open up the "Setup" dialog in QJackCtl and switch to the "Options" page in the notebook.
2.) Check "Execute script after Startup" and fill in "linuxsampler --instruments-db-location /path/to/instruments.db &"
3.) Check "Execute script on Shutdown" and fill in "killall -s INT linuxsampler"
When you now start JACK from the QJackCtl application it will also start an instance of LinuxSampler and shut down and kill all instances of on shut down. Now you can open and close Fantasia or QSampler as many times as you want, LinuxSampler just keep on running in the background until you shut down JACK.