Monday, June 11, 2012

Crunchbang vs. Ubuntu

I am about to get a Lenovo T520 with Win7, and will plan to dual boot with Linux.  I have been using Crunchbang almost exclusively now for nearly a year.  I have been back and forth with Ubuntu, mostly on older hardware which, to be fair, isn't a very fair comparison. 
So, I have been more recently alternating on a newer Fujitsu T900.  In the end, I think the main conclusion I have is that I really like Openbox, and I don't have so many negative things to say about Unity as others seem to, I think it's fine you have to spend the time using shortcuts and then navigation is fine.  I was reading a post recently about various distros, and I saw an opinion that caught my attention.  Basically, the writer expressed concern about distros that are multiple steps from the base - i.e. Ubuntu vs. Debian, or even Mint (based on ubuntu, based on debian).  Crunchbang is essentially a customized version of Debian, without a bunch of kernal mods as far as I understand it.  I see the logic in this argument, and may make me lean towards more of a Debian install in general.  Then I realized, why don't more people just plain use Debian instead of Ubuntu in the first place?
Ubuntu does offer a lot of things for the person just "starting" with linux, such as basic ease in installing and a fairly intuitive interface.  Yes, I can understand Unity feeling "in the way" at times, however, Windows feels "in the way" often now after I've been using Linux and even Macs for so long now.  After 20 years or working in Windows, however, you just get used to it and it disappears.  I think Unity is similar, it's just new.  And some people hate new.
I started out with ubuntu, and it got me in enough to confidently play around.  Then I went Crunchbang, and now that I understand things, this just makes more sense.
SO.... for getting work done, presentations, etc. I am still deciding whether I want to have ubuntu running or crunchbang, or even go all out and do debian base install and customize it to me (which in the end, would be crunchbang pretty much, so... why not use that?)
I will post my experiences here. Probably will USB boot both for awhile, determine which I want, and then officially install.  We shall see :)

Wednesday, February 29, 2012

apt-get update && apt-get upgrade

I noticed that at times when I am doing my usual updating to my system from the terminal, I will get a message:

    The following packages have been kept back:

Doing the usual:

    apt-get update && apt-get upgrade

will update / upgrade the packages that are  installed.  If new packages have changed "dependencies", then they are held back.  In other words, the upgrades may depend on packages that are new to your system and since they aren't available they will be held back.  To update the packages to the newer versions and fix the dependencies issue, you can run:

    apt-get dist-upgrade

Now the new packages are acquired that satisfy the dependencies of the upgrades, and your system will then update with the newer packages.

Sunday, February 26, 2012

Python

AutoHotKey has been incredibly useful for managing to make my electronic medical record actually useful instead of a hindrence to my daily workflow. I am sure I will continue to use it, however, I have gravitated away from Windows unless I have to (i.e. with work) and I prefer to use Linux predominately (CrunchBang, a Debian based distro) and MacOS as well with the family as they are most adjusted to that and it keeps everyone's iPods working smoothly :)
I think AHK has really whet my appetite for additional programming that I can move between more systems, and after trying out a little intro C++, then Javascript, I've decided the most useful for my needs looks like Python. So far, I have found a great reference to get started from by a guy named Zed Shaw (learnpythonthehardway.org) which is available in the HTML version for FREE. Can't beat that. many thanks to him and I will try to place things that helped to clarify things for me here as usual. At some point, if I am able to cleanly make a program that is more universal for typical EMR's to help fix the many lacking areas of usability within most of them, I might share... but until then, I can blow up my own system without harming others.

Wednesday, January 4, 2012

AutoHotKey - changing default printers

This particular post relates to Windows, specifically Windows 7, Windows XP, and using AutoHotKey to automate some daily tasks / annoyances...

The problem:
I sometimes need to print to one printer in one part of the building, and then shortly thereafter print to another printer in another part of the building, both on the network but in two different physical locations.  What to do?  This is where scripting a very rapid change of default printer would speed things up with a lot less clicking.  By setting up a hotkey to change printers, this can enable you to change printers quickly basically from the command line.  In this case, I want to use the printer in "reception", so I made the hotkey the letter "r" to make it easy for me to remember: (note: I added spaces around the hotkeys so they would display more clearly here, you should eliminate them)



+ # r :: 
     {
          Run, rundll32 printui.dll`, PrintUIEntry /y /q /n \\servername\printername 
          MsgBox Front Office Printer Enabled
          return
     }


Let's break it down:
Brackets: I'm not sure these are actually needed, but I like them so I use them to stay organized.
Run, : this command basically begins the command string in AutoHotKey.  I initially tried this using %comspec% but this was unwieldy and opened a terminal window and I think was too "crufty".  This method just runs the program directly for speed and efficiency.
The important potential source of error here is to escape the comma following printui.dll, because failing to do so will cause the action to fail.  It's a tiny little thing that you might have overlooked at first, but make sure you note it.
The switches are:
     /y - set printer as default
     /q - quiet mode, do not display error messages
     /n - printer name
I experimented with IP address and printer naming, but the name that was most consistent was to use the servername and then the printername found under printer properties / sharing.
The MsgBox is optional - once you prove to yourself that the printer is switching back and forth, you could eliminate the msgbox to reduce another keystroke - it all depends on your goals.

Hopefully this helps someone else as it has helped me.