Thursday, March 28, 2013

Oh, Yes, You Can! (Put Window Maker on Puppy Linux)

Anyone who has used Linux for more than six months has at least heard of Puppy Linux. In fact, Puppy Linux is often the first distribution people use. Puppy has been around for nearly 10 years (that's longer than Ubuntu, by the way) and I have used it off-and-on over the past decade as well. Periodically, I download the latest Puppy release and burn it to a CD or USB drive - just in case! Since Puppy can run entirely in RAM with no HDD installation needed, having a Puppy around the house to use when I've borked something on a system is nice. Also, I just flat like Puppy Linux, although it does have some quirks (at least, to me) compared with more "mainstream" Linux distributions.

A while back, a Puppy developer created an experimental version of Puppy using Window Maker as the default window manager. Puppy normally uses Joe's Window Manager (JWM) and offers the option to use ICEwm in many of its releases. Being a Window Maker user, seeing a version of Puppy with Window Maker as the default was exciting. Unfortunately, the experiment never resulted in a stable release.

Enter Puppy Linux developer 01micko, and "Slacko Puppy," a Puppy release that is "binary compatible" with Slackware's repositories. About a year ago, I downloaded Slacko Puppy 5.3.3, which is built to be compatible with Slackware version 13.37. I've had it on a CD and USB drive - and as a "frugal" install on one of my laptops - ever since. Occasionally I will boot into Slacko Puppy and make sure things are updated and still running well. One of these occaissions led me to poke around in the Slackware packages available for installation on Puppy, and behold! There was Window Maker!

So I did what any self-respecting Linux user would do - I immediately installed Window Maker and spent the next couple of hours figuring out how to set Slacko Puppy up to use it instead of JWM as the primary window manager. Not all that difficult, and reading through some of the posts on the Puppy Linux Forum (thanks, Google) helped me figure out what was needed. Here's the basic process:

1. Install Window Maker from the Slackware repositories using Puppy Package Manager.
2. Open a terminal and run wmaker.inst (a script that sets up Window Maker for use)
3. Open Rox Filer and see if wmaker.inst has provided a new ~/.xinitrc (it should have, and it should have renamed your original file to .xinitrc_original or .xinitrc_old).
4. Change the name of .xinitrc_original to .xinitrc_jwm (optional - helps me remember what's going on though).
5. Still in Rox - go to /etc and look for the file "windowmanager." This is a text file with just one line saying "jwm."
6. Rename /etc/windowmanager to /etc/windowmanager_old (or whatever you like).
7. Open /etc/windowmanager_old in an editor and change "jwm" to "wmaker" (no quotes) then save the file as /etc/windowmanager. This is necessary for Puppy's shutdown and reboot scripts to work. If you don't do this, you'll have to exit the session then fool around in a terminal to shut your system down (and Puppy doesn't recognize "shutdown -h now" or "shutdown -r now" for some reason, so this isn't trivial).
8. Reboot - you should find yourself in Window Maker instead of JWM.
9. Add a "shutdown" command to Window Maker's menu using WPrefs. You'll need to add a "run" line and use this command - wmpoweroff. Optionally, add a "reboot" command using wmreboot.

Here is my Slacko Puppy desktop with Window Maker:





I don't know how well you can see the open terminal - but I'm running htop and it's showing that Puppy is using only 70MB of memory - and that's with VLC media player running along with some background processes. At "idle," I'm seeing only 45-50MB of memory in use. Truly impressive!

You'll want some dockapps to go along with your new "Window Maker Puppy." Some of these are available here: http://ponce.cc/slackware/slackware-13.37/packages/  

I had to compile wmsystemtray (from the Slackware 13.37 source) and there are other dockapps that would not install properly under Puppy and had to be compiled manually (for instance, wmtime). Because of this, you'll need to install the "devx" SFS package and load it at boot time. Best to do this while you're in a "vanilla" JWM session - although you can run Puppy Package Manager and the other utilities (including the "boot manager" that let's you load SFS packages on startup) from Window Maker. There is a decent tutorial on compiling in Puppy here: http://puppy.b0x.me/wiki/doku.php?id=compile

The other thing you'll need to do right away is to edit the menu using WPrefs. If you open your ~/.jwmrc file in a text editor you can find all of the needed commands to launch everything in Puppy's menu (and there's a BUNCH of stuff in Puppy's menu!).

So - not as simple as "apt-get install wmaker," but still very do-able.  Cheers!

Friday, February 22, 2013

I Already Like Libreoffice 4.0

Libreoffice 4.0 was released a few days ago, and after reading a few early reviews, I decided to take the plunge and install it directly from the Libreoffice website.  I use Debian on all of my systems, so I downloaded the 64-bit Debian version and installed it using the instructions provided by the Open Document Foundation (the organization that is behind Libreoffice).

(NOTE: I already had version 3.5 installed via the Debian repositories, so I first removed the old version completely by running "sudo aptitude purge libreoffice?" in a terminal.  This, according to the Libreoffice developers, is the "best practice" if you decide to install directly from the LO site.  I have seen posts on Linux forums in the past regarding conflicts between LO versions, so I recommend this approach.)

Although I've only been using LO version 4 for a little over a day, I can honestly say there are noticeable improvements in two main areas.  First, LO4 opens much more quickly than the 3-series versions - nearly instantly, in fact, on my desktop system.

Second, the level of compatibility with MS Office files has been improved.  I know that some recent reviews of LO4 maintain that the Office compatibility improvements are minor - but my experience has been that the compatibility is much improved.  Here, for example, is a document created as a .docx file using one of the memo templates in Word and opened in LO3.5:

Take a look at the header, which is superimposed over the word "Australia." Notice also that the text is cut off on the right - an outcome of the way the Word template is constructed using a massive "text box" to contain the body of the memo.  Here's another shot of LO3.5 trying to open the same document:

See the little red triangle in the bottom right corner of the first page?  That's indicating that the rest of the memo text is somewhere else - not displayed in the document.

Now let's look at the same file opened in LO4:


With version 4, the memo renders exactly as it would in MS-Word, with the header below the "Australia" graphic, the text showing up cleanly across both left and right margins, and no red triangle letting us know that LO couldn't display all of the pages correctly.

Right now, LO4 is only available to Debian users in the "experimental" repo, so if you want to use this version you will either need to add "experimental" to your sources.list and go through the steps to download the .deb from there, or (a simpler solution in my opinion) purge your current version as I did and install LO4 directly from the Document Foundation repository.  If things go as they usually do with Debian, it will be many months before LO4 makes into the testing - much less stable - repos.  For those of you who (like me) really want and need the improvements, I think it's well worth doing - and kudos to the folks at the Document Foundation for the improvements!

Monday, February 18, 2013

Num Lock Can Bork Your Keyboard Shortcuts in Window Maker

If you are trying to set up keyboard shortcuts in Window Maker and you find yourself getting some really strange output in the Preferences Menu panel, it could be that your "num lock" is engaged.  Apparently, this is something that has been an issue for a long time, but I just found out about it the hard way.

Here's the result of doing a key capture with "num lock" on on my desktop system (I'm trying to bind Mod4 - the infamous "windows" key - plus "w" to Firefox):


And here is the result with "num lock" off:


And yes, the shortcut works just fine after saving it in WPrefs.app.

So if you see weird, unexpected output while capturing a keybind in Window Maker - check "num lock."

Friday, February 15, 2013

Get Productive in Window Maker: Keyboard Shortcuts for Fun and Profit

Window Maker provides one of the most productive computer work environments out of the box. It's hard for me to imagine a workflow that Window Maker can't accommodate.  Whether your work demands full-screen visibility of one application at a time (I'm thinking graphics design here) or, like me, you tend to have multiple windows with different applications and you switch from one window to another, Window Maker can make your workflow easier, faster and more pleasant.

Keyboard shortcuts to launch frequently-used apps or commands can make your workflow more efficient by reducing the need to open menus, find the menu entry, and (finally) click on the entry to launch an app or execute a command. In this post, I'm going to describe the keyboard shortcut features in Window Maker.  Keep your own preferred workflow in mind, and see if making use of this toolset might enhance your efficiency.

Built-In Keyboard Shortcuts

The quickest and easiest way to see which shortcuts are built-in to Window Maker is to open the Preferences app and take a look at the "Keyboard Shortcut Preferences" panel. In the Shortcuts Preferences panel you'll find a list of built in shortcuts - some of which have keystrokes defined and some of which do not.  Those already defined have a small check-mark to the left of the description.  For example, F12 opens the Applications Menu by default. Window Maker has sixty-three (!) pre-defined shortcuts. Look through the list and you may find one or more that you need.  If no keystroke combination has been assigned to an available shortcut, you only need to click the "capture" button and enter the keystrokes you would like to use.

In the list of pre-defined shortcuts are many that have become common across a variety of desktop environments.  For example, Alt+Tab window focus switching is included by default in Window Maker, and Ctrl+Alt+"right arrow" moves you to the next virtual desktop.


Adding a Custom Keyboard Shortcut

The ability to add keyboard shortcuts (or "keybinds" if you prefer) is certainly not unique to Window Maker, but it's trivially easy to add these in Window Maker compared to some other environments I've seen (and used).  Before you add a shortcut, look through the shortcuts Window Maker already has by default by accessing the "Keyboard Shortcut Preferences" panel I just discussed. 

If a shortcut already has a keystroke combination assigned, you'll have to disable it or redefine the keystrokes before you can use those strokes for a custom shortcut. You disable a default by clicking the "clear" button.  Redefining a shortcut requires that you "clear" the entry then "capture" your new keystrokes.

Most of the built-in shortcuts use the Mod1 (Alt) key plus one or more other keys, so make sure you have a decent knowledge of these before you start adding your own.

Most "custom" shortcuts are used to launch specific applications, so I will describe the process with that goal in mind. To add your own keyboard shortcut for an application, go to the "Applications Menu Definition" panel in the Preferences app.  Select the application item in the menu for which you want to create a shortcut, then use the "capture" button to capture the keystrokes you want to assign to that item.  In the screenshot, I've assigned Mod1 + W to open Firefox.


Another tip - Window Maker has a "run..." menu item (it may be "execute..." in your distro). This menu item opens a dialog box that can be used to launch any application by typing in the executable command (for example, entering "vlc" in the box launches the VLC Media Player).


I recommend assigning a shortcut to the "run" dialog. In my experience this can be very helpful when you want to launch an application without taking your hands off the keyboard to grab the mouse and access the menu.  For those applications that you use regularly but not often enough to justify adding them to the dock or clip - or assigning a dedicated keyboard shortcut - this can speed up your flow considerably.  I use Mod1+F2 to launch the "run" dialog (I think Gnome uses the same keybind).





To sum up - making use of the pre-defined keyboard shortcuts can help streamline your workflow.  The ability to easily add your own custom keyboard shortcuts makes Window Maker even more efficient for you - so give keyboard shortcuts a try.  I think you'll quickly find them indispensable!

Saturday, February 9, 2013

My Window Maker Desktops: In Praise of Plain

If you've used Window Maker for any length of time, you know that you can theme the desktop with ease. Themes can be created "on the fly" using the Appearance Preferences tool in WPrefs.app. You can, with not much effort and little to no knowledge of any programming language, create your own style or theme with nothing but a text editor, a little time to spare and some patience. Or you can download themes created by others and place them in the appropriate "Styles" or "Themes" directory.

Window Maker has, without doubt, one of the most flexible and customizable desktops in or out of the Linux "world." Looking at the top two or three desktop environments (Unity, KDE and Gnome, at the moment) it does seem to me, sometimes, that the ease with which Window Maker can be themed is a double-edged sword. The temptation has always been to add more 'stuff,' and even a quick look at example desktops people have posted shows.

Over the past couple of years, I've come to appreciate the value of simplicity - maybe even outright plainness - in my own desktop configurations. I find lately that even a great photo used as a background image no longer appeals to me. Maybe it's a new-found Zen sensibility, maybe it's the fact that I'm no longer as young as I used to be (who is? BTW) but when it comes to my desktop, what I really like is something that get's out of my way and let's me focus more on the work or play that I rely on my systems to facilitate.
Here, then, are a couple of themes I use currently. One has been around a long, long time (since at least 2001) and the other is something I put together using a background image I found on the internet plus one of the styles that ships with Window Maker by default.
 The first theme is entitled "rust," and it is available for download at the Lonely Machines website. Here it is, installed on my elderly Dell Inspiron laptop:

  I think this theme is truly a classic for a couple of reasons. First, it really is minimal - it provides a quiet setting for the applications I run to accomplish work or just relax. So it meets my aesthetic needs very well. I like the texture of the background, the subdued palette - even the selection of fonts and font colors is great from my point of view.

Second, this is a classic because it makes very creative use of the ability of Window Maker to tile images to generate a background - AND it uses a color-gradient-overlay (another Window Maker capability) to further modify the tiled images into a really attractive 'texture.' If you look into the theme's directory, you'll find a single graphic image - a 512x512 pixel JPG that is used to generate the background, the icon tiles, the window titlebars - everything! Just outstanding use of the Window Maker toolkit. A work - in my opinion - of exceptional creativity.

The second example theme I've been using lately is built around Martin Hoeller's "Grain" wallpaper. It is available for download here

Martin Hoeller provides 7 screen resolutions of the simple-yet-attractive PNG image he created. I downloaded his archive and extracted the image that matches my laptop's screen resolution to the ~/GNUstep/Library/WindowMaker/Backgrounds/ directory. This made it available through the "Appearance -> Backgrounds" menu in Window Maker. I loaded the image as the background, then I went to the "Appearance -> Styles" menu and tried a few of the default styles available. I finally settled on the "Blue" style, which I think works well with Martin Hoeller's "Grain" wallpaper. The result is a "theme" that looks like this:

  I find the plain, simple approach to desktop aesthetics suits me and makes using my systems both more pleasant and more productive. Window Maker let's you go to the other extreme, if that suits your taste and preferences - but as for me, I like plain.

Friday, February 1, 2013

My Window Maker Dockapps Line-Up

Here is a quick rundown of the dockapps I am currently using on my main Window Maker desktop machine. Dockapps are "dockable applications." They are apps in and of themselves, not merely icons for applications that have been "docked" but that launch the actual application on the desktop. If you're confused, maybe I can clear this up with what follows.

wmclock - wmclock's function is to provide a clock and calendar for your Window Maker desktop. I have wmclock configured to launch an instance of Firefox that automatically loads my Google Calendar page. You could configure it to launch a desktop calendar such as gsimplecal, but having quick access to Google Calendar is very convenient for me.
wmnd - wmdn is a network monitor that provides constant information on activity across active network interfaces. Since this is a desktop system using a wired interface, it is showing some activity on "ETH0" in the screenshot. On my laptops, it generally shows "WLAN0" although I have one older IBM ThinkPad that shows an "ETH1" interface when I'm on wireless - go figure.

wmforkplop - a dockapp that monitors and displays "forking" activity and displays top CPU-consuming processes. I like to have this on all my machines because it's a quick and easy way to check, for example, if Firefox is REALLY opening or not, or where aptitude is in an upgrade cycle, and so on.

wmudmount - a dockapp for easy mounting of drives and filesystems. In particular, I find this to be nice when dealing with (for example) an mp3 player or a USB drive.


wmweather - a dockapp for monitoring current weather conditions using International Civil Aviation Organization station symbols.


wmsystemtray - a dockapp that provides a "tray" for "tray-aware" programs. Tray-aware programs such as VLC will place a mini-icon in wmsystemtray whenever they are opened. The nice thing about wmsystemtray is that it will hold an infinite number (at least, so I'm told) of icons and provides a "pager" so you can find any past the four that wmsystemtray holds per "page."

I may do a future post just on the state of "tray" applications for Window Maker. The bad thing about wmsystemtray is that it seems to have fallen out of the Debian Wheezy repository. Maybe it will make a comeback sometime soon. If not, "docker" can be configured and run on your Debian Window Maker desktop.


WMMail - a dockapp that monitors and reports the number of unread messages in your system mail directory (looks like I need to do some reading!).


Finally, wmbutton - wmbutton is sort of a cross between a dockapp and a docked application in that it provides launchers (icons) for up to 27 applications (3 per icon X 9 icons = 27). I have 26 applications currently defined. Looking over the list, I use about 6 on a frequent basis, so maybe I could get by with fewer launchers defined. On the other hand, why not have them even if I rarely use them? After all, wmbutton is only occupying a 64x64 pixel area.

Wednesday, January 30, 2013

How To Fix Window Maker's Menu Part 2: Automatic Menu Creation

I discussed the process of manually generating an applications menu in Window Maker in a previous post. If you are running a Debian (or Debian-based) Window Maker installation, one thing you might miss is automatic menu updates whenever you add or remove applications.

I'm going to provide a method for (nearly) automatic menu generation an updating in Debian Window Maker systems in this post.

Step 1: Install the packages "menu" and "menu-xdg."

These two packages are available in all three divisions of the Debian repositories (i.e., stable, testing and experimental), so open a terminal and enter:

sudo aptitude install menu menu-xdg

Step 2: Make the file /etc/menu-methods/wmaker executable

In a  terminal, enter:

sudo chmod +x /etc/menu-methods/wmaker

Step 3: Run the update script

In a terminal:

update-menus

If all went well, you should find your default Window Maker menu transformed into something like this:

Which will give you this sort of sub-menu:


Now, I mentioned that this method provides (nearly) automatic menu updates. The (nearly) part means that each time you add or remove software, you will need to remember to run the "update-menus" script. If you are so inclined, you could set this up to run at each session login, but that's up to you.

The downside to this approach, as I mentioned in a previous post, is that you lose the ability to customize the menu manually using the WPrefs.app menu functions. I'm a bit torn on this - on the one hand, being able to manually tweak the menu by adding all sorts of commands and also being able to organize the menu items exactly as I see fit is nice. On the other hand, the manual approach takes a good deal of work - especially on a fresh install of Window Maker, and having to remember to add every application I install each time I install something can be a pain.

I might also serve notice that I am not familiar with Window Maker's menu behavior outside the Debian world. I have run Window Maker on an Arch Linux installation, but I honestly don't remember the specifics for that distribution. If you are using anything but Debian, please look for information specific to your distribution.

So I've covered two menu production approaches for Debian-based Window Maker instances. If you know of other - possibly better - approaches, please don't hesitate to let me know!