1820401 Members
3296 Online
109624 Solutions
New Discussion юеВ

Size of terminal windows

 
SOLVED
Go to solution
Vibhor Kumar Agarwal
Esteemed Contributor

Size of terminal windows

Hi,

When I log into my HP machine either by telnet or by X-Servers, the size of my terminal is very small.

I have tried to increase the buffer size of telnet window to 9999, still output comes in only half of window.
In X-servers, what is the option of increasing the buffer size. My terminal window shows only about 100 lines.

Thanks in Advance
Vibhor Kumar Agarwal
25 REPLIES 25
Stuart Browne
Honored Contributor

Re: Size of terminal windows

You're using an XTerm, yes?

Most XTerm's i've used have the option '-sl ' option, of which takes the number of lines you want as a scroll-back buffer.
One long-haired git at your service...
harry d brown jr
Honored Contributor

Re: Size of terminal windows


With telnet it depends on who's telnet you are using.

As for X windows, what client are you using?

I use this for exceed, connecting to X able boxes (the path to xterm might change, depeneding upon OS):

/usr/bin/X11/xterm -sl 2000 -ls -sb -cr Wheat -T `hostname` -bg MidnightBlue -fg Wheat -fn 7x13 -fb 7x13B -display IPADDR:0.0


live free or die
harry d brown jr
Live Free or Die
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Size of terminal windows

For telnet I am using simple Windows based telnet.
Yes, I am using exceed.

By the way, what is xterm, I have just started using exceed, is this somehow related to it.
My exceed works fine when i connect to other Solaris boxes. In those it gives me about 2000 lines.
Vibhor Kumar Agarwal
harry d brown jr
Honored Contributor

Re: Size of terminal windows

This is the xs file I use for HP boxes:

[Xstart]
Kerberos V5 Support=0
Destroy TGT=0
Use Encryption=0
Load Balancing Support=0
Start Method=0
Program Type=0
User Id=root
Password=
Command=/usr/bin/X11/xterm -sl 2000 -ls -sb -cr Wheat -T `hostname` -bg MidnightBlue -fg Wheat -fn 7x13 -fb 7x13B -display @d
Info Prompt=0
Description=TITLE
Host=HOSTNAME
Host Type=HP
Connect Timeout=1
Close Timeout=10
Response Timeout=4
Prompt Timeout=2
Show Progress=1
Log Reply=1
UserId Prompt=login:|Username:
Password Prompt=password:
Shell Prompt=$|%|>|#|}
Optional Prompt1=
Optional Reply1=
Enable Extra Prompts=0
Extra Prompt1=
Extra Prompt2=
Extra Prompt3=
Extra Prompt4=
Extra Prompt5=
Extra Prompt6=
Extra Prompt7=
Extra Prompt8=
Extra Reply1=
Extra Reply2=
Extra Reply3=
Extra Reply4=
Extra Reply5=
Extra Reply6=
Extra Reply7=
Extra Reply8=
Startup Menu=1
Override Default Port=0
Override Port=


This I use for Solaris (Just chaneg the command prompt):

Command=/usr/openwin/bin/xterm -sl 2000 -ls -sb -cr Wheat -T `hostname` -bg MidnightBlue -fg Wheat -fn 7x13 -fb 7x13B -display @d


These are usually saved under C:\Documents and Settings\YOURUSERNAMEHERE\Application Data\Hummingbird\Connectivity\9.00\Exceed

as hostname.xs file names

live free or die
harry d brown jr
Live Free or Die
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Size of terminal windows

I have exceed 10.
I got to the directory but there are no .xs files there.
Vibhor Kumar Agarwal
TwoProc
Honored Contributor

Re: Size of terminal windows

I think you've just got your COLUMNS and LINES environment variables not set since you resized your window. This should happen automatically when using xterm.
Make sure that TERM is set to "xterm" (if that is the terminal you're using).
The easiest way to fix your COLUMNS and LINES variables is to run "/usr/bin/reset" - if it is in your path - just run "reset".
We are the people our parents warned us about --Jimmy Buffett
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Size of terminal windows

Mine $TERM variable was set to dtterm.
What's it?
I set it to xterm and did a reset.
Nothing happened.
Vibhor Kumar Agarwal
TwoProc
Honored Contributor

Re: Size of terminal windows

Nothing wrong with dtterm. Just leave it at that and don't change the $TERM value. But, go ahead and run the reset. If you
run "echo LINES:$LINES COLUMNS:$COLUMNS" both before and after running reset you'll see the difference. You should be able to edit in full screen mode after running reset command now. If not, run "tset" after running reset and then run your vi session - hopefully that will fix it.
We are the people our parents warned us about --Jimmy Buffett
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Size of terminal windows

Booohoooooo,

The LINES=24 and COLUMNS=80 before and after reset and tset.
I think I haven't made myself clear.

When i telnet then there is a problem of only half screen as output comes only in that.

When i connect via exceed the output comes in whole window, but the problem is output after approx 100-200 lines goes off range and i can't scroll after that. How i can increase this.
Vibhor Kumar Agarwal
Christian Deutsch_1
Esteemed Contributor

Re: Size of terminal windows

Dear Vibhor,

1. Open your first xterm.

2. In this xterm, make sure DISPLAY is set correctly.

3. Open another xterm: xterm -sl 2000
This gives you an xterm with maximum 2000 lines to scroll back to (you can put any number here)

4. If this helps you, let us know and I can give you more tips on X resources to get xterm working correctly the first time.

5. Why don't you like dtterm? It has much more functionality that an xterm.

Kind regards, Christian
Yeshua loves you!
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Size of terminal windows

I don't dislike any.

The reason is that i don't know either of them.
Tryied the man pages but it bounced off ( as i am unaware as what exactly it does ).

Your -sl 2000 tip worked for my dtterm. But it opened a new window. I want it in the same window.
On changing $TERM to xterm and then doing xterm -sl 2000 it opened one more console but without any scroll bar ( it gave about 20 lines)

Tried putting it in .profile
Did wonders of wrong things
Vibhor Kumar Agarwal
Christian Deutsch_1
Esteemed Contributor

Re: Size of terminal windows

Dear Vibhor,

1. Some points would be nice (even if you want to assign only one or two).

2. It seems you are relatively new to X so let me explain a couple of things.

3. xterm is an older kind of terminal. dtterm is newer. If you have no special need for xterm then use dtterm instead.

4. If that means opening an extra terminal that should not be a big deal, right? As you get more experience you can figure out how to get Exceed to open a dtterm right away instead of an xterm.

5. You can get RealVNC from realvnc.com it's free software and a RealVNC server is available for HP-UX (that's what I'm using to post this reply: HP-UX 11.11 as OS, Gnome as desktop, Mozilla 1.8A6 as browser, RealVNC to get the graphical connection between PC and HP-UX system).

6. So if a terminal is all you need, just open a dtterm from your first xterm and take whatever time you like in addition to learn more about terminal options, X resources and maybe Exceed.

Kind regards, Christian
Yeshua loves you!
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Size of terminal windows

I am quite generous in giving points, but i generally used to give them after the completion of post.

But as you order ;-)

I don't only want a terminal.
As you know i use exceed to get graphical UI.
Now when i open a terminal to issue commands, some scripts output scroll down to approx 1000 lines.
Redirecting them in a file is a different issue.

I simply want this terminal to scroll some lines which was it was doing in a new one.
One small confusion, when i connect to other Solaris boxes, then i don't get this problem.
Is there some configuration which needs to be changed.
Vibhor Kumar Agarwal
harry d brown jr
Honored Contributor

Re: Size of terminal windows

If you won't have .xs files until you create them!

I usually call them by their host name:

vpart1.xs

I use Xstart, which can be found by:

start->All Programs->Hummingbird Connectivity Vxxx->Exceed->Xstart.

Do the above, then change the following:
Start Method->REXEC
Program Type->X Window
User ID->Some username
Host->Your host name
Password->Your user password
Host Type->SUN
Command->/usr/openwin/bin/xterm -sl 2000 -ls -sb -cr Wheat -T `hostname` -bg MidnightBlue -fg Wheat -fn 7x13 -fb 7x13B -display @d
Information prompt->None
Description->Host Name

Then File->Save AS-> .... Here I use the host name for the filename

Repeat until you have all of your host logins defined. For HP and other boxes the COMMAND line will change, depending upon where "xterm" lives. to find use: which xterm


live free or die
harry d brown jr
Live Free or Die
Christian Deutsch_1
Esteemed Contributor

Re: Size of terminal windows

Dear Vibhor,

1. Thanks for the points, that was very generous! Sorry I didn't know you were intending to assign points anyway later on.

2. I think the difference you are seeing for Solaris may be related to X resources or options passed for the terminal command. If the default X resources for all the terminals coming from your Solaris systems are set in a particular way, then each terminal you get will have the number of scroll lines that you want. For HP-UX you can do exactly the same. The principle is the same so you can ask a colleague who knows about X on Solaris.

3. To save script output on HP-UX (not sure about Solaris), just type this command: "/usr/bin/script". This command will open a new shell in the same terminal and open a file in the current directory called "typescript". When you are finished with your long output command you can type "exit" and then look at the file "typescript" at your leisure using any editor or "more" or "less" (if you want "less" you may have to download it but I find more is good enough for me).

Kind regards, Christian
Yeshua loves you!
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Size of terminal windows

Its not working for me.

I tried them on my solaris boxes, but they still open the query dialog and i had to do all things manaully after that.
Vibhor Kumar Agarwal
harry d brown jr
Honored Contributor

Re: Size of terminal windows

vibhor,

What's not working?

live free or die
harry d brown jr
Live Free or Die
Bill Hassell
Honored Contributor

Re: Size of terminal windows

One of the confusing aspects of using Xwindows is understanding where the programs are located and how they are started. Whether you use Hummingbird Exceed or Reflection/X or any other Xwindow emulator, the programs that you run are 'stolen' from the remote host. This can be confusing since the program looks like it is running on the PC but it is really running on the remote server and you are just viewing the results on your PC.

There are 3 terminal emulators for Xwindows on HP-UX: dtterm, xterm and hpterm. When you telnet to the remote host (or use an automated login method setup by Hummingbird or Reflection/X) you start one of these programs. But unlike a many good terminal emulators, resizing the window (using the sizing handles on the window itself) changes the data space, that is, rows and columns but the font stays the same size. So the window can get longer and wider but the font stays the same and is typically too small. The way to change this is to specify a new set of font values buthe specifications are painfully complex. For example, you might want to start xterm with with a font specified by: -adobe-courier-medium-r-normal--10-100-75-75-m-60-iso8859-1
which is a normal Xwindow specification. You can also specify the font to use in a file you create called: $HOME/.Xdefaults. There are font shortcuts or aliases but these get complicated because both the server and the client must agree on the names. The xterm program simplifies this a bit with CTRL plus left or center button on the mouse. The man page for xterm gives more details. hpterm lacks these special menus, but like all Xwindow programs, there are several hundred options controlling color, fonts, XY coordinates, scroll lines, etc. Just a simple matter of reading the Xwindow resource docs.

However, the terminal window of choice for simple command-line applications is dtterm. The reason is that it actually has separate data space and font size menus. The data space is rows and columns, while the font is measured in point size. dtterm is a basic DEC terminal (not a vt100, but a vt220).

Now if all this sounds incredibly complicated just to get a simple text window that you can magnify, you'd be quite accurate. Xwindows was always designed for graphics (colors, shapes, animation, drawings, etc) but is very poor at plain text. Now many people want a "GUI" but end up using xterm, dtterm or hpterm with their obtuse appearance settings. My recommendation for text windows is to use a modern terminal emulator that runs on the PC (which is *NOT* Hyperterminal). Not only do you get Windows-like menus but you avoid transmitting kilobytes of data over the network to specify the fonts and the colors and the cursor, etc, not to mention that each Xwindow emulator window is running (chewing up CPU cycles) on the server, not your PC.

My choice is Reflection for HP (which is not Reflection/X). This terminal emulator is the best tool for managing dozens to hundreds of machines using ssh or telnet, incredibly easy macro generator for automated tasks including auto-login, completely scalable fonts (everything gets bigger with the window), thousands of lines of scroll buffer space, thousands of color choices, and most important, it is an HP terminal emnulator (VT is also included) which works flawlessly with SAM and swinstall and Glance. I don't work for WRQ (www.wrq.com), I'm just a very satisfied user. And support is phenomenal. I think the average tenure in support was something like 6 or 8 years so you always talk to an expert.


Bill Hassell, sysadmin
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Size of terminal windows

Wow,

It all looks like a ocean.
So i have to learn how to swim, just started to throw arms and legs.

I think we are getting diverted a bit, i am able to resize my terminal.

The problem is just that it can't scroll more than 100 lines. dtterm -sl 2000 solves my purpose.

Can i do it permanently somehow.
Vibhor Kumar Agarwal
Christian Deutsch_1
Esteemed Contributor

Re: Size of terminal windows

Dear Vibhor,

1. After a couple of years you should get the hang of things... X is a clever system that was invented decades ago and still works very well, as you noticed. On one hand quite complex, on the other hand very flexible (e.g. with shared/X more than one user can look at/use the same window at the same time).

2. I hope I understand your concern a little bit better now... If I got this right you want to open a dtterm "first time" the right way, without having to open another dtterm.

3. Hoping that 2 is correct: you have Exceed set up to open an xterm already, so all you need to do is set up Exceed to open a dtterm instead and pass it the -sl 2000 parameter in the process. Got it? If you don't know Exceed so well, check the online help, manuals or ask someone else who's also using it.

Kind regards, Christian
Yeshua loves you!
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Size of terminal windows

Yes,

You understood the exact thing, except that my exceed directly opens a dtterm ( not xterm ).

I have started using exceed just a month ago, needless to say i am an novice in that.

Okay i will try to see form where can i pass the -sl 2000 parameter.

Some guru here gave me the concept of .xs file, but those files are not working.
I don't know where am i wrong.
Vibhor Kumar Agarwal
Christian Deutsch_1
Esteemed Contributor
Solution

Re: Size of terminal windows

Dear Vibhor,

1. ok Exceed gives you a dtterm, great!

2. Since you have a registered copy of Exceed it should be no problem for you to get product support from Hummingbird to help you get the parameter passed.

3. You can also try:

3.1. Open a dtterm to your HP system
3.2. Create file "xres" on your HP system, containing one line:

Dtterm*saveLines: 2000l

(two-zero-zero-zero-letter l)

3.3. /usr/bin/X11/xrdb -m < xres

Kind regards, Christian
Yeshua loves you!
Bill Hassell
Honored Contributor

Re: Size of terminal windows

Another alternative to configuring dtterm (or xterm or hpterm) is to create a file in your $HOME directory called .Xdefaults. You can quickly create it like this:

cd
echo "Dtterm*saveLines: 2000l" > .Xdefaults

Now to improve the environment (actually, to make your window have the same environment as a telnet login), add this line:

cd
echo "*loginShell:true" >> .Xdefaults

Now when you next start a window from Exceed, you'll actually login and see /etc/profile and .profile run.

You can also control the colors you'd like to see in each window as in:

echo "*background:darkSlateBlue >> .Xdefaults
echo "*foreground:white" >> .Xdefaults


Bill Hassell, sysadmin
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Size of terminal windows

Thanks

It has started to work.

Do we have many more interesting things.
From where can i find them out.
Vibhor Kumar Agarwal