Re: Only one instance of mPlayer/VLC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 15/10/2007, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote:
> On Mon, 15 Oct 2007 20:34:33 +0200
> "Dotan Cohen" <dotancohen@xxxxxxxxx> wrote:
>
> > On 15/10/2007, Mark Knoop <mark@xxxxxxxxxx> wrote:
> > > Dotan Cohen wrote:
> > > > The stepmother is now enjoying her first few hours on Fedora. One
> > > > thing that she cannot program herself to do is to close any open
> > > > instance of mplayer or 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 the Fedora community if anyone has a wrapper script for
> > > > mplayer/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.
> > >
> > > pkill mplayer; mplayer <file>
> > >
> > > --
> > > Mark Knoop
> >
> > Thanks, Mark, but she's over 70 and can barely see the screen. I don't
> > think she's aware that there's an input device other than the mouse.
> > She's not exactly the terminal type. She needs a script that I can
> > place in ~/bin/mplayer that will call /usr/bin/mplayer with any
> > arguments sent to ~/bin/mplayer such that if mplayer is already
> > running, it will be killed before another process starts.
>
> Which what Mark's answer is in reality
>
> #!/bin/sh
> pkill mplayer
> /usr/bin/mplayer $*
>

For whatever reason, it does not close the previous vlc instance. I have tried:
#!/bin/sh
pkill vlc
/usr/bin/vlc "$*"

And also with /bin/bash instead of /bin/sh. The script is in
~/bin/vlc, with permissions -rwxr-xr-x and ~/bin is in my path. I
right-click a video file and using Konqueror's "open with" dialog I
type in the full path to /home/user/bin/vlc to open one file, and then
another. However, the first vlc instance stays open. I checked and
pkill vlc from Konsole _does_ kill all open vlc instances. So I don't
understand why the script does not close them. Any ideas?

Dotan Cohen

http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux