Archive for the ‘ratpoison’ Category

Debian Squeeze – Not All Perfect But Close

March 15, 2011

Not everything has gone well under Debian Squeeze. I’ve been running jwm and ratpoison, my preferred window managers (even though I’ve grown more tolerant of Gnome; it’s just a bit much for my laptop). In jwm, one of the things I do first is set up various apps to run maximized without borders. This has proven stable in most cases.

Here’s a shot of how emacs should start and look. Unfortunately, something in my .emacs has resulted in a problem where it doesn’t open full screen (even though I commented out fullscreen mode) — but that’s easily fixed by alt-f2 and selecting maximize. The above shot is what I should have, right?

Okay, so let’s switch desktops and then come back. This is what happens.

I first noticed this on my Aspire One. The icon and menu bars are fine so long as:

  • I don’t start w3m-el, or
  • switch desktops

Either of those happens, then bad stuff happens. I thought at first it might be GTK-related but this happens in jwm, not in other window managers (no fail in ratpoison or evilwm) — in the other window managers, the w3m icons are displayed while in w3m-mode and the default ones when in standard emacs modes. I think it’s something with jwm (whether it’s with jwm or the way it’s configured in Debian who knows), not emacs, since it’s not occurring in other window managers — I can switch between applications and/or desktops in evilwm, for example, and the icons don’t change or disappear.

This really is no big deal since my .emacs has lines turning off both the menu bar and icon bar (currently commented out), which is why I may not have caught this before. Another reason I may not have caught it is because I usually run emacs in console instead of using the GTK instance. Once I uncomment those lines in my .emacs, it’s going to be no big deal again in jwm.

One more nit to pick about the default jwmrc from Debian (again, no big deal because I edit/customize the hell out of it anyway). It has a lot of extraneous tags, including a section in the keybindings.

<!-- Key bindings -->
 <Key key="Up">up</Key>
 <Key key="Down">down</Key>
 <Key key="Right">right</Key>
 <Key key="Left">left</Key>
 <Key key="h">left</Key>
 <Key key="j">down</Key>
 <Key key="k">up</Key>
 <Key key="l">right</Key>
 <Key key="Return">select</Key>
 <Key key="Escape">escape</Key>

 <!-- #DEBIAN unused -->
 <Key mask="A" key="Tab">nextstacked</Key>
 <!-- #DEBIAN add -->
 <Key mask="A" key="Tab">next</Key>

 <Key mask="A" key="F4">close</Key>
 <Key mask="A" key="#">desktop#</Key>
 <Key mask="A" key="F1">root:1</Key>
 <Key mask="A" key="F2">window</Key>

In particular, that “unused” line is preceded and trailed by —>, and that first one shouldn’t be there if the goal was to comment out “nextstacked” in favor of next. I really hate that “nextstacked” setting in jwm, which renders meta (alt) unusable by anything but jwm — I consider it a bug. I’ve written to the author about this but for some reason that’s the default. If you use jwm and you have issues with using your meta/alt key, edit “nextstacked” to just “next” and then restart jwm. We fixed that in the default jwmrc in DSL. Looks like that was the intention here, too, but the result of not properly commenting out the whole nextstacked part is that the alt-meta remains locked up jwm. Guess I should report that. As well as the other issues.

An update, too, on the Aspire One. I ran into some problems with SL6rc1 on my Aspire One and needed something “ready to roll.” I haven’t decided if I’m going to run it again because I run Debian on just about everything else I own — which is why I decided to install it again on the AA1 despite past wifi-related issues. I did a very minimal net install of Squeeze despite concerns about wifi issues I’ve had under Linux with that netbook. The good news thus far is that it’s running without hassles and I haven’t had the problems even under the heaviest loads that used to cause the time outs — extensive uptimes and sftp’ing large and/or multiple files.

What did I install on the Aspire One? I’m using jwm almost exclusively with emacs, firefox (from mozilla rather than iceweasel), gtkpod, livetex,, skype, shotwell, gtkam, wicd-curses, and vlc. A few other things that don’t come to mind. It’s pretty lean and it rocks.

The emacs icon/menu bar issue doesn’t really put me off using jwm. It’s resulted in a noticeable performance boost over Gnome, and there are many things I like being able to customize (especially apps opening maximized sans decorations). Next trimming will come at the expense of network manager (though probably avoiding wicd because it’s not an improvement over using other more basic tools; wicd can’t scan for hidden SSIDs, but plain old wpa_supplicant does).

[Note/rant on wicd and hidden SSIDs: The documentation and lists for wicd suggest the inability to scan or find hidden SSIDs is exclusively a driver issue. BULLSHIT. I can find my SSID’s MAC address just fine via iwlist but wicd has failed on all three of my current laptops — that’s three unique drivers (Broadcom 43xx, Realtek something or another, Atheros ath5k), all capable of finding the SSID’s MAC address via iwlist and connecting straight-up via wpa_supplicant, and no such problem with network manager. I also ran into an issue with wicd-gtk that caused me to try the -curses version. When I would try connecting to my hidden SSID, the rescan would find no wireless connections — none! I’d have to restart wicd and try again, sometimes three or four times, to get a list of SSIDs again and then repeat the process trying to connect to the hidden SSID. The -curses version won’t connect to a hidden SSID but hasn’t required running ‘/etc/init.d/wicd restart’ at all — it just requires me to enter the hidden SSID name, rescan, connect. So I’m most likely ditching wicd altogether and probably running networking via my own shell scripts or the available networking scripts in /etc. I don’t hide my SSID for security reasons and I’m not going to unhide it just to use wicd.]

As you can see in the shots above, I’m running Bluetooth and the green dot on the bluez-manager applet signifies I’m connected at the moment to my headphones. I’m running mplayer streaming audio via pulseaudio (-ao pulse). Audio switches seamlessly between headphones and speakers, etc., when I turn the headphones on and off; the pulseaudio sink also switches between my stream and Skype during calls without interaction. No hassles at all. Just works. I had a lot of bad things to say about my initial experiences with pulseaudio but my recent experiences have been superb regardless of desktop environment/window manager.

Over all, I remain very happy with Debian Squeeze. It’s just a package here and there that may cause some minimal grief. Beyond anomalies, it’s rock solid, flexible, and has enough software options to keep most reasonable users happy.

Update: No tool bar, no menu, no problem:

More ratmenu tips

May 18, 2010

I see I’ve been getting a lot of hits in the past few days for searches related to ratmen, ratmenu, and 9menu. As I’ve written before, these work very similarly. In a nutshell, you use these to create shell scripts to provide menus for ratpoison or other window managers.

What can you do with these menus? Whatever you want. You can use standard application-centric menus to open whatever application. You can customize them so you open specific files in certain applications. You can start or stop processes (mind your permissions; gksu/gksudo are beneficial if you’re going to start/stop/restart daemons like sshd, cupsd, httpd, etc.). These can then be launched via keybindings set up in .ratpoisonrc or whatever configuration file your chosen window manager uses (a few years ago, I used ratmen with oroborus since oroborus lacks a menu; I set keybindings for ratmen in my .oroborusrc).

This example is more ratpoison-specific because some of the commands in this particular menu (~/bin/ pipe out to the ratpoison status message area. I wanted a menu with system commands and to get information quickly even if I’m not sitting in front of an open terminal, so, for instance, I can see what’s happening or running while working in or gimp or a browser. If you’re using ratmen(u)/9menu in other window managers, you could send to xmessage or zenity or whatever you want.


ratmenu -fg "#ffa500" -bg "#444444" -align center -style dreary \
"netstat" "ratpoison -c 'echo $(netstat -a | head -n 18)'" \
"top" "ratpoison -c 'echo $(top -b -n 1 | head -n 24)'" \
"w" "ratpoison -c 'echo $(w)'" \
"free" "ratpoison -c 'echo $(free -mt)'" \
"mount" "ratpoison -c 'echo $(mount)'" \
"ssh?" "ratpoison -c 'echo $(ps aux | grep -i ssh)'" \
"screen -list" "ratpoison -c 'echo $(screen -list)'" \
"screen(s) ps?" "ratpoison -c 'echo $(ps aux | grep -i screen)'" \
"mount sda1" "pmount /dev/sda1" \
"umount sda1" "pumount /dev/sda1" \
"who" "ratpoison -c 'echo $(who)'" \
"last -20" "ratpoison -c 'echo $(last -20)'" \
"temperature" "ratpoison -c 'echo $(cat /proc/acpi/thermal_zone/THM/temperature)'" \
"battery" "ratpoison -c 'echo $(cat /proc/acpi/battery/BAT0/state)'" \
"cpu info" "ratpoison -c 'echo $(cat /proc/cpuinfo)'" \
"uname" "ratpoison -c 'echo $(uname -a)'"

The first line, of course, is the shebang. The next line runs ratmenu (or ratmen or 9menu), and I have this menu set up with a light orange on dark grey background with the “dreary” menu style allowed in ratmenu (the difference between dreary and snazzy is how the menu selection works; in snazzy, the menu choices scroll up or down to a fixed reversed selection, while in dreary the choices are fixed or static and the reversed selection choice scrolls up or down as you navigate it with the up/down arrows). Then come your menu options. As this is a shell script, it can be written in one line or in multiple lines as above. If it’s in multiple lines, separate them with backslashes so the script is read by the shell as one line (no backslash on the last line).

I also use a separate menu for work documents so they can be opened in either emacs or OOo or gimp as needed. My previous ratpoison entry (ratpoison, xnest, jwm, GIMP) noted that I chose to start using GIMP under another window manager using xnest. I sometimes use GIMP to clean up charts and such for work. In order to keep all the work stuff together and to not have to toggle between the xnest window and everything else, I have separate options in my work menu to open things in the X display with my alternate window manager (currently oroborus). In other words, that menu allows me to stay within oroborus (or jwm or twm or whatever) so I can see, for example, how charts look in documents, while ratpoison continues managing everything else. I still have entries that open things in more standard fashion so that it’s all under ratpoison rather contained in another xnest’ed window manager.

Finally, if you’re using Debian and want to override the recommended 9menu when you install ratpoison and use ratmenu instead, use aptitude (as root or via sudo):

aptitude install -R ratpoison ratmenu

For what it’s worth, I have “sudo aptitude install -R” aliased in my .bashrc (alias debinstall=”sudo aptitude install -R”) so I don’t end up installing more than I absolutely have to.

Finally, understanding how to use a powerful text editor like emacs or vim comes in very handy when editing menus like these, especially if you’re setting up to open specific files with identical or similar commands. I’ll usually go through a process of getting a file list from a directory and then recording a macro to insert text down each line to set up the menu. It’s easier and much faster to either pipe a list of files or insert them within the editor (in emacs: C-u M-! ls /path/to/dir — or, my preference, C-u M-! find ~/ -name “*.m3u”to get full paths) and then do the most repetitive things, such as add commands and shell punctuation, via macro.

It took me less than a minute to do a 100+ line ratmenu for my playlists since every command option is the same (“mocp -cap /path/to/file.m3u” \).

The important thing is to set things up so it’s easy to use and uses the least amount of work.

ratpoison, xnest, jwm, GIMP

May 5, 2010

First of all, I know ratpoison has temporary window manager (tmpwm) and new manager (newwm) options. As the ratpoison manual says, “These commands should be used sparingly. They were created to allow users to understand how a poorly designed program is intended to function so they can build a replacement or patch an existing alternative’s missing functionality.”

In the meantime, we users are usually stuck using the applications as they’re (crummily) designed.

I don’t want to leave ratpoison just to use certain “poorly designed programs” (GIMP, etc.) so I was looking for ways to open said applications (which usually open with multiple windows) and allow those apps to function “normally” as if they were no longer under the control of a tiling manager like ratpoison. Switching window managers via newwm/tmpwm means everything then gets controlled by the other window manager rather than ratpoison. Why should everything have to suffer as a result of running a couple offending applications? That’s dumb.

After a bit of experimentation and searching, I settled on using xnest. I already had jwm installed on my laptop so I did a few things to get it all working properly. This will work with any preferred window manager. You could use twm (which gets installed in a standard Debian install) or fluxbox or whatever you want.

The first thing to do is install xnest (in Debian: aptitude install -R xnest) if it’s not already installed.

I decided to configure this to run from a shell script using a separate .xinitrc file (.xinitrc-tmpwm to be exact). That file is pretty simple and since it’s only being used to launch GIMP for now it’s very short and to the point (don’t forget ampersands if you use more than one line):

xsetroot -solid grey13 &
gimp &

This is launched from another file (~/bin/

exec xinit ~/.xinitrc-tmpwm -- /usr/X11R6/bin/Xnest :1 -ac -geometry 1280x800

This will then start gimp atop jwm in xnest at the full display resolution of my laptop screen. It also means I can start and run whatever applications in jwm I might want. I’m still managing everything via ratpoison and my ratpoison keybindings override any set for jwm. Here you can see the ratpoison window list invoked while opened to my browser:

I can switch to the xnest window and there’s GIMP in jwm (with getting another ratpoison window list):

And like I wrote above, all my ratpoison commands work and supersede jwm. Here’s the result of using ratmenu to send a message about mocp (mocp -i/mocp –info) to ratpoison’s status bar:

And finally, if you want to use another window manager it’s as easy as changing the last line in the .xinitrc. Use twm, fluxbox, flwm, fvwm, whatever.

That’s just GIMP in twm with mocp –info, all managed by ratpoison. Lovely. You probably won’t see this kind of stuff on distrowatch anytime soon, players.

I know ratpoison isn’t for everyone. Some applications can really drive users nuts because the developers make presumptions that don’t work properly for how users want to use the software (the next release of GIMP is supposed to have a one-window option which will make it a lot easier for real people to use). Whether you choose to use ratpoison options like tmpwm or newwm, or an external option like xnest, there are ways to get around crazy multi-windowed applications. I like this approach because it allows me to “contain” those applications in one window under ratpoison where they can float around as intended while managed by a separate window manager. It’s not perfect, but it works pretty well.

UPDATE: For what it’s worth, I’ve now removed jwm and will just use twm for GIMP, Skype, and/or anything else requiring more than one window to function.

ratpoison, ratmen, mocp fun

April 24, 2010

I’ve posted before about why I like combinations like mocp, ratpoison, and ratmen(u). So why am I posting about this when I’ve covered similar things before? Because I’m getting occasional hits for “ratpoison audio level” and such things.

An important thing to remember about ratpoison is that it adheres to the Unix paradigm of doing one task very well and simply. As such, it doesn’t come with lots of add-ons and BS — it just manages windows with plenty flexibility. There are applications and utilities that lend themselves very well to ratpoison to manage other tasks like menus and playing audio which have nothing whatsoever to do with managing windows. Both ratmen(u) and mocp are examples, respectively.

Your distro or your flavor of BSD already contains utilities you can use to manipulate things like audio levels or other adjustments (I prefer ossmix or amixer to the mocp audio controls below but I want to show what I consider an easier way since those hitting this blog looking for search terms like those above most likely will be overwhelmed by more complex/granular utilities which vary depending how distros are assembled). Such command-line resources lend themselves well to scripting. And 9menu, ratmenu, and ratmen are scripting tools which work very well with window managers — like ratpoison — which allow users to set keybindings. This isn’t specific to ratpoison and could be made to work in just about any window manager (I’ve posted before about using ratmenu in oroborus and jwm; I’ve also written here about using command-line tools from within window manager menus).

I love ratpoison because it pretty much stays out of my way and gives me a full view of what I’m doing. I also love ratmen(u) — 9menu, which is “recommended” when using Debian apt-get/aptitude, works similarly so I suppose I should include it here — because it can be used however a user sees fit. Want to just have a choice of applications like most default window manager menus? Just do that. Want something that opens specific files in a certain manner in a particular application? You can do that. Mix and match. It gives you the full flexibility to do whatever you want.

That lends itself very well to console and command-line applications (not the same: console applications typically are built on libraries like curses to provide a more complex user interface while command-line applications are run straight from the command-line without an interface; some applications — including graphical ones — allow for command-line invocation of certain features). Not all console applications have such command-line options, but mocp does.

Building a ratmen(u) can be as simple or complex as you desire. In this case, I wanted one I could bind to one particular set of keys (meta-Y) to manage mocp functions; I’ve also done the same when running mpd, but I find myself using mocp more often. I also have another (bound to meta-M; mnemonic = music) which has some of my favorite streams and playlists set up in it. This allows me to fully control things as I desire without having to find whatever interface it’s playing in and then fiddle around with settings to play what I want, stop it, etc. I also have a menu set up to adjust PCM volume levels via mocp as well (mocp server doesn’t need to run to use it so it works for other apps which play back audio/video). So I can control all aspects of audio with simple menus rather than convoluted user interfaces which don’t work so well with keystrokes and require use of a mouse.

Here’s the menu I use to control mocp play, start, etc. It’s pretty straightforward. Remember that ratmen/ratmenu/9menu are normally run as shell scripts which need to be set executable.

I have it set up in my .ratpoisonrc to launch on the keybinding noted above. When I hit its binding, I get my menu atop whatever is open (if anything’s open at all):

I’m listening to a stream (Sky Smooth Jazz), so let’s say I want stream information and song title. Or I want to see the state of mocp (whether it’s playing, stopped, etc.). I can select the first choice here, which I have set up to give me the information in a ratpoison status line message:

That could be narrowed down via grep for artist/title or just state. Depends what you want.

The menu for my playlists and streams just uses the mocp options to clear (-c) the playlist, add  (-a) a stream or playlist, and play (-p). I also have options to add playlists to the current one, etc. This integrates well with a shell wrapper I use for playing streams from my browser which is straightforward and set up as my default “player” for pls, m3u, etc.:

mocp -cap "$@"

That keeps stupid windows from opening up and getting in my way while I’m doing other things.

Like I wrote above, I also have an audio control menu which is built similarly. You could use whatever audio control software you have installed on your system to manage MASTER and PCM levels or you can use something like application mixer settings available through command line — depends what your preferred application allows. For this quick example, I decided to use the mocp controls since it’s simple and I also added an option to open a terminal with alsamixer for more control options. I also gave myself enough variables to get a desirable volume within a few keystrokes. There are much more clever ways to script such a thing, but this is just a quick example.

# my  audio control ratmenu

ratmenu -fg cyan -bg blue -align center  \
"mute" "mocp -v 0" \
"volume 67" "mocp -v 67" \
"volume 80" "mocp -v 80" \
"volume +10" "mocp -v +10" \
"volume +5" "mocp -v +5" \
"volume +1" "mocp -v +1" \  
"volume -15" "mocp -v -15" \
"volume -5" "mocp -v -5" \
"volume -2" "mocp -v -2" \
"alsamixer" "xterm -e alsamixer"

As I noted above, you can set up such adjustments for both PCM and MASTER with tools you already have installed. Those will work without regard for what you use to listen to music — whether XMMS, cmus, mp3blaster, mocp, mpc, etc. — but vary in difficulty in setting up.

Update 20100209 – Debian Lenny, TinyCore, emacs, ratpoison, oroborus, and security of small distros

February 9, 2010

I’ve intended to sell this thing but haven’t yet. I updated my AA1 page last week to reflect the fact that I really don’t run Linux on it anymore. I still have {Tiny,Micro}Core set up on it, but I’ve booted that maybe three times in the past few months including once this morning to get my emacs-related files. I don’t know if the issues with wireless were related to the network stack, the ath5k driver itself, wpa-supplicant, or a combination of factors. For the last time, it’s NOT a hardware issue because the problem never happened (meaning started) under Windows; it only happened (started) under Linux and persisted after rebooting. I occasionally boot TinyCore from a USB stick on my other computers (see below).

New Desktop/Workstation
It came with Windows XP Pro installed. I first installed Scientific Linux 5.4 via the live CD, which provides a Gnome desktop. I’ve already posted about adding an old hard drive that had OpenBSD 4.3 on it, on which I installed NetBSD 5.0.1 after backing up $HOME. I’ve been too busy to even update SL54 (which I know has updates because I was also running it on my new-old laptop for a while), let alone configure NetBSD beyond the basics (e. g., setting up my network card even though it’s not yet networked, SSH, etc.). I’d hoped to set it up further this past weekend but I’ve been eye-deep in a stack of reports to edit and charts to generate.

New-Old Laptop
I’m still using Debian Lenny, which I installed using net install. I let it go ahead and install the default Gnome desktop even though I initially thought about just doing a minimal installation and adding what I wanted. One of the reasons I did that is because life has been so hectic the past 18-24 months that I care a lot less about bloat than I do about the convenience factor and having everything ready to roll. Otherwise I’d already have the other computer set up and ready to roll, no?

I have switched some apps around, though. I was using xemacs but decided instead to revert to GNU emacs 21.4 from backports so I’ll have more of the modes I’ve come to take for granted and which require either finding via apt or from their developers. I’m posting this now via weblogger.el (which I’ll have to clean up later) from within emacs. I’ve also installed oroborus and am using it instead of metacity within Gnome (edit ~/.gnomerc to include a line “export WINDOW_MANAGER=oroborus”); this is RAM-sparing to some degree but not nearly enough. I already have ratpoison installed as well, and will more likely than not start paring down on the Gnome bloat as I find time. I’ve been running ratpoison mostly under another user account.

Other Computers
My ancient ThinkPad got a minimal install of Debian Lenny several months ago but hasn’t been booted in at least a month. I may use it for TinyCore. Or as I’d intended with Lenny just to be a temporary HTML/blog server for home use. I may just use MicroCore if I do that.

Nothing to report on my old MMX box. I haven’t booted it in so long I don’t even remember what it has on it.

Unfinished Business
Speaking of {Tiny,Micro}Core, I started on a screencast/presentation back before Christmas that I alluded to at least once here. I’ve been too busy to finish it. It’s in response to a question that was asked at the TCL forums about using TCL as an enterprise Linux replacement. I wanted to demonstrate beyond the more obvious answers why I thought it was unsuitable and worked out a quick and dirty concept to show how vulnerable such a distro — based basically on one file — could be. This kind of goes beyond the security of the image being read-only and, accordingly, being able to reboot into its original state; instead, I wanted to see how difficult it would be to take advantage of the fact that the image is on a read-write partition which can be mounted by user tc locally or remotely and then replaced. My little POC requires user interaction at this stage (which was in maybe 20 minutes’ work) to basically get a corrupt image to replace the original so that each subsequent booting of it isn’t actually the “pristine” original tinycore.gz image but instead the corrupted one (which could have any variety of “reconfigurations” in it, but mine basically pings another computer when it has an IP and has a message stored in a file stating what changes have been made to the original image).

I haven’t decided if I’ll go through and see if I can get it to work remotely without user interaction. Even if I do that, I won’t post it here. Sorry, kiddies.

Since these small image-based distros typically lack logging facilities, it would be trivial to pull this off and possibly leverage vulnerabilities in various packages to further make a mess of it. The smaller the distro’s base image, I think the less noticeable it would be. With my download speed, I can download the TinyCore image in just a few seconds.

Also, I tested this on USB. It’s trivial to test if something has been booted from sd{a,b} and contains a directory named boot containing a file called tinycore.gz. The same applies to other small distros which similarly use one file to store the operating system, allows full sudo (or, in the case of some like Puppy, root only), etc. Even though something is running from RAM, it’s still found on a storage device attached to the computer and can be mounted (unless it’s quickly removed). So I don’t think this is inherently more secure than anything else (or inherently secure at all), and the smaller size could be a disadvantage since it would take less time to download and be less likely to be detected by most users.

As improbable as it is that such things can be accomplished without some kind of user interaction or physical contact with a USB stick to install a corrupted image, it’s still possible. Add in potential vulnerabilities from various packages — including browsers, improperly set up servers, etc. — and the possibilities increase both locally and remotely.

No, the sky is not falling, but there is a potential for risk even though the image itself is read-only. The image may be, but its partition isn’t. The risk may be acceptable for most uses. It isn’t acceptable for enterprise use — not without some kinds of safeguards that enterprise distros have to help reduce problems like this from occurring.

I’m not knocking these small distros. I think they have a special niche, but too many people think they can be one-size-fits-all. Enterprise-grade distros — including RHEL and its clones, SLED, etc. — have a variety of safeguards that would be “bloat” in something designed to be small and minimal. Adding those things to a minimalist distro would seem to be counter to their very purposes. That includes everything from security enhancements to logging facilities (you really do want to know who logged into which computer at what time on what day, and having every user named “tc” can’t be of much use if you need a chain of custody for various computer records, file records, changes, etc.). Moreover, the packages or extensions these small distros offer typically don’t undergo the same level of testing as in enterprise distros, are more often than not bleeding edge rather than tested and stable versions, and aren’t signed. Even signed/trusted repositories aren’t free from trouble as the RedHat/Fedora people found out a couple years ago when their mirrors were compromised.

I’ll see if I can finish the presentation and get it posted soon. Then again, I thought I would’ve had that done a month ago. Stay tuned.

Playing With ion3 on AA1

July 24, 2009

I decided to see how much work it’ll take to force ion3 to work the way I want it to on my AA1. I’ve used ion before and I love the general concept. What I haven’t liked — hated in fact — is the author’s default set of bindings. Many of these rely on the function keys, which are also used by various applications, as well as other bindings connected to the META/alt1 key. The settings for ion can be customized to suit any user’s needs by editing series of files used for configuration, starting with ~/.ion3/config_ion.lua which overrides the system defaults.

I downloaded the latest zero-install binary tarball and, as recommended for those of us not using zero-install, just unarchived it in /opt. Since /opt/ion3-[version number string]/bin isn’t in, and never will be, added to my $PATH, I’m using the full path string to launch ion3 from my .xinitrc.

Why not use the Ubuntu package? For starters, it would’ve resulted in adding — along with the ion3 package — over 18MB of stuff, quite a bit of it I recognized as stuff I removed already. Second, the package is outdated and possibly in violation of the terms of the author’s license (modified LGPL); Valkonen requires packages be updated within 28 days of his stable releases or be marked as “obsoleted and unsupported,” and that such packages be renamed.

While some have taken exception to the author’s terms, which also includes the renaming of any package which includes patches he doesn’t support (which is fair — why should he answer for or address downstream bugs for things he doesn’t even include?), I find them fair. As I’ve written before, this is no different than issues related to “IceWeasel” due to copyright issues with Mozilla Firefox. But it is markedly different from issues like what happened with MurgaLua and DSL last year: Murga had released his bindings under GPL and complained when the runtime was recompiled so that separate parts could be used independently — which is one of the basic ideals of the GPL’s freedoms: allowing the user to control how something works on his or her system; in the process, he wrongly accused DSL of removing copyright attributions when, in fact, he’d left out anything in his own bindings about his copyright. The tarball DSL made available was his own tarball, unchanged in any form or fashion — complete with the copyright notice he’d included as well as the GPLv2 text in the COPYING file. It’s that file which mentions that anyone is free to use, change, and redistribute the code, including those bindings, so long as the source is made available along with changes. DSL complied in every term of the GPL and the files included with the bloated runtime Murga provided, but still offered to add further lines to provide the author of the bindings a copyright notice everytime they were invoked. If you don’t specify your terms up front, you have nobody else to blame. So boo hoo, you fucktard. Murga chose a license antithetical to his desires and chose to add strings to the GPL in such a way that the user really wouldn’t be free to use the code as he or she sees fit but only as Murga sees fit (which gives him a bloody fucking copyright notice even for things he didn’t write). If you’re upfront and clear about your terms, like Valkonen is, others know what is or isn’t allowed.

Once I untarred and copied the full path into my .xinitrc, I was able to startx into ion3. The first thing I did was unsplit the two empty windows by killing one because 512 pixels (minus borders/padding) isn’t going to work for my browser. That was the first thing I wanted to get up and running.

I remembered from the last time I ran ion3 that F3 (run command) works similarly to dwm — type the first letter or two or more of the application you want to open and a list matching those letters pops up; tab-completion through the list will take care of the rest. I like this approach and the only reason I prefer ratmen(u) is because ratmen(u) allows me to fine tune things a bit more, e. g., customizing how apps open or close or changing them as they run (such as the mocp menu I showed as an example once before). The command menu in ion3 does allow the user to add flags/options so it’s still very flexible.

Finally, one of the things I hope to get out of using it is better handling of applications like GIMP and Skype which use too many windows. As much as I love using ratpoison, it’s clumsy and awkward when it comes to such things. I don’t consider that ratpoison’s flaw, I consider it a shortcoming of those applications which open too many windows rather than operate within one frame or doesn’t give users an option setting to manage things in one box rather than two or three or more.

I’ve just installed ion3 so I still have some editing/reconfiguring to do. I’ll probably give this a shot for a while and decide if it better suits my needs than ratpoison. I should have plenty of time this weekend to mess with it because I can’t put any weight on my ankle yet.

crunchbang jwmrc, ratpoison screenshot, terminals, etc.

July 19, 2009

I’ve tried three times to post the #! jwmrc but the XML tags render it unreadable. If anyone wants it, just leave a comment and I’ll e-mail it or post it at a forum or something. I’m not using jwm much right now but I have the full #! menu jwm-ized sans the keybindings. I didn’t bother doing the keybindings after all, or change the colors much, because those are all personal preferences.

I really like the way I have this thing configured right now in ratpoison, with the exceptions of Skype and gimp. Not much I can do about that short of filing bug reports for each: “doesn’t open in single window mode.”

What’s this? I see conky plus trayer across the top, screen opened in the emacs terminal instance with my .ratpoisonrc.


I set the wallpaper (12kb with intentionally crappy gradients) using nitrogen to see how bad it would look under terminator and if I could still read my stuff in screen. I’m back to using terminator at least for the time being; font rendering in the version of aterm, especially under screen, I downloaded is fucking hideous so that’s another thing to recompile at some point. I usually use a solid background but I noticed when I set aterm to transparent and had an image for the background that the colors were totally distorted, as if I had the wrong resolution set or something. So now my .Xdefaults has transparency off for aterm. One of the things I really fucking hate about terminator — other than being wrapped in python — is that certain combinations of keystrokes are used to control opening and splitting “tabbed” terminals. I’ve tried tabbed terminals before and don’t understand the need for them when you have better tools like screen available.

Invisible: mocp, conkeror, various files and modes in emacs.

That’s it for now. Time to hit the gym.

ratpoison on crunchbang

July 15, 2009

Few changes to crunchbang. Removed gnumeric and abiword, installed Added ratpoison and a few other things. Set up trayer to collect various icons for applets and other stuff on the right (–width 200 should be big enough) and put conky on the left. Still have a few things to do to get it the way I want, including changing the font/color in .conky-rp.


Busy day tomorrow, probably won’t finish/post the #! jwmrc until this weekend.

UPDATE 20090716 @ 12:50 US/Central

Had a few minutes at lunch to tweak conky and my ratmenus. I think I can get that top part of the screen with conky/trayer down to about 16 pixels. May try that later or tomorrow.


Back to the grindstone.

crunchbang ratmenu and other menu ideas

July 13, 2009

If you look through some of my ratpoison-related posts you’ll find a ratmen tutorial. IIRC, one of the screenshots showed ratmen opened in oroborus, a window manager which (like ratpoison) has no menu of its own. Both ratmen and ratmenu (there’s so little difference between them that they may as well be interchangeable) are window manager agnostic; you can bind one menu or however many you see fit.

Most window managers will let you change or add keybindings. I showed several bindings in a screenshot yesterday (I have a lot more now) for various ratmenus that I can launch in jwm just as easily as in ratpoison. I have one with image-related apps, another for multimedia, another for office. That makes it easy to quickly launch things based on minimal keystrokes.

Reminder: each menu is an executable shell script. Put it in your path or call it in your binding from where you keep it. You can type ratmenu at a command prompt to see what variables you can configure. It outputs the first arg as a description in the menu and executes the second arg if selected.

You can install ratmenu/ratmen from your repository or compile it (just need X headers, IIRC).

In this first example, I’m using a mostly-complete menu taken from crunchbang’s openbox menu. I took out the scrot screenshot entries (those are already set on a keybinding) and added a couple words to distinguish things from each other (for example, some of the config entries were set up as separate nested menus lacking in description beyond “edit configuration”). References to man pages and the like in that region of the menu are for the preceding term. I set the fg/bg colors. NOTE that I use my preferred shell (mksh, the official shell of lucky13) rather than /bin/sh which is usually a link to some bloatware called bash (just change it to /bin/sh or /bin/bash or whatever you need; edit: in Ubuntu/#! it’s a link to dash).

# crunchbang ratmenu - Mon Jul 13 17:30:19 CDT 2009

ratmenu -bg grey33 -fg grey66 -align center \
"Run Program" "gmrun" \
"Terminal" "terminator" \
"Web Browser" "firefox" \
"File Manager" "pcmanfm" \
"Text Editor" "gedit" \
"Media Player" "vlc" \
"Firefox" "firefox" \
"Claws Mail" "claws-mail" \
"Liferea Feed Reader" "liferea" \
"gPodder Podcast Catcher" "gpodder" \
"gFTP Client" "gftp" \
"Transmission BitTorrent Client" "transmission" \
"Skype" "skype" \
"XChat IRC Client" "xchat" \
"Gwibber Microblogging Client" "gwibber" \
"Pidgin IM" "pidgin" \
"Network Tools" "gnome-nettool" \
"GIMP" "gimp" \
"Inkscape" "inkscape" \
"GPicView Image Viewer" "gpicview" \
"Colour Picker" "gcolor2" \
"Agave Palette Designer" "agave" \
"Specimen Font Previewer" "gnome-specimen" \
"FontyPython" "fontypython" \
"Xsane Image Scanner" "xsane" \
"Colour Lovers" "firefox" \
"Color Hunter" "firefox" \
"Vector Magic" "firefox" \
"FavIcon from Pics" "firefox" \
"AbiWord Word Processor" "abiword" \
"Gnumeric Spreadsheet" "gnumeric" \
"Calculator" "gnome-calculator" \
"Dictionary" "gnome-dictionary" \
"Evince PDF Viewer" "evince" \
"VLC Media Player" "vlc" \
"Rhythmbox Music Player" "rhythmbox" \
"Audacity Audio Editor" "audacity" \
"PiTiVi Video Editor" "pitivi" \
"Kino Video Editor" "kino" \
"Create Screencast" "gtk-recordMyDesktop" \
"Cheese Webcam App" "cheese" \
"Sound Juicer CD Extractor" "sound-juicer" \
"Sound Recorder" "gnome-sound-recorder" \
"Sound Converter" "soundconverter" \
"WinFF Video Converter" "winff" \
"Volume Control" "gnome-volume-control" \
"Vim - Text Editor" "terminator --command=vim" \
"Midnight Commander - File Manager" "terminator --command=mc" \
"rtorrent - Bit Torrent Client" "terminator --command=rtorrent" \
"newsbeuter - Feed Reader" "terminator --command='newsbeuter -r'" \
"elinks - Web Browser" "terminator --command=elinks" \
"MUTT - Email Client" "terminator --command=mutt" \
"irssi - IRC Client" "terminator --command=irssi" \
"naim - Chat Client" "terminator --command=naim" \
"htop - System Monitor" "terminator --command=htop" \
"Vim" "terminator --command='man vim'" \
"Midnight Commander" "terminator --command='man mc'" \
"rtorrent" "terminator --command='man rtorrent'" \
"MoC" "terminator --command='man mocp'" \
"newsbeuter" "terminator --command='man newsbeuter'" \
"elinks" "terminator --command='man elinks'" \
"MUTT" "terminator --command='man mutt'" \
"irssi" "terminator --command='man irssi'" \
"naim" "terminator --command='man naim'" \
"htop" "terminator --command='man htop'" \
"Evince PDF Viewer" "evince" \
"xCHM HTML Help Viewer" "xchm" \
"gedit" "gedit" \
"Leafpad" "leafpad" \
"Vim" "terminator --command=vim" \
"gVim" "gvim" \
"Pyroom" "pyroom" \
"Xfburn CD/DVD Writer" "xfburn" \
"Gnome Calculator" "gnome-calculator" \
"Gnome Dictionary" "gnome-dictionary" \
"OSMO Personal Organizer" "osmo" \
"PCMan File Manager" "pcmanfm" \
"PCMan File Manager (root)" "gksudo pcmanfm" \
"Terminator" "terminator" \
"Xterm" "xterm" \
"File Roller" "file-roller" \
"File Roller (root)" "gksudo file-roller" \
"Xpad - sticky notes" "xpad" \
"World Clock" "gworldclock" \
"Edit .conkyrc" "gedit ~/.conkyrc" \
"Restart Conky" "conkywonky" \
"man page" "terminator --command='man conky'" \
"Wiki Page" "firefox" \
"Edit start-up script" "gedit ~/.config/dMenu/" \
"man page" "terminator --command='man dMenu'" \
"Edit gmrun config file" "gedit ~/.gmrunrc" \
"man page" "terminator --command='man gmrun'" \
"Edit terminator config file" "gedit ~/.config/terminator/config" \
"man page" "terminator --command='man terminator_config'" \
"Edit tint2 onfig file" "gedit ~/.config/tint2/tint2rc" \
"man page" "terminator --command='man tint2'" \
"Online Help" "firefox" \
"lx User Interface Settings" "lxappearance" \
"Screensaver and  Power Management" "gnome-screensaver-preferences" \
"Choose Wallpaper" "nitrogen ~/images/wallpapers/" \
"System Update" "system-update" \
"Disk Partitioner" "gksudo gparted" \
"Adjust with lxrandr" "lxrandr" \
"Adjust with grandr" "grandr" \
"man xrandr" "terminator --command='man xrandr'" \
"Edit Default Applications" "terminator --command='sudo update-alternatives --all'" \
"Login setup (GDM)" "gksudo gdmsetup" \
"Network Admin" "network-admin" \
"Package Manager" "gksudo synaptic" \
"Passwords and Encryption Keys" "seahorse" \
"Printer Settings" "system-config-printer" \
"Restricted Device Manager" "gksudo jockey-gtk" \
"Services/Daemons" "services-admin" \
"Shared Folders" "shares-admin" \
"System Monitor" "terminator --command=htop" \
"System Logs" "gnome-system-log" \
"Time/Date" "time-admin" \
"Users/Groups" "users-admin" \
"Lock Screen" "gnome-screensaver-command -l" \
"openbox Exit" "openbox-logout"

That’s a very big ratmenu, one I probably wouldn’t use myself. I only wanted to get more of the stuff out of it for both ratmenu and the jwmrc I’ll post shortly (maybe tomorrow — still need to edit the keybindings and set up a couple other things so jwm behaves similarly to #!’s openbox set up). It was easier to edit the whole thing than pick and choose the things I wanted (emacs and vim are way more powerful than gedit). I figured I may as well post it so anyone using a distro with a similar mix of applications can take advantage of it.

As I noted above, I like to break things down to have a bit more control over things. Here’s another example showing that a small menu can be launched from one keybinding to manage one particular application. This is my mocp menu which lets me control a lot of its functions without ever opening it up in a console (but I have two entries for that anyway).

# my mocp ratmenu

ratmenu -fg grey66 -bg grey33 -align center  \
"mocp in term" "aterm -T mocp -e mocp -T transparent-background" \
"next song" "mocp -f" \
"previous song" "mocp -r" \
"pause toggle" "mocp -G" \
"start playlist" "mocp -p" \
"start only daemon" "mocp -S" \
"stop" "mocp -x" \
"clear list/exit" "mocp -c" \
"alsamixer" "aterm -T mixer -e alsamixer"

Those aren’t in any particular order and this isn’t the only application for which this is possible. Look at the documentation for your favorite apps and see how much you can control from outside interfaces.

In the ratmen tutorial article, I had entries in my menus to open things open to various directories. Some of my ratmenus do that with things like image viewers opening to specific directories — such as one entry for screenshots, one for pics from camera, one for scans, etc. I’ll probably also set a couple ratmenus up like my “screen menus” found in my “More GNU screen Tweaks” article.

These are all things you don’t have to use ratmen(u) to accomplish. Just set things up to accomodate your own tastes and needs. After all, it’s your freaking computer. Go ahead, treat it like it is.

posted from weblogger.el
Linux 2.6.28-13-generic i686 (flaky ath5k wifi and all)
Mon Jul 13 18:11:42 CDT 2009

Fiddling with emacs and ratmenu

July 12, 2009

I’ve been setting up some things for emacs and my window managers this morning. First, I got all my .emacs files together (the ones currently in use plus the backups I could find) and unified as much as possible. Then I set up weblogger.el on my AA1 (sorry to those whose RSS readers got broken links after I removed my test entries). Think it’s working better now. Either that or I’ll get pwnt soon.

I also worked on ratmenu-ing this morning. There’s really no difference between it and ratmen in terms of execution, but ratmen wasn’t available in the repositories so ratmenu it is. I put together a few menus I can launch from within jwm or ratpoison (which I finally installed while ago). I also made a cheatsheet I can get from the jwm menu to remind me of the ratmenu bindings and the keys for reconfiguring jwm to match the openbox bindings from #!. I need to edit it for the rest I set up and probably add  some of the other cryptic bindings I did.


The “audio” menu is my favorite. I’ll explain when I post my jwmrc. I should have time to finish editing the #! jwmrc later today and will post ASAP in case anyone’s interested in one that will allow a (hopefully) seamless transition from openbox to jwm, which is much lighter and has most, if not all, the parts used in the default #! desktop.

Also on my to-do list at some point is hitting the wikis and figuring out how to silence the fucking fan on this thing. I don’t remember it running non-stop in Fedora or PCLOS. I know it doesn’t in Windows.