Choose Window Manager PDF Print E-mail

Chapter 2: Choose Window Manager

Fluxbox Window Manager


The Fluxbox X11 Window Manager is used to configure the graphical windows and the environment that DSL begins with by default. In other words, when you turn on a computer the working area that is viewable is the Desktop, which involves a great number of programs creating not just a work area but an environment. The environment consists of small programs that work together to create the Desktop. All graphical interfaces have an environment, Windows, Mac or Linux. Understanding the purpose and design of the Desktop is an important aspect of employing the Desktop to work for you.

discuss Discuss DSL Window Managers
live training Live Window Manager Training Class

Here is a picture of a DSL Desktop running the Fluxbox window manager.

When you view the the desktop you will see several tools that will help you navigate the computer and start programs. In the upper left corner you see a series of icons which represent programs that you can start. At the bottom of the screen you will see a workspace panel to navigate different environments. In the upper right you will see system monitoring on the desktop. This will help you understand what is happening with your computer.

Desktop Icons

Desktops provide icons to create better intuitive choices for users and as a quick link to programs or files that are used frequently. Desktop icons also provide access to drives or directories. This feature is highly configurable.

Understanding the Desktop Icons

The default location of icons is to group them in the upper left hand corner of the desktop.






The Xterminal provides a command line interface to talk to the operating system using text commands. When you select the Xterminal icon you will see a screen similar to the one below.


Sylpheed is a mail client. If you are connected to the Internet either with a network that is connected to a router or to a modem you will be able to use this mail client to send and receive mail.






Beaver is a text editor which provides a basic method of writing text. Beaver is not used to insert images or do anything beyond just a basic text file. When you save a file in Beaver if you want to read it on another computer be sure to give it an extension of .txt or .rtf. Either of these extensions will work on any computer whether it is Windows or Linux.


You can see that Beaver only has basic features but it is easy to use.

The DSLpanel is a tool that opens so you can configure many aspects of your computer like a network card, printer, modem or even wireless.


Backup/Restore – back up data to an external source

Printer Setup – setup the specific printer you have
Date/Time – adjust the date and time

Dialup – setup your modem

PPPOE – looks for a connection to ADSL or Cable

Help – basic help menu

Netcardconfig – setup your network card for a network connection

Wlanconfig – wireless card setup

Ndiswrapper – setup for wireless network

Iwconfig – wireless networking setup

Prism2 – type of wireless card

Xvesa – reconfigure monitor and resolution settings

Backgrounds – select a new background

Keyboard – adjust keyboard choices

PCMCIA – manage PCMCIA cards for laptops

Floppy Tool – create a boot floppy

Select Mirror – locate a server to download MyDSL extensions

System Stats – review system information

Printing/lpd – use printer that is connected as print server for other computers

BetaFTP – ftp server

MonkeyWeb – web server

SSH server – allow ssh connections as a server

DHCP client – connect to a server using DHCP

Cron – ability to run cron scripts


firefox
Firefox is a web browser that provides you with all of the features you would want on the Internet. You can use Firefox as a browser of local files as well.






Dillo is a web browser that is very fast but lacks all of the features that Firefox has. When you login you will see Dillo will take you to an information page. Dillo is a very lightweight browser used for general purposes.




AxyFTP the FTP client will allow you to access and download files from FTP servers. The interface allows you to transfer files from a remote location to your computer. It will also allow you to transfer files from your computer to another server like a web server.




Notice the two windows that represent the Local System and the Remote System. This then provides a way to graphically transfer file by selecting a file and hitting the arrow key to move it to the other window.


Emelfm is a way to view the directory. When you double click it opens up to show you the contents of your home directory.



Here is half the window when it opens. You can select a file and edit, copy, move, rename or delete. If you need a PDF format you can create that from this window and the links in the center.


The command MkDir will create a directory. Note that files that begin with a leading “.” are hidden files that you do not normally see. These hidden files may viewed in emelFM by choosing to view hidden files.

In the right hand side of the program you will see directories in the file system.

These windows are two separate sections of the file system so that you will be able to move files from one location to another using the tool buttons in the center.




XMMS provides a way to listen to MP3, WAV and other sound formats or CDs.





Rdesktop is a client that is used to connect to a Windows NT Terminal Server and Windows 200/2003 Terminal Services. It uses RDP (Remote Desktop Protocol) to connect much like the Citrix ICA client.



Rdesktop will require that it is running on a server and that you know the IP Address of that server.

VNCviewer is a virtual network connection that allows you to connect to Windows, Mac or Linux desktops and run them remotely just as if you were on the machine.




You will need to know the IP Address of the computer and the desktop number, here the example is :5.


Ted provides a word processor that will allow you to format the page, paragraphs and text as well as insert images. If you would like to save so you can read on a Windows machine, save the file with the .rtf extension. For example the file would look like this: mypaper.rtf.



When you need a spreadsheet program Siag will meet most of your needs. It functions just like any spreadsheet program using cells and formulas to build sheets of information.


In the example below you will see that Siag looks and feels just like any other spreadsheet program.



Xpdf


The pdf format is becoming more popular and many files on the Internet will have a PDF format. Xpdf allows you to read any PDF file that you will find.


The program Xpaint will provide a lot of enjoyment in creating your own images using the features of this basic program.


The interface is easy to use and each icon represents a tool that can be used in working with created images.


The xZGV program is an image viewer. Open the program and then select an image in your home directory and it can then be viewed using the program


This gives you a quick overview of the icons that are installed by default. As you install additional programs you may see additional icons appear, but not always.


Modify or Create Your Own Icons on the Desktop

There is a hidden file that allows you to modify the desktop icons. You can modify the ones that are there and what they look like. To see the hidden file open Emelfm and in the upper left hand side of the window you will see an H. Click on this H that will allow you to view hidden files.



You will see a lot of files. The one you are looking for is called .xtdesktop. Notice that in Linux hidden files are always indicated with a leading period. For each icon on the desktop in this file you will see two files.


The first file is a .ink which looks like this:


This file lists the command to start the program. In this example:

/opt/audacity/start-audacity


It lists the Caption: Audacity which you can change by altering the text. It also lists the Icon. The X: and Y: are coordinates on the desktop where the icon will always appear.



You can copy this file to create your own or modify the existing ones. The second file listed in .xtdesktop is the .png or .gif that is used as an image for the icon. In order to see any changes the Window Manager must restart. If you right click and choose Window Manager --> Restart you will see your changes. Basically, the user may create an icon for any drive, file, folder or program on the Desktop.

Configuring Desktop Icons


There may come a time when you need to configure your own icons on the desktop. The process is not that hard, but there are a few things that may help you in the process.

Icon Placement on Desktop

The X:Y coordinates are important to know unless you are really interested in a mess. Remember Geometry in High School, well that's not it. Each of the icons has a X and a Y coordinate. If you think in terms of a spreadsheet the Y is a row and the X is a column, easier than Geometry. In the example, the X and Y coordinates for 20 icons is listed. Note: this is for setting icons up in the upper left of the screen.


X:8 - Y:5

X:73 - Y:5

X:138 - Y:5

X:203 - Y:5

X:8 - Y:81

X:73 - Y:81

X:138 - Y:81

X:203 - Y:81

X:8 - Y:157

X:73 - Y:157

X:138 - Y:157

X:203 - Y:157

X:8 - Y:233

X:73 - Y:233

X:138 - Y:233

X:203 - Y:233

X:8 - Y:309

X:73 - Y:309

X:138 - Y:309

X:203 - Y:309


As icons are created and the configuration for each program is designed this chart will be a handy reference. Here is a visual reference for the icons.
Note that this is not the standard setup as there are several extra icons.

Nmapfe will be the example for how to create a program link on the desktop.


A link to a program will need to be created, it is important to get an idea on how to create some kind of icon to represent that program. In the lower right hand corner of the icons listed is an icon for the the program nmapfe. Nmapfe is a network program that is a great tool for scanning your own network to search for vulnerabilities. The first step to making this program work is to download the Mydsl extension from a mirror. You will need to download the nmap.dsl and the nmapFE-0.2.54.dsl. Download both of these programs and save them in /home/dsl, or what works best for you. Next open emelFM, highlight nmap.dsl, and then click the myDSL button on emelFM. This will install the first program. Then repeat the process for nmapFE-0.2.54.dsl. Open the program once they are installed with the command nmapfe from a terminal. The program will open, now take a screen shot using Gimp or another program.

Once you have taken a screen shot, select the scale tool. The Scale Tool, which is located in the Gimp Toolbox, allows users to scale images down, or blow up images larger than their original size.



This information box displays the original height and width of the image, the current height and width of the image, and the Scale Ratio, which shows the X,Y coordinates.

The size of this image in the example is measured in pixels. This can be changed to other units as well simply by clicking the drop down arrow on the right.

Finally, when the image size has been modified to exactly the desired size, click “Scale” to view the new image.

Scale the image form nmapFE to 50x50.

Save the image with a descriptive name, like Nmap.png. The image, which is now scaled, should be saved as a .png and saved into the .xtdesktop/ directory. Note that the directory is a hidden directory in /home/dsl, notice the “.” before the name. Turn on the ability to view hidden files in emelFM by clicking the “H” in the upper left hand corner.


Create Program Link

Each of the icons is link to a command that executes the program when it is clicked. If you right click one of the icons and select properties you will see an example of how to setup an icon on the desktop. The example listed below shows the core information in a link.. The easiest method is to open one of these icons from the .xtdesktop directory by right clicking and choosing properties.


table Icon

Type: Program

Caption: NMap

Command: nmapfe

Icon: .xtdesktop/nm2.png

X: 203

Y: 309

end


The icon and link start are enclosed in the “table icon” and the “end” . “Type “ signifies the kind of icon link that is created, “Program” for example. The “Caption:” is the text that is listed under the icon on the desktop. The “Command:” is critical because this is what will launch the program that is connected with the icon. In the example, nampfe is the command to launch nampFE. Two important issues are relevant to placing a command in the “Command:” line. First, where in the file system, is the command? For example, if you wanted to start a program like nmapfe, how do you know where it is? One way to find the location of a program is to use the “which” command. To find nmapfe just use this command:


which nampfe

/usr/bin/nmapfe



This provides the exact location. This makes sense, except why is the command listed as nmapfe instead of /usr/bin/nmapfe? The answer is that as a user on the system, the path for each regular user allows automatically to look in two directories for commands:


/usr/bin

and

/bin


The second is issue is who you are when you click on the icon. Any commands in /bin or /usr/bin directories will be in any user's PATH so they will not need to enter the whole path for the command. /bin and /usr/bin contain commands that both root and users will use. For example: /bin/mount is a command that root will mount directories but users will use this command to list mounted directories.


The root user is intended to run many commands that are not available to other users of the operating system. Here are several directories that are intended only for the root user:

/sbin - This directory contains commands for modifying disk partitions (fdisk), changing boot procedures (lilo), and changing system states (init).

/usr/sbin - This directory has commands for managing user accounts (adduser), configuring the mouse(mouseconfig) or keyboard (kbdconfig). Most daemon processes are also in this directory.

If you will be running a program as root, then you need to be root when you click on the link. If you will do a sudo su, which means that you may be a regular user and then become root, it is important to put the full path in the command.

The “Icon:” line is the path to the icon that you would like to use. It makes sense to save your icon that you will use in the .xtdesktop directory, remember this is a hidden folder.

Change Wallpaper

The X and Y coordinates have been covered so you end up with a new icon on the desktop that is a quick link to a program that you may use all of the time.

Change Backgrounds

Changing backgrounds is easy. Right click the desktop select Desktop and then Wallpapers.

Wallpaper.lua now has a color chooser for background color.


Now choose the Color option and you may select a color background.


For example this desktop was created for a science department.


his image is from a Pentium II 166MHz IBM Thinkpad that can run OpenOffice, Gimp, Audacity and Windows XP while in DSL.

Menu

The Menu is the list of programs that are available on the system. Right click the desktop to see the menu. Menus are developed to give users quick access to programs by creating logical groups for programs.


You also see in the example that the menu is divided into categories which makes it easier for the user to find the programs that they need fast.


For example most distributions create groups for Office products, Internet programs, graphics, multimedia, etc. Those programs that are useful in each category are collected into these groups.


This example shows the Apps category. Notice that the menu has

as many as three levels.




Menus can float, that means that a user can open the menu and then use the mouse to grab the top bar and pull the menu apart in sections. Here is an example of a floating menu.



Turn off menus by right clicking on the top bar.

Remember that only a small portion of the programs actually available are listed in the Menu. Hundreds of programs that can be run from the terminal are not show here like cal. Open a terminal and type the command cal and you have a calendar program for example.


Modify the Menu

If you decide to modify the menu for Fluxbox it is located in the .fluxbox folder which is a hidden folder. The first thing to do if you want to modify the menu is to create a backup...just in case. At a termina type this command:

cp /home/dsl/.fluxbox/menu /home/dsl/.fluxbox/menu_bk

Note that .fluxbox is a hidden directory. Appendix B is a listing of the complete menu so you can use that as a reference.

Here is a section of the menu so that you can see who it is put together. A simple menu created for a science section is listed below the games section and an explanation follows.

 [submenu] (Games) {}
[exec] (xTris ) {/usr/games/xtris -flashy}
/usr/games/tetrinet DamnSmall localhost }
[submenu] (Ace of Penguins) {}
[exec] (Canfield) {ace_canfield}
[exec] (Freecell) {ace_freecell}
[exec] (Golf) {ace_golf}
[exec] (Mastermind) {ace_mastermind}
[exec] (Minesweeper) {ace_minesweeper}
[exec] (Pegged) {ace_pegged}
[exec] (Solitaire) {ace_solitaire}
[exec] (Taipedit) {ace_taipedit}
[exec] (Taipei) {ace_taipei}
[exec] (Thornq) {ace_thornq}
[end]

[submenu] (Science) {}
[exec] (Help Menu ) {dillo file:/usr/share/doc/dsl/help.html}
[submenu] (Science Curriculum) {}
[exec] (School Site) {/usr/local/bin/firefox http://noxonschools.com}
[exec] (Online Class) {ssh -X -f m}
[end]

As you compare the two menus you can see that there are basic components that are important to the configuration.

[submenu] (Science) {}
This is not only a submenu item but it is also a title of the submenu. Note that the {} is empty indicating ensuing that a click on the heading will do nothing, it is only text.

[exec] (Help Menu) {dillo file:/usr/share/doc/dsl/help.html}
The [exec] is an executable indicator. When you click on the text (Help Menu) the dillo browser will execute and the user will be sent to the URL indicated. This enables you to configure Dillo to be used as an in house Help Menu if you are sharing the desktop.

[submenu] (Science Curriculum) {}
This provides an addtional submenu. These submenus are basically unlimited. This submenu explores the Science Curriculum options.
[exec] (School Site) {/usr/local/bin/firefox http://noxnschools.com}

In this example firefox is used locally and connects to a school website automatically when started. This brings all community members to a common site to share information and training online.

Panel

The Panel is a rectangular block that contains open programs, workspaces and the date/time. Basically, the Panel is a tool to provide resources for you the user.

This example, which by default is located in the bottom center of the page, shows that the user is in Workspace 1, that they have two programs open in this workspace (Dillo and Bash) and it shows the time.

Workspaces

Workspaces allow you to have four separate desktops, each with different programs running. This is a convenience factor that many users like. Often people will run a web browser in one desktop, their work project in another and a game in the third. You get the idea, configure the desktops how they will be most usable for you. By default there are 4 workspaces numbered 1 to 4. When you right click the Panel you will have the option to rename the current Workspace.

Styles

Styles which change the looks of the background, windows, icons and text are available by right clicking the desktop and selecting desktop/styles. A list of styles will show you what is available. Make a selection and the style will change.


Focus

When you have a number of windows open on the desktop you will only be able to interact from the keyboard with one window at a time, this is called focus. Focus is the selection of a window in order to interact with the program that is represented in the window.


If you choose Desktop/Configuration and Focus Model this window will open that will allow you to adjust how a window receives focus. By default you must click on a window with the mouse for it receive focus. You can use Sloppy Focus which will achieve focus by moving your mouse over a window. You can easily experiment with this by selecting different focus models, opening several windows and watch how focus is achieved. Sloppy focus gets some in trouble because they do not recognize that they have selected a window and they start typing with problematic results.

Transparent XShell

Version 1.3 brought the transparent shell which is a very nice feature. This is a XShell interface that you can see through instead of having a solid color. Here you can see that the transparent XShell is easily selected from the menu.

There are other options which give you a Light or Dark XShell depending on what is easiest for you to use. The Root Access XShell is for issuing commands as root.

Illustration 1: Transparent XShell

Here is an example of the XShell as you see through it to view the desktop.

The Slit

The Slit was removed in version 2 and replaced with a desktop version. The Slit was originally a Blackbox feature that was inherited into Fluxbox, thus DSL. A small version of the Slit now provides the audio controls and allows users to mount partitions form the desktop.


The Slit is not only unique but very helpful is the vertical bar that provides information about how your computer is working. This bar is divided into six sections:


Network Usage – indicates what percentage of your network is being used

CPU Usage – indicates what percentage of your CPU is used

Memory – the top line shows and indicator in text MEM 515264 of total RAM

- the second line is a visual bar to indicate percent of used RAM

- the third line indicates percent free

- SWAP shows how big your SWAP file is

- the bottom line in this box is the percentage of SWAP used


Drives – this indicates Floppy / CDROM or USB Drives

Workspaces – the four squares represent workspaces

Sound - the bottom section provides a way to configure and adjust sound

- the bottom scroll bar allows you to shift more focus on left and right

speakers

Sound area allows you to configure sound using the small arrows that you see. When you select an arrow a sound level will appear on the desktop. This will allow you to adjust, different areas of sound:


Master Volume Level

PCM Wave

CD Volume

Microphone Volume

Input Gain

Line In

Phone Input and Output

Video Input and Output


Desktop Stats

Version 2 brought another innovative feature to DSL, and that is the desktop see through version of the Slit.


The new feature shows network usage a the top, traffic up and down. It shows CPU usage, RAM, Swap, the / directory, /home, uptime, if you are on battery, Linux kernel and hostname with IP Address. These features are nice and actually provide more desktop space.

Tools

There has been a lot of interest in the installation of DSL on Pendrives, CFDisks, and rebuilding DSL with your own tweaks. Now all of these options are available from the Menu. By selecting Apps/Tools this window is shown that will allow you to make your choices.

Mirror Selector – select the DSL mirror to download extensions
myDSL Browser – allows you to review extensions you may want to download and install
Net MAN – find MAN pages online to help with problems

emelFM – file manager

Midnight Commander – file manager that can run as a user or root

Find – tool to find a file

Upgrade to GNU Utils

Enable Apt – apt allows you to download and install applications easily

Synaptic – allows you to add applications from a database online

Install to Hard drive – install DSL to the hard drive

Frugal Install – install compressed image

Install to USB Pendrive – install DSL to a Pendrive– installation is read only

Make a Boot Floppy

CD remaster – script that allows you to rebuild DSL the way YOU want
CD Burn App – burn a CD with DSL
Editres – a tool that edits the X toolkit widget resources
X Window Snapshot – take a snapshot of the X Window (screen shot)
Xkill – program that allows you to kill a rogue application

JWM Window Manager

The JWM Window Manger of Joe's Window Manager is a minimalistic, but useful window manager. It is included in the DSL distribution. The real value of JWM is that is uses so few resources that the rest of the computer resources can be used for programs and it provides a way to create a very small footprint for embedded devices, USB Pendrives, etc.


History of JWM

JWM was first released in 2003 by Joe Wingbermuehle. JWM was written in C as a X11 Window Manager. It has the capability to only use Xlib but it can also use these libraries if they are available.

libXext for the shape extension

libXext for the render extension

libXinerama for Xinerama support

libXpm for XPM icons

libpng for PNG icons

libxft for antialiased and true type fonts

libfribidi for right-to-left language support

The current version is 1.5 which can be installed on any Linux distro.

Install JWM

Note that it does not need to be installed on DSL as it is already installed. These notes are for options in installing on other Linux systems.

Download the file jwm-1.5.tar.bz2. Uncompress the file:

bzip2 -d jwm-1.5.tar.bz2

Now untar the file:

tar xvf jwm-1.5.tar

This will create a directory that you need to enter:

cd jwm-1.5

Run ./configure or review options with ./configure –help.

./configure

Now run make and them make install.

make

make install

This will complete the installation.

When you are using DSL it is easy to switch to JWM by right clicking the Desktop and selecting JWM. The Desktop will restart and JWM will be running. Once you are running JWM you can start choosing the applications that you will build the Desktop around.

Configuring Desktop Icons

The arrangement of the Desktop icons is an important feature that you will want to consider. The default X and Y coordinates are listed below.


Icon Placement on Desktop

The X:Y coordinates are important to know unless you are really interested in a mess. Remember Geometry in High School, well that's not it. Each of the icons has a X and a Y coordinate. If you think in terms of a spreadsheet the Y is a row and the X is a column, easier than Geometry. In the example, the X and Y coordinates for 20 icons is listed. Note: this is for setting icons up in the upper left of the screen.


X:8 - Y:5

X:73 - Y:5

X:138 - Y:5

X:203 - Y:5

X:8 - Y:81

X:73 - Y:81

X:138 - Y:81

X:203 - Y:81

X:8 - Y:157

X:73 - Y:157

X:138 - Y:157

X:203 - Y:157

X:8 - Y:233

X:73 - Y:233

X:138 - Y:233

X:203 - Y:233

X:8 - Y:309

X:73 - Y:309

X:138 - Y:309

X:203 - Y:309

As icons are created and the configuration for each program is designed this chart will be a handy reference. Here is a visual reference for the icons.

This example shows the default icons used in DSL on the JWM Desktop.

The DSL Icon Tool shows four tabs at the bottom that will help setup the Desktop icons. Notice the options on the first tab allow you to turn on or off the icons and choose between single click and double click.

The layout tab provides a way to configure how the icons are positioned on the Desktop. The Auto Arrange option sets the icons in the default positions or allows you to use the Columns,Top Margin, Horizontal and Vertical settings to place the icons.

Margins are important to think about because if you are not careful the Desktop will end up as a mess.

Icon Tool Configuration

If the X/Y Coordinates are used you will need to set those up manually, use the chart as a reference.

Below is an example of the Desktop set to have one column of icons. You have the options to set them anywhere that is usable.

If you choose the Add tab you have the option to enter the information for the program you will add. This includes choosing an icon, placing text under the icon to describe the program and entering X/Y coordinates if you choose to set your own coordinates. Set it up and then click OK

The Remove tab provides a way to remove the icons that you do not need from the Desktop.

Highlight the icon you would like to remove and then choose OK. You may have to reboot to see the changes.

Icon Creation

A link to a program will need to be created, it is important to get an idea on how to create some kind of icon to represent that program. One way is to obtain images that are not copyrighted so that you can use them on the Desktop. The icons should be illustrative of the program they represent so that users have an intuitive sense of what the program is from the icon.

This icon represents the note taking program Beaver. This Desktop icon is more intuitive for users than a picture of a Beaver.

The Calculator program may be accessed by clicking on this icon of a calculator. Again, the user will intuitively know this is a calculator.

This icon represents the OpenOffice Writer. Intuitive icons help users in making choices.

These icons have been resized to reflect a similar size on the Desktop. The goal was 50x50.

Using the Gimp Scale Tool, which is located in the Gimp Toolbox, allows users to scale images down, or blow up images larger than their original size. The information box displays the original height and width of the image, the current height and width of the image, and the Scale Ratio, which shows the X,Y coordinates. The size of this image in the example is measured in pixels. This can be changed to other units as well simply by clicking the drop down arrow on the right.

Change the new Width to 50 and then click inside the Height and the proportional change will occur. This is important so you do not distort the image.

Finally, when the image size has been modified to exactly the desired size, click “Scale” to view the new image.

Save the image with a descriptive name. The image, which is now scaled, should be saved as a .png and saved into the .xtdesktop/ directory. Note that the directory is a hidden directory in /home/dsl, notice the “.” before the name. Turn on the ability to view hidden files in emelFM by clicking the “H” in the upper left hand corner.

Once all of the icons have been created. Make a directory to save these icons as they will all need to be transferred to the system that you will install them on. Or, you can move them to the .xtdesktop hidden directory when you are ready. Once the icons have been created you may begin to think about creating the program links both local programs and remote.


Create Local Program Link

Each of the icons is link to a command that executes the program when it is clicked. If you right click one of the icons and select properties you will see an example of how to setup an icon on the desktop. The example listed below shows the core information in a link. The easiest method is to open one of these icons from the .xtdesktop directory by right clicking and choosing properties.


table Icon

Type: Program

Caption: Notes

Command: beaver

Icon: .xtdesktop/notes.png

X: 203

Y: 309

end


The icon and link start are enclosed in the “table icon” and the “end” . “Type “ signifies the kind of icon link that is created, “Program” for example. The “Caption:” is the text that is listed under the icon on the desktop. The “Command:” is critical because this is what will launch the program that is connected with the icon. In the example, beaver is the command to launch Beaver. Two important issues are relevant to placing a command in the “Command:” line. First, where in the file system, is the command? For example, if you wanted to start a program like beaver, how do you know where it is? One way to find the location of a program is to use the “which” command. To find beaver just use this command:


which beaver

/usr/bin/beaver



This provides the exact location. This makes sense, except why is the command listed as beaver instead of /usr/bin/beaver? The answer is that as a user on the system, the path for each regular user allows automatically to look in two directories for commands:


/usr/bin

and

/bin


The second is issue is who you are when you click on the icon. Any commands in /bin or /usr/bin directories will be in any user's PATH so they will not need to enter the whole path for the command. /bin and /usr/bin contain commands that both root and users will use. For example: /bin/mount is a command that root will mount directories but users will use this command to list mounted directories.


The root user is intended to run many commands that are not available to other users of the operating system. Here are several directories that are intended only for the root user:

/sbin - This directory contains commands for modifying disk partitions (fdisk), changing boot procedures (lilo), and changing system states (init).

/usr/sbin - This directory has commands for managing user accounts (adduser), configuring the mouse(mouseconfig) or keyboard (kbdconfig). Most daemon processes are also in this directory.

If you will be running a program as root, then you need to be root when you click on the link. If you will do a sudo su, which means that you may be a regular user and then become root, it is important to put the full path in the command.

The “Icon:” line is the path to the icon that you would like to use. It makes sense to save your icon that you will use in the .xtdesktop directory, remember this is a hidden folder.

The X and Y coordinates have been covered so you end up with a new icon on the desktop that is a quick link to a program that you may use all of the time.



Modify the Menu

The JWM Window Manger provides a menu by right clicking the Desktop or by choosing the DSL icon in the lower left corner of the Desktop. This menu can be modified to meet the needs of a family, school or business. It is easy to create links to local programs as well as links to remote programs that users may need. The menu is found in each user home directory called .jwmrc. Note that this is a hidden file, the “.” preceding the name indicates that. The .jwmrc file is a XML file used for editing.



The menu may be broken down into parts to analyze and make modifications. Any line that starts with <! is a comment, see the example below.


<!-- The focus model (sloppy or click) -->

When changes are made to the menu you will need to restart the Xwindow. This can be done by using CTL+ALT+Backspace which will take you to a terminal window and then type startx for the Xwindow. Before you restart you may want to run


jwm -p


This will confirm that the menu is free of errors.


Here is a description of the tags and what they do. This information is taken from joe's website at http://www.joewing.net/programs/jwm/config.shtml. Used with permission.

JWM Menu


RootMenu

This is the outside tag and supports these attributes:

onroot - determines which buttons on the root window activates the menu. This is a list of integers specifying buttons. The default is 123456789.

height -the height of each menu item in pixels. 0 indicates that the largest menu item will determine the height. The default is 0.

label -the label to display at the top of the menu. The default is JWM.

Labeled -determines if a label appears at the top of the menu. Either true or false. The default is false.

Example:

<RootMenu label="DSL" onroot="3">


RootMenu tag

Menu - this tag creates a submenu item. Any of the tags allowed within the RootMenu tag, including Menu, are allowed within this element. The Menu tag supports the following attributes:

height - the height of each menu item. 0 indicates that the largest menu

item - will determine the height inherited from the parent menu.

label -the label to use for this menu. No default.

Icon -the icon to use for this menu. No default.

labeled – show label appears at the top of the menu. The default is false.

Include - include the contents of a file or the output of a program into the menu structure. The file (or program output) must start with a Menu tag. A file is specified by the text of the tag. If the text starts with exec: then the output of the specified executable is used.


Program - the Program tag provides a way to start external programs. The text of this tag indicates the command used to start the program. The following attributes are supported:

label - the label to display. The default is the text of the tag.

Icon - the icon to use. No default.


Separator - puts a line in the menu allowing menu divisions.


Desktops - this tag adds a desktop menu. This is a menu with a list of desktops which can be selected to change the current desktop. The following attributes are supported:

label - the label to use for the menu. The default is Desktops.

Icon - the icon to use for this menu. No default.


Restart - this tag adds a menu item to restart the window manager. The following attributes are supported:

label - the label to display. The default is Restart.

Icon - the icon to use for this menu. No default.

Exit - this tag adds a menu item to exit the window manager. If text is included in this tag it will be interpreted as a command to run when JWM exits. This can be used to start another window manager. The following attributes are supported:

label - the label to display. The default is Exit.

Icon - the icon to use for this menu. No default.

Confirm - determine if a confirm dialog appears before exiting.



Trays

One or more trays may be created via the Tray tag. This tag supports the following attributes:

autohide - determine if the tray hides itself when not activated. The default is false.

x- the x-coordinate of the tray. This may be negative to indicate an offset from the right of the screen.

y - the y-coordinate of the tray. This may be negative to indicate an offset from the bottom of the screen.

width - the width of the tray. 0 indicates that the tray should compute an optimal width depending on what it contains and the layout. 0 is the default.

height - the height of the tray. 0 indicates that the tray should compute an optimal height depending on what it contains and the layout. 0 is the default.

border - the width of the border. The default is 1. Valid values are between 0 and 32 inclusive.

layer - the layer of the tray. The default is 8. Valid values are between 0 and 12 inclusive.

layout - the layout of the tray. The default is horizontal. Possible values are horizontal and vertical.

halign- the horizontal alignment of the tray. The default is fixed. Possible values are fixed, left, center, and right.

valign -the vertical alignment of the tray. The default is fixed. Possible values are fixed, top, center, and bottom.


Within the Tray tag the following tags are supported:


Clock - add a clock to the tray. The text of this tag may specify a command to run when the clock is clicked. This tag supports the following attributes:

format -the clock format. See strftime(3) for more information.

width - the width to use. 0 indicates that the width should be determined from the tray and the font used. The default is 0.

height - the height to use. 0 indicates that the height should be determined from the tray and the font used. The default is 0.

Dock - add a dock for system notifications. This can be used by those programs that use the _NET_SYSTEM_TRAY_Sn selection. The size of the Dock is dynamic based on the size of the tray and the number of items contained. Only one Dock is allowed per instance of JWM.

Pager - add a pager to the tray. This tag supports the following attributes:

width- width of the pager. 0 indicates that the width should be determined from the tray. The default is 0.

height -height of the pager. 0 indicates that the height should be determined from the tray. The default is 0.

Swallow - swallow a program into the tray. The text of this tag gives the command to run. This tag supports the following attributes:

name - name of the program to swallow. This attribute is required since this is how JWM finds the program to swallow.

width - width of the swallowed program. 0 indicates that the width should be determined from the tray and size requested from the program. The default is 0.

height -height of the swallowed program. 0 indicates that the height should be determined from the tray and size requested from the program. The default is 0.

TaskList - add a task list to the tray. This tag supports the following attribute:

maxwidth - maximum width of an item in the task list. 0 indicates no maximum. The default is 0.

TrayButton - add a button to the tray. This tag supports the following attributes:

label - the label to display.

Icon - the icon to use for this menu. No default.

Popup - text to display in a popup. This defaults to the label. The text of this tag determines what the button does:

exec:program - Execute program.

Showdesktop - mnimize all windows on the current desktop.

Root - show the root menu. This is the default action.


Includes

Other configuration files may be included under the JWM tag via the Include tag. The text of this tag specifies the location of additional configuration file. The path may be relative to the location JWM was started or be an absolute path. The file at that location is read. The format of the configuration file is the same as the main configuration file.


Group Settings

Program groups allow one to specify options which apply to a group of programs by their name and/or class. A program group is created with the Group tag. As many program groups can be created as desired. Within the Group tag the following tags are supported.

Name - the title of a program to match to be in this group. This field is case sensitive. A wild card, "*" may be used.

Class - the window class for a program to match to be in this group. This field is case sensitive. A wild card, "*" may be used.

Option - option for this group. The table below lists possible options.


Option Description

border Enables the border on windows in this group.

desktop:# The desktop on which windows in this group will be started.

icon:xpm.xpm The icon to be used for windows in this group.

layer:# The layer on which windows in this group will be started.

maximized Make windows in this group maximized.

minimized Make windows in this group minimized.

noborder Disables the border for windows in this group.

nolist Causes the