LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 04-06-2012, 12:10 AM   #1
aus9
Guru
 
Registered: Oct 2003
Posts: 5,056

Rep: Reputation: Disabled
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
 
Old 04-06-2012, 05:45 PM   #2
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 4,010

Rep: Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624
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: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
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.
 
Old 04-07-2012, 10:46 PM   #4
aus9
Guru
 
Registered: Oct 2003
Posts: 5,056

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

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

above link will change frequently while I do things
 
Old 04-07-2012, 11:16 PM   #5
aus9
Guru
 
Registered: Oct 2003
Posts: 5,056

Original Poster
Rep: Reputation: Disabled
deleted double post

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


Reply


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


All times are GMT -5. The time now is 11:41 AM.

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