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.

Monday, December 5, 2011

Mouse Speed

I have been using #! 10 (Openbox) on a USB HDD and a regular USB pendrive because I don't have a computer to dedicate completely.  As such, occasionally I will get running on a computer and the touchpad is either way too fast or too slow.  This can be controlled using the xset command.  To avoid doing this all the time, I added this to my autostart.sh file (and commenting out the ones I did not need but left in for reference).  These were lifted from the crunchbang forums: (http://crunchbanglinux.org/forums/topic/1511/how-to-increase-mouse-speed-or-motion-for-lack-of-a-better-word/)

       xset m 7 10 &                  Very Fast
       xset m 3 10 &                  Normal (Fast)  
       xset m default &              Default speed
       xset m 0 10 &                 Glacial



So, in your autostart.sh file, this might look like this for 'default' speed: 


       ##   xset m 7 10 &             ## Very Fast
       ##   xset m 3 10 &             ## Normal (Fast)
       xset m default &                ## Default speed     <--- not commented out
       ##   xset m 0 10 &             ## Glacial

This way, you can change the sensitivity for a given computer / notebook that you are using on a regular basis without having to change it each time. Of course, if you swap computers a lot, it is worth just knowing the command you can enter at the terminal as well.  It is fairly convenient to remember simply xset m default and this has worked for me on most of the computers I have used thus far.

Tuesday, November 29, 2011

Debian SqueeZe Repositories

This is a good newbie thing to learn:

I was trying to update my #! and was getting EXTREMELY slow downloads.  The default ftp debian repository is in Europe, so I thought I should probably make this closer, say, in the U.S. for example.  So, how do you do that?

The debian repository that is std on #! Statler is for debian SqeeZe is listed in a file called sources.list, and it can be found from within the terminal at:

     /etc/apt/sources.list

so, you can start by changing into that directory:

     cd  /etc/apt

then

     sudo gedit sources.list


(I did this as sudo because I don't presently know how to access this file otherwise. Please feel free to comment if there is a better way to change read-only permission!)

This will provide the list of sources within the file.  I added a # in front of the currently used ftp from Europe, which is listed as:


     http://ftp.de.debian.org/debian/ squeeze main contrib non-free


which I changed to:
   
     http://ftp.us.debian.org/debian/ squeeze main contrib non-free


This sped things up quite a bit and I completed all updates within minutes as opposed to hours or days.   I think this wasn't obvious and is likely a very early thing one should do when installing #! in the US. It makes additional downloads and software much smoother to obtain as well.

Monday, October 24, 2011

Crunchbang Time #!

To set time in Crunchbang Statler:

sudo apt-get update
First update the system.  

sudo install ntpdate
ntpdate is the pkg to sync to time server.
edit: I have had to do this through the pkg manager (i.e. synaptic) this doesn't seem to obtain ntpdate anymore? as of 11/29/2011

sudo dpkg-reconfigure tzdata
This will enable you to set/change your time zone even if you had previously set this to the wrong location.

Linux

so finally, I have entered the world of Linux.  I cruised around the distros for awhile, finding the best one to run on an old Dell laptop, so there is that limitation.  Ultimately, though, the "slimmer" distros run incredibly fast.  It actually makes my everyday computers seem more noticeably slow by comparison.  Top contenders for me were: Ubuntu 11.10 (natty narwhal), Puppy Linux (Lucid Puppy) and Crunchbang 10 (Statler).  I finally settled on Crunchbang, it really is the smoothest, and most asthetic distro and is very fast and trimmed down.  Ubuntu was very easy to transition to, and very useful.  If you can work with Crunchbang, though, I think you will learn more about linux in general and how to navigate / use it better than if you go through only Ubuntu.  But I have to say, Ubuntu smoothed my transition significantly, and I still plan to have that running on one of our computers at home for the rest of the family to use who don't want to try to solve their way through crunchbang (#!)
So, I plan to post some of my issues here as I work through them, mostly as my own repository and reference for myself, but perhaps someone could find it useful.  A lot of this is on the forums, of course, but as they grow it can be hard to find exactly what you are looking for.  And my problems will be absolute, BASE beginner problems so...
Just for info: I ran ubuntu 11.10 from a USB HDD - I found that the best, most stable install was just to install it directly.  I did multiple partitions the first time, etc.. it wasn't as stable.  Just a straight install has been the best.
I then switched the USB HDD to Crunchbang 10.  Same install, just a straight install to the external HDD... most stable and reliable booting.
Puppy I ran from a USB installed using pendrivelinux.  While it was very fast and rapidly configured almost instantly with almost NO input from me (everything "just worked") my only problem was that puppy was not as stable: firefox would crash frequently, streaming media was jumpy.  Otherwise it worked nicely.  Crunchbang, while requiring a little more "set up", has been much more stable, smooth, and constant.  It also introduced me to Conky and openbox which now I find it hard to be without.

Tuesday, May 10, 2011

Water Hammer

Water Hammer occurs when you have a valve along a water pipe that closes rapidly.  This effectively sets up an energy wave that travels backwards from the closed valve along the pipe and causes it to rattle and bang.  You are basically taking a moving fluid and ramming it into a brick wall with no where to dissipate the energy, thus causing water hammer.  This can damage your pipes, other appliances, etc.  The way to fix this is to introduce a sort of "cushion" into the pipes; this has been done with vertical sealed air chambers, but this can slowly fill and require you to drain your pipes completely to re-establish the air cushion.
Our washing machine was creating a tremendous water hammer.  I think it might have something to do with using stainless hoses as opposed to rubber hoses, as they have much less cushion within them to absorb some of the energy shock.  I found these "shock absorbers" in a book and looked for them and found them at Lowe's.

Basically, instead of a simple air cushion, they added a piston ahead of sealed chamber of gas that allows for compression of the gas with the energy wave and then act as a "shock absorber" for the water hammer effect.  As a bonus, they can be installed in any orientation because they are sealed as opposed to requiring a vertical orientation.  What a great product.  So shortly after installing, we ran the washer and: silence. They work like a charm.  In fact, it seems like the whole washer is quieter as I think the sound of the flow across the valves is sort of absorbed by the arrestor as well.  Excellent design!

Thursday, March 24, 2011

Projects

I've decided to start posting running projects that I am working on to this so I can track and review past projects, and maybe even help someone else out if they run into something similar that they need to work on. 
I have managed to obtain a lot of help from various forums and boards, which is incredibly useful.  Unfortunately, after my project, it can be hard to relocate those posts when someone else might have a similar problem.  So, I can point them to this blog instead and hopefully help them that way.  As a bonus, this is searchable too :)
I am behind on a few projects that have a few photos, but I think the first one will be replacing the knock sensor on our Subaru Forester.  It has quite a few miles on it, and from what I've found this isn't too out of the ordinary at this point.  Details to follow in the next post!