Alsa + vlc
First thing lets fire up some sound, to do that we could use a nice guide on the subject;
http://newbiedoc.berlios.de/wiki/Sound_in_Debian_GNU/Linux
Since I know I'll need some of alsa-utils to do what I need, I'm just gonna get that and let it resolve it's own dependency on alsa-base.
# aptitude install alsa-utils
We haven't talked about dependencies much, notice aptitude says "The following NEW packages will be installed: alsa-base alsa-utils linux-sound-base" So if we know what we want we can let Debian figure out what we need to get there.
Once the packages were installed I ran "alsaconf" and followed the defaults as they all made sense to my hardware. I'm impatient so next I ran "speaker-test" and modified my volume control on my keyboard. Once that is sounding right I Ctrl+Z to end that and open up "alsa-mixer" to look at the volumes it set and to make sure things are muted that I want to playback.
Now to really test out my sound system I need to play something back, but I don't have codecs or a player for anything common so I'm gonna grab a nice lightweight player for audio and video:
# aptitude install vlc
And toss it on my menu
[exec] (Vlc) {/usr/bin/vlc} <>
When I toss a CD in my drive and open VLC I just File -> Open Disc, choose Audio CD and there comes the sound through my speakers! Audio setup and media player, check. On to the next thing.
Aterm
Next I want to setup a good looking console. I like aterm and I typically setup a bunch of stuff in my .Xdefaults file for it's behavior, but this time around I'm just going to put a few switches in my ~/.fluxbox/menu to do it quick and easy. Here is my modified line to make it transparent, put the scrollbar on the right, and increase the scroll lines way past the default 64:
[exec] (Aterm) {aterm -tr -sr -sl 2000} <>
Maybe I'll circle back on the .Xdefaults, but this will give you a taste of what you can do with it and enough info to search the internet for other tutorials and examples.
Shutdown
I don't mind doing an exit from fluxbox, then su to root, then a shutdown -h now, but if I can just toss a line in my fluxbox menu to take care of it I'm gonna do that. I know what I'm gonna do so I'll go ahead and take care of the menu, I'm also going to add a seperator for my own brain and comment that "Exit" is now just going to leave fluxbox:
[separator]
[exit] (Exit Fluxbox)
[exec] (Shutdown) {sudo /sbin/shutdown -h now} <>
[end]
Now I just need to make that work, sudo will be our friend.
# aptitude install sudo
Now we need to edit our sudoers file, but we shouldn't use geany, su and do this:
# visudo
Once sudoers is open I'll make it look like so:
# Cmnd alias specification
Cmnd_Alias SHUTDOWN = /sbin/shutdown
# User privilege specification
root ALL=(ALL) ALL
thom ALL = SHUTDOWN
thom ALL = NOPASSWD: SHUTDOWN
All other sections of the file are unchanged INCLUDING the bottom line. Don't open up all of sudo to no password! Don't mess with anything else. Ctrl+X to leave, choose Y to save, then let it use the .tmp. If there are any errors hit "e" to find and correct.
Now I'm doing a last reboot of my entire box, bring it up clean, login as my normal user, then click Shutdown on my new menu item, and down my system goes. Nice and clean.
And the finished product:

No comments:
Post a Comment