Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-06-2012, 12:10 AM   #1
LQ Addict
Registered: Oct 2003
Location: Australia
Distribution: MX 16
Posts: 5,291

Rep: Reputation: Disabled
vlc modified script help needed


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

I can half resolve it by running the command

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
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
Old 04-06-2012, 05:45 PM   #2
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,147

Rep: Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887
in gnome you can use 'nautilus scripts'
Old 04-06-2012, 08:37 PM   #3
Nominal Animal
Senior Member
Registered: Dec 2010
Location: Finland
Distribution: Xubuntu, CentOS, LFS
Posts: 1,723
Blog Entries: 3

Rep: Reputation: 946Reputation: 946Reputation: 946Reputation: 946Reputation: 946Reputation: 946Reputation: 946Reputation: 946
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.
Old 04-07-2012, 10:46 PM   #4
LQ Addict
Registered: Oct 2003
Location: Australia
Distribution: MX 16
Posts: 5,291

Original Poster
Rep: Reputation: Disabled
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

above link will change frequently while I do things
Old 04-07-2012, 11:16 PM   #5
LQ Addict
Registered: Oct 2003
Location: Australia
Distribution: MX 16
Posts: 5,291

Original Poster
Rep: Reputation: Disabled
deleted double post

Last edited by aus9; 04-08-2012 at 06:39 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help me write shell script to check the modified date of a file. thinhnguyenduy79 Linux - Newbie 1 06-17-2011 04:14 AM
VLC: Subtitles when needed jsteel Linux - Software 2 01-18-2011 03:06 PM
script to execute a command based on the last modified time of a folder midadala Linux - Newbie 1 10-19-2010 07:28 AM
VLC installation support needed Jmumba Linux - Newbie 3 08-05-2008 04:58 PM
triggering bash script if directory modified cbb Linux - Software 1 10-23-2004 07:52 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration