Code: Select all
Usage: non-session-manager [--nsm-url...] [-- server options ]
Moderators: MattKingUSA, khz
Code: Select all
Usage: non-session-manager [--nsm-url...] [-- server options ]
Code: Select all
#!/bin/sh
#Invoke with nsmopen.sh projectname
PROJECT=$1 #for better readability
eval $(nsmd --detach) #command returns a line to set the NSM_URL which we use to actually set it.
{
#keep in brackets so that PID and nsm are in the same group. otherwise wait below will complain
non-session-manager --nsm-url $NSM_URL &
PID=$! #Remember to check when the GUI closes
}
sleep 1 #leave NSM time to start up. Otherwise you will see some glitched session display
#oscsend is part of liblo, which nsm depends on. So no extra program to install
oscsend $NSM_URL "/nsm/server/open" s $PROJECT
wait $PID
echo "GUI closed. Closing detached nsdm server"
oscsend $NSM_URL "/nsm/server/quit"
It really is a workaround. One could write a patch to non-session-manager to load a session after start. But this took me already over an hour, in an environment I am familiar with. So let's leave it for now..I didn't think it would be that complex but thank you very much.
Code: Select all
chmod +x nsmstart.sh
Code: Select all
sudo cp nsmstart.sh /usr/bin/nsmstart.sh
My test session is labeled session and consists of 3 clients: Carla, JACKPatch and Non-Mixer. Within Carla I have a mixture of addon's. After installing liblo-tools I run your script with the following results:nilshi wrote:I wrote you a starter script in bash.
Code: Select all
bob@UbuntuStudioSSD:~/.local/share/scripts$ ./nsmopen.sh session
[nsmd] Session root is: /home/bob/NSM Sessions
[nsmd] Detaching from console
X_ChangeProperty: BadValue (integer parameter out of range for operation) 0x0
they/them ta / libreav.org / wiki.thingsandstuff.org/Audio and related pages / gh