2

I press ALT+F2 key on my keyboard, and get the launcher HUD up. From there I enter a command as I would in a shell, specifically vlc ~/Music/* -Z. If done from a shell, vlc starts and begins to play music.

However, when done from the launcher, VLC replies:

File reading failed:

VLC could not open the file "/home/[username]/Music/*". (No such file or directory) user Your input can't be opened:

VLC is unable to open the MRL 'file:///home/[username]/Music/%2A'. Check the log for details.

I can't quite figure out what the difference is.

3
  • Try vlc --reset
    – Mitch
    Jun 16, 2012 at 9:12
  • In my version, 2.0.1, --reset is not a valid option.
    – user50849
    Jun 16, 2012 at 10:27
  • sh -c "vlc ~/Music/* -Z" should work, but there is a bug, so quoting doesn't work.
    – elmicha
    Jun 16, 2012 at 11:04

1 Answer 1

0

Someone else pointed it out, but then removed their answer, so I'll add it again.

The reason this particular command fails is that the launcher doesn't use a shell, which means that VLC is literally trying to load a file named *, as opposed to globbing the star into a file list.

A workaround is to call a shell instead, as elmicha pointed out in a comment. sh -c "vlc ~/Music/* -Z" would do this. This however fails due to a bug, again see elmichas comment.

In this particular case, since VLC will recursively traverse directories, the same result can be achieved with vlc ~/Music, which works fine without a shell, and is much simpler.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .