Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.
  • I have a laptop. I carry it around to different places and use it.
  • I have nice speakers. I do not carry them around to different places.
  • I have a desktop computer. I do not carry it around to different places, and I rarely sit in front of it and use it.

Naturally, I should connect my speakers up to my desktop computer's nice sound card, and use it to play music. Practically, this has turned out to be very difficult. This may be because I am using Ubuntu on both laptop and desktop, which is not a particularly easy-to-use OS.

For this question, I'm asking how to set up the desktop so that it can play music to the sound card at all times without being logged in locally. The music would be controlled by the laptop, though how exactly to do this is up to you. Music files can be on laptop or desktop (or Android phone, for that matter).

In the past I've had the most success logging in via SSH and running music apps through X forwarding, though "success" is relative. This method doesn't support keyboard multimedia keys or anything that works via DBus, like notifications.

I've tried setting up sharing of files between computers using SSH and scripts, but that's flaky and prone to failure. I've discovered Tangerine music sharing, which seems to work pretty well and obsoletes the SSH file-sharing kludge, but the rest of the solution would need to have DAAP support. I've had much more success with pre-packaged solutions than kludgy scripts.

I previously asked how to set up the desktop to automatically mount my external drives (which have music on them) without logging in, but was unsuccessful.

I've tried setting up PulseAudio like a headless server, but it's never worked for me. I've looked at MPD, but I don't like its lack of features.

Does OS X or Windows 7 have a more smooth solution for this? Is there a dedicated box I can buy that will do this sort of thing?

share|improve this question
add comment

4 Answers

up vote 1 down vote accepted

This might seem like a trivial and silly suggestion, considering your requirements, but have you thought about setting up your desktop for auto-login?

A post-login script could then take care of locking your screen, if needed. Your external drives should then pick up too, and use remoting to control it from your laptop.

share|improve this answer
    
Damn. I hadn't even considered that. That would take care of the PulseAudio and external drives. For "remoting", do you just mean SSH X forwarding like I'm currently doing? –  endolith Nov 13 '09 at 15:34
    
You should suggest that as a solution to superuser.com/questions/53978/… :) –  endolith Nov 13 '09 at 15:36
    
This works great. Just setting the screensaver to lock the screen after a few minutes is good enough for me. A script that calls gnome-screensaver-command --lock could lock it immediately after login, but when I tried this it didn't work. But it's good enough for me. –  endolith Nov 14 '09 at 2:14
    
One problem with X forwarding and similar things is that DBus notifications don't work over the connection. –  endolith Nov 14 '09 at 5:38
    
I'm only familiar with using vinagre for remoting, and strangly can't find any info if has DBus support. Not too experienced with remoting yet, wish I could give you more on that! –  invert Nov 16 '09 at 9:42
show 4 more comments

One possibility is to set up your desktop computer's "desktop" for sharing [System->Preferences->Remote Desktop], then use [Applications->Internet->Remote Desktop Viewer] to connect to it and driver the music player. Okay, yes, this does require you to be logged in locally, and folks walking past your desktop screen will see your mouse moving all by itself.

For a more flexible variant of this, install a VNC server (e.g. vnc4server) and start it up on your desktop computer to create an X display server that has no actual hardware. You can then connect to this remotely from your laptop as well as connecting to it from your desktop's main screen. This gives you a music control screen in cyber-space.

[later edit:] You can tweak the vncserver for specific purposes if desired. For example, to specifically run the music app, you can edit the ~/.vnc/xstartup file to start only the app you want, and remove the default xterm and twm lines from the file. You could have the app start full screen to fill the vnc viewer window.

share|improve this answer
    
That requires me to have the entire desktop open on my screen, though, right? Using X-forwarding over SSH or running a single application in NX is better for that sort of thing. Does VNC provide the same single-app functionality? –  endolith Nov 13 '09 at 15:38
    
Nope. You can ssh into the server, execute the command "vncserver", and log out. Then on your client use "vncviewer desktop:1" to open the virtual desktop. No login to the server console is necessary. –  Shannon Nelson Nov 13 '09 at 23:20
    
But that shows my entire desktop on VNC. I just want to see a music app in its own window. –  endolith Nov 14 '09 at 2:13
    
You could setup the vncserver with a smaller geometry than default and tweak the startup file to run the music app full screen. –  Shannon Nelson Dec 7 '09 at 8:56
add comment

What feature was missing in MPD? I've used it in the past for just this purpose.

Also, for automounting USB drives in a server setup, there is the USBmount package.

share|improve this answer
    
They've provided a convenient list right here: mpd.wikia.com/wiki/What_MPD_Is_and_Is_Not :) Specifically, I want to be able to fix tags in files, delete corrupted files, listen to Last.fm radio, DAAP support, etc. MPD seems to be aimed at a different type of person than I am. –  endolith Nov 13 '09 at 15:32
add comment

Setting up remote control Songbird in Ubuntu:

  1. Install Songbird on server machine, and install GET control Add-on
  2. In Songbird about:config, set extensions.GET-control.localonly to false
  3. cURL needs to be installed on client. Click here to install.
  4. Create this songbird-ctl script on the client machine in ~/bin/. Right-click here and Save Link As ~/bin/songbird-ctl
  5. Modify the script so that instead of localhost it says your server's hostname
  6. Set it executable: chmod +x songbird-ctl

When Songbird is running on the server, you should now be able control it by typing things like songbird-ctl playpause or songbird-ctl mute on the client.

Then, to get multimedia keys working:

1. Install xbindkeys and xbindkeys-config

2. Optionally, create a default configuration with xbindkeys --defaults > ~/.xbindkeysrc

3. Add something like this to the ~/.xbindkeysrc file:

# Multimedia keys for remote control

# Usage: songbird-ctl [port] command
# commands: play, pause, playpause, next, prev, stop, volumeup, volumedown, mute

# If you have separate Play and Pause keys:
#"songbird-ctl play"
# control + XF86AudioPlay

# If you have a Play/Pause key:
"songbird-ctl playpause"
 control + XF86AudioPlay

"songbird-ctl pause"
 control + XF86AudioPause

"songbird-ctl next"
 control + XF86AudioNext

"songbird-ctl prev"
 control + XF86AudioPrev

"songbird-ctl stop"
 control + XF86AudioStop

"songbird-ctl volumeup"
 control + XF86AudioRaiseVolume

"songbird-ctl volumedown"
 control + XF86AudioLowerVolume

"songbird-ctl mute"
 control + XF86AudioMute

4. As you can see, I used the multimedia keys in combination with the keyboard's Ctrl key so that it doesn't interfere with the local computer's volume control, etc. To make them work without Ctrl, just remove it from the file:

"songbird-ctl mute"
 XF86AudioMute

5. restart xbindkeys

There is also a hack using GDM accessibility, which I haven't tried. That might let you control things even when locked out?

Controlling the other computer's PulseAudio volume with the Raise/Lower/Mute keys might be a better idea. Not sure how to do that yet.

For most other music players, you might be able to do something with ReMoot and the Rewwwoot remote control.

share|improve this answer
add comment

Your Answer

 
discard

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.