Re: Semantics of text virtual console vs. xterm



On Sat, 23 Feb 2008 17:31:11 -0900 Floyd L. Davidson <floyd@xxxxxxxxxx> wrote:
| phil-news-nospam@xxxxxxxx wrote:
|>The third issue is to find a way to rapidly switch between different screens
|>of text. In text mode, the traditional virtual console involves Alt+FX,
|>where FX is one of the "F" function keys on the top row of the keyboard.
|>I have, through keyboard mapping, expanded that to so that Alt+X, where X
|>is either one of the function keys or one of just about any other key on
|>the main part of the keyboard (including space and ESC). I have 63 such
|>mappings to virtual consoles, and use them all. Alt+F10, Alt+F11, and
|>Alt+F12 are each going to X Windows (I run three instances of X at the
|>same time). The rest go to one of 60 different virtual consoles, all of
|>which are logged in and used.
|
| Sheesh. I thought I was a little nuts in the head (I
| use 15 virtual desktops), but sir... you take the cake!
| ;-)

Each of my 3 instances of X have 32 virtual desktops.


| (I hate to think how long it takes to set that up if you
| log everything out, or reboot, and have to start it all
| again.)

The X virtual desktops start empty. I open windows there as needed. The
virtual consoles are logged in by a script that runs a program I wrote
that calls an ioctl() I added to the kernel to stuff input strings into
the TTYs for the VCs. Some of them are set to a shell prompt and others
are logged in to other remote computers via ssh and screen.


|>When I press Alt+X the switch is very rapid.
|>Some people have suggested using screen, but it is awkward to use for this
|>kind of rapid switching (I sometimes switch back and forth a few times a
|>second). I would thus want to have some kind of means to do such rapid
|>keyboard based switching while in X. That would not be switching between
|>the different instances of X (that's way too slow, anyway). It could be
|>switching between different windows of xterm, or subwindows within xterm,
|>or different virtual desktops within the same instance of X. Whichever is
|>the fastest is the way to go. But how to set that up? Maybe it needs a
|>new window manager? Or is one already available that can do that.
|>
|>Non-specific advice won't be helpful. Does anyone have any specific advice?
|
| I use the fvwm2 window manager. As noted above, I have
| 15 virtual desktops defined. I stack them up in a
| single vertical row. I use two monitors, and the right
| monitor is for "sticky" things like a clock, a
| calculator, xsysinfo, a notepad, and a desktop manager,
| etc, while the left monitor is used for applications.
| The left monitor, for example, often has anything from
| one to three instances of xterm running in each desktop,
| plus perhaps XEmacs and maybe something like The GIMP or
| whatever.

My 32 virtual desktops are in a 16 vertical by 2 horizontal grid.
I use only a single monitor at 1280x1024.


| I often su to different users in different desktops, and
| as one example I do that in order to run 4 different
| instances of the Opera web browser, each under a
| different user, concurrently.

I have my script that starts Firefox create a new HOME directory
each time. That's good enough for them to remain as separate
processes.


| On the right monitor, up against the left edge
| (centering it for easy access with the mouse) is the
| desktop manager. It has 15 squares and extends from the
| top of the screen to the bottom. To switch from any
| given desktop to another either of two methods can be
| used. One is to click on the square for that screen
| with the mouse. The other is to use Control-UP or
| Control-DOWN keys. I just timed how long it took to go
| from the top to the bottom using keyboard entry, and
| moving from window 1 to window 15, and then back, took 5
| seconds. I'm sure the time is dependent on how fast I
| moved my fingers rather than how fast the switch
| actually takes.

If there was a way to have X or the window manager switch among the
many virtual desktops with an Alt+X keystroke, just like virtual
consoles do (leave Ctrl+Alt+X to drop out of X), that might be a
good way for me.


| Note that while I use a single vertical row, any
| combination of vertical and horizontal can be used. The
| default is a 3x3 matrix if I remember right.
|
| I don't know what the maximum would be, but if I can
| have a 1x15, I'd expect you could do a 15x15 matrix...

I probably could. But I need to find a way to make a virtual desktop
to a fixed key location, so that when I press certain keys I always
get to a specific desktop no matter where I am. I do that now with
text VCs (hold Alt and press another character ... I've expanded that
beyond just the F-function keys).


| Of course if some of what you do can be handled with
| multiple xterm windows on the same desktop, you won't
| need as many desktops. I don't know if there is a way
| to cycle through the windows open on a given desktop
| other than using the mouse to cause the focus to change.

There is a way on the keyboard with fvwm. But it is sequential, not
direct. Given that existance of windows is very dynamic, I do not see
how to do it any other way. OTOH, existance of virtual desktops is
not so dynamic. So it is plausible to assign a fixed key to each.


| (I configure mine to have the focus change if the mouse
| stays on a window for 1 second, but many people prefer
| to have it change only if the mouse is clicked in the
| new window.)

I have it configured to focus change if the mouse moves to a window and
do it immediately. I'd like to modify this so that there exists a button
on the bar for each window that will fix the focus there, and then it
stays there until the mouse is clicked outside that window, then it goes
back to doing the focus on the basis of moving, unless that elsewhere
click was on a focus button. One thing I do not want is to force a window
to the top of the pile just to focus on it.

--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / spamtrap-2008-02-24-1109@xxxxxxxx |
|------------------------------------/-------------------------------------|
.