Registered Member
|
I am using Amarok 1.4.1 on KDE 3.5.2, and attempting to control Amarok using the webcontrol python script.
When I first run the webcontrol script from within Amarok all seems well. Navigating to http://localhost:4774 shows my current playlist and the pause/stop/skip buttons However, as time goes by, more and more instances of webcontrol.py are run. (I have not been able to work out what is causing this 'python breeding'!) When there is more than once instance of webcontrol.py the web interface loses its functionality. The playlist is still shown but there are no transport controls at the top of the screen. Here is a screenshot: http://www.asktoby.com/miscimages/amarokWebControl.jpg Here is some example output from ps | ax to show the multiple webcontrol.py scripts:
I would dearly love to be able to use WebControl.py to control my Amarok from a wifi PDA but at the moment I cannot do this because of the above problem. What could be causing this 'python breeding' and what could I do to stop it? |
Registered Member
|
In the absence of any advice I've tried tackling this problem myself. I've done most of the work but I'm stuck with just one part. Hopefully someone with some bash scripting experience can advise?
I've written the following script:
Basically I need some way of killing all but one of the WebControl.py scripts. I cannot think of any way to do this but I am by no means a bash scripting expert. Can anyone advise? |
Registered Member
|
I am able to use awk to strip the results of ps to only show the first column of lines containing WebControl.
This gives me a list of numbers of instances to kill. I would need to work through the list killing each one until only one remained. ps ax |grep -v awk| awk '/WebControl/ {print $1}' ps ax lists processes running on the system grep -v awk removes the line created by this line of code itself awk /WebControl/ {print $1}' looks for lines containing 'WebControl' and echoes the first column, the process ID. |
Registered Member
|
To actually kill the WebControl instances,
$ kill PID does not work. I guess WebControl must have been written to ignore the SIGTERM signal. $ kill -kill PID will kill it however. |
Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot], Yahoo [Bot]