Author Archive

A frequent scenario I come across when administering Ubuntu servers is that I want to rsync a directory (e.g. a web site) from one server to another but the destination is not writable by my user account. I have permission on the destination via the sudo command but rsync does not have built in support for this. This is rather annoying as I don’t want to enable the root account on the destination just to use rsync and I don’t want to give myself more permissions on the destination since I already have them through sudo. I found some kludge on the web that mostly didn’t work for me so worked out a solution myself. I present the first version of sudorsync, an rsync command that uses sudo! Save this to a file and make it executable and use the same as the rsync command. I’m not an experienced bash programmer so any improvements or suggestions are appreciated.

#!/bin/bash

#************************************************#
#                   sudorsync                    #
#           written by Stephen Nichols           #
#         Email: ChinnoDog@lonesheep.net         #
#                August 6, 2010                  #
#                                                #
#        rsync using sudo on remote end          #
#************************************************#

BUILD=1		#will write routine to print this with -? later

stty -echo
read -p "[sudorsync] password for remote user: " REMOTEPASS; echo
stty echo

# update the sudo timestamp as part of the remote rsync command
rsync --rsync-path="echo $REMOTEPASS|sudo -S -p $(()) -v;sudo rsync" $*

Comments No Comments »

I decided that an OpenVZ VPS was not for me. Its memory accounting uses VSZ instead of RSS, which really distorts the amount of available memory you can use. Plus, any VPS has potential pitfalls on what kernel you can use and thus what version of Ubuntu you can install. So, so long Digital Linx, hello InstaVPS! I followed their offer on WHT and have my own blade server for only $20/mo! It is a pretty sweet deal, and I never thought I was going to get a dedicated server for that price. I tried cramming Ubuntu 10.04 64-bit onto a 64mb VPS first, but that didn’t work so well. I thought of some solutions to the memory problems but I was too lazy to go through the hoops. I may try it later though to see how many things I can cram into my new 1GB of memory.

So, dedicated server specs:

  • Processor: Athlon 64 1500 (Venice core, see here.)
  • Memory: 1GB
  • Disk: 40GB
  • Bandwidth: 500GB

Now, my blog desperately needs some attention….

Comments No Comments »

I realize this is a very specific post, but I figured that I had done the research already and someone else out there might find this useful.  When you go to HP’s site to download the driver for the M1522 printer (and some others) you find a bewildering array of choices such as the ones on this page.  Under the Software subheading you find the following:

  • HP LaserJet M1522 MFP Series Full Solution AM-EMEA1
  • HP LaserJet M1522 MFP Series Full Solution AP
  • HP LaserJet M1522 MFP Series Full Solution EMEA2
  • HP LaserJet M1522 Series Full Solution EMEA3
  • HP LaserJet M1522 Series Full Solution EMEA4

There is no further comments on what these are or what EMEA stands for.  After some Googling I finally found out that EMEA is a code for the supported languages.  It is contained in this post.  I have pasted it below for reference.

EMEA1 (Americas/Western Europe) English, Catalan, Hebrew, Italian, Spanish, Dutch, French, German, Portuguese
EMEA2 (Northern Europe) English, Estonia (English driver), Danish, Latvian (English driver), Lithuania (English driver), Swedish, Finnish, Norwegian
EMEA3 (Eastern Europe) English, Arabic, Bulgarian (English driver), Czech, Croatian (English driver), French, Greek, Hungarian, Kazakh (English driver), Polish, Romanian (English driver), Russian, Serbian (English driver), Slovak, Slovenian (English driver), Turkish, Ukrainian (Russian driver)
EMEA4 (Asia Pacific) English, Japanese, Indonesian – Bahasa (English driver), Korean, Simplified Chinese, Traditional Chinese, Thai, Vietnamese (English driver)
Thanks HP for making this so difficult….

Comments No Comments »

I finally set up Gallery on my VPS so I can share photos.  I know, I could use any of a number of photo sharing sites, but I wanted to it myself, and, well, Gallery is cool!  I will permalink it on the front page later.  It still needs some work but it has a few photos from Australia on it.  That is for another post though.

http://gallery.chinnodog.com

Screen shot of gallery.chinnodog.com in Chrome

Screen shot of gallery.chinnodog.com in Chrome

Comments No Comments »

On Monday Jen and I pulled in at home around 7 in the evening along side some other cars on the street. As Jen walked down the walkway towards the front door a cat appeared and walked up to greet her.  I followed with the items I was bringing inside from the car and the cat walked up to say hi to me as well.  After we had walked inside and I was unloading my cargo the cat walked up to the front door where Jen was standing and poked its head in, but we shooed it away.  A neighbor happened to be outside and said the cat had been wandering the complex for a week and tried to go into someone else’s house too, only to get kicked and left on the porch.  She was a very friendly cat, so after some debate we let it in.  On Tuesday we took her to the vet and on Wednesday she got spayed (to avert risk she was pregnant).  She is home now.  She is a very friendly cat, even after everything we have subjected to her to.  She doesn’t have a name yet.  Here are pics!  The picture at the left is from today not long after I gave her pain medication.   The picture on the right is from yesterday after she came home from the vet.

Annoyed cat at back door

Annoyed cat at back door

Cat in Jen's lap chilling out

Cat in Jen's lap chilling out

Comments No Comments »

After some headache I got WordPress moved over from Dreamhost to my VPS.  The theme got broken somehow, and the encoding was messed up but it is fixed now.  To fix the theme I deleted it and downloaded a newer version.  To fix the encoding I reproduced the conventional database with Sweedish collation and imported my text as latin1, not UTF-8.  I will resume adding posts now.

Comments No Comments »

I finally purchased a VPS plan.  Dreamhost has been pretty great, and there is no denying that having a web site at Dreamhost is low cost and low maintanence.  And, getting unlimited bandwidth and hosting space as compensation for the one time the server went down was more than I could ask for.  And those one click installs… I will miss you. :-(  I will surely have more issues managing my own server, but the experience will be invaluable and I want the benefits that come with it.  At Digital Linx I get 2GB of RAM, 60GB of disk space, and 600GB of bandwidth for as low as $18.42 a month!  I think this is pretty good compared to some of the others out there.  I don’t think it gets much better than this.

Dreamhost Logo

Reliable web hosting with great features and service for a low price.
Digital Linx Digital Linx – Soon to be hosting this blog in Ubuntu 9.04 server with OpenVZ. See some great deals they posted on the WebHosting Talk Forums!

Comments 1 Comment »

Front of Car

Front of Car

On May 7th my wife was in a car accident. I have not taken much time to post anything on here since then, so this post is long overdue. She was driving southbound on I-222 in the left lane at around 9pm and a collided with a pickup truck that was traveling north in the southbound lane.
Location of Accident (approximate)

About a week after the accident I was able to see the car. It was a 2000 Hyundai Accent. Jen swerved to avoid the oncoming truck at the last minute and the two drivers sides collided. Jen broke her humerous, ulna, femur, fibula, and left toe all on her left side. She also had hip fractures on both sides. Her left upper arm was damaged and was closed up with a skin graft. Luckily it is cosmetic only, and the arm is expected to function normally after she recovers. Here is what is left of the car. Note the roof was cut off by the emergency crew in order to get her out of the car.

There have been some articles online about the accident. The latest one from the Reading Eagle details the most recent developments.

Jen was in Reading Hospital for about 4 weeks before going to Manorcare in Sinking Spring. I have since rented us a first floor apartment and moved us both there. She gets around with a walker for now. We have a lot of things to unpack yet, but I hope to have a fully functional apartment within a month or so. Read the rest of this entry »

Comments No Comments »

The early versions of Adobe Air wouldn’t open links in twirl in Chrome when I ran it on Windows.  The current version won’t open links in Chromium when I run it in Ubuntu.  I found this article that indicates the problem and fix. Here is the two line version of the fix. Adjust it if you aren’t running Ubuntu 9.04 (Intrepid) or wish to use a different browser.

sudo perl -i.bak -p -e 's/firefox/browser/g' /opt/Adobe\ AIR/Versions/1.0/libCore.so
sudo ln -s /usr/bin/chromium-browser /usr/bin/browser

Note: This modifies part of Adobe Air, and you will probably have to rerun the first line if you install an Air upgrade. If this blows up your Air install just delete libCore.so and rename libCore.so.bak to libCore.so.

Comments No Comments »

I am totally slacking on blog postings.  I recently started using Ubuntu on my laptop as my main operating system and have a ton of things to figure out yet.  Here is an important one.  I figured out printing to PDFs though.  To print to PDFs:

apt-get install cups-pdf
mkdir ~/PDF
sudo chmod u+x,a+x,+s /usr/lib/cups/backend/cups-pdf

You might have to

sudo /etc/init.d/cups restart

after that.

Comments 5 Comments »