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.
It can be fixed in VLC preferences:
"Allow only one instance"
and"Enqueue files in one instance mode"
like shown below:From now on when you open files with VLC they will be enqueued in your playlist.
You can do that using nautilus-action-Configuration-Tool
Install the tool using using
After that close all the open nautilus instances
Open nautilus-action-Configuration-Tool.
Click the Command tab and enter the command
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.
First Method:
Create a new script called
add-to-vlc
inside the directory~/.gnome2/nautilus-scripts
Add this to the file:
Give permissions to the file:
Now restart nautilus:
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:
Restart Nautilus:
Launch the Nautilus-Actions Configuration Tool from Dash:
In the Action Tab Enter the name you want to save:
In the command tab add the command as below in the picture(path:/usr/bin/vlc and Parameters: --one-instance %B)
Now save and exit, now whenever you right click on a file you can go to Nautlus Actions and choose
Add to vlc
:Solution using no other application/tool: (For
Nautilus 3
)Create a file
~/.local/share/nautilus/scripts/Add to VLC playlist
with following content in it:Command to create the required file:
Make it executable:
Done!
Add to VLC Playlist
fromScripts
submenu.Just include the intended directory or directories (containing audio/video media) in the selection.
For
Naultilus 2
Change
~/.local/share/nautilus/scripts/"Add to VLC playlist"
to~/.gnome2/nautilus-scripts/"Add to VLC playlist"