I'm trying to start some software (VLC) when my Debian server boots up. I did try several ways I found in different sources (changing /etc/rc.local, creating a script in /etc/init.d/ and adding it with update-rc.d or rcconf) but in the end after a reboot, I never see the VLC process running.

So my question is :

  • did I do anything wrong in the startup script (shown below)? rcconf displays a star in front of the file name so I assume the script has been linked to the correct runlevels ?
  • is there any way to see if an error occured while the system tried to start VLC? I looked into different /var/log/ files without any luck...

The startup script :

#! /bin/sh

case "$1" in
        su - shtong -c "vlc -I http --http-album-art --http-host= --no-playlist-autostart --configlcrc ~/default.xspf"
        exit 0;
        echo "Error: argument '$1' not supported" >&2
        exit 3
        echo "Usage: $0 start|stop" >&2
        exit 3
  • 1
    Does it work if you run it by hand? If so, then to enable boot message logging, you need to edit /etc/default/bootlogd and set BOOTLOGD_ENABLE=Yes then after rebooting, most of the startup messages will be in /var/log/boot. – DerfK Aug 8 '11 at 20:13

I would like this to be a comment and not an answer, but I don't have enough level to do that.

I was having the same problem when defining actions to do with crontab. Long story short, it executes in a different environment (for security reasons I think), I would suggest to use absolute paths for commands like "vlc", and pretty much every command.

You can find the paths with

which command

Besides. I wouldn't do that su thing with vlc. The startup script is probably going to be run by the superuser anyway, shouldn't it? That shouldn't cause trouble, the superuser can sudo to the infinite (theoretically) but it isn't nice.

Hope this helps at least as inspiration. Also, post the errors when you have them, errors are always very helpful for the diagnosis.

| improve this answer | |
  • I had no error message - my question was precisely how to get error messages. Also I had to su the command because VLC refuses to run when launched with root privileges. – Shtong Aug 9 '11 at 10:46

Thanks to DerfK, I was able to turn on boot logging and see that my command was showing some error messages when launched by the system (it worked fine when launched manually).

To sum up, i modified the /etc/default/bootlogd file to put this line :


After that the errors were visible in /var/log/boot.

(also, for completeness's sake, the problem was that the --configlcrc argument was invalid, and for some reason VLC didn't complain when I tested the command directly in my command line, but does when executed at boot time..)

| improve this answer | |
  • Maybe specify which are the errors as well, and accept your own answer. – Gabriele Cirulli Aug 8 '11 at 20:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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