Sponsored Content
Top Forums Shell Programming and Scripting Can a script resize it's own mintty console? Post 302944113 by Michael Stora on Friday 15th of May 2015 02:00:44 PM
Old 05-15-2015
Can a script resize it's own mintty console?

I'm looking for finer granularity than the 20 ANSI escape sequence screen modes. What I'd like to do is have the terminal increase it's own height when I have to show the user a long menu.

Platform is Cygwin 64 running over Win 7 Pro.

Mike

Last edited by Michael Stora; 05-15-2015 at 03:19 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to Open Shell Script from X-Manager Console

Dear All, I have a shell script. which has the read, write & execute permissions. I am entering from X-Manager Console. OS Details are: SunOS P382XLRTY 5.9 Generic_118558-34 sun4u sparc SUNW,Sun-Fire-480R Step1: Double Click on Home Folder, it will be opened. Step2: Double Click on... (2 Replies)
Discussion started by: hanu_oracle
2 Replies

2. Solaris

script hangs when outputing to /dev/console

I am running solaris 8 on a sparcs box. The system is connected to a lightwave console server. I have a script that hangs when sending output to '/dev/console'. Any ideas? -V (2 Replies)
Discussion started by: vada010
2 Replies

3. UNIX for Dummies Questions & Answers

Windows to Linux remote console using VNC brings up blank console screen with only mouse pointer

:confused:Hi This was installed on the Linux box a few weeks back by a guy that no longer works for us. All worked fine until last week. Now when we connect its just a blank screen with no icons. I get a whole bunch of errors when starting the service too: Tue Feb 23 14:29:45 2010 ... (1 Reply)
Discussion started by: wbdevilliers
1 Replies

4. Windows & DOS: Issues & Discussions

How to install mintty?

I already have CygWin installed on my PC. However, I would like to use mintty instead of the CygWin Bash Shell. Do I need to reinstall the whole thing? Thanks! ---------- Post updated at 12:13 PM ---------- Previous update was at 11:56 AM ---------- I just had to move the mintty application... (0 Replies)
Discussion started by: Xterra
0 Replies

5. Shell Programming and Scripting

Output of echo $$ differs in Script than console

Hi All, I have a very basic query for 'echo $$' command. When I am executing echo $$ on console then it is giving different output than the execution of echo $$ in a script. Console Output: ------------------------- bash-3.2$ echo $$ 15610 bash-3.2$ In Script:... (3 Replies)
Discussion started by: manishdivs
3 Replies

6. Linux

Linux extacting msg from script to console

how to get the outout from script to console. i am running one script msg.sh using cron job every suday midnight. as soon as i logged in i want to see the staus is service started or service failed on console. what command i need to add to script ? msg.sh #!/bin/bash if then echo... (1 Reply)
Discussion started by: saku
1 Replies

7. Shell Programming and Scripting

Need a little help with my first shell script. Basic image resize script...

Hey everyone, just now joined because I didn't want to go onto Ubuntu forums and start asking about how to write shell scripts. Seems like this is a pretty active forum for exactly what I need. I'm trying to modify a shell script I found online, the end goal is to have it find all files in the... (9 Replies)
Discussion started by: mozzles
9 Replies

8. UNIX for Beginners Questions & Answers

Linux Console for Interactive Input Script

Hi there, How do I enter command to the interactive console. I was able to do it via the first line. What if I have more lines to input into the interactive console from line 3 onwards. Is there a more easier way? (echo -e "load openvas" ; echo -e "openvas_help") | msfconsole ... (4 Replies)
Discussion started by: alvinoo
4 Replies

9. UNIX for Advanced & Expert Users

Script to automate add/resize datafile in Oracle ASM Storage

Hi all, Could anyone please share ideas or logic on how to automate add/resize datafile in Oracle ASM Storage for Oracle RAC/Single Node databases when any tablespace space alert is trigerred by OEM? Thanks for your help and time on it! Thanks&regards, a1_win Please DON'T use CODE tags... (0 Replies)
Discussion started by: a1_win
0 Replies

10. Shell Programming and Scripting

Simple script for resize, crop and optimize jpg

Hi Friends, I'm trying to create a script that allows me to recursively resize, crop (holding the center of the image) and optimize images jpg, jpeg, png for a specific folder and subfolder with the ability to exclude certain folder and its subdirectory. Again, I should to do with this script:... (3 Replies)
Discussion started by: danjde
3 Replies
RESIZE(1)							  X Window System							 RESIZE(1)

NAME
resize - set environment and terminal settings to current xterm window size SYNOPSIS
resize [ -v | -u | -c ] [ -s [ row col ] ] DESCRIPTION
Resize prints a shell command for setting the appropriate environment variables to indicate the current size of xterm window from which the command is run. Resize determines the command through several steps: o first, it finds the name of the user's shell program. It uses the SHELL variable if set, otherwise it uses the user's data from /etc/passwd. o then it decides whether to use Bourne shell syntax or C-Shell syntax. It uses a built-in table of known shells, which can be overrid- den by the -u and -c options. o then resize asks the operating system for the terminal settings. This is the same information which can be manipulated using stty. o then resize asks the terminal for its size in characters. Depending on whether the "-s option is given, resize uses a different escape sequence to ask for this information. o at this point, resize attempts to update the terminal settings to reflect the terminal window's size in pixels: o if the -s option is used, resize then asks the terminal for its size in pixels. o otherwise, resize asks the operating system for the information and updates that after ensuring that the window's dimensions are a multiple of the character height and width. o in either case, the updated terminal settings are done using a different system call than used for stty. o then resize updates the terminal settings to reflect any altered values such as its size in rows or columns. This affects the values shown by stty. o finally, resize writes the shell command for setting the environment variables to the standard output. EXAMPLES
For resize's output to take effect, resize must either be evaluated as part of the command line (usually done with a shell alias or func- tion) or else redirected to a file which can then be read in. From the C shell (usually known as /bin/csh), the following alias could be defined in the user's .cshrc: % alias rs 'set noglob; eval `resize`' After resizing the window, the user would type: % rs Users of versions of the Bourne shell (usually known as /bin/sh) that don't have command functions will need to send the output to a tempo- rary file and then read it back in with the "." command: $ resize > /tmp/out $ . /tmp/out OPTIONS
The following options may be used with resize: -c This option indicates that C shell commands should be generated even if the user's current shell is not /bin/csh. -s [rows columns] This option indicates that Sun console escape sequences will be used instead of the VT100-style xterm escape codes. If rows and columns are given, resize will ask the xterm to resize itself using those values. Both of the escape sequences used for this option (first to obtain the window size and second to modify it) are subject to xterm's allowWindowOps resource setting. The window manager may also choose to disallow the change. The VT100-style escape sequence used to determine the screen size always works for VT100-compatible terminals. VT100s have no cor- responding way to modify the screensize. -u This option indicates that Bourne shell commands should be generated even if the user's current shell is not /bin/sh. -v This causes resize to print a version number to the standard output, and then exit. Note that the Sun console escape sequences are recognized by XFree86 xterm and by dtterm. The resize program may be installed as sunsize, which causes makes it assume the -s option. The rows and columns arguments must appear last; though they are normally associated with the -s option, they are parsed separately. FILES
/etc/termcap for the base termcap entry to modify. ~/.cshrc user's alias for the command. ENVIRONMENT
SHELL Resize determines the user's current shell by first checking if $SHELL is set, and using that. Otherwise it determines the user's shell by looking in the password file (/etc/passwd). Generally Bourne-shell variants (including ksh) do not modify $SHELL, so it is possible for resize to be confused if one runs resize from a Bourne shell spawned from a C shell. TERM Resize sets this to "xterm" if not already set. TERMCAP Resize sets this variable on systems using termcap, e.g., when resize is linked with the termcap library rather than a ter- minfo library. The latter does not provide the complete text for a termcap entry. COLUMNS, LINES Resize sets these variables on systems using terminfo. Many applications (including the curses library) use those variables when set to override their screensize. SEE ALSO
use_env(3) csh(1), stty(1), tset(1) xterm(1) AUTHORS
Mark Vandevoorde (MIT-Athena), Edward Moy (Berkeley) Thomas Dickey (invisible-island.net). Copyright (c) 1984, 1985 by X Consortium See X(7) for a complete copyright notice. Patch #295 2013-07-06 RESIZE(1)
All times are GMT -4. The time now is 02:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy