5. Config file
========= 1. Description ============
Nwm is a simple program that will let you run an x server and then a generic
window manager (or other executable) into it. This software is a replacement
of selectwm of witch this software would be an extension. Infact selectwm
could not run different kind of window manager on different kind of server x.
With selectwm you should before run xinit (xorg-x11), but i.e. you could not
run xgl too. These because selectwm is designed to starts within .xinitrc,
this mean a fixed x server: xorg-x11. While with nwm read lines from a config
file, and then show them or in a text mode, or with ncurses library.
When user select one line, nwm executes command part contained into that
lines. In this way you're not obliged to put nwm into .xinitrc, so nwm is not
dependent from a fixed server.
This design feature has allowed me to run successfully:
fluxbox with xorg,
kde with xorg,
kde with xgl.
========= 2. Requirements ============
To run Selectwm you need:
- C compiler (i used only gcc-3.4.6)
- A generic server x (tested only with: xgl and xorg)
- ncurses >= 5.5-r2
- imake (used to create standard Makefile)
I know that it works on my Linux Box (i686) with Gentoo (it shouldn't be
too difficult to run it on another box. If it doesn't work for you, mail me,
========= 3. Build ============
To build nwm type (if you're reading this you're already into nwm main
1. cd src/
========= 4. Run ============
To run nwm simply:
Usually you may want that binary files resides into your home folder so you
have to copy it there:
cp nwm $HOME
Now you have to run it typing from you home directory:
don't forget "./".
Else you can put nwm binary file to system wide binary directory
Then gives to binary file right permissions(as root do):
1. cp nwm /usr/bin/
2. cd /usr/bin
3. chown root:root nwm
4. chmod a+x nwm
Now you'll be able to run it without prefixing "./". As default nwm will looks
at user home directory to find a config file named ".nwm", but you can change
this behaviour with -c option.
========= 5. Config file ============
As default nwm will looks at ".nwm" file as default config file. You can save
your config file into your home directory with that name, so you'll be able to
run nwm with:
./nwm #without -c params.
At this point you must not modify your .xinitrc. You has only to create a
valid config file and use nwm.
Into configuration file you should add a description and the command that
must be executed, into .selectwmrc fashion. But no timeout are still supported.
Each row must contain:
<description>=<server x>,<window manager>
Last row will run a script that contains a custom fluxbox version. In this
way you can set up further other tool to run with fluxbox.
Config File Examples:
to run fluxbox into xorg server
to run kde into xorg server
to run kde into xgl
to run your fluxbox script into xorg server.
Fluxbox script may contains some command sequence like:
/usr/bin/gkrellm2 -w &
Last row is needed, while previous are optional.
Nwm is realeased with a default config file. You can look at:
========= 6. Help ============
If you run nwm with -m | --text-mode option you does not use ncurses library
else nwm will automatically use them.
If you need to see all nwm options you can type:
or you can type:
you'll see following main options:
You can also use a few options:
-c, --config <cfg> select the config file (default .nwm)
-h, --help prints this message
-m, --text-mode disable ncurses
-t, --tty-number <tty> will run your selection on different display then
-v, --version prints version information
========= 7. Contacts ============
For any problems feel free to send me a mail at firstname.lastname@example.org.
Thanks for use nwm.