Change of direction

Blogging is interesting. I have no idea if anyone is reading this or not. But I think when doing a blog, one needs to ignore that entirely and write as if the whole world is reading.

I came to a conclusion a couple of days ago. And I remembered some of the reasons why I backed away from messing with various operating systems (primarily Linux) a number of years ago.

I don’t have OCD. But I do have tendencies that lean in that direction. As a career computer programmer, that attention to detail and anal retentiveness has served me well. But when it comes to setting up operating systems and software on my personal computer with an infinite number of working scenarios… it tends to really aggravate the whole OCD thing.

Basically, it’s much better for me to just set things up and leave them alone. Ok, not as much fun… but in the long run it’s best. What I really enjoy most about computers is setting them up. Way more than actually using them… the configuration and setup is the part I really like. Getting it all just perfect.

At any rate… my conclusion was… as much fun as messing with Linux is… it’s all just pretty much a waste of time. Reformat, reinstall… configure, repeat. I do learn a lot along the way. But to what use? What difference does it make that I know how to make my terminal screen startup at a certain size? Or that I know how to do that with four different types of terminals?

Linux may be superior to Windows in a lot of ways. But Windows is way better when it comes to things just working out of the box. So at some point it makes sense to stifle whatever idealism and/or curiosity makes me want to run Linux and just go with something that does the job and requires far less time and energy.

So I ended up taking both my desktop machine and my laptop and restoring them to factory setups. So now they’re both happily running Windows and I can once again sleep at night and have time for my wife.

I think I will continue this blog. I did rename it. And it will now be about my general technology adventures rather than focusing on Linux.

And it’s back to Ubuntu

So, yesterday I switched my systems back to Ubuntu proper. The purpose was mainly to clean up my installs from all my messing around. I had originally installed both systems as Ubuntu. Then I ran some command string I found on the web that removed Unity and installed the standard Gnome3 desktop environment. And after that I ran another super-duper command to switch those to Xubuntu without reinstalling. Then I decided I would like to go back to Ubuntu. So I did a super-duper command to do that!

But after all that messing around, I was sort of longing for a fresh install. This was particularly appealing since my last command to switch these systems back to Ubuntu caused me to be unable to login to the GUI. I figure it was just too much messing around with various config options in /etc with regards to the various desktop environments. So clean installs were in order.

At any rate, the primary reason for going back to Ubuntu in the first place was… to run the most popular version of desktop Linux. Along with that (in theory) comes the best support. Both in terms of available software packages and in terms of community resources. And also to deliberately divorce myself from the idea that one is someone cooler and more “hip” if they run a more difficult flavor of Linux.

The thing about Ubuntu… it’s pretty much the same under the covers as any of the other Linuxes. If you take away the desktop environment and installed apps… the various distributions are very much alike. Particularly those that are all derived from the same origin (like Debian).

I suppose it would be nice to run a distro that defaults to a desktop environment that I like. But in recent years I’m learning that it’s often times better for me to just adapt to the software I’m using, and yield to the design preferences of the developers rather than trying to force the software to adapt to my preferences by reconfiguring it all the time.

I figure I can live with Unity. I don’t know why not. And I can certainly install and remove any packages I choose. So I don’t see a problem.

Conditional command IF ELSE

Here is a little different example. This script does one of two commands based on the presence of an argument. It displays a sorted list of installed packages using dpkg (for systems that use that particular type of package management). If an argument is passed, it will only include packages that contain that search argument. Otherwise it will include them all.

#!/bin/bash
criteria=”$1″
# If criteria is not specified, show all
if [[ $criteria = “” ]]; then
dpkg –get-selections | grep -v deinstall | sort | less
else
dpkg –get-selections | grep -v deinstall | grep -i “$criteria” | sort | less
fi

Setting a default if an argument isn’t passed

In doing some bash scripting… I use some simple scripts to automate commands so I don’t have to type in (or remember) all the parameters. This script uses the du command to show me the disk usage on directories. The depth parameter specifies how deep in the path to go when reporting. I wanted the script to function correctly without an argument. So my solution was to test for the argument and use a default value if it’s not present. Without a default value, this command would produce an error.

#!/bin/bash
depth=”$1″
# If depth is not specified, default to zero
if [[ $depth = “” ]]; then
depth=”0″
fi
du -mc -d$depth –apparent-size * | sort -nr | less

Backup script using rsync

Here’s a cute little backup script I wrote. Just a little smarts to suit my particular situation. But I did learn how to prompt for a parameter and do a case statement. The rsync command is a very powerful backup tool. On this particular backup drive (Lacie) I have two sets of backups… (/backup1/ and /backup2/). This script prompts me for which one I want to use and does the right thing. I’m also using an exclude list in the form of a txt file to omit browser caches and the like.

#!/bin/bash
read -p “Backup number (1/2)?” choice
case “$choice” in
1 ) echo “1”;;
2 ) echo “2”;;
* ) echo “Failure to communicate, try again.”;exit 1;;
esac
path=”/home/”
pathfrom=”$path.”
pathto=”/media/Lacie/backup$choice$path.”
rsync -avAX –delete –exclude-from ‘/usr/local/bin/backup-exclude.txt’ “$pathfrom” “$pathto”

Thank you psychocats

After installing Ubuntu and completely removing Unity in favor of the standard Gnome3 desktop, I found Gnome to be not so much to my liking. But there is a great resource available to those who have installed one of the flavors of Ubuntu (Ubuntu, Lubuntu, Xubuntu, Kubuntu). With one big honkin’ command, you can switch from one of those flavors to the other. And this site provides the necessary stuff.

So… not liking Gnome3 that much? Just issue this one big command string and walla! You’re now running Xubuntu! Yes, that is exactly what I did. Worked peachy. And it was almost entirely painless. It’s really just a matter of removing some packages and installing others. All the underlying configuration stays put. All I really had to do is setup the Xfce panels the way I wanted them.

See the big problem I’m having is that there are just far too many choices in the Linux world… and they’re all FREE. So there is no limit to the things one can try. It only costs time. Could be it’s time to just leave things alone for awhile and use my time for something else.

Now that I’m back on Ubuntu I’m starting to read all these things about Canonical trying to force their own display server (Mir) on the rest of the Linux community. The problem is, because Canonical produces the most popular Linux distribution (Ubuntu), they probably have more leverage than they should on the direction of Linux as a whole. The Linux community is already fragmented enough without this kind of bullying.

But it makes me want to stay far away from Ubuntu and it’s derivatives (now that I have just installed one). Gah! I just can’t win. Although I have no compelling reason to make a hasty decision (and spend more time distro-hopping). I’m sure what I have installed will work well for me for several years, if I want it to. And it will be officially supported until April 2015.

Choke!

One funny thing happened yesterday evening. Typically when I switch distros, I keep my desktop and laptop machines in sync and switch them both. That has proven to be valuable. As I was configuring my laptop last night… I was changing ownership of the /var/www directory and I messed up big time and changed the permissions recursively of everything in /var. Holy cow!

Of course that’s a big deal because many of the critical running processes keep track of their status using /var and they sort of need the right permissions to access their control stuff. Took me a few hours to straighten that out. And having two identical installations allowed me to compare the broken one with the non-broken one and correct the ownership.

Next thing to try…

So, I got a brain-storm in the middle of the night (night before last).

First… Ubuntu being the most popular distro, there are advantages to running it in spite of the fact that the Linux geeks who think they are all that look down on it. I don’t mind getting my hands dirty to get things working in Linux and I can pretty much solve whatever problems come up. But at the end of the day, the quicker the path is to looking good and functioning well, the better life is.

There is also an advantage to running the LTS (long-term support) versions of Ubuntu. LTS versions are released every 2 years and officially supported for 5 years. Their other versions which are released every 6 months are only supported for 9 months. I was going to switch to the LTS version awhile back, but the installer for the last LTS release (12.04) does not support LVM (which I was using). So it wasn’t going to work.

However, night before last I was able to get my native Linux backup solution working. With an external hard drive formatted ext4 and some rsync goodness, I had three copies of all my files. The time was ripe… so I re-partitioned my drives getting rid of LVM. Now I was able to install 12.04 (and proceeded to do so).

I also looked into removing the Unity junk from Ubuntu. It turns out that it’s not that hard to remove Unity and go with the standard Gnome3 desktop. So that’s exactly what I did, and it’s all working great. FYI, most of the main Linux distributions (like Fedora and Debian) default to the Gnome desktop. And most the apps I use are Gnome or GTK-based.

So in theory… I should not need to make another change until April of 2014 when the next LTS version of Ubuntu is scheduled to ship. Unless of course I find another excuse.  🙂

One big advantage to running a mainstream Linux distribution… there is tons of support on the net. Pretty much any technical question I come up with can be answered with a quick web search. That rocks!

Attitude

Well, after hanging out in the Debian IRC channels for a few days, I grew rather tired of the major attitude I was observing. Ok… Debian has been around a long time and it’s not as easy to run as say Ubuntu. But that doesn’t mean you have the right to be rude to people that run something else.

They referred to Ubuntu as “linux with training wheels”. Ok, whatever. Yes, I had Debian on both my machines and it was running fine. But the Debian folks are way too principled for their own good. They deliberately omit a lot of extremely useful and necessary software and drivers from their distribution because it doesn’t fit their particular strict definition of “free” and non-proprietary. This causes much unnecessary inconvenience.

Personally, I’m not running Linux because I want to be a communist. I could not care less about those sorts of principles that are put higher in priority above the need for things to actually function.

So I decided, screw the attitude. I’m going back to Lubuntu. Ok, maybe it has training wheels, but it looks a HELL of a lot better than Debian does. I could have tweaked Debian for six months to get it to look as good as Lubuntu does on DAY ONE.

This whole idea that you are somehow cooler and more elite because you run something that takes more work and knowledge to run is a bit of a fallacy. You may be cooler, but I HAVE A LOT MORE FREE TIME! LOL. AND MY SYSTEM JUST WORKS! So who is smarter?

Ok. Thanks for letting me get that off my chest. I love Linux. And I run it because it’s fun. Not for bragging rights. I run a distro that is pretty easy to set up. That’s ok. Instead of taking months to get everything right, I have two systems up and running perfectly with all my software in less than 24 hours.

Here we go again

So, after installing CrunchBang… I started hanging out in the Debian chat channels. I figured that CrunchBang was based directly on Debian… so for all practical purposes, any advice or support for Debian would also pertain to CrunchBang.

But, when I mentioned CrunchBang in the #debian channel, I was told in no uncertain terms that CrunchBang != Debian. And they refused to even talk to me (in spite of the fact that I wasn’t actually seeking support).

So… that evening I wiped my two systems and installed Debian proper. They won’t support something “based” on Debian, so I’ll just run Debian itself and then I can avail myself of the community support.

After installing Debian, I was surprised to discover that the default Debian desktop environment is Gnome. I was totally expecting something more light-weight. A bit disappointing. Then I thought, hey… why can’t I just install a few additional desktop environments along side Gnome and play around? The oh-so-kind folks in the #debian channel assured me that would be a piece of cake.

And piece of cake it was. Up until the point where I checked out the available programs in the Gnome GUI and saw four different file managers, several image viewers, and duplicates of just about every type of program and utility that came pre-installed. You see, each desktop environment normally gets paired with different programs to fulfill particular functions. So I essentially ended up with three or four programs in each category that did essentially the same thing. Bogus!

I proceeded to wipe both systems (yet again). I reinstalled Debian on both, but this time I decided to stick to only one desktop environment. I chose Xfce for my desktop machine and LXDE for my laptop.

So they’re both installed and running perfectly. But holy cow, this is getting old. After all this screwing around I am actually considering going back to Ubuntu or a supported flavor of Ubuntu. Ubuntu is the most popular. But when it comes to “mainstream”… Ubuntu is pretty much for newbies, while Fedora and Debian are the two heavy hitters for people who don’t need their hands held.

As good as CrunchBang was… I don’t really like the idea of running something that is “almost” Debian. Or something that is “based on” a mainstream distro… but comes without any real support from that originating distro’s community (think red-headed step-child).