2006-03-25

Screen gems

So there's this *nix tool called "screen" that I know has been around a long time and I've seen it before and in use... but never used myself. I never really felt like I had a compelling reason to use it until this week. Now I wish I had added it to my tools arsenal long ago. It's just really handy. It basically just lets you run multiple shell sessions in the same window, BUT with the ability to detach them and re-attach them elsewhere. Now that's handy. I can run some stuff at home, detach the screen and resume it at work with history and output text and all. The multi-session lets me have fewer ssh windows up as well. At the office I just use kterm which has tabs and I keep multiple (maybe too many) windows up. No real need for screen there. But when remotely logged in, it's just that useful.

Then I thought, back when I was doing a lot of remote work before on a previous Linux box, how come I never used it? I guess it's the nature of the work. Back in grad school (ugh, I keep saying that) I did actual developing on my laptop, which I would rsync back to my workstation. In this instance, I can't really do that since I'm not developing (much) and what I do requires running through many gigs of data that I don't, can't, and prefer not to download. So I'm forced to work remotely through ssh. The other thing is, these jobs can sometimes run for hours, of which I don't necessarily need to be connected to completion... or it gets to late and I want to resume the next day. Screen to the rescue, just detach and exit and then the next day re-attach and continue.

I don't know how I missed such a little gem. I'm such a noob.

Just in time Linux

Fates have conspired in my favor for once in a minor way. Meaning... I'm really really glad that I got my home Linux box working last weekend. It turned out that all week long I was working long hours, like until 2am and such. The first day I sat in my cubicle all night, leaving only for breaks and dinner, but only because I didn't realize it was going to take that long so I kept staying a little longer and a little longer. Problem is, the stuff I was working on took a long time to run each step. Luckily, the web is a good time sink but doing it at the office that late seemed like a waste. The next day I saw it coming sooner because the compute servers were clogged with jobs from others in my group and it took half an hour to even get to mine (our job server is decrepit but we don't have the balls to change it). Screw you guys, I'm going home.

Fire up the Linux laptop, turn on the TV, grab some junk food. Ah, much better. Good thing I set my VPN up. Managed to catch up on some queued up shows including a Netflix DVD that I've had for months but was never in the mood to watch; all while monitoring my jobs, making adjustments, checking for errors, and taking the necessary time out to do some actual scripting. I was really really happy I had set this laptop up the previous weekend. I didn't want to go to work the next day, just work from home in front of the boob toob.

Ok, I could have done this anyways with my Winblows computer. I do have cygwin on it afterall, and cygwin is great. But it's more of a crutch and I resist using it too much. I think it has to do with the environment. Maybe it's because I'm used to working a certain way at work with Linux that I can't do completely on Windows. Little things like mouse focus, middle button, copy/paste, etc.; just the feel that I'm used to for that setting. Well there are a couple annoyances, I never figured out how to copy/paste in and out of cygwin windows reliably. Anyhow, I don't have an exact mirror distro and setup on the Linux box (different distro and a better one at that) but most of the basic use is there. It's all familiar and at my fingertips, man pages and all.

Only bad thing is I couldn't get the X forwarding to work. Works fine on my cygwin but won't accept my display on my laptop. It wasn't that important, it was all command line and text editting and thankfully emacs can run in that mode. X was always too slow and annoying remotely anyways but it was occasionally necessary. Correction, it was fine back in grad school when I had T1 in my room (oh how I missed it). On cable internet, there's just enough lag to get turned off, especially when it's just text stuff.

It also worked out that I ended up using Ubuntu instead of Gentoo because the packages are binary and install in a jiffy whereas Gentoo would have taken hours to get set up since it compiles from source. I could see myself getting frustrated knowing I had a lot of work to do but having to wait. There's still a big desire in me to try it out but this is good enough for now.

2006-03-20

First day with Ubuntu

The jury's still out but from what I can tell from a day's tinkering with Ubuntu I can sort of see why it's become so popular. It installed fairly cleanly and I was a little excited to see the login screen and get going rather quickly... and with the sound and screen and most things working. I remember having to do a lot of config file editting to get Redhat working on my old Toshiba (especially the video) and I had all kinds of problems with the sound. I remember moving over to the enlightenment system (still experimental back then) but Rasterman's esound stuff worked pretty well. Anyhow, the only setup problem I had was getting my wireless to work. My Linksys PC card wasn't set up for me. After some digging I finally found an excellent step-by-step guide that did the trick (wasn't about my particular card but close enough). After that was resolved, I could finally unchain my laptop to my switch and move it to the TV room.

Mental notes from a first day's playing with Ubuntu
  • Hey, sudo isn't so bad afterall! No need to keep a root terminal up. Menu'd items work after typing in the password. Fairly straight forward even if it means I'll eventually hate my password from all the typing.
  • The system really is more for the commoner... gcc and g++ not installed by default??!!? Now that's a first.
  • It defaults to Firefox 1.0.7, not 1.5. What's more is there seems to be a dependency on this version of Firefox. I had to do some trickery (found online) to get 1.5 installed and usable. That worries me.
  • The community seems nice and large, some fixes and tweaks were readily findable online.
  • Ugh, package managers. The dependency problems creep in. The package manager app I find quite good but there seems to be stuff missing. See below.
The first thing I did after getting the wireless set up was try and install Ruby. Fine. Go to package manager, select all Ruby related packages. Install. Uh... Interactive Ruby (irb) doesn't seem to be listed in the manager. WTF? Ok, download it from somewhere else. Dependency problems from hell. Look online, do a few more things, try some apt-getting. Nada. So I delete it all, all the Ruby related packaging, and just download the source. Looks like I'll be managing Ruby by myself. This is, incidentally, how I found out my normal compilers were missing.

Ok now for Openvpn and something else I can't recall right now. Package found, great! Uh, looks like the dependencies aren't quite there. I needed to get the -dev packages for some other things.

I admit, managing software manually from source is often the way to go but takes more time and effort grabbing the right things. So I can appreciate package managers for what they do right when they work right, which I guess is most of the time.

So far though, it hasn't been so bad. No matter what distro I use there's bound to be a lot of fixing and tweaking and such. So it's a good thing to start from a system where as much works as possible when one doesn't want to invest the time in starting more from scratch (though that can be its own reward at times) and Ubuntu seems to have a lot of the raw equipment setup stuff down fairly decently (my particular wireless card excepted of course).

I'll probably switch later.

Distro choice

So with my new home Linux box, I was only strongly considering two distros. Gentoo and Ubuntu which from what I understand are at the opposite ends of the user spectrum; Gentoo being geared more towards the hands-on and Ubuntu more towards the commoner.

I wanted Gentoo because
  • I haven't managed my own box in some 8 years and was therefore very rusty with Linux innards. Quite a bit has changed/advanced. I wanted to get back into it.
  • I like the philosophy of Gentoo. I like the idea of optimizing performance for my machine.
  • Someday my office workstation is supposed to use Gentoo.
  • It has a strong following.
But
  • I know it's more time consuming in getting things setup.
  • It would take me quite a bit of digging to learn the ins and outs and details.
  • I just have too many other projects as it is.
Ubuntu was the other option, the fallback options. I was interested because
  • I read a lot of press on it. It seems to be the most popular new distro around.
  • It was easy to set up and use.
  • One of the IT guys tried it out and said it just works pretty cleanly out of the box. Very simple to set up. Sound works, CD works, etc. etc.
  • Seems like the low-maintenance solution
But
  • The feel-good global-tribe theme I find kind of creepy. The naming convention too.
  • No root? Everything is sudo. Now that's odd. Interesting.
  • Having been using Debian for the past many years I've grown disenchanted by it and things based on .deb packages. Same with .rpms and the Red Hat line.
Turns out Gentoo failed to install on the first couple attempts but Ubuntu started up almost perfectly. And there-in lies the deciding factor. I was just not willing to do too much tinkering to get things working and at 4-5am decided I would stick with what worked. I could always switch later. Or maybe I should just face facts that I've become a commoner.

Home Linux again

I haven't had a working home installation of Linux since grad school. Back then it was an ancient Red Hat on my old Toshiba Satellite Pro. Came in really handy. I eventually put Winblows back on it near the end when I lost my home-T1 access but also because I wanted to use Illustrator to work on the graphics in my Diss and a couple other pieces of software. When I finally got a new laptop some 5-odd years ago, I tried several of the newer distributions on that old Toshiba. The install scripts always failed. I did a modicum of research and with the help of a company IT guy I got X to work, like for a day. Rebooting always crashed though. I gave up and gave the laptop away. It was way old anyways with a small drive, little memory, slow processor, small screen... only thing I truly liked about it was the keyboard keys.

So after getting a new computer last year I figured it was time to do it again but with my older Dell laptop. This time, I didn't want to put a lot of time into it, I have enough personal projects to keep me busy. I was going to use the first distro that worked, starting with Gentoo. I burned the latest install CD 2006.0. Tried both install scripts with a couple different configs including the defaults and it failed each time. Did a couple searches but decided that rather than fix it I moved on to Ubuntu which I was also curious about. It worked as advertised, with only a couple gotchas.