Tuesday, April 6, 2010

Loose ends

I had a few gotchas after my conversion, here is what I found and my on-the-fly work arounds.

Audacity

I do some sound editing and I forgot to load audacity, in the repos and an easy fix:

# aptitude install audacity

and for the menu:

 [exec] (Audacity) {/usr/bin/audacity} <> 

Bookmarks

I was using Firefox 3 in Ubuntu as my primary browser, but when I tried to import the bookmarks into Opera it failed. Turns out as of FF3 they handle the bookmarks differently and back them up as json files. I ended up having to put my old HD in an external USB case and boot it so I could do a manual backup of the bookmarks. Once I had the html version they imported correctly.

Passwords

My old password manager was PWManager and I could not import my password database into keepassx. While I was booted via USB back to Ubuntu I did a unencrypted .csv export of my entire database. I'm going to use this opportunity to go out and change every password I had on file to a unique/complex password or delete old unused accounts.

I had a little tweaking to do on my W7 vbox to reconnect shared folders to my home directory, but it was an otherwise very smooth conversion.

Sunday, April 4, 2010

Virtualbox part 2

OK, I'm almost done with my checklist for the weekend, but I've got a few more biggies to go.

Virtualbox
You know I love testing out distro's in vbox, now I've gotta get it install on Lenny. A little trip out to virtualbox.org gives me a link for my sources.list
deb http://download.virtualbox.org/virtualbox/debian lenny non-free

And a simple "aptitude install virtualbox-3.1" gets the job done.

Toss a item on the fluxbox menu like this:
[exec] (Virtualbox) {/usr/bin/VirtualBox} <>

Launch that and agree to the EULA and vbox is done!

Alsa, aterm, and easy shutdown

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:




Saturday, April 3, 2010

Networking with wicd

OK I'm done with Ubuntu and now I need to fixup my laptop for wired/wireless on Debian so I can go to work on Monday. Debian is pretty forgiving if you are just going to plug in a wire or use the same wireless SSID you used during your netinstall, but if you need more than that you'll need a network manager to make it quick and easy.

"Network Manager" is actually a very popular network manager, but you know I like lightweight options. I'm gonna try wicd again (wireless interface connection daemon) even though I've had a few buggy issues come up with it in the past. Worst case we can wipe it and put in Network Manager in it's place later.

Since I'm running Lenny, wicd isn't in my repos it's actually in backports. A little Google takes me to this page.  So a quick scrape of the page and a find/replace on my stuff yields this:
1) update repos with backports:
# geany /etc/apt/souces.list
2) Add this line to it:
deb http://www.backports.org/debian lenny-backports main contrib non-free
3) update
# aptitude update
4) this will throw an error, but since I'm gonna remove it from my repo list as soon as I get wicd I'm going to continue without installing their key.
5) get wicd
# aptitude -t lenny-backports install wicd
(added my user to the netdev group during install when prompted)
6) add wicd to my fluxbox menu
[exec] (Wicd) {/usr/bin/wicd-client -n} <>

That does it, now I've got a network manager. On to the next task.

Full time Debian

I've mentioned before that Ubuntu is my full time desktop OS, I've been running it since 5.10 came out of beta. There have been some great releases, and there has been some frustrating ones too. I've been running the beta of 10.04 for a little while now and I really don't like it.

Given the state of things in the Ubuntu camp I've decided to move forward with Debian as my new desktop OS.  I've converted my T60p to Lenny, using nothing so far but the instructions from my first blog posts.

My previous blog posts left out some pretty big things; network manager, sound, codecs, and virtualization are the biggies I can see right off the top. Expect a flurry of small posts to fill the gaps coming soon. Since this laptop earns my paycheck I've gotta get these things sorted out fast!