2

I have VLC media player and media files on a desktop CentOS 6.3 set up (without a GUI). I can play the media files at the machine but when I issue the command via SSH it is silent. I'm guessing it's because there is peripheral confusion when using SSH.

I looked into X11 forwarding but I must not be understanding it correctly because it still doesn't work. I'm starting to think that's for GUI purposes and not CLI.

How can I SSH to my desktop and use the peripherals of the desktop when I issue the commands remotely?

1
  • Pulseaudio can route audio over the network. wiki.openwrt.org/doc/howto/pulseaudio I had it working many-many moons ago, but I changed hardware and it is no longer required for myself. I know it exists, I don't know how to implement it. Hence a link that I think is useful in a comment, rather than a full blown answer.
    – jippie
    Feb 3 '13 at 11:55
4

I realized it was working for root only. Running it as a normal user in VLC's ncurses interface i typed L and seen error messages about permissions:

[alsa] cannot open ALSA device "default": Permission denied
[main] Audio output failed
[main] The audio device "default" could not be used:
[jack] failed to connect to JACK server
[main] no suitable audio output module
[main] failed to create audio output

After some Googling i seen people were saying add the user to the audio group. I did:

cat /etc/group |cut -d: -f1 and verified that i did indeed have an audio group already.

So i did this:

usermod -a -G audio marshall which added my user "marshall" to the audio group.

Worked great!

2

A good alternative that I actually use a lot to control the music on my computer from another device on the same network (even my phone over wifi), is the VLC web interface, as nicely explained on this entry on the vlc wiki and also here.

vlc -I http

To access it, on a web browser you go to http://127.0.0.1:8080/

Instead of 127.0.0.1 you need to type the ip of the server.

Edit

I forgot to mention that on the server you need to edit the vlc .hosts file to allow other devices to access the web interface. Otherwise, VLC only allows local connections. The file should be at /usr/share/vlc/lua/http/.hosts, at the end you need to add the ips of the devices you want to have access from.

8
  • Actually, i have the music and sound system on the server. My question is how can i start the music over ssh with my laptop and have it play on the sound system that is hooked up to the server?
    – Emery King
    Feb 3 '13 at 6:04
  • Yeah I was unsure of that. I'll delete this and post another one. I think I know how. ANd may not even need to use ssh.
    – lmcanavals
    Feb 3 '13 at 6:08
  • Weird, it is working after installing screen but i'm not actually using screen...
    – Emery King
    Feb 3 '13 at 6:09
  • the only other difference is that i had logged out of the actual server so that the only user logged in was the ssh session on my laptop.
    – Emery King
    Feb 3 '13 at 6:12
  • but yeah, over an open ssh session, it should work without problems.
    – lmcanavals
    Feb 3 '13 at 6:17

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.