Sponsored Content
Top Forums Shell Programming and Scripting Can a script resize it's own mintty console? Post 302944157 by wisecracker on Saturday 16th of May 2015 09:19:54 AM
Old 05-16-2015
This worth a try if it is rows and columns.
Code:
#!/bin/bash
# Set window size down to 66 cols x 32 rows, not tested on mintty but worth a try...
printf "\x1B[8;32;66t"
# Write into the title bar; this DOES work on mintty...
printf "\x1B]0;This is a title name.\x07"

EDIT:
ALSO...
You could put either or both those two lines into your .bash_profile as CygWin uses bash by default.
Assuming mintty can accept the first 'printf' line then it will start up with your choice of rows and columns.

EDIT 2:
The above edit works on 64 bit cygwin using Windows 8.1.

Last edited by wisecracker; 05-16-2015 at 06:26 PM.. Reason: See above...
This User Gave Thanks to wisecracker For This Post:
 

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)						      General Commands Manual							 RESIZE(1)

NAME
resize - set TERMCAP and terminal settings to current xterm window size SYNOPSIS
resize [ -u | -c ] [ -s [ row col ] ] DESCRIPTION
Resize prints a shell command for setting the TERM and TERMCAP environment variables to indicate the current size of xterm window from which the command is run. For this output to take effect, resize must either be evaluated as part of the command line (usually done with a shell alias or function) or else redirected to a file which can then be read in. From the C shell (usually known as /bin/csh), the follow- ing 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: -u This option indicates that Bourne shell commands should be generated even if the user's current shell isn't /bin/sh. -c This option indicates that C shell commands should be generated even if the user's current shell isn't /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. However, the window manager may choose to disallow the change. 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 sepa- rately. FILES
/etc/termcap for the base termcap entry to modify. ~/.cshrc user's alias for the command. SEE ALSO
csh(1), tset(1), xterm(1) AUTHORS
Mark Vandevoorde (MIT-Athena), Edward Moy (Berkeley) Copyright (c) 1984, 1985 by X Consortium See X() for a complete copyright notice. X Window System RESIZE(1)
All times are GMT -4. The time now is 07:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy