[comp.windows.x] New User's Questions

mckenney@CS.NYU.EDU (Alan M. McKenney) (06/10/91)

    I am a new X-windows user (*not* programmer), in the process of
converting from SunWindows, and have found a number of things that I
found convenient in SunWindows which I can't figure out how to do under
X-windows, as well as a few other questions.  I have the Quercia &
O'Reilly book (vol. 3, the User's Guide), and have been poring over it,
(so please don't say RTFM.)  I have also looked at the FAQ list.

   (BTW, net.fanatics should be informed that I am not interested in
responses of the form "you shouldn't do that" or "write your own
window manager".)

Configuration:

    Hardware is a Sun 3/60, monochrome monitor.  Version of X seems to
    be plain vanilla X11R4 with few tools/programs not mentioned in my
    X-windows manual.

    I have started out with /usr/lib/X11/twm/twmrc.sunview as my .twmrc .

    BTW, I am not a system manager, and would prefer to stick to the
    software we have, plus possibly a few simple, well-debugged free
    programs, which I might be able to convince our overloaded systems
    folks to install if they don't have to think much about it.


Questions:

1)  SunWindows allows me to have a (function) key resize a window to
    a specified size.  (At least it works with cmdtool and shelltool.)
    Is there a way to set this up, at least for XTerm?

2)  SunWindows uses the F1 key as a window-specific Caps-Lock key,
    with a reminder in the title bar.  This is a lot more convenient
    than the standard Caps Lock key, which doesn't even light the
    Caps Lock light, and its window-specificity is a little closer
    to the context-specificity I would really like.  How can I get a
    window-specific caps lock, or, failing that, get a visual indicator
    on the screen, or at least get the Caps Lock light to indicate the
    state of the Caps Lock key?

3)  I am having a lot of problems with repeated characters, which I
    didn't have with SunWindows.  E.g., I type "bit", but sometimes get
    something like "biit" or "bitt".  Is this some kind of race
    condition (=known problem) in X, or does this have to do with
    how the autorepeat is set up?  I.e., can I do anything about it
    (besides swear at it)?

    I notice that xset allows autorepeat to be turned off, but I don't
    see where there is any way to control how long the system waits
    before autorepeating, or to control the repeat rate.

4)  The menus in XTerm are not as convenient as I would like.  I notice
    that twm allows considerable customization of its menus, but I
    can only find out how to change the labels in XTerm's menus.  I
    would like to (a) change the composition of the menus and (b)
    change what I do to get them.  Ideally, I would like a menu bar
    (cf. xman) or a title line button (I saw something like this in
    a variant of X -- motif?), or to have one menu, on button 3.

5)  The SunWindows lockscreen command has an option (-e) to allow
    a person coming up to a workstation running "lockscreen" to make
    SunWindows exit (and, if your .login file is set up properly, log
    you out) without knowing your password.  This is considerate when
    used on public or semi-public workstations.  The X version, xlock,
    does not seem to have anything like it.  Is it possible to come up
    with a similar function?

6)  When I exit X, I get a lot of "broken pipe" messages and a messy
    screen.  All attempts to get the screen cleared upon exit from X
    have proven at best unreliable.  How can I get X to quit
    gracefully, other than by manually shutting down all child
    processes one by one?

7)  Is there any way to control where the icons go when I "iconify"
    a window?  (I have set it up so I get icons, not rectangles in
    the "icon manager" window.)   As it is, the first time a window is
    iconified, the icon ends up wherever the window was.  It would be
    nice to be able to specify absolute positions (for those started in
    my .xinitrc file) and a "gravity" for windows that I open later.

8)  The User's Manual, appendix F (XTerm escape sequences), keeps
    mentioning an "NP" control character.  I have never heard of such a
    thing.  It also seems incomplete, as I see the screen doing things
    that are not documented in this appendix.

9)  Is there a better User's Manual?

    In fact, I find it strange that, here in NYC at least, most
    bookstores have several books on programming in X, but only
    one or two have even one book on just using X (that being vol. 3
    of the Quercia & O'Reilly series.)  Every other title I have seen
    either explicitly states "programming for X-windows" or the like,
    or turns out to focus almost exclusively on programming.  Does
    anyone just use X to get their work done, or are all X users
    hackers or hacker wannabees?  Why is there no "getting started
    with X-windows", like there is for, say, WordPerfect, or even
    for Unix (or SunWindows, for that matter)?

10) Who should I contact (preferrably by E-mail) about bugs in the
    X-windows documentation?  I found one blooper in the man page for
    "resize" already.

11) Is there X-terminal software for the Atari 1040-ST?  I do some of
    my work at home, using a terminal emulator on the Atari, and
    connecting via modem to a network link and from there to my
    Sun.  Thus, it would need to work over a 1200 baud (noisy!)
    serial link.  (Yes, I know about the two sites listed in the
    FAQ list.  The U of Erlangen site doesn't have anything useful
    that I could find and the U of Dortmund site doesn't respond.)
    Basically, I want to run programs on my Sun, but use the Atari's
    mouse, keyboard, and display for input/output instead of the Sun's
    console.  (I am assuming that is the point of an X-terminal.)

12) Is this group (comp.windows.x) the right group to ask user questions?
    I haven't seen any questions posted that are anywhere near my level
    of ignorance.  Or is there a comp.windows.x.compleat-idiots?

13) Sometimes, if there is an error in my .twmrc file, X-windows
    seems to hang.  One easy way to get this is to have a menu
    entry in .twmrc with an ! but no &.  In this case, the only
    way I have found to get out of it (short of rebooting) is to
    log in from somewhere else and kill processes, usually the
    twm.  Is there a better way to escape from X, similar to
    SunWindows's ^D^Q ?

14) Also, is there a good (general) way to interrupt and kill a
    window process, similar to the SunWindows item "quit"?  I know
    that XTerm has a menu item like that, but not all window
    producers do, and it would be nice to get twm to try to kill
    the program.

Alan McKenney        E-mail:  mckenney@cs.nyu.edu         (INTERNET)
Courant Institute,NYU         ...!cmcl2!cs.nyu.edu!mckenney   (UUCP)

-- 
Alan McKenney        E-mail:  mckenney@cs.nyu.edu         (INTERNET)
Courant Institute,NYU         ...!cmcl2!cs.nyu.edu!mckenney   (UUCP)

jc@raven.bu.edu (James Cameron) (06/12/91)

>>>>> On 10 Jun 91 15:15:05 GMT, mckenney@CS.NYU.EDU (Alan M. McKenney) said:


||>     I am a new X-windows user (*not* programmer), in the process of

	[...First of all, just a warning:  I have never really used 
	    SunWindows and TWM was my first window manager. I have used
	    MWM, TVTWM, OLWM, and OLVWM extensively since and presently
	    use OLVWM...]

||> Questions:

||> 1)  SunWindows allows me to have a (function) key resize a window to
||>     a specified size.  (At least it works with cmdtool and shelltool.)
||>     Is there a way to set this up, at least for XTerm?


	No, TWM does not have this feature.


||> 2)  SunWindows uses the F1 key as a window-specific Caps-Lock key,
||>     with a reminder in the title bar.  This is a lot more convenient
||>     than the standard Caps Lock key, which doesn't even light the
||>     Caps Lock light, and its window-specificity is a little closer
||>     to the context-specificity I would really like.  How can I get a
||>     window-specific caps lock, or, failing that, get a visual indicator
||>     on the screen, or at least get the Caps Lock light to indicate the
||>     state of the Caps Lock key?


	No, TWM does not have this feature.


||> 3)  I am having a lot of problems with repeated characters, which I
||>     didn't have with SunWindows.  E.g., I type "bit", but sometimes get
||>     something like "biit" or "bitt".  Is this some kind of race
||>     condition (=known problem) in X, or does this have to do with
||>     how the autorepeat is set up?  I.e., can I do anything about it
||>     (besides swear at it)?


	There is a way to change your autorepeat.  It is a patch and
	unfortunately, I do not know where it is.


||>     I notice that xset allows autorepeat to be turned off, but I don't
||>     see where there is any way to control how long the system waits
||>     before autorepeating, or to control the repeat rate.

||> 6)  When I exit X, I get a lot of "broken pipe" messages and a messy
||>     screen.  All attempts to get the screen cleared upon exit from X
||>     have proven at best unreliable.  How can I get X to quit
||>     gracefully, other than by manually shutting down all child
||>     processes one by one?
	
	You can have XDM running, which puts up a window for you
	to log into and handles the errors and X server.  This is
	about the only solution.


||> 7)  Is there any way to control where the icons go when I "iconify"
||>     a window?  (I have set it up so I get icons, not rectangles in
||>     the "icon manager" window.)   As it is, the first time a window is
||>     iconified, the icon ends up wherever the window was.  It would be
||>     nice to be able to specify absolute positions (for those started in
||>     my .xinitrc file) and a "gravity" for windows that I open later.


	Well, you *could* use the icon manager feature of TWM.  I found
	it useful when I used TWM.  *8-)


||> 9)  Is there a better User's Manual?

||>     In fact, I find it strange that, here in NYC at least, most
||>     bookstores have several books on programming in X, but only
||>     one or two have even one book on just using X (that being vol. 3
||>     of the Quercia & O'Reilly series.)  Every other title I have seen
||>     either explicitly states "programming for X-windows" or the like,
||>     or turns out to focus almost exclusively on programming.  Does
||>     anyone just use X to get their work done, or are all X users
||>     hackers or hacker wannabees?  Why is there no "getting started
||>     with X-windows", like there is for, say, WordPerfect, or even
||>     for Unix (or SunWindows, for that matter)?

	Most of what it seems you are asking is WM (window manager)
	specific, and it simply requires you printing out the man
	page on it and seriously going through it all.  This is 
	the most customizable thing you will be able to have.  
	

||> 10) Who should I contact (preferrably by E-mail) about bugs in the
||>     X-windows documentation?  I found one blooper in the man page for
||>     "resize" already.

	Documentation?  Is this the man pages for certain programs
	or the actual books you are reading?


||> 12) Is this group (comp.windows.x) the right group to ask user questions?
||>     I haven't seen any questions posted that are anywhere near my level
||>     of ignorance.  Or is there a comp.windows.x.compleat-idiots?

	
	As long as you have honestly tried to find the solution,
	then this is CERTAINLY the place to ask.  All that matters
	is that you tried to find it yourself.  *8-)


||> 13) Sometimes, if there is an error in my .twmrc file, X-windows
||>     seems to hang.  One easy way to get this is to have a menu
||>     entry in .twmrc with an ! but no &.  In this case, the only
||>     way I have found to get out of it (short of rebooting) is to
||>     log in from somewhere else and kill processes, usually the
||>     twm.  Is there a better way to escape from X, similar to
||>     SunWindows's ^D^Q ?

	Well, it is not X server which is hanging, but TWM.  It does
	not handle errors in the startup file well, so the solution
	is to not make errors.  (* smile *)  And/or login to another
	machine and kill it.

||> 14) Also, is there a good (general) way to interrupt and kill a
||>     window process, similar to the SunWindows item "quit"?  I know
||>     that XTerm has a menu item like that, but not all window
||>     producers do, and it would be nice to get twm to try to kill
||>     the program.

	Well, you could use xkill as a last resort.  This does not
	exit things graciasly, so it should be used when you have
	tried other things.  You can have this as part of your
	TWM menus.  


And, finally, just a few things to note.  It seems that MWM and OLWM
are growing in popularity.  Since you are running X and not OpenWindows
you might find MWM more customizable.  

Also, as I had done some major hacking with TWM, I will send your my
old .twmrc if you want some examples of it.  *8-)

jc

--
					-- James Cameron  (jc@raven.bu.edu)

Signal Processing and Interpretation Lab.  Boston, Mass  (617) 353-2879
------------------------------------------------------------------------------
"But to risk we must, for the greatest hazard in life is to risk nothing.  For
the man or woman who risks nothing, has nothing, does nothing, is nothing."
	(Quote from the eulogy for the late Christa McAuliffe.)

dana@dino.bellcore.com (Dana A. Chee) (06/12/91)

In article <162@spunky.NYU.EDU>, mckenney@CS.NYU.EDU (Alan M. McKenney) writes:
|> 
|>     I am a new X-windows user (*not* programmer), in the process of
|> converting from SunWindows, and have found a number of things that I
|> found convenient in SunWindows which I can't figure out how to do under
|> X-windows, as well as a few other questions.  I have the Quercia &
|> O'Reilly book (vol. 3, the User's Guide), and have been poring over it,
|> (so please don't say RTFM.)  I have also looked at the FAQ list.
|>
...
|> 1)  SunWindows allows me to have a (function) key resize a window to
|>     a specified size.  (At least it works with cmdtool and shelltool.)
|>     Is there a way to set this up, at least for XTerm?
|>

I don't think twm has that ability (or any other window manager that I
know of).  xterm doesn't have it either (it does let you switch fonts
though, so maybe that's a next logical step).

|> 2)  SunWindows uses the F1 key as a window-specific Caps-Lock key,
|>     with a reminder in the title bar.  This is a lot more convenient
|>     than the standard Caps Lock key, which doesn't even light the
|>     Caps Lock light, and its window-specificity is a little closer
|>     to the context-specificity I would really like.  How can I get a
|>     window-specific caps lock, or, failing that, get a visual indicator
|>     on the screen, or at least get the Caps Lock light to indicate the
|>     state of the Caps Lock key?
|>

There's a server patch to make to caps lock light work correctly (but
as you said, no major changes ...).

|> 3)  I am having a lot of problems with repeated characters, which I
|>     didn't have with SunWindows.  E.g., I type "bit", but sometimes get
|>     something like "biit" or "bitt".  Is this some kind of race
|>     condition (=known problem) in X, or does this have to do with
|>     how the autorepeat is set up?  I.e., can I do anything about it
|>     (besides swear at it)?
|> 
|>     I notice that xset allows autorepeat to be turned off, but I don't
|>     see where there is any way to control how long the system waits
|>     before autorepeating, or to control the repeat rate.
|>

When you start your server (xinit?), use the arguments -ar1 and -ar2.
I use -ar1 500 -ar2 50 (see man page for Xsun for more info).

|> 4)  The menus in XTerm are not as convenient as I would like.  I notice
|>     that twm allows considerable customization of its menus, but I
|>     can only find out how to change the labels in XTerm's menus.  I
|>     would like to (a) change the composition of the menus and (b)
|>     change what I do to get them.  Ideally, I would like a menu bar
|>     (cf. xman) or a title line button (I saw something like this in
|>     a variant of X -- motif?), or to have one menu, on button 3.
|>

You can change how you get them with translations (see xterm man
page), but there is no provision for changing the composition. 

|> 5)  The SunWindows lockscreen command has an option (-e) to allow
|>     a person coming up to a workstation running "lockscreen" to make
|>     SunWindows exit (and, if your .login file is set up properly, log
|>     you out) without knowing your password.  This is considerate when
|>     used on public or semi-public workstations.  The X version, xlock,
|>     does not seem to have anything like it.  Is it possible to come up
|>     with a similar function?
|>

What you want is xlock -nolock.  This causes xlock to run without "locking"
the screen.

|> 6)  When I exit X, I get a lot of "broken pipe" messages and a messy
|>     screen.  All attempts to get the screen cleared upon exit from X
|>     have proven at best unreliable.  How can I get X to quit
|>     gracefully, other than by manually shutting down all child
|>     processes one by one?
|>

Well, I run X with xinit, and redirect the output to a file (it also
helps with debugging if something goes wrong).  My xinit line looks like:

xinit -- -ar1 500 -ar2 50 > /tmp/$USER.X 2>&1

for csh users,

xinit -- -ar1 500 -ar2 50 &> /tmp/$USER.X

All such errors will be in the file, and won't clutter your screen.

|> 7)  Is there any way to control where the icons go when I "iconify"
|>     a window?  (I have set it up so I get icons, not rectangles in
|>     the "icon manager" window.)   As it is, the first time a window is
|>     iconified, the icon ends up wherever the window was.  It would be
|>     nice to be able to specify absolute positions (for those started in
|>     my .xinitrc file) and a "gravity" for windows that I open later.
|>

What you want is IconRegion (see twm man page).  This will specify an
area on the root window where icons will be put if they don't have a
specified geometry.

|> 8)  The User's Manual, appendix F (XTerm escape sequences), keeps
|>     mentioning an "NP" control character.  I have never heard of such a
|>     thing.  It also seems incomplete, as I see the screen doing things
|>     that are not documented in this appendix.
|>

Yeah, Try mit/clients/xterm/ctlseq.txt with the sources.  I don't
remember if someone has posted an update to this, but it seems to be
fairly recent.

|> 9)  Is there a better User's Manual?
|> 
|>     In fact, I find it strange that, here in NYC at least, most
|>     bookstores have several books on programming in X, but only
|>     one or two have even one book on just using X (that being vol. 3
|>     of the Quercia & O'Reilly series.)  Every other title I have seen
|>     either explicitly states "programming for X-windows" or the like,
|>     or turns out to focus almost exclusively on programming.  Does
|>     anyone just use X to get their work done, or are all X users
|>     hackers or hacker wannabees?  Why is there no "getting started
|>     with X-windows", like there is for, say, WordPerfect, or even
|>     for Unix (or SunWindows, for that matter)?
|>

Its not as strange as you may think.  The problem is:  there is no
"standard" X installation.  I have crufted together a users guide for
the people here, but it talks about the environment I set up, and
probably has very little relevance to anyone else.  Most all programs
have manual pages to describe them, but an author wouldn't know what
any given administrator had installed on the machine (unlike Sunview,
where everything is there by default).  I believe the minimum system
you could get away with would be the X server, a window manager, and
an xterm.  Anything else is extra.

|> 10) Who should I contact (preferrably by E-mail) about bugs in the
|>     X-windows documentation?  I found one blooper in the man page for
|>     "resize" already.
|>

If its the man pages, then you send a bug report to
xbugs@expo.lcs.mit.edu  If its in a book, I guess you contact the
authors somehow.

|> 11) Is there X-terminal software for the Atari 1040-ST?  I do some of
|>     my work at home, using a terminal emulator on the Atari, and
|>     connecting via modem to a network link and from there to my
|>     Sun.  Thus, it would need to work over a 1200 baud (noisy!)
|>     serial link.  (Yes, I know about the two sites listed in the
|>     FAQ list.  The U of Erlangen site doesn't have anything useful
|>     that I could find and the U of Dortmund site doesn't respond.)
|>     Basically, I want to run programs on my Sun, but use the Atari's
|>     mouse, keyboard, and display for input/output instead of the Sun's
|>     console.  (I am assuming that is the point of an X-terminal.)
|>

???

|> 12) Is this group (comp.windows.x) the right group to ask user questions?
|>     I haven't seen any questions posted that are anywhere near my level
|>     of ignorance.  Or is there a comp.windows.x.compleat-idiots?
|>

Sure.  Everyone has to start somewhere.

|> 13) Sometimes, if there is an error in my .twmrc file, X-windows
|>     seems to hang.  One easy way to get this is to have a menu
|>     entry in .twmrc with an ! but no &.  In this case, the only
|>     way I have found to get out of it (short of rebooting) is to
|>     log in from somewhere else and kill processes, usually the
|>     twm.  Is there a better way to escape from X, similar to
|>     SunWindows's ^D^Q ?
|>

No, its a twm problem.  Logging in somewhere else and killing twm is
the best solution (actually, you only have to kill the process that
twm started without the &, then things will return to normal).

|> 14) Also, is there a good (general) way to interrupt and kill a
|>     window process, similar to the SunWindows item "quit"?  I know
|>     that XTerm has a menu item like that, but not all window
|>     producers do, and it would be nice to get twm to try to kill
|>     the program.
|>

There is a twm function called f.delete (see twm man page) which sends
a closedown message to a process.  This works for most of the programs
I run.  You can put a menu button on each window (like sunview) and
have f.delete be one of the entries.

|> -- 
|> Alan McKenney        E-mail:  mckenney@cs.nyu.edu         (INTERNET)
|> Courant Institute,NYU         ...!cmcl2!cs.nyu.edu!mckenney   (UUCP)

-- 
+*************************************************************************+
*  Dana Chee				(201) 829-4488			  *
*  Bellcore								  *
*  Room 2Q-250								  *
*  445 South Street			ARPA: dana@bellcore.com		  *
*  Morristown,  NJ  07960-1910		UUCP: {gateways}!bellcore!dana	  *
+*************************************************************************+

bashford@scripps.edu (Don Bashford) (06/14/91)

In article <1991Jun12.120226.21668@bellcore.bellcore.com> dana@thumper.bellcore.com writes:
<In article <162@spunky.NYU.EDU>, mckenney@CS.NYU.EDU (Alan M. McKenney) writes:
<...
<|> 1)  SunWindows allows me to have a (function) key resize a window to
<|>     a specified size.  (At least it works with cmdtool and shelltool.)
<|>     Is there a way to set this up, at least for XTerm?
<|>
<
<I don't think twm has that ability (or any other window manager that I
<know of).  xterm doesn't have it either (it does let you switch fonts
<though, so maybe that's a next logical step).

Check out twm's f.zoom function and friends.


Don Bashford
bashford@scripps.edu

dana@dino.bellcore.com (Dana A. Chee) (06/14/91)

In article <1386@riscsm.scripps.edu>, bashford@scripps.edu (Don Bashford) writes:
|> In article <1991Jun12.120226.21668@bellcore.bellcore.com> dana@thumper.bellcore.com writes:
|> <In article <162@spunky.NYU.EDU>, mckenney@CS.NYU.EDU (Alan M. McKenney) writes:
|> <...
|> <|> 1)  SunWindows allows me to have a (function) key resize a window to
|> <|>     a specified size.  (At least it works with cmdtool and shelltool.)
|> <|>     Is there a way to set this up, at least for XTerm?
|> <|>
|> <
|> <I don't think twm has that ability (or any other window manager that I
|> <know of).  xterm doesn't have it either (it does let you switch fonts
|> <though, so maybe that's a next logical step).
|> 
|> Check out twm's f.zoom function and friends.
|> 
|> 
|> Don Bashford
|> bashford@scripps.edu

That's almost there, but you need to be able to give *zoom an argument
that says what size to make the window.  For example,

"F1" = : window : f.zoom "80x35"
"F2" = : window : f.zoom "80x24"

would make the window 80x35 when F1 was used, and 80x24 when F2 was
used (of course, it would be nice to constrain these keys to work only
in xterm windows, but getting it working at all would be nice.

-- 
+*************************************************************************+
*  Dana Chee				(201) 829-4488			  *
*  Bellcore								  *
*  Room 2Q-250								  *
*  445 South Street			ARPA: dana@bellcore.com		  *
*  Morristown,  NJ  07960-1910		UUCP: {gateways}!bellcore!dana	  *
+*************************************************************************+