Howto: Launch Linuxsampler and Fantasia with a single click
Posted: Sat Feb 02, 2008 7:43 pm
Here's how I launch Fantasia (JSampler) and Linuxsampler with one click on GNU/Linux.
Alternative 1
If you don't already have created a ~/bin/directory, do that now:
Append it to the PATH environment in your ~/.bashrc file:
Now create a file in a text editor, let us call it "startls", with this simple shell script in it and save it to your ~/bin/ directory (adjust the paths to your situation):
Make it executable:
The final touch: Create an application launcher/link on your KDE/GNOME desktop that launch the script. Or just type "startls" in a console.
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.
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.