Choose Window Manager |
Desktop Training - DSL | ||||||||||||||||||||||||||||||||||||||||||||
Chapter 2: Choose Window ManagerFluxbox Window ManagerThe 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. 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 IconsDesktops 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.
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 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
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 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
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 IconsThere 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.
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. Nmapfe will be the example for how to create a program link on the desktop.
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 BackgroundsChanging 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.
t
This image is from a Pentium II 166MHz IBM Thinkpad that can run OpenOffice, Gimp, Audacity and Windows XP while in DSL. MenuThe 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 MenuIf 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) {}
PanelThe 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.
WorkspacesWorkspaces 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. StylesStyles 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. FocusWhen 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 XShellVersion 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 StatsVersion 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 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
JWM Window ManagerThe 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 JWMJWM 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 JWMNote 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 IconsThe 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 DesktopThe 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.
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 CreationA 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 LinkEach 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 MenuThe 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
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. TraysOne 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. IncludesOther 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 SettingsProgram 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 Descriptionborder 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 tray to ignore windows in this group. notitle Disables the title bar for windows in this group. pignore Ignore program-specified initial position. shaded Make windows in this group shaded. sticky Make windows in this group sticky. title Enables the title bar for windows in this group. Border StyleThe Border tag controls the look of window borders. Within this tag the following tags are supported. Font - font used for title bars. See Fonts. Width - width of window borders in pixels. The default is 5, the minimum is 3, and the maximum is 32. Height - height of window title bars in pixels. The default is 21, the minimum is 2, and the maximum is 64. Foreground - color of text on inactive title bars. See Colors. Background - border background color for inactive borders. See Colors. ActiveForeground - color of text on active title bars. See Colors. ActiveBackground - border background color for active borders. See Colors. Clock StyleThe ClockStyle tag controls the look of clocks on the tray. Within this tag the following tags are supported: Font - font to use. See Fonts. Background - background color. See Colors. Foreground -text color. See Colors. Tray StyleThe TrayStyle tag controls the look of the tray. Within this tag the following tags are supported: Font - default tray font. See Fonts. Background - default background color. See Colors. Foreground - default foreground color. See Colors. Task List StyleThe TaskListStyle tag controls the look of task lists. This tag supports the following attribute: insert - determines how new items are added to the task list. Valid options are left and right. The default is right. Within this tag the following tags are supported: Font - font used for program names. See Fonts. Foreground - foreground color of the task list. See Colors. Background -background color of the task list. See Colors. ActiveForeground - foreground color of an active item on the task list. See Colors. ActiveBackground - background color of an active item on the task list. See Colors. Pager StyleThe PagerStyle tag controls the look of pagers on the tray. Within this tag, the following tags are supported. Outline -color of the outline around windows shown in the pager. See Colors. Foreground -color of inactive windows shown in the pager. See Colors. Background - background of inactive desktops shown in the pager. See Colors. ActiveForeground -color of active windows shown in the pager. See Colors. ActiveBackground -color of active desktops shown in the pager. See Colors. Menu StyleThe MenuStyle tag controls the look of menus in JWM (this includes the root menu and window menus). Within this tag the following tags are supported: Font - font used on menus. See Fonts. Foreground - text color of inactive menu items. See Colors. Background - background color of inactive menu items. See Colors. ActiveForeground - text color of active menu items. See Colors. ActiveBackground - background color of active menu items. See Colors. Popup StyleThe PopupStyle tag controls the look of popup windows such as those shown when the mouse sits over a task list item. This tag supports the following attributes: enabled - determine if popups are enabled. Possible values are true and false. The default is true. delay - delay in milliseconds before popups activate. The default is 2000. Within this tag the following tags are supported: Font - font to use. See Fonts. Outline -outline color of the window. See Colors. Foreground - text color. See Colors. Background -background color of the window. See Colors. FontsFonts for various parts of JWM are specified within a Font tag. The text of this tag determines the font to use. This can either be a standard X font string or, if compiled with XFT support, an XFT font string. ColorsColors for various parts of JWM are specified within specific tags (described above). Colors may either be hex triplets in RGB format (for example, #FF0000 is red) or by a name recognized by the X server. IconsIcons for windows that don't supply an icon via the _NET_WM_ICON hint are located by searching the icon search path(s) for an icon whose name (minus the ".xpm" or ".png" extension) matches the instance name of the window as returned in the WM_CLASS hint. If this lookup fails, a default icon is supplied. This icon will be displayed for the window on it's title bar and on the task list. Icons that are not an appropriate size will be scaled. Square icons work best. For menu items, the icon path is searched for a match. The icon specified for a menu item must be the exact name of the icon file with extension. If no match is found, a blank area will appear where the icon should appear. If an icon is not specified for any menu item in a menu, no space will be allocated for icons. Icon properties are contained within the Icons tag. Within this tag, zero or more IconPath tags may be specified. The text of this tag is assumed to be an absolute directory path to a directory containing XPM and/or PNG icons. When searching for icons, if multiple paths are provided, the paths will be searched in order until a match is made. Note that icon, PNG, and XPM support are compile-time options. Key BindingsKeyboard bindings in JWM are controlled by the configuration file. For example: <?xml version="1.0"?> <JWM> . . . <Key mask="mask" key="key">action</Key> </JWM> Here mask specifies the modifier keys that must be held to enable this action and keyspecifies the key that is to be pressed. keycode may be specified instead of key if the key code is known but the key is not (or there is no symbol for the key code). action is the action performed when this combination is pressed. The mask section is optional. It can contain any number of the following values: A - Alt C - Control S - Shift H - Hyper M - Meta P - Super The key section must contain a value key string for XStringToKeysym. These values are usually what one would expect (for example, the escape key is called "Escape"). Finally, the action is the action to be performed when a key is pressed. Valid actions are: Value Description Grabbed? up Key to move up. No down Key to move down. No right Key to move right. No left Key to move left. No escape Key to stop a move/resize or exit a menu. No select Key to make a selection. No next Key to move to the next window in the task list. Yes nextstacked Key to move to the next window in the stacking order. Yes close Key to close a window. Yes miminize Key to minimize a window. Yes maximize Key to maximize a window. Yes shade Key to shade a window. Yes move Key to move a window. Yes resize Key to resize a window. Yes root Key to show the root menu. Yes window Key to show the window menu for the active window. Yes desktop Key to switch to the next desktop. Yes desktop# Key to switch to a specific desktop. To use this, # must be specified in the key section. Then numbers from 1 to the number of desktops configured are substituted for #. Yes exec:command Key to execute command. Yes restart Key to restart JWM. Yes exit Key to exit JWM. Yes The "grabbed" field indications whether or not the key for a specific action will be intercepted by the window manager. Note that any binding not specified in the configuration file will not be accessible. Further, it is possible to bind multiple key combinations to the same action. Mouse Bindings* Any button on the root window will bring up the root menu. * The right button will show the window menu on the frame. * The left button will resize if on the border or move if in the title bar. * The middle button will move anywhere on the frame. * A double click on the title bar of a window will toggle shading. * The mouse wheel will move through menus when a menu is open, show the root menu when over root, or switch desktops when over the pager. Note: In the future, this may be configurable.
DesktopsVirtual desktops are controlled with the Desktops tag. Within this tag the following attribute is supported: * count The number of virtual desktops. The default is 4. Valid values are between 1 and 8 inclusive. Desktop names may be assigned via the Name tag within the Desktops tag. Other Settings The following tags may also be supplied. Tag Description Default Range DoubleClickDelta The number of pixels the mouse can move during a double click 2 0 - 32 DoubleClickSpeed The number of milliseconds between clicks for a double click 400 1 - 2000 FocusModel The focus model used by JWM sloppy click, sloppy MoveMode The move mode. opaque opaque, outline ResizeMode The resize mode. opaque opaque, outline ShutdownCommand A command to run when JWM shuts down. SnapMode The snap mode. An optional attribute distance specifies the distance for snapping (default is 5, range 1 - 32). border none, screen, border StartupCommand A command to run when JWM starts. <?xml version="1.0"?> <JWM> <!-- jwm menu for Damn Small Linux --> <RootMenu label="DSL" onroot="3"> <Program label="Control Panel">cpanel</Program> <Menu label="File managers" labeled="true"> <Program label="emelFM"> emelfm </Program> <Program label="emelFM as super-user"> sudo /bin/bash -c emelfm </Program> <Program label="Midnight Commander"> /usr/local/bin/mc </Program> <Program label="MC as super-user"> sudo /usr/local/bin/mc </Program> </Menu> <Separator/> <Menu label="Games" labeled="true"> <Program label="Canfield"> ace_canfield </Program> <Program label="Freecell"> ace_freecell </Program> <Program label="Golf"> ace_golf </Program> <Program label="Mastermind"> ace_mastermind </Program> <Program label="Minesweeper"> ace_minesweeper </Program> <Program label="Pegged"> ace_pegged </Program> <Program label="Solitaire"> ace_solitaire </Program> <Program label="Taipedit"> ace_taipedit </Program> <Program label="Taipei"> ace_taipei </Program> <Program label="Thornq"> ace_thornq </Program> <Program label="xTris "> /usr/games/xtris -flashy </Program> </Menu> <Menu label="Multimedia" labeled="true"> <Program label="Dmix Sound Mixer">dmix</Program> <Program label="gPhone">gphone</Program> <Program label="Xmms Audio/MPEG">xmms</Program> <Program label="Xmms Play CD"> xmms /dev/cdrom </Program> <Program label="Xpaint"> /usr/bin/X11/xpaint </Program> <Program label="Xzoom"> xzoom </Program> <Program label="xzgv Image Viewer"> /usr/bin/xzgv </Program> </Menu> <!-- MyDSL Extension Menu Placeholder --> <Menu label="Net" labeled="true"> <Menu label="Browsers"> <Program label="Firefox"> /usr/local/bin/firefox </Program> <Program label="Dillo patched"> dillo file:/usr/share/doc/dsl/getting_started.html </Program> <Program label="Netrik"> aterm +tr -T "Netrik" -e /usr/local/bin/netrik http://www.damnsmalllinux.org</Program> </Menu> <Program label="Net MAN pages"> aterm +tr -T "Internet MAN" -e /usr/local/bin/getman </Program> <Program label="Download Mirror Selector"> dslMirror.lua </Program> <Program label="MyDSL Browser"> /usr/bin/mydslPanel.lua </Program> <Program label="Sylpheed mail client"> sylpheed </Program> <Menu label="AIM/IRC/ICQ"> <Program label="AIM"> aterm +tr -T "nAIM" -e /usr/bin/naim </Program> <Program label="nIRC #DamnSmallLinux"> aterm +tr -T "nIRC" -e /usr/bin/nirc dsl$$ irc.freenode.org </Program> <Program label="ICQ"> aterm +tr -T "nICQ" -e /usr/bin/nicq </Program> </Menu> <Program label="Rdesktop"> /usr/local/bin/rdesktop.lua </Program> <Program label="SMBclient"> /usr/local/bin/smbclient.lua </Program> <Program label="VNCviewer"> /usr/bin/vncviewer </Program> <Program label="Microcom"> aterm +tr -T "Microcom" -e /usr/bin/microcom </Program> <Program label="AxY FTP (GTK+)"> /usr/X11R6/bin/axyftp-gtk </Program> <Program label="FTP"> aterm +tr -T "FTP" -e ftp </Program> <Program label="Telnet"> aterm +tr -T "Telnet" -e telnet </Program> </Menu> <Menu label="Office" labeled="true"> <Program label="Ted Word Processing"> ted </Program> <Program label="Siag Spreadsheet"> /usr/local/bin/siag </Program> <Program label="PDF Viewer"> /usr/bin/xpdf </Program> <Program label="MS Word Viewer"> /usr/local/bin/wordview.lua </Program> <Program label="Postscript Viewer"> /usr/local/bin/gvu </Program> <Program label="Calculator"> calcoo </Program> <Program label="Calendar"> /usr/local/bin/calendar.lua </Program> <Program label="SQLite Book">/usr/local/bin/sqlitebook.pl</Program> <Program label="PIM using Index"> aterm +tr -T "PIM using Index" -e /usr/bin/index </Program> <Program label="Net Dictionary"> aterm +tr -T "Internet Dictionary" -e /usr/local/bin/getword </Program> </Menu>
<Separator/>
<Menu label="Editors"> <Program label="Beaver">beaver</Program> <Program label="Vim">aterm +tr -T "Vim" -e vi</Program> <Program label="Nano">aterm +tr -T "Nano" -e nano-tiny</Program> </Menu> <Menu label="Setup" labeled="true"> <Program label="AddUsers"> sudo /usr/sbin/addusers.lua </Program> <Program label="Date Time"> /usr/local/bin/datetool.lua </Program> <Menu label="Desktop"> <Program label="Icontool">icontool.lua</Program> <Program label="Wallpaper">/usr/local/bin/wallpaper.lua</Program> </Menu> <Program label="DOS swapfile"> aterm +tr -T "Setup DOS Swapfile" -e /usr/sbin/mkdosswapfile </Program> <Program label="Keyboard"> aterm +tr -T "kbdconfig" -e sudo /usr/sbin/kbdconfig </Program> <Menu label="Net Setup"> <Program label="netcardconfig"> aterm +tr -T "Netcardconfig" -e sudo -H /usr/sbin/netcardconfig </Program> <Program label="dial-up PPP"> sudo /usr/sbin/pppdial </Program> <Menu label="DSL/PPPoE"> <Program label="PPPoEconf"> aterm +tr -T "PPPoEconf" -e sudo -H /usr/sbin/pppoeconf </Program> <Program label="Pon"> sudo -H /usr/bin/pon </Program> <Program label="Poff"> sudo -H /usr/bin/poff </Program> </Menu> <Program label="iwconfig"> iwconfig_setup </Program> <Program label="wlcardconfig"> aterm +tr -T "wlcardconfig" -e sudo/usr/sbin/wlcardconfig </Program> <Program label="ndiswrapper"> ndissetup </Program> <Program label="prism2"> prism2_setup </Program> </Menu> <Program label="Xvesa"> /usr/sbin/xvesa.lua </Program> <Program label="X Setup"> aterm +tr -T "X Setup" -e /usr/sbin/xsetup.sh </Program> </Menu> <Menu label="System" labeled="true"> <Program label="Mount Tool"> mount.lua </Program> <Program label="UCI Tool"> ucitool.lua </Program> <Program label="Control Panel"> cpanel </Program> <Program label="Backup/Restore"> sudo /usr/sbin/filetool.lua </Program> <Menu label="Daemons"> <Menu label="ssh"> <Program label="start"> sudo /etc/init.d/ssh start </Program> <Program label="stop"> sudo /etc/init.d/ssh stop </Program> <Program label="restart"> sudo /etc/init.d/ssh restart </Program> <Program label="reload"> sudo /etc/init.d/ssh reload </Program> <Program label="force-reload"> sudo /etc/init.d/ssh force-reload </Program> </Menu> <Menu label="nfs-common"> <Program label="start"> sudo /etc/init.d/nfs-common start </Program> <Program label="stop"> sudo /etc/init.d/nfs-common stop </Program> <Program label="restart"> sudo /etc/init.d/nfs-common restart </Program> </Menu> <Menu label="Monkey Web Server"> <Program label="monkey start"> sudo /opt/monkey/bin/banana start </Program> <Program label="monkey stop"> sudo /opt/monkey/bin/banana stop </Program> <Program label="monkey restart"> sudo /opt/monkey/bin/banana restart </Program> </Menu> <Menu label="FTPd"> <Program label="betaftpd start"> sudo /usr/sbin/betaftpd </Program> <Program label="betaftpd stop"> sudo killall -9 betaftpd </Program> </Menu> </Menu> <Program label="Floppy Disk Tool"> /usr/bin/fdtool.lua </Program> <Program label="PCMCIA Card Control"> /usr/bin/cardcontrol.lua </Program> <Menu label="Printing/lpd"> <Program label="start"> sudo /usr/sbin/lpd </Program> <Program label="stop"> sudo killall -9 lpd </Program> <Program label="reload"> sudo /usr/sbin/lpc reread </Program> <Program label="configure printer"> aterm +tr -T "apsfilter" -e sudo /usr/share/apsfilter/SETUP </Program> </Menu> <Program label="pstree"> aterm +tr -e /usr/bin/pstree.x11 </Program> <Program label="System Stats"> /usr/local/bin/stats.lua </Program> <Program label="Top"> aterm +tr -T "Top" -e /usr/bin/top </Program> <Program label="Webdata Backup/Restore"> aterm +tr -T "Webdata FTP Messages" -e /usr/bin/webdata </Program> <Program label="Xkill"> /usr/X11R6/bin/xkill </Program> <Program label="Editres"> editres </Program> <Program label="X Window Snapshot"> xwd -out myscreen.xwd; xwud -raw -in myscreen.xwd </Program> </Menu> <Menu label="Tools"> <Program label="Upgrade to GNU Utils"> aterm +tr -T "Upgrade to GNU Utils" -e sudo gnu-utils-restore </Program> <Program label="Enable Apt"> aterm +tr -T "DSL Apt and Dpkg Restore" -e sudo dpkg-restore </Program> <Program label="Synaptic"> /opt/.start_synaptic </Program> <Program label="Install to Hard Drive"> aterm +tr -T "DSL Hard Drive Installation" -e sudo dsl-hdinstall </Program> <Menu label="Frugal Install"> <Program label="Frugal Grub Install"> aterm +tr -T "DSL Frugal Grub Install" -e sudo frugal_grub.sh </Program> <Program label="Frugal Lilo Install"> aterm +tr -T "DSL Frugal Lilo Install" -e sudo frugal_install.sh </Program> </Menu> <Menu label="Install to USB Pendrive"> <Program label="For USB-ZIP Pendrive"> aterm +tr -T "DSL USB Pendrive Installation" -e sudo pendrive_usbzip.sh </Program> <Program label="For USB-HDD Pendrive"> aterm +tr -T "DSL USB Pendrive Installation" -e sudo pendrive_usbhdd.sh </Program> </Menu> <Menu label="Make Boot Floppy"> <Program label="Standard Boot Floppy"> aterm +tr -T "Make Standard Boot Floppy" -e /usr/local/bin/mkfloppy </Program> <Program label="USB BootFloppy"> aterm +tr -T "Make USB Boot Floppy" -e /usr/local/bin/mkfloppy usb </Program> </Menu> <Program label="Make myDSL CD remaster"> aterm +tr -T "Make myDSL CD" -e sudo mkmydsl </Program> <Program label="CD Burn App"> aterm +tr -T "CDW" -e cdw </Program> </Menu> <Menu label="XShells"> <Program label="Transparent"> aterm -T "Bash" -e /bin/bash </Program> <Program label="Light"> aterm +tr -bg white -fg black -cr blue -T "Bash" -e /bin/bash </Program> <Program label="Dark"> aterm +tr -T "Bash" -e /bin/bash </Program> <Menu label="Root Access"> <Program label="Transparent"> aterm -cr red -T "Root Shell" -e sudo /bin/bash </Program> <Program label="Light"> aterm +tr -bg white -fg black -cr red -T "Root Shell" -e sudo /bin/bash </Program> <Program label="Dark"> aterm +tr -cr red -T "Root Shell" -e sudo /bin/bash </Program> </Menu> </Menu> <Separator/> <Program label="Help">dillo /usr/share/doc/dsl/getting_started.html</Program> <Program label="Find">sudo gtkfind</Program> <Program label="Run Command">grun</Program> <Separator/> <Menu label="Exit"> <Restart label="Restart"/> <Program label="Switch to Fluxbox">switcher.lua</Program> <Exit confirm="false" label="Exit to prompt"/> <Program label="Reboot">exitcheck.sh reboot</Program> <Program label="Power Off">exitcheck.sh shutdown</Program> </Menu> </RootMenu> <Border> <Font antialias="false">-adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*</Font> <Width>3</Width> <Height>20</Height> <Foreground>black</Foreground> <Background>#BBBBBB</Background> <ActiveForeground>white</ActiveForeground> <ActiveBackground>#5983E0</ActiveBackground> </Border> <Tray autohide="false" insert="right"> <Font antialias="false">-adobe-helvetica-bold-r-*-*-*-120-*-*-*-*-*-*</Font> <Height>24</Height> <Foreground>black</Foreground> <Background>#BBBBBB</Background> <ActiveForeground>black</ActiveForeground> <ActiveBackground>#5983E0</ActiveBackground> </Tray> <Pager> <Outline>black</Outline> <Foreground>#BBBBBB</Foreground> <Background>#336699</Background> <ActiveForeground>#5983E0</ActiveForeground> <ActiveBackground>#DCDAD5</ActiveBackground> </Pager> <Load> <Program>xload</Program> <Outline>black</Outline> <Foreground>red</Foreground> <Background>#DCDAD5</Background> </Load> <Clock> <Program>datetool.lua</Program> </Clock> <Popup enabled="true"> <Font antialias="true">-adobe-helvetica-medium-r-*-*-*-140-*-*-*-*-*-*</Font> <Outline>black</Outline> <Foreground>black</Foreground> <Background>yellow</Background> </Popup> <!-- <Font antialias="true">-adobe-helvetica-medium-r-*-*-14-*-*-*-*-*-*-*</Font> --> <Menu> <Font antialias="false">-adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*</Font> <Foreground>black</Foreground> <Background>#BBBBBB</Background> <ActiveForeground>white</ActiveForeground> <ActiveBackground>#5983E0</ActiveBackground> </Menu> <!-- Number of virtual desktops --> <DesktopCount>4</DesktopCount> <!-- Double click speed (in milliseconds) --> <DoubleClickSpeed>400</DoubleClickSpeed> <!-- Double click delta (in pixels) --> <DoubleClickDelta>2</DoubleClickDelta> <!-- The focus model (sloppy or click) --> <FocusModel>click</FocusModel> <!-- The snap mode (none, screen, or border) --> <SnapMode distance="10">border</SnapMode> <!-- The move mode (outline or opaque) --> <MoveMode>outline</MoveMode> <!-- The resize mode (outline or opaque) --> <ResizeMode>outline</ResizeMode> <!-- Key bindings --> <Key key="Up">up</Key> <Key key="Down">down</Key> <Key key="Right">right</Key> <Key key="Left">left</Key> <Key key="h">left</Key> <Key key="j">down</Key> <Key key="k">up</Key> <Key key="l">right</Key> <Key key="Return">select</Key> <Key key="Escape">escape</Key> <Key mask="A" key="Tab">next</Key> <Key mask="A" key="F4">close</Key> <Key mask="A" key="#">desktop#</Key> <Key mask="A" key="F1">root</Key> <Key mask="A" key="F2">window</Key> </JWM> |