Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
05-19-2014, 07:49 AM
|
#1
|
LQ Newbie
Registered: May 2014
Posts: 25
Rep: 
|
to launch a script to restart alsa after boot of kxstudio
Hello
Due to potential uncorrect boot of alsa and jackd in KXStudio, i need to restart alsa with
$sudo alsa force-restart
after the system has completed its boot sequence.
HOw to do it?
if a write a bash scriopt and put in /etc/init.d/,
how to know if it will processed after completion of the boot preocderure?
thanx
plotino
|
|
|
05-19-2014, 07:52 AM
|
#2
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
|
|
|
05-19-2014, 11:42 AM
|
#3
|
LQ Addict
Registered: Dec 2013
Posts: 19,872
|
good advice from schneidz, but shouldn't we take a step back and try to solve the underlying problem?
are you using kxstudio as a standalone distribution or as a collection of apps installed into an already installed linux system?
|
|
|
05-30-2014, 03:16 PM
|
#4
|
LQ Newbie
Registered: May 2014
Posts: 25
Original Poster
Rep: 
|
to launch a script to restart alsa after boot of kxstudio
Im using kxstudio as stand alone distro
|
|
|
05-31-2014, 01:02 AM
|
#5
|
LQ Addict
Registered: Dec 2013
Posts: 19,872
|
In that case i do not know if schneidz' advice applies because i do not know what sort of start-up kxstudio uses (whether it uses /etc/rc.local).
just tell us what major distro kxstudio is based on.
if you want to solve the underlying problem, you have to expand on this:
Quote:
Originally Posted by plotino
Due to potential uncorrect boot of alsa and jackd in KXStudio, i need to restart alsa
|
because I don't see how this could go wrong on a preconfigured multimedia production distro.
|
|
|
06-04-2014, 02:40 AM
|
#6
|
LQ Newbie
Registered: May 2014
Posts: 25
Original Poster
Rep: 
|
to launch a script to restart alsa after boot of kxstudio
ondoho, it deals with ir_enable option of alsa. fir some unknown reasons, in the normal start up process of kxstudio, the ir interface of creative livedrive is not working.
but if I restart alsa after boot, ir interface starts working.
|
|
|
06-05-2014, 01:27 PM
|
#7
|
LQ Addict
Registered: Dec 2013
Posts: 19,872
|
well then i guess schneidz advice is the way to go.
you might need to add a delay, maybe sth like
Code:
( sleep 5 && alsa force-restart ) &
and then it really depends where you put the script - in rc.local you wouldn't need sudo.
but, to further help with that some information requested is still missing.
|
|
|
06-08-2014, 01:09 PM
|
#8
|
LQ Newbie
Registered: May 2014
Posts: 25
Original Poster
Rep: 
|
ondoho,
rc.local is actually present in kxstudio distro.
so i have to put the call to script here, isnt it?
i think it's based on ubuntu distro.
if you need more info to help me, please ask
ciao
Last edited by plotino; 06-08-2014 at 01:11 PM.
|
|
|
06-08-2014, 03:36 PM
|
#9
|
LQ Newbie
Registered: May 2014
Posts: 25
Original Poster
Rep: 
|
i have tried to put "alsa force-reload" in rc.local
ma the ir interface dont seem to work anyway ..
how to know when the script in rc.local have been execute during the boot process?
is there any log for that?
thanx
|
|
|
06-09-2014, 08:40 AM
|
#10
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
i think so but i dont know what it is (i think it goes to ~/.xsession-errors). i usually do something like this:
Code:
date >> /home/schneidz/rc-local.test && echo calling program from rc.local >> /home/schneidz/rc-local.test
|
|
|
06-10-2014, 07:10 AM
|
#11
|
LQ Newbie
Registered: May 2014
Posts: 25
Original Poster
Rep: 
|
Quote:
Originally Posted by schneidz
i think so but i dont know what it is (i think it goes to ~/.xsession-errors). i usually do something like this:
Code:
date >> /home/schneidz/rc-local.test && echo calling program from rc.local >> /home/schneidz/rc-local.test
|
sorry not so expert about shell comands ...
let me understand ...
&& is a sqeuence of comands (the second will be run only the first one is executed seuccessfully)
date >> is appending date to rc-local.test
echo calling program from rc.local is aappending the string "calling program from rc.local" to file rc-local.test
i suppose after that i need to rename rc-local.test in rc.local
but im still wondering where the date and log string will be output after boot ....
|
|
|
06-10-2014, 08:02 AM
|
#12
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
this is the file it would create for me:
/home/schneidz/rc-local.test
generally speaking it would be: /home/<user>/whatever/floats/your/boat
it just gives a display of whats going on under-the-hood.
|
|
|
06-10-2014, 01:16 PM
|
#13
|
LQ Newbie
Registered: May 2014
Posts: 25
Original Poster
Rep: 
|
to launch a script to restart alsa after boot of kxstudio
but if the file is under your home dir, how can the system launch it automatically?
|
|
|
06-10-2014, 01:20 PM
|
#14
|
LQ Addict
Registered: Dec 2013
Posts: 19,872
|
Quote:
Originally Posted by plotino
i have tried to put "alsa force-reload" in rc.local
|
how exactly did you do that? did you mark it executable?
Quote:
ma the ir interface dont seem to work anyway ..
|
me no savvy???
you can add the line schneidz suggested into that script (the one in /etc/rc.local), that would create a file in your home directory if the script was executed.
Last edited by ondoho; 06-10-2014 at 01:21 PM.
|
|
|
06-10-2014, 01:33 PM
|
#15
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
Quote:
Originally Posted by plotino
but if the file is under your home dir, how can the system launch it automatically?
|
sorry, i should explain that i add a line like that to the end of my /etc/rc.local. when the system boots up it executes the lines in /etc/rc.local and the last line would instruct it to append output to a file in my home directory that i can then check the output for errors and such.
|
|
|
All times are GMT -5. The time now is 09:21 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|