Operating System - HP-UX
1832864 Members
2959 Online
110048 Solutions
New Discussion

Re: How to set dtterm history in CDE

 
SOLVED
Go to solution
David_246
Trusted Contributor

How to set dtterm history in CDE

Hi,

I currently have an issue with increasing the history of a dtterm.
I know that the command "/usr/dt/bin/dtterm -ls 32000" Gives me terminal with almost the maximum of history.
But how to adapt CDE to set it as default for a new window.

Anybody any idea about which file I need and what param I need to adapt ?

Regs David
@yourservice
14 REPLIES 14
Maz_2
Advisor

Re: How to set dtterm history in CDE

If I understand your question correctly, you just have to set your HISTFILE=/.sh_history in your .profile.
Robert-Jan Goossens
Honored Contributor

Re: How to set dtterm history in CDE

Hi David,

edit you $HOME/.profile and add next lines

HISTFILE=/.sh_history
HISTSIZE=250
export HISTFILE HISTSIZE

Don't forget to uncomment the line in .dtprofile
DTSOURCEPROFILE=true

Robert-Jan.
David_246
Trusted Contributor

Re: How to set dtterm history in CDE

Sorry, must have been not clear.

If you look at a terminal in CDE (f.e. a dtterm) you have a scroll-bar in the right. This is your terminal history/memory.

You can hence a new term using dtterm -ls 32000, so that your terminal has a history of 32000 lines (you can scroll them up and down). But how to change CDE in a way that it standard has a history/memory size of 32000 when I open a new window.


Best Regs David
@yourservice
Stefan Farrelly
Honored Contributor

Re: How to set dtterm history in CDE

You need to set the Xresource to switch on logging by default;

(from a window with your DISPLAY variable set)
/usr/bin/X11/xrdb -merge <*dtterm*LoginShell: True
EOF

And now when you do dtterm& it spawns off a window which does a shell login also and as long as you have your HISTFILE set in your .profile it will setup you shell history automatically.

Im from Palmerston North, New Zealand, but somehow ended up in London...
Maz_2
Advisor
Solution

Re: How to set dtterm history in CDE

Stefan Farrelly
Honored Contributor

Re: How to set dtterm history in CDE

I think you mean dtterm -sl which is the size of the scrollbar, not -ls which means run a shell on login (run .profile). In this case you want a different Xresource;

*dtterm*saveLines: 32000

You can set this manually using xrdb or in the system Xresource file in /usr/dt/config/C.iso885915

If you do the system Xresource file you will need to restart X to pick it up (its permanent from then on) whereas xrdb will take effect immediately but will be lost on next reboot.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Pete Randall
Outstanding Contributor

Re: How to set dtterm history in CDE

I'm not sure how to set it since I'm still using hpterms but I might be able to help clarify. I think David is talking about the -sb and -sl options to dtterm, which turn on the scroll bar (-sb) and set the number of lines to be scrolled (-sl). You can do that by running "dtterm -sb -sl 32767 &", but how to set it so it happens on a global basis eludes me.


Pete

Pete
Alex Glennie
Honored Contributor

Re: How to set dtterm history in CDE

vi $HOME/Xdefaults

*saveLines:4000
*scrollBar:True

wq!

exit out of CDE and then back for changes to take effect
David_246
Trusted Contributor

Re: How to set dtterm history in CDE

Alright,

I found the solution with your help.

cd /usr/dt/appconfig/types/C/
grep dtterm *
shows : /usr/dt/appconfig/types/C/dt.dt
-----

modify file :
EXEC_STRING /usr/dt/bin/dtterm

into :
EXEC_STRING /usr/dt/bin/dtterm -sl 20000

Then left mouse button and restart WS manager.
Et voila !

Thank you all for your help !!

Regs David
@yourservice
Pete Randall
Outstanding Contributor

Re: How to set dtterm history in CDE

David,

You should not be modifying CDE resources in /usr, those are the system defaults - copy them to /etc which is where the local customizations are supposed to be.


Pete

Pete
Alex Glennie
Honored Contributor

Re: How to set dtterm history in CDE

NB .dt files are CDE action definitions so this approach will only work when firing off a dtterm via the CDE front panel.

A better approach is use my suggestion for a per user basis or cp /usr/dt/app-defaults/C/Dtterm -> /etc/dt/app-defaults/C/Dtterm and add the resources there for system wide changes that effect ALL ways of kicking off dtterms.
Pete Randall
Outstanding Contributor

Re: How to set dtterm history in CDE

Alex,

Are you implying that it's OK to modify in the /usr structure? I thought that was a no-no!


Pete

Pete
Alex Glennie
Honored Contributor

Re: How to set dtterm history in CDE

Pete well spotted, your last post drew my attention to this and I have ammended my mistake already .... I'd give you 10pts for that alone ;-)
David_246
Trusted Contributor

Re: How to set dtterm history in CDE

Hhhm,

I must confess indeed well spotted. It was a while back I addapted things like these. Thanks to you it all get clear again.

You are definit proving your state of Pharao.

Regs David
@yourservice