Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to run VLC headless from a cron job. The idea is to grab single images from a RTSP stream every two minutes and (later, and in another script) ftp them to a distant machine. The command line I use is (added linebreaks for clarity):

vlc -I dummy rtsp://somesourceaddress/
--rate=1 --vout=dummy
--video-filter=scene --start-time=0 --stop-time=1 --scene-format=png --scene-prefix=img1 --scene-path=/tmp/ --scene-replace 

However, while this works beautifully from a terminal window inside an X session, running this from cron results in the following error message:

[0x81d1154] inhibit interface error: Failed to connect to the D-Bus 
session daemon: Unable to autolaunch a dbus-daemon 
without a $DISPLAY for X11
[0x81d1154] main interface error: no suitable interface module
[0x81d15fc] main interface error: no suitable interface module
[0x80503fc] main libvlc error: interface "globalhotkeys,none" 
initialization failed
[0x81d15fc] dummy interface: using the dummy interface module...

So, where can I obtain suitable values for $DISPLAY if there is none? Or how can I create the DBUS connection manually?

share|improve this question
have you tried the -d switch to run in daemon mode? – bsd Mar 7 '12 at 13:08
up vote 3 down vote accepted

Are these errors really fatal, i.e. do you still get the output you want?

  1. The $DISPLAY error message probably only concerns screensaver inhibition, adding --no-disable-screensaver could solve it (otherwise you can probably ignore it, it's non-fatal). VLC shouldn't need a D-Bus connection for what you're trying to do.
  2. You could also try using cvlc, which apparently doesn't use any interface (this sounds like it's related).
share|improve this answer
Thanks for pointing out the meaning of the "inhibit interface error". It turned out to be non-fatal, indeed. I did not try cvlc since I need to run the controlling script as root, so I use vlc-wrapper already and did not want to complicate things further. – jstarek Mar 7 '12 at 18:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.