Operating System - HP-UX
1833016 Members
2190 Online
110048 Solutions
New Discussion

Re: HPterm always on top?

 
SOLVED
Go to solution
R.Mielen
Advisor

HPterm always on top?

Hello People,

I'm making a little script for some users to
reset some application processes.
My problem is that the hpterm does not stay on
top of all the other terminals. Is there a way
to let it stay on top until the script is finished??

I also want to disallow them to close the terminal with the mouse is this possible?
If yes; How can i accomplish this.

Thx in advance

With kind regards,

Raoul
I haven't failed, I only found 10,000 way's that won't work
9 REPLIES 9
Alex Glennie
Honored Contributor

Re: HPterm always on top?

a) not sure ... could we see a copy of the script ... I'd need to play with this .....

b) easier for me .... :

If you are using CDE - >
cp /usr/dt/config/C/sys.dtwmrc
to $HOME/.dt/dtwmrc

edit the file .... :

Menu DefaultWindowMenu
{
"Restore" _R AltF5 f.normalize
"Move" _M AltF7 f.move
"Size" _S AltF8 f.resize
"Minimize" _n AltF9 f.minimize
"Maximize" _x AltF10 f.maximize
"Lower" _L AltF3 f.lower
no-label f.separator
"Close" _C AltF4 f.kill
}

adding a comment in front of each should prevent users from
being able to make use of the close option when clicking on an hpterm with the right mouse button etc .....

If using another window manager use mwmrc vuerc etc where appropriate .....
harry d brown jr
Honored Contributor

Re: HPterm always on top?

Have a look at this thread:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xfa42eea29889d611abdb0090277a778c,00.html


live free or die
harry
Live Free or Die
R.Mielen
Advisor

Re: HPterm always on top?

Yes alex i'm using CDE so i'll try your sollution.
I can put the script here but it is like 6 pages all together but it's a simple hpterm that is send to 6 users. like:

/usr/dt/bin/hpterm -d ${TERM} -b 10 -map -geometry 47x13-5+5 -bg "Bleu" -fg "Yellow" -title "IAG reset" -e $HOME/IAG_REGION_Handling ${MVWS} ${REGIO} ${TERM} &

i already trapped ctrl-c with trap "" SIGINT
i hope i can trap the close with your sollution.
Now 1 thing left is the always on top!
I heared it wasn't possible but if theres a will theres a way.

Thx

I haven't failed, I only found 10,000 way's that won't work
R.Mielen
Advisor

Re: HPterm always on top?

I going to try both sollutions tonight.
(because of Service window) ;(

Ill get back at you tommorow.

But thx in advance
I haven't failed, I only found 10,000 way's that won't work
R.Mielen
Advisor

Re: HPterm always on top?

By the way.

If the users log-out the script dies ;(
Is there a way to let the script live until it
is finished or do i have to remove the on/off switch ;)

ThX
I haven't failed, I only found 10,000 way's that won't work
Alex Glennie
Honored Contributor

Re: HPterm always on top?

ammendments ;)

looks like you need to define a new window mwnu ie in $HOME/.dt/dtwmrc

Menu customWindowMenu
{
"Restore" _R f.normalise
"move" _M f.move
etc etc ommitting the "Close" section.

once this is defined CDE needs to be told to use this new menu

use the Dtwm*windowMenu resource

see /etc/dt/config/C/sys.resources
or $HOME/.Xdefaults

eg vi .Xdefaults and add->

Dtwm*windowMenu: CustomWindowMenu

at this point the users needs to log out of CDE for the change to take effect.

R.Mielen
Advisor

Re: HPterm always on top?

This is for all the terminals of that user.
Is it possible to do this for only one terminal
that is started from a centrall computer for a specific user................

PS how about the always on top !

I must be going now ill be back tomorrow
I haven't failed, I only found 10,000 way's that won't work
Rick Beldin
HPE Pro
Solution

Re: HPterm always on top?

In general, this is typically done by the application itself.
The app is designed to notice when other windows obscure it.

Since hpterm doesn't have this functionality builtin, your options are somewhat limited.

You can *try* telling the window manager to ignore hpterm so that it will never get window titles and borders. This will effectively keep it on top, but you won't be able to move or resize it.

Here's how you do that:

hpterm -xrm "*overrideRedirect: true"

Might want to try it.

If you need the ability to move it and resize, I'd say that you 'll have to build a Xlib application that will pop hpterm to the top of the stack every so often.
Necessary questions: Why? What? How? When?
R.Mielen
Advisor

Re: HPterm always on top?

Cowabanga baby,

This was what i was lookin for.
One option and my problems are fixed.

1-it always stays on top
2-User are not able to close it or move it

Great ;)
Thx
I haven't failed, I only found 10,000 way's that won't work