Since this blog printed an article two years ago about using the Group Policy Editor to kill the desktop icons, it seemed worth adding that this feature, at some point, slipped into the right click context menu for the desktop. Just right click on the desktop. Under arrange icons, there is an entry to show/unshow icons. Not sure how long it's been there, whether it arrived at RTM or SP1. But it's there now.
This isn't the same as the GPE hack we described earlier, because the desktop is still alive. The right click menu is still there and you can turn them back on. But for many people, it achieves the result of decluttering. If security is what you were after, use GPE.
Better yet, use a better shell.
Sunday, November 20, 2011
Saturday, November 19, 2011
Blackbox. A truly great window manager/shell replacement for Windows.
Blackbox is a re-implementation of a window manager for X11/Xorg, which itself came out as a response to the increasing weight and complexity of Gnome and KDE. The focus from day one was fast and simple, and that has been retained in the several windows versions. It is well maintained, and fully supports 64-bit oddities such as having two program folders and two collections of control panel applets. It's pretty, but that's not the point. It's fast, and it's out of your way.
Blackbox implements everything you need in a shell, including system tray functionality. It’s astonishingly fast and smooth, without a hint of response lag on even the most antiquated system. Systray apps load in the background. You don’t have to wait for everything in there to load to get a menu and start working. So if you’re removing useful things from the tray not because you’re out of memory, but just out of patience, you can stop now. Or you can kill the tray altogether. You can do anything you want, really. Windows is yours. Welcome home.
Multiple desktops are implemented cleanly in a classic X11 way. You may or may not choose to skin windows, which both covers the ancient classic window treatment, and also implements more classic X11 behaviors such as window shading, stickiness, and always on top. While skinning may sound bloated, the way it’s done here is not. Styles are described in text files, and rendered on the fly by the same internal mechanism which draws the menus. Fast algorithms take color A and color B, renders a gradient, interlace, or flat surface, bevels the edges, and wraps the windows. It happens so fast and cleanly that you won’t see any tearing or artifacts on an old NetBurst Celeron with embedded graphics, let alone in a modern system. Skinning is optional, it should be noted. If you use aero, with or without uxtheme patches and third party visual styles, you may choose to skip the skinning, though of course you also lose the quick access to shade, stick, and always on top. Skinning can be odd with applications which implement their own management widgets, such as Adobe CS5, latest Firefox releases, and Google Chrome. Firefox can be made to work with skinning with a couple of changes to the arrangement of toolbars, or excluding, and Chrom, Illustrator, and Photoshop can be excluded easily.
Configuration is via some simple text files, which resemble nothing so much as old .ini files from 3.11, for those of you gray of beard enough to remember. Functionality is completely modular, via a plugin architecture. Not only is it extensible, but if you must, even the core functionality is mostly replaceable. By default, we receive a clean layout in which start menu like functionality is available via a right click on the desktop, window listing via a middle click. A thin system bar offers a clock, tray, and tasks and desktop switching via the rodent.
You can fiddle with it in your spare time for a week, get everything just so, and keep it on a keychain to drop on any new install you may have. It’s a little work to get set up once, but you only have to do it once. If you set up your menus to use proper shell expansions instead of hard paths (%SYSTEMROOT%, etc.) you’ll have minimal work to do to carry it around.
Most of the code is GPL. The rendering engine described above is BSD. The plugin architecture is carefully designed to allow linking into non-free code without license pollution.
Get grischka’s bbLean here. Get qwilk’s xoblite here. The xoblite site also features a fairly comprehensive list of plugins, which for the most part work with any other >.70 release of blackbox.exe. The most active forum appears to be lostinthebox.com, which covers both windows and X11 versions, and various forks. The activity in these communities seems to fluctuate around the need for a new release. I suppose everyone just gets back to their real job once the update is passed around and debugged. We’ve had to ask a question once that wasn’t covered in the included documentation. It was during the 32->64 transition, years ago.
To give an example of just how light this thing really is, my total installed folder is currently 1.8 MB. There’s some cruft in there, unused plugins, wallpapers. . . if I were to clean it out for only current core functionality, it would fit on a floppy. Even comprehensive documentation is in there.
OK, strictly speaking, Blackbox for Windows is everything but a window manager. While the shell is modular in Windows, just not advertised as such, window management is core, as evidenced by how ‘server core’ comes up to a terminal in a window on a classic aqua background. Details.
Even as we work on this article, we see announcements that newer code is coming under the name of BBClean at bb4win.org. Qwilk is also promising fresh xoblite. Grischka might respond with newer bbLean soon after. This of course, is part of the beauty of an open source shell. Several parties are working on core functionality. When they release, the good stuff quickly makes its way into the other releases. When the various developers drop out for a while, or forever, nothing is lost. But give this a run for a couple hours one evening, and you'll be lost in the box. There is no return. Get a USB keycahin drive to carry it around on, because after a week, you'll never want to see the taskbar again.
In this author's particular configuration, it looks like this:
Blackbox implements everything you need in a shell, including system tray functionality. It’s astonishingly fast and smooth, without a hint of response lag on even the most antiquated system. Systray apps load in the background. You don’t have to wait for everything in there to load to get a menu and start working. So if you’re removing useful things from the tray not because you’re out of memory, but just out of patience, you can stop now. Or you can kill the tray altogether. You can do anything you want, really. Windows is yours. Welcome home.
Multiple desktops are implemented cleanly in a classic X11 way. You may or may not choose to skin windows, which both covers the ancient classic window treatment, and also implements more classic X11 behaviors such as window shading, stickiness, and always on top. While skinning may sound bloated, the way it’s done here is not. Styles are described in text files, and rendered on the fly by the same internal mechanism which draws the menus. Fast algorithms take color A and color B, renders a gradient, interlace, or flat surface, bevels the edges, and wraps the windows. It happens so fast and cleanly that you won’t see any tearing or artifacts on an old NetBurst Celeron with embedded graphics, let alone in a modern system. Skinning is optional, it should be noted. If you use aero, with or without uxtheme patches and third party visual styles, you may choose to skip the skinning, though of course you also lose the quick access to shade, stick, and always on top. Skinning can be odd with applications which implement their own management widgets, such as Adobe CS5, latest Firefox releases, and Google Chrome. Firefox can be made to work with skinning with a couple of changes to the arrangement of toolbars, or excluding, and Chrom, Illustrator, and Photoshop can be excluded easily.
Configuration is via some simple text files, which resemble nothing so much as old .ini files from 3.11, for those of you gray of beard enough to remember. Functionality is completely modular, via a plugin architecture. Not only is it extensible, but if you must, even the core functionality is mostly replaceable. By default, we receive a clean layout in which start menu like functionality is available via a right click on the desktop, window listing via a middle click. A thin system bar offers a clock, tray, and tasks and desktop switching via the rodent.
You can fiddle with it in your spare time for a week, get everything just so, and keep it on a keychain to drop on any new install you may have. It’s a little work to get set up once, but you only have to do it once. If you set up your menus to use proper shell expansions instead of hard paths (%SYSTEMROOT%, etc.) you’ll have minimal work to do to carry it around.
Most of the code is GPL. The rendering engine described above is BSD. The plugin architecture is carefully designed to allow linking into non-free code without license pollution.
Get grischka’s bbLean here. Get qwilk’s xoblite here. The xoblite site also features a fairly comprehensive list of plugins, which for the most part work with any other >.70 release of blackbox.exe. The most active forum appears to be lostinthebox.com, which covers both windows and X11 versions, and various forks. The activity in these communities seems to fluctuate around the need for a new release. I suppose everyone just gets back to their real job once the update is passed around and debugged. We’ve had to ask a question once that wasn’t covered in the included documentation. It was during the 32->64 transition, years ago.
To give an example of just how light this thing really is, my total installed folder is currently 1.8 MB. There’s some cruft in there, unused plugins, wallpapers. . . if I were to clean it out for only current core functionality, it would fit on a floppy. Even comprehensive documentation is in there.
OK, strictly speaking, Blackbox for Windows is everything but a window manager. While the shell is modular in Windows, just not advertised as such, window management is core, as evidenced by how ‘server core’ comes up to a terminal in a window on a classic aqua background. Details.
Even as we work on this article, we see announcements that newer code is coming under the name of BBClean at bb4win.org. Qwilk is also promising fresh xoblite. Grischka might respond with newer bbLean soon after. This of course, is part of the beauty of an open source shell. Several parties are working on core functionality. When they release, the good stuff quickly makes its way into the other releases. When the various developers drop out for a while, or forever, nothing is lost. But give this a run for a couple hours one evening, and you'll be lost in the box. There is no return. Get a USB keycahin drive to carry it around on, because after a week, you'll never want to see the taskbar again.
In this author's particular configuration, it looks like this:
Friday, November 18, 2011
Automatically starting and stopping Virtual Box clients with the host.
Oracle's VirtualBox, originally developed by innotek, and aquired by Sun, has quickly developed a huge market share in relationship to industry standard VMware. By some reckonings, %60, though deployment count is notoriously hard to prove.
Why? Again, we hit this point again. Oracle has chosen to keep at least the core functionality available via GPLv2. A few other things that they don't have the right to license that way are available as a free (as in beer) download, including USB, RDP, and PXE booting.
When you first install VirtualBox, it appears to pretty much duplicate the functionality of VMware Workstation. Which would be cool enough, being open source, and given VMware's decisions about Server. Yes, I am aware that ESXi is also free beer. It also demands server class hardware. Which negates the cost savings, at least within the SOHO type of environment in which we work, consult, and write.
But there is So Much More. Along with the nice Qt (we'd have preferred gtk, but small potatoes) GUI for setting up clients and running them `application style,´ VirtualBox for Linux comes with command line controls to manipulate and run the VM clients from the console and in the background. Along with some trivial sysvinit hacking, we can run the clients at boot time, and shutdown or savestate them at shutdown and reboot.
Using the binaries VBoxHeadless and VBoxManage, along with a simple startup/shutdown script, here is how we accomplished this. As an aside, the script is based on the excellent tutorial at debian-administration.org.
Here's the script, as we're running it to launch our PBX in the background, in the rare occasion that the debian host has to go down.
In this example, 'telco' is the name of the script, taken from the hostname. 'Asterisk Appliance' is the name of the VM, as it's known to VBox. Run both VBoxHeadless and VBoxManage '-h' for more information about the various command line options available. They do a lot more than this. The man pages are comprehensive for both, as well.
After the script is created, and you've made sure you haven't left off the all important ampersand described in the notes below, run this to install the script.
Under current debian-testing (wheezy), the output of that command isn't the reassuring list of actions described at debian-administration.org, but rather, an dominous warning about LSB tags. But it works just the same. Check to see your new telco symlinks in rc2.d and rc0.d (it's in the other runlevels too, but these are the ones that count.) Reboot the machine to see your new automagic.
You can duplicate this script as many times as you need with new names for the script and the client OSs, to launch multiple VMs.
A couple of *important notes* are due. You can really scramble things by leaving off the job control character at the end of the loading command.
is just not the same without the ampersand (&). With it, it loads in the background. Without, and the following scripts will never load. Which means you'll never get to getty, and never get a login prompt. Hope you have ssh or gdm, and that they were set to load before, not after. Otherwise, you've got a bit of fun on your hands trying to get logged into a console to fix this. Probably, you'll be glad you have an ubuntu live cd handy. The other is, virtual machines are stored in the home folder of the user that creates them. The savvy and perfectionist hacker copies them and the relevant files from ~/.VirtualBox and ~/VirtualBox VMs to a special unprivileged user created just for this service. sudo -u drops the superuser permissions, and runs the commands as the specified user. The lazy hacker creates them and runs them as his day-to-day unprivileged user. One final note. This script is quick and dirty, and works. But it could and should be much better. The smarter script would check for the existence of the VM, check it's state, perform specific actions depending on whether it was last stopped, saved, or crashed out violently. It would check to see that the relevant vbox kernel modules are loaded. We just haven't gotten that far, and for the purposes of a novice level tutorial, it would be a long script, the core functionality of which would be obscured by the much longer sections of propriety.
Also, by default, update-rc.d installs the link in rc0.d in such a way that the script to unload vbox kernel modules runs before the machine is saved. Move K01virtualbox to K02virtualbox, or later, to give machines time to savestate before unloading modules. Otherwise module unloading fails. But it works just the same, except for the nasty red error flag. Not unloading them before reboot doesn't actually seem to affect functionality.
Why? Again, we hit this point again. Oracle has chosen to keep at least the core functionality available via GPLv2. A few other things that they don't have the right to license that way are available as a free (as in beer) download, including USB, RDP, and PXE booting.
When you first install VirtualBox, it appears to pretty much duplicate the functionality of VMware Workstation. Which would be cool enough, being open source, and given VMware's decisions about Server. Yes, I am aware that ESXi is also free beer. It also demands server class hardware. Which negates the cost savings, at least within the SOHO type of environment in which we work, consult, and write.
But there is So Much More. Along with the nice Qt (we'd have preferred gtk, but small potatoes) GUI for setting up clients and running them `application style,´ VirtualBox for Linux comes with command line controls to manipulate and run the VM clients from the console and in the background. Along with some trivial sysvinit hacking, we can run the clients at boot time, and shutdown or savestate them at shutdown and reboot.
Using the binaries VBoxHeadless and VBoxManage, along with a simple startup/shutdown script, here is how we accomplished this. As an aside, the script is based on the excellent tutorial at debian-administration.org.
Here's the script, as we're running it to launch our PBX in the background, in the rare occasion that the debian host has to go down.
! /bin/sh # /etc/init.d/telco # # Some things that run always touch /var/lock/telco # Carry out specific functions when asked to by the system case "$1" in start) echo "Loading telco in background. . . " sudo -u waldo /usr/bin/VBoxHeadless -s Asterisk\ Appliance &; ;; stop) echo "Saving telco machine state before stopping host. . ." sudo -u waldo VBoxManage controlvm Asterisk\ Appliance savestate ;; *) echo "Usage: /etc/init.d/telco {start|stop}" exit 1 ;; esac
In this example, 'telco' is the name of the script, taken from the hostname. 'Asterisk Appliance' is the name of the VM, as it's known to VBox. Run both VBoxHeadless and VBoxManage '-h' for more information about the various command line options available. They do a lot more than this. The man pages are comprehensive for both, as well.
After the script is created, and you've made sure you haven't left off the all important ampersand described in the notes below, run this to install the script.
update-rc.d telco defaults
Under current debian-testing (wheezy), the output of that command isn't the reassuring list of actions described at debian-administration.org, but rather, an dominous warning about LSB tags. But it works just the same. Check to see your new telco symlinks in rc2.d and rc0.d (it's in the other runlevels too, but these are the ones that count.) Reboot the machine to see your new automagic.
You can duplicate this script as many times as you need with new names for the script and the client OSs, to launch multiple VMs.
A couple of *important notes* are due. You can really scramble things by leaving off the job control character at the end of the loading command.
sudo -u waldo /usr/bin/VBoxHeadless -s Asterisk\ Appliance &;
is just not the same without the ampersand (&). With it, it loads in the background. Without, and the following scripts will never load. Which means you'll never get to getty, and never get a login prompt. Hope you have ssh or gdm, and that they were set to load before, not after. Otherwise, you've got a bit of fun on your hands trying to get logged into a console to fix this. Probably, you'll be glad you have an ubuntu live cd handy. The other is, virtual machines are stored in the home folder of the user that creates them. The savvy and perfectionist hacker copies them and the relevant files from ~/.VirtualBox and ~/VirtualBox VMs to a special unprivileged user created just for this service. sudo -u drops the superuser permissions, and runs the commands as the specified user. The lazy hacker creates them and runs them as his day-to-day unprivileged user. One final note. This script is quick and dirty, and works. But it could and should be much better. The smarter script would check for the existence of the VM, check it's state, perform specific actions depending on whether it was last stopped, saved, or crashed out violently. It would check to see that the relevant vbox kernel modules are loaded. We just haven't gotten that far, and for the purposes of a novice level tutorial, it would be a long script, the core functionality of which would be obscured by the much longer sections of propriety.
Also, by default, update-rc.d installs the link in rc0.d in such a way that the script to unload vbox kernel modules runs before the machine is saved. Move K01virtualbox to K02virtualbox, or later, to give machines time to savestate before unloading modules. Otherwise module unloading fails. But it works just the same, except for the nasty red error flag. Not unloading them before reboot doesn't actually seem to affect functionality.
uptime.exe - another little way to make windows feel like home
As I'm sure we all know, the biggest flaw (debatable) in Windows is that, for historical reasons, the text based console is busted and neglected. Why? I have yet to find a support article answering this.
But MS, as well as the Open Source community, offers a few tools to make it feel like the real computer it actually is. Here's a handy one that needs little explanation. uptime.exe. It does what you think it does. Nothing more or less. For those non-unixen out there, it tells how long your box has been up since last shutdown/reboot.
Get it at support.microsoft.com
OK, in relation to our comment that the console is busted, we feel compelled to note that PowerShell, a new text interface for 7 and its server variants, is not busted, and might even be a super-ninja. But, we already had a set of tools to this, and they're universal. So, in addition to remembering/learning a crippled set of console commands for DOS, we get to learn a new one for Windows greater than 6.1.
PowerShell will be covered in a later article. We promise.
But MS, as well as the Open Source community, offers a few tools to make it feel like the real computer it actually is. Here's a handy one that needs little explanation. uptime.exe. It does what you think it does. Nothing more or less. For those non-unixen out there, it tells how long your box has been up since last shutdown/reboot.
Get it at support.microsoft.com
OK, in relation to our comment that the console is busted, we feel compelled to note that PowerShell, a new text interface for 7 and its server variants, is not busted, and might even be a super-ninja. But, we already had a set of tools to this, and they're universal. So, in addition to remembering/learning a crippled set of console commands for DOS, we get to learn a new one for Windows greater than 6.1.
PowerShell will be covered in a later article. We promise.
Wednesday, November 16, 2011
7zip - crushes and zips all other archivers.
Reader pl1ght added to the comments section on the article about Power Archiver a shout to take a look at 7zip for Windows. And after the final test, we have to say 7zip gets the win, all the way. It's not pretty or ugly. It's simple and fast. Best of all, it's Free and open, supports all the typical Windows and *NIX formats. For those concerned with it, it features better compression ratios than anything else, not just in the 7z format but even in plain old zip. In others words. WinRAR, you have been displaced. Finally, no more nag.
7zip is mostly licensed under LGPL, except for the unrar code, which is in more restrictive terms, as dictated by the rar developer. We prefer to take the open source solution here if there is one, so this is a big plus. Not just out of software politics (though we care about that) but also, for purely practical reasons. GPL stuff often produces the best code, and if its got more than a trivial user base, it's never orphaned.
Hosted on sourceforge, of course. Get it here.
7zip is mostly licensed under LGPL, except for the unrar code, which is in more restrictive terms, as dictated by the rar developer. We prefer to take the open source solution here if there is one, so this is a big plus. Not just out of software politics (though we care about that) but also, for purely practical reasons. GPL stuff often produces the best code, and if its got more than a trivial user base, it's never orphaned.
Hosted on sourceforge, of course. Get it here.
Subscribe to:
Posts (Atom)