Shutdown after playback?

*nix specific usage questions
Dreakon
New Cone
New Cone
Posts: 2
Joined: 22 Jun 2011 15:14

Shutdown after playback?

Postby Dreakon » 22 Jun 2011 15:32

I'm running Debian Testing and VLC 1.1.10. I'm a little new to the whole Linux scene, so you'll have to excuse me if I sound like an idiot at any point.

Is there any way to shut VLC down after playing back a video file?

According to this page:
http://wiki.videolan.org/How_to_shut_do ... uter#Linux
It should be as simple as making a .sh file. However, things got a little more complicated when it turned out the provided script wasn't working and required root.

I changed the script simply to:

Code: Select all

#! /bin/sh vlc && /sbin/shutdown -h now
... and changed some stuff elsewhere to get the script to work without prompting for a password (the laptop shuts down when I run the script on it's own)... but when I add the script to the VLC playlist and I play it, the laptop doesn't shut down.

Is that Wiki page outdated perhaps? Or am I doing something wrong? Thanks!

chad27295
Blank Cone
Blank Cone
Posts: 10
Joined: 28 Jan 2008 20:06

Re: Shutdown after playback?

Postby chad27295 » 22 Jun 2011 16:32

Just create a simple text file (playlist) with the extension .m3u and enter your media files at the top and vlc://quit at the bottom. This will play your media and quit vlc once it finishes.

mymusic.mp3
vlc://quit



From the command line you will enter vlc playlist.m3u to start the playback!

Dreakon
New Cone
New Cone
Posts: 2
Joined: 22 Jun 2011 15:14

Re: Shutdown after playback?

Postby Dreakon » 22 Jun 2011 16:35

Well, I'm actually looking to shut down my laptop after a file is done playing, not just close VLC. I often put on an episode or two of various shows as I fall asleep and it's nice when the laptop shuts down itself because I doze off from time to time. :)

chad27295
Blank Cone
Blank Cone
Posts: 10
Joined: 28 Jan 2008 20:06

Re: Shutdown after playback?

Postby chad27295 » 22 Jun 2011 19:43

what about if you use vlc-wrapper in your script instead of vlc? That way you could use sudo on your script to run as root. ex:

#! /bin/sh

vlc-wrapper playlist.m3u
shutdown now



I didn't verify this so if it doesn't work I will try myself to see if I can get it to work.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 14 guests