Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

The Problem

While you are playing any song or other media file on VLC and open another such file, then another instance of VLC opens. (You aren't going to hear and understand anything until you are a robot)

What I Want

I what to add a "Add to VLC Playlist" to the right click menu of Nautilus as similar in Windows.

share|improve this question
    
blog.revathskumar.com/2011/11/… - this link has a proper answer to this question. –  user35952 Mar 17 '14 at 2:10

3 Answers 3

It can be fixed in VLC preferences:

  • Open VLC preferences by going to tools menu

enter image description here

  • In preferences, Enable "Allow only one instance" and "Enqueue files in one instance mode" like shown below:

enter image description here

  • Click save. That's it!

From now on when you open files with VLC they will be enqueued in your playlist.

share|improve this answer
2  
The original question was about how to "add Add to VLC Playlist to the right click menu of Nautilus". This is not answered, yet. I, too, would like to know how that can be done. I'm not a fan of forcing "only one instance". Any takers? –  nutty about natty Feb 3 '13 at 15:53
    
also check brainstorm.ubuntu.com/idea/17697 where a work-around is suggested using nautilus-actions (a config. tool), but I'm not that fond of that make-shift solution... –  nutty about natty Feb 3 '13 at 18:34
    
This answer is good, but it is more a workaround than a real solution. Is there some (easy) way to add the enqueue option to the right click menu? –  granadajose Dec 12 '13 at 19:26

First Method:

Create a new script called add-to-vlc inside the directory ~/.gnome2/nautilus-scripts

Add this to the file:

#!/bin/bash
for File in "$@"
do
if [ -d "$File" ]; then
zenity --error --text="'$File' is a directory."
exit
fi
done
vlc --one-instance "$File"

Give permissions to the file:

chmod +x add-to-vlc

Now restart nautilus:

nautilus -q 

Now you can use it just right click on a file then go to scripts entry and choose add-to-vlc


Second Method:

Install nautilus actions:

sudo apt-get install nautilus-actions

Restart Nautilus:

nautilus -q

Launch the Nautilus-Actions Configuration Tool from Dash:

enter image description here

In the Action Tab Enter the name you want to save:

enter image description here

In the command tab add the command as below in the picture(path:/usr/bin/vlc and Parameters: --one-instance %B)

enter image description here

Now save and exit, now whenever you right click on a file you can go to Nautlus Actions and choose Add to vlc:

enter image description here

share|improve this answer
    
Additional option would be --playlist-enqueue and for those using multiple instances --no-playlist-autostart –  VRR Jul 24 at 9:58

You can do that using nautilus-action-Configuration-Tool

  1. Install the tool using using

    sudo apt-get install nautilus-action
    
  2. After that close all the open nautilus instances

    nautilus -q
    
  3. Open nautilus-action-Configuration-Tool.

  4. Then click on add new action button and name your action.
  5. Click the Command tab and enter the command

    vlc --one-instance
    

    You should also enter the appropriate parameter into the Parameters box — you can click the Legend button to see a list of parameters you can use.

    In our case, we want the %f parameter to feed filename or better %B if we may have spaces in it.We can also view all the detailes about the parameters by clicking on the Legend button.

    Nautilus-Actions shows you a preview of the command it will run, so you’ll know you’re on the right track.

share|improve this answer
2  
What could you do if filename has space in it?! you should use %B not %f –  Maythux Jul 23 at 14:57
    
Yes @Maythux if the filename has space you should use %B my bad. Also you can check clicking the legend Button –  jaysheel utekar Jul 24 at 4:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.