[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

Title:-={ H A C K E R S }=-
Notice:Write locked - see NOTED::HACKERS
Moderator:DIEHRD::MORRIS
Created:Thu Feb 20 1986
Last Modified:Mon Aug 03 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:680
Total number of notes:5456

379.0. "Change the name of your terminal." by AMIGO::MULLEN (Dan Mullen) Thu Jan 08 1987 01:36

I was wondering if someone who knows VMS internals
better than I could write up a small macro program
to change the [LAT] terminal name that your process is 
associated with. I remember seeing a similar program
that changed your username.

I ask this in order to confirm a bug mentioned in
the BASIC notes file.  Performing a PRINT when you
have VTA999: as your terminal screws up.

Don't worry about the privs to execute it.

Thanks in advance?

..Dan
T.RTitleUserPersonal
Name
DateLines
379.1Not a good idea!FROST::HARRIMANA cold blast from the North...Thu Jan 08 1987 15:1831
    I am confused - You said you want to change your LTA number but
    you say the bug involves a VTA (virtual terminal) number - they
    are two different entities.
    
    When your system uses virtual terminals and LAT, your process' terminal
    UCB is extended. The VTA number is available as the TT device name
    (you do a $GETDVI using DVI$_DEVNAM for device TT: or SYS$OUTPUT).
    You get the LTA device by doing a $GETDVI using DVI$_TT_PHYDEVNAM.
    
    Your process header (see the Internals Bible, Kenah and Bates) points
    to the VTA number. The VTA's UCB has a pointer to the LTA's DDB
    along with the LTA's unit number (see I/O User's Manual). The DDB
    may be used to get to the LT's UCB (there are earlier and recent
    discussions on this in both the LAT and HACKERS conferences).
    
    The actual name of your terminal (VTuxxxx and LTuxxxx) is based
    on the unit number assigned to your process by VMS when your process
    is created - in addition, the LTDRIVER knows your unit number since
    it uses your unit number (obviously) to get information from the
    Ethernet/DECserver port to your process.
    
    I don't think it would be at all advisable to attempt to "change"
    either the virtual terminal pointer or the LT terminal pointers
    or the name - your would in effect corrupt the I/O database by doing
    so. This is not in the same ballpark as changing your username,
    which resides in your process header and doesn't point anywhere
    else. If you don't like your virtual terminal number, log out and
    log in again - they are not repeated until they get to 9999 and
    then they start over again.
    
    /paul
379.2MARVIN::PALKAWed Apr 15 1987 09:3313
    While it is not a good idea to change the unit number of an active
    device it is quite easy to change the number of the next device
    to be created. The first word of the UCB for any template device
    (UCB$W_UNIT_SEED) contains the number to start allocating the next
    device from. This is normally incremented every time a UCB is created,
    but the RTDRIVER (or REMACP - not quite sure) zeroes it again to reuse
    RTA device numbers.
    
    I see no reason why you cant stick any number you like in the first
    word of the UCB of either VTA0 or LTA0 and get a large unit number
    for the next device created.
    
    Andrew Palka