Archive for the ‘dwm’ Category

Update 20100808 – More dwm, Search Engine Hits

August 8, 2010

Just a quick post before I go running. I decided I wanted dwm on my primary laptop as well as the Aspire One. Actually, I already had it installed (Debian Lenny). I ran into a couple issues that made me decide I had to compile it. First, the default package is labeled as something of a “trial” for users — something I agree with since it seems to use a mostly default configuration (with nine desktops and keybindings). Second, some of the default keybindings get in the way of using the meta/alt key. In my case, the worst conflict in keybindings came while using emacs: the status bar is toggled in the default configuration with M-b, which is the default emacs binding for backing up one word (IOW, something I’d rather not give up).

Since I can narrow my desktops down to a handful and want to use a key that won’t get in my way while using oft-used programs, I decided to compile it myself. My tweaks so far are to use the Windows-logo key as the MODKEY (#define MODKEY Mod4Mask), monocle view (no splitting) as my default view, and to arrange my desktops in a more sensible arrangement for my needs: emacs on one desktop, terminals on another, browser on another, and one where I can open retarded applications which require multiple windows — GIMP, Skype, xsane — on another. I’ll probably mess with colors and other settings later. I also need to recompile for the improved keybindings in SL on the Aspire One (update: done — screenshot is from Aspire One instead of primary laptop).

I also got around to looking at some search engine hit terms this morning (and it’s not even 5am here…).

That first one deserves some attention. If you’re logging in to a shell at a specific runlevel (e. g., 3) where it’s set up for a console login or if you haven’t installed a display manager like gdm or xdm with a login, you’ll usually start your window manager with the startx command. This command reads from a file called either .xinitrc or .xession in your home directory. That file is basically a shell script in which each command (such as “xsetroot -solid black”) needs to be set apart with an ampersand (&) until the last line which is typically the exec command for your window manager.

For example, here’s a basic .xsession (or .xinitrc) for starting dwm:

xset b 100 100 20 &
xsetroot -solid black &
xrdb -merge ~/.Xdefaults &
exec dwm

You probably don’t need all of these commands and will need others. The first is where I usually set my default system beep. The second sets the background with solid black (if you’re using jwm and it was compiled with image libraries, you can set the background via your .jwmrc — you can also execute the commands above via jwm’s StartupCommand tags in .jwmrc). The third reads my own Xdefaults with settings for things like terminal colors, dpi (e. g., font size rendering), and other behaviors of X-related applications. Finally, the window manager is executed (no ampersand on this line). You’d use the start-up command for whatever you’re running (e. g., jwm, startxfce4, etc.) — read the docs if you’re not sure.

I realize whomever hit here looking for that information has probably moved on to another site, but I often see return traffic with identical search engine hits so maybe this will help that person. Or someone else.

Update 20100807: dwm on SL55 and Aspire One

August 7, 2010

I’ve narrowed my three favorite window managers down to ratpoison, ion{2,3}, and dwm. Maybe not always in that order but pretty close. And jwm is a steady fourth; it would rate higher if it didn’t have a crappy static menu (which requires restarting the whole window manager to take advantage of menu changes).

I got pissed at jwm while trying to watch videos in fullscreen. It started to open fullscreen and then it went back to normal (in-browser) size. I made sure it wasn’t related to settings I had for firefox (so that it runs maximized without any window decorations) but that wasn’t it. So I decided to compile dwm.

Just a few tweaks to compile it with a sane color scheme and to run in monocle mode by default (netbook split screen? no thanks), along wih a few other things.

I don’t remember if I added that I removed gdm the other day. It’s just as fast and easy to change .xinitrc (or set up alternates) to launch a different window manager as needed, or if needed. Speaking of which, I added a line in my .Xdefaults to adjust dpi because gdm was apparently setting it.

Xft.dpi:        96

Now all is well with certain applications that were giving me disturbingly large fonts. Everything is just like before I got rid of gnome and gdm and everything else.

I hope to finish my next update by Monday. It will explain what I’m using in place of OpenOffice.org.