resize multiple xclients (xterms) on command line or programmatically?


 
Thread Tools Search this Thread
Special Forums UNIX Desktop Questions & Answers resize multiple xclients (xterms) on command line or programmatically?
# 1  
Old 04-14-2009
resize multiple xclients (xterms) on command line or programmatically?

Is there a way to resize x clients after they're started either on the command line or programmatically?
I'm using Cygwin and typically start my root window, wm, and four xterms. By the end of the day they're all over the place with different sizes. I'd like to be able to enter a single command or even a command for each window to resize instead of taking the time with the mouse for each one. Is this possible?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Grep command on multiple line

Hi All, I have some xml files and I need to find out all xml where one specific type of pattern is available.. Pattern 1 ========== <MAP TIMEOUT="" MODE="STANDALONE"> <COMMENT>without Any Mapping</COMMENT> </MAP> Pattern 2 ========== <MAP TIMEOUT="" MODE="STANDALONE"> ... (4 Replies)
Discussion started by: Baharul
4 Replies

2. Shell Programming and Scripting

Perl command line option '-n','-p' and multiple files: can it know a file name of a printed line?

I am looking for help in processing of those options: '-n' or '-p' I understand what they do and how to use them. But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.) I did try it and -n works on 2 files. Question is: - is it possible to... (6 Replies)
Discussion started by: alex_5161
6 Replies

3. UNIX for Advanced & Expert Users

Pass Multiple Commands and Open Multiple Xterms via PSS

Hello, I'm attempting to open multiple xterms and run a command as an SAP user via sudo using PSSH. So far, I'm able to run PSSH to a file of servers with no check for keys, open every xterm in to the servers in the file list, and SUDO to the SAP(ADM) user, but it won't do anything else... (11 Replies)
Discussion started by: icemanj
11 Replies

4. Shell Programming and Scripting

Command line multiple input

I'm using the below to get multiple input from USER and it is working, is there any better way in awk array single liner? echo "Enter Multiple input (Ctrl+d to exit)" >output while read A do echo "$A" >>output done (3 Replies)
Discussion started by: Roozo
3 Replies

5. Shell Programming and Scripting

sed command to grep multiple pattern present in single line and delete that line

here is what i want to achieve.. i have a file with below contents cat fileName blah blah blah . .DROP this REJECT that . --sport 7800 -j REJECT --reject-with icmp-port-unreachable --dport 7800 -j REJECT --reject-with icmp-port-unreachable . . . more blah blah blah --dport 3306... (14 Replies)
Discussion started by: vivek d r
14 Replies

6. Shell Programming and Scripting

Command line arguments with multiple values

how can I pass multiple values from command line arguments example script.sh -arg1 op1 -arg2 op1 op2 op3 (2 Replies)
Discussion started by: nsk
2 Replies

7. Shell Programming and Scripting

running multiple command in a single line

Hi Can we run the linux command and per script in a single command $ cd /usr/local/adm/ ;ctsv scmtest_qabuild ;cspec.pl scmtest This is a combination of linux and clearcase command and last one is perl script with argument. I can see the first and 2nd coomand is executing but last... (6 Replies)
Discussion started by: anuragpgtgerman
6 Replies

8. Shell Programming and Scripting

Commands to multiple xterms

Hi, I need some help with sending commands to multiple xterms. What I do is ssh -Y to a remote box, and then open up 4 shells (csh) and on each one I run a different program in sequence -- one of them has 2, the first of which goes into the background and after you hit "enter" or "return" you get... (0 Replies)
Discussion started by: rmoriarty
0 Replies

9. Shell Programming and Scripting

running multiple command in same line

I have 5 hosts and each host as 3 java process .I have one machine which has ssh keys so it can login without any passwords etc to all the machines. How can I find out say jstack or some command so it goes to each machine and run the command . For example machine 1 has 3 java process and they... (2 Replies)
Discussion started by: gubbu
2 Replies

10. Programming

Combining multiple command line arguments

suppose the user enters: ./Myfile blah1 blah2 blah3 I want to be able to read that in as: blah1blah2blah3 IN ONE VARIABLE Obviously I can print it out in one line excluding the white space, but I'm having trouble combining argv, argv, ....., argv together! This is what I tried, but I... (3 Replies)
Discussion started by: hansel13
3 Replies
Login or Register to Ask a Question
MULTIXTERM(1)						      General Commands Manual						     MULTIXTERM(1)

NAME
multixterm - drive multiple xterms separately or together SYNOPSIS
multixterm [ args ] DESCRIPTION
Multixterm creates multiple xterms that can be driven together or separately. In its simplest form, multixterm is run with no arguments and commands are interactively entered in the first entry field. Press return (or click the "new xterm" button) to create a new xterm running that command. Keystrokes in the "stdin window" are redirected to all xterms started by multixterm. xterms may be driven separately simply by focusing on them. The stdin window must have the focus for keystrokes to be sent to the xterms. When it has the focus, the color changes to aquamarine. As characters are entered, the color changes to green for a second. This provides feedback since characters are not echoed in the stdin win- dow. Typing in the stdin window while holding down the alt or meta keys sends an escape character before the typed characters. This provides support for programs such as emacs. ARGUMENTS
-xa The optional -xa argument indicates arguments to pass to xterm. -xc The optional -xc argument indicates a command to be run in each named xterm (see -xn). With no -xc argument, the command is the current shell. -xd The optional -xd argument indicates a directory to search for files that will appear in the Files menu. By default, the direc- tory is: ~/lib/multixterm -xf The optional -xf argument indicates a file to be read at startup. See FILES below for more info. -xn The optional -xn argument indicates a name for each xterm. This name will also be substituted for any %n in the command argu- ment (see -xc). -xv The optional -xv flag puts multixterm into a verbose mode where it will describe some of the things it is doing internally. The verbose output is not intended to be understandable to anyone but the author. Less common options may be changed by the startup file (see FILES below). All the usual X and wish flags are supported (i.e., -display, -name). There are so many of them that to avoid colliding and make them easy to remember, all the multixterm flags begin with -x. If any arguments do not match the flags above, the remainder of the command line is made available for user processing. By default, the remainder is used as a list of xterm names in the style of -xn. The default behavior may be changed using the .multixtermrc file (see DOT FILE below). EXAMPLE COMMAND LINE ARGUMENTS
The following command line starts up two xterms using ssh to the hosts bud and dexter. multixterm -xc "ssh %n" bud dexter FILES
Command files may be used to drive or initialize multixterm. The File menu may be used to invoke other files. If files exist in the com- mand file directory (see -xd above), they will appear in the File menu. Files may also be loaded by using File->Open. Any filename is acceptable but the File->Open browser defaults to files with a .mxt suffix. Files are written in Tcl and may change any variables or invoke any procedures. The primary variables of interest are which is a list of names (see -xn). The procedure xtermStartAll, starts xterms for each name in the list. Other variables and procedures may be discovered by examining multixterm itself. EXAMPLE FILE
The following file does the same thing as the earlier example command line: # start two xterms connected to bud and dexter set xtermCmd "ssh %n" set xtermNames {bud dexter} xtermStartAll DOT FILE
At startup, multixterm reads ~/.multixtermrc if present. This is similar to the command files (see FILES above) except that .multixtermrc may not call xtermStartAll. Instead it is called implicitly, similar to the way that it is implicit in the command line use of -xn. The following example .multixtermrc file makes every xterm run ssh to the hosts named on the command line. set xtermCmd "ssh %n" Then multixterm could be called simply: multixterm bud dexter If any command-line argument does not match a multixterm flag, the remainder of the command line is made available to .multixtermrc in the argv variable. If argv is non-empty when .multixtermrc returns, it is assigned to xtermNames unless xtermNames is non-empty in which case, the content of argv is ignored. Commands from multixterm are evaluated early in the initialization of multixterm. Anything that must be done late in the initialization (such as adding additional bindings to the user interface) may be done by putting the commands inside a procedure called "initLate". MENUS
Except as otherwise noted, the menus are self-explanatory. Some of the menus have dashed lines as the first entry. Clicking on the dashed lines will "tear off" the menus. USAGE SUGGESTION - ALIASES AND COMMAND FILES Aliases may be used to store lengthy command-line invocations. Command files can be also be used to store such invocations as well as pro- viding a convenient way to share configurations. Tcl is a general-purpose language. Thus multixterm command files can be extremely flexible, such as loading hostnames from other programs or files that may change from day-to-day. In addition, command files can be used for other purposes. For example, command files may be used to prepared common canned interaction sequences. For example, the command to send the same string to all xterms is: xtermSend "a particularly long string" The File menu (torn-off) makes canned sequences particularly convenient. Interactions could also be bound to a mouse button, keystroke, or added to a menu via the .multixtermrc file. The following .multixtermrc causes tiny xterms to tile across and down the screen. (You may have to adjust the parameters for your screen.) This can be very helpful when dealing with large numbers of xterms. set yPos 0 set xPos 0 trace variable xtermArgs r traceArgs proc traceArgs {args} { global xPos yPos set ::xtermArgs "-geometry 80x12+$xPos+$yPos -font 6x10" if {$xPos} { set xPos 0 incr yPos 145 if {$yPos > 800} {set yPos 0} } else { set xPos 500 } } The xtermArgs variable in the code above is the variable corresponding to the -xa argument. xterms can be also be created directly. The following command file creates three xterms overlapped horizontally: set xPos 0 foreach name {bud dexter hotdog} { set ::xtermArgs "-geometry 80x12+$xPos+0 -font 6x10" set ::xtermNames $name xtermStartAll incr xPos 300 } USAGE SUGGESTION - SELECTING HOSTS BY NICKNAME The following .multixtermrc shows an example of changing the default handling of the arguments from hostnames to a filename containing hostnames: set xtermNames [exec cat $argv] The following is a variation, retrieving the host names from the yp database: set xtermNames [exec ypcat $argv] The following hardcodes two sets of hosts, so that you can call multixterm with either "cluster1" or "cluster2": switch $argv { cluster1 { set xtermNames "bud dexter" } cluster2 { set xtermNames "frank hotdog weiner" } } COMPARE
/CONTRAST It is worth comparing multixterm to xkibitz. Multixterm connects a separate process to each xterm. xkibitz connects the same process to each xterm. LIMITATIONS
Multixterm provides no way to remotely control scrollbars, resize, and most other window system related functions. Multixterm can only control new xterms that multixterm itself has started. As a convenience, the File menu shows a limited number of files. To show all the files, use File->Open. FILES
$DOTDIR/.multixtermrc initial command file ~/.multixtermrc fallback command file ~/lib/multixterm/ default command file directory BUGS
If multixterm is killed using an uncatchable kill, the xterms are not killed. This appears to be a bug in xterm itself. Send/expect sequences can be done in multixterm command files. However, due to the richness of the possibilities, to document it properly would take more time than the author has at present. REQUIREMENTS
Requires Expect 5.36.0 or later. Requires Tk 8.3.3 or later. VERSION
1.5 The latest version of multixterm is available from http://expect.nist.gov/example/multixterm . However, if your version of Expect and Tk are too old (see REQUIREMENTS above) you should download a new version of expect from http://expect.nist.gov DATE
April 30, 2002 AUTHOR
Don Libes <don@libes.com> LICENSE
Multixterm is in the public domain; however the author would appreciate acknowledgement if multixterm or parts of it are used. 15 April 2002 MULTIXTERM(1)