Let me start off by saying, “What a Mess!” About 2.5 weeks ago (probably 3 by the time I post this!) I bought an HP Deskjet 2050 printer at Walmart, it was cheap, had a flatbed scanner, came with “full” ink cartridges, and only a USB connection option. [...]
Let me start off by saying, “What a Mess!” About 2.5 weeks ago (probably 3 by the time I post this!) I bought an HP Deskjet 2050 printer at Walmart, it was cheap, had a flatbed scanner, came with “full” ink cartridges, and only a USB connection option. It was $49.00, $20 more than the printer that looked identical, but was not a flatbed scanner. I thought that HP of all companies would have linux support, even for newer model printers, oh there is support for it… If you can find it. (I’ll be putting up a separate post with plenty of links and re-written documentation for installing this and other HP printers in Ubuntu in the next week or two, kinda busy this weekend, so doubt it will get done before next week)
First thing I did was to go to HP’s website and download a driver, I wasn’t even going to fool with the included CD (actually not sure it even had one). I found it within a minute or two, all seemed good. Installed the driver and plugged the printer in, everything went fine. I believe I even printed something that day just clicked print and it spit right out! Well, next to happen was my wife is using my ChromeOS CR-48 netbook and wanted to print something, so I went to look into setting up Google Cloud Print. I figured, yeah cloud print, that should work… Google has two operating systems in their pockets and both are linux based, piece of cake to use cloud print with linux, right? wrong…
Google Cloud Print requires a Windows computer running the beta Google Chrome browser (or a Mac, but why would you want to use a Mac?) (an fyi, the Linux Chrome Browser only comes in Beta!), a bit confused and disappointed (happens a lot with Google these days), I thought, oh well, good thing I have 5 or 6 Windows Virtual Machines setup already! I popped onto a Win7 VM and setup Google Cloud Print and told my wife “Good to Go!” only took me 30-45 minutes to figure all that out and set it up (I forgot to share it with her gmail ID the first go round!).
Success! it printed!
I love first try attempts that work out great!
So next I had to fill out some paperwork for work and email it back, so I printed the pages that needed signing and filled them out, then tried scan them back in… the scanner would not scan (using simple scan) unless I unplugged the USB cable for 10 seconds or so, then plugged it back in… (more on that at the end of this post, I have a theory). Well after 3-5 pages of this over 1-2 hours, out of about 12 pages, popping the USB cable out stopped working. I wasn’t sure why it needed it in the first place, I had checked to make sure the printer was not attached to a VM at the time… So instead I tried setting it up to scan off the Win7 VM I was using for Cloud Printing (just a note, this was all happening maybe 4 days after the cloud print setup), the scanning application from HP worked fine until I was done. Weird though, again if I did not use the printer for an hour or two, or the VM was paused, or the screen saver came on, I had to unplug the USB cable again…
ok, so history done, up to my issue that started last night…
Actually the issue started on Saturday, but I was pre-occupied and didn’t really try too hard to get it resolved. My wife sent something to the printer from the netbook, I started up the VM for the Win7 Cloud Print, and it never printed. The first document just says “In Progress” and the date submitted was showing 3 days ago when I deleted it. I’ve powered off the Printer for 30+ minutes, I’ve rebooted my computer 4 times, leaving it powered off for about 8 hours once, popped the USB cable, nothing worked. I tried printing locally from Ubuntu and still nothing comes out, just says “Processing”. I did some digging online and found some “directions” for setting up the printer in linux, most of which was on HP’s website, and I never did any of it, including downloading the driver source files and doing a Build, Make, Install on them. So I started following the directions (did not build the driver, it seems to be installed and functioning, as Ubuntu can tell if it is plugged in or not and shows the correct device name), and found a huge list of dependencies that it says to install, I tried it and sure enough I did not have most of it installed on my system yet. About 78MB worth to be specific. I let it run, and noticed a new kernel was available, so I updated that while I was at it… 3 reboots later (not necessary, just kept trying to get things working) and I have no change in the current situation.
So, right now I have no working printer at all, not even scanning is working. It shows it is online, I have enabled it, shared it, allowed internet printing on it (none of which I did when I installed it, only did that after it stopped working).
Now, I’ve had some time to think about it, and I have been having USB issues with Ubuntu the entire time I’ve been running it. My USB webcam and Skype have fighting matches everytime I reboot my system, it never detects and adds the webcam as a valid hardware device, I have to manually configure the microphone each restart, and the video sometimes requires I unplug the webcam and then plug it back in and restart Skype. Other USB devices (I have a USB wireless headset and KB, external drives, my android phone), have all had issues that has required me to restart the computer or plug and unplug the device over and over several times.
This made me think I should run “lsusb -v” on my system to take a look at the devices that the system thinks I have. Well the command does nothing, it just hangs and never runs or finishes running, I have to kill the process AND the terminal window process to get it to stop. I missed this in the printer issue above, but I tried running the hp-setup app that came with the driver and it hangs on detecting the printer when I select USB as the connection type, as well.
So I have determined that the issue is with my Ubuntu installation and the USB service (this occurred to me actually right before I started typing this up). I have not yet started looking into the USB issue and will be doing so tonight. I’ll post a second post instead of updating this one with any results I find out, or if I nuke and reinstall… as a note if I do reinstall, it will not be Ubuntu 11. Also planning on typing up a how to properly install an HP printer on Ubuntu 10.10 x64 guide too.
Part Three – Configuring Ubuntu to use your newly installed Java JRE and SDK
There are a lot of technical steps in this part, and I figured them out mostly through heavy internet searching, piecing together information from other blogs, and trial and error. The main issues were caused by every site expecting you to already have some key components installed before trying to get this working. So when I tried to follow their guides they never worked. That is why we are here now, using a fresh and clean Ubuntu installation.
- cd /opt/java && sudo ln -s /opt/java/jdk1.6.0_21 /opt/java/jdk-linked && sudo ln -s /opt/java/jre1.6.0_24 /opt/java/jre-linked – this moves back to the /opt/java directory and creates a link to the jdk folder that we can use to reference to later, that way if we ever install a newer version of java all you have to do is remove the links and create new ones, not have to go through this whole process again! you can test by typing cd jdk-linked && ls – and you will see the contents of /opt/java/jdk1.6.0_21 (don’t forget you can use [tab])
- sudo update-alternatives –install “/usr/bin/java” java “/opt/java/jre-linked/bin/java” 10 && sudo update-alternatives –set java /opt/java/jre-linked/bin/java – this updates Ubuntu so it can find your new jre and makes it the default jre to be used by the system (again future proofed because we used the linked location)
- if you want to, we can setup java for Firefox too
- mkdir ~/.mozilla/plugins/ && ln -s /opt/java/jre-linked/lib/i386/libnpjp2.so ~/.mozilla/plugins
- cd && vi .profile
- [ctrl+f]
- [o]
- EXPORT JAVA_HOME=/opt/java/jdk-linked
- [enter]
- EXPORT PATH=$PATH:$JAVA_HOME:$JAVA_HOME/bin
- [esc]
- :wq!
- now we need to repeat the next set of instruction with the following items placed in [java] (everytime you see [java] put one of the following until you have done these steps for each of the following), I have noted after each one if you need a jre or jdk, or both lines for it, if both, replace the 10 with a 5 on the jdk (this will add both the jre and the jdk alternatives to the list making the jre ones the default). Or, just use this script. (remember to look at the script first to make sure it does what I said, and to set it as executable! cat java-update|more && chmod +x java-update then execute it with sudo ./java-update)
- java – jre/jdk
- jar – jdk
- jarsigner – jdk javac – jdk
- javadoc – jdk
- javah – jdk
- native2ascii – jdk
- rmic – jdk
- rmid – jre/jdk
- rmiregistry – jre/jdk
- serialver – jdk
- sudo update-alternatives –install “/usr/bin/[java]” [java] “/opt/java/jre-linked/bin/[java]” 10
- sudo update-alternatives –set [java] /opt/java/jre-linked/bin/[java]
- mkdir ~/source-build && cd ~/sourcebuild && sudo apt-get install debhelper gcj-4.4-base gcj-jdk m4 debiandoc-sgml python-docutils cdbs – moving on, we need to install some things before the adding Titanium to the system, this group (plus their dependencies, you don’t want to know what I went through to get this list exactly correct, it took a couple of months the first time I worked on getting this installed) takes up 823MB and took me 16 minutes to download and 2.5 minutes to install. as an fyi, I figured these out by not having them installed the first time around and spent weeks trying to figure each part out, because these files are not what causes the failed instal, linux will pull the dependencies for you when you install something, but there are dependencies of dependencies of dependencies… and somewhere down that line linux fails to grab the final set! So you need to install them in this order, I then spent another week or 2 finding out that those in particular have to be installed before the next set or the next set fails to install!
- sudo rm /var/lib/apt/lists/* && sudo apt-get update – this will resolve an issue with the sources of the next step
- sudo apt-get install llvm-gcc-4.5 && sudo apt-get build-dep llvm-gcc-4.5 && sudo apt-get -b source python-defaults ruby-defaults && sudo apt-get update && sudo apt-get dselect-upgrade && sudo apt-get autoremove – this set downloads the source files for each of these and builds them specifically for your system and then cleans itself up, this did not prompt me for the additional storage space until it got to the apt-get dselect upgrade step (some 48kb) but the build process took about 20 to 45 seconds on my machine.
- sudo apt-get install ispell – I have found a few other things that are necessary for titanium to work
- restart your development VM
- mount your shared drives and take a new snapshot after the system comes back up, called pre Android SDK, and comments “OS, java jre&jdk, and compilers installed”
maybe you don’t really need all of this, but I don’t want to find out while I am writing my Android app that I missed a step, as then you won’t be able to re-use the snapshots in case of an emergency (also called a mistake!). One other note, if you noticed I made a new directory and used it for the source builds, this is because at least the python source build requires several chown commands to run and if you try to execute them on a VM share mount it will fail and you cannot complete the build. Congratulations! I know this was a tough part to do, and I’ll have to check it over sometime in the future to recreate the entire process step by step and make sure it all works again (never know where there might be a typo!). Next time we meet it will be to install the Android SDK and Titanium. After that we will build a short crappy Android app to test everything and then make an .iso Live CD of the whole VM! The final file was pretty big, I’m not sure if a Live DVD would cover it all! I’ll test this idea and add it to the final post if it works. I will be heading out of town for a couple of days so don’t expect anything before monday!
again, after I finish this series up, I’ll add in resource links
start off with some non-techie stuff first…
I head back to see my surgeon next Monday, where he will tell me that in another week or two I should start putting some weight on my leg (toe touch, or partial weight bearing?) when at my PT. I am also hoping he will tell me it is okay to get my incision wet, as it has been making it very difficult to take showers!
ok, on to the good stuff.
So, I am not at home and do not have my desktop machine available for use for the last week, I have been going through withdrawal… but having to work on someone else’s machine, and my wife’s laptop (I think I mentioned before, I gave her mine, and sold her old one) has taught me one important lesson, why I prefer Linux.
My number one reason for preferring Linux over Windows is system maintenance. What do I mean? well, I mean keeping everything up to date, this latest round of Adobe patching should make this make sense to everyone. I don’t use Acrobat on my Linux machines for this reason. However; back to the point, when I need to check for updates on my Linux machine I open Yakuake with a quick hit of F12 and type “sudo yum update” and it comes back and tells me every single thing installed on my system that has an update available, period, end of statement. On windows, I have to launch 5-8 different apps, find their “check for updates” button/link and wait for the results (I have learned by doing this that OpenOffice.org does not notify you of a new version being released, only if there are updates for your version. example, I have 3.1 installed, and 3.2 is now available. clicking the check for updates menu option tells my “There are no available updates for this version” (maybe not word for word, but that is just about what it says). I run windows update, Acrobat Update, Java update, Picasa update, Chrome update, Firefox update, and on and on… (yes I know there is an Adobe Updater, but I don’t know how to initiate it in Windows, and never cared enough to look it up, but now that I have mentioned it I sure I found instructions and have put a link to them here).
Simple and easy to manage, most distros even let you run their package manager and it has a button to click to check for updates for your system, making it easier and more time consuming all at once to do the same thing. (Yakuake is always running and it takes me about 1.5 seconds to type that line into the terminal, it takes a lot longer to load the package manager from the application menu and then click the check for updates button, but you don’t have to type that way!)
The actual GUI interface for Windows an Linux and even MAC are so similar these days, that I don’t care which I am using as far as that is concerned. I have come to the understanding that there will always be applications/games for an OS, other than the one I am using, that I want to use/play (take iPhone for example, they have the best Air Traffic Controller game I have played, and I’ve hunted those down and played quite a number of them, but I don’t own anything made by Apple, and probably won’t ever, unless the 2nd gen iPad totally rocks… but I will be getting an Android Tablet this year (possibly the Notion Ink Adam, or the HTC Google Chrome OS tablet), so I still probably won’t get an iPad). My concern at this point, as I spend more and more time as a Unix Admin is maintenance. The system I use at home needs to be practically maint free, as most Linux and Unix machines are, they will run for years without being touched by an admin, the best I know of are an AIX Server and a OpenVMS server, the AIX server has been running since 1991 and has never been patched, updated, reconfigured, or messed with in any way. It is setup to contact a NIM server for logins, so no new users have ever been added to it, it has never crashed, never lost power, never been rebooted. That to me is the greatest achievement of humankind (in technology anyways, and some of these companies need to take a look at the AIX OS and learn something from it!!!). The other machine, the OpenVMS machine has been running since before 1994, but has not been patched, never been upgraded, never been rebooted, since 1994. now I know next to nothing about OpenVMS, and have not personally logged into the machine itself, but a friend and co-worker of mine used to be the sole admin for the OpenVMS machines at that company and although that one is the only one like this, it is still running today without interference from humans. I am sure some other machines are out there doing the same, but these are two that I know. The longest Windows Server I have heard of running without rebooting or crashing was about 2.5 – 3 years, after which the hardware components in the server failed and the machine was replaced. Some people have told me about Windows servers being up for 4 years and then being restarted by some new guy, but I have no validation of it and they could not give me a more exact time frame.
not sure if I made a compelling argument or not, but I need some medication and to go prop my leg up, so I am done here. Also expecting UPS sooner or later for an over night supersave shipment… and it takes me 5 mins to get downstairs… :)
Twitter: finndo77
- New blog post... Diablo III closed Beta http://t.co/dKC2ChWm 01:36:32 PM December 07, 2011 from joelperryproductions.com ReplyRetweetFavorite
- New blog post... resolving video problems with K-L-Ubuntu and XFX Radeon 6850 http://t.co/H6bXuMqi 06:59:18 AM October 22, 2011 from joelperryproductions.com ReplyRetweetFavorite
- New blog post... Computer upgrades http://t.co/6PWVNy4m 01:39:35 PM October 20, 2011 from joelperryproductions.com ReplyRetweetFavorite
- $7 for $15 Worth of Hand-Tossed Pizza, Calzones, and Drinks at Andolini's Pizza Charleston, SC http://t.co/QnKwPwB 11:49:26 AM August 29, 2011 from Tweet Button ReplyRetweetFavorite
- New blog post... is zdnet.com/news down http://t.co/DThuI4r 07:57:28 AM August 17, 2011 from joelperryproductions.com ReplyRetweetFavorite
- New blog post... Netflix Down? http://bit.ly/q74Svu 07:39:30 PM August 08, 2011 from joelperryproductions.com ReplyRetweetFavorite
Blogroll
programming
Tech Websites
- a good coder I found on CodeProject
- Barebones HTML coding chart
- Code Project
- Extreme Overclocking
- FreeBSD blog
- Legit Reviews – Tech Hardware Review
- Linuxtopia
- Notion Ink – homepage
- Plug Computing web site and forums
- Tablet Roms – used to be – Notion Ink Hacks
- Ubuntu Forums post on the mount command and fstab file
- VMWare ESX blogger
- Wikipedia.org main page
- ZDNet's blog pages

