Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

kill external program

I am trying to play a random music selection in the background of a presentation in impress. Impress can play music of course, but not (I think) randomise the selection. So I call an external program (VLC) to start the music. This works.

Now I need to stop the music at a certain point in the presentation (end of slide 0). I have set a listener which gains control at the end of slide 0. How do I kill my external program to stop the music?

kill external program

I am trying to play a random music selection in the background of a presentation in impress. Impress can play music of course, but not (I think) randomise the selection. So I call an external program (VLC) to start the music. This works.

Now I need to stop the music at a certain point in the presentation (end of slide 0). I have set a listener which gains control at the end of slide 0. How do I kill my external program to stop the music?

Edit: Thanks to Mike Kaganski I can now achieve this under certain circumstances. I 'shell' to a short script which uses 'killall vlc' to stop the music. It works perfectly when the slide show is running in 'Window' (Slide Show Settings - Type - Window; in this form the slide show runs within the Impress process and window already active). When the show runs in 'Default' (which makes it run in a separate process and a detached window), it stops working. I suspect it may have something to do with the directory path associated with the default slide show, but I can't confirm that.

When the show is default mode, any print or msgbox statements do not appear. They're a bit dodgy in window mode too.

kill external program

I am trying to play a random music selection in the background of a presentation in impress. Impress can play music of course, but not (I think) randomise the selection. So I call an external program (VLC) to start the music. This works.

Now I need to stop the music at a certain point in the presentation (end of slide 0). I have set a listener which gains control at the end of slide 0. How do I kill my external program to stop the music?

Edit: Thanks to Mike Kaganski I can now achieve this under certain circumstances. I 'shell' to a short script which uses 'killall vlc' to stop the music. It works perfectly when the slide show is running in 'Window' (Slide Show Settings - Type - Window; in this form the slide show runs within the Impress process and window already active). When the show runs in 'Default' (which makes it run in a separate process and a detached window), it stops working. I suspect it may have something to do with the directory path associated with the default slide show, but I can't confirm that. that.

Do I need to use a script? Can I stop vlc by a call direct to the system?

When the show is default mode, any print or msgbox statements do not appear. They're a bit dodgy in window mode too.

kill external program

I am trying to play a random music selection in the background of a presentation in impress. Impress can play music of course, but not (I think) randomise the selection. So I call an external program (VLC) to start the music. This works.

Now I need to stop the music at a certain point in the presentation (end of slide 0). I have set a listener which gains control at the end of slide 0. How do I kill my external program to stop the music?

Edit: Thanks to Mike Kaganski I can now achieve this under certain circumstances. I 'shell' to a short script which uses 'killall vlc' to stop the music. It works perfectly when the slide show is running in 'Window' (Slide Show Settings - Type - Window; in this form the slide show runs within the Impress process and window already active). When the show runs in 'Default' (which makes it run in a separate process and a detached window), it stops working. I suspect it may have something to do with the directory path associated with the default slide show, but I can't confirm that.

Do I need to use a script? Can I stop vlc by a call direct to the system?

When the show is default mode, any print or msgbox statements do not appear. They're a bit dodgy in window mode too.

kill external program

I am trying to play a random music selection in the background of a presentation in impress. Impress can play music of course, but not (I think) randomise the selection. So I call an external program (VLC) to start the music. This works.

Now I need to stop the music at a certain point in the presentation (end of slide 0). I have set a listener which gains control at the end of slide 0. How do I kill my external program to stop the music?

Edit: Edit (twice): Thanks to Mike Kaganski I can now achieve this under certain circumstances. I 'shell' to a short script which uses 'killall vlc' "killall vlc" to stop the music. It works perfectly when the slide show is running in 'Window' (Slide Show Settings - Type - Window; in this form the slide show runs within the Impress process and window already active). When the show runs in 'Default' (which makes it run in a separate process and a detached window), it stops working. This is a different issue and I suspect it may have something to do with the directory path associated with the default slide show, but I can't confirm that.

Do I need to use opened a script? Can I stop vlc by a call direct to the system?

When the show is default mode, any print or msgbox statements do not appear. They're a bit dodgy in window mode too.different question.

kill external program

I am trying to play a random music selection in the background of a presentation in impress. Impress can play music of course, but not (I think) randomise the selection. So I call an external program (VLC) to start the music. This works.

Now I need to stop the music at a certain point in the presentation (end of slide 0). I have set a listener which gains control at the end of slide 0. How do I kill my external program to stop the music?

Edit (twice): Thanks to Mike Kaganski I can now achieve this under certain circumstances. I 'shell' to "killall vlc" to stop the music. It works perfectly when the slide show is running in 'Window' (Slide Show Settings - Type - Window; in this form the slide show runs within the Impress process and window already active). When the show runs in 'Default' (which makes it run in a separate process and a detached window), it stops working. This is a different issue and I have opened a different question.question here https://ask.libreoffice.org/en/question/138852/listeners-when-impress-runs-in-default-window-type/.

click to hide/show revision 7
None

kill external program

I am trying to play a random music selection in the background of a presentation in impress. Impress can play music of course, but not (I think) randomise the selection. So I call an external program (VLC) to start the music. This works.

Now I need to stop the music at a certain point in the presentation (end of slide 0). I have set a listener which gains control at the end of slide 0. How do I kill my external program to stop the music?

Edit (twice): Thanks to Mike Kaganski I can now achieve this under certain circumstances. I 'shell' to "killall vlc" to stop the music. It works perfectly when the slide show is running in 'Window' (Slide Show Settings - Type - Window; in this form the slide show runs within the Impress process and window already active). When the show runs in 'Default' (which makes it run in a separate process and a detached window), it stops working. This is a different issue and I have opened a different question here https://ask.libreoffice.org/en/question/138852/listeners-when-impress-runs-in-default-window-type/.

kill external program

I am trying to play a random music selection in the background of a presentation in impress. Impress can play music of course, but not (I think) randomise the selection. So I call an external program (VLC) to start the music. This works.

Now I need to stop the music at a certain point in the presentation (end of slide 0). I have set a listener which gains control at the end of slide 0. How do I kill my external program to stop the music?