Page 1 of 1

Vlc failed to quit

Posted: 05 Sep 2010 10:56
by fotis.chrysafis
I'm using the VLC 1.1.3 for MacOs snow leopard and whenever i'm using the auto shutdown and i'm watching a video file in full screen i'm getting the following error:
'You haven't been logged out because the application VLC failed to quit. To try logging out again, quit VLC and choose Apple menu > Log out'. How can i solve that problem?

Re: Vlc failed to quit

Posted: 14 Sep 2010 15:03
by fkuehne
You probably need to make VLC stop playing the video before shutdown (using an AppleScript or an Automator action for example). VLC prevents screensavers and sleep mode during playback. This feature is probably the cause for your problem.

Re: Vlc failed to quit

Posted: 15 Sep 2010 18:08
by fotis.chrysafis
Can you pls tell me how can i do that because i don't know?

Re: Vlc failed to quit

Posted: 24 Sep 2010 20:32
by fkuehne
You can use the following AppleScript:

Code: Select all

tell app "VLC" activate stop quit end tell
Copy & paste this to the "Script Editor" in /Applications/AppleScript or the "AppleScript-Editor" in /Applications/Utilities (depending on your OS version) and save this as application. Tell the OS to run this application prior to shutdown. There are cool apps available (such as iWannaSleep) which are made for this purpose.

Re: Vlc failed to quit

Posted: 25 Sep 2011 10:30
by thunderflash
Why so complicated?
(i know, old post. But i had the same problem and this was the first to pop up, but i found imho a better solution)

Code: Select all

tell application "VLC" to quit tell application "Finder" to shut down
start this script timebased with you favorite app

Re: Vlc failed to quit

Posted: 25 Sep 2011 12:23
by fkuehne
Last year's VLC contained a bug, which is why you needed to activate it prior to quit. This is no longer necessary, so your simplified script is actually alright :)

Re: Vlc failed to quit

Posted: 03 Oct 2011 14:15
by g2smil
Is there a way to get VLC and Finder to quit at a certain time in applescript?
Right now I have the energy savings set to turn on at 6am and turn off at 6pm.
But VLC keeps preventing the shutdown.

Re: Vlc failed to quit

Posted: 03 Oct 2011 15:37
by g2smil
Figured it out, decided to run the script using iCal at a certain time.
If anyone knows a better solution let me know!
Thanks!

Re: Vlc failed to quit

Posted: 06 Oct 2011 15:34
by parisv
I'm trying to achieve the exact same thing only the time slightly different from 9-5.

Could I have a copy of this script?

Re: Vlc failed to quit

Posted: 17 Dec 2011 20:43
by sailj32
For the record, here's what worked for me: Snow Leopard 10.6.8, VLC 1.1.12.

1. Create this script using AppleScript Editor:

tell application "VLC"
activate
stop
quit
end tell
delay 10
tell application "Finder" to shut down

2. Save as type Script anywhere you like. I named my script "Quit VLC and Shut Down"
3. Create an iCal event that repeats every day at your shutdown time.
4. In this event, set an alarm that runs this script at 0 minutes before the event time.
5. In System Preferences : Energy Saver : Schedule, set a startup time but not a shutdown time. Your iCal event will take care of shutdown.

The activate and stop may not be needed, but from the other posts here, there have been bugs in earlier versions of VLC that made them necessary.
The "delay 10" step is only to allow time for VLC to quit, and might not be needed; however it is also possible that it should be longer depending on the streaming source. I'm only streaming audio from the internet (jazz24.org).

Re: Vlc failed to quit

Posted: 28 Feb 2012 21:47
by Candarie
This is a very Linux answer to a MacOSX problem.

Why can't this code be baked into VLC? Is there some problem that VLC faces that is different from every other OSX app? Is the code "if I am asked to quit, then quit." invalid here? I mean even the AppleScript is just "tell application VLC to quit"?

If indeed this AppleScript is 100% necessary, why can't VLC install it by default? Or could VLC call the "tell application VLC to quit" AppleScript on it's own?

Re: Vlc failed to quit

Posted: 11 Aug 2012 16:15
by brutedawg
Why can't this code be baked into VLC? Is there some problem that VLC faces that is different from every other OSX app?
This is what I want to know. I've used VLC for 2yrs now and I can't tell you how many nights I've waken up from a bright screen at 3 or 4 am with a little window telling me "VLC decided it wants to stay up partying"

I want to fall asleep to movies/shows but I don't want to have to wake up at 3am to put my screen to sleep or shutdown manually.

Re: Vlc failed to quit

Posted: 03 Jul 2016 04:43
by rortmanns
Does anyone know if this has ever been fixed? It's an old issue and I'm currently getting it on my Mac mini which I've just setup as a headless player.

I turn this Mac on and off adhoc as needed, so this isn't a timed operation. I turn off with an app in my iPad.

Re: Vlc failed to quit

Posted: 03 Jul 2016 16:15
by dfuhrmann
I'm not sure what your use case is, but please try it with latest VLC 2.2.4 and upcoming VLC 3.0. We made improvements which should enable VLC to quit like for other UNIX programs (i.e. a normal SIGTERM should work now).