Every once in a while I have to covert/shrink/modify a picture. First off I suck at graphics (one of my sons is WAY better at it), but, like this time, I had to convert something from .svg to .jpeg and shrink it too. The package that you need to do this is imagemagic, and the command is: 'convert <orginal.svg> -resize 150 <target.jpeg>'. There is a huge number of switches that this thing takes. Check it out!
June 9, 2009
June 8, 2009
Installing VMware Server on Linux Mint (Ubuntu)
Installing VMware Server is not your typical point-and-click procedure. However, it is quite easy even for those who are a little squeamish with the command line.
Here I will be talking about installing VMware Server version 1.0.9 on Linux Mint 5 – I don’t do the latest’n'greatest anymore. Linux Mint is fully compatible with Ubuntu 8.04, so I would expect this procedure to be very similar, if not identical, for most derivatives and close versions.
VMware are very good at hiding all the useful stuff on their website!
Here are all the pieces you are going to have to download:
- VMware Server will require you to build kernel modules. You will need kernel header files for that. On Mint/Ubuntu you already have them at /lib/modules/$(uname -r)/build/include. The installer, further below, will be able to figure it out automatically, assuming you have all the defaults for your system.
- To build stuff, you will need tools. I just grabbed the build-essential package and that had everything.
- The VMware install guide is linked here – you want the Admin Guide, starting somewhere around page 36. I once accidentally found a much more succinct Install Guide on their page, but I can’t find it again.
Below is only the relevant distill; however, I would still recommend that you have at least a browse through theirs in case you run into problems. There is also a detailed guide here, which may be of some use if you run into problems. - VMware is pushing the newer 2.0 version; older version are here – you want to get the “VMware Server for Linux. TAR Binary.” Right on that same page, notice the register for your free serial number(s) link. The server is free, but they will need an e-mail address where they can push more stuff on you.
First you will need to unpack the TAR Binary. You will only need this once, so you might as well do it in /tmp – which gets automatically emptied each time you reboot. Open up a terminal:
cd /tmp tar xvf ~/Downloads/VMware-server-1.0.9-156507.tar.gz
And continue with the install:
cd vmware-server-distrib sudo ./vmware-install.pl
I took defaults for everything except the following:
In which directory do you want to install the binary files? [/usr/bin] /usr/local/bin
On Ubuntu, or any system that has a package manager, it is good idea to keep stuff you install manually somewhere else. The Linux file system has a place specifically for this purpose, and that place is /usr/local.
If you screw the install up, you can run sudo /usr/local/bin/vmware-uninstall.pl so that it cleans up, and then start again.
Next is the configuration. The installer will prompt you, or you can just run explicitly sudo /usr/local/bin/vmware-config.pl. Any time afterwards you want to change something, you will need to rerun this program. For Linux Mint 6 (Ubunt 8.10) or perhaps later, you might need this patch before you configure the VMware – suggestion is to run the configuration program, if it fails install the patch, if it passes just move on. Again, I took defaults except:
You can safely ignore the complaints about the extensions on the Icons, as well as the wrong version of the gcc compiler.
For networking, make sure you bridge all interfaces (ethernet and wireless). I did not use NAT.
In which directory do you want to keep your virtual machine files? [/var/lib/vmware/Virtual Machines] /home/vmware/machines
The way I have my disk partitions set up, I had to override where the machine images will be kept. The images will be big, make sure the place you tell it has enough space.
If everything worked fine, you should get a new menu entry Applications > System Tools > VMware Server Console. The first time you try to run it, it will not work.
If you run vmware from the command line, you will get:
/usr/local/lib/vmware/bin/vmware: /usr/local/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib/libcairo.so.2) /usr/local/lib/vmware/bin/vmware: /usr/local/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6) /usr/local/lib/vmware/bin/vmware: /usr/local/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib/libcairo.so.2) /usr/local/lib/vmware/bin/vmware: /usr/local/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6) /usr/local/lib/vmware/bin/vmware: /usr/local/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib/libcairo.so.2) /usr/local/lib/vmware/bin/vmware: /usr/local/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6)
According to the Gentoo team, this file is useless. Once you delete that, the VMware console should come up normally.
Updates 09/06/18:
I just tried to do the above on Ubuntu 8.10 64bit. I did need the patch as mentioned above, and I did not get the error about libgcc_s.so.1 when starting vmware. However, I did run into an issue starting up my virtual machine. At first you get a blank error (as in: “The process exited with an error: End of error message.”), but if you turn on debugging in the advanced options you can see the actual error:
Version mismatch with vmmon module: expecting 138.0, got 137.0. You have an incorrect version of the `vmmon' kernel module. Try reinstalling VMware Server.
And they’re not kidding. The fix is that you have to configure vmware twice!
Then there was a second surprise: my arrow keys (along with a bunch of others) did not work inside vmware. There is an explanation as well as a solution, at the VMware Knowledge Base.
Every once in a while the keyboard will stop responding to mapped keys – things like Crtl-Alt-LArrow to switch desktops – you can run setxkbmap to fix it.
Updates 09/06/24:
For some other reasons, I updated my box to Ubuntu 9.04 AMD64. When recompiling vmware I hit some SSL key errors.
May 27, 2009
Biological computer virus
Every once in a while I have a day when lots of unexplainable and unreproducible things just happen to computers all around me. Yesterday was one of those days.
It started out trying to get VMware to acknowledge my wireless network. No good, but this never worked for me, so nothing new so far. Next, when trying to connect to work, I found that VPN networks was gone from the network manager – OpenVPN was still installed, just not showing up in the GUI. Then the kicker: I noticed that OpenOffice.org Quickstarter was gone from the notification area, so I go to launch it from the menu. It just disappeared from my computer; like not just the Quickstarter, but like the whole thing!
It was even reported as not installed in Synaptic. After reinstalling it, Quickstarter still would not come up. I have come to expect things like my RSS feeds on the partnerpage.google.com not working, but yesterday they were redirected to a completely different feed. Well I chose this day to install my son’s new computer – how do you think that went? Well, you would be wrong! I burned the .iso onto a CD and had the computer confirm that the burn was successful. When I took the CD over to the new computer it told me that the CD is blank.
I got smart – just gave up, turned off everything, and went to bed with a book.
This morning at work I find, of course, that all tests from previous day failed.
May 22, 2009
Linux Backup & Reinstall
Last week I spent some time playing with DreamLinux (again), trying to get it onto a thumb-drive / memory-stick / whatever-you-call-those-things (again). Dream hosed my system (again). This time I lost my swap?!?! I’m sorry guys, but that installer sucks! It’s just as well, there were a few changes that I had been wanting to do to my system anyways which would require a complete reinstall.
The procedure that I basically follow is:
- Backup home. You have to do this as root, so that hoses the ownership of all the files. I know there is a way to do it correctly and preserve the ownership, but it actually does not matter that much – see further below.
- Install the system wiping the drive(s) clean.
- Install critical updates. In the case of Mint I do only levels 1 and 2. I am running Mint 5, which is based on Ubuntu 8.04, so at this point I also install the top bugs from Ubuntu 8.04.2.
- Clean the system – remove things that you definitely do not want. Install restricted drivers.
- Create a second “administrator” account, log in to populate the home.
- Crete all other users, log in to each to populate their home. I have an (apparently) weird habit of putting all my users into the group “users” as opposed to the default group == username, and giving their home 700 permissions.
- Log in as the “administrator” and restore backups. Can’t restore (or backup for that matter) my own home when I am using it. I used to get around this by running a live-CD, but this seems like so much less work. Change owner and group of all the user’s files to themselves.
- Install all apps.
- Get my kids to install all games.
There is one app that, IMHO, should get special attention: Eclipse. Eclipse has it’s own package management built in. I normally install Eclipse along with any plugins that I want through Synaptic, and then I “pin” them – lock that version – so that Synaptic or Mint Update will not try to update these. I then go into Eclipse – have to run it as root in this case – and update the whole thing from within Eclipse.
May 3, 2009
e-mail: Bad form of communication
Today we live in a society where people are unreasonably easily offended or they can misinterpret even the best of intentions and freak out. If you don’t believe me ask any guy what started the last fight he had with his girlfriend. I am surprised how often we are ready to shoot the messenger, and nobody stops and considers that perhaps the problem lies on the receiving end. How did we get this way?
The email is the worst medium. It seems to me that people completely loose their brains when given access to email. How many times have you received a joke email, that has been forwarded around the world several times and the mail contains the complete history of all addresses that it has passed through. Sometimes, these jokes can be quite offencive. I personally am hardly ever offended, usually just pissed at the waste of bandwidth. But I know how to set up my mail filters to not even be bothered by these slightly-better-than-spam annoyances. What gets me though, is the history: everyone’s mail address, along with their fancy signature “VP of this large company”, “Senior PR Manager of that prestigious corporation”, and these people never stop and think … maybe this is going to get, with my name and all, somewhere I don’t want it to go. The best IMHO are the legal threats at the bottom of each and every single iteration: “intended only for the recipient only … please delete immediately or we will take action …” These people are obviously not even paying attention to what they are spewing out into the world. Crackberry addicts are the worst; someone may be the most intelligent and most well spoken person you will ever meet, but put a Crackberry into their hands and within a matter of minutes they turn into a drooling mumbling moron. GMail has even created the Oh shit button because of these people! Can you imagine that particular development session: “So majority of our user are idiots, can we do something about that?”
I am basically peeved that 1) people do not think before they forward something, and 2) when they get offended by an email, they don’t stop and consider: “hey, maybe it’s me and not them.” Well, at least smileys make everything if not better than acceptable.
PS: I really do like you, and I do want to be your friend, but please remove me from your address book. Thank You.
April 21, 2009
Arrrgh! Mateys
PTB is getting a lot of press lately. The whole lawsuit is probably a waste of effort, and money, and court time, and….. The Internet will fight back, and to boot the press is making martyrs out of these guys. This is the same thing as when in the late ’80s they tried to ban offensive lyrics in music, and then kids would go into stores with: “Could I get anything with a warning label on it.” I am on the side of the PTB guys. I think the music and movie industries and their copyright laws are outdated, ridiculous, and in serious need of overhaul.
But even if the *AAs get their way. Look what happened when they tried to take down Napster – we got BitTorrent. If they, by some freak chance do take down BitTorrent, that will only lead to something different and better and harder to take down.
I love this: Canadian pirates have been threatening the American music industry in 1897 – not a typo, yeah, that’s like the nineteenth century – and apparently we are still threatening it today. I think this is generally refered to as FUD.
April 14, 2009
Test automation candidates
This post is about a topic near and dear to me: test automation. Surprisingly, the first one.
I am working on a new project which requires UI (front-end) automation. I am one of the few that actually makes a distinction between front-end and back-end automation – completely different set of tools for the task IMHO. Anyway, new project … UI automation. My boss asked me to do a little analysis of what is out there, and come up with some recommendations. I immediately grabbed for what I know, but was told to make things fair and that I should also look at some alternatives, especially the big boys.
HP: A lot of people in the industry keep gushing about “QTP”. Check out this totally obvious and easy to remember URL: https://h10078.www1.hp.com/cda/hpms/display/main/hpms_content.jsp?zn=bto&cp=1-11-15-24^1322_4000_100__ – this is not the download URL, this is the main page!
So I get on there. They are obviously going to try and get a vacuum hooked into my wallet, so I go through the 5 minute registration process, didn’t even lie about my contact info, then they mail me a URL to the 1.3GB download; servers kept timing out, but eventually I got through it somehow. 2 hours later I’m ready for the tutorial, in the hopes that I will pick up the gist of the thing. The only thing I found out is that the trial license does not include enough components to even get through the tutorial. I e-mail sales@hp, nobody got back to me.
Borland: A good friend of mine is working with Silk, and can’t say enough good things about it. Way back, I used to work with some of their stuff; these guys invented the idea of an IDE AFAIK. Did not even realize the company is still around today. Basically same situation with the download as above. However, sales were a little more proactive, very little. Basically, the sales drone called me up with what is the problem. I told him that servers keep timing out, and if there is any chance they could ship me a CD. He, very slowly, responded with: “Well, you know, our software is rather complex and not easy to use.” I felt like he is telling me that I am probably too dumb to use their software. So I thanked him and hung up.
IBM: I was, by far, the most impressed with them … almost! First, I got here via Rational Robot. Apparently IBM gobbled up the whole thing (Rational that is). Their site, out of the three (maybe four), is the worst to navigate. Somehow I downloaded Robot, and started going through the tutorial. After a little while I simply gave up in frustration. This has to be the most unintuitive piece of software out there. Their sales got in touch with me, without any prompt from my end, and immediately invited me to a one-day seminar. Sure, why not. I told them about my download troubles, and asked for a CD. “Absolutely not a problem, we’ll have one waiting for you at the seminar!” At the seminar, they confirmed that Robot indeed sucks, and they are only keeping it around for the name and legacy projects! But they got this new thing called Rational Functional Tester: installs as a plug-in into Eclipse or Visual Studio (whichever is your poison), and the test recorder dumps out either Java or VB.NET tests. We are a C# house. Then they have this entire management platform built around it, which they spent the next 6 hours of the 7 hour seminar showing off. My reaction to it: we would need to at least double our management staff to have enough people to click through everything. I mean I can see a lot of potential in this platform for a very large company … which is exactly the reason why I don’t like working for very large companies: because they use software exactly like this to manage stuff, and it ends up being just a time sink. However, during breaks I kept hassling one of their consultants about the Functional Tester. He showed me this thing they call Data-Driven Testing: you record one test, parametrize it, and then you feed into it data from something like an Excel spreadsheet, and it goes through everything. “Neat! So how do you set this up in RFT?” “Unfortunately, RFT does not do any of the work for you, you have to code everything up yourself: the data, the data parser, and the driver.” “Hmmm, OK, so how difficult is to code up tests from scratch.” “Well, first you need to point RFT at your application, so that it learns all the controls.” “Can’t I code those up myself?” “No, that part is proprietary. But it will become part of the IDE as methods and you can then use code-completion when you are coding up your tests.” “What if the tool cannot recognize some obscure control of my app that I need?” “That’s what we have consultants for!” “And how do you hook it all up to a continuous build system?” “Well you have something monitor say a file on a server, and then start up the IDE and kick off the tests.” “No, I mean how do you run it unattended?” “Yea … monitor a file … start the IDE …” “You mean I need to install the IDE (in my case Visual Studio, a licensed IDE) on the server where I am going to run tests unattended?” “Yes”
“So in my case, the license that I pay you guys would basically be only for the UI control recognition mechanism, as everything else I have to code up myself, and if that happens to fail I have to pay you more money?” “Yes”
We’re going with Selenium. More info, less fluff, coming soon…
April 13, 2009
Recycling is wasteful
Recycling and that whole green movement: I don’t get it!
When I was a teenager, over 20 years ago in the ‘ol country, all backwards and stuff, I used to go around the neighborhood collecting discarded paper, old metal, glass, etc. I took it to the recycling depot where I got money for it … usually to buy ice cream and gum. Today, after two decades of innovation, I have to pay somebody else to take my recycling away?!?! What the hell happened? All the people working on recycling projects are COMPLETELY INCOMPETENT! What have you been doing all this time. Are you even aware that technology is suppose to improve over time and make things easier and cheaper?
April 10, 2009
Getting Linux distro name and version
It appears that I am not the only one that would like a consistent way of getting the Linux distribution name and version number for any and all distros. And it appears there is no solution to this dilemma. The following is my attempt at such a solution.
The script will currently give you correct results for only about 50% of ditros out there. Anyone want to add the algorithm for their fav distro, please do in the comments. I will try to maintain this up-to-date.
#!/bin/bash
if [ -e /etc/knoppix-version ]; then
if [ $(egrep -q '[[:alpha:]]' /etc/knoppix-version) ]; then
printf "Knoppix "
fi
cat /etc/knoppix-version
elif [ -e /etc/issue ]; then
head -1 /etc/issue | sed {'s/ [@\][[:alpha:]]//g'}
elif [ -e /etc/lsb-release ]; then
lsb_release -d
fi
April 5, 2009
Setting up CVS|SVN+SSH
I have to go through this procedure every time I start someplace. Normally only once, and by the time I have to go through it again I usually forget the steps.
The following are my notes on how to do this next time – hopefully nobody at $JOB is reading this.
If you finds this useful, then great! If you are doing this on *NIX-*NIX machines, the you probably already know how to do this. The following information is for Windows-*NIX setup; surprisingly, I have not been able to find this anywhere else on the net.
The Windows client for accessing a repository that I prefer is either TortoiseSVN or TortoiseCVS. The procedure for setting up both is similar; differences are noted below. Some hints are here and here.
You are going to need PuTTY with TortoiseSVN; with TortoiseCVS it is bundled already. Although you do not need the entire package it is quite a useful tool for other things as well, and therefore you might as well grab the “Windows installer for everything except PuTTYtel” from the download page.

- Generate the access keys using PuTTYgen. The program will be in either C:\Program Files\TortoiseCVS\puttygen.exe, or C:\Program Files\PuTTY\puttygen.exe. Ask your admin what encryption and strength you should use, or just take the defaults. Click “Generate”, move your mouse around, if you need help: RTFM.
- Check with your admin if you need to password protect the keys. It’s a good idea to do, I personally do not bother as it is an inconvenience and I am lazy.
- Save the private key in a directory of your choice with a filename of your choice. Ideally, it would be in a location that only you have read-access; a suggestion is to place it right in C:\Documents and Settings\<your.login>\, not in My Documents where you often make changes to stuff.
- The server that you are going to access is in all likelihood some sort of a UNIX-like system; if you are stuck with a Windows server, then I feel sorry for you and I cannot help you. You need to move the public key over to that machine and appended it to your ~/.ssh/authorized_keys file, probably. Your admin can change the default filenames – check with him. Do not ever give out your private key; that is the equivalent of giving out your password! Start up PuTTY, and connect to your server (you will have to login with your password this time). You can copy-paste from a Windows window to the PuTTY terminal any text, so:
- On the PuTTY Key Generator page, highlight the entire Public key, and copy it to the clipboard (Ctrl-C).
- In the terminal navigate to the right directory. Type
echo "now right-click and select Paste, and continue typing" >> authorized_keys; you need the quotes.
- Exit everything. You can test the connection at this point using these instructions.
- This step is TortoiseCVS specific: Go to the TortoiseCVS Preferences and select the tab Tools. On the line “SSH parameters”, leave what is there and append:
-2 -i "C:\Documents and Settings\<your.login>\<private_key_file>.ppk", quotes included. Save everything. Go to the repository browser for TortoiseCVS (you will have to get the URL from your admin; it will start with something like CVS+SSH://) and see if you can browse the repository without being prompted for a password – if in step 2 you did put in a password, then you should be prompted only the first time you connect (after each time you reboot). - This step is TortoiseSVN specific: Start up Pageant, and add you key to it – if you specified a password in step 2, you will be prompted for it now (and every time Pageant starts after a reboot). Go to the repository browser for TortoiseSVN (you will have to get the URL from your admin; it will start with something like SVN+SSH://) and see if you can browse without being prompted for a password – you should never be prompted for the password at this point.
Some additional notes (troubleshooting?):
- I have had limited luck with “Save public key” and transferring that mess over to the *NIX machine. I think there is some issue with Windows-CRLF versus UNIX-CR character conversion, and the Windows client seems to add more than what is needed. If you need to, you can always Load you private key into the PuTTY Key Generator, and it will show you the public key again.
- There appears to be some version dependency between the SSH client and the SSHD server, however I do not know what it is.
I have had at least one case, where a newer version of PuTTY created keys that were refused by an old server, but using an older version of PuTTY (exact same encryption and strength of keys) worked on the first try. - SSH is quite finicky about file permissions everywhere – which makes sense, as you would want this to be secure. Basically, you need to have at least read permissions to all the keys, and other users must not have any permissions to any of the keys.
- I used to think that you had to create a separate key-pair per machine that you will be connecting from (the client). Apparently this is not the case, you can use the same one key-pair on every client machine. Just be careful about where you put the private key. Personally I have never tested this.
- There is a great article OpenSSH key management, part 1 by Daniel Robbins.
March 27, 2009
Assorted randomness
It’s been a while since I dropped something non-techie in here. Stuff was happening, I was just not sure if I wanted to air everything out. Then I figured: what’s the point of having a blog if you can’t bitch about stuff?
I have roughly an hour bus ride to and from work every day, so plenty of time to ponder stuff’n'things. It occurred to me the other day that I seem to, completely unintentionally, pick my women and my jobs about the same way. Actually, pick is not the right word, more like they pick me. Anyway, usually if I have a very positive first impression of the target(?), then it never works out! My first impression of the ones that do work out is usually firmly neutral. Over time, as I familiarize myself with the situation, my impression and whole outlook turn out positive. But in the end, so far 100% of the time, something happens and I have to move on. Wonder what does that say about my sense of first impression? Well, at the moment I am trying to break this trend, in both areas.
I have been gone from Canada for over five years, returned just this past December – just before the middle of winter hits: the worst time of the year for most people. There is snow, like lost of snow, it’s cold, like really cold, and a lot of people are bitter about it. Over the past four months I realized that I really love Canada, specifically Calgary. Sure it’s got issues, who doesn’t, but overall I feel really good here even at the worst of times.
On my daily bus ride I also do a lot of reading. Currently it’s Lion of Ireland by Morgan Llywelyn; she has an amazing talent for storytelling. Ireland, out of all the places that I have been so far, has the greatest people; still have several good friends there, whom I very much hope I will see again. As much as I love living in Canada, I loved visiting Ireland. Here is a passage from the book that I particularly liked:
The green land, the passionate, intensely alive people, the great weight of their history together that stretched back through memory to myth, to some prehistoric dawn he could not even imagine.
Ireland.
A need to love which could not be fearlessly bestowed on any mortal being could be satisfied by the country herself. She could not die. If a man could weave himself into her very fabric she would be his forever, capable of absorbing all his passion, his to safeguard and cherish.
I got this story I tell my children to try and convince them to study hard. When I tell them, I dress it up a little, but the gist of it goes something like this. At the end of school, everyone will get divided into five groups, based on their grades. Then they are going to take the first group aside and show them all the jobs that are out there, and ask them to pick any job they like. The second group will get a choice of the leftovers from the first group. The third group will essentially be left with a pick of jobs that nobody wanted. The fourth group end up on welfare, and the last group become street urchins. I also leave out the fact that popularity and who your daddy is plays a big role in the initial selection. I personally seem to fluctuate between the third and fourth group. The story continues that about once per year your employer evaluates how well you are doing, this includes performance as well as how/if you are liked by your coworkers. Depending on the outcome you may move up or down, or out. I think when I was last in California, I really let things slip. I got overconfident, cocky, and just a plain pain-in-the-ass. So regardless of how good my skillz might have been, I got the boot. Yes, this last part I also tell my children.
I am pretending to be a writer, again. I have always wanted to write a book. It’s a bit of a vanity thing for me, I think – just to have a physical stack of paper bound together with my name on the cover. Unfortunately, I am not quite committed to what it is going to be about, not even fiction versus non-fiction. This is not the first time I tried to write. I wrote the character Cali in Child of the Moon. It was a collaborative fantasy piece, which did not go anywhere because each of the writers had their own selfish idea of where they wanted their character to go, and none of us had any idea (or even care) how we will contribute to the overall story. I played Catlyn (Katlyn) in Radiantsphere, a Traveller campaign; I did not write those mission logs, but man that was a lot of fun! Currently, I am writing my autobiography (in Czech). Two good friends, on separate occasions, previously suggested that I do this. Actually my first autobiographical attempt was this blog, but that seems to be now leaning more toward technobabble. I have some ideas for two other books that I would like to try: one a fantasy trilogy (leftovers from my D&D days) and one a technical howto. But so far those are just ideas …
March 15, 2009
Pimp your desktop
If downloading and installing stuff from gnome-look.org is too complicated for you, as it is for me, then try GnomeArtNT.
Got to give credit where credit is due: I first heard about this app at MintCast #5.





