Previous Next Table of Contents

23. Linuxing with X11

23.1 X11 keyboard stuff

If you are having problems with BackSpace, see the earlier section.

23.2 Starting X11

There are different window managers, or "desktops". Motif and mvwm (if you have it) is one. fvwm and olvwm are others.

If you type openwin & you start up the XView/OpenLook olvwm desktop, the one with the blue background (unless you have installaed xearth!). This is the desktop that I have been using, and some comments here might not apply to your desktop.

If you type startx &, you will get the fvwm (feather weight virtual window manager). This uses less memory than olvwm, but gets the same job done. It probably has key-bindings that will contradict what is written here, so be aware.

If ~/.xinitrc exists, it must contain the olvmn or fvwm command.

23.3 Mouse hints

When you click the mouse, take care not to move the mouse, OR move it by a pixel or two.

X11 and your application, receives a sequence of events that logs every key-press, and release and movement. Different applications may have different sensitivities, becuase they interpret the sequence of events themselves.

For example, if you click-right on the openwin desktop (background) the desktop menu appears. However, if you move by 1 pixel, whilst clicking, the pop-up appears, (you move within it) and disappears. You might even have selected an option by accident.

Other applications wont do anything until you either move or release. When you are used to your system, it seems quite plain and natural, but it can be a great source of confusion for beginners.

23.4 The X11 desktop is a foreign langauge ?

It starts out with point and grunt. Different apps make diferent sense out of the same guesture. You have to learn different schemes, and gravitate to a way of working that makes sense to you.

23.5 Desktop menu

With openwin, if you click-and-hold-right, the desktop menu appears. This menu is configurable, and allows you to start new xterms, accessories or demo programs. If you did this by accident, move the mouse away and let go.

The sub-menus will pop-up if you focus on the triangular symbol, and you can navigate into (or out of) that menu. If you release over the sub-menu's top button, you will get the default from that menu (without ever seeing the menu). This is useful for when you want to start an xterm, but don't want to pick one of the several options.

A right click in fvwm, pops-up a list of windows. Picking one brings it to the front. TO pick a window in olvwm, use the menu of windows from the desktop pop-up.

Note that if an application produces any error messages on errout or stdout, these will appear on the terminal where you started the openwin. If you start an application from an xterm, the error messages will appear in the xterm. This makes a difference when something doesn't work, as you might not see the error message, and realise WHY it didn't work.

23.6 Window focus, follows mouse.

I used to prefer the top window to stay active, now I prefer focusing with the mouse and not having to click. To change it in openwindows:

In addition, within a window, the current focus may require a click to get the text cursor where you want it to be. Intelligent applications feel more natural, as they do that automatically. Most applications have an thicker border around the widget that holds the keyboard focus.

23.7 POINT-F5 raises window to front

This allows you to bring a window forward without having to find a safe place to click. It works with the OpenLook/openwin desktop, but Motif is configured differently.

If you want F5 to make mc (running in an xterm) copy a file, use ESC-5 instead. Don't get mad, just think of it as a feature that prevents you getting too many copies of files!

23.8 F1, F2, F3, F4, are strange

Undo the default openwin configuration, by editing ~/.Xmodmap. Comment it all out. Then the question is: where is F5 defined, because it still works.

        ! *** Installed by xview3L5 ***
        ! F1=Help  (move pointer on panel, press F1 to show help on the item)
        ! F2=Find  (after having selected some text, press F2 to do a search)
        ! F3=Cut   (select text, press F3 to move text into clipboard)
        ! F4=Copy  (select text, press F4 to copy text into clipboard)
        ! F5=Paste (insert text from clipboard at caret position)

        ! comment the following out
        | use selection (maybe with SHIFT in xterm)
        | paste is Middle Button
        ! use xedit as clipboard

        !keysym F1 = Help
        !keysym F2 = F19
        !keysym F3 = F20
        !keysym F4 = F16
        !keysym F5 = F18

23.9 Left-handed mice

Don't edit /etc/XF86Config, but put a command into your $HOME .xinitrc, eg

        xmodmap -e "pointer = 3 2 1"    # man xmodmap
or put the parts in quotes in $HOME/.Xmodmap (without the quotes). You should put this into YOUR $HOME, because you are left handed, not the system, and it is part of your configuration. When you move your files to another machine (eg by NFS) it will immediately be pre-configured. You could of course type it manually or add it to a menu somewhere.

I used this command, when my old mouse developed a faulty button.

23.10 F5 - Back to Front

F5 puts the window beneath the mouse at the front, or back of the stack of windows. Very convenient, except with mc in xterm, when you have to press ESC-5 to copy files between panels.

23.11 Window-Frame Right

Pressing the Right button over the windows border frame (eg the title bar) pops up a menu from the window-manager. Choices include bringing the window to the front, or back, or to an icon, or quit.

23.12 Icons

Many applications have their own pretty icons, others don't, and you get a default from somewhere. You can specify whether icons will be placed at the left, right top or bottom of your screen.

Every eindoe has two titles. The full title, that is displayed in the title bar, and an abbreviated one that appears on the icon. These appear in the pop-up menu, to help you find specific windows straight away. Clever apps can even change their own titles, eg editors put "Modified" there, if you have unsaved changes.

23.13 ALT-Q

This is a bit deadly, so be careful that you don't press it by accident. It quits the window (just as Quit from the window managers frame menu did).

23.14 ALT-W

This is too close to ALT-Q for comfort, but is very useful. It Converts an icon to a window, and vice-verse.

23.15 Paste into vi within xterm

Xterm can pass mouse events through to the application, using escape codes. New-vi / elvis understand these mouse clicks within xterm, and turn the option on. However, this makes highlighing, and pasting difficult.

To use cut+paste within an xterm application (that doesn't have it switched off), press the SHIFT key. Do make sure that the cursor is in the correct place, as the pasted text is fed to the application via the keyboard buffer, ie where the character cursor is.

If you forget to press SHIFT when pasting into elvis, it leaves 'insert' mode, and goes into open (command) mode.

23.16 CTRL-ALT-PLUS, -MINUS, ZOOM keys

The display can be switched between modes, eg 640x48, 800x600, 1024x768, 1280x1024, provided of course you have configured /etc/XF86Config correctly. Use CTRL-ALT-PLUS or CTRL-ALT-MINUS (on the numeric keypad) to step through a circular list.

Either the biggest mode, or the setting of Virtual (in XF86Config) defines the size of the full screen. When in a smaller mode, the displayed portion can be scrolled by pushing the mouse against one of the four sides.

This happens 'instantaneously' because all of the current screen is loaded into the SVGA card's memory, and XF86 is just telling the card to display a different area.

See Issue-1 for hints on configuring XF86Config. Personally, I spend most of my time in 640x480 mode, and scroll around a lot.

23.17 Text is too small to be readable

This is a general problem with high-res displays that aren't running on 21" monitors! Many applications allow you to select the fonts that they use, either the font-style or the point-size. Some applications have groups of fonts, that you can switch between.

23.18 ALT-F1 ALT-F4

X11 has several screens, laid out as the virtual desktop. Each screen is selectable, ALT-F3 selects the third window.

This is visible in the openwindows mini-panel in the top left, where each open window is shown as an outline and a just-readable name. You can move windows there, by dragging them. Whilst dragging a window, if the mouse leaves, or enters the minipanel, you continue to move the window (abbreviated to it's outline), but in the new context.

ALT-ARROW also changes the selected window (look in the condensed worktop map TLC), and SHIFT-ALT-ARROW moved by half steps! Note that the mouse must be pointing at the (blue) background, otherwise the current window gets the key-press.

23.19 CTRL-ALT-F1

This switches out of X11 to the first text based VC. CTRL-ALT-F2 switches to the second ... etc.

Note that when you switch TO X11 (usually with ALT-F7 because it is running on the first free VC), you have to release CTRL-ALT if you want to press them again.

If this seems confusing, it is because it is. Basically all these different facilities come from different places, and choose to use similar but slightly different keys. It soon becomes natural.

23.20 Ctrl-Alt-BackSpace

Kills the entire destop. Although this is done in a controlled way, every running application gets interrupted. Those running inside an xterm get a HUP signal, as though you were connected via a modem and the phone line went dead. Maybe you'll see the spirit of Elvis.

23.21 openwin - or - fvtwm ?

These share ~/.xinitrc, which must end with either exec fvtwm or exec olvwm.

If you don't create ~/.xinitrc, it's decided by the original command, either startx or openwin.

Basically XF86 is the X11 driver that drives the PC display, it knows about SVGA cards, keyboards and what X11 wants it to do. But after the hardware has being driven, a display manager is needed to add the correct style of borders to windows, to pick up the desktop configuration menu, and to control how X11 messages are routed between apps on the desktop. XF86 will exit the X11 desktop, when olvwm exits.

twm is the basic window manager, fvtwm is a featherlite virtual twm, and uses the most traditional key-styles. Additional configuration of X11 come as OpenLook - with its own olvwm, or as Motif with mwm, or ... roll your own, but try to follow the defacto standards.

All this configurability appears as various scripts (that call programs), and config files. xinit is a program that traditionally has a $HOME/.xinitrc file, where the user specifies the various desktop accessories to be started, and which window manager to run. You may notice, that when the accessories startup, they don't have any real borders (title bars), but when the window manager gets started (the last program in the list), it adds borders to every window according to its own styles and configuration.

23.22 xdm

The X-Display-Manager starts up X11 as part of the boot process. You then have to "login" to its screen, instead of the text VC's. The text VC's are still there, via CTRL-ALT-F1.

23.23 X-clipboard

Highlighting some text in one application, cancels any text highlighted in another application, and sets the new text SELECTION. This can them be pasted into any other window that supports the X11 selection COPY/PASTE interface.

Actually, the application can have a selection of text-type, or of other types. Text seems to be the most common format. The keys to use to activate selection and paste, vary with applications and window managers, but it usually has a consistent feel.

Often it is a good idea to go-get the pieces of text you want to paste, and keep them in a clipboard for later. If you find selection confusing, it helps to use the clipboard, as you know your text has been sucessfully pasted _somewhere_, then you can switch to the other application, and copy them over again.

Run 'clipboard'. It is simply a place to cut and paste text, but it can collect several different strings, and recall them. Nifty!

You still have to highlight the selection from the clipboard, so that you can paste it elsewhere, but that's simple enough.

23.24 /usr/openwin/lib/*menu*

I added raven.tcl to the desktop menu /usr/openwin/lib/*menu*, you can add any program you like, but the error messages will go the text console where you started 'openwin' from (if you don't run xdm).


Previous Next Table of Contents