Vlc failed to quit

macOS specific usage questions
fotis.chrysafis
New Cone
New Cone
Posts: 2
Joined: 05 Sep 2010 10:49

Vlc failed to quit

Postby fotis.chrysafis » 05 Sep 2010 10:56

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?

fkuehne
Developer
Developer
Posts: 7241
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: Vlc failed to quit

Postby fkuehne » 14 Sep 2010 15:03

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.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

fotis.chrysafis
New Cone
New Cone
Posts: 2
Joined: 05 Sep 2010 10:49

Re: Vlc failed to quit

Postby fotis.chrysafis » 15 Sep 2010 18:08

Can you pls tell me how can i do that because i don't know?

fkuehne
Developer
Developer
Posts: 7241
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: Vlc failed to quit

Postby fkuehne » 24 Sep 2010 20:32

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.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

thunderflash
New Cone
New Cone
Posts: 4
Joined: 20 Jun 2011 18:40

Re: Vlc failed to quit

Postby thunderflash » 25 Sep 2011 10:30

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

fkuehne
Developer
Developer
Posts: 7241
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: Vlc failed to quit

Postby fkuehne » 25 Sep 2011 12:23

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 :)
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

g2smil
New Cone
New Cone
Posts: 2
Joined: 03 Oct 2011 13:45

Re: Vlc failed to quit

Postby g2smil » 03 Oct 2011 14:15

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.

g2smil
New Cone
New Cone
Posts: 2
Joined: 03 Oct 2011 13:45

Re: Vlc failed to quit

Postby g2smil » 03 Oct 2011 15:37

Figured it out, decided to run the script using iCal at a certain time.
If anyone knows a better solution let me know!
Thanks!

parisv
New Cone
New Cone
Posts: 1
Joined: 06 Oct 2011 15:32

Re: Vlc failed to quit

Postby parisv » 06 Oct 2011 15:34

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?

sailj32
New Cone
New Cone
Posts: 2
Joined: 17 Dec 2011 16:57

Re: Vlc failed to quit

Postby sailj32 » 17 Dec 2011 20:43

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).

Candarie
New Cone
New Cone
Posts: 1
Joined: 28 Feb 2012 21:41

Re: Vlc failed to quit

Postby Candarie » 28 Feb 2012 21:47

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?

brutedawg
New Cone
New Cone
Posts: 1
Joined: 11 Aug 2012 16:10

Re: Vlc failed to quit

Postby brutedawg » 11 Aug 2012 16:15

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.

rortmanns
New Cone
New Cone
Posts: 1
Joined: 03 Jul 2016 04:40

Re: Vlc failed to quit

Postby rortmanns » 03 Jul 2016 04:43

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.

dfuhrmann
Developer
Developer
Posts: 1183
Joined: 02 Jul 2012 11:09

Re: Vlc failed to quit

Postby dfuhrmann » 03 Jul 2016 16:15

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).


Return to “VLC media player for macOS Troubleshooting”

Who is online

Users browsing this forum: No registered users and 9 guests