- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Run Program at Login
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2018 03:33 PM - edited 05-24-2018 03:43 PM
05-24-2018 03:33 PM - edited 05-24-2018 03:43 PM
I could really use some help with my login procedure.
I added, to the end of my login.com, the command to execute and start our main user interactive program instead of dropping users at the $ to run the command themselves. The program starts okay and prompts the users to login (with program specific credentials) but the keyboard doesn't work. I can't type letters or numbers. I can CTRL+C to get back to the $, run the program again manually and all is fine.
* Update: Running the program form any com file has the same result, it's not limited to the login.com. I created another com file, all it does is start the program and the result is the same. I can't type my usename.
Any ideas would be greatly appreciated. Even a sample login menu, or something.
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2018 06:58 PM
05-24-2018 06:58 PM
Re: Run Program at Login
> [...] but the keyboard doesn't work. [...]
Does your "main user interactive program" get its input from
SYS$INPUT (C "stdin")? That's defined differently in a DCL script:
ITS $ type test.com
$ show logical sys$input
ITS $ @ test.com
"SYS$INPUT" = "_ITS$DKA1:" (LNM$PROCESS_TABLE)
That is, it's the (text in) the DCL script itself (thus, the disk
device name), not the user's terminal. SYS$COMMAND, on the other hand,
may be what you want:
ITS $ type test2.com
$ show logical sys$command
ITS $ @ test2.com
"SYS$COMMAND" = "_ITS$FTA411:" (LNM$PROCESS_TABLE)
So, in the DCL script, before running your "main user interactive
program", try:
$ define /user_mode sys$input sys$command
(The "/user_mode" option causes this redefinition to evaporate when the
next executable image (your program) exits.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2018 12:10 PM
05-25-2018 12:10 PM
Re: Run Program at Login
First, thank you for your reply. Below are the results of the commands you mentioned. I'm not a VMS person, but to me, it looks like the session is getting it's input from the terminal. But, I put your command in there anyway and voila, it works. You sir are my new hero. 1M thanks to you.
$ show logical sys$input
"SYS$INPUT" = "_TNA57506:" (LNM$PROCESS_TABLE)
$ show logical sys$command
"SYS$COMMAND" = "_TNA57506:" (LNM$PROCESS_TABLE)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2018 01:03 PM
05-25-2018 01:03 PM
Re: Run Program at Login
> [...] to me, it looks like the session is getting it's input from the
> terminal. [...]
Most likely, it's getting its input from SYS$INPUT, but the value of
that logical name depends on your environment.
> $ show logical sys$input
> "SYS$INPUT" = "_TNA57506:" (LNM$PROCESS_TABLE)
> $ show logical sys$command
> "SYS$COMMAND" = "_TNA57506:" (LNM$PROCESS_TABLE)
Yup. In an interactive environment, both SYS$INPUT and SYS$COMMAND
normally point to your (Telnet-connected?) terminal. But, if you stick
those commands into a DCL script (as I did, above), and execute (@) that
script, then you'll see that SYS$INPUT is different, and your program
will try to read its input from the DCL script (SYS$INPUT), not the
terminal (SYS$COMMAND). Redefining SYS$INPUT to SYS$COMMAND puts things
back to the way they were when the program was run interactively, with
SYS$INPUT pointing to your terminal.
If your program accepts interactive commands, like, say, "help" and
"exit", then you could write a DCL script which does those:
$ run main_user_interactive_program ! Or whatever you do.
help
exit
Execute (something like) that, and see what happens. Note that DCL
normally stops reading input from the script when it sees a line
beginning with "$" (but see HELP DECK for more fine print).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2018 01:13 PM
05-25-2018 01:13 PM
Re: Run Program at Login
So, it's only partially working. There are commands inside the program "functions" that pull up different features/utilities. I always thought they look like part of the main program, but now I am guessing they are not, because some of the functions run into the same problem as the login screen. I can login and navigate the program quite a bit, but there are two functions that, once I enter them the keyboard no longer types.
Is there a way to make that command perpetual for the duration of the session instead of just the next command?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2018 02:43 PM
05-25-2018 02:43 PM
Solution> [...] There are commands inside the program "functions" that pull up
> different features/utilities. [...]
Ok. If the magic program is not a monolith, then /USER_MODE may be
too gentle.
> (The "/user_mode" option causes this redefinition to evaporate when the
> next executable image (your program) exits.)
Close to true. For more accurate fine print:
HELP DEFINE /USER_MODE
So, for example, a spawned subprocess would also be unaffected by a
/USER_MODE logical name definition.
> Is there a way to make that command perpetual for the duration of the
> session instead of just the next command?
Without /USER_MODE, that logical name definition would persist. If
running the magic program is the last thing you'll ever do in that DCL
script, then it may not matter. If you'll be doing other stuff after
the magic program exits, then you might want to do something more like:
$ define sys$input sys$command
$ run main_user_interactive_program ! Or whatever you do.
$ deassign sys$input
Everything's complicated.