FXwm
The 'For XiniX window manager' (FXwm) is a small and fast X window manager for Linux, featuring the most basic configuration with as much flexibility as possible. To help achieve this goal, our window manager only handles the chrome of each window along with the I/O from connected devices such as a keyboard or mouse. There is not any built-in functionality to supervise the environment such as a taskbar or popup menu. Instead, this functionality will come from a complementary software such as web.de, wbar, or even a terminal!
Contents
License
This software currently contains files from various projects to expand its capabilities, but can be configured to not use them. As a result this package has to be released under multiple licenses - CPLv2 and GPLv2+. Both licenses are compatible with one another so there should not be any issues using all components at once. We will cover the licensing of the files below:
- Core (CPLv2)
- o chrome.*
- o io.*
- o main.*
- o socket.*
- o switch.*
- o window.*
- Extras (GPLv2)
- o Desktop.* (Enables multiple desktops)
- o Rotated.* (Enables movement of titlebars)
More information about our CPLv2 license can be found under the "Our Licenses" link of our homepage.
Installation
No matter which method of installation you choose below, FXwm does not require a lot of complication to get running on your device. The 'Package Management' option will be the easiest since someone will have taken the compilation steps for you, but even if you have to perform the building of the executable on your own, the only dependency you will require is a working compiler like gcc.
Package Management
As noted above, this will be the easiest method of installation for this software. We will expand the below list to include as many mainstream Linux distros as possible when submissions are made to our staff for inclusion.
Debian and derivatives (Ubuntu, Linux Mint, Knoppix, )
$ sudo apt-get install fxwm
TinyCore and derivatives
tce-load -iw fxwm
Compiling from Source
This will the most difficult method of installation, but our staff has tried to make this as painless as possible. Currently only a handful of tools need to be installed along with a few simple commands and the build process will be completed. The below list will outline what you need to have pre-installed:
- o Standard tools such as find, grep, cut, etc
- o Bash
- o a c/c++ compiler such as gcc/g++
- o FLTK 1.3 dev package for your distro
After making sure that above requirements are met, we can proceed with building the binary for this window manager. For this example, we will be using GNU's gcc compiler and assumed that the source was downloaded into the /tmp directory.
$ tar zxf /tmp/fxwm_x.x.x.x.soft $ cd /tmp $ ./make install
It should be noted that if you are a package maintainer, you can optionally include a 'PREFIX=/staging/dir/prefix' to the 'make' call to have the software install to a staging area where you can package the software for your distro. If you are uncertain what a package maintainer is, then you should not use the 'PREFIX' switch!
Post Install
To use FXwm as your window manager after installation (via package management or downloading and compiling on your own), you will need to create or modify a text file that is parsed during the initialization of the X Window system. On modern Linux distros that use a graphical login window, the file will be ~/.xsession. For older systems that start X after a successful shell login, you will need to modify the ~/.xinitrc file. To make FXwm as your default window manager, you may also have to select it as the default option at the graphical login screen.
The file used by your system should look similar to the following:
#!/bin/sh xsetroot -solid \\#006060 xrdb .Xresources # start xset, xmodmap, other configuration programs fxwm -S /usr/local/bin/web.de & WindowManager=$! # start xterm, other auto-start programs wait $WindowManager
Getting Started
Now that we have a working binary installed in your operating system, we need to discuss the various ways the window manager can be configured to your liking. Before getting into that information however, it is important to point out some important notes...
Unlike most, if not all, other window managers, this wm actually only manages the windows. Any desktop environment "supervision" has been removed, so things like a taskbar or right-clicking on the desktop background to activate a menu system, is not option. Instead, you define what you want to use as the "supervisor" of your system. The most basic example of this would be any one of many terminal emulators such as 'aterm' or 'konsole'. This would allow you to start any supplemental software from the console when calling software in the background (e.g. with a trailing ampersand '&' character). Other options include web.de and wbar. Since a supervisor is required in order to run the software, you must tell FXwm what it is so that certain conditions no longer apply (e.g. the ability to stop or close it).
If you would like to demo the software before installing it on your system, you can use a nested X server such as Xephyr (preferred) or Xnest. An example as been included below:
- Xephyr :1 -screen 1024x768 &
- fxwm -F -S /usr/bin/konsole -o 0:0:40:0 -display localhost:1
Configuration
Since this window manager adheres to the Unix philosophy of "Do one thing and do it well", there is not much to configure. Currently the only file to manipulate is either located in the global directory /etc/fxwm/chrome.css, or in a personal directory ~/.fxwm/chrome.css. Further configuration of FXwm is only allowed via any passed switches. We will cover each below.
CONFIG
As stated above, there are is a single config file that is used to manipulate the appearance of the window manager using css-style declarations. There are too many of them to cover here, but each value should have an associated short description within the file itself.
SWITCHES
As a way to provide additional functionality, FXwm can also accept several command line switches. An expanded description of each will be covered below. It is important to note that in addition to these switches, there are several additional parameters that can be modified by editing the config.h file in the source code and recompiling, although most users would not be interested in having those values changed.
Mandatory switches
- -S[upervisor]
Since FXwm does not include any means for starting any programs (e.g. from a menu or taskbar), this switch is mandatory and will load the desired software that will enable this functionality. All the other switches are optional. NOTE: this app can not be closed with hotkeys or an 'X' titlebar icon.
Supervisor switches
- -C[ursor] #
There may be times when a specific cursor should be used when the supervisor has focus. Using this switch will enable that functionality by simply passing a numeric value for the desired cursor.
- -BG
If you would like to make sure that the supervisor always remains in the background (unless manipulated via a socket or window manager controller such as wmctrl), then pass this switch.
- -FG
Similar to the background switch above, this performs the same action but will keep the supervisor in the foreground instead.
- -E[xecute]
In some instances, the supervisor might require some other software to load before it will work (e.g. webserver and web.ui). It is important to remember that this call is NOT backgrounded due to FXwm checking if the call has success or failure. Typically this value would be for a wrapper script that calls the actual binary in the background and then verifies things to make sure everything is working accordingly before returning success or failure.
- -F[ullscreen]
This causes the supervisor to run in fullscreen mode (without a titlebar), so it will consume the entire screen, or whatever has been specified as the screen size via the -g switch.
- -M[aximized]
Just like the -F switch, this causes the supervisor to fill the entire screen, but will give the supervisor a titlebar with only a minimize button.
Operational switches
- -h[elp]
Shows the help screen and exits the program.
- -d[isplay] host:#.#
Sets the X display and screen for FXwm to manage. Since X11 is based on a client/server model, this option can work with local or remote displays. Examples include:
- -d 0:0.0 (default)
- -d 0:1.0 (first additional display locally)
- -d localhost:0.0 (another default)
- -d 192.168.0.10:0.0 (first display for the device @ 192.168.0.10)
- -v[isual] #
Visual number to use (probably only works for non-color-mapped ones)
- -g[eometry] WxH+X+Y
When this option has been passed, FXwm will act as though the screen is only as large as the values specified by 'W' and 'H' (in pixels), and will constrain windows within this area. The 'X' and 'Y' values correspond to the offset from the upper left-hand corner of the screen designating the top and left boundries where the it begins. Using the -l or -o switches, you can further restrict the size and placement of application windows within the geometry specified. Starting FXwm without this switch will cause it to use the entire screen.
- -l[imit] WxH
This switch takes a width and height value (in pixels) and is used as a way to limit the area of the screen that application windows can use, even when they are maximized. Unlike the -o switch, this area of the screen will be centered which makes it useful if the supervisor needs to have fixed "toolbars" exposed that will never be covered by windows. This would typically be used when the resolution is known and will not be adjusted without modifying this value was well (e.g. in a device with an embedded display). Without specifying this switch (or -o), the entire size of the screen will be used. Also remember that this switch can NOT be used in conjunction with -o!
- -o[ffset] T:R:B:L
Similar to -l[imit], this switch also limits the size of maximized application windows, but instead of setting the dimensions, the full screen resolution is used with the offset being reduced from the specified edge(s). This is useful when the resolution of the display is unknown or could change at any time and also if the supervisor program needs any fixed "toolbars" exposed on one or more sides. A '0' value for any side will prevent adjustment for that edge. This can NOT be used in conjunction with the -l switch!
- -c[onfine]
If the -l or -o switches have been passed, you can use this value in conjunction so that windows can not be dragged outside the bounds set by either of those values.
- -f[ullscreen]
Unlike all the other switches, this one does not take a complementary value and specifies that all application windows will operate in fullscreen mode (no titlebar). This is helpful when FXwm is used as the window manager on smaller devices such as smart phones and tablets that do not allow windows to be dragged around the screen.
- -m[aximized]
As the name suggests, this switch will force each application window to run in a maximized state. The difference between this switch and -f is that each application window will contain a titlebar.
- -i[con] DIR
When the user presses the Alt+Tab buttons, a window will popup showing all the running applications. Using this switch, you can let FXwm know the directory that should be used to locate the appropriate application icon. By default, a sub-directory with the requested icon size (rounded up) is checked and if no matching icon is found, it will check in the root of the DIR directory for a match. In the absense of that icon, a generic icon will be used in its place. So, for example, if the icon size was specified as 90px, then the window manager will check for a "128x128/?.png" graphic (since 128x128 is the closest, rounded up size) and then for a "./?.png" file. If neither exist, then a generic icon will be used as a last resort.
- -e[xecute] FILE
This switch will enable you to have FXwm execute a program on your behalf and may be an easy way for a supervisor to start programs without having to contain that functionality itself.
- -s[ocket] FILE
By default, a socket file to manipulate this window manager is created and is found at /tmp/.fxwm-control. If you would like to use a different path and filename, you can use this switch to specify that information.
Interaction
Once FXwm is running on your device as the primary window manager or in a nested X server (for testing), you can further manipulate the existing windows by using a socket file and/or hotkeys from a keyboard or mouse. Both methods will be covered below.
SOCKET
This window manager does allow interaction through the use of sockets and will allow you manipulate various aspects of the environment using software like socat or netcat. We will cover all the available actions below but wanted to demonstrate two examples:
- echo 'activate 0x80024c' | socat - /tmp/.fxwm-control
- echo 'list' | ncat -U /tmp/.fxwm-control
Single Actions
- list
Passing this action will provide a list of all the software currently opened in the graphical environment and will be in the following format that is separated by tabs:
- <Window ID> <Active> <Desktop ID> <Host> <Binary> <Window Title>
It is important to note that the active window will have an asterisk character (*) following its <Window ID>.
- activate <Window ID>
To bring a desired window into the foreground with focus, pass this action through the current socket file.
- close <Window ID>
As the name suggests, this will close the window associated with the passed ID.
- resize <Window ID> WxH
Resize any window with this command while passing the new width and height desired.
- move <Window ID> 0+0
This action will allow you to move a window around the screen via the X and Y coordinates passed.
- minimize <Window ID>
Also known as iconize, this will remove the window from the screen so it will be considered minimized.
- maximize <Window ID>
Brings the state of the window into being maximized.
- unmaximize <Window ID>
Unlike a maximized window, this state enables you to resize and drag windows around the screen - unmaximized.
- fullscreen <Window ID>
To turn any window from its current state into being fullscreened, simply pass this action. This means the window will not have a titlebar, can not be resized, and will fill the entire available screen area.
- BG <Window ID>
Issuing this command will keep the specified window in the background.
- FG <Window ID>
This action works just like the 'BG' command, but will foreground.
- execute <Path+Filename>
To have the window manager execute a binary, pass this action.
Mutli-Actions
- get/set <Window ID> title [<String>]
To get or set a windows title, use this action. If you are setting the title, you will need to pass the last value shown above.
- get/set <Window ID> icon [<Path+Filename>]
Gets or sets the titlebar icon of the desired window.
- get/set <Window ID> titlebar [<Path+Filename> <String>]
You can get or set both of the afore mentioned actions in a single attempt with this command.
- get/set <Window ID> offset [<0:0:0:0>]
Allows you to get or set the specified window offset.
- get/set <Window ID> limit [<WxH>]
To limit the screen area available for windows, issue this action.
- get/set <Window ID> state [<String>]
State changes are accomplished using this command. Possible values are minimized, maximized, unmaximized, and fullscreen.
HOTKEYS
The mouse works as most would expect to resize, change which window has focus, and to maximize, minimize, or possibly shade windows. It is important to remember that this window manager only allows a handful of keyboard hotkeys to manipulate windows which will be covered below.
Standard Hotkeys
- Meta (Home)
Pressing this key will bring the supervisor window into focus.
- Meta+R
This key combination will display a window allowing you to execute any desired command.
- Alt+Tab
Shows a window containing all the running applications allowing you to switch the focus to the next task in the list.
- Shift+Alt+Tab
Shows the same Alt+Tab window of running applications, but instead of cycling forward, this key combination selects the previous task.
Window Hotkeys
- Ctrl+Up
Moves the focused window further up the screen.
- Ctrl+Down
Moves the focused window further down the screen.
- Ctrl+Left
Moves the focused window further to the left.
- Ctrl+Right
Moves the focused window further to the right.
- Ctrl+PageUp
Changes the windows status to being the foreground.
- Ctrl+PageDown
Changes the windows status to being background.
- Ctrl+Alt+Up
Increases the height of the focused window.
- Ctrl+Alt+Down
Decreases the height of the focused window.
- Ctrl+Alt+Right
Increases the width of the focused window.
- Ctrl+Alt+Left
Decreases the width of the focused window.
- Ctrl+Alt+PageUp
Increases the width and height of the focused window.
- Ctrl+Alt+PageDown
Decreases the width and height of the focused window.
- Ctrl+Alt+Home
Changes the window state to being maximized.
- Ctrl+Alt+Enter
Changes the window state to being unmaxized.
- Ctrl+Alt+Delete
Changes the window state to being iconized.
- Ctrl+Alt+End or ESC
Causes the currently focused application to close.
Desktop Hotkeys
- Meta+Tab
This will advance to the next desktop in the list.
- Meta+Shift+Tab
This will cycle to the previous desktop in the list.
- Meta+F#
This will take you to a specific desktop.