Monthly Archive for August, 2007

Seamless Windows Integration Revisited

So, I sanitized the three scripts that I use to start my seamless desktop.  They are definitely not ready for public use, though.  There are a whole bunch of constants that need to become variables, the system is only useful for people running Gentoo (but it’s modular enough so that you should be able to code your own replacements for most of it), etc.  This patch for Windows XP should fix the problem of rdesktop not working correctly on the first try, although I have no clue as to why.

So, without further ado, I give you some scripts that’ll work well on my system and break on everyone else’s:

vboxsrdp.tbz

Untar it with tar -xjf vboxsrdp.tbz to enjoy the goodness.

Hopefully, in the near future, I’ll have the time to design a very flexible, modular script that makes it easy for people to set up seamless environments like mine.

Seamless Windows Integration in Linux!

With VMWare and Parallels actively competing in the Mac market, Linux users are being left in the dust. The two main improvements that these companies have designed for their respective OS X applications are the ability to use DirectX and the ability to seamlessly integrate desktop applications.

I use VirtualBox. It’s free (although, if you want the more useful features, they are not open-source; you must agree to use it only for personal or evaluation purposes), it’s clean and efficient, and it’s fast. Windows boots in mere seconds. However, a developer has already said that DirectX support won’t be available for a while (there are reports that mention that some development is occurring, though). So, right now, there’s no way to make VirtualBox support 3D graphics.

However, that still leaves the question seamless integration. After doing a little research on the web (links listed at the end of the article), I found that seamless integration is somewhat possible through the use of RDP. After reading a few instructions, I decided to give it a try.

Continue reading ‘Seamless Windows Integration in Linux!’

GB, GiB, and Discrepancies in Drive Sizes

There was a discussion on the iPodLinux Forums recently about discrepancies in DVD capacities (which seem to only hold 4.3GB of information when they are advertised as holding 4.7GB). I decided to organize my responses a little better and add in some totally hypothetical questions. Here’s the result.

“I bought a new 100GB hard drive, but my computer says that it’s only 93GB big? Did the company cheat me out of 7GB?”
Nope (though the advertising might have been a little cheap). The issue is the term GB, or gigabyte. In common everyday use, it can refer to two different standards of measurement: the gigabyte (which we commonly think we are using) and the gibibyte.

“What the heck is a gibibyte and why does it mean that I can’t sue the company?”
The difference between the two is this: 1 gigabyte equals 10003 bytes and 1 gibibyte (GiB) equals 10243 bytes. Thus, gigabytes and gibibytes are not quite the same thing. When we are talking about file sizes and RAM sizes, we are actually using gibibytes, although it is the standard cultural convention to refer to them as gigabytes. On the other hand, gigabytes are used to talk about the sizes of block devices like hard drives and optical disks. Furthermore, most operating systems actually use GiB when referring to hard drive capacities!

So, companies can freely refer to drive sizes in terms of gigabytes to make their drives seem bigger. But when you open up the box and put your drive into your computer and find out that you had less space than you expected, you probably won’t be happy.

So, how can we convert between the two? It’s just simple dimensional analysis. I’ve got two 160GB hard drives in my computer (hopefully 1 160GB and 1 320GB soon). Let’s use 160GB as an example.

( 160GB ) ( 10003B / 1GB ) ( 1GiB / 10243B ) = 149GiB, which is about a match to what I have.

There are some other factors that cause discrepancies in the size of your drive, including the way it was manufactured (one of my drives is just a hair over 150GiB and the other is about 149GiB). Also, filesystems inherently use some disk space, which can result in a slight loss of drive capacity, too.

For further information, take a look at these Wikipedia articles:
http://en.wikipedia.org/wiki/Gigabyte
http://en.wikipedia.org/wiki/Gibibyte

Remotely Obtaining emerge Progress

I’m quite glad that I installed Gentoo onto Sophos. The system is far cleaner now, and I can easily keep it updated. I cheated a little bit and used binaries for some of the larger programs (like Firefox), but the system is running quite smoothly. I’m compiling Enlightenment (DR17) as I write this.To prevent the system from being slowed down by the VESA framebuffer, I output logs of emerge instances. For example, to compile Enlightenment, I ran emerge -v e > log 2> errorlog. While I don’t usually get much output on the errorlog file (a bunch of “>>> Regenerating /etc/ld.so.cache” messages), the log stores all of the compilation information. However, I wanted a way to quickly tell which package I was compiling, from a remote location (namely, my main computer). So, I wrote a quick script to find out.

#!/bin/bash
 
if [ -e ./log ]; then
        LOGFILE='log'
else
        LOGFILE='$1'
fi
 
NUM=`cat $LOGFILE | grep '>>> Emerging' | tail -n 1 | cut -d( -f 2 | cut -d) -f1`
NAM=`cat $LOGFILE | grep '>>> Emerging' | tail -n 1 | cut -d  -f6`
 
echo "Current Package: $NUM : $NAM"

The script looks to see if you have a file named log in your current directory. If you don’t, it takes an argument from the command line. Feel free to add elif statements to include other directories and files (e.g. /root/log, /var/log/package_emerge.log, etc.). It’ll output something like this:

sophos ~ # progress
Current Package: 20 of 23 : x11-libs/ecore-9999

And that’s all there is to it. It’s a very simple script, but it gets the job done.

Updates to Sophos

So, I’ve decided to scrap Slackware and install Gentoo on Sophos. Although Slackware is extremely flexible (and generally a good choice for a stable OS), I feel that the system will perform better with a proper Gentoo installation. Slackware’s package manager is driving me mildly insane, too.

I installed Enlightenment (DR17) onto Sophos with little expectation that it would run well. The processor is only 800MHz, the graphics card is only partially supported, and the system only has 256MB of RAM. Much to my surprise, though, all animations were smooth and I even got fancy stuff like the drop shadow working. Enlightenment is a really well-designed window manager. I really wish that Compiz Fusion will adopt many of its algorithms for working with windows.

But, I digress. I liked Enlightenment so much that I decided to plan for two accounts in the Gentoo installation. The standard account will start up with just a full screen instance of Firefox. There will be no window manager (saves loading time). The web-based interface will then be loaded. However, there will also be a second account for regular use (although I don’t know how useful a touchscreen will be). That account will start up with Enlightenment.

I’m also planning to redesign the user interface. I think that I’m going to get away from having so many boxes and things. It just makes the design too complicated. I’m going to keep the email box and the weather box. Then, I’ll stick the stations box on the bottom of the screen and I’ll make the station links larger so that it is easier to tap on them. I’ll make a mockup soon.

I’m also thinking of building an IR receiver so that I can use a remote control with Sophos. It should be easy enough to do. I’ve found numerous instructions on the web. The only real issue that I can see concerns obtaining the IR receiver. I don’t know what the local RadioShack has.

Oh, and by the way, I figured out how to hook Sophos up to my stereo. So, I think I’ll place it beside the stereo. I might need to find a quieter CPU fan, though. It’s running at around 4000-5000 RPM, so it’s somewhat detectable.