EMWM and Utilities FAQ/Guide

If you're rusty on, not familiar with or confused by X Resources, read this excerpt from Xlib Programming Manual Vol 1. There is also a sample .Xresources file, which demonstrates customizations described here.

Motif on fine dot-pitch displays

Most motif widgets will scale according to font size. When using Xft fonts, set the Xft.dpi resource to 160 or whatever suits best. Scrollbar size may be adjusted with *XmScrollBar.width (for vertical) and *XmScrollBar.height (for horizontal) X resources. Other widgets that require manual size adjustment are: *XmPaned.sashWidth/sashHeight, *XmPanedWindow.sashWidth/sashHeight and *XmArrowButton.width/height.

If window resizing rubber-bands look too thin, specify a larger value in pixels with the Emwm*outlineWidth X resource. Window border widths may be adjusted with Emwm*resizeBorderWidth for resizeable windows, and Emwm*frameBorderWidth for fixed size windows.

Icon size for minimized windows can be adjusted with the Emwm*iconImageMaximum X resource, EMWM will display an appropriately sized icon if an image large enough is provided by the application. It won't scale smaller icons up.

Anti-aliased (Xft/fontconfig) fonts in EMWM and Motif based applications

Since Motif 2.3 Xft fonts can be specified with render tables. You can add named renditions to render tables and assign them to widgets and/or widget classes.
Say you want to define a 10pt, bold, italic, sans rendition and call it "sans_10p":

*renderTable.sans_10p.fontType: FONT_IS_XFT
*renderTable.sans_10p.fontName: Liberation Sans
*renderTable.sans_10p.fontSize: 10
*renderTable.sans_10p.fontStyle: Bold Italic

Then assign it to Motif widget class or name:

*XmLabel*renderTable: sans_10p

Or to all widgets:

*renderTable: sans_10p

There are more properties you can set; see XmRendition(3).

Note: It is technically possible to build the Motif toolkit without Xft support. So if the above doesn't do anything, such could be the reason.

See also: ICS White Paper on UTF8/Xft support in Motif.

Client specific window placement and decorations

Certain resources can be set per application, by specifying application's window class (the value of WM_CLASS property associated with the window) as a component.

Some applications will place their windows on screen, rather that letting the WM do it, if this is not desired EMWM can be configured to ignore program specified position with Emwm*class*usePPosition: off. Setting the usePPosition to on will make EMWM always use program specified position, default is nonzero which means window positions other than 0,0 will be accepted.

The client specific Emwm*class*overrideGeometry resource may be used to specify/override window geometry for applications that don't provide a conventional way allowing to do so. This resource accepts an X geometry, WidthXHeight+Left+Top, string argument.

Decorations and Icons

Default window decorations and functions can also be overridden by setting Emwm*class*clientFunctions and Emwm*class*clientDecoration resources.

For iconified windows, EMWM will use application specified icon by default. This can be overridden with the client specific Emwm*class*iconImage resource, by specifying a custom icon pixmap file name.

The application window's class string can be retrieved with: $ xprop | grep "WM_CLASS" (then click on application window).

Using xmsm with a display manager

Note that xmsession is just a shell script that sets up the environment for xmsm (merging X resources, sourcing ~/.Xprofile etc.), hence it's only needed if this hasn't been done yet.

1. Execing xmsm from ~/.Xsession should work on most platforms.

2. If you prefer a clean environment with XDM, you can specify xmsession directly in xdm-config using the DisplayManager*session X resource

3. See FreeBSD Handbook on XDM and OpenBSD FAQ on this topic. Debian Linux will run /usr/bin/x-session-manager, which you can symlink xmsm to (Source: Debian WIKI).

Per-application resource files instead of screen database

You can create an .app-defaults subdirectory in $HOME and then export XAPPLRESDIR="$HOME/.app-defaults" environment variable (in .Xprofile, or whatever sets up your environment), then copy per-application defaults from (usr/local)/etc/X11/app-defaults over there for customization. This also keeps them out of the screen database, and there is no need to run xrdb after making changes.

Will EMWM have <insert feature here> added?

I've been using MWM for a long time, because it did all I needed a WM to do. EMWM grew out of a couple of patches I created to make MWM work properly with recent software and X extensions, and hadn't published until Motif was LGPLed. My personal goal is just to keep it usable.

That said, I have nothing against extra configuration options so people can get it to work just the way they want, but that's pretty much it. If you need more functionality and/or customizability, you're probably looking for FVWM.

Didn't MWM have multiple desktop/workspace support at some point?

MWM had it all along, and the code is still there, albeit currently disabled, because it is implemented on top of Sun's IPC. Update 12/08/23: Since the inactive code needs to be sorted out anyway, it will eventually be repurposed for a EWMH compliant multi-workspace implementation.

Freedesktop/EWMH Compliance

As of now the Extended Window Manager Hints implementation doesn't include handling of hints mainly used by desktop environmens (struts, stacking, desktop window). Utulities such as taskbars and panels, which assume compliance without checking are likely to have issues working with EMWM.

Difference between Core and XFT fonts

For client-side font loading, subpixel antialiasing and simplified multibyte string handling, the Xft extension was added to the X server.

Fonts for the X core font renderer are specified using logical font descriptors (short XLFD) which contain information about font family, weight, size, resolution and encoding e.g. -adobe-courier-medium-r-normal-*-12-120-75-75-m-70-iso8859-1. There are separate text drawing routines for plain and wide character strings. It is therefore important to specify appropriate font lists for text to be rendered properly in multilingual GUIs. See also xlsfonts(1), xfontsel(1), xfd(1).

Xft fonts are specified using a simpler, name-size[:attribute ...], syntax e.g. sans-12:weight=bold. Font names are matched by fontconfig, which will substitute the best alternative in case the font specified doesn't exist ( see fc-match(1), fonts.conf(5)).

Motif Note: prior to Motif 2.0, fonts for widgets were specified with the font and fontList resources, this is still true for core (XLFD syntax) fonts. Xft fonts however can only be specified with the renderTable resource.


Back to EMWM Homepage About