Tuesday, 5 May 2009

Tuesday, 14 April 2009

Windows 7

It occurs to me that one of the main reason that corps are avoiding the move to Vista, and apparently W7 now too, is the perceived compatibility problems and the retraining that would be required.

Interestingly, these are also the two main reasons usually touted to explain why Linux will never displace Windows on the desktop.

On top of that, there is the whole bloat factor that would require corps to roll out vast numbers of hardware replacements to cope with the vastly increased resource demands of MS latest offerings, were they to choose the upgrade option. This is a problem that Linux does not suffer from.

It seems to me that the only thing keeping most corps on Windows is the "If it aint broke, don't fix it" attitude, but eventually XP will become broken, if only due to extreme old age.

The only question then becomes, how many MS generations will have been skipped by corps? Inevitably, each new windows version will be "improved" (ie made different) and the longer lusers get used to XP the harder it will be be to shift them to what will possibly be a vastly different OS.

Ironically, Linux has the potential to be a less painful transition target than Microsofts.

You see, Microsoft has a problem. For years they have maintained an unholy symbiosis with hardware manufacturers. MS demands that their oems sell Windows *exclusively* in return for "marketing assistance". In return, MS promises to greatly increase the hardware requirements of each new release in order to "stimulate" hardware sales.

This worked fine for a decade or so, as the first versions of Windows were undeniably crappy. WFW 3.11 was the first usable version of Windows, albeit it was little more than a glorified menu system. As well, despite having the same clunky gui as WFW3.11, Windows NT 3.5 was a huge improvement for corps as far as networking and stability was concerned. When the W98/NT4.0 user interface was introduced it added significant additional memory and other hardware requirements but the improvements on offer were worth the upgrades. Also, people weren't dumbed down into a user interface monoculture at that point so they were more amenable to adapting.

Finally, along came W2K/XP. At this point we have the unification of the W95/98 branch with the NT branch. Once again, corporate friendly improvements were added with active directory and the new driver model amongst other things and again, the additional hardware requirements were worth these features alone, and the user interface had remained largely unchanged since the release of 95 so for corps it was a no brainer.

Microsoft sells operating systems, corporates get much more control over their increasing numbers of seats and hardware manufactures receive a steady stream of orders as companies purchase seemingly endless numbers of new PC's to support the newer OS's.

Then MS dropped the ball. After huge amount of blowing their own horns about the amazing new feature set of their next OS, "longhorn", which was intended to be rewritten entirely from scratch, we eventually, after a previously unheard of delay between releases, they eventually served up the steaming turd that is a vista. Longhorn had been quietly and unceremoniously dumped a year or two earlier when it was realised that they were never going to make it work and the industry were starting to make jokes about the ever increasing list of dropped features and delay announcements coming from Redmond. Microsoft was quickly becoming the laughing stock of the industry.

So, it was decided to dust off the old XP code and polish it up and call it a new release. A whole lot of bloat was added in the form of DRM restrictions which are in no way an enticing "feature" as far as corporates are concerned. Security was "improved" in the form of UAC, which might possibly be of small value to home users but to corps, who in the most part have their desktops already locked down and don't want their users to have access to admin rights then once again this new feature was totally unwanted.

To make things worse, in their hurry to differentiate Vista from XP, MS had slapped together a fancy new 3D gui which ultimately was to be Vistas primary "selling point". This too offered nothing to corporate users because not only does the new interface require vast investments in new hardware but it requires that their users (users who have spent 5+ years using XP and have long forgotten how to adapt to new interfaces) will require retraining.

The bottom line is that to move to Vista, corps receive VERY little benefit and what little they get come at great cost.

So, what about the great Saviour that is Windows 7? MS say they have stripped the bloat. I will ignore speculating on exactly why the bloat was there in the first place and simply wonder about how they have done so. I haven't played with W7. Some people report that it is in fact more nimble and less demanding on hardware, but in this game astroturfers, shills and fanboi's abound so it is hard to say.

But what I can say that if it is not substantially similar to XP in the areas of compatibility, user interface and hardware requirements then I doubt very much that corps will have much interest in it either, and quite frankly I cant see Microsoft pulling out most of the code they added with Vista, I think it is far more likely they have simply redone some of the hurried code they produced in the rush to create a "new" product in the wake of the longhorn debacle.

Meanwhile, we have the biggest financial crisis since the 1930's on our hands and businesses are hardly of a mind to go out and purchase new fleets of PC's with the latest Windows extravaganza preloaded. I reckon businesses will continue to ride the depression out as best they can with the equipment they have now. But if Microsoft tries too hard to bully them into dropping XP in favour of W8 I think they might find they will be more successful than they think at shifting business over to a newer platform, it just might not be the platform they are hoping they will move to.

Perhaps 2010 will be the year of Tux?

Tuesday, 7 April 2009

Saturday, 28 March 2009

Fix broken keyboard mapping - VMWare in Ubuntu Intrepid

If all your arrows and special keys have stopped working in vmware, simply edit you vmware config file

sudo gedit /etc/vmware/config

and add this line

xkeymap.nokeycodeMap = true

You will need to close down vmware and restart to make the change take effect

Friday, 27 March 2009

UPDATED: Using SSMTP to send mail via GMail

UPDATED July 2014, to reflect the fact that google smtp servers are on port 587 now.

Often you will have a bash script that requires the ability to send emails out, such as alerts and status updates. Or perhaps you just want to get the normal alerts that all Unix servers attempt to send from time to time.

Out of the box Linux systems don't send email unless they are configured to do so. You can muck about configuring sendmail to use a "smarthost" if you like or you can do what I do and use a simple little smtp service that is quick and easy to configure to send mails via a GMail account.

Note:
If you have your own domain then it is probably better to use sendmail to send mails direct rather than relaying mail via the Big G

Obviously, for this all to work you will need a GMail account of your own. Is GMail still invite only? I have no idea. If it is and you need an invite then enter a comment below with your email address and I will be happy to send you one!

OK, let's get started.

First we need to remove sendmail and install ssmtp

sudo apt-get remove sendmail
sudo apt-get install ssmtp mailutils


SSMTP requires a little configuring so edit /etc/ssmtp/ssmtp.conf;

sudo vi /etc/ssmtp/ssmtp.conf

Enter the details for the following fields;

mailhub = smtp.gmail.com:587
rewritedomain = tuxnetworks.com
AuthUser=myusername@gmail.com
AuthPass=mypassword
UseSTARTTLS=YES
UseTLS=YES


Note:
You should replace "tuxnetworks.com" with your own domain as well as provide the details for your GMail account. Using 'myusername' and 'mypassword' is a recipe for FAIL

Testing to see if things work.

Send an email from the command line like this;

mail -s "test config" myusername@gmail.com

To see if it was sent you can check /var/log/mail.log;

tail -f /var/log/mail.log

You should see your email logged as "SENT" in the output there.

Here is a sample ssmtp.conf for your convenience;
#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=postmaster

AuthUser=myusername@gmail.com
AuthPass=mypassword
UseSTARTTLS=YES
UseTLS=YES

# place where the mail goes. The actual machine name is required no 
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=smtp.gmail.com

# Where will the mail seem to come from?
rewriteDomain=tuxnetworks.com

# The full hostname
hostname=myserver.tuxnetworks.com

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=yes


And that's it! Simples!

[ Tested and confirmed on Lucid and Natty servers ]

Thursday, 12 March 2009

Disappearing network interfaces in Ubuntu Server

If you change network cards on ubuntu server then you will find that the new cards no longer come up. This also occurs when you copy a vmware virtual machine.

To fix this, edit the persistent-net-rules file

sudo vi /etc/udev/rules.d/70-persistent-net.rules

You should see a line (plus a commented heading) for the affected interface(s) like this;
# PCI device 0x14e4:0x1659 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1c:c0:db:32:e7", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

(Forgive the formatting but blogger.com has a ridiculously narrow content column and long lines tend to disappear behind crap on the RHS of the page or wrap around and look like multiple lines)

Anyway, all you need to do is delete the line for the affected interface and reboot your system.

Once the system has rebooted, the persistent-net-rules file will be repopulated with the details for the new interface and your Ethernet adapter will be working once again.

Thursday, 5 March 2009

DEPRECIATED: Setting the hostname in gnome terminal

If you SSH to another host you might want to display the hostname of the remote host in the gnome terminal title bar

Put this code in your ~/.bashrc file;

case $TERM in
(xterm*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}($(id -ng))@${HOSTNAME}:
${PWD}\007"'
;;
esac