csekhar
4th December 2001, 15:56
Hello All,
I have a start up session which will be called as soon as a user logs into the system. This session starts ottstpvtemul and waits for the user input. But user can minimize this session and access the menubrowser. How can I stop users from accessing menubrowser until they input on the terminal emulator ? Any suggestions are welcome. Thanks for your time in reading this post.
Regards
Chandra

James
4th December 2001, 21:13
How do you call the start up session?

Note: Menu browser can always be called from Option Dialog should a user wish to.

csekhar
5th December 2001, 03:08
James,
I'm very much Sorry to disagree with you. We are talking here normal users not super users. They will not be able to access anything in option dialog except output to console. I'm on Baan IV c. In Baan IV Tools/ User Management/ Default Settings / Maintain Start Up sessions, I entered my session as the startup session. I'm checking the password aging in the session and if the user is allowed to change the password, the shell starts up. Now, user can minimize the shell and access menu browser and the system allows the user to access menubrowser. I don't want that. I want to block the user accessing menubrowser from the script using sleep(pid) because i will be knowing pid # of the menubroser. It is not working. Is there a better way to do that.
Another way I'm thinking is kill(pid) and allow the user only to change the password. After the user successfully changes the password, how can i re activate the menubrowser. I think I have to user run.baan.prog. But this command is not working. If you know how to activate a menubrowser from the script, let me know.
Regards
Chandra

James
6th December 2001, 19:47
Sorry, I was thinking of super users - doh!

Yes, there are a few things you could try. You're idea sounds ok - kill the menu browser instead of sleep, then just load the menu browser again - I'll need to check how to do this - run ottdskmbrowser?

Another way maybe be to just initially load a blank menu, or a menu containing just one session e.g. Password Change session. After your startup session runs, you could call the full normal (general) menu. Granted, this way maybe a bit messy, but just an idea.

I can see that your idea is to force a user to change their password before accessing the menu browser. A different method of doing this would just be to check the password aging using a unix script, then send a message to the user each day stating "Password Expires in xx days, change your password or account will deactivate in xx days".

There's not really a clean way of setting this up. But see also the other threads on Password Aging.

steveauckly
7th December 2001, 15:54
This may help you to start the menu browser:

function start.user.menu()
{
string l.user(8) fixed,
l.parm(12) fixed
long flags,
old.mwindow,
new.mwindow,
child.pid

l.user = strip$(logname$)
select ttaad200.*
from ttaad200
where ttaad200._index1 = {:l.user}
and ttaad200._compnr = 000
selectdo
graphical.mode = true
on case ttaad200.stpr
case ttaad.stpr.menu.browser:
child.pid = act.and.sleep("ttdskmbrowser")
break
case ttaad.stpr.org.browser:
child.pid = act.and.sleep("tgbrg4260m000")
break
case ttaad.stpr.desktop:
l.parm = "-u " & l.user
child.pid = act.and.sleep("ttdskprogman",l.parm)
break
endcase

old.mwindow = current.mwindow()
flags = DSAUTORESIZE OR DSMENUOFF
new.mwindow = create.mwindow("Main Window", DSPIXELBASED,flags)
change.mwindow(new.mwindow)

if child.pid then
set.pgrp (child.pid, child.pid)
grab.mwindow(new.mwindow,child.pid)
reactivate(child.pid)
endif
change.mwindow(old.mwindow)
selectempty
message("User not found, cannot start browser.")
endselect
}