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:
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
: