Adding ‘Play content of this folder as DVD video in SMPlayer.’ entry to the right click menu in Thunar.

Hi folks.

I assume You have a fully upgraded system.

Run this:

su

Now give it root’s password.

Now run this:

pacman -S smplayer libdvdcss libdvdnav libdvdread

and agree to install all the packages and their dependencies.

Now run this:

mcedit /etc/udev/rules.d/82-cdrom.rules

and paste this as a content:

SUBSYSTEM=="block", KERNEL=="sr0", SYMLINK+="cdrom cdrw dvd dvdrw"

Big thank You to sudokode for helping me with the udev rule.

Now save the file and close editor

F2

to save,

F10

to exit. You can use any other text editor like vi, nano etc.

I have a bunch of folders on my hard drive containing a DVD videos. Family videos from Christmas, Weddings, Baptisms and other occasions recorded with my Camcorder in DVD format and then backed up to my HDD. I could rip them into .avi files just to make it easier to play them but then I am risking loosing the quality. It would be pointless really – recording in DVD quality just to encode it to avi… If not the waste of quality then definitely a waste of time and cpu power / electric energy.

Anyway as You probably know DVD video content is a whole structure. It’s not just one file so it’s not as easy as going into the file’s folder and clicking on it to make it playable. There are .vob files inside that could be played one after another… sure but it’s a waste of time again plus each DVD has at least 2 – 4 of those .vob files you would have to click on each of them to watch the entire video and sometimes the rewinding or fast forwarding won’t work when You do that… Nah… That won’t work for me.

When You right click on something in Thunar You get right click menu. I have decided to add ‘Play content of this folder as DVD video in SMPlayer.’ entry to this menu in my Arch Linux. It took me a while but I have succeeded. Here is how:

Open terminal and run:

mkdir -p ~/.bin

mcedit ~/.bin/Play_Folder_As_DVD_In_Smplayer.sh

Now paste this as a content

#!/bin/bash
MYPWD1=`pwd`
#mplayer dvd:// -dvd-device "$MYPWD1"
smplayer "dvd://1//$MYPWD1"

Adding Play content of this folder as DVD video in SMPlayer entry to the right click menu in Thunar 001

Now save the file and close editor

F2

to save,

F10

to exit. You can use any other text editor like vi, nano etc.

Now run:

chmod 700 ~/.bin/Play_Folder_As_DVD_In_Smplayer.sh

Adding Play content of this folder as DVD video in SMPlayer entry to the right click menu in Thunar 002

You can close the terminal.

Now open Thunar, click on Edit > Configure custom actions…

Adding Play content of this folder as DVD video in SMPlayer entry to the right click menu in Thunar 003

Now click on the green + button to add custom rule.

Adding Play content of this folder as DVD video in SMPlayer entry to the right click menu in Thunar 004

Adding Play content of this folder as DVD video in SMPlayer entry to the right click menu in Thunar 005

Use those details:

Name:

Play content of this folder as DVD video in SMPlayer

Description:

Play content of this folder as DVD video in SMPlayer

Command:

cd %n && ~/.bin/Play_Folder_As_DVD_In_Smplayer.sh

Adding Play content of this folder as DVD video in SMPlayer entry to the right click menu in Thunar 006

Now click on the “No icon” button and choose the SMPlayer icon from the “Application icons” set.

Adding Play content of this folder as DVD video in SMPlayer entry to the right click menu in Thunar 007

Adding Play content of this folder as DVD video in SMPlayer entry to the right click menu in Thunar 008

Now click on the “Appearance Conditions” tab. Un-tick the “Text files” box and tick the “Directories” box.

Adding Play content of this folder as DVD video in SMPlayer entry to the right click menu in Thunar 009

Adding Play content of this folder as DVD video in SMPlayer entry to the right click menu in Thunar 010

You can now “OK” this window.

Adding Play content of this folder as DVD video in SMPlayer entry to the right click menu in Thunar 011

and “Close” the “Custom actions” window.

Reboot Your machine for the udev rule to kick in.

Right click on any folder containing DVD structure and choose Play content of this folder as DVD video in SMPlayer from the menu. Smplayer will start and will start playing DVD from the folder that You have chosen.

Adding Play content of this folder as DVD video in SMPlayer entry to the right click menu in Thunar 012

Hope someone will find it useful.

Regards.

Andrzej

AndrzejL

"Never meet Your heroes. Most of the time you'll only end up disappointed." White Polak Male Husband Employee Hetero Carnivorous Fugly Geek @$$hole with ADD Catholic “Some men just want to watch the world burn.”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.