LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

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
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
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: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948
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
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

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
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Original Poster
Rep: Reputation: Disabled
deleted double post

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


Reply



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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:11 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration