[vlc] Only one VLC instance

Technique TV Inathèque hgibier at ina.fr
Mon Oct 15 16:38:30 CEST 2007


Le 15 oct. 07 à 16:15, Dotan Cohen a écrit :

> I just introduced the stepmother to Linux, and she is rather enjoying
> Fedora. However, she cannot program herself to close any open instance
> of vlc before clicking on another file. I'm no good at bash, and I
> need this working for her _today_, so I'm kindly asking if anyone has
> a wrapper script for vlc that checks if there is a running instance,
> and if so closes it before opening a new instance. Basically, she
> needs the appearance that the new file is 'replacing' the old file in
> the open program. Sorry for the bother, and thanks in advance.
>
> Dotan Cohen
>
> http://what-is-what.com
> http://gibberish.co.il
> א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ- 
> צ-ק-ר-ש-ת
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> _______________________________________________
> vlc mailing list
> vlc at videolan.org
> http://mailman.videolan.org/listinfo/vlc

Hello
In a shell script : you could use "ps" to get back the ID of  
processes running on your system, and "grep" to recover just the ID  
of process running VLC.
Then , you can send him a signal SIGTERM with "kill no_ID SIGTERM",  
it closes VLC.
I try this trick with MAC OS X, it's OK. Don't know how it works on  
Fedora.
Hope this will help you.
Best regards.
Hervé





More information about the vlc mailing list