Hey together,
I use kxstudio with kde.
I want to start Guitarix by script in maximized view
and I want to establisch my micro connection and jack connection also by script after guitarix has started.
This is my script one to start guitarix:
#!/bin/bash
kstart --maximize guitarix &
exit
and my script for the jack connections:
#!/bin/bash
jack_connect system:capture_2 gx_head_amp:in_0 &
jack_connect gx_head_amp:out_0 system:playback_2 &
jack_connect gx_head_amp:out_0 system:playback_1 &
exit
both scripts I placed in /etc/init.d
and i registered both scripts in system settings automated starts.
in the terminal both scripts work fine. But when its starting the guitarix is not in full view mode started and the connection to jack havent been establised.
I hope you could help me here.
Thanks,
Thomas
Starting guitarix and its connections to jack by script
Moderators: MattKingUSA, khz
-
- Established Member
- Posts: 3
- Joined: Tue Nov 20, 2018 9:22 pm
Starting guitarix and its connections to jack by script
Last edited by Thomas_Harp on Fri Nov 23, 2018 10:05 am, edited 1 time in total.
-
- Established Member
- Posts: 2347
- Joined: Mon Jul 01, 2013 8:13 am
- Has thanked: 9 times
- Been thanked: 466 times
Re: Starting guitrix and its connections to jack by script
Hi
Can't really help you with the maximised view, but for the connections, usually guitarix remember it's connections and re-establish them on next start, so no script should be needed for that.
The maximised view is a desktop thingy, maybe you should place your scripts in the users autostart folder instead in /etc/init.d as that ensure that your desktop and user environment is fully loaded.
regards
hermann
Can't really help you with the maximised view, but for the connections, usually guitarix remember it's connections and re-establish them on next start, so no script should be needed for that.
The maximised view is a desktop thingy, maybe you should place your scripts in the users autostart folder instead in /etc/init.d as that ensure that your desktop and user environment is fully loaded.
regards
hermann
On the road again.
Re: Starting guitrix and its connections to jack by script
Can someone please fix this title? It's bad for people who search for topics with a search filtered by titles.
-
- Established Member
- Posts: 3
- Joined: Tue Nov 20, 2018 9:22 pm
Re: Starting guitarix and its connections to jack by script
Hey Herman, thanks, I will check the result when the scripts are in the Autorun folder this evening. Regards Thomas
Re: Starting guitarix and its connections to jack by script
Hey, I'm creating a shell script to start jack and guitarix also. I was able to get it working with the following script:
qjackctl & # start Jack with GUI
guitarix & # open guitarix for guitar - distortion
guitarix & # open guitarix for vocals - clean
sleep 3 # pause so jack has time to setup connections
jack_disconnect -s default system:capture_2 gx_head_amp-01:in_0 & # remove that one
exit
Guitarix sets up default connections on startup but i don't know how to modify them, and my default connections always have one connection i don't want, so I needed to use the jack_disconnect command. before I added "-s default" to it I was getting the error:
Cannot connect to server request channel
...
So if anyone reading this is getting the same error:
start Jack manually
go to Setup
and in the Setting tab rename Preset Name to "default" (or whatever you want)
and add "-s <name>" to any jack_disconnect, jack_connect, ect. commands in your script to specify the server name.
I also needed to add the "sleep 3" command before jack_disconnect in order to pause the script for 3 seconds so the default connections can be setup before you mess with them.
qjackctl & # start Jack with GUI
guitarix & # open guitarix for guitar - distortion
guitarix & # open guitarix for vocals - clean
sleep 3 # pause so jack has time to setup connections
jack_disconnect -s default system:capture_2 gx_head_amp-01:in_0 & # remove that one
exit
Guitarix sets up default connections on startup but i don't know how to modify them, and my default connections always have one connection i don't want, so I needed to use the jack_disconnect command. before I added "-s default" to it I was getting the error:
Cannot connect to server request channel
...
So if anyone reading this is getting the same error:
start Jack manually
go to Setup
and in the Setting tab rename Preset Name to "default" (or whatever you want)
and add "-s <name>" to any jack_disconnect, jack_connect, ect. commands in your script to specify the server name.
I also needed to add the "sleep 3" command before jack_disconnect in order to pause the script for 3 seconds so the default connections can be setup before you mess with them.
-
- Established Member
- Posts: 2347
- Joined: Mon Jul 01, 2013 8:13 am
- Has thanked: 9 times
- Been thanked: 466 times
Re: Starting guitarix and its connections to jack by script
A simple solution would be to give your guitarix instances a name,
so and will start a separated instance of guitarix with it's own configuration, so you avoid interferences between the instances. Both instances will start then with it's last, own, used settings (including there connections).
More on that, you could configure the guitarix intern jack start helper to start Qjackctl, so you just need to start both guitarix instances and the first instance of guitarix will start Qjackctl for you and both guitarix instances will do the connections you used to use.
so
Code: Select all
guitarix -n Distortion
Code: Select all
guitarix -n Vocals
More on that, you could configure the guitarix intern jack start helper to start Qjackctl, so you just need to start both guitarix instances and the first instance of guitarix will start Qjackctl for you and both guitarix instances will do the connections you used to use.
On the road again.