Tuesday, August 19, 2008

SSH Client Persistance

Keep SSH connections from timing out
On your client, add this line to your /etc/ssh/ssh_config:
ServerAliveInterval 30

Saturday, August 09, 2008

Sound Card Info

Check what ALSA soundcards are available on a Linux system:
cat /proc/asound/cards

Check what features each ALSA card has:
cat /proc/asound/devices
# note that the left number column corresponds to a soundcard in the above list

List sound cards detected
aplay -l

Set the default sound card:
# Enter this into /etc/asound.conf or .asoundrc

pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}

Using alsamixer to select which sound card to affect:
alsamixer -c <sound_card_number_from_proc>
Using mplayer with a non-default sound device
mplayer -ao oss:/dev/dsp *.mp3 # device 0
mplayer -ao alsa:device=hw=0.0 *.mp3 # device 0
mplayer -ao oss:/dev/dsp1 *.mp3 # device 1
mplayer -ao alsa:device=how=1.0 *.mp3 # device 1


http://seehuhn.de/pages/alsa
http://ubuntuforums.org/showthread.php?t=747054