"Help! My windows are jumping around and getting lost!"
VTWM uses a virtual desktop. What this means is that your desktop is
larger than the screen, and so not all of your desktop is displayed on the
screen at one time. To see the hidden parts, you need to pan the screen over to
them. To pan, you can just move your mouse to the edge of the screen, and the
screen will pan in that direction. Try panning off to the right, then back to
the left to find this window again.
While this feature of VTWM can seem very annoying at first, particularly
when you find yourself accidentally panning all over the place, you will find
that with a little practice you can get used to it, and that it can actually be
a very useful feature! If you really find it bothersome, you can disable mouse
panning by toggling the "Auto Pan" option from the "Operations" menu, which
will be covered later in this tutorial. However, it will be re-enabled next
time you log in. To disable it permanently, you will need to edit your .vtwmrc,
which wil be covered in Part 3 of this tutorial.
In the bottom right corner of the screen, you may notice a long rectangular
window (if a window is obscuring it, pan the screen around a bit to reveal it).
This is a display of your virtual desktop. The black box represents the
current location of your screen, and the grey boxes represent the locations of
windows that you have open. Both the black box and the grey boxes can be
dragged around using the left mouse button, letting you quickly change the
positions of windows and the screen. Try it out, then come back.
The above image depicts your VTWM desktop as it looks when you log into the
system. You can click this image to expand it. We have already covered the
virtual desktop window in the lower right. The white window in the upper right
is a clock display. Below the clock on the left is a manual browser, which you
can use to get help on many Unix commands when you need it. We will cover the
use of the manual browser a bit later in this tutorial. To the right of the
manual browser is the icon manager, which maintains a tab for each
window that you have open. Finally, on the far left is a shell window,
which provides your interface to much of the Unix operating system.
The icon manager probably contains three entries right now: "Big Shell",
"Little Shell", and a third for this tutorial. The "Big Shell" tab probably has
a raised box to the left of the words "Big Shell". This indicates that the
"Big Shell" window is iconified (Windows users: that's the X equivalent
of a minimized window). To de-iconify the "Big Shell" window, left-click its
tab in the icon manager. A large shell window should appear to the right of the
smaller one. To re-iconify the window, left-click the tab a second time, and
the "Big Shell" window will vanish, although its icon manager entry will
remain. You can also use the icon manager to quickly locate a window on another
part of your desktop. If you right-click the tab of a de-iconified window, the
screen will jump to that window. Try panning away from this tutorial, then
right-click its tab in the icon manager to jump back.
Now shift your attention to the "Little Shell" window on the left. If it is
obscured by this tutorial, try moving things around a bit (you can use the
virtual desktop to do this, as discussed above, or you can move a window by
dragging its title-bar). Move the mouse pointer in and out of the shell window
a few times. You may notice that when the mouse is inside the window, the
window's borders brighten visibly. When the mouse is over the shell window, the
shell window has focus. In order to interact with a window, you must
first give that window focus, by moving the mouse on top of it. As an example,
move the mouse over the shell window and enter a Unix command (if you don't
know anything about Unix commands, try entering "fortune" to receive a fortune
cookie). Now move the mouse outside the window and try entering another
command. This time, nothing will happen because the shell window no longer has
focus.
Window focus is another feature of VTWM that can be very frustrating to
newcomers who are accustomed to Windows-style focusing. Bear with it, though,
because VTWM's style can be very useful. For example, you may want to type
something in window A, which is partially covered by window B, but you may not
want to obscure window B. Moving the mouse over window A will give it focus,
but it won't actually raise window A over window B (if this doesn't make sense
right now, it will).
Like many X programs, the "Little Shell" window also uses a different
scrollbar than you may be accustomed to. To see this, enter a few commands in
the shell (or just hold down Enter) to scroll the text a bit to the point where
it's disappearing from the top side of the window. If you try dragging or
clicking the scrollbar like a typical Windows or Mac scrollbar, nothing will
happen. Instead, to scroll up, position the mouse anywhere on the scrollbar and
right-click. To scroll back down, left click. Positioning the mouse closer to
the bottom of the window will result in scrolling farther, whereas positioning
the mouse closer to the top will only scroll a couple of lines. To scroll to an
arbitrary point, place the mouse pointer on the part of the scrollbar you want
to scroll to and middle-click (that is, click using the middle button; if you
are using a two-button mouse, you can simulate a middle click by pressing the
mouse wheel or by pressing the left and right buttons simultaneously). You
should experiment with this a bit until you get used to it, as many X programs
work this way.
We encountered a nominal introduction to VTWM window management when we
discussed iconifying with the icon manager in the last section. Now we will go
into more depth in opening, closing, moving, resizing, and iconifying
windows. To provide windows to play with, we will use the following image of
the "Little Shell" window (we'll also discuss some of its features):
To open this image in a new window (assuming you are using Netscape to view
this tutorial; if you aren't, instead go back to your shell and type "xterm &"
to generate windows), try middle-clicking it.
After you middle-click the image, a window frame will appear, which you can
drag around using the mouse. Decide where you want the window, then left-click
to place the window there. When you want to close the window, click the "X"
icon in the upper-left corner and choose "Close Window" from the resulting
menu. When placing the window, you may find that it extends beyond the right
and/or bottom edges of the screen. To prevent this, you can right-click to
place the window, and VTWM will terminate the window at the edge of the
screen. Alternatively, you can hold the middle button and drag the mouse to
resize the window as you are placing it. Create a few new windows and try out
each of these methods until you are comfortable with each of them.
There are several ways to move a window. First, you can use the left mouse
button to drag the window's title bar to its new location. You can also grab
the frame of the window using the middle mouse button, and drag it that
way. Finally, you can move windows using the virtual desktop in the lower
right, as described above. Try out each of these methods and make sure you're
comfortable with one of them.
To resize a window, you can either grab the frame with the left mouse button
and drag it to its new position, or you can grab the "Resize" button at the
right end of the title bar with the left mouse button and drag the
mouse. Again, try both of these out and make sure you're comfortable with them.
The button on the title bar just to the left of the "Resize" button is the
"Iconify" button. Press it to iconify the window. To de-iconify the window, go
to the icon manager and left click, as described above.
Left-clicking on the title-bar of a window will raise that window, so
that it appears in front of any other windows in the same space. Similarly,
right-clicking on the title-bar will lower the window, moving it behind
all the other windows.
Clicking the "X" logo button on the left side of the title bar will give you
the "Arrange" menu, from which you can perform any of the above actions, plus a
few others. "Iconify", "Move", "Size", "Raise", and "Lower" will iconify, move,
resize, raise, and lower the window, respectively. "Autoraise" is a toggle that
will cause the window to be raised whenever it receives focus. "Nail" is a
toggle that will nail the window to the screen; whenever you pan the
screen, nailed windows will move with it. The clock, manual browser, icon
manager, and virtual desktop on the right side of the screen are all examples
of windows that are nailed down (try un-nailing them!). The "Zoom" options will
expand the window so that it covers the entire screen in one or both
directions. The "Title" options will adjust the location of the window's
title bar. "Identify Window" displays a pop-up containing some fundamental
information about the window. "Close Window" closes the window, and, for those
stubborn windows that won't go away, "Kill Window" really closes the
window. You should play around with these options until you are familiar with
them all.
Several other menus are available to you in VTWM. Try middle-clicking in the
root window (the background). You should get the same "Arrange" menu
that you got by clicking the X icon of a window. Right-clicking in the root
window will produce a list of all your windows, including some that are not
listed in the icon manager (such as the icon manager itself). Choosing a window
from this menu will de-iconify it.
Left-clicking in the root window will produce the main menu, which contains
some basic commands and several sub-menus. The "Screensaver" and "Lock screen"
commands will start a screensaver; choosing "Lock screen" will require you to
enter your password to exit the screensaver. "Restart VTWM" will restart the
window manager; try this if VTWM ever starts to act buggy. "Exit" will log you
out of your VTWM session.
The "Applications" menu contains several programs that you may find useful.
"Emacs" is a powerful text editor, "xterm" will open a new Unix shell, "gdb" is
a powerful debugger, and "xfig" is a drawing utility. The remaining options
should be fairly self-explanatory.
The "Other Hosts" menu contains a list of other hosts that you may want to
connect to, opening a new shell. The "Arrange" menu is the same menu that we
have seen before, in the Window Management section. The "Operations" menu
contains a number of advanced operations that you may want to play with,
although they will not be covered in this tutorial. Most notable of these is
the "Auto Pan" toggle, which will disable panning by moving the mouse to the
edges of the screen.
1) The Basics - Desktop Scrolling
2) The Basics - Your Desktop
3) Window Management
4) Menus