Archive for the ‘Computers’ Category

Confidentially, You’re stupid

Wednesday, May 19th, 2010

I received another email today with a bold footer exclaiming the email’s confidentiality. I have to laugh every time I see one of these utterly moronic banners.

NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.

Think about what this notice is claiming. Putting aside for the moment that the recipient has not signed a confidentiality agreement, you don’t even get to this notice until you’ve already read the previous material! How in the world can one be held responsible for reading the material, when the notice not to is at the bottom of the message? Furthermore, if you contact the sender, you have also reviewed the material, as the sender’s identification is not in the disclosure statement. In responding to the sender, you have proved that you broke the supposed agreement.

Such are merely minor points, however.  That you never signed a confidentiality agreement of any kind is enough to utterly render this notification legally null and void. You cannot insist that someone has entered a contract agreement simply by receiving email from you.

Imagine having a footer which stated, “NOTICE: This email is for the sole use of the intended recipient(s) and may contain confidential information. If you are not one of the intended recipients and you read this email, you owe Boneheads, Inc. $20,000,000 in contract fees and must pay this amount immediately.”

Any such ludicrous attempt at establishing a contract with a non-signing recipient would be laughed out of court and end up as a footnote on Failblog.org.

To be fair, sometimes it is not the end user, but the email server of the corporation in question which appends these notices. If you work for a company which appears to have its fair share of litigious idiots, you might email yourself to see if this is the case. If so, contact your IT department and demand to know why it is that they want you to look like a blithering idiot with every email you send.

Because that is all these confidentiality notices really say.

Removing Encryption from Home Directories in Ubuntu 9.10 & 10.04

Friday, March 5th, 2010

I recently assembled a new workstation for home and in the process did a clean install of Ubuntu 9.10 on the system.  Though I have been working with Ubuntu’s very handy ecryptfs setup for encrypted home directories, I had limited such to laptops and had never done so on a desktop system before.  I figured I would give it a try and see what happened.

Performance tests done by others had always shown that there was a slight degradation of speed on ecryptfs encrypted filesystems, which I had fully expected, but I ran into something I hadn’t dealt with on my laptop: directory trees with hundreds of thousands of files.

The difference in speed of accessing individual files a few at a time in ecryptfs was never really noticeable, but I had never tried to stat a tree of 600,000+ files before.  It was as if my brand new system was an artifact from the ’70′s.  It dropped to its knees and cried.

Not believing how slow it was, I tested the issue by copying the directory tree to an unencrypted filesystem on the same physical hard drive and the same task (running ‘tree’ on the directory structure) took only a few seconds, instead of minutes.  It was apparent that any task which had to do a lot of file stat processing, simply dragged to a crawl under ecyptfs.

I was left with the dilemma of how to deal with changing my entire home directory under the ecryptfs system – complete with Ubuntu’s handy automatic mounting – to a standard, unencrypted form.  A bit of searching on the Web lead to dozens of approaches, some as drastic as copying the files to an unencrypted filesystem and removing the ecryptfs software.  That seemed ludicrous to me.  There should be no reason to disable an entire feature globally, to deal with one directory.

I finally came across some handy information on a blog, which gave me a clue as to how the automatic mounting worked in Ubuntu 9.04.  Although not exactly the same as the Ubuntu 9.10 implementation, it was more than enough to give me a very simple way to not only remove the encryption from my home directory, but to allow the system to work for me in creating an encrypted directory to use within my home directory, which took advantage of the slick auto-mount setup the Ubuntu developers had designed.

So, should anyone stumble on this issue, I’ll detail the steps taken here on how to alter Ubuntu 9.10 to switch a full home directory encryption to a normal home directory with an auto-mounting encrypted sub-directory.  The process is amazingly simple.  All text in red are actual commands to type. Green text is a file or directory path. “username” is a token for the name of your account.

  • Logoff the system.  No occurrences of your user account should be active.
  • Login as root or a different sudo enabled account.
  • Make sure that your account’s home directory is not mounted, using the ‘df‘ command.  If it is still in place, use umount /home/username to un-mount the encrypted filesystem.
  • Change the line “/home/username” to “/home/username/Private” in the /home/.ecryptfs/username/.ecryptfs/Private.mnt file using your favorite text editor.
  • mkdir /home/username/Private
  • chown username.username Private
  • Reboot the computer. (You can try restarting the cryptdisks init scripts, but I didn’t have any luck with it.)

When you login now, your previous home directory will be mounted at /home/username/Private instead of at /home/username.  Login the first time using a console rather than X11 (Ctrl-Alt-[F1-F6] from the login screen should be available) and move what files you want from ~/Private to your home directory and use the ~/Private encrypted directory for your sensitive documents.  Moving your dotfiles and hidden sub-directories back into /home/username is a good idea, unless you feel like re-configuring Gnome or KDE.

From this point on, Ubuntu will continue to automatically mount and dismount your ~/Private directory, just as it did for your entire home directory before.

Addendum: The procedure used above is identical in Ubuntu 10.04 LTS.

Internet Explorer Sucks

Monday, June 22nd, 2009

Internet Explorer just simply sucks!

I’ve had poor results with this browser before, but my experiences over the weekend when working on a Web site I administrate, had me at first pulling my hair out with frustration and then eventually had me laughing so hard over the amazing stupidity of Microsoft and their shitty excuse for a browser – that I finally gave up on it.

I will no longer even attempt to support their shit.

Here’s the quick rundown. I was working on a site which utilizes Joomla as a content manager, meaning that the site design is handled by XHTML and Cascading Style Sheets (CSS). The task was a simple one, create a new division in the PHP index file for a Joomla user container in the header of the page, move a random image plugin from another container on the opposite side of the banner to the new division and then put a new plugin into the old container. Pretty simple layout for a header: plugin, banner, plugin. If you have any familiarity with Joomla, the most difficult part of this task is creating the new division in the PHP file and matching settings in the CSS sheet to make it display correctly – and all said, this is not a difficult task.

I created the division, assigned the new module, re-assigned the old space and examined the results in Opera. A few minute’s tweaking and everything looked great. I checked it via Opera on Windows – it looked perfect. I checked it with Firefox on both Linux and Windows and it looked perfect. I checked it with Safari on Windows and it looked perfect. I checked it with Safari on the Macintosh and it looked perfect. Konqueror has for the moment a problem with the Flash plugin on one side, but the layout was perfect.

Then I opened Internet Explorer 8 on my Windows box and couldn’t believe what I saw.

The entire banner was messed up in alignment. What appeared perfectly within its confines on all other browsers I had tried, was completely disjointed under IE8. I went to my wife’s system and tried IE7. The same mess.

So, I did what anyone else in this situation would do – I went off to Google.

The first thing I discovered, is that one of the most basic structures of CSS implimentation, the box model, is pretty much completely broken in IE. All CSS compliant browsers deal with a box element as the totality of margin, padding and width of the container as a summation. IE, on the other hand, includes the padding and margins as part of the value of the set width – meaning that the box renders incorrectly, becoming narrower and shorter than what it should be. IE has been doing this since version 3, from 1996, meaning that the brain-dead programmers at Microsoft haven’t gotten a clue over this glaring break from the standards for thirteen years now! By careful adjustment I was able to fix the issues without having to resort to a conditional clause for IE versus every other browser.

The next problem, however, I haven’t found a good fix for. In the random picture division, I wanted the image to simply center. Horizontal centering was easy enough to accomplish, but vertical centering just wasn’t going to happen. For all other browsers to work correctly, I had to add but two lines to the division:

div#picflash {
    display: table-cell;
    vertical-align: middle;
}

However, as usual, IE doesn’t recognize vertical-align and puts the picture at the top of the cell. To correct it, you can use Javascript in a conditional statement, testing for IE, or there are some other CSS tricks to handle it. The best of the tricks and one of the most common used requires making two sub-containers inside the container, and then adjusting the margins of the containers to cause vertical centering. The code would go something like this:

div#picflash {
    width: 165px;
    height: 150px;
    position: relative;
}

.wrapper {
    position: absolute;
    top: 50%;
}

.content {
    position: relative;
    top: -50%;
}

With this in the HTML/PHP file:

<div id="picflash">
    <div class="wrapper">
        <div class="content">
            <jdoc:include type="modules" name="user7" /> <!-- This is the Joomla container...) -->
        </div>
    </div>
</div>

Technically, this is crappy CSS code. Percentages in a division are ignored unless you set the height of the container explicitly. As such, CSS compliant browsers just ignore this.

However, it works in IE, because IE ignores the specification that the height must be specified for percentages to be used. In short, even if I were to put this crap into a conditional statement for IE only, in doing so I’m "fixing" the situation by specifically exploiting a bug in IE! So, instead of supporting a shitty browser with any fix for their breaking of standards, I decided to ignore the broken browser. IE users get to see the image aligned on the top of the cell.

What it comes down to is this: every time a Web designer makes exceptions, via conditional statements, CSS hacks, Java script wrangling, or any other distortion of the XHTML and CSS standards, that Web designer is allowing a compliance ignorant software to control a portion of the Web! They are giving Microsoft tacit approval of their violation of the standards everyone else attempts to comply with. By doing so, they are allowing Microsoft to dictate the structure of the Web – effectively giving them a free reign to continue to break existing standards and any new standards which come out in the proper Web community.

I will not support Microsoft in this disgusting attempt to usurp control of Web standards. Instead, I am designing what little I work with as close as I can to the proper standards (I’m no expert on CSS, but I will try my best!) and adding in the following conditional code to any Web page I design.

<!--[if IE]>
    This site is best viewed with a XHTML and CSS compliant browser.
    <br />
    Try <a href="http://www.mozilla.com/en-US/firefox/firefox.html" target="_blank">Firefox</a>,
    <a href="http://www.opera.com/browser/download/" target="_blank">Opera</a> or
    <a href="http://www.apple.com/safari/download/" target="_blank">Safari</a> today.
    Learn more <a href="http://www.lockergnome.com/news/2004/06/15/why-you-should-dump-internet-explorer/" target="_blank">here</a>.
<![endif]-->

The last line is a link to a very insightful article by Chris Pirillo at lockergnome.com, where he briefly summarizes the problem and why it is so important to drop this stinker of a browser.

If you use Internet Explorer, I urge you to switch to a browser which at least tries to follow the set standards, instead of arrogantly imposing Microsoft’s broken implementations.  There is no good reason to continue to support IE by using it.  In the process, I think you’ll find that the other major browsers out there provide a much richer experience than IE ever has or will.  There is nothing innovative in IE.  IE has never set new trends in browser design.  Why settle for half-assed software, just because it came with Windows?  Firefox, Opera and Safari are free to download for all.  Even Google is getting into the act with Chrome. Why not try them all and see which one you like the best?  (Mind you, this is a partial list out of dozens of browsers.  These are just the most commonly known.)

If you are a Web developer, stop stooping to Microsoft’s level and force them into compliance by allowing their browser to falter and fail.   Don’t make exceptions for stupidity.  Don’t make the design of your sites dependant on "the most popular browser" as you’re afraid that you’ll loose business.  If designers stopped catering to Microsoft’s stupidity, they would eventually find themselves painted into a corner and it would be Microsoft which would be forced to fix their problems to become compliant with the rest of the world.

A Tale of Two Systems (Three, really)

Wednesday, April 29th, 2009

I downloaded Kubuntu 9.04 the day it came out, to see if the bugs and other irritations of the previous release candidates had been worked out. At first, I installed it on my laptop, a Compaq Evo N800w and everything worked flawlessly out of the box, except for the PCMCIA wireless card, which I have yet to work out. That is, as they say, another story.

I worked on the laptop for a day or so and found myself quite happy with KDE 4.2.2 and the features it had. Though I had originally thought that the Plasma system would be worthless to me, once I found out that many plasmoids could be put in the dock(s) – it was an easy sell. The home directory encryption through ecrypt and flawless mounting of said directory at login, plus the added speed (quite noticeable) and large file size support of the EXT4 filesystem were icing on the cake.

I appreciated the new features and the new look and grew to like it enough to take the plunge. I installed it on my desktop system at home and work.

That’s when my troubles began. The saga went as such…

The systems both ran on an nVidia Quadro FX 3000 video card, which have served me well for some time. My old setup was running KDE 3.5.10 with Compiz-Fusion 0.7.4 without a single problem. I had been running Beryl for some time and Compiz before that and have only had a handful of crashes over the years, no worse than dropping out of X to the KDM login screen.

Kubuntu 9.04 was not destined to be that nice to me.

After installing on my home machine via Kubuntu’s upgrade path from 8.04 LTS to 9.04, things ran well enough for a time. But I started to get random lockups. Not X crashing, or even a kernel dump – it just locked up. After a hard reset, there was nothing in the logs to say why – which lead me to believe it is was kernel issue and a bad one.

At first I thought that perhaps the update process was messed up and I should install from scratch. After reading a few posts on various groups talking about disabling KDE4′s desktop effects to stop lockups, I figured I’d try that first. No luck. I disabled Compiz, going right down to bare bones KWM. No luck. Random lockups, with no rhyme or reason to them.

It smelled like a kernel issue to me, but I had no proof.

I finally decided to update my work workstation, which had the same card, to see if it might be an nVidia driver issue. No problems, even running with two monitors. The motherboards were different as were the CPU’s, but the video cards were identical, which made me put the aspect of a video driver problem on the back burner.

On a lark, a friend of mine gave me an old card he wasn’t using anymore, an nVidia GeForce 7600 GS. The 7600 took a newer driver and has a different GPU, which I thought might help me diagnose things if it worked without a problem. No go. It still locked up. It still smelled like a kernel issue.

So far, my home workstation was the only victim. Something with the motherboard, perhaps? I would have kept thinking that way, except that over the weekend, the work system locked up as well. Nothing in the logs. No sign as to why. I wasn’t even logged in locally to the machine, just remotely across SSH.

Now I had two different CPU’s (both AMD), two different motherboards and two different video cards (both nVidia, but running different drivers) which kept locking up on me. Thinking that perhaps the nVidia commercial drivers were the problem, I removed those from the equation and ran the open source “nv” driver instead on both machines. No luck, they both still would lock up randomly. My home workstation locked up when KDM wasn’t even running, as I tried installing a different driver, so I suspected that the video drivers and X11 were not the issue involved.

However, I had also reached my limit of tolerance. I reinstalled Ubuntu 8.04 LTS on both machines and have had no problems at all since. Yet, the laptop has yet to exhibit the same symptoms…

Though the laptop is using the open source drivers for it’s ATI video chip, it is running with Compiz and KDE4′s full effects and has no problem. I honestly don’t think this is an X issue.

What my mind keeps returning to is one factor: the CPU. Both of the desktop systems, with different motherboards, run AMD CPU’s. My laptop is running an Intel Mobile Pentium 4. I suspect that there is some nasty bug in the 2.6.28 kernel which doesn’t play well with AMD chips. Since I have nothing to go on in the logs and no kernel dumps to submit, I’m left waiting to see if the rest of the world runs into the same. Time will tell, I guess.

In the meantime, I’ll be patient. I can wait for KDE4, as attractive as it has become. Perhaps I’ll even try a different distribution with KDE4 included, to see if I have similar results – only this time I’ll do it on an AMD machine which is purely sacrificial.

I’ve been happy with Ubuntu, being Debian based, but allowing for real-world software at the same time. However, if I remain with the distribution it will be on a caveat: if I don’t have a couple of sacrificial machines to test on first, I’ll wait for the next LTS release.

I should have known better from the start.  A 96 hour ordeal, I could have avoided.

P.S.  For those that thing that 96 hours is a long time, bear in mind that the lockups were random and I was restoring my home directory and other partitions from backups as well between OS versions back and forth.

Obama Wants to Continue to Spy On You

Sunday, January 25th, 2009

More lack of change, and this one is ugly.  The Obama Administration has been putting pressure on the court to set aside a ruling in favor of the plaintiffs, who are attempting to sue the government over illegal wire tapping.  Rather than rehash the whole thing, just read these two articles at Wired.  One and Two.

Big Obama is Watching You…

KDE4 Revisited

Thursday, October 30th, 2008

Back in February, I took a look at the new KDE4 and what I had found was less than desired. Always willing to re-address an issue, I installed the newer 4.1 version of the beta and dug around a bit.

I found much of what I had complained about has been cleaned up. Configuration is much easier now and previously missing configuration controls have been put back in place. The KDE team has restored my faith in the new version with this alone. I was dreading a Gnome clone.

They also canned the Duplo Lego look, for something not quite as chunky, but still too large. Thankfully, with the re-established controls in place, you can fix it quickly.

The Plasma widgets never really impressed me and they still don’t, though they are getting better. Dolphin is an interesting file manager, but konqueror still holds my heart there. Both are included, of course, so choice rules supreme. (Not that I do much with a graphical file manager, as the command line is where I typically roam.)

Kickoff finally has the ability to revert to the standard KDE3 style menu. Thank you!

Integration with Compiz-Fussion was seamless and I didn’t run into any troubles – rather amazing considering the complexity of it.

However, the one thing KDE4 still lacks is application stability. I couldn’t go for longer than ten minutes at a time without an application crash. Scrolling menus often didn’t refresh correctly. Shortcut settings would change in the interface, but not work. KMail couldn’t empty the Trash folder on my IMAP accounts without dying. The desktop itself never died, but I couldn’t get much work done.

In short, KDE4 is not ready for real work, but it’s getting better – much better. Once the environment is out of beta, I’m pretty confident at this point that it will suit me just fine and satisfy my needs for a completely configurable desktop environment.

Again, I’m thankful. I didn’t really want to move to Gnome.

Addendum: It appears that the newly released Kubuntu 8.10 has abandoned KDE3 and gone exclusively with KDE4.  I can’t imagine why they would do this, considering the issues I’ve seen with lack of stability.  Time to dig up a test machine and try a fresh install, I think.