LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   vlc modified script help needed (https://www.linuxquestions.org/questions/programming-9/vlc-modified-script-help-needed-938410/)

aus9 04-06-2012 12:10 AM

vlc modified script help needed
 
hi

I have a live cd that has this issue with a debian stable vlc

click on a file that vlc can play in gui and nothing happens after associating it with vlc.

run vlc in command mode and you get the following error

http://i43.tinypic.com/2h88o48.jpg

I can half resolve it by running the command

Code:

vlc --plugin-path /usr/lib/vlc/plugins /pathway2/mediafile
Naturally I want to automate above to avoid the command line if possible.

2) I tried to create a new script to associate in my file manager with media files....but it does not play the file but will show the gui vlc and then I have to manually navigate to go to the file

my amateur script looks like
Quote:

#!/bin/sh
vlc --plugin-path /usr/lib/vlc/plugins %f
3) if anyone knows how to mod a script correctly please help

my hard drive running of vlc is not an issue

thanks heaps in advance

schneidz 04-06-2012 05:45 PM

in gnome you can use 'nautilus scripts'

Nominal Animal 04-06-2012 08:37 PM

Try
Code:

#!/bin/sh
exec vlc --plugin-path /usr/lib/vlc/plugins "$@"

Note, I prefer to use qvlc instead of vlc .

The exec means that vlc will replace the shell. Normally, the shell would run the command but stay in memory itself; since there is nothing further to do in the script but to start VLC, it's better to exec instead.

The magic is the "$@" at the end. The shell will replace it with each command-line parameter, just the way they were specified.

aus9 04-07-2012 10:46 PM

Nominal Animal

worked first time thanks heaps

I am remastering a live cd and will add you to the credits as above had been a show stopper

if you don't want to be associated with my personal project let me know here and I will just say a linuxquestions member

once again

thank you

http://techpatterns.com/forums/about2036.html

above link will change frequently while I do things

aus9 04-07-2012 11:16 PM

deleted double post


All times are GMT -5. The time now is 06:43 PM.